mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-12 12:31:22 +00:00
Add test for consuming interface types inputs (#1900)
This commit adds a test suite for consuming interface types modules as input and producing a JS polyfill output. The tests are relatively simple today and don't exercise a ton of functionality, but they should hopefully cover the breadth of at least some basics of what wasm interface types supports today. A few small fixes were applied along the way, such as: * Don't require modules to have a stack pointer * Allow passing `*.wat`, `*.wit`, or `*.wasm` files as input to `wasm-bindgen` instead of always requiring `*.wasm`.
This commit is contained in:
@ -105,7 +105,8 @@ impl Config {
|
||||
}
|
||||
|
||||
let memory = wasm_conventions::get_memory(module)?;
|
||||
let stack_pointer = wasm_conventions::get_shadow_stack_pointer(module)?;
|
||||
let stack_pointer = wasm_conventions::get_shadow_stack_pointer(module)
|
||||
.ok_or_else(|| anyhow!("failed to find shadow stack pointer"))?;
|
||||
let addr = allocate_static_data(module, memory, 4, 4)?;
|
||||
let zero = InitExpr::Value(Value::I32(0));
|
||||
let globals = Globals {
|
||||
|
Reference in New Issue
Block a user