@@ -10,7 +10,7 @@ repository.workspace = true
1010license.workspace = true
1111
1212[features ]
13- default = [" compiler" ]
13+ default = [" compiler" , " wasmbind " ]
1414importlib = []
1515encodings = [" importlib" ]
1616vm-tracing-logging = []
@@ -23,6 +23,7 @@ ast = ["rustpython-ast"]
2323codegen = [" rustpython-codegen" , " ast" ]
2424parser = [" rustpython-parser" , " ast" ]
2525serde = [" dep:serde" ]
26+ wasmbind = [" chrono/wasmbind" , " getrandom/js" , " wasm-bindgen" ]
2627
2728[dependencies ]
2829rustpython-compiler = { workspace = true , optional = true }
@@ -48,6 +49,7 @@ cfg-if = { workspace = true }
4849crossbeam-utils = { workspace = true }
4950chrono = { workspace = true , features = [" wasmbind" ] }
5051flame = { workspace = true , optional = true }
52+ getrandom = { workspace = true }
5153hex = { workspace = true }
5254indexmap = { workspace = true }
5355itertools = { workspace = true }
@@ -71,7 +73,6 @@ thread_local = { workspace = true }
7173memchr = { workspace = true }
7274
7375caseless = " 0.2.1"
74- getrandom = { version = " 0.2.12" , features = [" js" ] }
7576flamer = { version = " 0.4" , optional = true }
7677half = " 1.8.2"
7778memoffset = " 0.9.1"
@@ -140,8 +141,9 @@ features = [
140141 " Win32_UI_WindowsAndMessaging" ,
141142]
142143
143- [target .'cfg(target_arch = "wasm32")' .dependencies ]
144- wasm-bindgen = " 0.2.92"
144+ [target .'cfg(all(target_arch = "wasm32", target_os = "unknown"))' .dependencies ]
145+ wasm-bindgen = { workspace = true , optional = true }
146+ getrandom = { workspace = true , features = [" custom" ] }
145147
146148[build-dependencies ]
147149glob = { workspace = true }
0 commit comments