diff options
author | Yuhan Deng <31569419+yhdengh@users.noreply.github.com> | 2022-09-16 09:47:25 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-16 16:47:25 +0000 |
commit | dd44ca91986d8de2425cfb4d8e31a23c5d9e873f (patch) | |
tree | cae8cb22c3444ef734f3b343e49acb4a87ac72b4 /wasm2c/wasm-rt.h | |
parent | 31604f8f62c4a83d9f89b3d07631de26fe9f1fba (diff) | |
download | wabt-dd44ca91986d8de2425cfb4d8e31a23c5d9e873f.tar.gz wabt-dd44ca91986d8de2425cfb4d8e31a23c5d9e873f.tar.bz2 wabt-dd44ca91986d8de2425cfb4d8e31a23c5d9e873f.zip |
wasm2c: support for module instancing (#1814)
Co-authored-by: Angela Montemayor <amontema@cs.stanford.edu>
Diffstat (limited to 'wasm2c/wasm-rt.h')
-rw-r--r-- | wasm2c/wasm-rt.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/wasm2c/wasm-rt.h b/wasm2c/wasm-rt.h index 51a5dcd5..7b8ec1f4 100644 --- a/wasm2c/wasm-rt.h +++ b/wasm2c/wasm-rt.h @@ -146,6 +146,10 @@ typedef struct { /** The function. The embedder must know the actual C signature of the * function and cast to it before calling. */ wasm_rt_funcref_t func; + /** A function instance is a closure of the function over an instance + * of the originating module. The module_instance element will be passed into + * the function at runtime. */ + void* module_instance; } wasm_rt_elem_t; /** A Memory object. */ @@ -173,6 +177,9 @@ typedef struct { /** Initialize the runtime. */ void wasm_rt_init(void); +/** Is the runtime initialized? */ +bool wasm_rt_is_initialized(void); + /** Free the runtime's state. */ void wasm_rt_free(void); |