Skip to content

Commit 9efa1ea

Browse files
committed
Add web-sys as an example.
1 parent 489248d commit 9efa1ea

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/doc/src/reference/features-examples.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,14 @@ the size of the crate and reduces compile time. Some examples are:
1111
is helpful to reduce compile times since it affects so many projects. It has
1212
a [clearly documented list][syn-features] of features which can be used to
1313
minimize the amount of code it contains.
14-
* [`winapi`] has [a large number][winapi-features] of features that
15-
limit which Windows API bindings it supports.
1614
* [`regex`] has a [several features][regex-features] that are [well
1715
documented][regex-docs]. Cutting out Unicode support can reduce the
1816
resulting file size as it can remove some large tables.
17+
* [`winapi`] has [a large number][winapi-features] of features that
18+
limit which Windows API bindings it supports.
19+
* [`web-sys`] is another example similar to `winapi` that provides a [huge
20+
surface area][web-sys-features] of API bindings that are limited by using
21+
features.
1922

2023
[`winapi`]: https://crates.io/crates/winapi
2124
[winapi-features]: https://github.com/retep998/winapi-rs/blob/0.3.9/Cargo.toml#L25-L431
@@ -24,6 +27,8 @@ the size of the crate and reduces compile time. Some examples are:
2427
[syn-features]: https://docs.rs/syn/1.0.54/syn/#optional-features
2528
[regex-features]: https://github.com/rust-lang/regex/blob/1.4.2/Cargo.toml#L33-L101
2629
[regex-docs]: https://docs.rs/regex/1.4.2/regex/#crate-features
30+
[`web-sys`]: https://crates.io/crates/web-sys
31+
[web-sys-features]: https://github.com/rustwasm/wasm-bindgen/blob/0.2.69/crates/web-sys/Cargo.toml#L32-L1395
2732

2833
### Extending behavior
2934

0 commit comments

Comments
 (0)