mirror of
https://github.com/rustwasm/wasm-bindgen.git
synced 2024-12-27 20:15:14 +03:00
5b76a6291e
This commit implements the first half of [RFC #5] where the `Deref` trait is implemented for all imported types. The target of `Deref` is either the first entry of the list of `extends` attribute or `JsValue`. All examples using `.as_ref()` with various `web-sys` types have been updated to the more ergonomic deref casts now. Additionally the `web-sys` generation of the `extends` array has been fixed slightly to explicitly list implementatoins in the hierarchy order to ensure the correct target for `Deref` is chosen. [RFC #5]: https://github.com/rustwasm/rfcs/blob/master/text/005-structural-and-deref.md |
||
---|---|---|
.. | ||
add | ||
canvas | ||
char | ||
closures | ||
console_log | ||
dom | ||
duck-typed-interfaces | ||
fetch | ||
guide-supported-types-examples | ||
hello_world | ||
import_js | ||
julia_set | ||
no_modules | ||
paint | ||
performance | ||
raytrace-parallel | ||
todomvc | ||
wasm2js | ||
wasm-in-wasm | ||
webaudio | ||
webgl | ||
README.md |
Examples
This directory contains a number of Cargo projects that are all examples of how
to use wasm-bindgen
in various contexts. More documentation can be found
online