ramen :ramen:
Load WebAssembly like JavaScript
...
Quickly get access to functions for invoking JavaScript
Rust:
let fn_log = register_function;
let msg = "Hello World!";
fn_log.invoke_2;
C/C++:
JSFunction fnLog = ;
char *msg = "Hello World!";
;
Works with any WebAssembly programming language out of the box:
- Rust
- C/C++
- AssemblyScript
Lot's of helpers!
In your JS function context
is passed in to handle most chores for binding and give access to your program.
context.getUtf8FromMemory(start,length)
- extract utf-8 text from your program's memory.context.storeObject(object)
- store an object in your context for later reference, get a handle you can give to WebASsembly.context.getObject(handle)
- retreive and object from your context with a handle.context.releaseObject(handle)
- release a stored object so it's memory can be freed.context.module
- Get access to your program so you can call methods on it.