Closed jsoverson closed 3 years ago
Hi Jarrod,
lucetc rust_test.wasm --output rust_test.so --bindings ../lucet/lucet-wasi/bindings.json
lucetc
needs to know the set of allowed hostcalls.
This is the purpose of the bindings.json
file for WASI. If you implement your own hostcalls, you need to provide a JSON file similar to that one, mapping imported (as seen by the WebAssembly module) names to names provided by the runtime.
The --bindings
option can be present multiple times in the command line.
I'm trying to work through the documentation, but I can't get the hostcall examples to work from the lucet-runtime docs.
lucetc
errors out on both AssemblyScript and Rust versions:Rust code that builds to the above wasm:
AssemblyScript code that builds the wasm above:
This is probably my fault, but I'd like to contribute back to documentation or examples once I get passed the problems.