Skip to content

Commit e434ff5

Browse files
committed
basic wasip2 support
1 parent 974c54e commit e434ff5

File tree

4 files changed

+7
-0
lines changed

4 files changed

+7
-0
lines changed

.cspell.dict/rust-more.txt

+2
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ unic
7474
unistd
7575
unraw
7676
unsync
77+
wasip1
78+
wasip2
7779
wasmbind
7880
wasmtime
7981
widestring

common/src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
//! A crate to hold types and functions common to all rustpython components.
22
3+
#![cfg_attr(all(target_os = "wasi", target_env = "p2"), feature(wasip2))]
34
#![cfg_attr(target_os = "redox", feature(byte_slice_trim_ascii, new_uninit))]
45

56
#[macro_use]

src/lib.rs

+2
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@
3535
//!
3636
//! The binary will have all the standard arguments of a python interpreter (including a REPL!) but
3737
//! it will have your modules loaded into the vm.
38+
39+
#![cfg_attr(all(target_os = "wasi", target_env = "p2"), feature(wasip2))]
3840
#![allow(clippy::needless_doctest_main)]
3941

4042
#[macro_use]

stdlib/src/lib.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
// to allow `mod foo {}` in foo.rs; clippy thinks this is a mistake/misunderstanding of
22
// how `mod` works, but we want this sometimes for pymodule declarations
3+
34
#![allow(clippy::module_inception)]
5+
#![cfg_attr(all(target_os = "wasi", target_env = "p2"), feature(wasip2))]
46
#![cfg_attr(target_os = "redox", feature(raw_ref_op))]
57

68
#[macro_use]

0 commit comments

Comments
 (0)