summaryrefslogtreecommitdiffstats
path: root/vendor/wasm-bindgen
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-19 09:25:56 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-19 09:25:56 +0000
commit018c4950b9406055dec02ef0fb52f132e2bb1e2c (patch)
treea835ebdf2088ef88fa681f8fad45f09922c1ae9a /vendor/wasm-bindgen
parentAdding debian version 1.75.0+dfsg1-5. (diff)
downloadrustc-018c4950b9406055dec02ef0fb52f132e2bb1e2c.tar.xz
rustc-018c4950b9406055dec02ef0fb52f132e2bb1e2c.zip
Merging upstream version 1.76.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/wasm-bindgen')
-rw-r--r--vendor/wasm-bindgen/.cargo-checksum.json2
-rw-r--r--vendor/wasm-bindgen/CHANGELOG.md190
-rw-r--r--vendor/wasm-bindgen/Cargo.toml14
-rw-r--r--vendor/wasm-bindgen/README.md20
-rw-r--r--vendor/wasm-bindgen/_package.json2
-rw-r--r--vendor/wasm-bindgen/examples/import_js/package.json6
-rw-r--r--vendor/wasm-bindgen/src/closure.rs66
-rw-r--r--vendor/wasm-bindgen/src/convert/closures.rs68
-rw-r--r--vendor/wasm-bindgen/src/convert/impls.rs201
-rw-r--r--vendor/wasm-bindgen/src/convert/slices.rs189
-rw-r--r--vendor/wasm-bindgen/src/convert/traits.rs131
-rw-r--r--vendor/wasm-bindgen/src/describe.rs29
-rw-r--r--vendor/wasm-bindgen/src/externref.rs22
-rw-r--r--vendor/wasm-bindgen/src/lib.rs57
-rw-r--r--vendor/wasm-bindgen/tests/wasm/enum_vecs.js23
-rw-r--r--vendor/wasm-bindgen/tests/wasm/enum_vecs.rs36
-rw-r--r--vendor/wasm-bindgen/tests/wasm/enums.js4
-rw-r--r--vendor/wasm-bindgen/tests/wasm/enums.rs14
-rw-r--r--vendor/wasm-bindgen/tests/wasm/getters_and_setters.rs19
-rw-r--r--vendor/wasm-bindgen/tests/wasm/ignore.rs11
-rw-r--r--vendor/wasm-bindgen/tests/wasm/macro_rules.rs12
-rw-r--r--vendor/wasm-bindgen/tests/wasm/main.rs4
-rw-r--r--vendor/wasm-bindgen/tests/wasm/node.js16
-rw-r--r--vendor/wasm-bindgen/tests/wasm/node.rs11
-rw-r--r--vendor/wasm-bindgen/tests/wasm/slice.js21
-rw-r--r--vendor/wasm-bindgen/tests/wasm/slice.rs32
-rw-r--r--vendor/wasm-bindgen/tests/wasm/string_vecs.js23
-rw-r--r--vendor/wasm-bindgen/tests/wasm/string_vecs.rs29
-rw-r--r--vendor/wasm-bindgen/tests/wasm/struct_vecs.js23
-rw-r--r--vendor/wasm-bindgen/tests/wasm/struct_vecs.rs40
30 files changed, 1044 insertions, 271 deletions
diff --git a/vendor/wasm-bindgen/.cargo-checksum.json b/vendor/wasm-bindgen/.cargo-checksum.json
index 64d220e23..992208713 100644
--- a/vendor/wasm-bindgen/.cargo-checksum.json
+++ b/vendor/wasm-bindgen/.cargo-checksum.json
@@ -1 +1 @@
-{"files":{"CHANGELOG.md":"9ad625861dc9c8f6457281e7d5ac563085b5458e188fb6b0e18858215d2b5dee","CONTRIBUTING.md":"aa138d76f5cb25bba1a6942a230373aaed6be73c619f945cc4657e13ba69f897","Cargo.toml":"dae7f0168f3ece72616595f4a63e6a1f078d24198bdf39abe0de002ed1ce90f0","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"8e0075aceb58e5db84b7debf46f7a3fde437573f46fe9aad6421a3a081575cbe","_package.json":"64c943903ffc064a2c5506e46fce690d7f566589d0d8e71804ec1638d1aabad5","build.rs":"95d57e593c411b82bf88819765d6422db2a65c1bf489b63f87e0aefeb721fc41","examples/README.md":"e5396e95d8130948e48b767ab505c46bc69f6ff3ebfe0d9709068cf42c250818","examples/import_js/README.md":"bb53d4a264e9a084effdc7a22ca7d5acca0207b411478b98782d881b7fcade51","examples/import_js/index.html":"f4825d155bfe0059aa182a506d6d076d1ba5f118e46365ac902b12f27a6c8c0d","examples/import_js/index.js":"d425b7b0636dc5c5046bc96e6bfe6ef3bb1503fa91c54f40ecb457a1b060ee5c","examples/import_js/package.json":"bbbfbfa1a62779e38ba30c920d27aefaaf10bf6add3a89a65b7d2b093c1fe017","examples/import_js/webpack.config.js":"fc314556d2f0c6266cde7c47afaceebe474be97c0401985a23d822ad9dd0105a","guide/book.toml":"d8cae5ae5fbeaab5b6852c64b975d37f51592a8e9eedba22c898672d9b11e9be","guide/src/SUMMARY.md":"26355c6b0e8391429736fc5515b03a0e160d792710c6765645aecff0cc9bd171","guide/src/_headers":"401cee68df5967f0aa509a1b978a83f06e8e830deca1433964703e7a1ac2c646","guide/src/contributing/design/describe.md":"3186f9795be894708788e50d2ee745b9bd73bc94fb3dce67f3f1fd5e7fbd3659","guide/src/contributing/design/exporting-rust-struct.md":"2ead6b67f241bab543bb96c80e90b63abd67822a7c94190d2f2d1c9809a59b87","guide/src/contributing/design/exporting-rust.md":"ad88a5e0fccafe6c27e5a8bd951cf3e2fee1846da77a665f255999d9dd5961a6","guide/src/contributing/design/importing-js-struct.md":"848d0b144b28a5ae1ca3760438e71b938cfb2ee350f5b902fd08c38a0a64e27b","guide/src/contributing/design/importing-js.md":"c949c8921c213ba21b08f705d4611304acba47b68c35484fe968a80194f3a9ab","guide/src/contributing/design/index.md":"3bcd35bfadc3fa81d26dcac23f2e2ab5c3e2874cb6a88d0d892c5effe535fb04","guide/src/contributing/design/js-objects-in-rust.md":"0a18922b509ed8a6cc6724b81af6e6d469b75b3796dba770949a8b59d8067455","guide/src/contributing/design/rust-type-conversions.md":"efd7ddcc55770b5a2b68d542fd6aa128a9d4f60eaa5477481a1827c11b17dec0","guide/src/contributing/index.md":"e5115ccd2403b929d65acb9626bff8d66e10d1eb625a023ea017f2271a3e49c6","guide/src/contributing/js-sys/adding-more-apis.md":"d6626d530fa5b73f045a20bf123d5e261ac2ca3bd64cbb80b655612f9b9a6276","guide/src/contributing/js-sys/index.md":"9c0864ca52e8699148e789c2a6ba2d3044ba2358d7106a1b7fd725d3720dbb54","guide/src/contributing/js-sys/testing.md":"d1f613c88793ffce61b2d77aa40e3a91a1de3c73ab9f8eaedfc39da16c93ad07","guide/src/contributing/publishing.md":"012c31c7037ca084d0c2a65c2dfc0be6fcbe5c118307e9efbb4f6f781ae48e43","guide/src/contributing/team.md":"a3f993cb1afeee767e85077d135b1ea08850c433a69c436ebe6b7a48124ed945","guide/src/contributing/testing.md":"b6d45f2a177525e1fd9b7c8a0d47f0bc156a9327795bcb4d96716851f94ff2db","guide/src/contributing/web-sys/index.md":"6b4d5e00cbbcaab29295a3bd60e90b7f72b118758966622a307d9222488707c1","guide/src/contributing/web-sys/logging.md":"ee960ec9adc174183fb349acdbf5fc647b6f9a290022be9b118b9de37b8b5687","guide/src/contributing/web-sys/overview.md":"e6179317f75aa8e836e3c803f5d814e87119763709eea47b04cebc86c089d80a","guide/src/contributing/web-sys/supporting-more-web-apis.md":"a3817d09c6cdc3cb28a1b77cdad5e4436ab5bc37f9d681b1e495815ca91de85a","guide/src/contributing/web-sys/testing.md":"77f8e4b45bd0e27676dd503474bc32f91672b23c6ab7127a4f5b828dc8ea40e4","guide/src/examples/2d-canvas.md":"44a0eb82ec3398ee63a6df5aab103f1b002082eac2d129f656d8519cbc0829e7","guide/src/examples/2d-canvas.png":"b202cd79b20c00d49c40d71225eefea99306015858a432ceb7592d53c15300f7","guide/src/examples/add.md":"8dac740d6a4c499d868c29d8426d113da9cdd6ef22bf8084b8cf8c1de513b09c","guide/src/examples/char.md":"93f94a1b670322d0dc21b46d749909c414f9f254e2dd97afd8afe8cb0e5ab908","guide/src/examples/closures.md":"669dfc47a670271d7ce7a3bd2c08620b698b01ea8b2a7b1cc2047a77e7617130","guide/src/examples/console-log.md":"6552f4d766291cddc0eade75e4f64de9f10e00b89a0bedb1b15dcf7baa90b6e0","guide/src/examples/dom.md":"44ad74370b3727ec98f958273c639e767f2ae5b75e96ef53e74be1833a630272","guide/src/examples/fetch.md":"0f9d08e240bc5ced13ab154182aedef7fa7b00cba784c65727aa15be27f86d7c","guide/src/examples/hello-world.md":"d5f4d830c316a91e951cdaeab5cb23ae47dbc910b05de849e67bef1ea709564f","guide/src/examples/import-js.md":"0480a6aa32b1fdc1347cb3d0c4f2a006caeb33c75ed21eb78ad800f012cbc2c6","guide/src/examples/index.md":"4e629f42d7bfb52bc35856b6e21c3aa7433563482697212d7b54f1bf619b56ed","guide/src/examples/julia.md":"0cd4ae1de24d657d7869c984dec61cc8b796621365be633212bdb2a6d57ce727","guide/src/examples/paint.md":"06c6c04f121080e0e5600b4ad300df9e93b5d4b6342f42c421e6dec1f2955ced","guide/src/examples/performance.md":"de888713cf0a047bd4a28a1ca890be51d99b6aaabc9a2b134280b768a7148377","guide/src/examples/raytrace.md":"6769cf3b7bd14e9814e751927fde8c5acb443c5e82758285a1ee4f91e577a870","guide/src/examples/request-animation-frame.md":"26eef6b203acc0b2667d9c4380c39a44eb4b97991efeded9ca32cc9ab454e993","guide/src/examples/synchronous-instantiation.md":"c2f887e4754535c453d22438c3179d71d2468d8994a61330a362132c73157ef1","guide/src/examples/todomvc.md":"b872c5631eae969368d147342fca16dadb6f0412f8922230c27271370e9d3d97","guide/src/examples/wasm-audio-worklet.md":"dda392cb5beb75423bd402661d0de85de7acf5098e38ecf167533774b5b9977a","guide/src/examples/wasm-in-wasm.md":"5439a690e7107736e6f8b92e475f0a45e83ab9a1e5a0fe02e8f6dd93372590c6","guide/src/examples/wasm-in-web-worker.md":"8877a952ba93bbf52d85acb7a6a38d318e5638c36b86338156c4881cc704394f","guide/src/examples/wasm2js.md":"48f953dfa1b17b68e5d983231e991797e32e9bc22b9c3db72c2d055e08449a00","guide/src/examples/weather_report.md":"184bf64d58820b032a80c738050e7b2cd0042eb722f61c7e8a3c531239f72db2","guide/src/examples/web-audio.md":"32bb18c9e4f167614ce3fb61d1d04265449f88da40949834b50baf9e37063fbd","guide/src/examples/webgl.md":"15570a0a081c2301981a1fbca0bd39dfcf35221c64ddfb8e8f4477660658cb08","guide/src/examples/webrtc_datachannel.md":"47b06b1b00c41f048fad3c2206399cae2d8dbd90b6d83953c138826f11677eb5","guide/src/examples/websockets.md":"704f9d5c1d13426e6e64e132cb0204be3c10a54dbfa5f1c834adc4efb4a1b8d2","guide/src/examples/without-a-bundler.md":"c25c28ae01905615bfbfb88b43563e04db76cc0d87469b63453053f62d8a4930","guide/src/introduction.md":"057e81f8f62d8647e51d1269bdb5788654be2e22fea23d155ec5a15bbf8bae1d","guide/src/reference/accessing-properties-of-untyped-js-values.md":"a91e3eb706ddd15628072978906e2faca31560de616c0630316d9f6eff6b55bf","guide/src/reference/arbitrary-data-with-serde.md":"b281146412f6bda893f146e84721677f003cad57af941552c2faf534b61b2d98","guide/src/reference/attributes/index.md":"12b57ebbd0c9ba42d9f10d752c9943d9beec90d659d1b1ff9e9bfea02572a2c8","guide/src/reference/attributes/on-js-imports/catch.md":"da230e6986ca29f1e82313b82275ab9c3b2144906271cf82b27772541d781d84","guide/src/reference/attributes/on-js-imports/constructor.md":"89f8be11c567b4611c84209b34351238553d5360d7f7665ea25332e1544c5b99","guide/src/reference/attributes/on-js-imports/extends.md":"84ece37398ba0df66f890982315f082c52b5f027e03c20527755abe610c2567c","guide/src/reference/attributes/on-js-imports/final.md":"2ded2c23194cdb5f0b064a2114cbc8a6a1c1573363d797f162c4683bb2f1c21d","guide/src/reference/attributes/on-js-imports/getter-and-setter.md":"27f3c2738688a43e611524e5e3ab7174a1993026a69098b75780a388aeb5e745","guide/src/reference/attributes/on-js-imports/index.md":"2219a4514fe9597cbbe6c46014b57c38f1e85f3d0775a8a7880f50858cb13633","guide/src/reference/attributes/on-js-imports/indexing-getter-setter-deleter.md":"11d5c03f922294894fe0147fae96e04b26a5adb36ce91296e52729a9fe5931c2","guide/src/reference/attributes/on-js-imports/js_class.md":"d51c5f05b71bbf6b6ec8e0c36314ae299fd7eb07be989e721b79b599405b3486","guide/src/reference/attributes/on-js-imports/js_name.md":"12457466f3510256a51a78f52b09f7cb1c0b0ce3ef636e028cd2c372fa9e8738","guide/src/reference/attributes/on-js-imports/js_namespace.md":"acaccd162a982c1c17b659ce5daa1d5a0d184b9b07728fc5bb17a89f327ffafa","guide/src/reference/attributes/on-js-imports/method.md":"d54246efce5d7a104702439ba509bcc5bfbb0b57253edebdb696617daca80bcd","guide/src/reference/attributes/on-js-imports/module.md":"b47cd5ccbb69955f1d47101accc96fcd562abecbf7e34826f7f3c585d6b9dad0","guide/src/reference/attributes/on-js-imports/no_deref.md":"7d58bb3b6f768e38b949727abd1ee621ad09ebc537f83a8a20d0eeddf3771b95","guide/src/reference/attributes/on-js-imports/raw_module.md":"f363e5f3bc401b7e350eeec49cffde85dfb2346d597f38d98993fe5bfb9ff649","guide/src/reference/attributes/on-js-imports/static_method_of.md":"d5a5d9623ee55097f26e190b478e75f2e7d2ffc30e51ec647f39933d3d4e3b18","guide/src/reference/attributes/on-js-imports/structural.md":"364e01a5792029e9a5fa582375736efcee006352834ee273d218da89b77dd8bf","guide/src/reference/attributes/on-js-imports/typescript_type.md":"9cae454e9134ca1d14e2af3c732f370335332c615bf03ac49e525ff6f1877cbc","guide/src/reference/attributes/on-js-imports/variadic.md":"1ecf00149be472e3111f188c053092f3274fb33453414516a305084d8e92c4df","guide/src/reference/attributes/on-js-imports/vendor_prefix.md":"47a8d47e0cd745cca697f6d944e145f02695ca422255c3d6e1c9b2b719994b1b","guide/src/reference/attributes/on-rust-exports/constructor.md":"d3878fdb36174e5662ccfdf0fb027ef8175a7f8ca14ccca875217e03f5d5be1d","guide/src/reference/attributes/on-rust-exports/getter-and-setter.md":"464a2d41a791bd8ba5a8b1c4aa64b2f865c42b98a2d1289bb65e766e98a1b56a","guide/src/reference/attributes/on-rust-exports/getter_with_clone.md":"11a04dba4d66c19be0e234014d21ccf9cd0b76169b723e90ceb81d719478f283","guide/src/reference/attributes/on-rust-exports/index.md":"9fe778a0dd013a874db484cb22b1d9867bfe6d69cfbbe5cfeaa8ab78cf19daab","guide/src/reference/attributes/on-rust-exports/inspectable.md":"52fbcfdb83c426430a95692d566a4709255e25b24be5704d7378a4196a8c5908","guide/src/reference/attributes/on-rust-exports/js_class.md":"f4c0d8e8021001578f7d300e88c438d1a7806c17cc0d8acc3b4134922a75affc","guide/src/reference/attributes/on-rust-exports/js_name.md":"77f035b6391b9e44f254a411ba18687c5fa6110e276be73b5ea347701c8dad42","guide/src/reference/attributes/on-rust-exports/main.md":"d1a42470fb0457b3471e96ba22ca270c1cfc9d5fa781240a9d8b1aef32641ff8","guide/src/reference/attributes/on-rust-exports/readonly.md":"a5da847ad36557f03b1c79a83d14c219dce914021266133c204260bc041b9b89","guide/src/reference/attributes/on-rust-exports/skip.md":"b9972241b8d473d1a46ef3c2861065ca296cdc923883c404f19f1d859bf914a6","guide/src/reference/attributes/on-rust-exports/skip_jsdoc.md":"6c400bb6dac1083449758448e5e7a576d40f371592cd597ea95ec441fefe19f8","guide/src/reference/attributes/on-rust-exports/skip_typescript.md":"1622c29b0d93a884bd0b5b2a62107a594e2919758c80592566e7786efe788b89","guide/src/reference/attributes/on-rust-exports/start.md":"db6cfb9593b7af1a95112c135c202d00c609651df16abc174d2f38310809ad08","guide/src/reference/attributes/on-rust-exports/typescript_custom_section.md":"6dd69f15b6f6f632880b7a65cc49abe8f4f95fdead753c576d81a3268dae4985","guide/src/reference/attributes/on-rust-exports/typescript_type.md":"1960cbeea1047a0fdb936e3af4556ae805e9777323076b9f3820cb3986f27de6","guide/src/reference/browser-support.md":"177fff4ee6a68c85f045cec47bc7aa40de66fc95f8cb59128e8ef2d6972dbd7b","guide/src/reference/cli.md":"809daa3dbd7da7aa01786acd9602bfb4f81546c010568bf1f56d95eaac7dc29e","guide/src/reference/deployment.md":"1954466cd2ac6c5326258364f6390b10cee9c2729e7c2779f2a50f950c7c9523","guide/src/reference/index.md":"c603c3a7f265afb7c7b5eb391b32f6115f8842f3f422fd3730be4f90c4796bc4","guide/src/reference/iterating-over-js-values.md":"ec00f09516eb7de98bf7296f44b6aa9ceee3fae1dcdb7cdf8f36963d45b7ebeb","guide/src/reference/js-promises-and-rust-futures.md":"5f0c0b990f5b55c8d9485f7cc66a617f79cc232705562f306af97785c7ed1f79","guide/src/reference/js-snippets.md":"dff5adcbf66f06322e606c672ef070c2a0375f1ae592ca8a9da36a50324735cc","guide/src/reference/optimize-size.md":"c10abc1ea0902c9a57b74808bcf75bf092c0c2bb4082962b85d18df7593602c1","guide/src/reference/passing-rust-closures-to-js.md":"aa18f75ffd4b7779a2699b1bf969245ec0e1a70b24abe61e8877c2eb65f6ef60","guide/src/reference/receiving-js-closures-in-rust.md":"fc9c80ba5e1a5f243a66f68caba27e8103652aeac3765a9fad2d0e16113fede3","guide/src/reference/reference-types.md":"91d178b7fe2ec82eec4d8926a08b39ac16898172d6f65aee84347c6918033c67","guide/src/reference/rust-targets.md":"467d5cf7eaa1d4b89f9f5b2248cdd1a10340ca1db263ffff5c483ce10dcfbf54","guide/src/reference/static-js-objects.md":"930288fc463d16a46a6546f5f65af21ff6e4b94259d9a1e8bca9d660f9770604","guide/src/reference/types.md":"859123f51fa932fa37d7e47cd5c46956929793bd3accea050d3be516080ed78f","guide/src/reference/types/bool.md":"e954d93ec5096837d4dd2db3f23e71c14483279e347ca8908ecb49aded6e497a","guide/src/reference/types/boxed-jsvalue-slice.md":"634e51ce92770e6078ca3303be946272af3f092f2703c90601ed8f9092c69a53","guide/src/reference/types/boxed-number-slices.md":"1a217a68ff549f4208f99863d6616521c9d466542c1156bcc2be7d3a73e4edd4","guide/src/reference/types/char.md":"01f2f7bdb25a9a52edd93dcbbca6a29269a8d5adf6cb94dcadea29a7aace22f4","guide/src/reference/types/exported-rust-types.md":"d2f601d7d39ae92326c5624e1e2a2795f1f47accb92ec030c987b6c709681906","guide/src/reference/types/imported-js-types.md":"c82dba871a26afb7b90ceec59892adfec9bec550665a74d190a4fda639f61d5d","guide/src/reference/types/jsvalue.md":"46d74da47f8a517249de4dd096351c10d658d9c3535950a34c1fc5d5b42eb2f7","guide/src/reference/types/number-slices.md":"f380258fc058527c7dd6f49664a4e9dff69f0b03d626071aeb61efefb2a0b646","guide/src/reference/types/numbers.md":"cce95c07be08c1f16327fd4c7e79b7c480db9cc95e2b07514d31e51bd6122101","guide/src/reference/types/pointers.md":"3710b736f790a97a325b1883d5fa8104c16365446ef702e9dd29bda74699043e","guide/src/reference/types/result.md":"78be87e86c35d2bbc1b863217c1a7592af9f2c699902f44e22d1bc4b1c0664c0","guide/src/reference/types/str.md":"6cc086b02ae3d3565678e69d91dbf105f1f310009097a37fad4c812e25d4b7c0","guide/src/reference/types/string.md":"9e42298135e0aec11bb924e3a2b5002335cfe290240b48db12dc981156177cd0","guide/src/reference/weak-references.md":"8dc6ca26c478fceff12e374e11e2f01fdf5b6a88b7302d449d4336859f4efe8a","guide/src/reference/working-with-duck-typed-interfaces.md":"a23f1f98019fed2060e1fbce954ec457e77a3a17524f34ca861d256d2ad4b6ef","guide/src/wasm-bindgen-test/asynchronous-tests.md":"c24c381b719b4bd7b0c181da1db59170e822c142eb22f95c4a6eeb8fd36df3ab","guide/src/wasm-bindgen-test/browsers.md":"4a32d955e907134d71bb8cacb6a8a3eb290622156251f50f6a3946d799314e44","guide/src/wasm-bindgen-test/continuous-integration.md":"5865990ef231b3c99a9c1bc18f7b7f054a29b77ac7b671fcf1cd6bb4f4304ae8","guide/src/wasm-bindgen-test/index.md":"64fbcd222c3c597109d2717a3574abf2041ff325c26ee07d58c4cd7ba1c1f8ad","guide/src/wasm-bindgen-test/usage.md":"a1da64eaaf8fe9bea366724e08a4ba63dc984f86a28cc393fe00dc394ab244d6","guide/src/web-sys/cargo-features.md":"0e50067a7a46cee3d1b21a2690aabc539379cb1452de377ebaa0eaa4e5e587b2","guide/src/web-sys/function-overloads.md":"90a08bb955f7c79e573f83c31d5e7431ae1e3ad7001792ff8ff52e4299364fcd","guide/src/web-sys/index.md":"345499d0840fd23a2e5eb5ac497665decbb3f836fe9f4f88301ae4b5fbd8d44f","guide/src/web-sys/inheritance.md":"8f18af20b930497e2fae4a266dd27e317d1ea3510266c21b32f351354b495ff2","guide/src/web-sys/type-translations.md":"687ef5e4a3961fddcb94d24f69abec0ea64f6df306f4593974b69589215980b1","guide/src/web-sys/unstable-apis.md":"e74c3e72136d6906dd60258a27f34e1ea4612e7c8e95662596475dc557151cfb","guide/src/web-sys/using-web-sys.md":"523e16af6e27703a4a0582568bc97710350222af20801907268d2d8c197fb667","publish.rs":"6352715cf06a9e373a141e34991fa97ec5bdeb0ce7d623a4fbbe9448ef1bea35","releases/friends.sh":"f896ccdcb8445d29ed6dd0d9a360f94d4f33af2f1cc9965e7bb38b156c45949d","releases/release-announcement-template.md":"fcb3c75cdb8d5d6ce8a198f5570c967313f751d1eef0790b34a518772b2e8a38","src/cache/intern.rs":"b78abd7502ad069bbeb61073d1972c717a469849222037565b50514192c187a9","src/cache/mod.rs":"8989143b55160dbc142cb20c6e066cf0a3f70d6c97fbc9aa0fac59bd62bd865b","src/cast.rs":"da53f21aa485c0dae184350d2693ab41e3fc7a34fa300c19ad718f2b7fc2d42b","src/closure.rs":"489602405b52a5cd6b2e26f0e3a9e8d18497a939ab4cfb2e16c169cdc956f460","src/convert/closures.rs":"34d3be752366270170e4a46b7ed81659417fc3596b93a8d004959cfae6ba91b5","src/convert/impls.rs":"53b99adb5f6c50b19bf1936952693e226c0e86b703c20ff29859ad9fa25996ef","src/convert/mod.rs":"566ffd1f546afdb8d24c6c0d6faa00a28596a67ca6f2f39e9485add54400443c","src/convert/slices.rs":"023631e5419a6940fd50dd3a9f13725bccdb2918c78b86639202207d3ef707f3","src/convert/traits.rs":"6e6fbea4303547ab7c727b70bda964ecaa9b25396faa0b5963efee85b8737a94","src/describe.rs":"f17b1d44ea933d892e7dcd5b92f191434d8772cbcfd65468e0a6c7fd0e77f910","src/externref.rs":"2c26fc2a85a04d131c70d14a425ff54d961a471fb2b53c378d7f5e3ffc6b9085","src/lib.rs":"08c3483a27953c47bff48e756b0d47df4c809fa268c16d5d30ab83009a3f6abb","tests/headless/externref_heap_live_count.rs":"41b2758762c91bd2d05995b1b8989651a6bf2e586ffad5597ff63f6d2dc6d755","tests/headless/main.js":"6de0a19b91330e9bc68334c4f1fa11c1cd6bf273f5ea3e470933ad800c962679","tests/headless/main.rs":"d86245fdd476cb6c275c0649d76fd348ab55b7952ece325c1ed4ec00051a1f73","tests/headless/modules.js":"a407c81d2670309ed484adf98a2e522f6ea031b1286416eb7bf184df7433d5da","tests/headless/modules.rs":"74f77f88bb5280862c06087d78c48ba930736e58db9a1e6c80450bb0e032b789","tests/headless/snippets.rs":"baf9d3c68e1b567fcba4e073cc0d24a8f039955e10dd1275e4a389574ff556d7","tests/headless/snippets1.js":"8bd0c367fdbc61f509728255750094bb36200a1aea74079611ad7cfa9c5f3f28","tests/headless/strings.js":"fca2d7a1afae31663607f956134a4f447aaee0f85d828addc3c4c1440f2e18e5","tests/headless/strings.rs":"4a64d8a4f9329a282d0f87408c0645ded71a7d023eaad40a32eaf60886a08375","tests/must_use.rs":"cae67a8740cd2c969a6b33316cd5036639048d9bbfecf55a5f45faaa624de1d0","tests/non_wasm.rs":"d2cca0b81824ac392f55b8d583d2f361ac11bed892968113e33fb3148572b853","tests/std-crate-no-std-dep.rs":"47f0e32bad7b9b11ca77d66d904eb3408c3528732899479039fb6db4c6e9ed9e","tests/unwrap_throw.rs":"79f05fa37249cea08689592d53d856019a90fd1b72c41413f7fcda5cf5913356","tests/wasm/api.js":"daf4b7e2b76b718431235eda5e221dd53037fb6bebbec6023c7e3fd2b806f763","tests/wasm/api.rs":"12219ffafbb57ba8ed315c56f5e18de412df84757e002ae11cb9d2beec13b0e3","tests/wasm/arg_names.js":"0d7de3801257e18756a974bdd2950d2fb06755f7c0d1c681e03b56d97e828e34","tests/wasm/arg_names.rs":"decd8f71a58ebf662a586b7f19e41f6666782df0da74a8a2c69b7a504661dd79","tests/wasm/bigint.js":"b6d045afbbb7d5e8723b41ee2e9c22357c8c4c4aed804bbca2a9b42a19906354","tests/wasm/bigint.rs":"5a7e0e6e6753a5ce08c199334fd89f1cfeabc1305301d988d6f748e001ccfa2c","tests/wasm/char.js":"6f307035f2689f0827726503f201f8fd591100ff051a55bda23ddcaeaa2902f1","tests/wasm/char.rs":"44dc134f9057e6c91da32c7fdba5ba10785507ced161c07267548ee08308e6c0","tests/wasm/classes.js":"bfe8660c25933fa1cec1301db9a790b3df3d5a0f6911733ad2544a26b43dabae","tests/wasm/classes.rs":"e2df4a27ef2dc5b986c88206dc1067fbb762d4393d5d343d3edf2d1ac3f40fdc","tests/wasm/closures.js":"6df2da8bad116c9ef244f35f4f14d1fd432e6faf43df30882c6464a521cc606c","tests/wasm/closures.rs":"6ca1967c2a738034798b78b8a407b3c7db1648b4a544ab2399048bf362c4ccc7","tests/wasm/comments.js":"2c3bf2e79ecc33f0fba33d13a91a1ae9390f9f7a466af8eb215636662e20462a","tests/wasm/comments.rs":"5a0068fe3e214c07da92a46b6e45a2771fbd8e04f14cb7802f32082b87a459a0","tests/wasm/duplicate_deps.js":"2226e4f65525c545ab45109879b16b2a92341b440178e75d3a9efb3ed10f7b03","tests/wasm/duplicate_deps.rs":"3a91569e54f56e178dc164f2d2b8537ec6a10b3161c23e1cc8e552805cd868f4","tests/wasm/duplicates.rs":"a2b4a7960e8a7c9b3fda943e8aadb7cbc0ba8fa1a6956baf40ba2f129bd591ee","tests/wasm/duplicates_a.js":"d3d685e95a54b911c2b9a64f7c0f245e3e492491368355044ae2cd12c3332044","tests/wasm/duplicates_b.js":"cd6c87905a5c5514239bba52a03e6c151d79a57a477f52a073b61ef18c98f642","tests/wasm/duplicates_c.js":"93399409996d182b5fe02548d3c5c3e1681939629e0261d6f19f8c1ee3b08dfc","tests/wasm/enums.js":"7b37ce390aba76477e4d54c5214624cfc5eec49e0f88ef6f535f06f23527864f","tests/wasm/enums.rs":"1537fda37a051340722c29cb5aadc9e1819a2e609f2569ca4fd972308d03fc7f","tests/wasm/final.js":"cfa7c496291f08b98f0406190ee4deaab9ade890d65ada4c223a76135e66f619","tests/wasm/final.rs":"25b0a85e87686e3f7a7a44e3ac25402d504eec7f9813a74ffd63c5f4428ee0ff","tests/wasm/futures.js":"175745daafcaed4cc0233809f4829228528c87030459645e8493b013cd3e9f98","tests/wasm/futures.rs":"24af063658319fc76d89a30a9582e885465dfde520c6eae34eb5b8b668aa05cc","tests/wasm/getters_and_setters.js":"8ba2d939aab232074860cdf1e01d1c58faee49a31ef35b585c962aceccb870a5","tests/wasm/getters_and_setters.rs":"e25a2d026375adda68b4591f2802ad941e0a212fca8d7ff6cf020eb5da5fa5c7","tests/wasm/import_class.js":"d1bd1dc7df5bfde686bea6fbcd32db6009b6853712cafb446af263fdebb1fb78","tests/wasm/import_class.rs":"0678cb9272a28f818a54f182e8f229235f6bc79e220738dbf68561bc19d7e0de","tests/wasm/imports.js":"4069b7cf12ae0cca30a1e92750d0715e782a5c795ff21c0d5aae738f726ae8b1","tests/wasm/imports.rs":"56cb87c812c1fb3f6573ca166caa483e97380433d10b1c86fc1237a191630fe1","tests/wasm/imports_2.js":"ab251fc0a0a1921c60d316160bc120fd97da3c3753804174cfda2f08ff43208d","tests/wasm/intrinsics.rs":"1eac40553375d1e5250a9242df19837d1b448296d53ceb41f842c80996e958e9","tests/wasm/js_keywords.js":"d247be675cc73540fea4b2e50bb2b7fcedb2b0d511d85be6fb646876d3025562","tests/wasm/js_keywords.rs":"6944d856346b528c321ac24b1f986e4858d22b37f8f24ad0d393fe7c4ac079d7","tests/wasm/js_objects.js":"a2be00dab58716e4cbbaeba4da8512ba924c39d3f1cb405ba769ab8a780ed7fc","tests/wasm/js_objects.rs":"86f77308ffacc9337d21f62671ce269e723468a53404d0679da43e5e95c90135","tests/wasm/jscast.js":"d678058645d2d370c45ec5fd5bc9b94612b1e70035a9e0f524c134369f06fe1d","tests/wasm/jscast.rs":"bd9041fd4f74cd69435f4d4be019a887d680d7fac86134e42954e94d7c1c5cab","tests/wasm/link_to.js":"b371f4c82da171ce5a3e21a6de172cd1c910a4ff26e021d1a7ede5bfd7829c40","tests/wasm/link_to.rs":"1cbc53a58cf0fb693a8e775c94e3cbebc68f2355d98f4ce972abc42ffd62d014","tests/wasm/linked_module.js":"412bcf020b68e7e5511f4def869cc3384c1e98b923a9b82e25748b40b5b6e640","tests/wasm/main.rs":"ab59340b8cc5d49f4e92df19d3ce04eb89358f481af476fc61e731e5e0c6e6d1","tests/wasm/math.js":"9deb196ab7ad3d5d1f98d7d0b6ee60cb125212a4a1281ba0141cc3713fdea892","tests/wasm/math.rs":"be9000d84c6b6b091455e3b20ee7f5a88dbcfc0d38db97fad3dd167970c4b4a3","tests/wasm/no_shims.rs":"6c44ce90e1fcb8d41a7c2d369ce7a2735ba5ce799dcf07b41cbc3ccaa2f27a6a","tests/wasm/node.js":"ec3a9500773c7f07a7bcf002e23aa3848be5208147c3d750281a1e1f6d899af1","tests/wasm/node.rs":"fe140900d7048353ce0e518a1e67dedb1928f0cf34c02514498184fd8aef10cc","tests/wasm/option.js":"0d0cba722045698e9621f2565acf854bf3085c8739622798085aaa6b58e3edbe","tests/wasm/option.rs":"d82123f7349e22873e636341a52e99e256213e77d4d7ab8450ba6379be2128b7","tests/wasm/optional_primitives.js":"37484639631e1c50bdc055a08babff18d4be9f7a9291f0f3395e1a7c519e5cac","tests/wasm/optional_primitives.rs":"502803cf27b78dd8a6c1d75ae954b71cc017f803486867a87c0474e5d53a6567","tests/wasm/owned.js":"645b47e87fe52e08fbc07951736ab29f4dbab20c051913dba6228b2a08bad0bd","tests/wasm/owned.rs":"99af8eb8c30485b028f37d24352e2db747a425a00ebfed29e02400d87c756f32","tests/wasm/result.js":"78212259f886d864885eca7599199434bd7abec915a2e7fa3b73dfe63284e15c","tests/wasm/result.rs":"a4a4486d3edb6e242d32a9f12916a6cb5d38e07f646f69969ece6838a351448c","tests/wasm/result_jserror.js":"3ea04e68937f15d869535b3bb119d8886dfcde3c16c12c4a18a995f358552154","tests/wasm/result_jserror.rs":"ae4cbd3362841d070722f99fa0dadaf3233661803c73c65a9e63746b58a72134","tests/wasm/rethrow.js":"0a495a8d1b735277e18cc3fc3edf8bd2a72586441d3884134182e5052786ab84","tests/wasm/rethrow.rs":"59dcf192c9e85b0d98031c135d2aa2eda4902a2bc5b740a9ddf1e75dc9cdd23e","tests/wasm/should_panic.rs":"234929575bc55d9181d49938518888cb273bd5f3b1c9f826f94ee8956f1f5584","tests/wasm/simple.js":"3890fa19585d031821e8db80de06593e8e5ce83c9ba8214fe1cef319e9c14fbb","tests/wasm/simple.rs":"79637e64b92c05f6b44b8d5ffe9b6cc014c9408dcb446a4a4de2a2dfed1fdde8","tests/wasm/slice.js":"2e3c42c6ebeb832f42e99e4f251817bd13083eff0b7c45c46fb4d7ab2aa740cd","tests/wasm/slice.rs":"6a70478061ed1abc92b30c3a72ac507ac5a533f90c9830a233458b25626be4cb","tests/wasm/structural.js":"ac504a1dbb7222c70270530a284eec56ace0bc47b95e8f9331f4b2df1d28c3f9","tests/wasm/structural.rs":"dda0e9cea09b94dd84ae39d6cf0949aa305062b7a466fdcb53370f5ee9e3dff5","tests/wasm/truthy_falsy.rs":"26ef766eb5c3dcc7f507c519b6ac4a37b3ad901f3ed6f5274307c12e549b5fec","tests/wasm/usize.js":"521714b75033d9e18117de2cae2cd690c477faa88daefbbc82a09e60f4e901a8","tests/wasm/usize.rs":"b97455844d1f7acfbae7fcc69ec0bd8de871201281e802173a62574b8f3d7983","tests/wasm/validate_prt.js":"a726a85f4805648d9e69c804a266bbedaed942228a1b3a46274a91bcb83eafe9","tests/wasm/validate_prt.rs":"cea3db07f10d2bf057af99b90655179371bccf1db67e7364d476b00ecbf24a93","tests/wasm/variadic.js":"30d3bb656c0eb29b69c7e653f3201b5210b8a78e962b4678336c4d9889182adb","tests/wasm/variadic.rs":"1cabd34ad64475cc705853a2b9a8f619f6aed6ee3f3d8179793f8198df1ac178","tests/wasm/vendor_prefix.js":"1424c7fea77fea13179a50030afeffdf4b277dcb6d7b1e5ce3eea681ec2c47f4","tests/wasm/vendor_prefix.rs":"eabd627e14e09ec637d7e7a5b0bccced7e3370203351e4ce8610a5c66fac502b","tests/worker/main.rs":"d9b95299c50c40ee7a5035710c95846e33ed7f52bdfd75c4aaadc4691ad97dd5","tests/worker/modules.js":"a407c81d2670309ed484adf98a2e522f6ea031b1286416eb7bf184df7433d5da","tests/worker/modules.rs":"7eeb46835d911868842a3e7434fc2c6d0e042943eb10e7ad76336065cdf18db7","webdriver.json":"41a86a9f78e1e520b2050e122da97c80a32e6e292e874fd8892e3eef1a75ed34"},"package":"7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342"} \ No newline at end of file
+{"files":{"CHANGELOG.md":"7381bd0fa3978b3d28dd714e0d3d3ffe7a00194260179814727e1bb7f922312a","CONTRIBUTING.md":"aa138d76f5cb25bba1a6942a230373aaed6be73c619f945cc4657e13ba69f897","Cargo.toml":"043cfa33a4c13638e56bb124928f5b873554c5188241c4ef1af2d0b26180d02c","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"28e3cdacc492660ea96ed3dfd55164f948aaeb3d94a3d5977c88d95110b40a87","_package.json":"7a84fbc7f68f390315d93d2d808d5b27344644eb5df59a51bbe7a854d2a6231a","build.rs":"95d57e593c411b82bf88819765d6422db2a65c1bf489b63f87e0aefeb721fc41","examples/README.md":"e5396e95d8130948e48b767ab505c46bc69f6ff3ebfe0d9709068cf42c250818","examples/import_js/README.md":"bb53d4a264e9a084effdc7a22ca7d5acca0207b411478b98782d881b7fcade51","examples/import_js/index.html":"f4825d155bfe0059aa182a506d6d076d1ba5f118e46365ac902b12f27a6c8c0d","examples/import_js/index.js":"d425b7b0636dc5c5046bc96e6bfe6ef3bb1503fa91c54f40ecb457a1b060ee5c","examples/import_js/package.json":"f65f4a456da892c99cf3a5c961283e4d39780a56be5b6ae5fb2bbc9f235fdaae","examples/import_js/webpack.config.js":"fc314556d2f0c6266cde7c47afaceebe474be97c0401985a23d822ad9dd0105a","guide/book.toml":"d8cae5ae5fbeaab5b6852c64b975d37f51592a8e9eedba22c898672d9b11e9be","guide/src/SUMMARY.md":"6777b024fd7634e9f5fc1f5a1be38bdd8019da61e3dc6b5337123ac7284aac7f","guide/src/_headers":"401cee68df5967f0aa509a1b978a83f06e8e830deca1433964703e7a1ac2c646","guide/src/contributing/design/describe.md":"3186f9795be894708788e50d2ee745b9bd73bc94fb3dce67f3f1fd5e7fbd3659","guide/src/contributing/design/exporting-rust-struct.md":"2ead6b67f241bab543bb96c80e90b63abd67822a7c94190d2f2d1c9809a59b87","guide/src/contributing/design/exporting-rust.md":"ad88a5e0fccafe6c27e5a8bd951cf3e2fee1846da77a665f255999d9dd5961a6","guide/src/contributing/design/importing-js-struct.md":"848d0b144b28a5ae1ca3760438e71b938cfb2ee350f5b902fd08c38a0a64e27b","guide/src/contributing/design/importing-js.md":"c949c8921c213ba21b08f705d4611304acba47b68c35484fe968a80194f3a9ab","guide/src/contributing/design/index.md":"3bcd35bfadc3fa81d26dcac23f2e2ab5c3e2874cb6a88d0d892c5effe535fb04","guide/src/contributing/design/js-objects-in-rust.md":"0a18922b509ed8a6cc6724b81af6e6d469b75b3796dba770949a8b59d8067455","guide/src/contributing/design/rust-type-conversions.md":"3eb1b6b5b6b138d5f39148612ede378fc73137b32458a8c17c6d4b1cf9e8b7e4","guide/src/contributing/index.md":"d02b4f2f238b9fdb62fbc09bef3f0e9fc0ccb3f8cf977d0f2c6ebc1ec2634e42","guide/src/contributing/js-sys/adding-more-apis.md":"d6626d530fa5b73f045a20bf123d5e261ac2ca3bd64cbb80b655612f9b9a6276","guide/src/contributing/js-sys/index.md":"9c0864ca52e8699148e789c2a6ba2d3044ba2358d7106a1b7fd725d3720dbb54","guide/src/contributing/js-sys/testing.md":"d1f613c88793ffce61b2d77aa40e3a91a1de3c73ab9f8eaedfc39da16c93ad07","guide/src/contributing/publishing.md":"012c31c7037ca084d0c2a65c2dfc0be6fcbe5c118307e9efbb4f6f781ae48e43","guide/src/contributing/team.md":"a3f993cb1afeee767e85077d135b1ea08850c433a69c436ebe6b7a48124ed945","guide/src/contributing/testing.md":"c3c720acfea72768117fbc2b95181b48caae1eaae1e3660d44ac5cb883d9e259","guide/src/contributing/web-sys/index.md":"6b4d5e00cbbcaab29295a3bd60e90b7f72b118758966622a307d9222488707c1","guide/src/contributing/web-sys/logging.md":"ee960ec9adc174183fb349acdbf5fc647b6f9a290022be9b118b9de37b8b5687","guide/src/contributing/web-sys/overview.md":"e6179317f75aa8e836e3c803f5d814e87119763709eea47b04cebc86c089d80a","guide/src/contributing/web-sys/supporting-more-web-apis.md":"a3817d09c6cdc3cb28a1b77cdad5e4436ab5bc37f9d681b1e495815ca91de85a","guide/src/contributing/web-sys/testing.md":"77f8e4b45bd0e27676dd503474bc32f91672b23c6ab7127a4f5b828dc8ea40e4","guide/src/examples/2d-canvas.md":"44a0eb82ec3398ee63a6df5aab103f1b002082eac2d129f656d8519cbc0829e7","guide/src/examples/2d-canvas.png":"b202cd79b20c00d49c40d71225eefea99306015858a432ceb7592d53c15300f7","guide/src/examples/add.md":"8dac740d6a4c499d868c29d8426d113da9cdd6ef22bf8084b8cf8c1de513b09c","guide/src/examples/char.md":"93f94a1b670322d0dc21b46d749909c414f9f254e2dd97afd8afe8cb0e5ab908","guide/src/examples/closures.md":"669dfc47a670271d7ce7a3bd2c08620b698b01ea8b2a7b1cc2047a77e7617130","guide/src/examples/console-log.md":"6552f4d766291cddc0eade75e4f64de9f10e00b89a0bedb1b15dcf7baa90b6e0","guide/src/examples/dom.md":"44ad74370b3727ec98f958273c639e767f2ae5b75e96ef53e74be1833a630272","guide/src/examples/fetch.md":"0f9d08e240bc5ced13ab154182aedef7fa7b00cba784c65727aa15be27f86d7c","guide/src/examples/hello-world.md":"d5f4d830c316a91e951cdaeab5cb23ae47dbc910b05de849e67bef1ea709564f","guide/src/examples/import-js.md":"0480a6aa32b1fdc1347cb3d0c4f2a006caeb33c75ed21eb78ad800f012cbc2c6","guide/src/examples/index.md":"4e629f42d7bfb52bc35856b6e21c3aa7433563482697212d7b54f1bf619b56ed","guide/src/examples/julia.md":"0cd4ae1de24d657d7869c984dec61cc8b796621365be633212bdb2a6d57ce727","guide/src/examples/paint.md":"06c6c04f121080e0e5600b4ad300df9e93b5d4b6342f42c421e6dec1f2955ced","guide/src/examples/performance.md":"de888713cf0a047bd4a28a1ca890be51d99b6aaabc9a2b134280b768a7148377","guide/src/examples/raytrace.md":"6769cf3b7bd14e9814e751927fde8c5acb443c5e82758285a1ee4f91e577a870","guide/src/examples/request-animation-frame.md":"26eef6b203acc0b2667d9c4380c39a44eb4b97991efeded9ca32cc9ab454e993","guide/src/examples/synchronous-instantiation.md":"c2f887e4754535c453d22438c3179d71d2468d8994a61330a362132c73157ef1","guide/src/examples/todomvc.md":"b872c5631eae969368d147342fca16dadb6f0412f8922230c27271370e9d3d97","guide/src/examples/wasm-audio-worklet.md":"a2f390bef5f69365da496ddfe8995520cf8441770a6026037b1882fcd4d5ea34","guide/src/examples/wasm-in-wasm.md":"5439a690e7107736e6f8b92e475f0a45e83ab9a1e5a0fe02e8f6dd93372590c6","guide/src/examples/wasm-in-web-worker.md":"b05c2285be7802251ac71ae7e4a91ddf52ab286336308a6328f4b143cd5811c4","guide/src/examples/wasm2js.md":"48f953dfa1b17b68e5d983231e991797e32e9bc22b9c3db72c2d055e08449a00","guide/src/examples/weather_report.md":"0b6778aa7f44c0bb0ba18daaf7623cfe1776b133611a6cf136935d82ef388db1","guide/src/examples/web-audio.md":"32bb18c9e4f167614ce3fb61d1d04265449f88da40949834b50baf9e37063fbd","guide/src/examples/webgl.md":"15570a0a081c2301981a1fbca0bd39dfcf35221c64ddfb8e8f4477660658cb08","guide/src/examples/webrtc_datachannel.md":"47b06b1b00c41f048fad3c2206399cae2d8dbd90b6d83953c138826f11677eb5","guide/src/examples/websockets.md":"704f9d5c1d13426e6e64e132cb0204be3c10a54dbfa5f1c834adc4efb4a1b8d2","guide/src/examples/without-a-bundler.md":"c25c28ae01905615bfbfb88b43563e04db76cc0d87469b63453053f62d8a4930","guide/src/introduction.md":"057e81f8f62d8647e51d1269bdb5788654be2e22fea23d155ec5a15bbf8bae1d","guide/src/reference/accessing-properties-of-untyped-js-values.md":"a91e3eb706ddd15628072978906e2faca31560de616c0630316d9f6eff6b55bf","guide/src/reference/arbitrary-data-with-serde.md":"b281146412f6bda893f146e84721677f003cad57af941552c2faf534b61b2d98","guide/src/reference/attributes/index.md":"12b57ebbd0c9ba42d9f10d752c9943d9beec90d659d1b1ff9e9bfea02572a2c8","guide/src/reference/attributes/on-js-imports/catch.md":"da230e6986ca29f1e82313b82275ab9c3b2144906271cf82b27772541d781d84","guide/src/reference/attributes/on-js-imports/constructor.md":"89f8be11c567b4611c84209b34351238553d5360d7f7665ea25332e1544c5b99","guide/src/reference/attributes/on-js-imports/extends.md":"84ece37398ba0df66f890982315f082c52b5f027e03c20527755abe610c2567c","guide/src/reference/attributes/on-js-imports/final.md":"2ded2c23194cdb5f0b064a2114cbc8a6a1c1573363d797f162c4683bb2f1c21d","guide/src/reference/attributes/on-js-imports/getter-and-setter.md":"27f3c2738688a43e611524e5e3ab7174a1993026a69098b75780a388aeb5e745","guide/src/reference/attributes/on-js-imports/index.md":"2219a4514fe9597cbbe6c46014b57c38f1e85f3d0775a8a7880f50858cb13633","guide/src/reference/attributes/on-js-imports/indexing-getter-setter-deleter.md":"11d5c03f922294894fe0147fae96e04b26a5adb36ce91296e52729a9fe5931c2","guide/src/reference/attributes/on-js-imports/js_class.md":"d51c5f05b71bbf6b6ec8e0c36314ae299fd7eb07be989e721b79b599405b3486","guide/src/reference/attributes/on-js-imports/js_name.md":"12457466f3510256a51a78f52b09f7cb1c0b0ce3ef636e028cd2c372fa9e8738","guide/src/reference/attributes/on-js-imports/js_namespace.md":"acaccd162a982c1c17b659ce5daa1d5a0d184b9b07728fc5bb17a89f327ffafa","guide/src/reference/attributes/on-js-imports/method.md":"d54246efce5d7a104702439ba509bcc5bfbb0b57253edebdb696617daca80bcd","guide/src/reference/attributes/on-js-imports/module.md":"b47cd5ccbb69955f1d47101accc96fcd562abecbf7e34826f7f3c585d6b9dad0","guide/src/reference/attributes/on-js-imports/no_deref.md":"7d58bb3b6f768e38b949727abd1ee621ad09ebc537f83a8a20d0eeddf3771b95","guide/src/reference/attributes/on-js-imports/raw_module.md":"f363e5f3bc401b7e350eeec49cffde85dfb2346d597f38d98993fe5bfb9ff649","guide/src/reference/attributes/on-js-imports/static_method_of.md":"d5a5d9623ee55097f26e190b478e75f2e7d2ffc30e51ec647f39933d3d4e3b18","guide/src/reference/attributes/on-js-imports/structural.md":"364e01a5792029e9a5fa582375736efcee006352834ee273d218da89b77dd8bf","guide/src/reference/attributes/on-js-imports/typescript_type.md":"abdb26584e88bed32c4dc7b2d4ed2e3cb2007f1bbf73412fa87dec823db76b2a","guide/src/reference/attributes/on-js-imports/variadic.md":"1ecf00149be472e3111f188c053092f3274fb33453414516a305084d8e92c4df","guide/src/reference/attributes/on-js-imports/vendor_prefix.md":"47a8d47e0cd745cca697f6d944e145f02695ca422255c3d6e1c9b2b719994b1b","guide/src/reference/attributes/on-rust-exports/constructor.md":"8708873e656827869b6708be1997f9212ee801b997b6f223c5a2af09ab7eedae","guide/src/reference/attributes/on-rust-exports/getter-and-setter.md":"464a2d41a791bd8ba5a8b1c4aa64b2f865c42b98a2d1289bb65e766e98a1b56a","guide/src/reference/attributes/on-rust-exports/getter_with_clone.md":"11a04dba4d66c19be0e234014d21ccf9cd0b76169b723e90ceb81d719478f283","guide/src/reference/attributes/on-rust-exports/index.md":"9fe778a0dd013a874db484cb22b1d9867bfe6d69cfbbe5cfeaa8ab78cf19daab","guide/src/reference/attributes/on-rust-exports/inspectable.md":"52fbcfdb83c426430a95692d566a4709255e25b24be5704d7378a4196a8c5908","guide/src/reference/attributes/on-rust-exports/js_class.md":"f4c0d8e8021001578f7d300e88c438d1a7806c17cc0d8acc3b4134922a75affc","guide/src/reference/attributes/on-rust-exports/js_name.md":"77f035b6391b9e44f254a411ba18687c5fa6110e276be73b5ea347701c8dad42","guide/src/reference/attributes/on-rust-exports/main.md":"d1a42470fb0457b3471e96ba22ca270c1cfc9d5fa781240a9d8b1aef32641ff8","guide/src/reference/attributes/on-rust-exports/readonly.md":"a5da847ad36557f03b1c79a83d14c219dce914021266133c204260bc041b9b89","guide/src/reference/attributes/on-rust-exports/skip.md":"b9972241b8d473d1a46ef3c2861065ca296cdc923883c404f19f1d859bf914a6","guide/src/reference/attributes/on-rust-exports/skip_jsdoc.md":"6c400bb6dac1083449758448e5e7a576d40f371592cd597ea95ec441fefe19f8","guide/src/reference/attributes/on-rust-exports/skip_typescript.md":"1622c29b0d93a884bd0b5b2a62107a594e2919758c80592566e7786efe788b89","guide/src/reference/attributes/on-rust-exports/start.md":"dda9cfebb7cceac4b7b4868f82a9e12d3d33215f4f59d1ef40eacf2c33d90933","guide/src/reference/attributes/on-rust-exports/typescript_custom_section.md":"6dd69f15b6f6f632880b7a65cc49abe8f4f95fdead753c576d81a3268dae4985","guide/src/reference/browser-support.md":"177fff4ee6a68c85f045cec47bc7aa40de66fc95f8cb59128e8ef2d6972dbd7b","guide/src/reference/cli.md":"809daa3dbd7da7aa01786acd9602bfb4f81546c010568bf1f56d95eaac7dc29e","guide/src/reference/deployment.md":"1954466cd2ac6c5326258364f6390b10cee9c2729e7c2779f2a50f950c7c9523","guide/src/reference/index.md":"c603c3a7f265afb7c7b5eb391b32f6115f8842f3f422fd3730be4f90c4796bc4","guide/src/reference/iterating-over-js-values.md":"ec00f09516eb7de98bf7296f44b6aa9ceee3fae1dcdb7cdf8f36963d45b7ebeb","guide/src/reference/js-promises-and-rust-futures.md":"5f0c0b990f5b55c8d9485f7cc66a617f79cc232705562f306af97785c7ed1f79","guide/src/reference/js-snippets.md":"dff5adcbf66f06322e606c672ef070c2a0375f1ae592ca8a9da36a50324735cc","guide/src/reference/optimize-size.md":"c10abc1ea0902c9a57b74808bcf75bf092c0c2bb4082962b85d18df7593602c1","guide/src/reference/passing-rust-closures-to-js.md":"aa18f75ffd4b7779a2699b1bf969245ec0e1a70b24abe61e8877c2eb65f6ef60","guide/src/reference/receiving-js-closures-in-rust.md":"fc9c80ba5e1a5f243a66f68caba27e8103652aeac3765a9fad2d0e16113fede3","guide/src/reference/reference-types.md":"91d178b7fe2ec82eec4d8926a08b39ac16898172d6f65aee84347c6918033c67","guide/src/reference/rust-targets.md":"467d5cf7eaa1d4b89f9f5b2248cdd1a10340ca1db263ffff5c483ce10dcfbf54","guide/src/reference/static-js-objects.md":"930288fc463d16a46a6546f5f65af21ff6e4b94259d9a1e8bca9d660f9770604","guide/src/reference/types.md":"859123f51fa932fa37d7e47cd5c46956929793bd3accea050d3be516080ed78f","guide/src/reference/types/bool.md":"e954d93ec5096837d4dd2db3f23e71c14483279e347ca8908ecb49aded6e497a","guide/src/reference/types/boxed-number-slices.md":"1a217a68ff549f4208f99863d6616521c9d466542c1156bcc2be7d3a73e4edd4","guide/src/reference/types/boxed-slices.md":"f244161c0897d38d5100f32e94bc5b87dbc8277d831536d29d6214d3d0bdf7a8","guide/src/reference/types/char.md":"01f2f7bdb25a9a52edd93dcbbca6a29269a8d5adf6cb94dcadea29a7aace22f4","guide/src/reference/types/exported-rust-types.md":"d2f601d7d39ae92326c5624e1e2a2795f1f47accb92ec030c987b6c709681906","guide/src/reference/types/imported-js-types.md":"c82dba871a26afb7b90ceec59892adfec9bec550665a74d190a4fda639f61d5d","guide/src/reference/types/jsvalue.md":"46d74da47f8a517249de4dd096351c10d658d9c3535950a34c1fc5d5b42eb2f7","guide/src/reference/types/number-slices.md":"f380258fc058527c7dd6f49664a4e9dff69f0b03d626071aeb61efefb2a0b646","guide/src/reference/types/numbers.md":"cce95c07be08c1f16327fd4c7e79b7c480db9cc95e2b07514d31e51bd6122101","guide/src/reference/types/pointers.md":"3710b736f790a97a325b1883d5fa8104c16365446ef702e9dd29bda74699043e","guide/src/reference/types/result.md":"78be87e86c35d2bbc1b863217c1a7592af9f2c699902f44e22d1bc4b1c0664c0","guide/src/reference/types/str.md":"6cc086b02ae3d3565678e69d91dbf105f1f310009097a37fad4c812e25d4b7c0","guide/src/reference/types/string.md":"9e42298135e0aec11bb924e3a2b5002335cfe290240b48db12dc981156177cd0","guide/src/reference/weak-references.md":"8dc6ca26c478fceff12e374e11e2f01fdf5b6a88b7302d449d4336859f4efe8a","guide/src/reference/working-with-duck-typed-interfaces.md":"a23f1f98019fed2060e1fbce954ec457e77a3a17524f34ca861d256d2ad4b6ef","guide/src/wasm-bindgen-test/asynchronous-tests.md":"c24c381b719b4bd7b0c181da1db59170e822c142eb22f95c4a6eeb8fd36df3ab","guide/src/wasm-bindgen-test/browsers.md":"4a32d955e907134d71bb8cacb6a8a3eb290622156251f50f6a3946d799314e44","guide/src/wasm-bindgen-test/continuous-integration.md":"5865990ef231b3c99a9c1bc18f7b7f054a29b77ac7b671fcf1cd6bb4f4304ae8","guide/src/wasm-bindgen-test/index.md":"64fbcd222c3c597109d2717a3574abf2041ff325c26ee07d58c4cd7ba1c1f8ad","guide/src/wasm-bindgen-test/usage.md":"a1da64eaaf8fe9bea366724e08a4ba63dc984f86a28cc393fe00dc394ab244d6","guide/src/web-sys/cargo-features.md":"0e50067a7a46cee3d1b21a2690aabc539379cb1452de377ebaa0eaa4e5e587b2","guide/src/web-sys/function-overloads.md":"90a08bb955f7c79e573f83c31d5e7431ae1e3ad7001792ff8ff52e4299364fcd","guide/src/web-sys/index.md":"345499d0840fd23a2e5eb5ac497665decbb3f836fe9f4f88301ae4b5fbd8d44f","guide/src/web-sys/inheritance.md":"8f18af20b930497e2fae4a266dd27e317d1ea3510266c21b32f351354b495ff2","guide/src/web-sys/type-translations.md":"687ef5e4a3961fddcb94d24f69abec0ea64f6df306f4593974b69589215980b1","guide/src/web-sys/unstable-apis.md":"e74c3e72136d6906dd60258a27f34e1ea4612e7c8e95662596475dc557151cfb","guide/src/web-sys/using-web-sys.md":"523e16af6e27703a4a0582568bc97710350222af20801907268d2d8c197fb667","publish.rs":"6352715cf06a9e373a141e34991fa97ec5bdeb0ce7d623a4fbbe9448ef1bea35","releases/friends.sh":"f896ccdcb8445d29ed6dd0d9a360f94d4f33af2f1cc9965e7bb38b156c45949d","releases/release-announcement-template.md":"fcb3c75cdb8d5d6ce8a198f5570c967313f751d1eef0790b34a518772b2e8a38","src/cache/intern.rs":"b78abd7502ad069bbeb61073d1972c717a469849222037565b50514192c187a9","src/cache/mod.rs":"8989143b55160dbc142cb20c6e066cf0a3f70d6c97fbc9aa0fac59bd62bd865b","src/cast.rs":"da53f21aa485c0dae184350d2693ab41e3fc7a34fa300c19ad718f2b7fc2d42b","src/closure.rs":"ec6da6b2b403b44ae7d41169b8f72f7c4623878275ffee93309e70d89e111928","src/convert/closures.rs":"51479d4012c18a886653590514290a121893837777e8ab7cc104d3e883129e9d","src/convert/impls.rs":"527e3f2dd1e4d40b3b81c460357b6ef2c30a5fee843327da02de75b92a5cbd8c","src/convert/mod.rs":"566ffd1f546afdb8d24c6c0d6faa00a28596a67ca6f2f39e9485add54400443c","src/convert/slices.rs":"e6cf79787d0031267051da6f03ccb1c1ea1f18952c5458f00d720381daec6725","src/convert/traits.rs":"ccee20adf821982f57a55b9958109a348dcc911ce2d81979328734071430037e","src/describe.rs":"a25905f1c9e5b8b1cf152aa4aa2ceefed85b1632abb77d53a08982e2dffef755","src/externref.rs":"199a2a31d31bea3b15002ce8075148a91d49ffc71fead08039b5c4f2ab0d2562","src/lib.rs":"3ae23196694cbb6ba3b23971b95fa9fc360c984e4389fe35e61bf6c01951a620","tests/headless/externref_heap_live_count.rs":"41b2758762c91bd2d05995b1b8989651a6bf2e586ffad5597ff63f6d2dc6d755","tests/headless/main.js":"6de0a19b91330e9bc68334c4f1fa11c1cd6bf273f5ea3e470933ad800c962679","tests/headless/main.rs":"d86245fdd476cb6c275c0649d76fd348ab55b7952ece325c1ed4ec00051a1f73","tests/headless/modules.js":"a407c81d2670309ed484adf98a2e522f6ea031b1286416eb7bf184df7433d5da","tests/headless/modules.rs":"74f77f88bb5280862c06087d78c48ba930736e58db9a1e6c80450bb0e032b789","tests/headless/snippets.rs":"baf9d3c68e1b567fcba4e073cc0d24a8f039955e10dd1275e4a389574ff556d7","tests/headless/snippets1.js":"8bd0c367fdbc61f509728255750094bb36200a1aea74079611ad7cfa9c5f3f28","tests/headless/strings.js":"fca2d7a1afae31663607f956134a4f447aaee0f85d828addc3c4c1440f2e18e5","tests/headless/strings.rs":"4a64d8a4f9329a282d0f87408c0645ded71a7d023eaad40a32eaf60886a08375","tests/must_use.rs":"cae67a8740cd2c969a6b33316cd5036639048d9bbfecf55a5f45faaa624de1d0","tests/non_wasm.rs":"d2cca0b81824ac392f55b8d583d2f361ac11bed892968113e33fb3148572b853","tests/std-crate-no-std-dep.rs":"47f0e32bad7b9b11ca77d66d904eb3408c3528732899479039fb6db4c6e9ed9e","tests/unwrap_throw.rs":"79f05fa37249cea08689592d53d856019a90fd1b72c41413f7fcda5cf5913356","tests/wasm/api.js":"daf4b7e2b76b718431235eda5e221dd53037fb6bebbec6023c7e3fd2b806f763","tests/wasm/api.rs":"12219ffafbb57ba8ed315c56f5e18de412df84757e002ae11cb9d2beec13b0e3","tests/wasm/arg_names.js":"0d7de3801257e18756a974bdd2950d2fb06755f7c0d1c681e03b56d97e828e34","tests/wasm/arg_names.rs":"decd8f71a58ebf662a586b7f19e41f6666782df0da74a8a2c69b7a504661dd79","tests/wasm/bigint.js":"b6d045afbbb7d5e8723b41ee2e9c22357c8c4c4aed804bbca2a9b42a19906354","tests/wasm/bigint.rs":"5a7e0e6e6753a5ce08c199334fd89f1cfeabc1305301d988d6f748e001ccfa2c","tests/wasm/char.js":"6f307035f2689f0827726503f201f8fd591100ff051a55bda23ddcaeaa2902f1","tests/wasm/char.rs":"44dc134f9057e6c91da32c7fdba5ba10785507ced161c07267548ee08308e6c0","tests/wasm/classes.js":"bfe8660c25933fa1cec1301db9a790b3df3d5a0f6911733ad2544a26b43dabae","tests/wasm/classes.rs":"e2df4a27ef2dc5b986c88206dc1067fbb762d4393d5d343d3edf2d1ac3f40fdc","tests/wasm/closures.js":"6df2da8bad116c9ef244f35f4f14d1fd432e6faf43df30882c6464a521cc606c","tests/wasm/closures.rs":"6ca1967c2a738034798b78b8a407b3c7db1648b4a544ab2399048bf362c4ccc7","tests/wasm/comments.js":"2c3bf2e79ecc33f0fba33d13a91a1ae9390f9f7a466af8eb215636662e20462a","tests/wasm/comments.rs":"5a0068fe3e214c07da92a46b6e45a2771fbd8e04f14cb7802f32082b87a459a0","tests/wasm/duplicate_deps.js":"2226e4f65525c545ab45109879b16b2a92341b440178e75d3a9efb3ed10f7b03","tests/wasm/duplicate_deps.rs":"3a91569e54f56e178dc164f2d2b8537ec6a10b3161c23e1cc8e552805cd868f4","tests/wasm/duplicates.rs":"a2b4a7960e8a7c9b3fda943e8aadb7cbc0ba8fa1a6956baf40ba2f129bd591ee","tests/wasm/duplicates_a.js":"d3d685e95a54b911c2b9a64f7c0f245e3e492491368355044ae2cd12c3332044","tests/wasm/duplicates_b.js":"cd6c87905a5c5514239bba52a03e6c151d79a57a477f52a073b61ef18c98f642","tests/wasm/duplicates_c.js":"93399409996d182b5fe02548d3c5c3e1681939629e0261d6f19f8c1ee3b08dfc","tests/wasm/enum_vecs.js":"28426c3d99ac369d3e87d7ccd177af677bb8bc3d701a152b5f271fc88952bf96","tests/wasm/enum_vecs.rs":"ae3c4c062b63a08481bb1426ba8146e03d9f5d60cc5298880081bbba5ad650bd","tests/wasm/enums.js":"a9277bc042a208b545641f43d9354f7b3ce0e2240d8f9f0af9016bad6a5d5bab","tests/wasm/enums.rs":"c35c6658ec377182c819554108e6e01813323c9258d069fe4c962aec6a1c35c7","tests/wasm/final.js":"cfa7c496291f08b98f0406190ee4deaab9ade890d65ada4c223a76135e66f619","tests/wasm/final.rs":"25b0a85e87686e3f7a7a44e3ac25402d504eec7f9813a74ffd63c5f4428ee0ff","tests/wasm/futures.js":"175745daafcaed4cc0233809f4829228528c87030459645e8493b013cd3e9f98","tests/wasm/futures.rs":"24af063658319fc76d89a30a9582e885465dfde520c6eae34eb5b8b668aa05cc","tests/wasm/getters_and_setters.js":"8ba2d939aab232074860cdf1e01d1c58faee49a31ef35b585c962aceccb870a5","tests/wasm/getters_and_setters.rs":"0dc0e87014ce7e17970883b2e579b921a99a3c9115d67ed781e015f5f27c0ca3","tests/wasm/ignore.rs":"e0b02bab0f015ab1378b33e008129098dbc28bae4a4c443ef9def29e6646f647","tests/wasm/import_class.js":"d1bd1dc7df5bfde686bea6fbcd32db6009b6853712cafb446af263fdebb1fb78","tests/wasm/import_class.rs":"0678cb9272a28f818a54f182e8f229235f6bc79e220738dbf68561bc19d7e0de","tests/wasm/imports.js":"4069b7cf12ae0cca30a1e92750d0715e782a5c795ff21c0d5aae738f726ae8b1","tests/wasm/imports.rs":"56cb87c812c1fb3f6573ca166caa483e97380433d10b1c86fc1237a191630fe1","tests/wasm/imports_2.js":"ab251fc0a0a1921c60d316160bc120fd97da3c3753804174cfda2f08ff43208d","tests/wasm/intrinsics.rs":"1eac40553375d1e5250a9242df19837d1b448296d53ceb41f842c80996e958e9","tests/wasm/js_keywords.js":"d247be675cc73540fea4b2e50bb2b7fcedb2b0d511d85be6fb646876d3025562","tests/wasm/js_keywords.rs":"6944d856346b528c321ac24b1f986e4858d22b37f8f24ad0d393fe7c4ac079d7","tests/wasm/js_objects.js":"a2be00dab58716e4cbbaeba4da8512ba924c39d3f1cb405ba769ab8a780ed7fc","tests/wasm/js_objects.rs":"86f77308ffacc9337d21f62671ce269e723468a53404d0679da43e5e95c90135","tests/wasm/jscast.js":"d678058645d2d370c45ec5fd5bc9b94612b1e70035a9e0f524c134369f06fe1d","tests/wasm/jscast.rs":"bd9041fd4f74cd69435f4d4be019a887d680d7fac86134e42954e94d7c1c5cab","tests/wasm/link_to.js":"b371f4c82da171ce5a3e21a6de172cd1c910a4ff26e021d1a7ede5bfd7829c40","tests/wasm/link_to.rs":"1cbc53a58cf0fb693a8e775c94e3cbebc68f2355d98f4ce972abc42ffd62d014","tests/wasm/linked_module.js":"412bcf020b68e7e5511f4def869cc3384c1e98b923a9b82e25748b40b5b6e640","tests/wasm/macro_rules.rs":"6a8cf079f72aef96a004d559f5a06214ce8b096a3675a5c61c9794aa14448640","tests/wasm/main.rs":"cd81eb4bf0ff84e2b27963ccfee0550e26c96d3e7e1c1342e18c9b17fe6d28a9","tests/wasm/math.js":"9deb196ab7ad3d5d1f98d7d0b6ee60cb125212a4a1281ba0141cc3713fdea892","tests/wasm/math.rs":"be9000d84c6b6b091455e3b20ee7f5a88dbcfc0d38db97fad3dd167970c4b4a3","tests/wasm/no_shims.rs":"6c44ce90e1fcb8d41a7c2d369ce7a2735ba5ce799dcf07b41cbc3ccaa2f27a6a","tests/wasm/node.js":"6ae82d7f07a35b260e085158b080fb7d2c2c40865f579cc7c8688de090f8fa61","tests/wasm/node.rs":"e8b6448045682729bf359f1a70bdb24af57129a554ae2e2dcea1beb0b1715e65","tests/wasm/option.js":"0d0cba722045698e9621f2565acf854bf3085c8739622798085aaa6b58e3edbe","tests/wasm/option.rs":"d82123f7349e22873e636341a52e99e256213e77d4d7ab8450ba6379be2128b7","tests/wasm/optional_primitives.js":"37484639631e1c50bdc055a08babff18d4be9f7a9291f0f3395e1a7c519e5cac","tests/wasm/optional_primitives.rs":"502803cf27b78dd8a6c1d75ae954b71cc017f803486867a87c0474e5d53a6567","tests/wasm/owned.js":"645b47e87fe52e08fbc07951736ab29f4dbab20c051913dba6228b2a08bad0bd","tests/wasm/owned.rs":"99af8eb8c30485b028f37d24352e2db747a425a00ebfed29e02400d87c756f32","tests/wasm/result.js":"78212259f886d864885eca7599199434bd7abec915a2e7fa3b73dfe63284e15c","tests/wasm/result.rs":"a4a4486d3edb6e242d32a9f12916a6cb5d38e07f646f69969ece6838a351448c","tests/wasm/result_jserror.js":"3ea04e68937f15d869535b3bb119d8886dfcde3c16c12c4a18a995f358552154","tests/wasm/result_jserror.rs":"ae4cbd3362841d070722f99fa0dadaf3233661803c73c65a9e63746b58a72134","tests/wasm/rethrow.js":"0a495a8d1b735277e18cc3fc3edf8bd2a72586441d3884134182e5052786ab84","tests/wasm/rethrow.rs":"59dcf192c9e85b0d98031c135d2aa2eda4902a2bc5b740a9ddf1e75dc9cdd23e","tests/wasm/should_panic.rs":"234929575bc55d9181d49938518888cb273bd5f3b1c9f826f94ee8956f1f5584","tests/wasm/simple.js":"3890fa19585d031821e8db80de06593e8e5ce83c9ba8214fe1cef319e9c14fbb","tests/wasm/simple.rs":"79637e64b92c05f6b44b8d5ffe9b6cc014c9408dcb446a4a4de2a2dfed1fdde8","tests/wasm/slice.js":"f81dafe018089de221b523ef32d56044b9635421aa1f896342a7635d4fbce4f3","tests/wasm/slice.rs":"ea6447e6bcfd41622ec0cda927e86609067c2e0e3049217a7f1985e96c90d99d","tests/wasm/string_vecs.js":"4e422ed793de1bfbc7c9c538f3c10150b625279aff51bd2af92ebd7914130d88","tests/wasm/string_vecs.rs":"1f113573c6f4b5d50a66f34eafa7cc6ccdce042e86ed6efc353c094619ea1561","tests/wasm/struct_vecs.js":"dfc0a5109132ab8df94e0e16680cfe20d4c017179f43ad7ba5331db7d5c0154f","tests/wasm/struct_vecs.rs":"1b8b2de6ed50a4f04b11a002f0444419ace7419bf4441993537d2f16f89ee790","tests/wasm/structural.js":"ac504a1dbb7222c70270530a284eec56ace0bc47b95e8f9331f4b2df1d28c3f9","tests/wasm/structural.rs":"dda0e9cea09b94dd84ae39d6cf0949aa305062b7a466fdcb53370f5ee9e3dff5","tests/wasm/truthy_falsy.rs":"26ef766eb5c3dcc7f507c519b6ac4a37b3ad901f3ed6f5274307c12e549b5fec","tests/wasm/usize.js":"521714b75033d9e18117de2cae2cd690c477faa88daefbbc82a09e60f4e901a8","tests/wasm/usize.rs":"b97455844d1f7acfbae7fcc69ec0bd8de871201281e802173a62574b8f3d7983","tests/wasm/validate_prt.js":"a726a85f4805648d9e69c804a266bbedaed942228a1b3a46274a91bcb83eafe9","tests/wasm/validate_prt.rs":"cea3db07f10d2bf057af99b90655179371bccf1db67e7364d476b00ecbf24a93","tests/wasm/variadic.js":"30d3bb656c0eb29b69c7e653f3201b5210b8a78e962b4678336c4d9889182adb","tests/wasm/variadic.rs":"1cabd34ad64475cc705853a2b9a8f619f6aed6ee3f3d8179793f8198df1ac178","tests/wasm/vendor_prefix.js":"1424c7fea77fea13179a50030afeffdf4b277dcb6d7b1e5ce3eea681ec2c47f4","tests/wasm/vendor_prefix.rs":"eabd627e14e09ec637d7e7a5b0bccced7e3370203351e4ce8610a5c66fac502b","tests/worker/main.rs":"d9b95299c50c40ee7a5035710c95846e33ed7f52bdfd75c4aaadc4691ad97dd5","tests/worker/modules.js":"a407c81d2670309ed484adf98a2e522f6ea031b1286416eb7bf184df7433d5da","tests/worker/modules.rs":"7eeb46835d911868842a3e7434fc2c6d0e042943eb10e7ad76336065cdf18db7","webdriver.json":"41a86a9f78e1e520b2050e122da97c80a32e6e292e874fd8892e3eef1a75ed34"},"package":"0ed0d4f68a3015cc185aff4db9506a015f4b96f95303897bfa23f846db54064e"} \ No newline at end of file
diff --git a/vendor/wasm-bindgen/CHANGELOG.md b/vendor/wasm-bindgen/CHANGELOG.md
index 97b1f01ad..ece9e0c33 100644
--- a/vendor/wasm-bindgen/CHANGELOG.md
+++ b/vendor/wasm-bindgen/CHANGELOG.md
@@ -1,6 +1,196 @@
# `wasm-bindgen` Change Log
--------------------------------------------------------------------------------
+## [Unreleased](https://github.com/rustwasm/wasm-bindgen/compare/0.2.88...main)
+
+### Added
+
+* Add additional constructor to `DataView` for `SharedArrayBuffer`.
+ [#3695](https://github.com/rustwasm/wasm-bindgen/pull/3695)
+
+* Stabilize `wasm_bindgen::module()`.
+ [#3690](https://github.com/rustwasm/wasm-bindgen/pull/3690)
+
+### Fixed
+
+* The DWARF section is now correctly modified instead of leaving it in a broken state.
+ [#3483](https://github.com/rustwasm/wasm-bindgen/pull/3483)
+
+* Fixed an issue where `#[wasm_bindgen]` automatically derived the `TryFrom` trait for any struct, preventing custom `TryFrom<JsValue>` implementations. It has been updated to utilize a new `TryFromJsValue` trait instead.
+ [#3709](https://github.com/rustwasm/wasm-bindgen/pull/3709)
+
+* Update the TypeScript signature of `__wbindgen_thread_destroy` to indicate that it's parameters are optional.
+ [#3703](https://github.com/rustwasm/wasm-bindgen/pull/3703)
+
+### Removed
+
+* Removed Gecko-internal dictionary bindings `Csp`, `CspPolicies`, `CspReport` and `CspReportProperties`.
+ [#3721](https://github.com/rustwasm/wasm-bindgen/pull/3721)
+
+## [0.2.88](https://github.com/rustwasm/wasm-bindgen/compare/0.2.87...0.2.88)
+
+Released 2023-11-01
+
+### Added
+
+* Add bindings for `RTCRtpTransceiverInit.sendEncodings`.
+ [#3642](https://github.com/rustwasm/wasm-bindgen/pull/3642)
+
+* Add bindings for the Web Locks API to `web-sys`.
+ [#3604](https://github.com/rustwasm/wasm-bindgen/pull/3604)
+
+* Add bindings for `ViewTransition` to `web-sys`.
+ [#3598](https://github.com/rustwasm/wasm-bindgen/pull/3598)
+
+* Extend `AudioContext` with unstable features supporting audio sink configuration.
+ [#3433](https://github.com/rustwasm/wasm-bindgen/pull/3433)
+
+* Add bindings for `WebAssembly.Tag` and `WebAssembly.Exception`.
+ [#3484](https://github.com/rustwasm/wasm-bindgen/pull/3484)
+
+* Re-export `wasm-bindgen` from `js-sys`, `web-sys` and `wasm-bindgen-futures`.
+ [#3466](https://github.com/rustwasm/wasm-bindgen/pull/3466)
+ [#3601](https://github.com/rustwasm/wasm-bindgen/pull/3601)
+
+* Re-export `js-sys` from `web-sys` and `wasm-bindgen-futures`.
+ [#3466](https://github.com/rustwasm/wasm-bindgen/pull/3466)
+ [#3601](https://github.com/rustwasm/wasm-bindgen/pull/3601)
+
+* Add bindings for async variants of `Atomics.wait`.
+ [#3504](https://github.com/rustwasm/wasm-bindgen/pull/3504)
+
+* Add bindings for `WorkerGlobalScope.performance`.
+ [#3506](https://github.com/rustwasm/wasm-bindgen/pull/3506)
+
+* Add support for installing pre-built artifacts of `wasm-bindgen-cli`
+ via `cargo binstall wasm-bindgen-cli`.
+ [#3544](https://github.com/rustwasm/wasm-bindgen/pull/3544)
+
+* Add bindings for `RTCDataChannel.id`.
+ [#3547](https://github.com/rustwasm/wasm-bindgen/pull/3547)
+
+* Add bindings for `HTMLElement.inert`.
+ [#3557](https://github.com/rustwasm/wasm-bindgen/pull/3557)
+
+* Add unstable bindings for the Prioritized Task Scheduling API.
+ [#3566](https://github.com/rustwasm/wasm-bindgen/pull/3566)
+
+* Add bindings for `CssStyleSheet` constructor and `replace(_sync)` methods.
+ [#3573](https://github.com/rustwasm/wasm-bindgen/pull/3573)
+
+* Add bindings for `CanvasTransform.setTransform(DOMMatrix2DInit)`.
+ [#3580](https://github.com/rustwasm/wasm-bindgen/pull/3580)
+
+* Add a `crate` attribute to the `wasm_bindgen_test` proc-macro to specify a
+ non-default path to the `wasm-bindgen-test` crate.
+ [#3593](https://github.com/rustwasm/wasm-bindgen/pull/3593)
+
+* Add support for passing `Vec`s of exported Rust types and strings to/from JS.
+ [#3554](https://github.com/rustwasm/wasm-bindgen/pull/3554)
+
+* Implement `TryFrom<JsValue>` for exported Rust types and strings.
+ [#3554](https://github.com/rustwasm/wasm-bindgen/pull/3554)
+
+* Handle the `#[ignore = "reason"]` attribute with the `wasm_bindgen_test`
+ proc-macro and accept the `--include-ignored` flag with `wasm-bindgen-test-runner`.
+ [#3644](https://github.com/rustwasm/wasm-bindgen/pull/3644)
+
+* Added missing additions to the Notification API.
+ [#3667](https://github.com/rustwasm/wasm-bindgen/pull/3667)
+
+### Changed
+
+* Updated the WebGPU WebIDL.
+ The optional `message` argument of [`GPUPipelineError`](https://www.w3.org/TR/webgpu/#gpupipelineerror)'s constructor has been manually specified as a required argument,
+ because required arguments occurring after optional arguments are currently not supported by the generator.
+ [#3480](https://github.com/rustwasm/wasm-bindgen/pull/3480)
+
+* Replaced `curl` with `ureq`. By default we now use Rustls instead of OpenSSL.
+ [#3511](https://github.com/rustwasm/wasm-bindgen/pull/3511)
+
+* Changed mutability of the argument `buffer` in `write` functions to immutable for `FileSystemSyncAccessHandle` and `FileSystemWritableFileStream`.
+ It was also automatically changed for `IdbFileHandle`, which is deprecated.
+ [#3537](https://github.com/rustwasm/wasm-bindgen/pull/3537)
+
+* Changed behavior when compiling to `wasm32-wasi` to match `wasm32-emscripten` and
+ non-WASM targets, generating a stub that panics when called rather than a wasm-
+ bindgen placeholder.
+ [#3233](https://github.com/rustwasm/wasm-bindgen/pull/3233)
+
+* Changed constructor implementation in generated JS bindings, it is now
+ possible to override methods from generated JS classes using inheritance.
+ When exported constructors return `Self`.
+ [#3562](https://github.com/rustwasm/wasm-bindgen/pull/3562)
+
+* Made `wasm-bindgen` forwards-compatible with the standard C ABI.
+ [#3595](https://github.com/rustwasm/wasm-bindgen/pull/3595)
+
+* Changed the design of the internal `WasmAbi` trait. Rather than marking a type
+ which can be passed directly as a parameter/result to/from JS, it now lets
+ types specify how they can be split into / recreated from multiple primitive
+ types which are then passed to/from JS.
+ `WasmPrimitive` now serves the old function of `WasmAbi`, minus allowing
+ `#[repr(C)]` types.
+ [#3595](https://github.com/rustwasm/wasm-bindgen/pull/3595)
+
+* Use `queueMicrotask` in `wasm-bindgen-futures` for scheduling tasks on the next tick.
+ If that is not available, use the previous `Promise.then` mechanism as a fallback.
+ This should avoid quirks, like exceptions thrown get now properly reported
+ as normal exceptions rather than as rejected promises.
+ [#3611](https://github.com/rustwasm/wasm-bindgen/pull/3611)
+
+* Improved TypeScript bindings to accurately reference Rust enum types in function signatures,
+ enhancing type safety and compatibility.
+ [#3647](https://github.com/rustwasm/wasm-bindgen/pull/3647)
+
+* Throw an error on enum name collisions, previously only one enum would be emitted.
+ [#3669](https://github.com/rustwasm/wasm-bindgen/pull/3669)
+
+### Fixed
+
+* Fixed `wasm_bindgen` macro to handle raw identifiers in field names.
+ [#3621](https://github.com/rustwasm/wasm-bindgen/pull/3621)
+
+* Fixed bindings and comments for `Atomics.wait`.
+ [#3509](https://github.com/rustwasm/wasm-bindgen/pull/3509)
+
+* Fixed `wasm_bindgen_test` macro to handle raw identifiers in test names.
+ [#3541](https://github.com/rustwasm/wasm-bindgen/pull/3541)
+
+* Fixed Cargo license field to follow the SPDX 2.1 license expression standard.
+ [#3529](https://github.com/rustwasm/wasm-bindgen/pull/3529)
+
+* Use fully qualified paths in the `wasm_bindgen_test` macro.
+ [#3549](https://github.com/rustwasm/wasm-bindgen/pull/3549)
+
+* Fixed bug allowing JS primitives to be returned from exported constructors.
+ [#3562](https://github.com/rustwasm/wasm-bindgen/pull/3562)
+
+* Fixed optional parameters in JSDoc.
+ [#3577](https://github.com/rustwasm/wasm-bindgen/pull/3577)
+
+* Use re-exported `js-sys` from `wasm-bindgen-futures` to account for
+ non-default path specified by the `crate` attribute in `wasm_bindgen_futures`
+ proc-macro.
+ [#3601](https://github.com/rustwasm/wasm-bindgen/pull/3601)
+
+* Fix bug with function arguments coming from `macro_rules!`.
+ [#3625](https://github.com/rustwasm/wasm-bindgen/pull/3625)
+
+* Fix some calls to `free()` missing alignment.
+ [#3639](https://github.com/rustwasm/wasm-bindgen/pull/3639)
+
+* Fix wrong ABI for raw pointers.
+ [#3655](https://github.com/rustwasm/wasm-bindgen/pull/3655)
+
+### Removed
+
+* Removed `ReadableStreamByobReader::read_with_u8_array()` because it doesn't work with Wasm.
+ [#3582](https://github.com/rustwasm/wasm-bindgen/pull/3582)
+
+* Removed `GetNotificationOptions`, `NotificationBehavior` and `Notification.get()` because
+ they don't exist anymore.
+
## [0.2.87](https://github.com/rustwasm/wasm-bindgen/compare/0.2.86...0.2.87)
Released 2023-06-12.
diff --git a/vendor/wasm-bindgen/Cargo.toml b/vendor/wasm-bindgen/Cargo.toml
index 7b21e8af1..bba721962 100644
--- a/vendor/wasm-bindgen/Cargo.toml
+++ b/vendor/wasm-bindgen/Cargo.toml
@@ -11,9 +11,9 @@
[package]
edition = "2018"
-rust-version = "1.56"
+rust-version = "1.57"
name = "wasm-bindgen"
-version = "0.2.87"
+version = "0.2.89"
authors = ["The wasm-bindgen Developers"]
description = """
Easy support for interacting between JS and Rust.
@@ -22,7 +22,7 @@ homepage = "https://rustwasm.github.io/"
documentation = "https://docs.rs/wasm-bindgen"
readme = "README.md"
categories = ["wasm"]
-license = "MIT/Apache-2.0"
+license = "MIT OR Apache-2.0"
repository = "https://github.com/rustwasm/wasm-bindgen"
resolver = "2"
@@ -44,7 +44,7 @@ version = "1.0"
optional = true
[dependencies.wasm-bindgen-macro]
-version = "=0.2.87"
+version = "=0.2.89"
[features]
default = [
@@ -64,16 +64,16 @@ strict-macro = ["wasm-bindgen-macro/strict-macro"]
xxx_debug_only_print_generated_code = ["wasm-bindgen-macro/xxx_debug_only_print_generated_code"]
[target."cfg(target_arch = \"wasm32\")".dev-dependencies.js-sys]
-version = "0.3.64"
+version = "0.3.66"
[target."cfg(target_arch = \"wasm32\")".dev-dependencies.serde_derive]
version = "1.0"
[target."cfg(target_arch = \"wasm32\")".dev-dependencies.wasm-bindgen-futures]
-version = "=0.4.37"
+version = "=0.4.39"
[target."cfg(target_arch = \"wasm32\")".dev-dependencies.wasm-bindgen-test]
-version = "=0.3.37"
+version = "=0.3.39"
[target."cfg(target_arch = \"wasm32\")".dev-dependencies.wasm-bindgen-test-crate-a]
version = "0.1"
diff --git a/vendor/wasm-bindgen/README.md b/vendor/wasm-bindgen/README.md
index cf5dafcfd..be034243c 100644
--- a/vendor/wasm-bindgen/README.md
+++ b/vendor/wasm-bindgen/README.md
@@ -26,6 +26,24 @@
<sub>Built with 🦀🕸 by <a href="https://rustwasm.github.io/">The Rust and WebAssembly Working Group</a></sub>
</div>
+## Install `wasm-bindgen-cli`
+
+You can install it using `cargo install`:
+
+```
+cargo install wasm-bindgen-cli
+```
+
+Or, you can download it from the
+[release page](https://github.com/rustwasm/wasm-bindgen/releases).
+
+If you have [`cargo-binstall`](https://crates.io/crates/cargo-binstall) installed,
+then you can install the pre-built artifacts by running:
+
+```
+cargo binstall wasm-bindgen-cli
+```
+
## Example
Import JavaScript things into Rust and export Rust things to JavaScript.
@@ -110,4 +128,4 @@ Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in this project by you, as defined in the Apache-2.0 license,
shall be dual licensed as above, without any additional terms or conditions.
-[contributing]: https://rustwasm.github.io/docs/wasm-bindgen/contributing/index.html \ No newline at end of file
+[contributing]: https://rustwasm.github.io/docs/wasm-bindgen/contributing/index.html
diff --git a/vendor/wasm-bindgen/_package.json b/vendor/wasm-bindgen/_package.json
index 95632f893..f69515ae8 100644
--- a/vendor/wasm-bindgen/_package.json
+++ b/vendor/wasm-bindgen/_package.json
@@ -5,7 +5,9 @@
},
"devDependencies": {
"@wasm-tool/wasm-pack-plugin": "1.5.0",
+ "css-loader": "^6.8.1",
"html-webpack-plugin": "^5.3.2",
+ "mini-css-extract-plugin": "^2.7.6",
"text-encoding": "^0.7.0",
"webpack": "^5.49.0",
"webpack-cli": "^4.7.2",
diff --git a/vendor/wasm-bindgen/examples/import_js/package.json b/vendor/wasm-bindgen/examples/import_js/package.json
index 8b08e4870..8332534cf 100644
--- a/vendor/wasm-bindgen/examples/import_js/package.json
+++ b/vendor/wasm-bindgen/examples/import_js/package.json
@@ -1,14 +1,14 @@
{
"scripts": {
"build": "webpack",
- "serve" : "webpack serve"
+ "serve": "webpack serve"
},
"devDependencies": {
"@wasm-tool/wasm-pack-plugin": "1.5.0",
- "text-encoding": "^0.7.0",
"html-webpack-plugin": "^5.3.2",
+ "text-encoding": "^0.7.0",
"webpack": "^5.49.0",
"webpack-cli": "^4.7.2",
- "webpack-dev-server": "^3.11.2"
+ "webpack-dev-server": "^4.15.1"
}
}
diff --git a/vendor/wasm-bindgen/src/closure.rs b/vendor/wasm-bindgen/src/closure.rs
index a498d6d25..319f4c63c 100644
--- a/vendor/wasm-bindgen/src/closure.rs
+++ b/vendor/wasm-bindgen/src/closure.rs
@@ -559,7 +559,7 @@ pub trait IntoWasmClosure<T: ?Sized> {
macro_rules! doit {
($(
- ($($var:ident)*)
+ ($($var:ident $arg1:ident $arg2:ident $arg3:ident $arg4:ident)*)
)*) => ($(
unsafe impl<$($var,)* R> WasmClosure for dyn Fn($($var),*) -> R + 'static
where $($var: FromWasmAbi + 'static,)*
@@ -570,8 +570,13 @@ macro_rules! doit {
unsafe extern "C" fn invoke<$($var: FromWasmAbi,)* R: ReturnWasmAbi>(
a: usize,
b: usize,
- $($var: <$var as FromWasmAbi>::Abi),*
- ) -> <R as ReturnWasmAbi>::Abi {
+ $(
+ $arg1: <$var::Abi as WasmAbi>::Prim1,
+ $arg2: <$var::Abi as WasmAbi>::Prim2,
+ $arg3: <$var::Abi as WasmAbi>::Prim3,
+ $arg4: <$var::Abi as WasmAbi>::Prim4,
+ )*
+ ) -> WasmRet<R::Abi> {
if a == 0 {
throw_str("closure invoked after being dropped");
}
@@ -582,11 +587,11 @@ macro_rules! doit {
let f: *const dyn Fn($($var),*) -> R =
FatPtr { fields: (a, b) }.ptr;
$(
- let $var = <$var as FromWasmAbi>::from_abi($var);
+ let $var = <$var as FromWasmAbi>::from_abi($var::Abi::join($arg1, $arg2, $arg3, $arg4));
)*
(*f)($($var),*)
};
- ret.return_abi()
+ ret.return_abi().into()
}
inform(invoke::<$($var,)* R> as u32);
@@ -622,8 +627,13 @@ macro_rules! doit {
unsafe extern "C" fn invoke<$($var: FromWasmAbi,)* R: ReturnWasmAbi>(
a: usize,
b: usize,
- $($var: <$var as FromWasmAbi>::Abi),*
- ) -> <R as ReturnWasmAbi>::Abi {
+ $(
+ $arg1: <$var::Abi as WasmAbi>::Prim1,
+ $arg2: <$var::Abi as WasmAbi>::Prim2,
+ $arg3: <$var::Abi as WasmAbi>::Prim3,
+ $arg4: <$var::Abi as WasmAbi>::Prim4,
+ )*
+ ) -> WasmRet<R::Abi> {
if a == 0 {
throw_str("closure invoked recursively or after being dropped");
}
@@ -635,11 +645,11 @@ macro_rules! doit {
FatPtr { fields: (a, b) }.ptr;
let f = f as *mut dyn FnMut($($var),*) -> R;
$(
- let $var = <$var as FromWasmAbi>::from_abi($var);
+ let $var = <$var as FromWasmAbi>::from_abi($var::Abi::join($arg1, $arg2, $arg3, $arg4));
)*
(*f)($($var),*)
};
- ret.return_abi()
+ ret.return_abi().into()
}
inform(invoke::<$($var,)* R> as u32);
@@ -732,14 +742,14 @@ macro_rules! doit {
doit! {
()
- (A)
- (A B)
- (A B C)
- (A B C D)
- (A B C D E)
- (A B C D E F)
- (A B C D E F G)
- (A B C D E F G H)
+ (A a1 a2 a3 a4)
+ (A a1 a2 a3 a4 B b1 b2 b3 b4)
+ (A a1 a2 a3 a4 B b1 b2 b3 b4 C c1 c2 c3 c4)
+ (A a1 a2 a3 a4 B b1 b2 b3 b4 C c1 c2 c3 c4 D d1 d2 d3 d4)
+ (A a1 a2 a3 a4 B b1 b2 b3 b4 C c1 c2 c3 c4 D d1 d2 d3 d4 E e1 e2 e3 e4)
+ (A a1 a2 a3 a4 B b1 b2 b3 b4 C c1 c2 c3 c4 D d1 d2 d3 d4 E e1 e2 e3 e4 F f1 f2 f3 f4)
+ (A a1 a2 a3 a4 B b1 b2 b3 b4 C c1 c2 c3 c4 D d1 d2 d3 d4 E e1 e2 e3 e4 F f1 f2 f3 f4 G g1 g2 g3 g4)
+ (A a1 a2 a3 a4 B b1 b2 b3 b4 C c1 c2 c3 c4 D d1 d2 d3 d4 E e1 e2 e3 e4 F f1 f2 f3 f4 G g1 g2 g3 g4 H h1 h2 h3 h4)
}
// Copy the above impls down here for where there's only one argument and it's a
@@ -758,8 +768,11 @@ where
unsafe extern "C" fn invoke<A: RefFromWasmAbi, R: ReturnWasmAbi>(
a: usize,
b: usize,
- arg: <A as RefFromWasmAbi>::Abi,
- ) -> <R as ReturnWasmAbi>::Abi {
+ arg1: <A::Abi as WasmAbi>::Prim1,
+ arg2: <A::Abi as WasmAbi>::Prim2,
+ arg3: <A::Abi as WasmAbi>::Prim3,
+ arg4: <A::Abi as WasmAbi>::Prim4,
+ ) -> WasmRet<R::Abi> {
if a == 0 {
throw_str("closure invoked after being dropped");
}
@@ -768,10 +781,10 @@ where
// example)
let ret = {
let f: *const dyn Fn(&A) -> R = FatPtr { fields: (a, b) }.ptr;
- let arg = <A as RefFromWasmAbi>::ref_from_abi(arg);
+ let arg = <A as RefFromWasmAbi>::ref_from_abi(A::Abi::join(arg1, arg2, arg3, arg4));
(*f)(&*arg)
};
- ret.return_abi()
+ ret.return_abi().into()
}
inform(invoke::<A, R> as u32);
@@ -801,8 +814,11 @@ where
unsafe extern "C" fn invoke<A: RefFromWasmAbi, R: ReturnWasmAbi>(
a: usize,
b: usize,
- arg: <A as RefFromWasmAbi>::Abi,
- ) -> <R as ReturnWasmAbi>::Abi {
+ arg1: <A::Abi as WasmAbi>::Prim1,
+ arg2: <A::Abi as WasmAbi>::Prim2,
+ arg3: <A::Abi as WasmAbi>::Prim3,
+ arg4: <A::Abi as WasmAbi>::Prim4,
+ ) -> WasmRet<R::Abi> {
if a == 0 {
throw_str("closure invoked recursively or after being dropped");
}
@@ -812,10 +828,10 @@ where
let ret = {
let f: *const dyn FnMut(&A) -> R = FatPtr { fields: (a, b) }.ptr;
let f = f as *mut dyn FnMut(&A) -> R;
- let arg = <A as RefFromWasmAbi>::ref_from_abi(arg);
+ let arg = <A as RefFromWasmAbi>::ref_from_abi(A::Abi::join(arg1, arg2, arg3, arg4));
(*f)(&*arg)
};
- ret.return_abi()
+ ret.return_abi().into()
}
inform(invoke::<A, R> as u32);
diff --git a/vendor/wasm-bindgen/src/convert/closures.rs b/vendor/wasm-bindgen/src/convert/closures.rs
index 02527173d..8227a6b62 100644
--- a/vendor/wasm-bindgen/src/convert/closures.rs
+++ b/vendor/wasm-bindgen/src/convert/closures.rs
@@ -4,12 +4,12 @@ use core::mem;
use crate::convert::slices::WasmSlice;
use crate::convert::RefFromWasmAbi;
-use crate::convert::{FromWasmAbi, IntoWasmAbi, ReturnWasmAbi};
+use crate::convert::{FromWasmAbi, IntoWasmAbi, ReturnWasmAbi, WasmAbi, WasmRet};
use crate::describe::{inform, WasmDescribe, FUNCTION};
use crate::throw_str;
macro_rules! stack_closures {
- ($( ($cnt:tt $invoke:ident $invoke_mut:ident $($var:ident)*) )*) => ($(
+ ($( ($cnt:tt $invoke:ident $invoke_mut:ident $($var:ident $arg1:ident $arg2:ident $arg3:ident $arg4:ident)*) )*) => ($(
impl<'a, 'b, $($var,)* R> IntoWasmAbi for &'a (dyn Fn($($var),*) -> R + 'b)
where $($var: FromWasmAbi,)*
R: ReturnWasmAbi
@@ -28,8 +28,13 @@ macro_rules! stack_closures {
unsafe extern "C" fn $invoke<$($var: FromWasmAbi,)* R: ReturnWasmAbi>(
a: usize,
b: usize,
- $($var: <$var as FromWasmAbi>::Abi),*
- ) -> <R as ReturnWasmAbi>::Abi {
+ $(
+ $arg1: <$var::Abi as WasmAbi>::Prim1,
+ $arg2: <$var::Abi as WasmAbi>::Prim2,
+ $arg3: <$var::Abi as WasmAbi>::Prim3,
+ $arg4: <$var::Abi as WasmAbi>::Prim4,
+ )*
+ ) -> WasmRet<R::Abi> {
if a == 0 {
throw_str("closure invoked after being dropped");
}
@@ -38,11 +43,11 @@ macro_rules! stack_closures {
let ret = {
let f: &dyn Fn($($var),*) -> R = mem::transmute((a, b));
$(
- let $var = <$var as FromWasmAbi>::from_abi($var);
+ let $var = <$var as FromWasmAbi>::from_abi($var::Abi::join($arg1, $arg2, $arg3, $arg4));
)*
f($($var),*)
};
- ret.return_abi()
+ ret.return_abi().into()
}
impl<'a, $($var,)* R> WasmDescribe for dyn Fn($($var),*) -> R + 'a
@@ -77,8 +82,13 @@ macro_rules! stack_closures {
unsafe extern "C" fn $invoke_mut<$($var: FromWasmAbi,)* R: ReturnWasmAbi>(
a: usize,
b: usize,
- $($var: <$var as FromWasmAbi>::Abi),*
- ) -> <R as ReturnWasmAbi>::Abi {
+ $(
+ $arg1: <$var::Abi as WasmAbi>::Prim1,
+ $arg2: <$var::Abi as WasmAbi>::Prim2,
+ $arg3: <$var::Abi as WasmAbi>::Prim3,
+ $arg4: <$var::Abi as WasmAbi>::Prim4,
+ )*
+ ) -> WasmRet<R::Abi> {
if a == 0 {
throw_str("closure invoked recursively or after being dropped");
}
@@ -87,11 +97,11 @@ macro_rules! stack_closures {
let ret = {
let f: &mut dyn FnMut($($var),*) -> R = mem::transmute((a, b));
$(
- let $var = <$var as FromWasmAbi>::from_abi($var);
+ let $var = <$var as FromWasmAbi>::from_abi($var::Abi::join($arg1, $arg2, $arg3, $arg4));
)*
f($($var),*)
};
- ret.return_abi()
+ ret.return_abi().into()
}
impl<'a, $($var,)* R> WasmDescribe for dyn FnMut($($var),*) -> R + 'a
@@ -112,14 +122,14 @@ macro_rules! stack_closures {
stack_closures! {
(0 invoke0 invoke0_mut)
- (1 invoke1 invoke1_mut A)
- (2 invoke2 invoke2_mut A B)
- (3 invoke3 invoke3_mut A B C)
- (4 invoke4 invoke4_mut A B C D)
- (5 invoke5 invoke5_mut A B C D E)
- (6 invoke6 invoke6_mut A B C D E F)
- (7 invoke7 invoke7_mut A B C D E F G)
- (8 invoke8 invoke8_mut A B C D E F G H)
+ (1 invoke1 invoke1_mut A a1 a2 a3 a4)
+ (2 invoke2 invoke2_mut A a1 a2 a3 a4 B b1 b2 b3 b4)
+ (3 invoke3 invoke3_mut A a1 a2 a3 a4 B b1 b2 b3 b4 C c1 c2 c3 c4)
+ (4 invoke4 invoke4_mut A a1 a2 a3 a4 B b1 b2 b3 b4 C c1 c2 c3 c4 D d1 d2 d3 d4)
+ (5 invoke5 invoke5_mut A a1 a2 a3 a4 B b1 b2 b3 b4 C c1 c2 c3 c4 D d1 d2 d3 d4 E e1 e2 e3 e4)
+ (6 invoke6 invoke6_mut A a1 a2 a3 a4 B b1 b2 b3 b4 C c1 c2 c3 c4 D d1 d2 d3 d4 E e1 e2 e3 e4 F f1 f2 f3 f4)
+ (7 invoke7 invoke7_mut A a1 a2 a3 a4 B b1 b2 b3 b4 C c1 c2 c3 c4 D d1 d2 d3 d4 E e1 e2 e3 e4 F f1 f2 f3 f4 G g1 g2 g3 g4)
+ (8 invoke8 invoke8_mut A a1 a2 a3 a4 B b1 b2 b3 b4 C c1 c2 c3 c4 D d1 d2 d3 d4 E e1 e2 e3 e4 F f1 f2 f3 f4 G g1 g2 g3 g4 H h1 h2 h3 h4)
}
impl<'a, 'b, A, R> IntoWasmAbi for &'a (dyn Fn(&A) -> R + 'b)
@@ -144,8 +154,11 @@ where
unsafe extern "C" fn invoke1_ref<A: RefFromWasmAbi, R: ReturnWasmAbi>(
a: usize,
b: usize,
- arg: <A as RefFromWasmAbi>::Abi,
-) -> <R as ReturnWasmAbi>::Abi {
+ arg1: <A::Abi as WasmAbi>::Prim1,
+ arg2: <A::Abi as WasmAbi>::Prim2,
+ arg3: <A::Abi as WasmAbi>::Prim3,
+ arg4: <A::Abi as WasmAbi>::Prim4,
+) -> WasmRet<R::Abi> {
if a == 0 {
throw_str("closure invoked after being dropped");
}
@@ -153,10 +166,10 @@ unsafe extern "C" fn invoke1_ref<A: RefFromWasmAbi, R: ReturnWasmAbi>(
// ensure they're all destroyed as `return_abi` may throw
let ret = {
let f: &dyn Fn(&A) -> R = mem::transmute((a, b));
- let arg = <A as RefFromWasmAbi>::ref_from_abi(arg);
+ let arg = <A as RefFromWasmAbi>::ref_from_abi(A::Abi::join(arg1, arg2, arg3, arg4));
f(&*arg)
};
- ret.return_abi()
+ ret.return_abi().into()
}
impl<'a, A, R> WasmDescribe for dyn Fn(&A) -> R + 'a
@@ -196,8 +209,11 @@ where
unsafe extern "C" fn invoke1_mut_ref<A: RefFromWasmAbi, R: ReturnWasmAbi>(
a: usize,
b: usize,
- arg: <A as RefFromWasmAbi>::Abi,
-) -> <R as ReturnWasmAbi>::Abi {
+ arg1: <A::Abi as WasmAbi>::Prim1,
+ arg2: <A::Abi as WasmAbi>::Prim2,
+ arg3: <A::Abi as WasmAbi>::Prim3,
+ arg4: <A::Abi as WasmAbi>::Prim4,
+) -> WasmRet<R::Abi> {
if a == 0 {
throw_str("closure invoked recursively or after being dropped");
}
@@ -205,10 +221,10 @@ unsafe extern "C" fn invoke1_mut_ref<A: RefFromWasmAbi, R: ReturnWasmAbi>(
// ensure they're all destroyed as `return_abi` may throw
let ret = {
let f: &mut dyn FnMut(&A) -> R = mem::transmute((a, b));
- let arg = <A as RefFromWasmAbi>::ref_from_abi(arg);
+ let arg = <A as RefFromWasmAbi>::ref_from_abi(A::Abi::join(arg1, arg2, arg3, arg4));
f(&*arg)
};
- ret.return_abi()
+ ret.return_abi().into()
}
impl<'a, A, R> WasmDescribe for dyn FnMut(&A) -> R + 'a
diff --git a/vendor/wasm-bindgen/src/convert/impls.rs b/vendor/wasm-bindgen/src/convert/impls.rs
index e8636fe9e..8f1e37980 100644
--- a/vendor/wasm-bindgen/src/convert/impls.rs
+++ b/vendor/wasm-bindgen/src/convert/impls.rs
@@ -1,33 +1,65 @@
use core::char;
use core::mem::{self, ManuallyDrop};
-use crate::convert::traits::WasmAbi;
+use crate::convert::traits::{WasmAbi, WasmPrimitive};
+use crate::convert::TryFromJsValue;
use crate::convert::{FromWasmAbi, IntoWasmAbi, LongRefFromWasmAbi, RefFromWasmAbi};
use crate::convert::{OptionFromWasmAbi, OptionIntoWasmAbi, ReturnWasmAbi};
-use crate::{Clamped, JsError, JsValue};
+use crate::{Clamped, JsError, JsValue, UnwrapThrowExt};
-unsafe impl WasmAbi for () {}
+if_std! {
+ use std::boxed::Box;
+ use std::fmt::Debug;
+ use std::vec::Vec;
+}
+
+// Primitive types can always be passed over the ABI.
+impl<T: WasmPrimitive> WasmAbi for T {
+ type Prim1 = Self;
+ type Prim2 = ();
+ type Prim3 = ();
+ type Prim4 = ();
+
+ #[inline]
+ fn split(self) -> (Self, (), (), ()) {
+ (self, (), (), ())
+ }
-#[repr(C, u32)]
-pub enum WasmOption<T: WasmAbi> {
- None,
- Some(T),
+ #[inline]
+ fn join(prim: Self, _: (), _: (), _: ()) -> Self {
+ prim
+ }
}
-unsafe impl<T: WasmAbi> WasmAbi for WasmOption<T> {}
+impl<T: WasmAbi<Prim4 = ()>> WasmAbi for Option<T> {
+ /// Whether this `Option` is a `Some` value.
+ type Prim1 = u32;
+ type Prim2 = T::Prim1;
+ type Prim3 = T::Prim2;
+ type Prim4 = T::Prim3;
-impl<Abi: WasmAbi> WasmOption<Abi> {
- pub fn from_option<T: IntoWasmAbi<Abi = Abi>>(option: Option<T>) -> Self {
- match option {
- Some(v) => WasmOption::Some(v.into_abi()),
- None => WasmOption::None,
+ #[inline]
+ fn split(self) -> (u32, T::Prim1, T::Prim2, T::Prim3) {
+ match self {
+ None => (
+ 0,
+ Default::default(),
+ Default::default(),
+ Default::default(),
+ ),
+ Some(value) => {
+ let (prim1, prim2, prim3, ()) = value.split();
+ (1, prim1, prim2, prim3)
+ }
}
}
- pub unsafe fn into_option<T: FromWasmAbi<Abi = Abi>>(v: Self) -> Option<T> {
- match v {
- WasmOption::Some(v) => Some(T::from_abi(v)),
- WasmOption::None => None,
+ #[inline]
+ fn join(is_some: u32, prim1: T::Prim1, prim2: T::Prim2, prim3: T::Prim3) -> Self {
+ if is_some == 0 {
+ None
+ } else {
+ Some(T::join(prim1, prim2, prim3, ()))
}
}
}
@@ -49,20 +81,20 @@ macro_rules! type_wasm_native {
}
impl IntoWasmAbi for Option<$t> {
- type Abi = WasmOption<$c>;
+ type Abi = Option<$c>;
#[inline]
fn into_abi(self) -> Self::Abi {
- WasmOption::from_option(self.map(|v| v as $c))
+ self.map(|v| v as $c)
}
}
impl FromWasmAbi for Option<$t> {
- type Abi = WasmOption<$c>;
+ type Abi = Option<$c>;
#[inline]
unsafe fn from_abi(js: Self::Abi) -> Self {
- WasmOption::into_option(js).map(|v: $c| v as $t)
+ js.map(|v: $c| v as $t)
}
}
)*)
@@ -310,70 +342,53 @@ impl IntoWasmAbi for () {
}
}
-/// This is an encoding of a Result. It can only store things that can be decoded by the JS
-/// bindings.
-///
-/// At the moment, we do not write the exact struct packing layout of everything into the
-/// glue/descriptions of datatypes, so T cannot be arbitrary. The current requirements of the
-/// struct unpacker (StructUnpacker), which apply to ResultAbi<T> as a whole, are as follows:
-///
-/// - repr(C), of course
-/// - u32/i32/f32/f64 fields at the "leaf fields" of the "field tree"
-/// - layout equivalent to a completely flattened repr(C) struct, constructed by an in order
-/// traversal of all the leaf fields in it.
-///
-/// This means that you can't embed struct A(u32, f64) as struct B(u32, A); because the "completely
-/// flattened" struct AB(u32, u32, f64) would miss the 4 byte padding that is actually present
-/// within B and then as a consequence also miss the 4 byte padding within A that repr(C) inserts.
-///
-/// The enemy is padding. Padding is only required when there is an `f64` field. So the enemy is
-/// `f64` after anything else, particularly anything arbitrary. There is no smaller sized type, so
-/// we don't need to worry about 1-byte integers, etc. It's best, therefore, to place your f64s
-/// first in your structs, that's why we have `abi` first, although here it doesn't matter as the
-/// other two fields total 8 bytes anyway.
-///
-#[repr(C)]
-pub struct ResultAbi<T> {
- /// This field is the same size/align as `T`.
- abi: ResultAbiUnion<T>,
- /// Order of args here is such that we can pop() the possible error first, deal with it and
- /// move on. Later fields are popped off the stack first.
- err: u32,
- is_err: u32,
-}
+impl<T: WasmAbi<Prim3 = (), Prim4 = ()>> WasmAbi for Result<T, u32> {
+ type Prim1 = T::Prim1;
+ type Prim2 = T::Prim2;
+ // The order of primitives here is such that we can pop() the possible error
+ // first, deal with it and move on. Later primitives are popped off the
+ // stack first.
+ /// If this `Result` is an `Err`, the error value.
+ type Prim3 = u32;
+ /// Whether this `Result` is an `Err`.
+ type Prim4 = u32;
-#[repr(C)]
-pub union ResultAbiUnion<T> {
- // ManuallyDrop is #[repr(transparent)]
- ok: std::mem::ManuallyDrop<T>,
- err: (),
+ #[inline]
+ fn split(self) -> (T::Prim1, T::Prim2, u32, u32) {
+ match self {
+ Ok(value) => {
+ let (prim1, prim2, (), ()) = value.split();
+ (prim1, prim2, 0, 0)
+ }
+ Err(err) => (Default::default(), Default::default(), err, 1),
+ }
+ }
+
+ #[inline]
+ fn join(prim1: T::Prim1, prim2: T::Prim2, err: u32, is_err: u32) -> Self {
+ if is_err == 0 {
+ Ok(T::join(prim1, prim2, (), ()))
+ } else {
+ Err(err)
+ }
+ }
}
-unsafe impl<T: WasmAbi> WasmAbi for ResultAbi<T> {}
-unsafe impl<T: WasmAbi> WasmAbi for ResultAbiUnion<T> {}
+impl<T, E> ReturnWasmAbi for Result<T, E>
+where
+ T: IntoWasmAbi,
+ E: Into<JsValue>,
+ T::Abi: WasmAbi<Prim3 = (), Prim4 = ()>,
+{
+ type Abi = Result<T::Abi, u32>;
-impl<T: IntoWasmAbi, E: Into<JsValue>> ReturnWasmAbi for Result<T, E> {
- type Abi = ResultAbi<T::Abi>;
#[inline]
fn return_abi(self) -> Self::Abi {
match self {
- Ok(v) => {
- let abi = ResultAbiUnion {
- ok: std::mem::ManuallyDrop::new(v.into_abi()),
- };
- ResultAbi {
- abi,
- is_err: 0,
- err: 0,
- }
- }
+ Ok(v) => Ok(v.into_abi()),
Err(e) => {
let jsval = e.into();
- ResultAbi {
- abi: ResultAbiUnion { err: () },
- is_err: 1,
- err: jsval.into_abi(),
- }
+ Err(jsval.into_abi())
}
}
}
@@ -386,3 +401,37 @@ impl IntoWasmAbi for JsError {
self.value.into_abi()
}
}
+
+if_std! {
+ // Note: this can't take `&[T]` because the `Into<JsValue>` impl needs
+ // ownership of `T`.
+ pub fn js_value_vector_into_abi<T: Into<JsValue>>(vector: Box<[T]>) -> <Box<[JsValue]> as IntoWasmAbi>::Abi {
+ let js_vals: Box<[JsValue]> = vector
+ .into_vec()
+ .into_iter()
+ .map(|x| x.into())
+ .collect();
+
+ js_vals.into_abi()
+ }
+
+ pub unsafe fn js_value_vector_from_abi<T: TryFromJsValue>(js: <Box<[JsValue]> as FromWasmAbi>::Abi) -> Box<[T]> where T::Error: Debug {
+ let js_vals = <Vec<JsValue> as FromWasmAbi>::from_abi(js);
+
+ let mut result = Vec::with_capacity(js_vals.len());
+ for value in js_vals {
+ // We push elements one-by-one instead of using `collect` in order to improve
+ // error messages. When using `collect`, this `expect_throw` is buried in a
+ // giant chain of internal iterator functions, which results in the actual
+ // function that takes this `Vec` falling off the end of the call stack.
+ // So instead, make sure to call it directly within this function.
+ //
+ // This is only a problem in debug mode. Since this is the browser's error stack
+ // we're talking about, it can only see functions that actually make it to the
+ // final wasm binary (i.e., not inlined functions). All of those internal
+ // iterator functions get inlined in release mode, and so they don't show up.
+ result.push(T::try_from_js_value(value).expect_throw("array contains a value of the wrong type"));
+ }
+ result.into_boxed_slice()
+ }
+}
diff --git a/vendor/wasm-bindgen/src/convert/slices.rs b/vendor/wasm-bindgen/src/convert/slices.rs
index 40ea6edc7..b051e3814 100644
--- a/vendor/wasm-bindgen/src/convert/slices.rs
+++ b/vendor/wasm-bindgen/src/convert/slices.rs
@@ -10,20 +10,43 @@ use crate::convert::OptionIntoWasmAbi;
use crate::convert::{
FromWasmAbi, IntoWasmAbi, LongRefFromWasmAbi, RefFromWasmAbi, RefMutFromWasmAbi, WasmAbi,
};
+use crate::convert::{VectorFromWasmAbi, VectorIntoWasmAbi};
+use crate::describe::*;
use cfg_if::cfg_if;
if_std! {
use core::mem;
use crate::convert::OptionFromWasmAbi;
+ use crate::convert::{js_value_vector_from_abi, js_value_vector_into_abi};
}
+// note: `WasmAbi` types do not need to be FFI-safe themselves, it's just more
+// convenient to directly write `WasmSlice` in some of the manually-written FFI
+// functions in `lib.rs` rather than `WasmRet<WasmSlice>`.
#[repr(C)]
pub struct WasmSlice {
pub ptr: u32,
pub len: u32,
}
-unsafe impl WasmAbi for WasmSlice {}
+impl WasmAbi for WasmSlice {
+ /// `self.ptr`
+ type Prim1 = u32;
+ /// `self.len`
+ type Prim2 = u32;
+ type Prim3 = ();
+ type Prim4 = ();
+
+ #[inline]
+ fn split(self) -> (u32, u32, (), ()) {
+ (self.ptr, self.len, (), ())
+ }
+
+ #[inline]
+ fn join(ptr: u32, len: u32, _: (), _: ()) -> Self {
+ Self { ptr, len }
+ }
+}
#[inline]
fn null_slice() -> WasmSlice {
@@ -31,13 +54,33 @@ fn null_slice() -> WasmSlice {
}
if_std! {
- #[repr(C)]
pub struct WasmMutSlice {
pub slice: WasmSlice,
pub idx: u32,
}
- unsafe impl WasmAbi for WasmMutSlice {}
+ impl WasmAbi for WasmMutSlice {
+ /// `self.slice.ptr`
+ type Prim1 = u32;
+ /// `self.slice.len`
+ type Prim2 = u32;
+ /// `self.idx`
+ type Prim3 = u32;
+ type Prim4 = ();
+
+ #[inline]
+ fn split(self) -> (u32, u32, u32, ()) {
+ (self.slice.ptr, self.slice.len, self.idx, ())
+ }
+
+ #[inline]
+ fn join(ptr: u32, len: u32, idx: u32, _: ()) -> Self {
+ Self {
+ slice: WasmSlice { ptr, len },
+ idx,
+ }
+ }
+ }
/// The representation of a mutable slice passed from JS to Rust.
pub struct MutSlice<T> {
@@ -77,14 +120,21 @@ if_std! {
macro_rules! vectors {
($($t:ident)*) => ($(
if_std! {
- impl IntoWasmAbi for Box<[$t]> {
+ impl WasmDescribeVector for $t {
+ fn describe_vector() {
+ inform(VECTOR);
+ $t::describe();
+ }
+ }
+
+ impl VectorIntoWasmAbi for $t {
type Abi = WasmSlice;
#[inline]
- fn into_abi(self) -> WasmSlice {
- let ptr = self.as_ptr();
- let len = self.len();
- mem::forget(self);
+ fn vector_into_abi(vector: Box<[$t]>) -> WasmSlice {
+ let ptr = vector.as_ptr();
+ let len = vector.len();
+ mem::forget(vector);
WasmSlice {
ptr: ptr.into_abi(),
len: len as u32,
@@ -92,26 +142,16 @@ macro_rules! vectors {
}
}
- impl OptionIntoWasmAbi for Box<[$t]> {
- #[inline]
- fn none() -> WasmSlice { null_slice() }
- }
-
- impl FromWasmAbi for Box<[$t]> {
+ impl VectorFromWasmAbi for $t {
type Abi = WasmSlice;
#[inline]
- unsafe fn from_abi(js: WasmSlice) -> Self {
+ unsafe fn vector_from_abi(js: WasmSlice) -> Box<[$t]> {
let ptr = <*mut $t>::from_abi(js.ptr);
let len = js.len as usize;
Vec::from_raw_parts(ptr, len, len).into_boxed_slice()
}
}
-
- impl OptionFromWasmAbi for Box<[$t]> {
- #[inline]
- fn is_none(slice: &WasmSlice) -> bool { slice.ptr == 0 }
- }
}
impl<'a> IntoWasmAbi for &'a [$t] {
@@ -183,6 +223,39 @@ vectors! {
u8 i8 u16 i16 u32 i32 u64 i64 usize isize f32 f64
}
+if_std! {
+ impl WasmDescribeVector for String {
+ fn describe_vector() {
+ inform(VECTOR);
+ inform(NAMED_EXTERNREF);
+ // Trying to use an actual loop for this breaks the wasm interpreter.
+ inform(6);
+ inform('s' as u32);
+ inform('t' as u32);
+ inform('r' as u32);
+ inform('i' as u32);
+ inform('n' as u32);
+ inform('g' as u32);
+ }
+ }
+
+ impl VectorIntoWasmAbi for String {
+ type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi;
+
+ fn vector_into_abi(vector: Box<[Self]>) -> Self::Abi {
+ js_value_vector_into_abi(vector)
+ }
+ }
+
+ impl VectorFromWasmAbi for String {
+ type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi;
+
+ unsafe fn vector_from_abi(js: Self::Abi) -> Box<[Self]> {
+ js_value_vector_from_abi(js)
+ }
+ }
+}
+
cfg_if! {
if #[cfg(feature = "enable-interning")] {
#[inline]
@@ -300,14 +373,42 @@ impl LongRefFromWasmAbi for str {
if_std! {
use crate::JsValue;
- impl IntoWasmAbi for Box<[JsValue]> {
+ impl<T: VectorIntoWasmAbi> IntoWasmAbi for Box<[T]> {
+ type Abi = <T as VectorIntoWasmAbi>::Abi;
+
+ fn into_abi(self) -> Self::Abi {
+ T::vector_into_abi(self)
+ }
+ }
+
+ impl<T> OptionIntoWasmAbi for Box<[T]> where Self: IntoWasmAbi<Abi = WasmSlice> {
+ fn none() -> WasmSlice {
+ null_slice()
+ }
+ }
+
+ impl<T: VectorFromWasmAbi> FromWasmAbi for Box<[T]> {
+ type Abi = <T as VectorFromWasmAbi>::Abi;
+
+ unsafe fn from_abi(js: Self::Abi) -> Self {
+ T::vector_from_abi(js)
+ }
+ }
+
+ impl<T> OptionFromWasmAbi for Box<[T]> where Self: FromWasmAbi<Abi = WasmSlice> {
+ fn is_none(slice: &WasmSlice) -> bool {
+ slice.ptr == 0
+ }
+ }
+
+ impl VectorIntoWasmAbi for JsValue {
type Abi = WasmSlice;
#[inline]
- fn into_abi(self) -> WasmSlice {
- let ptr = self.as_ptr();
- let len = self.len();
- mem::forget(self);
+ fn vector_into_abi(vector: Box<[Self]>) -> WasmSlice {
+ let ptr = vector.as_ptr();
+ let len = vector.len();
+ mem::forget(vector);
WasmSlice {
ptr: ptr.into_abi(),
len: len as u32,
@@ -315,35 +416,25 @@ if_std! {
}
}
- impl OptionIntoWasmAbi for Box<[JsValue]> {
- #[inline]
- fn none() -> WasmSlice { null_slice() }
- }
-
- impl FromWasmAbi for Box<[JsValue]> {
+ impl VectorFromWasmAbi for JsValue {
type Abi = WasmSlice;
#[inline]
- unsafe fn from_abi(js: WasmSlice) -> Self {
+ unsafe fn vector_from_abi(js: WasmSlice) -> Box<[Self]> {
let ptr = <*mut JsValue>::from_abi(js.ptr);
let len = js.len as usize;
Vec::from_raw_parts(ptr, len, len).into_boxed_slice()
}
}
- impl OptionFromWasmAbi for Box<[JsValue]> {
- #[inline]
- fn is_none(slice: &WasmSlice) -> bool { slice.ptr == 0 }
- }
-
- impl<T> IntoWasmAbi for Box<[T]> where T: JsObject {
+ impl<T> VectorIntoWasmAbi for T where T: JsObject {
type Abi = WasmSlice;
#[inline]
- fn into_abi(self) -> WasmSlice {
- let ptr = self.as_ptr();
- let len = self.len();
- mem::forget(self);
+ fn vector_into_abi(vector: Box<[T]>) -> WasmSlice {
+ let ptr = vector.as_ptr();
+ let len = vector.len();
+ mem::forget(vector);
WasmSlice {
ptr: ptr.into_abi(),
len: len as u32,
@@ -351,25 +442,15 @@ if_std! {
}
}
- impl<T> OptionIntoWasmAbi for Box<[T]> where T: JsObject {
- #[inline]
- fn none() -> WasmSlice { null_slice() }
- }
-
- impl<T> FromWasmAbi for Box<[T]> where T: JsObject {
+ impl<T> VectorFromWasmAbi for T where T: JsObject {
type Abi = WasmSlice;
#[inline]
- unsafe fn from_abi(js: WasmSlice) -> Self {
+ unsafe fn vector_from_abi(js: WasmSlice) -> Box<[T]> {
let ptr = <*mut JsValue>::from_abi(js.ptr);
let len = js.len as usize;
let vec: Vec<T> = Vec::from_raw_parts(ptr, len, len).drain(..).map(|js_value| T::unchecked_from_js(js_value)).collect();
vec.into_boxed_slice()
}
}
-
- impl<T> OptionFromWasmAbi for Box<[T]> where T: JsObject {
- #[inline]
- fn is_none(slice: &WasmSlice) -> bool { slice.ptr == 0 }
- }
}
diff --git a/vendor/wasm-bindgen/src/convert/traits.rs b/vendor/wasm-bindgen/src/convert/traits.rs
index fe31aab63..a32598abc 100644
--- a/vendor/wasm-bindgen/src/convert/traits.rs
+++ b/vendor/wasm-bindgen/src/convert/traits.rs
@@ -2,6 +2,7 @@ use core::borrow::Borrow;
use core::ops::{Deref, DerefMut};
use crate::describe::*;
+use crate::JsValue;
/// A trait for anything that can be converted into a type that can cross the
/// wasm ABI directly, eg `u32` or `f64`.
@@ -117,22 +118,54 @@ pub trait OptionFromWasmAbi: FromWasmAbi {
fn is_none(abi: &Self::Abi) -> bool;
}
-/// An unsafe trait which represents types that are ABI-safe to pass via wasm
-/// arguments.
+/// A trait for any type which maps to a Wasm primitive type when used in FFI
+/// (`i32`, `i64`, `f32`, or `f64`).
+///
+/// This is with the exception of `()` (and other zero-sized types), which are
+/// also allowed because they're ignored: no arguments actually get added.
///
/// # Safety
///
-/// This is an unsafe trait to implement as there's no guarantee the type is
-/// actually safe to transfer across the was boundary, it's up to you to
-/// guarantee this, so codegen works correctly.
-pub unsafe trait WasmAbi {}
+/// This is an unsafe trait to implement as there's no guarantee the type
+/// actually maps to a primitive type.
+pub unsafe trait WasmPrimitive: Default {}
+
+unsafe impl WasmPrimitive for u32 {}
+unsafe impl WasmPrimitive for i32 {}
+unsafe impl WasmPrimitive for u64 {}
+unsafe impl WasmPrimitive for i64 {}
+unsafe impl WasmPrimitive for f32 {}
+unsafe impl WasmPrimitive for f64 {}
+unsafe impl WasmPrimitive for () {}
+
+/// A trait which represents types that can be passed across the Wasm ABI
+/// boundary, by being split into multiple Wasm primitive types.
+///
+/// Up to 4 primitives are supported; if you don't want to use all of them, you
+/// can set the rest to `()`, which will cause them to be ignored.
+///
+/// You need to be careful how many primitives you use, however:
+/// `Result<T, JsValue>` uses up 2 primitives to store the error, and so it
+/// doesn't work if `T` uses more than 2 primitives.
+///
+/// So, if you're adding support for a type that needs 3 or more primitives and
+/// is able to be returned, you have to add another primitive here.
+///
+/// There's already one type that uses 3 primitives: `&mut [T]`. However, it
+/// can't be returned anyway, so it doesn't matter that
+/// `Result<&mut [T], JsValue>` wouldn't work.
+pub trait WasmAbi {
+ type Prim1: WasmPrimitive;
+ type Prim2: WasmPrimitive;
+ type Prim3: WasmPrimitive;
+ type Prim4: WasmPrimitive;
-unsafe impl WasmAbi for u32 {}
-unsafe impl WasmAbi for i32 {}
-unsafe impl WasmAbi for u64 {}
-unsafe impl WasmAbi for i64 {}
-unsafe impl WasmAbi for f32 {}
-unsafe impl WasmAbi for f64 {}
+ /// Splits this type up into primitives to be sent over the ABI.
+ fn split(self) -> (Self::Prim1, Self::Prim2, Self::Prim3, Self::Prim4);
+ /// Reconstructs this type from primitives received over the ABI.
+ fn join(prim1: Self::Prim1, prim2: Self::Prim2, prim3: Self::Prim3, prim4: Self::Prim4)
+ -> Self;
+}
/// A trait representing how to interpret the return value of a function for
/// the wasm ABI.
@@ -158,3 +191,77 @@ impl<T: IntoWasmAbi> ReturnWasmAbi for T {
self.into_abi()
}
}
+
+if_std! {
+ use core::marker::Sized;
+ use std::boxed::Box;
+
+ /// Trait for element types to implement IntoWasmAbi for vectors of
+ /// themselves.
+ pub trait VectorIntoWasmAbi: WasmDescribeVector + Sized {
+ type Abi: WasmAbi;
+
+ fn vector_into_abi(vector: Box<[Self]>) -> Self::Abi;
+ }
+
+ /// Trait for element types to implement FromWasmAbi for vectors of
+ /// themselves.
+ pub trait VectorFromWasmAbi: WasmDescribeVector + Sized {
+ type Abi: WasmAbi;
+
+ unsafe fn vector_from_abi(js: Self::Abi) -> Box<[Self]>;
+ }
+}
+
+/// A repr(C) struct containing all of the primitives of a `WasmAbi` type, in
+/// order.
+///
+/// This is used as the return type of imported/exported functions. `WasmAbi`
+/// types aren't guaranteed to be FFI-safe, so we can't return them directly:
+/// instead we return this.
+///
+/// If all but one of the primitives is `()`, this corresponds to returning the
+/// remaining primitive directly, otherwise a return pointer is used.
+#[repr(C)]
+pub struct WasmRet<T: WasmAbi> {
+ prim1: T::Prim1,
+ prim2: T::Prim2,
+ prim3: T::Prim3,
+ prim4: T::Prim4,
+}
+
+impl<T: WasmAbi> From<T> for WasmRet<T> {
+ fn from(value: T) -> Self {
+ let (prim1, prim2, prim3, prim4) = value.split();
+ Self {
+ prim1,
+ prim2,
+ prim3,
+ prim4,
+ }
+ }
+}
+
+// Ideally this'd just be an `Into<T>` implementation, but unfortunately that
+// doesn't work because of the orphan rule.
+impl<T: WasmAbi> WasmRet<T> {
+ /// Joins the components of this `WasmRet` back into the type they represent.
+ pub fn join(self) -> T {
+ T::join(self.prim1, self.prim2, self.prim3, self.prim4)
+ }
+}
+
+/// [`TryFromJsValue`] is a trait for converting a JavaScript value ([`JsValue`])
+/// into a Rust type. It is used by the [`wasm_bindgen`](wasm_bindgen_macro::wasm_bindgen)
+/// proc-macro to allow conversion to user types.
+///
+/// Types implementing this trait must specify their conversion logic from
+/// [`JsValue`] to the Rust type, handling any potential errors that may occur
+/// during the conversion process.
+pub trait TryFromJsValue: Sized {
+ /// The type returned in the event of a conversion error.
+ type Error;
+
+ /// Performs the conversion.
+ fn try_from_js_value(value: JsValue) -> Result<Self, Self::Error>;
+}
diff --git a/vendor/wasm-bindgen/src/describe.rs b/vendor/wasm-bindgen/src/describe.rs
index be149d7a9..d3b5fd0b5 100644
--- a/vendor/wasm-bindgen/src/describe.rs
+++ b/vendor/wasm-bindgen/src/describe.rs
@@ -3,7 +3,7 @@
#![doc(hidden)]
-use crate::{Clamped, JsError, JsValue};
+use crate::{Clamped, JsError, JsObject, JsValue};
use cfg_if::cfg_if;
macro_rules! tys {
@@ -57,6 +57,12 @@ pub trait WasmDescribe {
fn describe();
}
+/// Trait for element types to implement WasmDescribe for vectors of
+/// themselves.
+pub trait WasmDescribeVector {
+ fn describe_vector();
+}
+
macro_rules! simple {
($($t:ident => $d:ident)*) => ($(
impl WasmDescribe for $t {
@@ -98,13 +104,13 @@ cfg_if! {
impl<T> WasmDescribe for *const T {
fn describe() {
- inform(I32)
+ inform(U32)
}
}
impl<T> WasmDescribe for *mut T {
fn describe() {
- inform(I32)
+ inform(U32)
}
}
@@ -145,13 +151,26 @@ if_std! {
}
}
- impl<T: WasmDescribe> WasmDescribe for Box<[T]> {
- fn describe() {
+ impl WasmDescribeVector for JsValue {
+ fn describe_vector() {
+ inform(VECTOR);
+ JsValue::describe();
+ }
+ }
+
+ impl<T: JsObject> WasmDescribeVector for T {
+ fn describe_vector() {
inform(VECTOR);
T::describe();
}
}
+ impl<T: WasmDescribeVector> WasmDescribe for Box<[T]> {
+ fn describe() {
+ T::describe_vector();
+ }
+ }
+
impl<T> WasmDescribe for Vec<T> where Box<[T]>: WasmDescribe {
fn describe() {
<Box<[T]>>::describe();
diff --git a/vendor/wasm-bindgen/src/externref.rs b/vendor/wasm-bindgen/src/externref.rs
index 340fdcbeb..7eeb72379 100644
--- a/vendor/wasm-bindgen/src/externref.rs
+++ b/vendor/wasm-bindgen/src/externref.rs
@@ -1,8 +1,5 @@
use crate::JsValue;
-use std::alloc::{self, Layout};
use std::cell::Cell;
-use std::mem;
-use std::ptr;
use std::slice;
use std::vec::Vec;
use std::cmp::max;
@@ -46,23 +43,8 @@ impl Slab {
internal_error("someone else allocated table entries?")
}
- // poor man's `try_reserve_exact` until that's stable
- unsafe {
- let new_cap = self.data.capacity() + extra;
- let size = mem::size_of::<usize>() * new_cap;
- let align = mem::align_of::<usize>();
- let layout = match Layout::from_size_align(size, align) {
- Ok(l) => l,
- Err(_) => internal_error("size/align layout failure"),
- };
- let ptr = alloc::alloc(layout) as *mut usize;
- if ptr.is_null() {
- internal_error("allocation failure");
- }
- ptr::copy_nonoverlapping(self.data.as_ptr(), ptr, self.data.len());
- let new_vec = Vec::from_raw_parts(ptr, self.data.len(), new_cap);
- let mut old = mem::replace(&mut self.data, new_vec);
- old.set_len(0);
+ if self.data.try_reserve_exact(extra).is_err() {
+ internal_error("allocation failure");
}
}
diff --git a/vendor/wasm-bindgen/src/lib.rs b/vendor/wasm-bindgen/src/lib.rs
index fd2feae6f..f38d6a3e2 100644
--- a/vendor/wasm-bindgen/src/lib.rs
+++ b/vendor/wasm-bindgen/src/lib.rs
@@ -18,7 +18,7 @@ use core::ops::{
};
use core::u32;
-use crate::convert::{FromWasmAbi, WasmSlice};
+use crate::convert::{FromWasmAbi, TryFromJsValue, WasmRet, WasmSlice};
macro_rules! if_std {
($($i:item)*) => ($(
@@ -28,14 +28,14 @@ macro_rules! if_std {
macro_rules! externs {
($(#[$attr:meta])* extern "C" { $(fn $name:ident($($args:tt)*) -> $ret:ty;)* }) => (
- #[cfg(all(target_arch = "wasm32", not(target_os = "emscripten")))]
+ #[cfg(all(target_arch = "wasm32", not(any(target_os = "emscripten", target_os = "wasi"))))]
$(#[$attr])*
extern "C" {
$(fn $name($($args)*) -> $ret;)*
}
$(
- #[cfg(not(all(target_arch = "wasm32", not(target_os = "emscripten"))))]
+ #[cfg(not(all(target_arch = "wasm32", not(any(target_os = "emscripten", target_os = "wasi")))))]
#[allow(unused_variables)]
unsafe extern fn $name($($args)*) -> $ret {
panic!("function not implemented on non-wasm32 targets")
@@ -71,7 +71,6 @@ pub mod describe;
mod cast;
pub use crate::cast::{JsCast, JsObject};
-use convert::WasmOption;
if_std! {
extern crate std;
@@ -265,7 +264,7 @@ impl JsValue {
/// `None`.
#[inline]
pub fn as_f64(&self) -> Option<f64> {
- unsafe { FromWasmAbi::from_abi(__wbindgen_number_get(self.idx)) }
+ unsafe { __wbindgen_number_get(self.idx).join() }
}
/// Tests whether this JS value is a JS string.
@@ -805,6 +804,28 @@ if_std! {
JsValue::from_str(&s)
}
}
+
+ impl TryFrom<JsValue> for String {
+ type Error = JsValue;
+
+ fn try_from(value: JsValue) -> Result<Self, Self::Error> {
+ match value.as_string() {
+ Some(s) => Ok(s),
+ None => Err(value),
+ }
+ }
+ }
+
+ impl TryFromJsValue for String {
+ type Error = JsValue;
+
+ fn try_from_js_value(value: JsValue) -> Result<Self, Self::Error> {
+ match value.as_string() {
+ Some(s) => Ok(s),
+ None => Err(value),
+ }
+ }
+ }
}
impl From<bool> for JsValue {
@@ -899,7 +920,7 @@ macro_rules! big_numbers {
}
fn bigint_get_as_i64(v: &JsValue) -> Option<i64> {
- unsafe { Option::from_abi(__wbindgen_bigint_get_as_i64(v.idx)) }
+ unsafe { __wbindgen_bigint_get_as_i64(v.idx).join() }
}
macro_rules! try_from_for_num64 {
@@ -1046,10 +1067,10 @@ externs! {
fn __wbindgen_ge(a: u32, b: u32) -> u32;
fn __wbindgen_gt(a: u32, b: u32) -> u32;
- fn __wbindgen_number_get(idx: u32) -> WasmOption<f64>;
+ fn __wbindgen_number_get(idx: u32) -> WasmRet<Option<f64>>;
fn __wbindgen_boolean_get(idx: u32) -> u32;
fn __wbindgen_string_get(idx: u32) -> WasmSlice;
- fn __wbindgen_bigint_get_as_i64(idx: u32) -> WasmOption<i64>;
+ fn __wbindgen_bigint_get_as_i64(idx: u32) -> WasmRet<Option<i64>>;
fn __wbindgen_debug_string(ret: *mut [usize; 2], idx: u32) -> ();
@@ -1324,7 +1345,10 @@ pub trait UnwrapThrowExt<T>: Sized {
impl<T> UnwrapThrowExt<T> for Option<T> {
#[cfg_attr(debug_assertions, track_caller)]
fn expect_throw(self, message: &str) -> T {
- if cfg!(all(target_arch = "wasm32", not(target_os = "emscripten"))) {
+ if cfg!(all(
+ target_arch = "wasm32",
+ not(any(target_os = "emscripten", target_os = "wasi"))
+ )) {
match self {
Some(val) => val,
None => throw_str(message),
@@ -1341,7 +1365,10 @@ where
{
#[cfg_attr(debug_assertions, track_caller)]
fn expect_throw(self, message: &str) -> T {
- if cfg!(all(target_arch = "wasm32", not(target_os = "emscripten"))) {
+ if cfg!(all(
+ target_arch = "wasm32",
+ not(any(target_os = "emscripten", target_os = "wasi"))
+ )) {
match self {
Ok(val) => val,
Err(_) => throw_str(message),
@@ -1352,13 +1379,9 @@ where
}
}
-/// Returns a handle to this wasm instance's `WebAssembly.Module`
-///
-/// Note that this is only available when the final wasm app is built with
-/// `--target no-modules`, it's not recommended to rely on this API yet! This is
-/// largely just an experimental addition to enable threading demos. Using this
-/// may prevent your wasm module from building down the road.
-#[doc(hidden)]
+/// Returns a handle to this Wasm instance's `WebAssembly.Module`.
+/// This is only available when the final Wasm app is built with
+/// `--target no-modules` or `--target web`.
pub fn module() -> JsValue {
unsafe { JsValue::_new(__wbindgen_module()) }
}
diff --git a/vendor/wasm-bindgen/tests/wasm/enum_vecs.js b/vendor/wasm-bindgen/tests/wasm/enum_vecs.js
new file mode 100644
index 000000000..bef43b3e4
--- /dev/null
+++ b/vendor/wasm-bindgen/tests/wasm/enum_vecs.js
@@ -0,0 +1,23 @@
+const wasm = require('wasm-bindgen-test.js');
+const assert = require('assert');
+
+exports.pass_enum_vec = () => {
+ const el1 = wasm.EnumArrayElement.Unit;
+ const el2 = wasm.EnumArrayElement.Unit;
+ const ret = wasm.consume_enum_vec([el1, el2]);
+ assert.strictEqual(ret.length, 3);
+
+ const ret2 = wasm.consume_optional_enum_vec(ret);
+ assert.strictEqual(ret2.length, 4);
+
+ assert.strictEqual(wasm.consume_optional_enum_vec(undefined), undefined);
+};
+
+exports.pass_invalid_enum_vec = () => {
+ try {
+ wasm.consume_enum_vec(['not an enum value']);
+ } catch (e) {
+ assert.match(e.message, /invalid enum value passed/)
+ assert.match(e.stack, /consume_enum_vec/)
+ }
+};
diff --git a/vendor/wasm-bindgen/tests/wasm/enum_vecs.rs b/vendor/wasm-bindgen/tests/wasm/enum_vecs.rs
new file mode 100644
index 000000000..7b6e6bcaf
--- /dev/null
+++ b/vendor/wasm-bindgen/tests/wasm/enum_vecs.rs
@@ -0,0 +1,36 @@
+use wasm_bindgen::prelude::*;
+use wasm_bindgen_test::*;
+
+#[wasm_bindgen(module = "tests/wasm/enum_vecs.js")]
+extern "C" {
+ fn pass_enum_vec();
+ fn pass_invalid_enum_vec();
+}
+
+#[wasm_bindgen]
+pub enum EnumArrayElement {
+ Unit,
+}
+
+#[wasm_bindgen]
+pub fn consume_enum_vec(mut vec: Vec<EnumArrayElement>) -> Vec<EnumArrayElement> {
+ vec.push(EnumArrayElement::Unit);
+ vec
+}
+
+#[wasm_bindgen]
+pub fn consume_optional_enum_vec(
+ vec: Option<Vec<EnumArrayElement>>,
+) -> Option<Vec<EnumArrayElement>> {
+ vec.map(consume_enum_vec)
+}
+
+#[wasm_bindgen_test]
+fn test_valid() {
+ pass_enum_vec();
+}
+
+#[wasm_bindgen_test]
+fn test_invalid() {
+ pass_invalid_enum_vec();
+}
diff --git a/vendor/wasm-bindgen/tests/wasm/enums.js b/vendor/wasm-bindgen/tests/wasm/enums.js
index 640597dac..466f9f85b 100644
--- a/vendor/wasm-bindgen/tests/wasm/enums.js
+++ b/vendor/wasm-bindgen/tests/wasm/enums.js
@@ -38,3 +38,7 @@ exports.js_expect_enum_none = a => {
exports.js_renamed_enum = b => {
assert.strictEqual(wasm.JsRenamedEnum.B, b);
};
+
+exports.js_enum_with_error_variant = () => {
+ assert.strictEqual(wasm.EnumWithErrorVariant.Error, 2);
+};
diff --git a/vendor/wasm-bindgen/tests/wasm/enums.rs b/vendor/wasm-bindgen/tests/wasm/enums.rs
index 959a3e271..7c652273b 100644
--- a/vendor/wasm-bindgen/tests/wasm/enums.rs
+++ b/vendor/wasm-bindgen/tests/wasm/enums.rs
@@ -10,6 +10,7 @@ extern "C" {
fn js_expect_enum(x: Color, y: Option<Color>);
fn js_expect_enum_none(x: Option<Color>);
fn js_renamed_enum(b: RenamedEnum);
+ fn js_enum_with_error_variant();
}
#[wasm_bindgen]
@@ -71,6 +72,14 @@ pub fn handle_optional_enums(x: Option<Color>) -> Option<Color> {
x
}
+#[wasm_bindgen]
+#[derive(Copy, Clone)]
+pub enum EnumWithErrorVariant {
+ OK,
+ Warning,
+ Error,
+}
+
#[wasm_bindgen_test]
fn test_optional_enums() {
use self::Color::*;
@@ -95,3 +104,8 @@ fn test_optional_enum_values() {
fn test_renamed_enum() {
js_renamed_enum(RenamedEnum::B);
}
+
+#[wasm_bindgen_test]
+fn test_enum_with_error_variant() {
+ js_enum_with_error_variant();
+}
diff --git a/vendor/wasm-bindgen/tests/wasm/getters_and_setters.rs b/vendor/wasm-bindgen/tests/wasm/getters_and_setters.rs
index 7425fc23e..8c8411983 100644
--- a/vendor/wasm-bindgen/tests/wasm/getters_and_setters.rs
+++ b/vendor/wasm-bindgen/tests/wasm/getters_and_setters.rs
@@ -20,6 +20,8 @@ extern "C" {
fn _12_js(rules: Rules) -> Rules;
fn _13_js(rules: Rules) -> Rules;
+ fn raw_identifer(rules: RulesWithRawField) -> RulesWithRawField;
+
fn test_getter_compute(x: GetterCompute);
fn test_setter_compute(x: SetterCompute);
fn test_statics(x: Statics);
@@ -33,6 +35,23 @@ pub struct Rules {
}
#[wasm_bindgen]
+pub struct RulesWithRawField {
+ pub r#mod: i32,
+}
+
+#[wasm_bindgen]
+impl RulesWithRawField {
+ #[wasm_bindgen]
+ pub fn get_field_value(&self) -> i32 {
+ self.r#mod
+ }
+ #[wasm_bindgen]
+ pub fn set_field_value(&mut self, value: i32) {
+ self.r#mod = value;
+ }
+}
+
+#[wasm_bindgen]
#[allow(non_snake_case)]
impl Rules {
#[wasm_bindgen]
diff --git a/vendor/wasm-bindgen/tests/wasm/ignore.rs b/vendor/wasm-bindgen/tests/wasm/ignore.rs
new file mode 100644
index 000000000..39897e31b
--- /dev/null
+++ b/vendor/wasm-bindgen/tests/wasm/ignore.rs
@@ -0,0 +1,11 @@
+#[wasm_bindgen_test]
+#[ignore]
+fn should_panic() {
+ panic!()
+}
+
+#[wasm_bindgen_test]
+#[ignore = "reason"]
+fn should_panic_string() {
+ panic!()
+}
diff --git a/vendor/wasm-bindgen/tests/wasm/macro_rules.rs b/vendor/wasm-bindgen/tests/wasm/macro_rules.rs
new file mode 100644
index 000000000..42c4b2a1d
--- /dev/null
+++ b/vendor/wasm-bindgen/tests/wasm/macro_rules.rs
@@ -0,0 +1,12 @@
+//! This tests that the `wasm_bindgen` macro produces code that compiles for this use case.
+//! `cargo test --target wasm32-unknown-unknown` will not run if this test breaks.
+use wasm_bindgen::prelude::*;
+
+macro_rules! my_export {
+ ($i: ident, $s: ty) => {
+ #[wasm_bindgen]
+ pub fn $i(_: $s) {}
+ };
+}
+
+my_export!(should_compile, &[i32]);
diff --git a/vendor/wasm-bindgen/tests/wasm/main.rs b/vendor/wasm-bindgen/tests/wasm/main.rs
index 508a9ea1f..72bb5c414 100644
--- a/vendor/wasm-bindgen/tests/wasm/main.rs
+++ b/vendor/wasm-bindgen/tests/wasm/main.rs
@@ -23,6 +23,7 @@ pub mod closures;
pub mod comments;
pub mod duplicate_deps;
pub mod duplicates;
+pub mod enum_vecs;
pub mod enums;
#[path = "final.rs"]
pub mod final_;
@@ -35,6 +36,7 @@ pub mod js_keywords;
pub mod js_objects;
pub mod jscast;
pub mod link_to;
+pub mod macro_rules;
pub mod math;
pub mod no_shims;
pub mod node;
@@ -46,6 +48,8 @@ pub mod result_jserror;
pub mod rethrow;
pub mod simple;
pub mod slice;
+pub mod string_vecs;
+pub mod struct_vecs;
pub mod structural;
pub mod truthy_falsy;
pub mod usize;
diff --git a/vendor/wasm-bindgen/tests/wasm/node.js b/vendor/wasm-bindgen/tests/wasm/node.js
index 41baa8b24..b38656731 100644
--- a/vendor/wasm-bindgen/tests/wasm/node.js
+++ b/vendor/wasm-bindgen/tests/wasm/node.js
@@ -24,14 +24,14 @@ exports.test_works = function() {
assert.strictEqual(r2.add(2), 13);
r2.free();
- assert.strictEqual(wasm.Color.Green, 0);
- assert.strictEqual(wasm.Color.Yellow, 1);
- assert.strictEqual(wasm.Color.Red, 2);
- assert.strictEqual(wasm.Color[0], 'Green');
- assert.strictEqual(wasm.Color[1], 'Yellow');
- assert.strictEqual(wasm.Color[2], 'Red');
- assert.strictEqual(Object.keys(wasm.Color).length, 6);
- assert.strictEqual(wasm.cycle(wasm.Color.Green), wasm.Color.Yellow);
+ assert.strictEqual(wasm.NodeColor.Green, 0);
+ assert.strictEqual(wasm.NodeColor.Yellow, 1);
+ assert.strictEqual(wasm.NodeColor.Red, 2);
+ assert.strictEqual(wasm.NodeColor[0], 'Green');
+ assert.strictEqual(wasm.NodeColor[1], 'Yellow');
+ assert.strictEqual(wasm.NodeColor[2], 'Red');
+ assert.strictEqual(Object.keys(wasm.NodeColor).length, 6);
+ assert.strictEqual(wasm.cycle(wasm.NodeColor.Green), wasm.NodeColor.Yellow);
wasm.node_math(1.0, 2.0);
};
diff --git a/vendor/wasm-bindgen/tests/wasm/node.rs b/vendor/wasm-bindgen/tests/wasm/node.rs
index 742dbcfb5..8f57e1731 100644
--- a/vendor/wasm-bindgen/tests/wasm/node.rs
+++ b/vendor/wasm-bindgen/tests/wasm/node.rs
@@ -34,18 +34,19 @@ impl Foo {
}
}
+// Use a different name to avoid a collision with the `Color` enum in enums.rs when --no-modules is used.
#[wasm_bindgen]
-pub enum Color {
+pub enum NodeColor {
Green,
Yellow,
Red,
}
#[wasm_bindgen]
-pub fn cycle(color: Color) -> Color {
+pub fn cycle(color: NodeColor) -> NodeColor {
match color {
- Color::Green => Color::Yellow,
- Color::Yellow => Color::Red,
- Color::Red => Color::Green,
+ NodeColor::Green => NodeColor::Yellow,
+ NodeColor::Yellow => NodeColor::Red,
+ NodeColor::Red => NodeColor::Green,
}
}
diff --git a/vendor/wasm-bindgen/tests/wasm/slice.js b/vendor/wasm-bindgen/tests/wasm/slice.js
index c23535e9b..3e65dfc52 100644
--- a/vendor/wasm-bindgen/tests/wasm/slice.js
+++ b/vendor/wasm-bindgen/tests/wasm/slice.js
@@ -6,39 +6,60 @@ exports.js_export = () => {
i8[0] = 1;
i8[1] = 2;
assert.deepStrictEqual(wasm.export_i8(i8), i8);
+ assert.deepStrictEqual(wasm.export_optional_i8(i8), i8);
const u8 = new Uint8Array(2);
u8[0] = 1;
u8[1] = 2;
assert.deepStrictEqual(wasm.export_u8(u8), u8);
+ assert.deepStrictEqual(wasm.export_optional_u8(u8), u8);
const i16 = new Int16Array(2);
i16[0] = 1;
i16[1] = 2;
assert.deepStrictEqual(wasm.export_i16(i16), i16);
+ assert.deepStrictEqual(wasm.export_optional_i16(i16), i16);
const u16 = new Uint16Array(2);
u16[0] = 1;
u16[1] = 2;
assert.deepStrictEqual(wasm.export_u16(u16), u16);
+ assert.deepStrictEqual(wasm.export_optional_u16(u16), u16);
const i32 = new Int32Array(2);
i32[0] = 1;
i32[1] = 2;
assert.deepStrictEqual(wasm.export_i32(i32), i32);
+ assert.deepStrictEqual(wasm.export_optional_i32(i32), i32);
assert.deepStrictEqual(wasm.export_isize(i32), i32);
+ assert.deepStrictEqual(wasm.export_optional_isize(i32), i32);
const u32 = new Uint32Array(2);
u32[0] = 1;
u32[1] = 2;
assert.deepStrictEqual(wasm.export_u32(u32), u32);
+ assert.deepStrictEqual(wasm.export_optional_u32(u32), u32);
assert.deepStrictEqual(wasm.export_usize(u32), u32);
+ assert.deepStrictEqual(wasm.export_optional_usize(u32), u32);
const f32 = new Float32Array(2);
f32[0] = 1;
f32[1] = 2;
assert.deepStrictEqual(wasm.export_f32(f32), f32);
+ assert.deepStrictEqual(wasm.export_optional_f32(f32), f32);
const f64 = new Float64Array(2);
f64[0] = 1;
f64[1] = 2;
assert.deepStrictEqual(wasm.export_f64(f64), f64);
+ assert.deepStrictEqual(wasm.export_optional_f64(f64), f64);
+
+ assert.strictEqual(wasm.export_optional_i8(undefined), undefined);
+ assert.strictEqual(wasm.export_optional_u8(undefined), undefined);
+ assert.strictEqual(wasm.export_optional_i16(undefined), undefined);
+ assert.strictEqual(wasm.export_optional_u16(undefined), undefined);
+ assert.strictEqual(wasm.export_optional_i32(undefined), undefined);
+ assert.strictEqual(wasm.export_optional_isize(undefined), undefined);
+ assert.strictEqual(wasm.export_optional_u32(undefined), undefined);
+ assert.strictEqual(wasm.export_optional_usize(undefined), undefined);
+ assert.strictEqual(wasm.export_optional_f32(undefined), undefined);
+ assert.strictEqual(wasm.export_optional_f64(undefined), undefined);
};
const test_import = (a, b, c) => {
diff --git a/vendor/wasm-bindgen/tests/wasm/slice.rs b/vendor/wasm-bindgen/tests/wasm/slice.rs
index 6e659ce6f..9f9066fe7 100644
--- a/vendor/wasm-bindgen/tests/wasm/slice.rs
+++ b/vendor/wasm-bindgen/tests/wasm/slice.rs
@@ -22,7 +22,7 @@ extern "C" {
}
macro_rules! export_macro {
- ($(($i:ident, $n:ident))*) => ($(
+ ($(($i:ident, $n:ident, $optional_n:ident))*) => ($(
#[wasm_bindgen]
pub fn $n(a: &[$i]) -> Vec<$i> {
assert_eq!(a.len(), 2);
@@ -30,20 +30,30 @@ macro_rules! export_macro {
assert_eq!(a[1], 2 as $i);
a.to_vec()
}
+
+ #[wasm_bindgen]
+ pub fn $optional_n(a: Option<Vec<$i>>) -> Option<Vec<$i>> {
+ a.map(|a| {
+ assert_eq!(a.len(), 2);
+ assert_eq!(a[0], 1 as $i);
+ assert_eq!(a[1], 2 as $i);
+ a.to_vec()
+ })
+ }
)*)
}
export_macro! {
- (i8, export_i8)
- (u8, export_u8)
- (i16, export_i16)
- (u16, export_u16)
- (i32, export_i32)
- (u32, export_u32)
- (isize, export_isize)
- (usize, export_usize)
- (f32, export_f32)
- (f64, export_f64)
+ (i8, export_i8, export_optional_i8)
+ (u8, export_u8, export_optional_u8)
+ (i16, export_i16, export_optional_i16)
+ (u16, export_u16, export_optional_u16)
+ (i32, export_i32, export_optional_i32)
+ (u32, export_u32, export_optional_u32)
+ (isize, export_isize, export_optional_isize)
+ (usize, export_usize, export_optional_usize)
+ (f32, export_f32, export_optional_f32)
+ (f64, export_f64, export_optional_f64)
}
#[wasm_bindgen_test]
diff --git a/vendor/wasm-bindgen/tests/wasm/string_vecs.js b/vendor/wasm-bindgen/tests/wasm/string_vecs.js
new file mode 100644
index 000000000..de9b0ef58
--- /dev/null
+++ b/vendor/wasm-bindgen/tests/wasm/string_vecs.js
@@ -0,0 +1,23 @@
+const wasm = require('wasm-bindgen-test.js');
+const assert = require('assert');
+
+exports.pass_string_vec = () => {
+ assert.deepStrictEqual(
+ wasm.consume_string_vec(["hello", "world"]),
+ ["hello", "world", "Hello from Rust!"],
+ );
+ assert.deepStrictEqual(
+ wasm.consume_optional_string_vec(["hello", "world"]),
+ ["hello", "world", "Hello from Rust!"],
+ );
+ assert.strictEqual(wasm.consume_optional_string_vec(undefined), undefined);
+};
+
+exports.pass_invalid_string_vec = () => {
+ try {
+ wasm.consume_string_vec([42]);
+ } catch (e) {
+ assert.match(e.message, /array contains a value of the wrong type/)
+ assert.match(e.stack, /consume_string_vec/)
+ }
+};
diff --git a/vendor/wasm-bindgen/tests/wasm/string_vecs.rs b/vendor/wasm-bindgen/tests/wasm/string_vecs.rs
new file mode 100644
index 000000000..1234d03d9
--- /dev/null
+++ b/vendor/wasm-bindgen/tests/wasm/string_vecs.rs
@@ -0,0 +1,29 @@
+use wasm_bindgen::prelude::*;
+use wasm_bindgen_test::*;
+
+#[wasm_bindgen(module = "tests/wasm/string_vecs.js")]
+extern "C" {
+ fn pass_string_vec();
+ fn pass_invalid_string_vec();
+}
+
+#[wasm_bindgen]
+pub fn consume_string_vec(mut vec: Vec<String>) -> Vec<String> {
+ vec.push("Hello from Rust!".to_owned());
+ vec
+}
+
+#[wasm_bindgen]
+pub fn consume_optional_string_vec(vec: Option<Vec<String>>) -> Option<Vec<String>> {
+ vec.map(consume_string_vec)
+}
+
+#[wasm_bindgen_test]
+fn test_valid() {
+ pass_string_vec();
+}
+
+#[wasm_bindgen_test]
+fn test_invalid() {
+ pass_invalid_string_vec();
+}
diff --git a/vendor/wasm-bindgen/tests/wasm/struct_vecs.js b/vendor/wasm-bindgen/tests/wasm/struct_vecs.js
new file mode 100644
index 000000000..23eb154fd
--- /dev/null
+++ b/vendor/wasm-bindgen/tests/wasm/struct_vecs.js
@@ -0,0 +1,23 @@
+const wasm = require('wasm-bindgen-test.js');
+const assert = require('assert');
+
+exports.pass_struct_vec = () => {
+ const el1 = new wasm.ArrayElement();
+ const el2 = new wasm.ArrayElement();
+ const ret = wasm.consume_struct_vec([el1, el2]);
+ assert.strictEqual(ret.length, 3);
+
+ const ret2 = wasm.consume_optional_struct_vec(ret);
+ assert.strictEqual(ret2.length, 4);
+
+ assert.strictEqual(wasm.consume_optional_struct_vec(undefined), undefined);
+};
+
+exports.pass_invalid_struct_vec = () => {
+ try {
+ wasm.consume_struct_vec(['not a struct']);
+ } catch (e) {
+ assert.match(e.message, /array contains a value of the wrong type/)
+ assert.match(e.stack, /consume_struct_vec/)
+ }
+};
diff --git a/vendor/wasm-bindgen/tests/wasm/struct_vecs.rs b/vendor/wasm-bindgen/tests/wasm/struct_vecs.rs
new file mode 100644
index 000000000..2440abc20
--- /dev/null
+++ b/vendor/wasm-bindgen/tests/wasm/struct_vecs.rs
@@ -0,0 +1,40 @@
+use wasm_bindgen::prelude::*;
+use wasm_bindgen_test::*;
+
+#[wasm_bindgen(module = "tests/wasm/struct_vecs.js")]
+extern "C" {
+ fn pass_struct_vec();
+ fn pass_invalid_struct_vec();
+}
+
+#[wasm_bindgen]
+pub struct ArrayElement;
+
+#[wasm_bindgen]
+impl ArrayElement {
+ #[wasm_bindgen(constructor)]
+ pub fn new() -> ArrayElement {
+ ArrayElement
+ }
+}
+
+#[wasm_bindgen]
+pub fn consume_struct_vec(mut vec: Vec<ArrayElement>) -> Vec<ArrayElement> {
+ vec.push(ArrayElement);
+ vec
+}
+
+#[wasm_bindgen]
+pub fn consume_optional_struct_vec(vec: Option<Vec<ArrayElement>>) -> Option<Vec<ArrayElement>> {
+ vec.map(consume_struct_vec)
+}
+
+#[wasm_bindgen_test]
+fn test_valid() {
+ pass_struct_vec();
+}
+
+#[wasm_bindgen_test]
+fn test_invalid() {
+ pass_invalid_struct_vec();
+}