Skip to content

Commit aa0eb4b

Browse files
authored
rustpython-common wasm_js feature (#6116)
1 parent 141ed72 commit aa0eb4b

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

.cargo/config.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,6 @@ rustflags = "-C link-arg=/STACK:8000000"
33

44
[target.'cfg(all(target_os = "windows", not(target_env = "msvc")))']
55
rustflags = "-C link-args=-Wl,--stack,8000000"
6+
7+
[target.wasm32-unknown-unknown]
8+
rustflags = ["--cfg=getrandom_backend=\"wasm_js\""]

common/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ license.workspace = true
1010

1111
[features]
1212
threading = ["parking_lot"]
13+
wasm_js = ["getrandom/wasm_js"]
1314

1415
[dependencies]
1516
rustpython-literal = { workspace = true }

vm/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ ast = ["ruff_python_ast", "ruff_text_size"]
2424
codegen = ["rustpython-codegen", "ast"]
2525
parser = ["ast"]
2626
serde = ["dep:serde"]
27-
wasmbind = ["chrono/wasmbind", "getrandom/wasm_js", "wasm-bindgen"]
27+
wasmbind = ["rustpython-common/wasm_js", "chrono/wasmbind", "wasm-bindgen"]
2828

2929
[dependencies]
3030
rustpython-compiler = { workspace = true, optional = true }

wasm/lib/.cargo/config.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,2 @@
11
[build]
22
target = "wasm32-unknown-unknown"
3-
4-
[target.wasm32-unknown-unknown]
5-
rustflags = ["--cfg=getrandom_backend=\"wasm_js\""]

0 commit comments

Comments
 (0)