Skip to content

Commit cc8735a

Browse files
committed
Fixi wasm32 build for workspace
1 parent 24d9be1 commit cc8735a

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ jobs:
115115
uses: actions-rs/cargo@v1
116116
with:
117117
command: check
118-
args: --target wasm32-unknown-unknown --manifest-path vm/Cargo.toml
118+
args: --target wasm32-unknown-unknown --no-default-features
119119

120120
- uses: actions-rs/toolchain@v1
121121
with:

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ libc = "0.2.123"
4646
flame = { version = "0.2.2", optional = true }
4747
flamescope = { version = "0.1.2", optional = true }
4848

49-
[target.'cfg(not(target_os = "wasi"))'.dependencies]
49+
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
5050
rustyline = "9.1.2"
5151

5252
[dev-dependencies]

src/shell/helper.rs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
#![cfg_attr(target_os = "wasi", allow(dead_code))]
2-
use rustpython_vm::builtins::{PyDictRef, PyStrRef};
3-
use rustpython_vm::VirtualMachine;
4-
use rustpython_vm::{function::ArgIterable, PyResult, TryFromObject};
1+
#![cfg_attr(target_arch = "wasm32", allow(dead_code))]
2+
use rustpython_vm::{
3+
builtins::{PyDictRef, PyStrRef},
4+
function::ArgIterable,
5+
PyResult, TryFromObject, VirtualMachine,
6+
};
57

68
pub struct ShellHelper<'vm> {
79
vm: &'vm VirtualMachine,
@@ -140,7 +142,7 @@ impl<'vm> ShellHelper<'vm> {
140142
}
141143

142144
cfg_if::cfg_if! {
143-
if #[cfg(not(target_os = "wasi"))] {
145+
if #[cfg(not(target_arch = "wasm32"))] {
144146
use rustyline::{
145147
completion::Completer, highlight::Highlighter, hint::Hinter, validate::Validator, Context,
146148
Helper,

0 commit comments

Comments
 (0)