miniscript icon indicating copy to clipboard operation
miniscript copied to clipboard

Plans to support javascript

Open JuKu opened this issue 7 years ago • 3 comments

Hi,

Are there already plans to support javascript as a script language?

JuKu avatar Oct 14 '18 13:10 JuKu

Hey there,

The problem is that Nashorn (JDK JS engine) was deprecated in Java 11 so we'd need to find an equivalent javascript runtime that supports the JSR 223 API. GraalVM will support javascript but there's still some work to be done to support LWJGL (https://github.com/LWJGL/lwjgl3/issues/397).

I'm open to suggestions :)

tomcashman avatar Oct 14 '18 14:10 tomcashman

@tomcashman Thanks for that fast answer!

What's with Rhino JS? Or Google Javascript V8 engine? Is it really neccessary to use the JSR 223 API?

JuKu avatar Oct 14 '18 17:10 JuKu

Currently all the abstractions are based on JSR 223 and guarantee capabilities of the scripting runtime. It would be possible to hack in a non-JSR 223 language but I'd prefer not to have to maintain that.

It seems Rhino JS is still maintained (although slower than the deprecated Nashorn) - however the JSR 223 bindings haven't been updated so these would need to be updated and bundled with miniscript somehow. There's some notes on how to do the updating here.

It'll be another few months before my schedule frees up to look at this. But I'll happily review a merge request if submitted :)

tomcashman avatar Oct 14 '18 18:10 tomcashman