[package] authors = ["The wasm-bindgen Developers"] categories = ["wasm"] description = """ Bindings for all JS global objects and functions in all JS environments like Node.js and browsers, built on `#[wasm_bindgen]` using the `wasm-bindgen` crate. """ documentation = "https://docs.rs/js-sys" edition = "2021" homepage = "https://wasm-bindgen.github.io/wasm-bindgen/" include = ["/LICENSE-*", "/src"] license = "MIT OR Apache-2.0" name = "js-sys" readme = "./README.md" repository = "https://github.com/wasm-bindgen/wasm-bindgen/tree/master/crates/js-sys" rust-version = "1.77" version = "0.3.103" [lib] doctest = false test = false [features] # TODO: remove unsafe-eval for 1.0 release default = ["std", "unsafe-eval"] std = ["wasm-bindgen/std", "dep:futures-util"] # It has been agreed to gate functionnality requiring CSP unsafe-eval behind this feature # See https://github.com/wasm-bindgen/wasm-bindgen/issues/1647#issuecomment-3775469177 unsafe-eval = [] # Enables JsStream (AsyncIterator -> Stream bridge). # Pulls in `futures-util` directly so this keeps working under # `default-features = false`. futures-core-03-stream = ["dep:futures-util", "dep:futures-core"] [dependencies] cfg-if = "1.0.0" futures-core = { version = "0.3.8", default-features = false, optional = true } futures-util = { version = "0.3.31", default-features = false, features = ["std"], optional = true } wasm-bindgen = { path = "../..", version = "=0.2.126", default-features = false } [target.'cfg(target_arch = "wasm32")'.dev-dependencies] futures-channel = "0.3" futures-lite = { version = "2", default-features = false } half = "2" wasm-bindgen-futures = { path = '../futures' } wasm-bindgen-test = { path = '../test' } web-sys = { path = "../web-sys", features = ["Headers", "Response", "ResponseInit"] } [lints.rust] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(js_sys_unstable_apis)'] } [lints.clippy] large_enum_variant = "allow" new_without_default = "allow" overly_complex_bool_expr = "allow" too_many_arguments = "allow" type_complexity = "allow"