Is there any prior art of using a GraalVM binary executable packaged up into a Rust application? I am assuming it’s doable just curious if anyone has done
I managed to find the doc
https://github.com/babashka/sci/blob/master/doc/libsci.md
Libsci compiles sci (a clojure package/funcion) into a shared library .so via GraalVM, that can be used from rust/cpp/any ffi lang
My initial idea was that you could study how libsci is compiled and use as a reference to compile your own library into a shared lib
But another path to make clojure works in your rust app is to import libsci itself, and than make libsci run your clojure core.
IDK. Both paths seems to have pros and cons 🙂
libsci packs sci library into rust bindings
https://github.com/babashka/sci/tree/master/libsci
(via graalvm)
Interesting. It’s not super clear to me how it’s used from the code. @souenzzo
I am guessing that it takes sci (clojure) from a separate file and executes it?
https://yamlscript.org compiles to a shared library libyamlscript.so and publishes a crate that binds to it: https://crates.io/crates/yamlscript and does the same for https://yamlscript.org/doc/bindings/#currently-available-libraries