Giter Club home page Giter Club logo

Comments (17)

paulbartrum avatar paulbartrum commented on July 21, 2024 1

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.

paulbartrum avatar paulbartrum commented on July 21, 2024 1

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.

maitredede avatar maitredede commented on July 21, 2024

Hi,
Is it related to this issue ? dotnet/core#139

from jurassic.

highfield avatar highfield commented on July 21, 2024

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.

maitredede avatar maitredede commented on July 21, 2024

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.

highfield avatar highfield commented on July 21, 2024

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.

maitredede avatar maitredede commented on July 21, 2024

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.

maitredede avatar maitredede commented on July 21, 2024

Almost all unit tests are passing. If someone wants to try : https://github.com/MaitreDede/jurassic/tree/dot-net-core

from jurassic.

highfield avatar highfield commented on July 21, 2024

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.

highfield avatar highfield commented on July 21, 2024

@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.

maitredede avatar maitredede commented on July 21, 2024

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.

bjj951 avatar bjj951 commented on July 21, 2024

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.

paulbartrum avatar paulbartrum commented on July 21, 2024

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.

bjj951 avatar bjj951 commented on July 21, 2024

That's fine, thanks for the response. Have split out the js functionality into a nodejs lambda.

from jurassic.

maitredede avatar maitredede commented on July 21, 2024

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.

paulbartrum avatar paulbartrum commented on July 21, 2024

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.

woodl3y avatar woodl3y commented on July 21, 2024

any update on this one ?

from jurassic.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.