Skip to content

Commit 7c4c1ea

Browse files
authored
Fix wasm32-unknown-unknown target build (RustPython#6278)
1 parent 1568d2a commit 7c4c1ea

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ ascii = "1.1"
162162
bitflags = "2.9.4"
163163
bstr = "1"
164164
cfg-if = "1.0"
165-
chrono = "0.4.42"
165+
chrono = { version = "0.4.42", default-features = false, features = ["clock", "oldtime", "std"] }
166166
constant_time_eq = "0.4"
167167
criterion = { version = "0.7", features = ["html_reports"] }
168168
crossbeam-utils = "0.8.21"

crates/vm/Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ bitflags = { workspace = true }
4646
bstr = { workspace = true }
4747
cfg-if = { workspace = true }
4848
crossbeam-utils = { workspace = true }
49-
chrono = { workspace = true, features = ["wasmbind"] }
49+
chrono = { workspace = true }
5050
constant_time_eq = { workspace = true }
5151
flame = { workspace = true, optional = true }
5252
getrandom = { workspace = true }
@@ -150,7 +150,6 @@ features = [
150150

151151
[target.'cfg(all(target_arch = "wasm32", target_os = "unknown"))'.dependencies]
152152
wasm-bindgen = { workspace = true, optional = true }
153-
getrandom = { workspace = true }
154153

155154
[build-dependencies]
156155
glob = { workspace = true }

wasm/wasm-unknown-test/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
use rustpython_vm::{Interpreter, eval};
22

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

0 commit comments

Comments
 (0)