Open Loara opened 2 months ago
For what it’s worth, the compilation succeeds but the final output wasm imports the symbols "env" "memset"
and "env" "memcpy"
.
To avoid this you can use RUSTFLAGS='-C target-feature=+bulk-memory' cargo component build
to generate a wasip1
component which depends on the widely supported^1 bulk memory operations.
Alternatively you can use cargo component build --target wasm32-unknown-unknown
to generate a non Wasi component instead.
cargo component build
fails to compile Rust libraries with[no_std]
flags because it cannot resolve theenv
import interface:Minimum reproducible example:
src/lib.rs
(it uses an allocator from thelol_alloc
crate)wit/world.wit