Skip to content

ci: add wasm-validate, determinism diff, cargo clippy, MSRV pin#59

Merged
proofmancer merged 1 commit into
mainfrom
ci/wasm-validate-determinism-clippy
May 25, 2026
Merged

ci: add wasm-validate, determinism diff, cargo clippy, MSRV pin#59
proofmancer merged 1 commit into
mainfrom
ci/wasm-validate-determinism-clippy

Conversation

@proofmancer
Copy link
Copy Markdown
Member

Four lower-cost CI gates, each independently valuable.

What ships

1. wasm-validate on emitted modules

Compiler job installs wabt (apt-get install wabt), compiles each example marked "yes" in examples/README.md, runs wasm-validate on the output. Today that's just counter-mvp.cv; the list grows as more example shapes parse.

Catches: structurally invalid modules that slip past our byte-level codegen unit tests. The kind of bug that would have surfaced earlier this session if we had this gate (e.g. the OSAKA-spec REVM precompile issue, the locals-declaration off-by-one).

2. Determinism check

Compile examples/counter-mvp.cv twice in CI. cmp -s the outputs. Fail on any difference.

Catches: nondeterminism leaking in from HashMap iteration order, pointer addresses captured in output, build timestamps, locale-sensitive sorts. Cheap and high-signal.

3. cargo clippy --all-targets --release -- -D warnings

Runs as the first runtime step, before the full Wasmtime + Cranelift compile. Fail-fast for style + correctness issues.

One existing lint surfaced and is fixed in this PR: runtime/src/main.rs::hex_decode now uses s.len().is_multiple_of(2) instead of s.len() % 2 != 0 (clippy::manual_is_multiple_of warning).

4. MSRV pin

rust-version = "1.95" in runtime/Cargo.toml. Locks the floor after the v0.3 bump (revm 40 + ruint 1.18 require rustc >= 1.91). If anyone tries to downgrade, cargo's resolver complains immediately instead of failing deep inside the dependency tree.

Local verification

$ wasm-validate /tmp/ci-test.wasm   # exit 0
validate OK
$ cmp -s /tmp/det-a.wasm /tmp/det-b.wasm   # exit 0
determinism OK
$ cargo clippy --all-targets --release -- -D warnings   # exit 0
    Finished `release` profile [optimized] target(s) in 1.04s

Not in this PR (filed as their own issues)

@proofmancer proofmancer merged commit 7b49fe2 into main May 25, 2026
2 checks passed
@proofmancer proofmancer deleted the ci/wasm-validate-determinism-clippy branch May 25, 2026 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant