Open magnus-madsen opened 11 months ago
After my brief investigation with https://github.com/jaschdoc/flix/tree/graal it seems we can maybe get the build
command to work with graal since we're not interacting with the live jvm that vscode uses.
However, if the user tries to do any java interop outside of what the standard library uses it probably won't work as the parts of the compiler that rely on reflection to do java interop will fail (the dependencies do not exist at compile time). One way to fix this is to define a way to link with a jar that the compiler can look up at compile time.
Btw, it may be quite easy to provide a native compilation target for Flix programs. Flix already builds a jar that contains all its dependencies, so running native-image on that jar should produce a native build that just works. I remember someone mentioning in the Gitter channel that they had it running with native-image without much effort.
I'll look into compiling a hello world program with native-image
Okay, I was able to create native image without much hassle, so maybe we should consider supporting this as an alternative compilation target (and require that the user has the native-image dependencies installed)?
Okay, I was able to create native image without much hassle, so maybe we should consider supporting this as an alternative compilation target (and require that the user has the native-image dependencies installed)?
I don't think we want to support anything, but it would be nice to have a document in docs
which outlines the steps to create the image. Maybe you can make a PR with that?
Sure thing
Update: see https://github.com/flix/book/pull/116
... and explore performance implications