Skip to content

Commit 26bc5dd

Browse files
authored
Updated tests's readme (#482)
1 parent 7534f65 commit 26bc5dd

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

tests/README.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,9 @@ wasm and executed on hosts. The code compiled-to-wasm can be one of:
2323

2424
Existence of these files indicates that the language should be supported for the
2525
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.
2727

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/`
3129

3230
Each of these hosts can also be omitted if the host doesn't implement the test
3331
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:
5755
and C versions. These are then encoded into the generated `#[test]` functions
5856
to get executed when testing.
5957

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:
6159

6260
```
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
6468
```
6569

6670
and if you want to run all tests you can execute:

0 commit comments

Comments
 (0)