Fork me on GitHub
#graalvm
<
2019-10-06
>
stathissideris08:10:46

Hello, the documentation says that “Polyglot embeddings can also be compiled ahead-of-time” but it’s not clear to me how this can be achieved. Any pointers?

sogaiu08:10:09

@stathissideris i'm not sure what they mean exactly by "Polyglot embeddings", but a phrase similar to the one you quoted appears in this section: https://www.graalvm.org/docs/reference-manual/embed/#build-native-images-from-polyglot-applications -- i think that's what you are already doing though in your instructions to taylorwood's clj.native-image, as i see "--language:js" in your deps.edn.

stathissideris09:10:03

@sogaiu thanks, but I’m loading the js code as a resource and eval’ing it at runtime, so I suspect it’s not being compiled ahead of time

sogaiu09:10:09

right -- i think the official docs are vague as to whether you really can compile the guest language program ahead-of-time. the phrase "polyglot embedding" is not very well-defined imho -- perhaps it can mean the guest runtime and not the guest program?

stathissideris09:10:37

yeah, I’m uncertain about it as well

stathissideris09:10:52

I also asked in the graalvm gitter but no response yet

borkdude09:10:50

you can also post a Github issue as a question. I've tried the Gitter before but it doesn't seem to be very active