enable compiling C# code with scriptcs and Roslyn #31

Open
tjanczuk opened this Issue Mar 28, 2013 · 7 comments

Comments

Projects
None yet
4 participants
Owner

tjanczuk commented Mar 28, 2013

This is to provide an edge-csx module for edge that will allow compiling inline C# script using scriptcs.

When the dust settles one should be able to write code like this (among other interesting idioms):

var myFunc = edge.func('csx', function() {/*
     #r "System.Dala.dll"
     async (input) => 
     {
          // do something interesting with ADO.NET
          var result;
          return result;
     }
*/});

myFunc(...);

The packege.json for this app should include both edge and edge-csx as a dependency:

{
    "dependencies": {
        "edge": "0.7.4",
        "edge-csx": "0.1.0"
    },
    ...
}

Everything you need to implement edge-csx should be covered at https://github.com/tjanczuk/edge/wiki/Add-support-for-a-CLR-language. Also make sure to check out https://github.com/tjanczuk/edge-cs for reference implementation in C#.

@ghost ghost assigned glennblock Mar 28, 2013

Contributor

dfinke commented Mar 28, 2013

So EdgeCompiler is the way to move forward? Will you have EdgeProvider or is EdgeCompiler the new name?

Owner

tjanczuk commented Mar 28, 2013

EdgeCompiler. I was about to send you a note about edge-ps, but I guess you are already on top of this...

7sharp9 commented May 1, 2013

@glennblock How is the scriptcs and Roslyn module work? Will a service be called to retrieve the assembly or will it all be in process?

Collaborator

glennblock commented May 1, 2013

Currently we compile in memory. For the mono port though I believe the engine is writing to disk.

-----Original Message-----
From: "Dave Thomas" notifications@github.com
Sent: ‎5/‎1/‎2013 3:12 AM
To: "tjanczuk/edge" edge@noreply.github.com
Cc: "Glenn Block" glenn.block@gmail.com
Subject: Re: [edge] enable compiling C# code with scriptcs and Roslyn (#31)

@glennblock How is the scriptcs and Roslyn module work? Will a service be called to retrieve the assembly or will it all be in process?

Reply to this email directly or view it on GitHub.

Collaborator

glennblock commented Sep 3, 2013

All the infra is in place to now make this possible if one wants to take this as I am slammed for a few weeks.

The way to do this is to use Scriptcs.Hosting and author an edge component that invokes it. You can look to the scriptcs source (https://github.com/scriptcs/scriptcs/blob/dev/src/ScriptCs/Program.cs#L220) to see how to use this.

Collaborator

glennblock commented Sep 3, 2013

In terms of partially redeeming myself, I did build the infra to enable this in, which is the hosting layer, before you'd have been copying a ton of code from scriptcs itself to make this possible :-)

Owner

tjanczuk commented Sep 3, 2013

Thanks Glenn!

@glennblock glennblock referenced this issue in scriptcs/scriptcs Sep 3, 2013

Closed

Add support for scriptcs in edge #455

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment