summaryrefslogtreecommitdiff
path: root/examples/rust/build.sh
diff options
context:
space:
mode:
authorHenry <mail@henrygressmann.de>2026-08-27 16:06:57 +0200
committerHenry <mail@henrygressmann.de>2026-08-27 16:06:57 +0200
commit843e0ff5601479239791f452bec9865df779839b (patch)
tree622e042f6f6cacec2a72c70f22816e8296997e41 /examples/rust/build.sh
parenta8f42e481e9cc56834c39f073236c25cb533efc6 (diff)
chore: simplify operands, extract more exec_ methods
Signed-off-by: Henry <mail@henrygressmann.de>
Diffstat (limited to 'examples/rust/build.sh')
-rwxr-xr-xexamples/rust/build.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/examples/rust/build.sh b/examples/rust/build.sh
index cbd3b27..873028f 100755
--- a/examples/rust/build.sh
+++ b/examples/rust/build.sh
@@ -12,6 +12,10 @@ wasmopt_features="--enable-simd --enable-relaxed-simd --enable-tail-call --enabl
# ensure out dir exists
mkdir -p "$dest_dir"
+# Keep the embedded archive synchronized with the current archive version and instruction layout.
+cargo run --quiet --manifest-path "../../Cargo.toml" --package tinywasm-cli -- \
+ compile "src/print.wasm" --output "src/print.twasm" --force || exit
+
# build no_std
RUSTFLAGS="-Zlocation-detail=none -Zfmt-debug=none -C target-feature=$rust_features -C panic=abort" cargo build -Z build-std=core,alloc,panic_abort -Z build-std-features="optimize_for_size" --target wasm32-unknown-unknown --package rust-wasm-examples --profile=wasm --bin tinywasm_no_std --no-default-features
cp "$out_dir/tinywasm_no_std.wasm" "$dest_dir/"