diff --git a/.cspell.dict/rust-more.txt b/.cspell.dict/rust-more.txt index e92f1ff8c..e5d5ac86c 100644 --- a/.cspell.dict/rust-more.txt +++ b/.cspell.dict/rust-more.txt @@ -74,6 +74,8 @@ unic unistd unraw unsync +wasip1 +wasip2 wasmbind wasmtime widestring diff --git a/common/src/lib.rs b/common/src/lib.rs index a62c9517b..a66d3ad9c 100644 --- a/common/src/lib.rs +++ b/common/src/lib.rs @@ -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] diff --git a/src/lib.rs b/src/lib.rs index e9c9c9129..262904c1c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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] diff --git a/stdlib/src/lib.rs b/stdlib/src/lib.rs index 254aa3932..149ee9785 100644 --- a/stdlib/src/lib.rs +++ b/stdlib/src/lib.rs @@ -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]