Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
Fix wasm32-unknown-unknown
  • Loading branch information
moreal committed Nov 16, 2025
commit 1a68f42e18c8caf0271ddb7db9a7a3663cdb85dc
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ ascii = "1.1"
bitflags = "2.9.4"
bstr = "1"
cfg-if = "1.0"
chrono = "0.4.42"
chrono = { version = "0.4.42", default-features = false, features = ["clock", "oldtime", "std"] }
constant_time_eq = "0.4"
criterion = { version = "0.7", features = ["html_reports"] }
crossbeam-utils = "0.8.21"
Expand Down
6 changes: 4 additions & 2 deletions crates/vm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ bitflags = { workspace = true }
bstr = { workspace = true }
cfg-if = { workspace = true }
crossbeam-utils = { workspace = true }
chrono = { workspace = true, features = ["wasmbind"] }
chrono = { workspace = true }
constant_time_eq = { workspace = true }
flame = { workspace = true, optional = true }
getrandom = { workspace = true }
Expand Down Expand Up @@ -148,8 +148,10 @@ features = [
"Win32_UI_WindowsAndMessaging",
]

[target.'cfg(all(target_arch = "wasm32", target_os = "unknown"))'.dependencies]
[target.'cfg(target_arch = "wasm32")'.dependencies]
Comment thread
moreal marked this conversation as resolved.
Outdated
wasm-bindgen = { workspace = true, optional = true }

[target.'cfg(all(target_arch = "wasm32", target_os = "unknown"))'.dependencies]
getrandom = { workspace = true }
Comment thread
moreal marked this conversation as resolved.
Outdated

[build-dependencies]
Expand Down
1 change: 1 addition & 0 deletions wasm/wasm-unknown-test/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use rustpython_vm::{Interpreter, eval};

#[unsafe(no_mangle)]
pub unsafe extern "C" fn eval(s: *const u8, l: usize) -> u32 {
let src = std::slice::from_raw_parts(s, l);
let src = std::str::from_utf8(src).unwrap();
Expand Down