Are there any .NET CLR/DLR implementations of ECMAScript?

后端 未结 9 1616
予麋鹿
予麋鹿 2020-12-12 14:30

Does anyone know of real (i.. no vaporware) implementations of ECMAScript targeting the .NET CLR/DLR? Ideally something like what Rhino is

相关标签:
9条回答
  • 2020-12-12 14:53

    Currently, I've modified a version of the EcmaScript.NET inside my YUICompressor.NET port (project).

    If you grab the source code from here, I've included my modified code in the project, which you can reference. This is the only source of code i've found in .NET which can handle parsing javascript, server side.

    Unfortunately, I can't remember how I finally found it. It was a tough process, I must admit. I think i found some references Mozilla dev pages somewhere about Rhino (the java code) which led me to finding that C# .NET implimentation.

    I had to modify it slighty to sync up with some changes the YUI Compressor guys did to their code branch. So the modified branch I have might not be the best .. but it's the closest I've seen to the original Java branch.

    The original c# code for EcmaScript.NET hasn't been touched since 2007 ... at least for the downloads page.

    Maybe this might help??

    HTH.

    0 讨论(0)
  • 2020-12-12 15:00

    I prefer JINT rather than the others.

    JINT may be slow, but it is easy to debug and to interact your own .NET classes. (It is hard to set [ComVisile] attributes every time for jscript.dll etc).

    In terms of threading, JINT and Jurassic work as I expected. In order to work with JScript engine or Google V8, you have to pay attention to UI-threading issue.

    However, JINT is out-dated in some aspect, because I have trouble to compile JQuery 1.5 or later.

    I hope Jurassic can remove its limit to stick its own class to work with by creating 'AllowBob'sCLRClass=true'.

    I have to re-write the entire class. It is hard...

    0 讨论(0)
  • 2020-12-12 15:01

    V8.NET

    This one is probably the best one I've come across yet.
    https://v8dotnet.codeplex.com/documentation

    Plus its been built from the beginning with a Mono port in mind. It gives you full control over the power of the V8 engine from managed code.

    0 讨论(0)
  • 2020-12-12 15:04

    Still Roughly alive:

    • Jurassic (Had a commit within the last year.)
    • Jint (currently taking pull requests.)

    Other Projects, Mostly Dead:

    • IronJS: A DLR-hosted JS Implementation; IronJS Google Group. (Last commit was in 2013, last blog update in 2012.)
    • Managed JScript: Died on the vine.
    • MyJScript: Mentioned in the original post, for those who want more info, there's an article : Create your own language on top of the DLR.
    • MonoJS: Mono had an implementation of JScript.Net, but they quit bothering.

    Crazy Method:

    • Rhino over IKVM (Mentioned in comments, but here's a link to more information about doing it.)
    0 讨论(0)
  • 2020-12-12 15:05

    Nobody has mentioned jurassic http://jurassic.codeplex.com/ I do not know how good it is in general (performance, usability, etc) but at least it parses pretty complex scripts (other implementations do not) and it supports ECMAScript 5 spec. I just add the link here for reference.

    0 讨论(0)
  • 2020-12-12 15:10

    You can take a look at Jint (http://jint.codeplex.com) which is an open-source ECMAScript interpreter.

    Update

    Newly rewritten version available on Github at https://github.com/sebastienros/jint

    0 讨论(0)
提交回复
热议问题