From 06e9170f302b7f434d7da38ea4d8fd1917ed3343 Mon Sep 17 00:00:00 2001 From: Josh Triplett Date: Tue, 29 Oct 2019 07:47:49 -0700 Subject: [PATCH] wasmtime-py: Don't use "main.rs" for a wasm example so cargo doesn't test it (#464) cargo test will test examples that have a "main.rs", but in this case, the example requires manual compilation as a wasm module, and doesn't build as a standalone program. Rename it to "demo.rs". --- misc/wasmtime-py/examples/import/README.md | 4 ++-- misc/wasmtime-py/examples/import/{main.rs => demo.rs} | 0 misc/wasmtime-py/examples/import/run.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) rename misc/wasmtime-py/examples/import/{main.rs => demo.rs} (100%) diff --git a/misc/wasmtime-py/examples/import/README.md b/misc/wasmtime-py/examples/import/README.md index bdc4830b89..db56dcbe9b 100644 --- a/misc/wasmtime-py/examples/import/README.md +++ b/misc/wasmtime-py/examples/import/README.md @@ -1,9 +1,9 @@ # Build example's file -To build `main.wasm` use rustc (nightly) for wasm32 target with debug information: +To build `demo.wasm` use rustc (nightly) for wasm32 target with debug information: ``` -rustc +nightly --target=wasm32-unknown-unknown main.rs --crate-type=cdylib +rustc +nightly --target=wasm32-unknown-unknown demo.rs --crate-type=cdylib ``` # Run example diff --git a/misc/wasmtime-py/examples/import/main.rs b/misc/wasmtime-py/examples/import/demo.rs similarity index 100% rename from misc/wasmtime-py/examples/import/main.rs rename to misc/wasmtime-py/examples/import/demo.rs diff --git a/misc/wasmtime-py/examples/import/run.py b/misc/wasmtime-py/examples/import/run.py index e190f2b7b7..f39baccd49 100644 --- a/misc/wasmtime-py/examples/import/run.py +++ b/misc/wasmtime-py/examples/import/run.py @@ -1,4 +1,4 @@ import wasmtime -import main +import demo -main.test() +demo.test()