Skip to content

Commit edc7fde

Browse files
committed
gate wasm support behind feature flag
1 parent 2230e88 commit edc7fde

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

Cargo.toml

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
[workspace]
2-
resolver = "2"
32
members = [
43
"codegen",
54
"postgres",

postgres-protocol/Cargo.toml

+5-3
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ license = "MIT/Apache-2.0"
88
repository = "https://github.com/sfackler/rust-postgres"
99
readme = "../README.md"
1010

11+
[features]
12+
default = []
13+
js = ["getrandom/js"]
14+
1115
[dependencies]
1216
base64 = "0.21"
1317
byteorder = "1.0"
@@ -19,6 +23,4 @@ memchr = "2.0"
1923
rand = "0.8"
2024
sha2 = "0.10"
2125
stringprep = "0.1"
22-
23-
[target.'cfg(target_arch = "wasm32")'.dependencies]
24-
getrandom = { version = "0.2.9", features = ["js"] }
26+
getrandom = { version = "0.2", optional = true }

tokio-postgres/Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ with-uuid-0_8 = ["postgres-types/with-uuid-0_8"]
4040
with-uuid-1 = ["postgres-types/with-uuid-1"]
4141
with-time-0_2 = ["postgres-types/with-time-0_2"]
4242
with-time-0_3 = ["postgres-types/with-time-0_3"]
43+
js = ["postgres-protocol/js"]
4344

4445
[dependencies]
4546
async-trait = "0.1"

0 commit comments

Comments
 (0)