Calling a web API via WebAssembly
The evolution of the web has been phenomenal, with its growth being attributed to its open standards. Today, the web provides hundreds of APIs, which makes it easy for web developers to develop for audio, video, canvases, SVGs, USBs, batteries, and so on.
The web is universal and omnipresent. It is continuously experimented with and changed to make it desirable and easy for developers and companies to use, respectively. The web-sys crate provides access to almost all the APIs that are available on the web at the moment.
The WebIDL interface definitions are converted into wasm-bindgen
's internal abstract syntax trees (ASTs). Then, these ASTs are used to create zero-overhead Rust and JavaScript glue code.
With the help of this...