-
Notifications
You must be signed in to change notification settings - Fork 286
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for the official Wasm C-API #1009
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1009 +/- ##
==========================================
- Coverage 80.72% 80.10% -0.63%
==========================================
Files 274 295 +21
Lines 25173 25369 +196
==========================================
Hits 20322 20322
- Misses 4851 5047 +196 ☔ View full report in Codecov by Sentry. |
We probably need to do something similar here to enable LTO builds for the artifacts later: bytecodealliance/wasmtime#7341 However, I'd put the implementation into an |
They are all still empty since the API is still evolving.
This is currently blocked by Wasmi having no built-in support for This API is mandated by the Wasm C-API. |
This will fail to compile until Wasmi supports the Instance::new API as mandated by the C-API.
Closes #922
This is going to be a larger effort and low-priority so I will be working on it from time to time.
Inspired by: https://github.com/bytecodealliance/wasmtime/tree/main/crates/c-api/
TODO
Chores
Implementation
wasm_config_t
wasm_engine_t
wasm_store_t
wasm_module_t
wasm_instance_t
wasm_trap_t
wasm_byte_vec_t
wasm_func_t
wasm_functype_t
wasm_functype_vec_t
wasm_table_t
wasm_tabletype_t
wasm_tabletype_vec_t
wasm_memory_t
wasm_memorytype_t
wasm_memorytype_vec_t
wasm_global_t
wasm_globaltype_t
wasm_globaltype_vec_t
wasm_byte_vec_t
wasm_extern_t
wasm_externtype_t
wasm_externtype_vec_t
wasm_importtype_t
wasm_importtype_vec_t
wasm_exporttype_t
wasm_exporttype_vec_t
wasm_frame_t
wasm_frame_vec_t
wasm_val_t
wasm_val_vec_t
wasm_valtype_t
wasm_valtype_vec_t
wasm_ref_t
wasmi_error_t
Follow-up PRs
wasmi_linker_t
wasmi_caller_t