You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit adds some initial support for `wasm32-wasip2` in
`wit-bindgen`. Everything works as-is but one of the benefits of a new
target is that we can move runtime bits such as `cabi_realloc` into the
standard library rather than in this crate. This PR sets up
infrastructure to test the `wasm32-wasip2` target and additionally
assumes rust-lang/rust#122411 for providing the implementation of
`cabi_realloc`.
.unwrap_or_else(|| panic!("failed to find wasm with name '{name}' - make sure to include '{name}.rs' module in crates/test-rust-wasm/src/bin directory"));
169
-
println!("rust core module = {core:?}");
170
-
let module = std::fs::read(&core)?;
171
-
let wasm = ComponentEncoder::default()
172
-
.module(&module)?
173
-
.validate(true)
174
-
.adapter("wasi_snapshot_preview1",&wasi_adapter)?
175
-
.realloc_via_memory_grow(true)
176
-
.encode()?;
169
+
let bytes = std::fs::read(&core)?;
170
+
let dst = if wasmparser::Parser::is_component(&bytes){
0 commit comments