@@ -23,11 +23,9 @@ wasm and executed on hosts. The code compiled-to-wasm can be one of:
23
23
24
24
Existence of these files indicates that the language should be supported for the
25
25
test, and if a file is missing then it's skipped when running other tests. Each
26
- ` wasm.* ` file is run inside each of the host files:
26
+ ` wasm.* ` file is run inside each of the host file under ` tests/runtime ` directory.
27
27
28
- * ` host.rs ` - executes wasms with Wasmtime
29
- * ` host.js ` - executes WebAssembly with node.js
30
- * ` host.py ` - executes with ` wasmtime ` 's PyPI package.
28
+ For example, ` tests/runtime/variants.rs ` is the host file for ` tests/runtime/variants/ `
31
29
32
30
Each of these hosts can also be omitted if the host doesn't implement the test
33
31
or something like that. Otherwise for each host that exists when the host's
@@ -57,10 +55,16 @@ The actual way tests are hooked up looks roughly like:
57
55
and C versions. These are then encoded into the generated ` #[test] ` functions
58
56
to get executed when testing.
59
57
60
- The general layout is then that if you want to run the JS host tests you run:
58
+ The general layout is then that if you want to run the rust guest tests you run:
61
59
62
60
```
63
- $ cargo test -p wit-bindgen-gen-host-js
61
+ $ cargo test -p wit-bindgen-gen-guest-rust
62
+ ```
63
+
64
+ if you want to run the rust guest tests under ` tests/runtime/* ` , you run:
65
+
66
+ ```
67
+ $ cargo test -p wit-bindgen-cli --no-default-features -F rust
64
68
```
65
69
66
70
and if you want to run all tests you can execute:
0 commit comments