mirror of
https://github.com/allankoechke/turso.git
synced 2026-11-29 09:33:48 +00:00
fix: get random need special rust flag and crate flag to compile to
wasm
This commit is contained in:
@@ -20,6 +20,12 @@ rustflags = [
|
||||
"link-args=-Wl,-undefined,dynamic_lookup,-no_fixup_chains",
|
||||
]
|
||||
|
||||
# getrandom 0.3 needs this cfg (https://docs.rs/getrandom/latest/getrandom/#webassembly-support)
|
||||
[target.wasm32-unknown-unknown]
|
||||
rustflags = [
|
||||
'--cfg=getrandom_backend="wasm_js"',
|
||||
]
|
||||
|
||||
# To be able to run unit tests on Linux, support compilation to 'x86_64-unknown-linux-gnu'.
|
||||
# pthread_key_create() destructors and segfault after a DSO unloading https://sourceware.org/bugzilla/show_bug.cgi?id=21031
|
||||
[target.'cfg(all(target_os = "linux", target_env = "gnu"))']
|
||||
@@ -66,4 +72,4 @@ rustflags = [
|
||||
"--cfg=tokio_unstable",
|
||||
"-C",
|
||||
"link-args=-Wl,-z,max-page-size=16384",
|
||||
]
|
||||
]
|
||||
|
||||
4
Cargo.lock
generated
4
Cargo.lock
generated
@@ -2525,11 +2525,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0de51e6874e94e7bf76d726fc5d13ba782deca734ff60d5bb2fb2607c7406555"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"js-sys",
|
||||
"libc",
|
||||
"r-efi 6.0.0",
|
||||
"rand_core 0.10.1",
|
||||
"wasip2",
|
||||
"wasip3",
|
||||
"wasm-bindgen",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -7330,6 +7332,8 @@ dependencies = [
|
||||
"env_logger",
|
||||
"fallible-iterator 0.3.0",
|
||||
"fastbloom",
|
||||
"getrandom 0.2.15",
|
||||
"getrandom 0.3.2",
|
||||
"hex",
|
||||
"icu_collator",
|
||||
"icu_locale",
|
||||
|
||||
@@ -142,6 +142,13 @@ web-time = "1.1"
|
||||
[target.'cfg(not(any(target_family = "wasm", all(target_os = "windows", target_arch = "aarch64"))))'.dependencies]
|
||||
simsimd = "6.5.3"
|
||||
|
||||
[target.'cfg(all(target_arch = "wasm32", target_os = "unknown"))'.dependencies]
|
||||
# From fastbloom/rand
|
||||
getrandom02 = { package = "getrandom", version = "0.2", features = ["js"] }
|
||||
# From aes-gcm
|
||||
getrandom03 = { package = "getrandom", version = "0.3", features = ["wasm_js"] }
|
||||
uuid = { version = "1.11.0", features = ["js"], optional = true }
|
||||
|
||||
[target.'cfg(antithesis)'.dependencies]
|
||||
antithesis_sdk = { workspace = true, features = ["full"] }
|
||||
serde_json = { workspace = true }
|
||||
|
||||
@@ -17,3 +17,6 @@ turso_macros = { workspace = true }
|
||||
|
||||
getrandom = "0.4.2"
|
||||
chrono = { workspace = true, default-features = true }
|
||||
|
||||
[target.'cfg(all(target_arch = "wasm32", target_os = "unknown"))'.dependencies]
|
||||
getrandom = { version = "0.4.2", features = ["wasm_js"] }
|
||||
|
||||
Reference in New Issue
Block a user