#wasm-bindgen #struct #back #wrapper #generated #original

wasm-bindgen-downcast

Downcast a JavaScript wrapper generated by wasm-bindgen back to its original struct

2 releases

0.1.1 Dec 1, 2022
0.1.0 Dec 1, 2022

#1266 in WebAssembly

Download history 1449/week @ 2024-07-20 612/week @ 2024-07-27 756/week @ 2024-08-03 795/week @ 2024-08-10 736/week @ 2024-08-17 886/week @ 2024-08-24 679/week @ 2024-08-31 710/week @ 2024-09-07 625/week @ 2024-09-14 727/week @ 2024-09-21 990/week @ 2024-09-28 245/week @ 2024-10-05 469/week @ 2024-10-12 388/week @ 2024-10-19 576/week @ 2024-10-26 529/week @ 2024-11-02

1,988 downloads per month
Used in 55 crates (via rhizomedb-wasm)

MIT/Apache

9KB
72 lines

wasm-bindgen-downcast

Continuous integration

(API Docs)

Downcast a JavaScript wrapper generated by wasm-bindgen back to its original struct.

This is a workaround for rustwasm/wasm-bindgen#2231 that is robust with respect to minification (something other solutions can't handle).

License

This project is licensed under either of

at your option.

It is recommended to always use cargo crev to verify the trustworthiness of each of your dependencies, including this one.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

The intent of this crate is to be free of soundness bugs. The developers will do their best to avoid them, and welcome help in analysing and fixing them.

Dependencies

~2.5MB
~50K SLoC