Skip to content

basic wasip2 support #5720

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 21, 2025
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
2 changes: 2 additions & 0 deletions .cspell.dict/rust-more.txt
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ unic
unistd
unraw
unsync
wasip1
wasip2
wasmbind
wasmtime
widestring
Expand Down
1 change: 1 addition & 0 deletions common/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//! A crate to hold types and functions common to all rustpython components.

#![cfg_attr(all(target_os = "wasi", target_env = "p2"), feature(wasip2))]
#![cfg_attr(target_os = "redox", feature(byte_slice_trim_ascii, new_uninit))]

#[macro_use]
Expand Down
2 changes: 2 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
//!
//! The binary will have all the standard arguments of a python interpreter (including a REPL!) but
//! it will have your modules loaded into the vm.

#![cfg_attr(all(target_os = "wasi", target_env = "p2"), feature(wasip2))]
#![allow(clippy::needless_doctest_main)]

#[macro_use]
Expand Down
2 changes: 2 additions & 0 deletions stdlib/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// to allow `mod foo {}` in foo.rs; clippy thinks this is a mistake/misunderstanding of
// how `mod` works, but we want this sometimes for pymodule declarations

#![allow(clippy::module_inception)]
#![cfg_attr(all(target_os = "wasi", target_env = "p2"), feature(wasip2))]
#![cfg_attr(target_os = "redox", feature(raw_ref_op))]

#[macro_use]
Expand Down
Loading