Comments (17)
I definitely want to support .NET core in the next release, if possible. As far as I can tell, the necessary APIs are available, the most important being one being DynamicMethod (this API is missing on UWP, which prevents me from making Jurassic work on that platform).
from jurassic.
The latest version should work fine in .NET Core 2.0+. If you're using Nuget you'll need to tick "Include prerelease" to get a version that supports .NET core.
from jurassic.
Hi,
Is it related to this issue ? dotnet/core#139
from jurassic.
Paul, .Net Core is not the same as UWP: I know, there's a lot of confusion.
If I try to create a .Net Core Library project, then adding all the Jurassic modules, the compilation sticks in several parts. One of the most critical is that there's no ability to mark the library as "unsafe".
Any clue on how to use Jurassic as component of an ASP.Net Core project?
from jurassic.
Hi @highfield
You can use Jurassic in it actual version by creating an ASP.NET core project targetting the full framework (net46 for example). So you won't be able to run it on other OS than windows with framework installed.
I have tried to see if it can be easily ported to core, but there is a lot of System.Reflection and System.Reflection.Emit changes that would need Jurassic rewriting.
And in my case, I would like to target the Net Platform Standard 1.2 (for mono integration) : https://github.com/dotnet/corefx/blob/master/Documentation/architecture/net-platform-standard.md
from jurassic.
Thank you @maitredede .
I tried to port the Jurassic sources to the Core platform, but -yes- I bumped against the Emit problem.
At the moment, I'm in the context where I can't switch to Windows, because a Linux version (running Nodejs) is already working. The new AspNetCore release is way better than the Node's, but I must still to solve the problem of the scripting.
Thank you again.
from jurassic.
Hi,
Trying to port to core from the dot-net-core
branch.
The first problem I encountered is the class DynamicILGenerator
. I have seen there is an alternative : ReflectionEmitILGenerator
used when using Mono compiler that defines __MonoCS__
. I also uses conditionnal compilation based on dotnet core.
Then I have created reflection method helpers for differences between the dotnet core and the classic framework (ex: type.GetMethods()
has moved to type.GetTypeInfo().GetMethods()
)
I am targetting the dotnet framework 4.0 (like now) and also the dotnet core "netstandard1.6", so both will be available. I have also ported the unit tests using mstest.
As of writing, the Jurassic and UnitTest compiles. I will report when ready.
from jurassic.
Almost all unit tests are passing. If someone wants to try : https://github.com/MaitreDede/jurassic/tree/dot-net-core
from jurassic.
Awesome effort @maitredede !
As long I'll have time this morning, gonna try on Windows and Ubuntu. I'll let you know about it.
Thanks in advance.
from jurassic.
@maitredede , I was able to perform a little test on both Windows and Linux, and everything went fine!
Nothing complex, but I mostly used interop between CLR and JavaScript, to test both reliability and performance.
Let me know if you need the C# source. Not very long, but I'd avoid to pollute this thread uselessly!
Thanks again!
from jurassic.
Hi,
I have ported more projects to dotnet core. There is still the Attribute Code Generation
project, since it has to be rewritten, because this is no longer .csproj
but .xproj
, and has to change workspace class (see dotnet/roslyn#11342).
There is still 2 unit tests failing : #74 and UnitTests.BigIntegerTests.Log
: Assert.AreEqual failed. Expected:<20,1897521142866>. Actual:<20,1897521142866>. Computing Log(4294967296, 3)
.
Also, do you think it is possible to publish a new version to nuget ? If you merge the dot-net-core
branch #75 you can run in the solution directory :
dotnet restore Jurassic
dotnet pack Jurassic --configuration release --version-suffix beta1
The packages will be ready to publish in Jurassic\bin\release\
, and considered as "beta" for nuget.
from jurassic.
Hi,
Looking for a NuGet package of Jurassic that will run under the AWS lambda C# environment, supports .Net Core 1.0 runtime only for some reason. Not getting my hopes up! cheers
from jurassic.
I've been holding off doing any work on getting Jurassic to work on .net core until Microsoft finish the .csproj tooling for .net core. This should happen soon, with the release of VS 2017 RTM. But it'll likely be a work-in-progress build; at the glacial rate I'm making changes, it's unlikely there'll be a NuGet package update for a while, sorry!
from jurassic.
That's fine, thanks for the response. Have split out the js functionality into a nodejs lambda.
from jurassic.
Hi @paulbartrum
As far as I remember, RTM is not expected until a few month. Until then, do you think it may be possible to publish a nuget "beta" package with actual toolchain (project.json) ? This won't change too much things and then you could switch back to .csproj when RTM. I think it can be possible with the PR I made on your dot-net-core branch.
from jurassic.
As far as I remember, RTM is not expected until a few month.
It should be less than a month away, actually:
https://blogs.msdn.microsoft.com/visualstudio/2017/02/09/visual-studio-2017-launch-event-and-20th-anniversary/
from jurassic.
any update on this one ?
from jurassic.
Related Issues (20)
- Return value of CompiledScript HOT 5
- 3.2.1 backward compatibility issues HOT 4
- PropertyAccessorValue not visible HOT 1
- How to catch CLR Exception? HOT 7
- System.ArgumentNullException: Value cannot be null. (Parameter 'value') after update from 3.1.0 to 3.2.2 HOT 3
- JSONObject.Parse() fails when number is in scientific notation HOT 4
- ScriptEngine.EnableDebugging HOT 3
- Template of literals is slow
- JSON.stringify([].length) errors HOT 2
- JSONObject.Parse consumes more and more memory. Possible memory leak? HOT 11
- Scoping and CompiledScript.Execute vs ScriptEngine.Evaluate HOT 5
- Catching script errors at compile time HOT 2
- Currently JSONObject.Stringify returns object instead of string after upgrading from 3.1.0 to 3.2.6 HOT 3
- ScriptEngine.GetGlobalValue HOT 1
- Bug in Evaluate: Loop and variable handling HOT 2
- PM - Customer side scripting for Channels HOT 1
- Date.UTC() doesn't interpret two-digit years correctly HOT 1
- Possibility to create 'sessions' HOT 4
- Linux compability ? HOT 4
- Is it possible to go from JS to DLL and then to C# source? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jurassic.