examples: adds rust build and WASI example (#676)
This fixes where our pull requests didn't check the rust source in examples were valid. It also adds an example of wasi with rust. This uses cargo-wasi because the default target creates almost 2MB of wasm for a simple cat program. Signed-off-by: Adrian Cole <adrian@tetrate.io>
This commit is contained in:
2
examples/allocation/rust/testdata/Cargo.toml
vendored
2
examples/allocation/rust/testdata/Cargo.toml
vendored
@@ -6,6 +6,8 @@ edition = "2021"
|
||||
[lib]
|
||||
# cdylib builds a a %.wasm file with `cargo build --release --target wasm32-unknown-unknown`
|
||||
crate-type = ["cdylib"]
|
||||
name = "greet"
|
||||
path = "greet.rs"
|
||||
|
||||
[dependencies]
|
||||
# wee_aloc is a WebAssembly optimized allocator, which is needed to use non-numeric types like strings.
|
||||
|
||||
Reference in New Issue
Block a user