Skip to content

Commit de3bc08

Browse files
Added documentation for features
1 parent 04ca6f3 commit de3bc08

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

src/lib.rs

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,40 @@
44
//! attribute and tool. Crates pull in the `#[wasm_bindgen]` attribute through
55
//! this crate and this crate also provides JS bindings through the `JsValue`
66
//! interface.
7+
//!
8+
//! ## Features
9+
//!
10+
//! ### `enable-interning`
11+
//!
12+
//! Enables the internal cache for [`wasm_bindgen::intern`].
13+
//!
14+
//! ### `gg-alloc`
15+
//!
16+
//! Uses [`gg-allow`](https://crates.io/crates/gg-alloc) as the global allocator
17+
//! when using `wasm-bindgen-test` to ensure that pointers outside the `i32`
18+
//! range are handled correctly.
19+
//!
20+
//! ### `std` (default)
21+
//!
22+
//! TODO:
23+
//!
24+
//! ### `strict-macro`
25+
//!
26+
//! All warnings the `#[wasm_bindgen]` macro emits are turned into hard errors.
27+
//! This mainly affects unused attribute options.
28+
//!
29+
//! ### Deprecated features
30+
//!
31+
//! #### `serde-serialize`
32+
//!
33+
//! **Deprecated:** Use the [`serde-wasm-bindgen`](https://docs.rs/serde-wasm-bindgen/latest/serde_wasm_bindgen/) crate instead.
34+
//!
35+
//! Enables the `JsValue::from_serde` and `JsValue::into_serde` methods for
36+
//! serializing and deserializing Rust types to and from JavaScript.
37+
//!
38+
//! #### `spans`
39+
//!
40+
//! **Deprecated:** This feature became a no-op in wasm-bindgen v0.2.20 (Sep 7, 2018).
741
842
#![no_std]
943
#![cfg_attr(

0 commit comments

Comments
 (0)