GeezerVison is showing github.com — Test real non-JS WASM execution by youknowdot · Pull Request #9816 · RustPython/RustPython
Conversation
youknowdot
commented
Nov 12, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Summary
Turn the non-JS wasm32-unknown-unknown example into a real, failure-sensitive execution harness:
- Copy supplied
-c commands or UTF-8 files into guest-owned memory instead of always evaluating 1 + 3.
- Return one JSON result and meaningful process status for success, Python exceptions, invalid input, runtime traps, and host-enforced timeouts.
- Reject unexpected imports before instantiation. The guest still uses
Interpreter::without_stdlib and imports only env.print, with no JS, WASI, filesystem, clock, or entropy provider.
- Replace the existing CI smoke invocation with contract tests in the same WASM job, and remove the now-unused wabt setup.
- Use an explicit fixed Python hash seed and report unsupported entropy rather than falsely reporting successful random-byte initialization.
- Require Wasmer 7.5, including its published atomic-wait bounds fix and atomic-notify bounds fix. Check valid, out-of-bounds, and unaligned atomic operations with small WAT fixtures.
This establishes the no-OS execution layer. CPython regrtest integration still needs a separate test build with explicit filesystem/stdio and other worker capabilities.
Verification
- Built the actual
wasm32-unknown-unknown guest and native release Wasmer host.
- All 26 contract tests passed against the rebuilt actual guest and Wasmer 7.5 release host (146.355 seconds). They cover supplied commands/files, Unicode, empty source, 32-bit/no-OS identity, assertion/syntax/repr errors, invalid input, host-enforced timeouts and WASM instruction loops, traps, malformed ABI/results, forbidden imports, and atomic memory bounds/alignment.
- The original Rust implementation passed host/guest Clippy, repository workspace and C-API tests, and workspace/C-API Clippy. The Wasmer follow-up reran the actual guest build, native release host, all 26 contract tests, and host Clippy with
--all-targets -- -D warnings.
- Changed-file pre-commit hooks, formatting, actionlint, and zizmor. Zizmor has the same four pre-existing low-severity findings as the base workflow and no new findings.
The PR is rebased onto main commit 586d38a64b (the shared WASI fix). The WASI job passed on the rebased head before this Wasmer-only follow-up; CI for the latest head is pending. No CI job, runner size, or timeout was added or increased.
AI assistance: Implemented and tested with OpenAI Codex (model identifier unavailable).
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Important
Draft PR not reviewed
Draft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration:
reviews:
auto_review:
drafts: true
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Share
-
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Pass source through a guest-owned allocation ABI, preserve the no-OS VM, and report explicit JSON results and process failures. Enforce bounded input, host deadlines, and an import allowlist. Exercise the execution and failure contract in the existing WASM CI job.
Assisted-by: Codex:unknown
Upgrade the native host to Wasmer 7.5 and cover valid, out-of-bounds and unaligned atomic operations. Preserve the no-OS guest import contract and existing CI resources.
Assisted-by: Codex:unknown
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|