lucet
lucet copied to clipboard
Is it possible to use lucet with C++ (as scripting engine)?
Use case: lucet as scripting engine for C++ server (uses boost for networking).
Issue: C++ server <-> Rust (lucet) as scripting engine <-> C++ (WASM)
Hi,
The Lucet runtime has a C API. See the prototypes here: https://github.com/fastly/lucet/blob/master/lucet-runtime/include/lucet.h . The extern "C"
guards are currently missing, but that can be easily added in order to make usage in C++ easier.
Now, Lucet currently works by compiling WebAssembly code ahead of time using lucetc
. So it may not be a good fit as a scripting engine.
Can you clarify what you are trying to do?
I was trying to find lucet & C++ usage example.
I`ll try extern "C". Thanks for response.
The documentation is indeed missing C/C++ usage examples.
This is something we absolutely need to improve, thanks for the heads up!