Skip to content

Commit 6587b37

Browse files
docs: Include unit test and update testing comment and command to allign whit the current status.
1 parent 6e86499 commit 6587b37

3 files changed

Lines changed: 7 additions & 4 deletions

File tree

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,13 @@ Cargo workspace; commands work from any directory.
3838
```
3939

4040
```bash
41-
cargo wasm # release .wasm (the distributed artifact)
41+
cargo wasm # release .wasm (the distributed artifact)
4242
cargo build --release # host .rlib + cdylib for Rust embedders
43-
cargo test --release # full test suite
43+
cargo test --release --no-default-features # run the compiler test suite
4444
```
4545

46+
*`--no-default-features` disables the `prebuilt` feature, which otherwise triggers a `build.rs` download of `compiler.wasm` from the GitHub release: that download is only needed by external Rust crates that consume this library, not when developing locally.*
47+
4648
Native modules ship via three delivery paths (CDN `.wasm`, host capability, JS host module), see [Writing modules](https://edgepython.com/reference/writing-modules).
4749

4850
## Quick start

compiler/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Full rationale, NaN-box patterns, IC thresholds, GC roots, and intentional omiss
3636

3737
```bash
3838
cargo wasm # release WASM artifact -> target/wasm32-unknown-unknown/release/compiler.wasm
39-
cargo test --release # host-side test suite
39+
cargo test --release --no-default-features # host-side test suite (skips the prebuilt wasm download, only needed by external consumers)
4040
```
4141

4242
`cargo wasm` is a workspace alias (`.cargo/config.toml`) for `cargo build --release --target wasm32-unknown-unknown -p edge-python`. Plain `cargo build --release` produces host artifacts (`.rlib` + cdylib) for embedders linking `compiler`. To add native modules from your own crate, implement the `Resolver` trait, see [Writing modules](https://edgepython.com/reference/writing-modules).

compiler/tests/cases/vm.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1775,5 +1775,6 @@
17751775
{"src": "print([3, 1] < [3, 2])", "output": ["True"]},
17761776
{"src": "print((1, 2, 3) < (1, 2))", "output": ["False"]},
17771777
{"src": "print(b'abc' < b'abd')", "output": ["True"]},
1778-
{"src": "print(sorted([[2], [1], [1, 0]]))", "output": ["[[1], [1, 0], [2]]"]}
1778+
{"src": "print(sorted([[2], [1], [1, 0]]))", "output": ["[[1], [1, 0], [2]]"]},
1779+
{"src": "print(sorted([10, 5, 8, 1, 67], key=lambda x: -x))", "output": ["[67, 10, 8, 5, 1]"]}
17791780
]

0 commit comments

Comments
 (0)