gate wasm support behind feature flag

This commit is contained in:
Zeb Piasecki 2023-06-04 13:02:03 -04:00
parent 2230e88533
commit edc7fdecfb
3 changed files with 6 additions and 4 deletions

View File

@ -1,5 +1,4 @@
[workspace]
resolver = "2"
members = [
"codegen",
"postgres",

View File

@ -8,6 +8,10 @@ license = "MIT/Apache-2.0"
repository = "https://github.com/sfackler/rust-postgres"
readme = "../README.md"
[features]
default = []
js = ["getrandom/js"]
[dependencies]
base64 = "0.21"
byteorder = "1.0"
@ -19,6 +23,4 @@ memchr = "2.0"
rand = "0.8"
sha2 = "0.10"
stringprep = "0.1"
[target.'cfg(target_arch = "wasm32")'.dependencies]
getrandom = { version = "0.2.9", features = ["js"] }
getrandom = { version = "0.2", optional = true }

View File

@ -40,6 +40,7 @@ with-uuid-0_8 = ["postgres-types/with-uuid-0_8"]
with-uuid-1 = ["postgres-types/with-uuid-1"]
with-time-0_2 = ["postgres-types/with-time-0_2"]
with-time-0_3 = ["postgres-types/with-time-0_3"]
js = ["postgres-protocol/js"]
[dependencies]
async-trait = "0.1"