-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GraalJS should support Ahead-of-Time(AOT) compilation to Native binary like GraalPy. #8850
Comments
It's not quite AOT, but:
GraalJs does support AOT, in the sense that you can use GraalJs in a |
Thanks for the feature request, @Foxchandaisuki. I'm guessing you would like to see something similar to GraalPy's standalone application feature for Graal.js? Is that correct? As @sgammon already pointed out: Graal.js it self can already be AOT-compiled and a |
That's correct. I hope GraalJS was a something like Kotlin/Native for JavaScript. |
IIUC, it's not the user's Python code that is AOT compiled, but the GraalPy runtime itself. GraalPy containts lots of Java code and that Java code is AOT compiled, so then you don't need JVM to run that Java code. Same thing goes for GraalJS |
@tarsa The user's Python code can be compiled as well. You would just have to make sure it is loaded and executed within the addressable context managed by But that doesn't stop you from using Auxiliary Images, or from running a Truffle computation of some kind (regardless of language) at build time. There is also GraalPy's Standalone Applications feature, as pointed out by @fniephaus |
GraalPy, which is Python implication of the GraalVM, supports AOT compilation to Native binary.
In time of now, most of main implications of Python and JavaScript do NOT support AOT compilation.
For example, NodeJS , Deno, and even Bun only supports Just-in-Time(JIT) compilation and they have no plan to support AOT.
However, the case of GraalPy shows us that making Script language to be compiled to Native binary is technically possible. And already there is an AOT compiler for Javascript like ChowJS, but unfortunately it is a closed source, and maybe a project NOT free of charge.
Static Hermes, which is being developed by Meta shows us that AOT compiling of JavaScript could be a killer feature of the project.
The text was updated successfully, but these errors were encountered: