#sys #web #wasm-bindgen #web-sys #bindings #webidl

web-sys

Bindings for all Web APIs, a procedurally generated crate from WebIDL

53 releases

0.3.51 May 10, 2021
0.3.50 Mar 29, 2021
0.3.48 Feb 26, 2021
0.3.46 Nov 30, 2020
0.0.1 Jul 19, 2018

#384 in WebAssembly

Download history 126733/week @ 2021-04-08 121459/week @ 2021-04-15 117849/week @ 2021-04-22 113835/week @ 2021-04-29 129530/week @ 2021-05-06 132203/week @ 2021-05-13 139853/week @ 2021-05-20 141676/week @ 2021-05-27 134235/week @ 2021-06-03 145652/week @ 2021-06-10 141558/week @ 2021-06-17 135161/week @ 2021-06-24 137734/week @ 2021-07-01 136149/week @ 2021-07-08 142360/week @ 2021-07-15 133440/week @ 2021-07-22

515,020 downloads per month
Used in 8,149 crates (397 directly)

MIT/Apache

8MB
152K SLoC

web-sys

Raw bindings to Web APIs for projects using wasm-bindgen.

Crate features

This crate by default contains very little when compiled as almost all of its exposed APIs are gated by Cargo features. The exhaustive list of features can be found in crates/web-sys/Cargo.toml, but the rule of thumb for web-sys is that each type has its own cargo feature (named after the type). Using an API requires enabling the features for all types used in the API, and APIs should mention in the documentation what features they require.


lib.rs:

Raw API bindings for Web APIs

This is a procedurally generated crate from browser WebIDL which provides a binding to all APIs that browsers provide on the web.

This crate by default contains very little when compiled as almost all of its exposed APIs are gated by Cargo features. The exhaustive list of features can be found in crates/web-sys/Cargo.toml, but the rule of thumb for web-sys is that each type has its own cargo feature (named after the type). Using an API requires enabling the features for all types used in the API, and APIs should mention in the documentation what features they require.

Dependencies