1 | [package] |
2 | authors = ["The wasm-bindgen Developers" ] |
3 | categories = ["wasm" ] |
4 | description = "" " |
5 | Easy support for interacting between JS and Rust. |
6 | " "" |
7 | documentation = "https://docs.rs/wasm-bindgen" |
8 | edition = "2021" |
9 | homepage = "https://rustwasm.github.io/" |
10 | include = ["/build.rs" , "/LICENSE-*" , "/src" ] |
11 | license = "MIT OR Apache-2.0" |
12 | name = "wasm-bindgen" |
13 | readme = "README.md" |
14 | repository = "https://github.com/rustwasm/wasm-bindgen" |
15 | rust-version = "1.57" |
16 | version = "0.2.100" |
17 | |
18 | [package.metadata.docs.rs] |
19 | features = ["serde-serialize" ] |
20 | |
21 | [lib] |
22 | test = false |
23 | |
24 | [features] |
25 | default = ["std" , "msrv" ] |
26 | enable-interning = ["std" ] |
27 | serde-serialize = ["serde" , "serde_json" , "std" ] |
28 | spans = [] |
29 | std = [] |
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. |
36 | msrv = ["rustversion" ] |
37 | |
38 | # Whether or not the `#[wasm_bindgen]` macro is strict and generates an error on |
39 | # all unused attributes |
40 | strict-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 |
44 | gg-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! |
48 | xxx_debug_only_print_generated_code = ["wasm-bindgen-macro/xxx_debug_only_print_generated_code" ] |
49 | |
50 | [dependencies] |
51 | cfg-if = "1.0.0" |
52 | once_cell = { version = "1.12" , default-features = false } |
53 | rustversion = { version = "1.0" , optional = true } |
54 | serde = { version = "1.0" , optional = true } |
55 | serde_json = { version = "1.0" , optional = true } |
56 | wasm-bindgen-macro = { path = "crates/macro" , version = "=0.2.100" } |
57 | |
58 | [dev-dependencies] |
59 | once_cell = "1" |
60 | wasm-bindgen-test = { path = 'crates/test' } |
61 | |
62 | [target.'cfg(target_arch = "wasm32")'.dev-dependencies] |
63 | js-sys = { path = 'crates/js-sys' } |
64 | paste = "1" |
65 | serde_derive = "1.0" |
66 | wasm-bindgen-futures = { path = 'crates/futures' } |
67 | wasm-bindgen-test-crate-a = { path = 'tests/crates/a' } |
68 | wasm-bindgen-test-crate-b = { path = 'tests/crates/b' } |
69 | |
70 | [lints.rust] |
71 | unexpected_cfgs = { level = "warn" , check-cfg = ['cfg(wasm_bindgen_unstable_test_coverage)' ] } |
72 | |
73 | [lints.clippy] |
74 | large_enum_variant = "allow" |
75 | new_without_default = "allow" |
76 | overly_complex_bool_expr = "allow" |
77 | too_many_arguments = "allow" |
78 | type_complexity = "allow" |
79 | |
80 | [workspace.lints.clippy] |
81 | large_enum_variant = "allow" |
82 | new_without_default = "allow" |
83 | overly_complex_bool_expr = "allow" |
84 | too_many_arguments = "allow" |
85 | type_complexity = "allow" |
86 | |
87 | [workspace] |
88 | exclude = ["crates/msrv/resolver" , "crates/msrv/lib" , "crates/msrv/cli" ] |
89 | members = [ |
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 | ] |
134 | resolver = "2" |
135 | |
136 | [patch.crates-io] |
137 | js-sys = { path = 'crates/js-sys' } |
138 | wasm-bindgen = { path = '.' } |
139 | wasm-bindgen-futures = { path = 'crates/futures' } |
140 | web-sys = { path = 'crates/web-sys' } |
141 | |