Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,11 @@ members = [
[workspace.package]
edition = "2021"
publish = false

[workspace.dependencies]
# wasmtime-environ and wit-parser ride together: wasmtime 47 links wasmparser
# 0.252, and wit-parser 0.252 is the same wasm-tools release train
# (docs/architecture.md §4.1, §9). Bump both here, together; `just
# test-rust` asserts they still agree.
wasmtime-environ = { version = "=47.0.3", features = ["component-model", "compile", "anyhow"] }
wit-parser = { version = "=0.252.0", features = ["serde"] }
7 changes: 2 additions & 5 deletions crates/bindgen/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,8 @@ name = "bindgen"
path = "src/lib.rs"

[dependencies]
# wit-parser is pinned to match crates/translator-shim's wasmparser pin
# exactly (docs/architecture.md §9): both ride the wasm-tools workspace's
# lockstep release train, so a single version number covers both crates.
# Bump this pin together with translator-shim's wasmtime-environ pin.
wit-parser = { version = "=0.252.0", features = ["serde"] }
# Version pinned in the root workspace table, alongside translator-shim's wasmtime-environ pin (docs/architecture.md §9).
wit-parser = { workspace = true }
anyhow = "1"
sha2 = { version = "0.10", default-features = false, features = ["std"] }
serde = { version = "1", features = ["derive"] }
Expand Down
4 changes: 2 additions & 2 deletions crates/translator-shim/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ crate-type = ["lib", "cdylib"]

[dependencies]
# Pinned exactly (docs/architecture.md §4.1): the same major (47) as the installed wasmtime
# CLI (47.0.1), so native behavior can be compared against `wasmtime compile`.
wasmtime-environ = { version = "=47.0.3", features = ["component-model", "compile", "anyhow"] }
# CLI (47.0.1). Version lives in the root workspace table.
wasmtime-environ = { workspace = true }
anyhow = "1"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
Expand Down
10 changes: 10 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,16 @@ corpus:

test-rust:
cargo test -p translator-shim -p bindgen -p testgen
# Drift check: wasmtime-environ and wit-parser must stay on the same
# wasm-tools release train (docs/architecture.md §4.1, §9). testgen is
# excluded — it uses wast 255 on purpose (docs/architecture.md risk table).
dupes=$(cargo tree -e normal -p translator-shim -p bindgen --prefix none \
| grep -E '^(wasmparser|wit-parser|wasm-encoder) v' | awk '{print $1, $2}' | sort -u \
| awk '{print $1}' | sort | uniq -d); \
if [ -n "$dupes" ]; then \
echo "drift: multiple versions found for: $dupes" >&2; \
exit 1; \
fi

test-runtime: shim fixtures corpus
cd runtime && deno task check && deno task test
Expand Down
Loading