1[package]
2authors = ["The wasm-bindgen Developers"]
3categories = ["wasm"]
4description = """
5Easy support for interacting between JS and Rust.
6"""
7documentation = "https://docs.rs/wasm-bindgen"
8edition = "2021"
9homepage = "https://rustwasm.github.io/"
10include = ["/build.rs", "/LICENSE-*", "/src"]
11license = "MIT OR Apache-2.0"
12name = "wasm-bindgen"
13readme = "README.md"
14repository = "https://github.com/rustwasm/wasm-bindgen"
15rust-version = "1.57"
16version = "0.2.100"
17
18[package.metadata.docs.rs]
19features = ["serde-serialize"]
20
21[lib]
22test = false
23
24[features]
25default = ["std", "msrv"]
26enable-interning = ["std"]
27serde-serialize = ["serde", "serde_json", "std"]
28spans = []
29std = []
30
31# Opt-in for Rust language features that require a higher MSRV.
32#
33# The current rustc version is detected at compile-time, so enabling this
34# feature for older compilers will NOT result in a compilation error. Instead,
35# any unsupported language feature will not be used.
36msrv = ["rustversion"]
37
38# Whether or not the `#[wasm_bindgen]` macro is strict and generates an error on
39# all unused attributes
40strict-macro = ["wasm-bindgen-macro/strict-macro"]
41
42# INTERNAL ONLY: Enables gg-alloc as system allocator when using wasm-bindgen-test to check that large pointers
43# are handled correctly
44gg-alloc = ["wasm-bindgen-test/gg-alloc"]
45
46# INTERNAL ONLY: This is only for debugging wasm-bindgen! No stability guarantees, so enable
47# this at your own peril!
48xxx_debug_only_print_generated_code = ["wasm-bindgen-macro/xxx_debug_only_print_generated_code"]
49
50[dependencies]
51cfg-if = "1.0.0"
52once_cell = { version = "1.12", default-features = false }
53rustversion = { version = "1.0", optional = true }
54serde = { version = "1.0", optional = true }
55serde_json = { version = "1.0", optional = true }
56wasm-bindgen-macro = { path = "crates/macro", version = "=0.2.100" }
57
58[dev-dependencies]
59once_cell = "1"
60wasm-bindgen-test = { path = 'crates/test' }
61
62[target.'cfg(target_arch = "wasm32")'.dev-dependencies]
63js-sys = { path = 'crates/js-sys' }
64paste = "1"
65serde_derive = "1.0"
66wasm-bindgen-futures = { path = 'crates/futures' }
67wasm-bindgen-test-crate-a = { path = 'tests/crates/a' }
68wasm-bindgen-test-crate-b = { path = 'tests/crates/b' }
69
70[lints.rust]
71unexpected_cfgs = { level = "warn", check-cfg = ['cfg(wasm_bindgen_unstable_test_coverage)'] }
72
73[lints.clippy]
74large_enum_variant = "allow"
75new_without_default = "allow"
76overly_complex_bool_expr = "allow"
77too_many_arguments = "allow"
78type_complexity = "allow"
79
80[workspace.lints.clippy]
81large_enum_variant = "allow"
82new_without_default = "allow"
83overly_complex_bool_expr = "allow"
84too_many_arguments = "allow"
85type_complexity = "allow"
86
87[workspace]
88exclude = ["crates/msrv/resolver", "crates/msrv/lib", "crates/msrv/cli"]
89members = [
90 "benchmarks",
91 "crates/cli",
92 "crates/js-sys",
93 "crates/test",
94 "crates/test/sample",
95 "crates/example-tests",
96 "crates/typescript-tests",
97 "crates/web-sys",
98 "crates/webidl",
99 "crates/webidl-tests",
100 "examples/add",
101 "examples/canvas",
102 "examples/char",
103 "examples/closures",
104 "examples/console_log",
105 "examples/deno",
106 "examples/dom",
107 "examples/duck-typed-interfaces",
108 "examples/explicit-resource-management",
109 "examples/fetch",
110 "examples/guide-supported-types-examples",
111 "examples/hello_world",
112 "examples/import_js/crate",
113 "examples/julia_set",
114 "examples/paint",
115 "examples/performance",
116 "examples/raytrace-parallel",
117 "examples/request-animation-frame",
118 "examples/todomvc",
119 "examples/wasm-audio-worklet",
120 "examples/wasm-in-wasm",
121 "examples/wasm-in-wasm-imports",
122 "examples/wasm-in-web-worker",
123 "examples/weather_report",
124 "examples/webaudio",
125 "examples/webgl",
126 "examples/webrtc_datachannel",
127 "examples/websockets",
128 "examples/webxr",
129 "examples/without-a-bundler",
130 "examples/without-a-bundler-no-modules",
131 "examples/synchronous-instantiation",
132 "tests/no-std",
133]
134resolver = "2"
135
136[patch.crates-io]
137js-sys = { path = 'crates/js-sys' }
138wasm-bindgen = { path = '.' }
139wasm-bindgen-futures = { path = 'crates/futures' }
140web-sys = { path = 'crates/web-sys' }
141