>>> wasm-bindgen: Building community/wasm-bindgen 0.2.122-r0 (using abuild 3.17.0_rc2-r0) started Sun, 24 May 2026 17:22:44 +0000 >>> wasm-bindgen: Validating /home/buildozer/aports/community/wasm-bindgen/APKBUILD... >>> wasm-bindgen: Analyzing dependencies... >>> wasm-bindgen: Installing for build: build-base cargo nodejs rust-wasm cargo-auditable ( 1/21) Installing libffi (3.5.2-r1) ( 2/21) Installing xz-libs (5.8.3-r0) ( 3/21) Installing libxml2 (2.13.9-r1) ( 4/21) Installing llvm22-libs (22.1.3-r0) ( 5/21) Installing scudo-malloc (22.1.3-r0) ( 6/21) Installing rust (1.95.0-r0) ( 7/21) Installing sqlite-libs (3.53.1-r0) ( 8/21) Installing cargo (1.95.0-r0) ( 9/21) Installing ca-certificates (20260413-r0) (10/21) Installing ada-libs (3.3.0-r0) (11/21) Installing icu-data-en (78.1-r0) Executing icu-data-en-78.1-r0.post-install * If you need ICU with non-English locales and legacy charset support, install * package icu-data-full. (12/21) Installing icu-libs (78.1-r0) (13/21) Installing simdjson (4.2.4-r0) (14/21) Installing simdutf (9.0.0-r0) (15/21) Installing nodejs (24.15.0-r0) (16/21) Installing lld22-libs (22.1.3-r0) (17/21) Installing lld22 (22.1.3-r0) (18/21) Installing wasi-libc (0.20250204-r1) (19/21) Installing rust-wasm (1.95.0-r0) (20/21) Installing cargo-auditable (0.7.5-r0) (21/21) Installing .makedepends-wasm-bindgen (20260524.172245) Executing busybox-1.37.0-r31.trigger Executing ca-certificates-20260413-r0.trigger OK: 1206.2 MiB in 127 packages >>> wasm-bindgen: Cleaning up srcdir >>> wasm-bindgen: Cleaning up pkgdir >>> wasm-bindgen: Cleaning up tmpdir >>> wasm-bindgen: Fetching https://distfiles.alpinelinux.org/distfiles/edge//wasm-bindgen-0.2.122.tar.gz Connecting to distfiles.alpinelinux.org (172.105.82.32:443) wget: server returned error: HTTP/1.1 404 Not Found >>> wasm-bindgen: Fetching https://github.com/rustwasm/wasm-bindgen/archive/refs/tags/0.2.122/wasm-bindgen-0.2.122.tar.gz Connecting to github.com (20.26.156.215:443) Connecting to github.com (20.26.156.215:443) Connecting to codeload.github.com (20.26.156.216:443) saving to '/var/cache/distfiles/edge/wasm-bindgen-0.2.122.tar.gz.part' wasm-bindgen-0.2.122 1736k --:--:-- ETA wasm-bindgen-0.2.122 100% |********************************| 2451k 0:00:00 ETA '/var/cache/distfiles/edge/wasm-bindgen-0.2.122.tar.gz.part' saved /var/cache/distfiles/edge/wasm-bindgen-0.2.122.tar.gz: OK /home/buildozer/aports/community/wasm-bindgen/Cargo.lock: OK /home/buildozer/aports/community/wasm-bindgen/tests.patch: OK >>> wasm-bindgen: Fetching https://distfiles.alpinelinux.org/distfiles/edge//wasm-bindgen-0.2.122.tar.gz /var/cache/distfiles/edge/wasm-bindgen-0.2.122.tar.gz: OK /home/buildozer/aports/community/wasm-bindgen/Cargo.lock: OK /home/buildozer/aports/community/wasm-bindgen/tests.patch: OK >>> wasm-bindgen: Unpacking /var/cache/distfiles/edge/wasm-bindgen-0.2.122.tar.gz... >>> wasm-bindgen: tests.patch patching file crates/cli/tests/wasm-bindgen-test-runner/main.rs patching file crates/cli/tests/wasm-bindgen/reference.rs Hunk #1 succeeded at 229 (offset 95 lines). Hunk #2 succeeded at 294 (offset 97 lines). patching file crates/cli/tests/wasm-bindgen/main.rs Hunk #1 succeeded at 647 (offset 2 lines). Hunk #2 succeeded at 928 (offset 2 lines). Updating crates.io index Updating git repository `https://github.com/alexcrichton/raytracer` Downloading crates ... Downloaded once_cell v1.21.4 Downloaded itoa v1.0.18 Downloaded pin-project-lite v0.2.17 Downloaded litemap v0.8.2 Downloaded zerofrom-derive v0.1.7 Downloaded toml_parser v1.1.2+spec-1.1.0 Downloaded memchr v2.8.0 Downloaded synstructure v0.13.2 Downloaded idna v1.1.0 Downloaded serde_spanned v1.1.1 Downloaded nu-ansi-term v0.50.3 Downloaded env_filter v1.0.1 Downloaded slab v0.4.12 Downloaded futures-util v0.3.32 Downloaded untrusted v0.9.0 Downloaded rustls-pki-types v1.14.1 Downloaded version_check v0.9.5 Downloaded glob v0.3.3 Downloaded tower-service v0.3.3 Downloaded idna_adapter v1.2.2 Downloaded target-triple v1.0.0 Downloaded equivalent v1.0.2 Downloaded termcolor v1.4.1 Downloaded toml v1.1.2+spec-1.1.0 Downloaded zeroize v1.8.2 Downloaded tokio-rustls v0.26.4 Downloaded rustversion v1.0.22 Downloaded percent-encoding v2.3.2 Downloaded zerovec-derive v0.11.3 Downloaded potential_utf v0.1.5 Downloaded http-body v1.0.1 Downloaded zerofrom v0.1.8 Downloaded lzw v0.10.0 Downloaded yoke-derive v0.8.2 Downloaded lazy_static v1.5.0 Downloaded autocfg v1.5.1 Downloaded futures-core-preview v0.3.0-alpha.19 Downloaded futures-io v0.3.32 Downloaded toml_datetime v1.1.1+spec-1.1.0 Downloaded utf8-zero v0.8.1 Downloaded toml_writer v1.1.1+spec-1.1.0 Downloaded futures-task v0.3.32 Downloaded utf8_iter v1.0.4 Downloaded tower-layer v0.3.3 Downloaded num-traits v0.2.19 Downloaded futures-core v0.3.32 Downloaded futures-sink v0.3.32 Downloaded stable_deref_trait v1.2.1 Downloaded enum_primitive v0.1.1 Downloaded color_quant v1.1.0 Downloaded sync_wrapper v1.0.2 Downloaded gg-alloc v1.0.0 Downloaded cfg-if v1.0.4 Downloaded writeable v0.6.3 Downloaded utf8parse v0.2.2 Downloaded id-arena v2.3.0 Downloaded foreign-types-shared v0.1.1 Downloaded is_terminal_polyfill v1.70.2 Downloaded cast v0.3.0 Downloaded env_logger v0.11.10 Downloaded gloo-utils v0.2.0 Downloaded bitflags v0.7.0 Downloaded gloo-console v0.3.0 Downloaded adler32 v1.2.0 Downloaded gloo-dialogs v0.2.0 Downloaded gloo-history v0.2.2 Downloaded subtle v2.6.1 Downloaded futures-channel v0.3.32 Downloaded unicode-ident v1.0.24 Downloaded bitflags v2.11.1 Downloaded yoke v0.8.2 Downloaded futures v0.3.32 Downloaded alloc-stdlib v0.2.2 Downloaded bincode v1.3.3 Downloaded quick-error v1.2.3 Downloaded termtree v0.5.1 Downloaded predicates-tree v1.0.13 Downloaded safemem v0.3.3 Downloaded rustc_version v0.4.1 Downloaded console_log v1.0.0 Downloaded rand_chacha v0.3.1 Downloaded icu_provider v2.2.0 Downloaded wait-timeout v0.2.1 Downloaded gif v0.9.2 Downloaded openssl-probe v0.2.1 Downloaded zerotrie v0.2.4 Downloaded serde_derive v1.0.228 Downloaded proc-macro-crate v3.5.0 Downloaded indexmap v2.14.0 Downloaded openssl-macros v0.1.1 Downloaded pinned v0.1.0 Downloaded twoway v0.1.8 Downloaded mime_guess v2.0.5 Downloaded icu_properties v2.2.0 Downloaded num_cpus v1.17.0 Downloaded askama_macros v0.15.6 Downloaded rustls-native-certs v0.8.3 Downloaded humantime v2.3.0 Downloaded futures-channel-preview v0.3.0-alpha.19 Downloaded proc-macro2 v1.0.106 Downloaded approx v0.5.1 Downloaded crossbeam-utils v0.8.21 Downloaded wat v1.250.0 Downloaded thiserror-impl v1.0.69 Downloaded find-msvc-tools v0.1.9 Downloaded pin-project-internal v1.1.13 Downloaded sha1_smol v1.0.1 Downloaded icu_normalizer v2.2.0 Downloaded icu_collections v2.2.0 Downloaded multipart v0.18.0 Downloaded powerfmt v0.2.0 Downloaded bytemuck v1.25.0 Downloaded rustls-platform-verifier v0.7.0 Downloaded askama v0.15.6 Downloaded want v0.3.1 Downloaded hashbrown v0.17.1 Downloaded thiserror v1.0.69 Downloaded time-core v0.1.8 Downloaded winnow v1.0.3 Downloaded num-complex v0.4.6 Downloaded byteorder v1.5.0 Downloaded predicates v3.1.4 Downloaded native-tls v0.2.18 Downloaded rayon-core v1.13.0 Downloaded gloo-net v0.5.0 Downloaded num-integer v0.1.46 Downloaded quinn-udp v0.5.14 Downloaded rawpointer v0.2.1 Downloaded rand_chacha v0.9.0 Downloaded simd-adler32 v0.3.9 Downloaded gloo-worker v0.5.0 Downloaded rand_distr v0.4.3 Downloaded predicates-core v1.0.10 Downloaded diff v0.1.13 Downloaded buf_redux v0.8.4 Downloaded reqwest v0.13.3 Downloaded deranged v0.5.8 Downloaded pkg-config v0.3.33 Downloaded cfg_aliases v0.2.1 Downloaded fastrand v2.4.1 Downloaded rustc-demangle v0.1.27 Downloaded fnv v1.0.7 Downloaded weedle v0.13.1 Downloaded rand_core v0.6.4 Downloaded icu_properties_data v2.2.0 Downloaded num-conv v0.2.2 Downloaded gloo-file v0.3.0 Downloaded threadpool v1.8.1 Downloaded errno v0.3.14 Downloaded atomic-waker v1.1.2 Downloaded mime v0.3.17 Downloaded normalize-line-endings v0.3.0 Downloaded tower-http v0.6.11 Downloaded matrixmultiply v0.3.10 Downloaded zerocopy-derive v0.8.48 Downloaded tinyvec v1.11.0 Downloaded tokio-util v0.7.18 Downloaded tempfile v3.27.0 Downloaded rand v0.8.6 Downloaded num-bigint v0.4.6 Downloaded foreign-types v0.3.2 Downloaded leb128fmt v0.1.0 Downloaded num-iter v0.1.45 Downloaded yansi v1.0.1 Downloaded deflate v0.7.20 Downloaded wide v0.7.33 Downloaded ureq-proto v0.6.0 Downloaded statrs v0.18.0 Downloaded ascii v1.1.0 Downloaded jpeg-decoder v0.1.22 Downloaded clap v4.6.1 Downloaded miniz_oxide v0.8.9 Downloaded rustls v0.23.40 Downloaded strsim v0.11.1 Downloaded basic-toml v0.1.10 Downloaded float-cmp v0.10.0 Downloaded chunked_transfer v1.5.0 Downloaded nalgebra v0.33.3 Downloaded bstr v1.12.1 Downloaded assert_cmd v2.2.2 Downloaded cc v1.2.62 Downloaded gloo v0.11.0 Downloaded rstest v0.26.1 Downloaded colorchoice v1.0.5 Downloaded askama_parser v0.15.6 Downloaded rouille v3.6.2 Downloaded anyhow v1.0.102 Downloaded relative-path v1.9.3 Downloaded anstyle-parse v1.0.0 Downloaded getrandom v0.4.2 Downloaded foldhash v0.2.0 Downloaded tracing v0.1.44 Downloaded tiny_http v0.12.0 Downloaded flate2 v1.1.9 Downloaded der v0.8.0 Downloaded toml_edit v0.25.11+spec-1.1.0 Downloaded hashbrown v0.16.1 Downloaded safe_arch v0.7.4 Downloaded libc v0.2.186 Downloaded brotli-decompressor v5.0.0 Downloaded webpki-root-certs v1.0.7 Downloaded walrus v0.26.2 Downloaded time v0.3.47 Downloaded wast v250.0.0 Downloaded unicode-width v0.2.2 Downloaded openssl v0.10.80 Downloaded wasmparser v0.250.0 Downloaded rustix v1.1.4 Downloaded gimli v0.32.3 Downloaded regex-syntax v0.8.10 Downloaded regex-automata v0.4.14 Downloaded jiff v0.2.24 Downloaded typenum v1.20.0 Downloaded difflib v0.4.0 Downloaded unicase v2.9.0 Downloaded getrandom v0.3.4 Downloaded wasmparser v0.245.1 Downloaded wasmparser v0.243.0 Downloaded vcpkg v0.2.15 Downloaded webpki-roots v1.0.7 Downloaded ureq v3.3.0 Downloaded wast v243.0.0 Downloaded aho-corasick v1.1.4 Downloaded clap_builder v4.6.0 Downloaded toml_datetime v0.6.11 Downloaded winnow v0.5.40 Downloaded tokio v1.52.3 Downloaded askama_derive v0.15.6 Downloaded nom v5.1.3 Downloaded encoding_rs v0.8.35 Downloaded json v0.12.4 Downloaded linux-raw-sys v0.12.1 Downloaded futures-timer v3.0.4 Downloaded regex v1.12.3 Downloaded wasm-encoder v0.245.1 Downloaded wasm-encoder v0.243.0 Downloaded ring v0.17.14 Downloaded heck v0.5.0 Downloaded wasm-encoder v0.250.0 Downloaded clap_derive v4.6.1 Downloaded console_error_panic_hook v0.1.7 Downloaded openssl-sys v0.9.116 Downloaded rstest_macros v0.26.1 Downloaded semver v1.0.28 Downloaded zerocopy v0.8.48 Downloaded syn v2.0.117 Downloaded quinn-proto v0.11.14 Downloaded anstyle-query v1.1.5 Downloaded aws-lc-rs v1.17.0 Downloaded sourcefile v0.2.1 Downloaded leb128 v0.2.6 Downloaded chrono v0.4.44 Downloaded rayon v1.12.0 Downloaded hyper v1.9.0 Downloaded base64 v0.22.1 Downloaded h2 v0.4.14 Downloaded pem-rfc7468 v1.0.0 Downloaded crc32fast v1.5.0 Downloaded paste v1.0.15 Downloaded wasmprinter v0.245.1 Downloaded png v0.6.2 Downloaded quinn v0.11.9 Downloaded httparse v1.10.1 Downloaded rand v0.9.4 Downloaded hyper-util v0.1.20 Downloaded tracing-core v0.1.36 Downloaded serde_json v1.0.150 Downloaded num-rational v0.4.2 Downloaded filetime v0.2.29 Downloaded image v0.12.4 Downloaded libm v0.2.16 Downloaded ryu v1.0.23 Downloaded tinyvec_macros v0.1.1 Downloaded gloo-events v0.2.0 Downloaded try-lock v0.2.5 Downloaded wasmprinter v0.243.0 Downloaded num-rational v0.1.43 Downloaded serde-wasm-bindgen v0.6.5 Downloaded ppv-lite86 v0.2.21 Downloaded cmake v0.1.58 Downloaded anstream v1.0.0 Downloaded gloo-timers v0.3.0 Downloaded fs_extra v1.3.0 Downloaded num-traits v0.1.43 Downloaded pretty_assertions v1.4.1 Downloaded proc-macro-crate v1.3.1 Downloaded crossbeam-epoch v0.9.18 Downloaded hyper-rustls v0.27.9 Downloaded thiserror v2.0.18 Downloaded zerovec v0.11.6 Downloaded gloo-render v0.2.0 Downloaded gloo-storage v0.3.0 Downloaded toml_edit v0.19.15 Downloaded http-body-util v0.1.3 Downloaded dunce v1.0.5 Downloaded simba v0.9.1 Downloaded base64 v0.13.1 Downloaded base64ct v1.8.3 Downloaded fallible-iterator v0.3.0 Downloaded anstyle v1.0.14 Downloaded either v1.16.0 Downloaded crossbeam-deque v0.8.6 Downloaded inflate v0.1.1 Downloaded serde_urlencoded v0.7.1 Downloaded pin-project v1.1.13 Downloaded gloo-worker-macros v0.1.0 Downloaded ipnet v2.12.0 Downloaded lru-slab v0.1.2 Downloaded rustc-hash v2.1.2 Downloaded thiserror-impl v2.0.18 Downloaded http v0.2.12 Downloaded rand_core v0.9.5 Downloaded url v2.5.8 Downloaded log v0.4.29 Downloaded mio v1.2.0 Downloaded adler2 v2.0.1 Downloaded httpdate v1.0.3 Downloaded scoped_threadpool v0.1.9 Downloaded num_threads v0.1.7 Downloaded alloc-no-stdlib v2.0.4 Downloaded serde v1.0.228 Downloaded rustls-webpki v0.103.13 Downloaded icu_normalizer_data v2.2.0 Downloaded jobserver v0.1.34 Downloaded shlex v1.3.0 Downloaded bumpalo v3.20.3 Downloaded iana-time-zone v0.1.65 Downloaded http v1.4.0 Downloaded icu_locale_core v2.2.0 Downloaded trybuild v1.0.116 Downloaded tower v0.5.3 Downloaded serde_core v1.0.228 Downloaded socket2 v0.6.3 Downloaded futures-macro v0.3.32 Downloaded displaydoc v0.2.5 Downloaded walrus-macro v0.26.0 Downloaded clap_lex v1.1.0 Downloaded getrandom v0.2.17 Downloaded oorandom v11.1.5 Downloaded quote v1.0.45 Downloaded form_urlencoded v1.2.2 Downloaded tinystr v0.8.3 Downloaded bytes v1.11.1 Downloaded smallvec v1.15.1 Downloaded async-trait v0.1.89 Downloaded tokio-macros v2.7.0 Downloaded zmij v1.0.21 Downloaded futures-executor v0.3.32 Downloaded aws-lc-sys v0.41.0 Downloaded openssl-src v300.6.0+3.6.2 Compiling proc-macro2 v1.0.106 Compiling unicode-ident v1.0.24 Compiling quote v1.0.45 Compiling libc v0.2.186 Compiling stable_deref_trait v1.2.1 Compiling cfg-if v1.0.4 Compiling serde_core v1.0.228 Compiling memchr v2.8.0 Compiling log v0.4.29 Compiling crossbeam-utils v0.8.21 Compiling shlex v1.3.0 Compiling litemap v0.8.2 Compiling find-msvc-tools v0.1.9 Compiling writeable v0.6.3 Compiling cc v1.2.62 Compiling icu_normalizer_data v2.2.0 Compiling bitflags v2.11.1 Compiling utf8_iter v1.0.4 Compiling zerocopy v0.8.48 Compiling icu_properties_data v2.2.0 Compiling crossbeam-epoch v0.9.18 Compiling serde v1.0.228 Compiling itoa v1.0.18 Compiling syn v2.0.117 Compiling rayon-core v1.13.0 Compiling httparse v1.10.1 Compiling crossbeam-deque v0.8.6 Compiling getrandom v0.2.17 Compiling smallvec v1.15.1 Compiling zeroize v1.8.2 Compiling unicase v2.9.0 Compiling hashbrown v0.17.1 Compiling autocfg v1.5.1 Compiling getrandom v0.4.2 Compiling rustix v1.1.4 Compiling equivalent v1.0.2 Compiling zmij v1.0.21 Compiling once_cell v1.21.4 Compiling utf8parse v0.2.2 Compiling heck v0.5.0 Compiling anstyle-parse v1.0.0 Compiling num-traits v0.2.19 Compiling ring v0.17.14 Compiling mime_guess v2.0.5 Compiling indexmap v2.14.0 Compiling rustls-pki-types v1.14.1 Compiling rand_core v0.6.4 Compiling errno v0.3.14 Compiling aho-corasick v1.1.4 Compiling anstyle-query v1.1.5 Compiling colorchoice v1.0.5 Compiling percent-encoding v2.3.2 Compiling anstyle v1.0.14 Compiling serde_json v1.0.150 Compiling regex-syntax v0.8.10 Compiling is_terminal_polyfill v1.70.2 Compiling linux-raw-sys v0.12.1 Compiling crc32fast v1.5.0 Compiling untrusted v0.9.0 Compiling anyhow v1.0.102 Compiling either v1.16.0 Compiling foldhash v0.2.0 Compiling rayon v1.12.0 Compiling hashbrown v0.16.1 Compiling anstream v1.0.0 Compiling regex-automata v0.4.14 Compiling synstructure v0.13.2 Compiling ppv-lite86 v0.2.21 Compiling rand_chacha v0.3.1 Compiling semver v1.0.28 Compiling wasm-bindgen-shared v0.2.122 (/home/buildozer/aports/community/wasm-bindgen/src/wasm-bindgen-0.2.122/crates/shared) Compiling leb128fmt v0.1.0 Compiling safemem v0.3.3 Compiling fastrand v2.4.1 Compiling fallible-iterator v0.3.0 Compiling adler2 v2.0.1 Compiling base64 v0.22.1 Compiling alloc-no-stdlib v2.0.4 Compiling simd-adler32 v0.3.9 Compiling rustls v0.23.40 Compiling mime v0.3.17 Compiling bytes v1.11.1 Compiling powerfmt v0.2.0 Compiling regex v1.12.3 Compiling deranged v0.5.8 Compiling miniz_oxide v0.8.9 Compiling zerofrom-derive v0.1.7 Compiling yoke-derive v0.8.2 Compiling zerovec-derive v0.11.3 Compiling displaydoc v0.2.5 Compiling serde_derive v1.0.228 Compiling walrus-macro v0.26.0 Compiling http v1.4.0 Compiling alloc-stdlib v0.2.2 Compiling gimli v0.32.3 Compiling tempfile v3.27.0 Compiling buf_redux v0.8.4 Compiling zerofrom v0.1.8 Compiling yoke v0.8.2 Compiling wasm-encoder v0.245.1 Compiling rustls-webpki v0.103.13 Compiling zerovec v0.11.6 Compiling zerotrie v0.2.4 Compiling rand v0.8.6 Compiling tinystr v0.8.3 Compiling potential_utf v0.1.5 Compiling icu_collections v2.2.0 Compiling icu_locale_core v2.2.0 Compiling icu_provider v2.2.0 Compiling id-arena v2.3.0 Compiling icu_normalizer v2.2.0 Compiling icu_properties v2.2.0 Compiling wasmparser v0.245.1 Compiling form_urlencoded v1.2.2 Compiling num_cpus v1.17.0 Compiling twoway v0.1.8 Compiling strsim v0.11.1 Compiling iana-time-zone v0.1.65 Compiling leb128 v0.2.6 Compiling num-conv v0.2.2 Compiling chunked_transfer v1.5.0 Compiling idna_adapter v1.2.2 Compiling httpdate v1.0.3 Compiling idna v1.1.0 Compiling clap_lex v1.1.0 Compiling quick-error v1.2.3 Compiling time-core v0.1.8 Compiling subtle v2.6.1 Compiling num_threads v0.1.7 Compiling ascii v1.1.0 Compiling time v0.3.47 Compiling url v2.5.8 Compiling tiny_http v0.12.0 Compiling clap_builder v4.6.0 Compiling multipart v0.18.0 Compiling chrono v0.4.44 Compiling threadpool v1.8.1 Compiling flate2 v1.1.9 Compiling ureq-proto v0.6.0 Compiling brotli-decompressor v5.0.0 Compiling clap_derive v4.6.1 Compiling env_filter v1.0.1 Compiling webpki-roots v1.0.7 Compiling filetime v0.2.29 Compiling wasm-bindgen-cli v0.2.122 (/home/buildozer/aports/community/wasm-bindgen/src/wasm-bindgen-0.2.122/crates/cli) Compiling jiff v0.2.24 Compiling utf8-zero v0.8.1 Compiling rustc-demangle v0.1.27 Compiling base64 v0.13.1 Compiling sha1_smol v1.0.1 Compiling clap v4.6.1 Compiling rouille v3.6.2 Compiling ureq v3.3.0 Compiling wasm-bindgen-test-shared v0.2.122 (/home/buildozer/aports/community/wasm-bindgen/src/wasm-bindgen-0.2.122/crates/test-shared) Compiling walrus v0.26.2 Compiling env_logger v0.11.10 Compiling wasm-bindgen-cli-support v0.2.122 (/home/buildozer/aports/community/wasm-bindgen/src/wasm-bindgen-0.2.122/crates/cli-support) Finished `release` profile [optimized] target(s) in 1m 48s warning: the following packages contain code that will be rejected by a future version of Rust: buf_redux v0.8.4, multipart v0.18.0 note: to see what the problems were, use the option `--future-incompat-report`, or run `cargo report future-incompatibilities --id 1` Compiling unicode-ident v1.0.24 Compiling proc-macro2 v1.0.106 Compiling quote v1.0.45 Compiling libc v0.2.186 Compiling cfg-if v1.0.4 Compiling stable_deref_trait v1.2.1 Compiling memchr v2.8.0 Compiling serde_core v1.0.228 Compiling regex-syntax v0.8.10 Compiling hashbrown v0.17.1 Compiling equivalent v1.0.2 Compiling log v0.4.29 Compiling crossbeam-utils v0.8.21 Compiling bitflags v2.11.1 Compiling shlex v1.3.0 Compiling autocfg v1.5.1 Compiling litemap v0.8.2 Compiling find-msvc-tools v0.1.9 Compiling writeable v0.6.3 Compiling num-traits v0.2.19 Compiling cc v1.2.62 Compiling aho-corasick v1.1.4 Compiling syn v2.0.117 Compiling getrandom v0.2.17 Compiling icu_properties_data v2.2.0 Compiling icu_normalizer_data v2.2.0 Compiling utf8_iter v1.0.4 Compiling zerocopy v0.8.48 Compiling serde v1.0.228 Compiling crossbeam-epoch v0.9.18 Compiling httparse v1.10.1 Compiling anstyle v1.0.14 Compiling rayon-core v1.13.0 Compiling regex-automata v0.4.14 Compiling itoa v1.0.18 Compiling ring v0.17.14 Compiling indexmap v2.14.0 Compiling crossbeam-deque v0.8.6 Compiling heck v0.5.0 Compiling zeroize v1.8.2 Compiling rustix v1.1.4 Compiling unicase v2.9.0 Compiling utf8parse v0.2.2 Compiling foldhash v0.2.0 Compiling smallvec v1.15.1 Compiling once_cell v1.21.4 Compiling zmij v1.0.21 Compiling anyhow v1.0.102 Compiling getrandom v0.4.2 Compiling hashbrown v0.16.1 Compiling mime_guess v2.0.5 Compiling anstyle-parse v1.0.0 Compiling rustls-pki-types v1.14.1 Compiling regex v1.12.3 Compiling synstructure v0.13.2 Compiling rand_core v0.6.4 Compiling errno v0.3.14 Compiling percent-encoding v2.3.2 Compiling crc32fast v1.5.0 Compiling is_terminal_polyfill v1.70.2 Compiling colorchoice v1.0.5 Compiling untrusted v0.9.0 Compiling linux-raw-sys v0.12.1 Compiling either v1.16.0 Compiling serde_json v1.0.150 Compiling semver v1.0.28 Compiling anstyle-query v1.1.5 Compiling anstream v1.0.0 Compiling rayon v1.12.0 Compiling ppv-lite86 v0.2.21 Compiling rand_chacha v0.3.1 Compiling powerfmt v0.2.0 Compiling rustls v0.23.40 Compiling simd-adler32 v0.3.9 Compiling bytes v1.11.1 Compiling alloc-no-stdlib v2.0.4 Compiling leb128fmt v0.1.0 Compiling zerofrom-derive v0.1.7 Compiling yoke-derive v0.8.2 Compiling zerovec-derive v0.11.3 Compiling displaydoc v0.2.5 Compiling serde_derive v1.0.228 Compiling adler2 v2.0.1 Compiling fastrand v2.4.1 Compiling base64 v0.22.1 Compiling wasm-bindgen-shared v0.2.122 (/home/buildozer/aports/community/wasm-bindgen/src/wasm-bindgen-0.2.122/crates/shared) Compiling mime v0.3.17 Compiling fallible-iterator v0.3.0 Compiling safemem v0.3.3 Compiling tempfile v3.27.0 Compiling miniz_oxide v0.8.9 Compiling zerofrom v0.1.8 Compiling buf_redux v0.8.4 Compiling yoke v0.8.2 Compiling gimli v0.32.3 Compiling id-arena v2.3.0 Compiling zerovec v0.11.6 Compiling zerotrie v0.2.4 Compiling http v1.4.0 Compiling wasm-encoder v0.245.1 Compiling walrus-macro v0.26.0 Compiling alloc-stdlib v0.2.2 Compiling rustls-webpki v0.103.13 Compiling rand v0.8.6 Compiling tinystr v0.8.3 Compiling icu_locale_core v2.2.0 Compiling potential_utf v0.1.5 Compiling icu_collections v2.2.0 Compiling deranged v0.5.8 Compiling icu_provider v2.2.0 Compiling form_urlencoded v1.2.2 Compiling icu_normalizer v2.2.0 Compiling icu_properties v2.2.0 Compiling num_cpus v1.17.0 Compiling twoway v0.1.8 Compiling chunked_transfer v1.5.0 Compiling strsim v0.11.1 Compiling iana-time-zone v0.1.65 Compiling clap_lex v1.1.0 Compiling quick-error v1.2.3 Compiling leb128 v0.2.6 Compiling ascii v1.1.0 Compiling httpdate v1.0.3 Compiling num_threads v0.1.7 Compiling time-core v0.1.8 Compiling num-conv v0.2.2 Compiling subtle v2.6.1 Compiling time v0.3.47 Compiling multipart v0.18.0 Compiling wasmparser v0.245.1 Compiling tiny_http v0.12.0 Compiling clap_builder v4.6.0 Compiling idna_adapter v1.2.2 Compiling chrono v0.4.44 Compiling idna v1.1.0 Compiling threadpool v1.8.1 Compiling flate2 v1.1.9 Compiling url v2.5.8 Compiling ureq-proto v0.6.0 Compiling brotli-decompressor v5.0.0 Compiling clap_derive v4.6.1 Compiling env_filter v1.0.1 Compiling webpki-roots v1.0.7 Compiling filetime v0.2.29 Compiling utf8-zero v0.8.1 Compiling rustc-demangle v0.1.27 Compiling winnow v1.0.3 Compiling jiff v0.2.24 Compiling base64 v0.13.1 Compiling sha1_smol v1.0.1 Compiling wasm-bindgen-cli v0.2.122 (/home/buildozer/aports/community/wasm-bindgen/src/wasm-bindgen-0.2.122/crates/cli) Compiling rouille v3.6.2 Compiling rustc_version v0.4.1 Compiling clap v4.6.1 Compiling toml_parser v1.1.2+spec-1.1.0 Compiling ureq v3.3.0 Compiling toml_datetime v1.1.1+spec-1.1.0 Compiling wasm-bindgen-test-shared v0.2.122 (/home/buildozer/aports/community/wasm-bindgen/src/wasm-bindgen-0.2.122/crates/test-shared) Compiling rstest_macros v0.26.1 Compiling predicates-core v1.0.10 Compiling toml_edit v0.25.11+spec-1.1.0 Compiling futures-macro v0.3.32 Compiling walrus v0.26.2 Compiling env_logger v0.11.10 Compiling proc-macro-crate v3.5.0 Compiling float-cmp v0.10.0 Compiling normalize-line-endings v0.3.0 Compiling glob v0.3.3 Compiling pin-project-lite v0.2.17 Compiling difflib v0.4.0 Compiling termtree v0.5.1 Compiling slab v0.4.12 Compiling futures-core v0.3.32 Compiling assert_cmd v2.2.2 Compiling relative-path v1.9.3 Compiling futures-task v0.3.32 Compiling futures-util v0.3.32 Compiling predicates-tree v1.0.13 Compiling predicates v3.1.4 Compiling bstr v1.12.1 Compiling wait-timeout v0.2.1 Compiling wasm-bindgen-cli-support v0.2.122 (/home/buildozer/aports/community/wasm-bindgen/src/wasm-bindgen-0.2.122/crates/cli-support) Compiling termcolor v1.4.1 Compiling futures-timer v3.0.4 Compiling diff v0.1.13 Compiling yansi v1.0.1 Compiling wasmprinter v0.245.1 Compiling pretty_assertions v1.4.1 Compiling rstest v0.26.1 warning: constant `TERMINATION_LIB_RS` is never used --> crates/cli/tests/wasm-bindgen/main.rs:546:7 | 546 | const TERMINATION_LIB_RS: &str = r#" | ^^^^^^^^^^^^^^^^^^ | = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default warning: `wasm-bindgen-cli` (test "wasm-bindgen") generated 1 warning Finished `test` profile [unoptimized + debuginfo] target(s) in 53.12s warning: the following packages contain code that will be rejected by a future version of Rust: buf_redux v0.8.4, multipart v0.18.0 note: to see what the problems were, use the option `--future-incompat-report`, or run `cargo report future-incompatibilities --id 1` Running unittests src/lib.rs (/home/buildozer/aports/community/wasm-bindgen/src/wasm-bindgen-0.2.122/target/debug/deps/wasm_bindgen_cli-db9aaa51118f7cc1) running 1 test test wasm_bindgen_test_runner::tests::runner_args_keep_filtered_count_on_number_abi ... ok test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s Running unittests src/bin/wasm-bindgen.rs (/home/buildozer/aports/community/wasm-bindgen/src/wasm-bindgen-0.2.122/target/debug/deps/wasm_bindgen-db308dd45bc3a1d1) running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s Running unittests src/bin/wasm-bindgen-test-runner.rs (/home/buildozer/aports/community/wasm-bindgen/src/wasm-bindgen-0.2.122/target/debug/deps/wasm_bindgen_test_runner-11bdbcc1c0303b6e) running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s Running unittests src/bin/wasm2es6js.rs (/home/buildozer/aports/community/wasm-bindgen/src/wasm-bindgen-0.2.122/target/debug/deps/wasm2es6js-cac7d5b44d9174a6) running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s Running tests/wasm-bindgen/main.rs (/home/buildozer/aports/community/wasm-bindgen/src/wasm-bindgen-0.2.122/target/debug/deps/wasm_bindgen-dfdd063364ffd0a3) running 80 tests test bin_crate_works ... ok test diagnostics::typo_in_js_class_suggests_nearest_struct ... ok test bin_crate_works_without_name_section ... ok test diagnostics::missing_js_namespace_on_impl_suggests_struct_namespace ... ok test default_module_path_target_no_modules ... ok test default_module_path_target_web ... ok test constructor_cannot_return_option_struct ... ok test diagnostics::missing_js_namespace_on_impl_nested_namespace ... ok test emscripten_namespaced_exports_valid_ts ... ok test function_table_preserved ... ok test function_table_preserved_for_stack_closures ... ok test npm::no_modules_rejects_npm ... ok test npm::more_package_json_fields_ignored ... ok test namespace_global_and_noglobal_works ... ok test reference::canonicalize_wat_types_ignores_type_order ... ok test reference::no_duplicate_wasm_export_in_node_esm_atomics_debug ... FAILED test multiple_start_functions ... ok test npm::npm_conflict_rejected ... ok test omit_default_module_path_target_no_modules ... ok test omit_default_module_path_target_web ... ok test one_export_works ... ok test private_namespaced_classes_export_actual_ts_identifier ... ok test private_start_function ... ok test reference::runtest::test_01_add_rs ... ok test reference::runtest::test_02_anyref_empty_rs ... ok test reference::runtest::test_03_anyref_import_catch_rs ... FAILED test reference::runtest::test_04_anyref_nop_rs ... ok test reference::runtest::test_07_builder_rs ... FAILED test reference::runtest::test_05_async_number_rs ... FAILED test reference::runtest::test_06_async_void_rs ... FAILED test reference::runtest::test_10_custom_section_rs ... ok test reference::runtest::test_08_closures_rs ... FAILED test reference::runtest::test_09_constructor_rs ... FAILED test reference::runtest::test_11_default_class_rs ... FAILED test reference::runtest::test_12_default_function_rs ... ok test reference::runtest::test_14_echo_rs ... FAILED test reference::runtest::test_13_dynamic_union_rs ... FAILED test reference::runtest::test_15_empty_rs ... ok test reference::runtest::test_16_enums_rs ... FAILED test reference::runtest::test_17_exported_class_rename_collision_rs ... FAILED test reference::runtest::test_18_exported_class_rename_wrap_rs ... FAILED test reference::runtest::test_19_exported_class_wrap_matrix_rs ... FAILED test reference::runtest::test_20_extends_rust_rs ... FAILED test reference::runtest::test_23_import_getter_setter_rs ... FAILED test reference::runtest::test_21_function_attrs_rs ... FAILED test reference::runtest::test_22_getter_setter_rs ... FAILED test reference::runtest::test_24_import_rs ... FAILED test reference::runtest::test_25_int128_rs ... FAILED test reference::runtest::test_33_panic_unwind_rs ... ok test reference::runtest::test_26_intrinsic_only_rs ... FAILED test reference::runtest::test_27_js_namespace_export_same_name_rs ... FAILED test reference::runtest::test_28_js_namespace_export_rs ... FAILED test reference::runtest::test_30_modules_rs ... FAILED test reference::runtest::test_29_keyword_rs ... FAILED test reference::runtest::test_31_nop_rs ... ok test reference::runtest::test_32_optional_args_rs ... ok test reference::runtest::test_34_pointers_rs ... ok test reference::runtest::test_35_private_rs ... FAILED test reference::runtest::test_36_raw_rs ... FAILED test reference::runtest::test_37_reexport_rs ... FAILED test reference::runtest::test_38_reserved_class_name_rs ... FAILED test reference::runtest::test_39_result_rs ... FAILED test reference::runtest::test_40_self_type_rs ... FAILED test reference::runtest::test_41_skip_jsdoc_rs ... ok test reference::runtest::test_42_slice_to_array_rs ... FAILED test reference::runtest::test_44_string_arg_rs ... FAILED test reference::runtest_panic_unwind ... FAILED test reference::runtest::test_43_static_rs ... FAILED test termination_abort_handler ... FAILED test termination_reinit ... FAILED test termination_reinit_auto_detect ... FAILED test version_useful ... ok test reference::runtest::test_45_symbol_rs ... FAILED test reference::runtest::test_46_targets_rs ... FAILED test reference::runtest::test_47_typescript_type_rs ... FAILED test reference::runtest::test_49_wasm_export_types_rs ... FAILED test reference::runtest::test_48_wasm_export_colon_rs ... FAILED test reference::runtest::test_50_web_sys_rs ... FAILED test works_on_empty_project ... ok test reinit_panic_abort ... ok failures: ---- reference::no_duplicate_wasm_export_in_node_esm_atomics_debug stdout ---- thread 'reference::no_duplicate_wasm_export_in_node_esm_atomics_debug' (64725) panicked at crates/cli/tests/wasm-bindgen/main.rs:151:37: Unexpected failure. code=101 stderr=`````` error: the `-Z` flag is only accepted on the nightly channel of Cargo, but this is the `stable` channel See https://doc.rust-lang.org/book/appendix-07-nightly-rust.html for more information about Rust release channels. ``` ``` command=`cd "/home/buildozer/aports/community/wasm-bindgen/src/wasm-bindgen-0.2.122/target/cli-tests/targets_reftest_atomics_debug_no_duplicate_wasm_export" && CARGO_TARGET_DIR="/home/buildozer/aports/community/wasm-bindgen/src/wasm-bindgen-0.2.122/target" RUSTFLAGS="-Ctarget-feature=+atomics -Clink-args=--shared-memory -Clink-args=--max-memory=1073741824 -Clink-args=--import-memory -Clink-args=--export=__heap_base -Clink-args=--export=__wasm_init_tls -Clink-args=--export=__tls_size -Clink-args=--export=__tls_align -Clink-args=--export=__tls_base" RUSTUP_TOOLCHAIN="nightly" "cargo" "build" "--target" "wasm32-unknown-unknown" "-Zbuild-std=std,panic_abort"` code=101 stdout="" stderr=``` error: the `-Z` flag is only accepted on the nightly channel of Cargo, but this is the `stable` channel See https://doc.rust-lang.org/book/appendix-07-nightly-rust.html for more information about Rust release channels. ``` note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace ---- reference::runtest::test_03_anyref_import_catch_rs stdout ---- thread 'reference::runtest::test_03_anyref_import_catch_rs' (64790) panicked at crates/cli/tests/wasm-bindgen/reference.rs:128:13: assertion failed: `(left == right)` Diff < left / right > : export function exported() { const ret = wasm.exported(); if (ret[1]) { throw takeFromExternrefTable0(ret[0]); } } export function __wbg___wbindgen_throw_466bb9aa11cb890a(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); } export function __wbg_foo_042bb6ce1224637a() { return handleError(function () { foo(); }, arguments); } export function __wbindgen_init_externref_table() { const table = wasm.__wbindgen_externrefs; const offset = table.grow(4); table.set(0, undefined); table.set(offset + 0, undefined); table.set(offset + 1, null); table.set(offset + 2, true); table.set(offset + 3, false); } function addToExternrefTable0(obj) { const idx = wasm.__externref_table_alloc(); wasm.__wbindgen_externrefs.set(idx, obj); return idx; } function getStringFromWasm0(ptr, len) { return decodeText(ptr >>> 0, len); } let cachedUint8ArrayMemory0 = null; function getUint8ArrayMemory0() { if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) { cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer); } return cachedUint8ArrayMemory0; } function handleError(f, args) { try { return f.apply(this, args); } catch (e) { const idx = addToExternrefTable0(e); wasm.__wbindgen_exn_store(idx); } } function takeFromExternrefTable0(idx) { const value = wasm.__wbindgen_externrefs.get(idx); wasm.__externref_table_dealloc(idx); return value; } let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); cachedTextDecoder.decode(); const MAX_SAFARI_DECODE_BYTES = 2146435072; let numBytesDecoded = 0; function decodeText(ptr, len) { numBytesDecoded += len; if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) { cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); cachedTextDecoder.decode(); numBytesDecoded = len; } return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len)); } let wasm; export function __wbg_set_wasm(val) { wasm = val; } ---- reference::runtest::test_07_builder_rs stdout ---- thread 'reference::runtest::test_07_builder_rs' (64878) panicked at crates/cli/tests/wasm-bindgen/reference.rs:128:13: assertion failed: `(left == right)` Diff < left / right > : export class ClassBuilder { static __wrap(ptr) { const obj = Object.create(ClassBuilder.prototype); obj.__wbg_ptr = ptr; ClassBuilderFinalization.register(obj, obj.__wbg_ptr, obj); return obj; } __destroy_into_raw() { const ptr = this.__wbg_ptr; this.__wbg_ptr = 0; ClassBuilderFinalization.unregister(this); return ptr; } free() { const ptr = this.__destroy_into_raw(); wasm.__wbg_classbuilder_free(ptr, 0); } /** * @returns {ClassBuilder} */ static builder() { const ret = wasm.classbuilder_builder(); return ClassBuilder.__wrap(ret); } } if (Symbol.dispose) ClassBuilder.prototype[Symbol.dispose] = ClassBuilder.prototype.free; export function __wbg___wbindgen_throw_466bb9aa11cb890a(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); } export function __wbindgen_init_externref_table() { const table = wasm.__wbindgen_externrefs; const offset = table.grow(4); table.set(0, undefined); table.set(offset + 0, undefined); table.set(offset + 1, null); table.set(offset + 2, true); table.set(offset + 3, false); } const ClassBuilderFinalization = (typeof FinalizationRegistry === 'undefined') ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry(ptr => wasm.__wbg_classbuilder_free(ptr, 1)); function getStringFromWasm0(ptr, len) { return decodeText(ptr >>> 0, len); } let cachedUint8ArrayMemory0 = null; function getUint8ArrayMemory0() { if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) { cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer); } return cachedUint8ArrayMemory0; } let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); cachedTextDecoder.decode(); const MAX_SAFARI_DECODE_BYTES = 2146435072; let numBytesDecoded = 0; function decodeText(ptr, len) { numBytesDecoded += len; if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) { cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); cachedTextDecoder.decode(); numBytesDecoded = len; } return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len)); } let wasm; export function __wbg_set_wasm(val) { wasm = val; } ---- reference::runtest::test_05_async_number_rs stdout ---- thread 'reference::runtest::test_05_async_number_rs' (64831) panicked at crates/cli/tests/wasm-bindgen/reference.rs:128:13: assertion failed: `(left == right)` Diff < left / right > : /** * @returns {Promise} */ export function foo() { const ret = wasm.foo(); return ret; } export function __wbg___wbindgen_debug_string_1d67e6b9cb4af7dd(arg0, arg1) { const ret = debugString(arg1); const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); const len1 = WASM_VECTOR_LEN; getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); } export function __wbg___wbindgen_is_function_23e2dfe0c7e5054f(arg0) { const ret = typeof(arg0) === 'function'; return ret; } export function __wbg___wbindgen_is_undefined_d44a4c1e41ccffb0(arg0) { const ret = arg0 === undefined; return ret; } export function __wbg___wbindgen_throw_466bb9aa11cb890a(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); } export function __wbg__wbg_cb_unref_e94a945391d00ff2(arg0) { arg0._wbg_cb_unref(); } export function __wbg_call_d68e7770fba7f6eb() { return handleError(function (arg0, arg1, arg2) { const ret = arg0.call(arg1, arg2); return ret; }, arguments); } export function __wbg_new_typed_4c200accdde4f3a3(arg0, arg1) { try { var state0 = {a: arg0, b: arg1}; var cb0 = (arg0, arg1) => { const a = state0.a; state0.a = 0; try { return wasm_bindgen__convert__closures_____invoke__h0000000000000003(a, state0.b, arg0, arg1); } finally { state0.a = a; } }; const ret = new Promise(cb0); return ret; } finally { state0.a = 0; } } export function __wbg_queueMicrotask_10964779d964bef7(arg0) { const ret = arg0.queueMicrotask; return ret; } export function __wbg_queueMicrotask_5e31d26bee93a930(arg0) { > queueMicrotask(arg0); >} >export function __wbg_resolve_730d0fd7be4a6218(arg0) { const ret = Promise.resolve(arg0); return ret; } export function __wbg_run_9227ca2f41f878c5(arg0, arg1, arg2) { try { var state0 = {a: arg1, b: arg2}; var cb0 = () => { const a = state0.a; state0.a = 0; try { return wasm_bindgen__convert__closures_____invoke__h0000000000000004(a, state0.b, ); } finally { state0.a = a; } }; const ret = arg0.run(cb0); return ret; } finally { state0.a = 0; } } export function __wbg_static_accessor_CREATE_TASK_98c021c7bb4e201d() { const ret = typeof console === 'undefined' ? null : console?.createTask; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_GLOBAL_4f52c14942a6e24a() { const ret = typeof global === 'undefined' ? null : global; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_GLOBAL_THIS_4a5df4c30924bc39() { const ret = typeof globalThis === 'undefined' ? null : globalThis; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_SELF_c8dfd8be8f08e852() { const ret = typeof self === 'undefined' ? null : self; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_WINDOW_1a8fdd6a17dbaf35() { const ret = typeof window === 'undefined' ? null : window; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_then_f36f56a6cb7bcf6e(arg0, arg1) { const ret = arg0.then(arg1); return ret; } export function __wbindgen_cast_0000000000000000(arg0, arg1) { // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 6, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`. const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h0000000000000005); return ret; } export function __wbindgen_cast_0000000000000001(arg0) { // Cast intrinsic for `F64 -> Externref`. const ret = arg0; return ret; } export function __wbindgen_cast_0000000000000002(arg0, arg1) { // Cast intrinsic for `Ref(String) -> Externref`. const ret = getStringFromWasm0(arg0, arg1); return ret; } export function __wbindgen_init_externref_table() { const table = wasm.__wbindgen_externrefs; const offset = table.grow(4); table.set(0, undefined); table.set(offset + 0, undefined); table.set(offset + 1, null); table.set(offset + 2, true); table.set(offset + 3, false); } function wasm_bindgen__convert__closures_____invoke__h0000000000000004(arg0, arg1) { const ret = wasm.wasm_bindgen__convert__closures_____invoke__h0000000000000004(arg0, arg1); return ret !== 0; } function wasm_bindgen__convert__closures_____invoke__h0000000000000005(arg0, arg1, arg2) { const ret = wasm.wasm_bindgen__convert__closures_____invoke__h0000000000000005(arg0, arg1, arg2); if (ret[1]) { throw takeFromExternrefTable0(ret[0]); } } function wasm_bindgen__convert__closures_____invoke__h0000000000000003(arg0, arg1, arg2, arg3) { wasm.wasm_bindgen__convert__closures_____invoke__h0000000000000003(arg0, arg1, arg2, arg3); } function addToExternrefTable0(obj) { const idx = wasm.__externref_table_alloc(); wasm.__wbindgen_externrefs.set(idx, obj); return idx; } const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined') ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry(state => wasm.__wbindgen_destroy_closure(state.a, state.b)); function debugString(val) { // primitive types const type = typeof val; if (type == 'number' || type == 'boolean' || val == null) { return `${val}`; } if (type == 'string') { return `"${val}"`; } if (type == 'symbol') { const description = val.description; if (description == null) { return 'Symbol'; } else { return `Symbol(${description})`; } } if (type == 'function') { const name = val.name; if (typeof name == 'string' && name.length > 0) { return `Function(${name})`; } else { return 'Function'; } } // objects if (Array.isArray(val)) { const length = val.length; let debug = '['; if (length > 0) { debug += debugString(val[0]); } for(let i = 1; i < length; i++) { debug += ', ' + debugString(val[i]); } debug += ']'; return debug; } // Test for built-in const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val)); let className; if (builtInMatches && builtInMatches.length > 1) { className = builtInMatches[1]; } else { // Failed to match the standard '[object ClassName]' return toString.call(val); } if (className == 'Object') { // we're a user defined class or Object // JSON.stringify avoids problems with cycles, and is generally much // easier than looping through ownProperties of `val`. try { return 'Object(' + JSON.stringify(val) + ')'; } catch (_) { return 'Object'; } } // errors if (val instanceof Error) { return `${val.name}: ${val.message}\n${val.stack}`; } // TODO we could test for more things here, like `Set`s and `Map`s. return className; } let cachedDataViewMemory0 = null; function getDataViewMemory0() { if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) { cachedDataViewMemory0 = new DataView(wasm.memory.buffer); } return cachedDataViewMemory0; } function getStringFromWasm0(ptr, len) { return decodeText(ptr >>> 0, len); } let cachedUint8ArrayMemory0 = null; function getUint8ArrayMemory0() { if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) { cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer); } return cachedUint8ArrayMemory0; } function handleError(f, args) { try { return f.apply(this, args); } catch (e) { const idx = addToExternrefTable0(e); wasm.__wbindgen_exn_store(idx); } } function isLikeNone(x) { return x === undefined || x === null; } function makeMutClosure(arg0, arg1, f) { const state = { a: arg0, b: arg1, cnt: 1 }; const real = (...args) => { // First up with a closure we increment the internal reference // count. This ensures that the Rust closure environment won't // be deallocated while we're invoking it. state.cnt++; const a = state.a; state.a = 0; try { return f(a, state.b, ...args); } finally { state.a = a; real._wbg_cb_unref(); } }; real._wbg_cb_unref = () => { if (--state.cnt === 0) { wasm.__wbindgen_destroy_closure(state.a, state.b); state.a = 0; CLOSURE_DTORS.unregister(state); } }; CLOSURE_DTORS.register(real, state, state); return real; } function passStringToWasm0(arg, malloc, realloc) { if (realloc === undefined) { const buf = cachedTextEncoder.encode(arg); const ptr = malloc(buf.length, 1) >>> 0; getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf); WASM_VECTOR_LEN = buf.length; return ptr; } let len = arg.length; let ptr = malloc(len, 1) >>> 0; const mem = getUint8ArrayMemory0(); let offset = 0; for (; offset < len; offset++) { const code = arg.charCodeAt(offset); if (code > 0x7F) break; mem[ptr + offset] = code; } if (offset !== len) { if (offset !== 0) { arg = arg.slice(offset); } ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0; const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len); const ret = cachedTextEncoder.encodeInto(arg, view); offset += ret.written; ptr = realloc(ptr, len, offset, 1) >>> 0; } WASM_VECTOR_LEN = offset; return ptr; } function takeFromExternrefTable0(idx) { const value = wasm.__wbindgen_externrefs.get(idx); wasm.__externref_table_dealloc(idx); return value; } let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); cachedTextDecoder.decode(); const MAX_SAFARI_DECODE_BYTES = 2146435072; let numBytesDecoded = 0; function decodeText(ptr, len) { numBytesDecoded += len; if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) { cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); cachedTextDecoder.decode(); numBytesDecoded = len; } return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len)); } const cachedTextEncoder = new TextEncoder(); if (!('encodeInto' in cachedTextEncoder)) { cachedTextEncoder.encodeInto = function (arg, view) { const buf = cachedTextEncoder.encode(arg); view.set(buf); return { read: arg.length, written: buf.length }; }; } let WASM_VECTOR_LEN = 0; let wasm; export function __wbg_set_wasm(val) { wasm = val; } ---- reference::runtest::test_06_async_void_rs stdout ---- thread 'reference::runtest::test_06_async_void_rs' (64856) panicked at crates/cli/tests/wasm-bindgen/reference.rs:128:13: assertion failed: `(left == right)` Diff < left / right > : /** * @returns {Promise} */ export function foo() { const ret = wasm.foo(); return ret; } export function __wbg___wbindgen_debug_string_1d67e6b9cb4af7dd(arg0, arg1) { const ret = debugString(arg1); const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); const len1 = WASM_VECTOR_LEN; getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); } export function __wbg___wbindgen_is_function_23e2dfe0c7e5054f(arg0) { const ret = typeof(arg0) === 'function'; return ret; } export function __wbg___wbindgen_is_undefined_d44a4c1e41ccffb0(arg0) { const ret = arg0 === undefined; return ret; } export function __wbg___wbindgen_throw_466bb9aa11cb890a(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); } export function __wbg__wbg_cb_unref_e94a945391d00ff2(arg0) { arg0._wbg_cb_unref(); } export function __wbg_call_d68e7770fba7f6eb() { return handleError(function (arg0, arg1, arg2) { const ret = arg0.call(arg1, arg2); return ret; }, arguments); } export function __wbg_new_typed_4c200accdde4f3a3(arg0, arg1) { try { var state0 = {a: arg0, b: arg1}; var cb0 = (arg0, arg1) => { const a = state0.a; state0.a = 0; try { return wasm_bindgen__convert__closures_____invoke__h0000000000000002(a, state0.b, arg0, arg1); } finally { state0.a = a; } }; const ret = new Promise(cb0); return ret; } finally { state0.a = 0; } } export function __wbg_queueMicrotask_10964779d964bef7(arg0) { const ret = arg0.queueMicrotask; return ret; } export function __wbg_queueMicrotask_5e31d26bee93a930(arg0) { > queueMicrotask(arg0); >} >export function __wbg_resolve_730d0fd7be4a6218(arg0) { const ret = Promise.resolve(arg0); return ret; } export function __wbg_run_9227ca2f41f878c5(arg0, arg1, arg2) { try { var state0 = {a: arg1, b: arg2}; var cb0 = () => { const a = state0.a; state0.a = 0; try { return wasm_bindgen__convert__closures_____invoke__h0000000000000003(a, state0.b, ); } finally { state0.a = a; } }; const ret = arg0.run(cb0); return ret; } finally { state0.a = 0; } } export function __wbg_static_accessor_CREATE_TASK_98c021c7bb4e201d() { const ret = typeof console === 'undefined' ? null : console?.createTask; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_GLOBAL_4f52c14942a6e24a() { const ret = typeof global === 'undefined' ? null : global; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_GLOBAL_THIS_4a5df4c30924bc39() { const ret = typeof globalThis === 'undefined' ? null : globalThis; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_SELF_c8dfd8be8f08e852() { const ret = typeof self === 'undefined' ? null : self; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_WINDOW_1a8fdd6a17dbaf35() { const ret = typeof window === 'undefined' ? null : window; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_then_f36f56a6cb7bcf6e(arg0, arg1) { const ret = arg0.then(arg1); return ret; } export function __wbindgen_cast_0000000000000000(arg0, arg1) { // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 5, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`. const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h0000000000000004); return ret; } export function __wbindgen_cast_0000000000000001(arg0, arg1) { // Cast intrinsic for `Ref(String) -> Externref`. const ret = getStringFromWasm0(arg0, arg1); return ret; } export function __wbindgen_init_externref_table() { const table = wasm.__wbindgen_externrefs; const offset = table.grow(4); table.set(0, undefined); table.set(offset + 0, undefined); table.set(offset + 1, null); table.set(offset + 2, true); table.set(offset + 3, false); } function wasm_bindgen__convert__closures_____invoke__h0000000000000003(arg0, arg1) { const ret = wasm.wasm_bindgen__convert__closures_____invoke__h0000000000000003(arg0, arg1); return ret !== 0; } function wasm_bindgen__convert__closures_____invoke__h0000000000000004(arg0, arg1, arg2) { const ret = wasm.wasm_bindgen__convert__closures_____invoke__h0000000000000004(arg0, arg1, arg2); if (ret[1]) { throw takeFromExternrefTable0(ret[0]); } } function wasm_bindgen__convert__closures_____invoke__h0000000000000002(arg0, arg1, arg2, arg3) { wasm.wasm_bindgen__convert__closures_____invoke__h0000000000000002(arg0, arg1, arg2, arg3); } function addToExternrefTable0(obj) { const idx = wasm.__externref_table_alloc(); wasm.__wbindgen_externrefs.set(idx, obj); return idx; } const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined') ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry(state => wasm.__wbindgen_destroy_closure(state.a, state.b)); function debugString(val) { // primitive types const type = typeof val; if (type == 'number' || type == 'boolean' || val == null) { return `${val}`; } if (type == 'string') { return `"${val}"`; } if (type == 'symbol') { const description = val.description; if (description == null) { return 'Symbol'; } else { return `Symbol(${description})`; } } if (type == 'function') { const name = val.name; if (typeof name == 'string' && name.length > 0) { return `Function(${name})`; } else { return 'Function'; } } // objects if (Array.isArray(val)) { const length = val.length; let debug = '['; if (length > 0) { debug += debugString(val[0]); } for(let i = 1; i < length; i++) { debug += ', ' + debugString(val[i]); } debug += ']'; return debug; } // Test for built-in const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val)); let className; if (builtInMatches && builtInMatches.length > 1) { className = builtInMatches[1]; } else { // Failed to match the standard '[object ClassName]' return toString.call(val); } if (className == 'Object') { // we're a user defined class or Object // JSON.stringify avoids problems with cycles, and is generally much // easier than looping through ownProperties of `val`. try { return 'Object(' + JSON.stringify(val) + ')'; } catch (_) { return 'Object'; } } // errors if (val instanceof Error) { return `${val.name}: ${val.message}\n${val.stack}`; } // TODO we could test for more things here, like `Set`s and `Map`s. return className; } let cachedDataViewMemory0 = null; function getDataViewMemory0() { if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) { cachedDataViewMemory0 = new DataView(wasm.memory.buffer); } return cachedDataViewMemory0; } function getStringFromWasm0(ptr, len) { return decodeText(ptr >>> 0, len); } let cachedUint8ArrayMemory0 = null; function getUint8ArrayMemory0() { if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) { cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer); } return cachedUint8ArrayMemory0; } function handleError(f, args) { try { return f.apply(this, args); } catch (e) { const idx = addToExternrefTable0(e); wasm.__wbindgen_exn_store(idx); } } function isLikeNone(x) { return x === undefined || x === null; } function makeMutClosure(arg0, arg1, f) { const state = { a: arg0, b: arg1, cnt: 1 }; const real = (...args) => { // First up with a closure we increment the internal reference // count. This ensures that the Rust closure environment won't // be deallocated while we're invoking it. state.cnt++; const a = state.a; state.a = 0; try { return f(a, state.b, ...args); } finally { state.a = a; real._wbg_cb_unref(); } }; real._wbg_cb_unref = () => { if (--state.cnt === 0) { wasm.__wbindgen_destroy_closure(state.a, state.b); state.a = 0; CLOSURE_DTORS.unregister(state); } }; CLOSURE_DTORS.register(real, state, state); return real; } function passStringToWasm0(arg, malloc, realloc) { if (realloc === undefined) { const buf = cachedTextEncoder.encode(arg); const ptr = malloc(buf.length, 1) >>> 0; getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf); WASM_VECTOR_LEN = buf.length; return ptr; } let len = arg.length; let ptr = malloc(len, 1) >>> 0; const mem = getUint8ArrayMemory0(); let offset = 0; for (; offset < len; offset++) { const code = arg.charCodeAt(offset); if (code > 0x7F) break; mem[ptr + offset] = code; } if (offset !== len) { if (offset !== 0) { arg = arg.slice(offset); } ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0; const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len); const ret = cachedTextEncoder.encodeInto(arg, view); offset += ret.written; ptr = realloc(ptr, len, offset, 1) >>> 0; } WASM_VECTOR_LEN = offset; return ptr; } function takeFromExternrefTable0(idx) { const value = wasm.__wbindgen_externrefs.get(idx); wasm.__externref_table_dealloc(idx); return value; } let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); cachedTextDecoder.decode(); const MAX_SAFARI_DECODE_BYTES = 2146435072; let numBytesDecoded = 0; function decodeText(ptr, len) { numBytesDecoded += len; if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) { cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); cachedTextDecoder.decode(); numBytesDecoded = len; } return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len)); } const cachedTextEncoder = new TextEncoder(); if (!('encodeInto' in cachedTextEncoder)) { cachedTextEncoder.encodeInto = function (arg, view) { const buf = cachedTextEncoder.encode(arg); view.set(buf); return { read: arg.length, written: buf.length }; }; } let WASM_VECTOR_LEN = 0; let wasm; export function __wbg_set_wasm(val) { wasm = val; } ---- reference::runtest::test_08_closures_rs stdout ---- thread 'reference::runtest::test_08_closures_rs' (64933) panicked at crates/cli/tests/wasm-bindgen/reference.rs:128:13: assertion failed: `(left == right)` Diff < left / right > : export function delayed_callback() { const ret = wasm.delayed_callback(); if (ret[1]) { throw takeFromExternrefTable0(ret[0]); } } export function use_scoped_callback() { wasm.use_scoped_callback(); } /** * @param {Array} a */ export function use_stack_callback(a) { wasm.use_stack_callback(a); } export function __wbg___wbindgen_is_undefined_d44a4c1e41ccffb0(arg0) { const ret = arg0 === undefined; return ret; } export function __wbg___wbindgen_throw_466bb9aa11cb890a(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); } export function __wbg__wbg_cb_unref_e94a945391d00ff2(arg0) { arg0._wbg_cb_unref(); } export function __wbg_call_scoped_dce7d2be0c47dc1c(arg0) { call_scoped(arg0); } export function __wbg_forEach_2f6c301f53dffa95(arg0, arg1, arg2) { try { var state0 = {a: arg1, b: arg2}; var cb0 = (arg0, arg1, arg2) => { const a = state0.a; state0.a = 0; try { return wasm_bindgen__convert__closures_____invoke__h0000000000000003(a, state0.b, arg0, arg1, arg2); } finally { state0.a = a; } }; arg0.forEach(cb0); } finally { state0.a = 0; } } export function __wbg_instanceof_Window_d80d58f3ad5b4cbd(arg0) { let result; try { result = arg0 instanceof Window; } catch (_) { result = false; } const ret = result; return ret; } export function __wbg_log_ff093e90c30290ec(arg0) { console.log(arg0); } export function __wbg_setTimeout_2f4660604a2f16bd() { return handleError(function (arg0, arg1) { const ret = arg0.setTimeout(arg1); return ret; }, arguments); } export function __wbg_static_accessor_GLOBAL_4f52c14942a6e24a() { const ret = typeof global === 'undefined' ? null : global; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_GLOBAL_THIS_4a5df4c30924bc39() { const ret = typeof globalThis === 'undefined' ? null : globalThis; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_SELF_c8dfd8be8f08e852() { const ret = typeof self === 'undefined' ? null : self; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_WINDOW_1a8fdd6a17dbaf35() { const ret = typeof window === 'undefined' ? null : window; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbindgen_cast_0000000000000000(arg0, arg1) { var state0 = {a: arg0, b: arg1}; var cb0 = () => { const a = state0.a; state0.a = 0; try { return wasm_bindgen__convert__closures_____invoke__h0000000000000004(a, state0.b, ); } finally { state0.a = a; } }; cb0._wbg_cb_unref = () => state0.a = 0; // Cast intrinsic for `Closure(Closure { owned: false, function: Function { arguments: [], shim_idx: 6, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`. const ret = cb0; return ret; } export function __wbindgen_cast_0000000000000001(arg0, arg1) { // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 7, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`. const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h0000000000000005); return ret; } export function __wbindgen_cast_0000000000000002(arg0, arg1) { // Cast intrinsic for `Ref(String) -> Externref`. const ret = getStringFromWasm0(arg0, arg1); return ret; } export function __wbindgen_init_externref_table() { const table = wasm.__wbindgen_externrefs; const offset = table.grow(4); table.set(0, undefined); table.set(offset + 0, undefined); table.set(offset + 1, null); table.set(offset + 2, true); table.set(offset + 3, false); } function wasm_bindgen__convert__closures_____invoke__h0000000000000004(arg0, arg1) { wasm.wasm_bindgen__convert__closures_____invoke__h0000000000000004(arg0, arg1); } function wasm_bindgen__convert__closures_____invoke__h0000000000000005(arg0, arg1) { wasm.wasm_bindgen__convert__closures_____invoke__h0000000000000005(arg0, arg1); } function wasm_bindgen__convert__closures_____invoke__h0000000000000003(arg0, arg1, arg2, arg3, arg4) { wasm.wasm_bindgen__convert__closures_____invoke__h0000000000000003(arg0, arg1, arg2, arg3, arg4); } function addToExternrefTable0(obj) { const idx = wasm.__externref_table_alloc(); wasm.__wbindgen_externrefs.set(idx, obj); return idx; } const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined') ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry(state => wasm.__wbindgen_destroy_closure(state.a, state.b)); function getStringFromWasm0(ptr, len) { return decodeText(ptr >>> 0, len); } let cachedUint8ArrayMemory0 = null; function getUint8ArrayMemory0() { if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) { cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer); } return cachedUint8ArrayMemory0; } function handleError(f, args) { try { return f.apply(this, args); } catch (e) { const idx = addToExternrefTable0(e); wasm.__wbindgen_exn_store(idx); } } function isLikeNone(x) { return x === undefined || x === null; } function makeMutClosure(arg0, arg1, f) { const state = { a: arg0, b: arg1, cnt: 1 }; const real = (...args) => { // First up with a closure we increment the internal reference // count. This ensures that the Rust closure environment won't // be deallocated while we're invoking it. state.cnt++; const a = state.a; state.a = 0; try { return f(a, state.b, ...args); } finally { state.a = a; real._wbg_cb_unref(); } }; real._wbg_cb_unref = () => { if (--state.cnt === 0) { wasm.__wbindgen_destroy_closure(state.a, state.b); state.a = 0; CLOSURE_DTORS.unregister(state); } }; CLOSURE_DTORS.register(real, state, state); return real; } function takeFromExternrefTable0(idx) { const value = wasm.__wbindgen_externrefs.get(idx); wasm.__externref_table_dealloc(idx); return value; } let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); cachedTextDecoder.decode(); const MAX_SAFARI_DECODE_BYTES = 2146435072; let numBytesDecoded = 0; function decodeText(ptr, len) { numBytesDecoded += len; if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) { cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); cachedTextDecoder.decode(); numBytesDecoded = len; } return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len)); } let wasm; export function __wbg_set_wasm(val) { wasm = val; } ---- reference::runtest::test_09_constructor_rs stdout ---- thread 'reference::runtest::test_09_constructor_rs' (64991) panicked at crates/cli/tests/wasm-bindgen/reference.rs:128:13: assertion failed: `(left == right)` Diff < left / right > : export class ClassConstructor { __destroy_into_raw() { const ptr = this.__wbg_ptr; this.__wbg_ptr = 0; ClassConstructorFinalization.unregister(this); return ptr; } free() { const ptr = this.__destroy_into_raw(); wasm.__wbg_classconstructor_free(ptr, 0); } constructor() { const ret = wasm.classconstructor_new(); this.__wbg_ptr = ret; ClassConstructorFinalization.register(this, this.__wbg_ptr, this); return this; } } if (Symbol.dispose) ClassConstructor.prototype[Symbol.dispose] = ClassConstructor.prototype.free; export function __wbg___wbindgen_throw_466bb9aa11cb890a(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); } export function __wbindgen_init_externref_table() { const table = wasm.__wbindgen_externrefs; const offset = table.grow(4); table.set(0, undefined); table.set(offset + 0, undefined); table.set(offset + 1, null); table.set(offset + 2, true); table.set(offset + 3, false); } const ClassConstructorFinalization = (typeof FinalizationRegistry === 'undefined') ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry(ptr => wasm.__wbg_classconstructor_free(ptr, 1)); function getStringFromWasm0(ptr, len) { return decodeText(ptr >>> 0, len); } let cachedUint8ArrayMemory0 = null; function getUint8ArrayMemory0() { if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) { cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer); } return cachedUint8ArrayMemory0; } let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); cachedTextDecoder.decode(); const MAX_SAFARI_DECODE_BYTES = 2146435072; let numBytesDecoded = 0; function decodeText(ptr, len) { numBytesDecoded += len; if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) { cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); cachedTextDecoder.decode(); numBytesDecoded = len; } return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len)); } let wasm; export function __wbg_set_wasm(val) { wasm = val; } ---- reference::runtest::test_11_default_class_rs stdout ---- thread 'reference::runtest::test_11_default_class_rs' (65031) panicked at crates/cli/tests/wasm-bindgen/reference.rs:128:13: assertion failed: `(left == right)` Diff < left / right > : class _default { __destroy_into_raw() { const ptr = this.__wbg_ptr; this.__wbg_ptr = 0; _defaultFinalization.unregister(this); return ptr; } free() { const ptr = this.__destroy_into_raw(); wasm.__wbg_default_free(ptr, 0); } /** * @returns {number} */ get_value() { const ret = wasm.default_get_value(this.__wbg_ptr); return ret; } /** * @param {number} value */ constructor(value) { const ret = wasm.default_new(value); this.__wbg_ptr = ret; _defaultFinalization.register(this, this.__wbg_ptr, this); return this; } } if (Symbol.dispose) _default.prototype[Symbol.dispose] = _default.prototype.free; export { _default as default } export function __wbg___wbindgen_throw_466bb9aa11cb890a(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); } export function __wbindgen_init_externref_table() { const table = wasm.__wbindgen_externrefs; const offset = table.grow(4); table.set(0, undefined); table.set(offset + 0, undefined); table.set(offset + 1, null); table.set(offset + 2, true); table.set(offset + 3, false); } const _defaultFinalization = (typeof FinalizationRegistry === 'undefined') ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry(ptr => wasm.__wbg_default_free(ptr, 1)); function getStringFromWasm0(ptr, len) { return decodeText(ptr >>> 0, len); } let cachedUint8ArrayMemory0 = null; function getUint8ArrayMemory0() { if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) { cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer); } return cachedUint8ArrayMemory0; } let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); cachedTextDecoder.decode(); const MAX_SAFARI_DECODE_BYTES = 2146435072; let numBytesDecoded = 0; function decodeText(ptr, len) { numBytesDecoded += len; if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) { cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); cachedTextDecoder.decode(); numBytesDecoded = len; } return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len)); } let wasm; export function __wbg_set_wasm(val) { wasm = val; } ---- reference::runtest::test_14_echo_rs stdout ---- thread 'reference::runtest::test_14_echo_rs' (65100) panicked at crates/cli/tests/wasm-bindgen/reference.rs:128:13: assertion failed: `(left == right)` Diff < left / right > : export class Foo { static __wrap(ptr) { const obj = Object.create(Foo.prototype); obj.__wbg_ptr = ptr; FooFinalization.register(obj, obj.__wbg_ptr, obj); return obj; } static __unwrap(jsValue) { if (!(jsValue instanceof Foo)) { return 0; } return jsValue.__destroy_into_raw(); } __destroy_into_raw() { const ptr = this.__wbg_ptr; this.__wbg_ptr = 0; FooFinalization.unregister(this); return ptr; } free() { const ptr = this.__destroy_into_raw(); wasm.__wbg_foo_free(ptr, 0); } } if (Symbol.dispose) Foo.prototype[Symbol.dispose] = Foo.prototype.free; /** * @param {boolean} a * @returns {boolean} */ export function echo_bool(a) { const ret = wasm.echo_bool(a); return ret !== 0; } /** * @param {string} a * @returns {string} */ export function echo_char(a) { const char0 = a.codePointAt(0); _assertChar(char0); const ret = wasm.echo_char(char0); return String.fromCodePoint(ret); } /** * @param {number} a * @returns {number} */ export function echo_f32(a) { const ret = wasm.echo_f32(a); return ret; } /** * @param {number} a * @returns {number} */ export function echo_f64(a) { const ret = wasm.echo_f64(a); return ret; } /** * @param {bigint} a * @returns {bigint} */ export function echo_i128(a) { const ret = wasm.echo_i128(a, a >> BigInt(64)); return (BigInt.asUintN(64, ret[0]) | (ret[1] << BigInt(64))); } /** * @param {number} a * @returns {number} */ export function echo_i16(a) { const ret = wasm.echo_i16(a); return ret; } /** * @param {number} a * @returns {number} */ export function echo_i32(a) { const ret = wasm.echo_i32(a); return ret; } /** * @param {bigint} a * @returns {bigint} */ export function echo_i64(a) { const ret = wasm.echo_i64(a); return ret; } /** * @param {number} a * @returns {number} */ export function echo_i8(a) { const ret = wasm.echo_i8(a); return ret; } /** * @param {number} a * @returns {number} */ export function echo_isize(a) { const ret = wasm.echo_isize(a); return ret; } /** * @param {boolean | null} [a] * @returns {boolean | undefined} */ export function echo_option_bool(a) { const ret = wasm.echo_option_bool(isLikeNone(a) ? 0xFFFFFF : a ? 1 : 0); return ret === 0xFFFFFF ? undefined : ret !== 0; } /** * @param {string | null} [a] * @returns {string | undefined} */ export function echo_option_char(a) { const char0 = isLikeNone(a) ? 0xFFFFFF : a.codePointAt(0); if (char0 !== 0xFFFFFF) { _assertChar(char0); } const ret = wasm.echo_option_char(char0); return ret === 0xFFFFFF ? undefined : String.fromCodePoint(ret); } /** * @param {number | null} [a] * @returns {number | undefined} */ export function echo_option_f32(a) { const ret = wasm.echo_option_f32(isLikeNone(a) ? Number.MAX_SAFE_INTEGER : Math.fround(a)); return ret === Number.MAX_SAFE_INTEGER ? undefined : ret; } /** * @param {number | null} [a] * @returns {number | undefined} */ export function echo_option_f64(a) { const ret = wasm.echo_option_f64(!isLikeNone(a), isLikeNone(a) ? 0 : a); return ret[0] === 0 ? undefined : ret[1]; } /** * @param {bigint | null} [a] * @returns {bigint | undefined} */ export function echo_option_i128(a) { const ret = wasm.echo_option_i128(!isLikeNone(a), isLikeNone(a) ? BigInt(0) : a, isLikeNone(a) ? BigInt(0) : a >> BigInt(64)); return ret[0] === 0 ? undefined : (BigInt.asUintN(64, ret[1]) | (ret[2] << BigInt(64))); } /** * @param {number | null} [a] * @returns {number | undefined} */ export function echo_option_i16(a) { const ret = wasm.echo_option_i16(isLikeNone(a) ? 0xFFFFFF : a); return ret === 0xFFFFFF ? undefined : ret; } /** * @param {number | null} [a] * @returns {number | undefined} */ export function echo_option_i32(a) { const ret = wasm.echo_option_i32(isLikeNone(a) ? Number.MAX_SAFE_INTEGER : (a) >> 0); return ret === Number.MAX_SAFE_INTEGER ? undefined : ret; } /** * @param {bigint | null} [a] * @returns {bigint | undefined} */ export function echo_option_i64(a) { const ret = wasm.echo_option_i64(!isLikeNone(a), isLikeNone(a) ? BigInt(0) : a); return ret[0] === 0 ? undefined : ret[1]; } /** * @param {number | null} [a] * @returns {number | undefined} */ export function echo_option_i8(a) { const ret = wasm.echo_option_i8(isLikeNone(a) ? 0xFFFFFF : a); return ret === 0xFFFFFF ? undefined : ret; } /** * @param {number | null} [a] * @returns {number | undefined} */ export function echo_option_isize(a) { const ret = wasm.echo_option_isize(isLikeNone(a) ? Number.MAX_SAFE_INTEGER : (a) >> 0); return ret === Number.MAX_SAFE_INTEGER ? undefined : ret; } /** * @param {string | null} [a] * @returns {string | undefined} */ export function echo_option_string(a) { var ptr0 = isLikeNone(a) ? 0 : passStringToWasm0(a, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); var len0 = WASM_VECTOR_LEN; const ret = wasm.echo_option_string(ptr0, len0); let v2; if (ret[0] !== 0) { v2 = getStringFromWasm0(ret[0], ret[1]).slice(); wasm.__wbindgen_free(ret[0], ret[1] * 1, 1); } return v2; } /** * @param {Foo | null} [a] * @returns {Foo | undefined} */ export function echo_option_struct(a) { let ptr0 = 0; if (!isLikeNone(a)) { _assertClass(a, Foo); ptr0 = a.__destroy_into_raw(); } const ret = wasm.echo_option_struct(ptr0); return ret === 0 ? undefined : Foo.__wrap(ret); } /** * @param {bigint | null} [a] * @returns {bigint | undefined} */ export function echo_option_u128(a) { const ret = wasm.echo_option_u128(!isLikeNone(a), isLikeNone(a) ? BigInt(0) : a, isLikeNone(a) ? BigInt(0) : a >> BigInt(64)); return ret[0] === 0 ? undefined : (BigInt.asUintN(64, ret[1]) | (BigInt.asUintN(64, ret[2]) << BigInt(64))); } /** * @param {number | null} [a] * @returns {number | undefined} */ export function echo_option_u16(a) { const ret = wasm.echo_option_u16(isLikeNone(a) ? 0xFFFFFF : a); return ret === 0xFFFFFF ? undefined : ret; } /** * @param {number | null} [a] * @returns {number | undefined} */ export function echo_option_u32(a) { const ret = wasm.echo_option_u32(isLikeNone(a) ? Number.MAX_SAFE_INTEGER : (a) >>> 0); return ret === Number.MAX_SAFE_INTEGER ? undefined : ret; } /** * @param {bigint | null} [a] * @returns {bigint | undefined} */ export function echo_option_u64(a) { const ret = wasm.echo_option_u64(!isLikeNone(a), isLikeNone(a) ? BigInt(0) : a); return ret[0] === 0 ? undefined : BigInt.asUintN(64, ret[1]); } /** * @param {number | null} [a] * @returns {number | undefined} */ export function echo_option_u8(a) { const ret = wasm.echo_option_u8(isLikeNone(a) ? 0xFFFFFF : a); return ret === 0xFFFFFF ? undefined : ret; } /** * @param {number | null} [a] * @returns {number | undefined} */ export function echo_option_usize(a) { const ret = wasm.echo_option_usize(isLikeNone(a) ? Number.MAX_SAFE_INTEGER : (a) >>> 0); return ret === Number.MAX_SAFE_INTEGER ? undefined : ret; } /** * @param {Int16Array | null} [a] * @returns {Int16Array | undefined} */ export function echo_option_vec_i16(a) { var ptr0 = isLikeNone(a) ? 0 : passArray16ToWasm0(a, wasm.__wbindgen_malloc); var len0 = WASM_VECTOR_LEN; const ret = wasm.echo_option_vec_i16(ptr0, len0); let v2; if (ret[0] !== 0) { v2 = getArrayI16FromWasm0(ret[0], ret[1]).slice(); wasm.__wbindgen_free(ret[0], ret[1] * 2, 2); } return v2; } /** * @param {Int32Array | null} [a] * @returns {Int32Array | undefined} */ export function echo_option_vec_i32(a) { var ptr0 = isLikeNone(a) ? 0 : passArray32ToWasm0(a, wasm.__wbindgen_malloc); var len0 = WASM_VECTOR_LEN; const ret = wasm.echo_option_vec_i32(ptr0, len0); let v2; if (ret[0] !== 0) { v2 = getArrayI32FromWasm0(ret[0], ret[1]).slice(); wasm.__wbindgen_free(ret[0], ret[1] * 4, 4); } return v2; } /** * @param {BigInt64Array | null} [a] * @returns {BigInt64Array | undefined} */ export function echo_option_vec_i64(a) { var ptr0 = isLikeNone(a) ? 0 : passArray64ToWasm0(a, wasm.__wbindgen_malloc); var len0 = WASM_VECTOR_LEN; const ret = wasm.echo_option_vec_i64(ptr0, len0); let v2; if (ret[0] !== 0) { v2 = getArrayI64FromWasm0(ret[0], ret[1]).slice(); wasm.__wbindgen_free(ret[0], ret[1] * 8, 8); } return v2; } /** * @param {Int8Array | null} [a] * @returns {Int8Array | undefined} */ export function echo_option_vec_i8(a) { var ptr0 = isLikeNone(a) ? 0 : passArray8ToWasm0(a, wasm.__wbindgen_malloc); var len0 = WASM_VECTOR_LEN; const ret = wasm.echo_option_vec_i8(ptr0, len0); let v2; if (ret[0] !== 0) { v2 = getArrayI8FromWasm0(ret[0], ret[1]).slice(); wasm.__wbindgen_free(ret[0], ret[1] * 1, 1); } return v2; } /** * @param {string[] | null} [a] * @returns {string[] | undefined} */ export function echo_option_vec_string(a) { var ptr0 = isLikeNone(a) ? 0 : passArrayJsValueToWasm0(a, wasm.__wbindgen_malloc); var len0 = WASM_VECTOR_LEN; const ret = wasm.echo_option_vec_string(ptr0, len0); let v2; if (ret[0] !== 0) { v2 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice(); wasm.__wbindgen_free(ret[0], ret[1] * 4, 4); } return v2; } /** * @param {Foo[] | null} [a] * @returns {Foo[] | undefined} */ export function echo_option_vec_struct(a) { var ptr0 = isLikeNone(a) ? 0 : passArrayJsValueToWasm0(a, wasm.__wbindgen_malloc); var len0 = WASM_VECTOR_LEN; const ret = wasm.echo_option_vec_struct(ptr0, len0); let v2; if (ret[0] !== 0) { v2 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice(); wasm.__wbindgen_free(ret[0], ret[1] * 4, 4); } return v2; } /** * @param {Uint16Array | null} [a] * @returns {Uint16Array | undefined} */ export function echo_option_vec_u16(a) { var ptr0 = isLikeNone(a) ? 0 : passArray16ToWasm0(a, wasm.__wbindgen_malloc); var len0 = WASM_VECTOR_LEN; const ret = wasm.echo_option_vec_u16(ptr0, len0); let v2; if (ret[0] !== 0) { v2 = getArrayU16FromWasm0(ret[0], ret[1]).slice(); wasm.__wbindgen_free(ret[0], ret[1] * 2, 2); } return v2; } /** * @param {Uint32Array | null} [a] * @returns {Uint32Array | undefined} */ export function echo_option_vec_u32(a) { var ptr0 = isLikeNone(a) ? 0 : passArray32ToWasm0(a, wasm.__wbindgen_malloc); var len0 = WASM_VECTOR_LEN; const ret = wasm.echo_option_vec_u32(ptr0, len0); let v2; if (ret[0] !== 0) { v2 = getArrayU32FromWasm0(ret[0], ret[1]).slice(); wasm.__wbindgen_free(ret[0], ret[1] * 4, 4); } return v2; } /** * @param {BigUint64Array | null} [a] * @returns {BigUint64Array | undefined} */ export function echo_option_vec_u64(a) { var ptr0 = isLikeNone(a) ? 0 : passArray64ToWasm0(a, wasm.__wbindgen_malloc); var len0 = WASM_VECTOR_LEN; const ret = wasm.echo_option_vec_u64(ptr0, len0); let v2; if (ret[0] !== 0) { v2 = getArrayU64FromWasm0(ret[0], ret[1]).slice(); wasm.__wbindgen_free(ret[0], ret[1] * 8, 8); } return v2; } /** * @param {Uint8Array | null} [a] * @returns {Uint8Array | undefined} */ export function echo_option_vec_u8(a) { var ptr0 = isLikeNone(a) ? 0 : passArray8ToWasm0(a, wasm.__wbindgen_malloc); var len0 = WASM_VECTOR_LEN; const ret = wasm.echo_option_vec_u8(ptr0, len0); let v2; if (ret[0] !== 0) { v2 = getArrayU8FromWasm0(ret[0], ret[1]).slice(); wasm.__wbindgen_free(ret[0], ret[1] * 1, 1); } return v2; } /** * @param {Int16Array | null} [a] * @returns {Int16Array | undefined} */ export function echo_option_vec_uninit_i16(a) { var ptr0 = isLikeNone(a) ? 0 : passArray16ToWasm0(a, wasm.__wbindgen_malloc); var len0 = WASM_VECTOR_LEN; const ret = wasm.echo_option_vec_uninit_i16(ptr0, len0); let v2; if (ret[0] !== 0) { v2 = getArrayI16FromWasm0(ret[0], ret[1]).slice(); wasm.__wbindgen_free(ret[0], ret[1] * 2, 2); } return v2; } /** * @param {Int32Array | null} [a] * @returns {Int32Array | undefined} */ export function echo_option_vec_uninit_i32(a) { var ptr0 = isLikeNone(a) ? 0 : passArray32ToWasm0(a, wasm.__wbindgen_malloc); var len0 = WASM_VECTOR_LEN; const ret = wasm.echo_option_vec_uninit_i32(ptr0, len0); let v2; if (ret[0] !== 0) { v2 = getArrayI32FromWasm0(ret[0], ret[1]).slice(); wasm.__wbindgen_free(ret[0], ret[1] * 4, 4); } return v2; } /** * @param {BigInt64Array | null} [a] * @returns {BigInt64Array | undefined} */ export function echo_option_vec_uninit_i64(a) { var ptr0 = isLikeNone(a) ? 0 : passArray64ToWasm0(a, wasm.__wbindgen_malloc); var len0 = WASM_VECTOR_LEN; const ret = wasm.echo_option_vec_uninit_i64(ptr0, len0); let v2; if (ret[0] !== 0) { v2 = getArrayI64FromWasm0(ret[0], ret[1]).slice(); wasm.__wbindgen_free(ret[0], ret[1] * 8, 8); } return v2; } /** * @param {Int8Array | null} [a] * @returns {Int8Array | undefined} */ export function echo_option_vec_uninit_i8(a) { var ptr0 = isLikeNone(a) ? 0 : passArray8ToWasm0(a, wasm.__wbindgen_malloc); var len0 = WASM_VECTOR_LEN; const ret = wasm.echo_option_vec_uninit_i8(ptr0, len0); let v2; if (ret[0] !== 0) { v2 = getArrayI8FromWasm0(ret[0], ret[1]).slice(); wasm.__wbindgen_free(ret[0], ret[1] * 1, 1); } return v2; } /** * @param {Uint16Array | null} [a] * @returns {Uint16Array | undefined} */ export function echo_option_vec_uninit_u16(a) { var ptr0 = isLikeNone(a) ? 0 : passArray16ToWasm0(a, wasm.__wbindgen_malloc); var len0 = WASM_VECTOR_LEN; const ret = wasm.echo_option_vec_uninit_u16(ptr0, len0); let v2; if (ret[0] !== 0) { v2 = getArrayU16FromWasm0(ret[0], ret[1]).slice(); wasm.__wbindgen_free(ret[0], ret[1] * 2, 2); } return v2; } /** * @param {Uint32Array | null} [a] * @returns {Uint32Array | undefined} */ export function echo_option_vec_uninit_u32(a) { var ptr0 = isLikeNone(a) ? 0 : passArray32ToWasm0(a, wasm.__wbindgen_malloc); var len0 = WASM_VECTOR_LEN; const ret = wasm.echo_option_vec_uninit_u32(ptr0, len0); let v2; if (ret[0] !== 0) { v2 = getArrayU32FromWasm0(ret[0], ret[1]).slice(); wasm.__wbindgen_free(ret[0], ret[1] * 4, 4); } return v2; } /** * @param {BigUint64Array | null} [a] * @returns {BigUint64Array | undefined} */ export function echo_option_vec_uninit_u64(a) { var ptr0 = isLikeNone(a) ? 0 : passArray64ToWasm0(a, wasm.__wbindgen_malloc); var len0 = WASM_VECTOR_LEN; const ret = wasm.echo_option_vec_uninit_u64(ptr0, len0); let v2; if (ret[0] !== 0) { v2 = getArrayU64FromWasm0(ret[0], ret[1]).slice(); wasm.__wbindgen_free(ret[0], ret[1] * 8, 8); } return v2; } /** * @param {Uint8Array | null} [a] * @returns {Uint8Array | undefined} */ export function echo_option_vec_uninit_u8(a) { var ptr0 = isLikeNone(a) ? 0 : passArray8ToWasm0(a, wasm.__wbindgen_malloc); var len0 = WASM_VECTOR_LEN; const ret = wasm.echo_option_vec_uninit_u8(ptr0, len0); let v2; if (ret[0] !== 0) { v2 = getArrayU8FromWasm0(ret[0], ret[1]).slice(); wasm.__wbindgen_free(ret[0], ret[1] * 1, 1); } return v2; } /** * @param {string} a * @returns {string} */ export function echo_string(a) { let deferred2_0; let deferred2_1; try { const ptr0 = passStringToWasm0(a, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); const len0 = WASM_VECTOR_LEN; const ret = wasm.echo_string(ptr0, len0); deferred2_0 = ret[0]; deferred2_1 = ret[1]; return getStringFromWasm0(ret[0], ret[1]); } finally { wasm.__wbindgen_free(deferred2_0, deferred2_1, 1); } } /** * @param {Foo} a * @returns {Foo} */ export function echo_struct(a) { _assertClass(a, Foo); var ptr0 = a.__destroy_into_raw(); const ret = wasm.echo_struct(ptr0); return Foo.__wrap(ret); } /** * @param {bigint} a * @returns {bigint} */ export function echo_u128(a) { const ret = wasm.echo_u128(a, a >> BigInt(64)); return (BigInt.asUintN(64, ret[0]) | (BigInt.asUintN(64, ret[1]) << BigInt(64))); } /** * @param {number} a * @returns {number} */ export function echo_u16(a) { const ret = wasm.echo_u16(a); return ret; } /** * @param {number} a * @returns {number} */ export function echo_u32(a) { const ret = wasm.echo_u32(a); return ret >>> 0; } /** * @param {bigint} a * @returns {bigint} */ export function echo_u64(a) { const ret = wasm.echo_u64(a); return BigInt.asUintN(64, ret); } /** * @param {number} a * @returns {number} */ export function echo_u8(a) { const ret = wasm.echo_u8(a); return ret; } /** * @param {number} a * @returns {number} */ export function echo_usize(a) { const ret = wasm.echo_usize(a); return ret >>> 0; } /** * @param {Int16Array} a * @returns {Int16Array} */ export function echo_vec_i16(a) { const ptr0 = passArray16ToWasm0(a, wasm.__wbindgen_malloc); const len0 = WASM_VECTOR_LEN; const ret = wasm.echo_vec_i16(ptr0, len0); var v2 = getArrayI16FromWasm0(ret[0], ret[1]).slice(); wasm.__wbindgen_free(ret[0], ret[1] * 2, 2); return v2; } /** * @param {Int32Array} a * @returns {Int32Array} */ export function echo_vec_i32(a) { const ptr0 = passArray32ToWasm0(a, wasm.__wbindgen_malloc); const len0 = WASM_VECTOR_LEN; const ret = wasm.echo_vec_i32(ptr0, len0); var v2 = getArrayI32FromWasm0(ret[0], ret[1]).slice(); wasm.__wbindgen_free(ret[0], ret[1] * 4, 4); return v2; } /** * @param {BigInt64Array} a * @returns {BigInt64Array} */ export function echo_vec_i64(a) { const ptr0 = passArray64ToWasm0(a, wasm.__wbindgen_malloc); const len0 = WASM_VECTOR_LEN; const ret = wasm.echo_vec_i64(ptr0, len0); var v2 = getArrayI64FromWasm0(ret[0], ret[1]).slice(); wasm.__wbindgen_free(ret[0], ret[1] * 8, 8); return v2; } /** * @param {Int8Array} a * @returns {Int8Array} */ export function echo_vec_i8(a) { const ptr0 = passArray8ToWasm0(a, wasm.__wbindgen_malloc); const len0 = WASM_VECTOR_LEN; const ret = wasm.echo_vec_i8(ptr0, len0); var v2 = getArrayI8FromWasm0(ret[0], ret[1]).slice(); wasm.__wbindgen_free(ret[0], ret[1] * 1, 1); return v2; } /** * @param {string[]} a * @returns {string[]} */ export function echo_vec_string(a) { const ptr0 = passArrayJsValueToWasm0(a, wasm.__wbindgen_malloc); const len0 = WASM_VECTOR_LEN; const ret = wasm.echo_vec_string(ptr0, len0); var v2 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice(); wasm.__wbindgen_free(ret[0], ret[1] * 4, 4); return v2; } /** * @param {Foo[]} a * @returns {Foo[]} */ export function echo_vec_struct(a) { const ptr0 = passArrayJsValueToWasm0(a, wasm.__wbindgen_malloc); const len0 = WASM_VECTOR_LEN; const ret = wasm.echo_vec_struct(ptr0, len0); var v2 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice(); wasm.__wbindgen_free(ret[0], ret[1] * 4, 4); return v2; } /** * @param {Uint16Array} a * @returns {Uint16Array} */ export function echo_vec_u16(a) { const ptr0 = passArray16ToWasm0(a, wasm.__wbindgen_malloc); const len0 = WASM_VECTOR_LEN; const ret = wasm.echo_vec_u16(ptr0, len0); var v2 = getArrayU16FromWasm0(ret[0], ret[1]).slice(); wasm.__wbindgen_free(ret[0], ret[1] * 2, 2); return v2; } /** * @param {Uint32Array} a * @returns {Uint32Array} */ export function echo_vec_u32(a) { const ptr0 = passArray32ToWasm0(a, wasm.__wbindgen_malloc); const len0 = WASM_VECTOR_LEN; const ret = wasm.echo_vec_u32(ptr0, len0); var v2 = getArrayU32FromWasm0(ret[0], ret[1]).slice(); wasm.__wbindgen_free(ret[0], ret[1] * 4, 4); return v2; } /** * @param {BigUint64Array} a * @returns {BigUint64Array} */ export function echo_vec_u64(a) { const ptr0 = passArray64ToWasm0(a, wasm.__wbindgen_malloc); const len0 = WASM_VECTOR_LEN; const ret = wasm.echo_vec_u64(ptr0, len0); var v2 = getArrayU64FromWasm0(ret[0], ret[1]).slice(); wasm.__wbindgen_free(ret[0], ret[1] * 8, 8); return v2; } /** * @param {Uint8Array} a * @returns {Uint8Array} */ export function echo_vec_u8(a) { const ptr0 = passArray8ToWasm0(a, wasm.__wbindgen_malloc); const len0 = WASM_VECTOR_LEN; const ret = wasm.echo_vec_u8(ptr0, len0); var v2 = getArrayU8FromWasm0(ret[0], ret[1]).slice(); wasm.__wbindgen_free(ret[0], ret[1] * 1, 1); return v2; } /** * @param {Int16Array} a * @returns {Int16Array} */ export function echo_vec_uninit_i16(a) { const ptr0 = passArray16ToWasm0(a, wasm.__wbindgen_malloc); const len0 = WASM_VECTOR_LEN; const ret = wasm.echo_vec_uninit_i16(ptr0, len0); var v2 = getArrayI16FromWasm0(ret[0], ret[1]).slice(); wasm.__wbindgen_free(ret[0], ret[1] * 2, 2); return v2; } /** * @param {Int32Array} a * @returns {Int32Array} */ export function echo_vec_uninit_i32(a) { const ptr0 = passArray32ToWasm0(a, wasm.__wbindgen_malloc); const len0 = WASM_VECTOR_LEN; const ret = wasm.echo_vec_uninit_i32(ptr0, len0); var v2 = getArrayI32FromWasm0(ret[0], ret[1]).slice(); wasm.__wbindgen_free(ret[0], ret[1] * 4, 4); return v2; } /** * @param {BigInt64Array} a * @returns {BigInt64Array} */ export function echo_vec_uninit_i64(a) { const ptr0 = passArray64ToWasm0(a, wasm.__wbindgen_malloc); const len0 = WASM_VECTOR_LEN; const ret = wasm.echo_vec_uninit_i64(ptr0, len0); var v2 = getArrayI64FromWasm0(ret[0], ret[1]).slice(); wasm.__wbindgen_free(ret[0], ret[1] * 8, 8); return v2; } /** * @param {Int8Array} a * @returns {Int8Array} */ export function echo_vec_uninit_i8(a) { const ptr0 = passArray8ToWasm0(a, wasm.__wbindgen_malloc); const len0 = WASM_VECTOR_LEN; const ret = wasm.echo_vec_uninit_i8(ptr0, len0); var v2 = getArrayI8FromWasm0(ret[0], ret[1]).slice(); wasm.__wbindgen_free(ret[0], ret[1] * 1, 1); return v2; } /** * @param {Uint16Array} a * @returns {Uint16Array} */ export function echo_vec_uninit_u16(a) { const ptr0 = passArray16ToWasm0(a, wasm.__wbindgen_malloc); const len0 = WASM_VECTOR_LEN; const ret = wasm.echo_vec_uninit_u16(ptr0, len0); var v2 = getArrayU16FromWasm0(ret[0], ret[1]).slice(); wasm.__wbindgen_free(ret[0], ret[1] * 2, 2); return v2; } /** * @param {Uint32Array} a * @returns {Uint32Array} */ export function echo_vec_uninit_u32(a) { const ptr0 = passArray32ToWasm0(a, wasm.__wbindgen_malloc); const len0 = WASM_VECTOR_LEN; const ret = wasm.echo_vec_uninit_u32(ptr0, len0); var v2 = getArrayU32FromWasm0(ret[0], ret[1]).slice(); wasm.__wbindgen_free(ret[0], ret[1] * 4, 4); return v2; } /** * @param {BigUint64Array} a * @returns {BigUint64Array} */ export function echo_vec_uninit_u64(a) { const ptr0 = passArray64ToWasm0(a, wasm.__wbindgen_malloc); const len0 = WASM_VECTOR_LEN; const ret = wasm.echo_vec_uninit_u64(ptr0, len0); var v2 = getArrayU64FromWasm0(ret[0], ret[1]).slice(); wasm.__wbindgen_free(ret[0], ret[1] * 8, 8); return v2; } /** * @param {Uint8Array} a * @returns {Uint8Array} */ export function echo_vec_uninit_u8(a) { const ptr0 = passArray8ToWasm0(a, wasm.__wbindgen_malloc); const len0 = WASM_VECTOR_LEN; const ret = wasm.echo_vec_uninit_u8(ptr0, len0); var v2 = getArrayU8FromWasm0(ret[0], ret[1]).slice(); wasm.__wbindgen_free(ret[0], ret[1] * 1, 1); return v2; } export function __wbg___wbindgen_debug_string_1d67e6b9cb4af7dd(arg0, arg1) { const ret = debugString(arg1); const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); const len1 = WASM_VECTOR_LEN; getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); } export function __wbg___wbindgen_string_get_5d576fa1f3954188(arg0, arg1) { const obj = arg1; const ret = typeof(obj) === 'string' ? obj : undefined; var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); var len1 = WASM_VECTOR_LEN; getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); } export function __wbg___wbindgen_throw_466bb9aa11cb890a(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); } export function __wbg_foo_new(arg0) { const ret = Foo.__wrap(arg0); return ret; } export function __wbg_foo_unwrap(arg0) { const ret = Foo.__unwrap(arg0); return ret; } export function __wbindgen_cast_0000000000000000(arg0, arg1) { // Cast intrinsic for `Ref(String) -> Externref`. const ret = getStringFromWasm0(arg0, arg1); return ret; } export function __wbindgen_init_externref_table() { const table = wasm.__wbindgen_externrefs; const offset = table.grow(4); table.set(0, undefined); table.set(offset + 0, undefined); table.set(offset + 1, null); table.set(offset + 2, true); table.set(offset + 3, false); } const FooFinalization = (typeof FinalizationRegistry === 'undefined') ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry(ptr => wasm.__wbg_foo_free(ptr, 1)); function addToExternrefTable0(obj) { const idx = wasm.__externref_table_alloc(); wasm.__wbindgen_externrefs.set(idx, obj); return idx; } function _assertChar(c) { if (typeof(c) === 'number' && (c >= 0x110000 || (c >= 0xD800 && c < 0xE000))) throw new Error(`expected a valid Unicode scalar value, found ${c}`); } function _assertClass(instance, klass) { if (!(instance instanceof klass)) { throw new Error(`expected instance of ${klass.name}`); } } function debugString(val) { // primitive types const type = typeof val; if (type == 'number' || type == 'boolean' || val == null) { return `${val}`; } if (type == 'string') { return `"${val}"`; } if (type == 'symbol') { const description = val.description; if (description == null) { return 'Symbol'; } else { return `Symbol(${description})`; } } if (type == 'function') { const name = val.name; if (typeof name == 'string' && name.length > 0) { return `Function(${name})`; } else { return 'Function'; } } // objects if (Array.isArray(val)) { const length = val.length; let debug = '['; if (length > 0) { debug += debugString(val[0]); } for(let i = 1; i < length; i++) { debug += ', ' + debugString(val[i]); } debug += ']'; return debug; } // Test for built-in const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val)); let className; if (builtInMatches && builtInMatches.length > 1) { className = builtInMatches[1]; } else { // Failed to match the standard '[object ClassName]' return toString.call(val); } if (className == 'Object') { // we're a user defined class or Object // JSON.stringify avoids problems with cycles, and is generally much // easier than looping through ownProperties of `val`. try { return 'Object(' + JSON.stringify(val) + ')'; } catch (_) { return 'Object'; } } // errors if (val instanceof Error) { return `${val.name}: ${val.message}\n${val.stack}`; } // TODO we could test for more things here, like `Set`s and `Map`s. return className; } function getArrayI16FromWasm0(ptr, len) { ptr = ptr >>> 0; return getInt16ArrayMemory0().subarray(ptr / 2, ptr / 2 + len); } function getArrayI32FromWasm0(ptr, len) { ptr = ptr >>> 0; return getInt32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len); } function getArrayI64FromWasm0(ptr, len) { ptr = ptr >>> 0; return getBigInt64ArrayMemory0().subarray(ptr / 8, ptr / 8 + len); } function getArrayI8FromWasm0(ptr, len) { ptr = ptr >>> 0; return getInt8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len); } function getArrayJsValueFromWasm0(ptr, len) { ptr = ptr >>> 0; const mem = getDataViewMemory0(); const result = []; for (let i = ptr; i < ptr + 4 * len; i += 4) { result.push(wasm.__wbindgen_externrefs.get(mem.getUint32(i, true))); } wasm.__externref_drop_slice(ptr, len); return result; } function getArrayU16FromWasm0(ptr, len) { ptr = ptr >>> 0; return getUint16ArrayMemory0().subarray(ptr / 2, ptr / 2 + len); } function getArrayU32FromWasm0(ptr, len) { ptr = ptr >>> 0; return getUint32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len); } function getArrayU64FromWasm0(ptr, len) { ptr = ptr >>> 0; return getBigUint64ArrayMemory0().subarray(ptr / 8, ptr / 8 + len); } function getArrayU8FromWasm0(ptr, len) { ptr = ptr >>> 0; return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len); } let cachedBigInt64ArrayMemory0 = null; function getBigInt64ArrayMemory0() { if (cachedBigInt64ArrayMemory0 === null || cachedBigInt64ArrayMemory0.byteLength === 0) { cachedBigInt64ArrayMemory0 = new BigInt64Array(wasm.memory.buffer); } return cachedBigInt64ArrayMemory0; } let cachedBigUint64ArrayMemory0 = null; function getBigUint64ArrayMemory0() { if (cachedBigUint64ArrayMemory0 === null || cachedBigUint64ArrayMemory0.byteLength === 0) { cachedBigUint64ArrayMemory0 = new BigUint64Array(wasm.memory.buffer); } return cachedBigUint64ArrayMemory0; } let cachedDataViewMemory0 = null; function getDataViewMemory0() { if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) { cachedDataViewMemory0 = new DataView(wasm.memory.buffer); } return cachedDataViewMemory0; } let cachedInt16ArrayMemory0 = null; function getInt16ArrayMemory0() { if (cachedInt16ArrayMemory0 === null || cachedInt16ArrayMemory0.byteLength === 0) { cachedInt16ArrayMemory0 = new Int16Array(wasm.memory.buffer); } return cachedInt16ArrayMemory0; } let cachedInt32ArrayMemory0 = null; function getInt32ArrayMemory0() { if (cachedInt32ArrayMemory0 === null || cachedInt32ArrayMemory0.byteLength === 0) { cachedInt32ArrayMemory0 = new Int32Array(wasm.memory.buffer); } return cachedInt32ArrayMemory0; } let cachedInt8ArrayMemory0 = null; function getInt8ArrayMemory0() { if (cachedInt8ArrayMemory0 === null || cachedInt8ArrayMemory0.byteLength === 0) { cachedInt8ArrayMemory0 = new Int8Array(wasm.memory.buffer); } return cachedInt8ArrayMemory0; } function getStringFromWasm0(ptr, len) { return decodeText(ptr >>> 0, len); } let cachedUint16ArrayMemory0 = null; function getUint16ArrayMemory0() { if (cachedUint16ArrayMemory0 === null || cachedUint16ArrayMemory0.byteLength === 0) { cachedUint16ArrayMemory0 = new Uint16Array(wasm.memory.buffer); } return cachedUint16ArrayMemory0; } let cachedUint32ArrayMemory0 = null; function getUint32ArrayMemory0() { if (cachedUint32ArrayMemory0 === null || cachedUint32ArrayMemory0.byteLength === 0) { cachedUint32ArrayMemory0 = new Uint32Array(wasm.memory.buffer); } return cachedUint32ArrayMemory0; } let cachedUint8ArrayMemory0 = null; function getUint8ArrayMemory0() { if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) { cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer); } return cachedUint8ArrayMemory0; } function isLikeNone(x) { return x === undefined || x === null; } function passArray16ToWasm0(arg, malloc) { const ptr = malloc(arg.length * 2, 2) >>> 0; getUint16ArrayMemory0().set(arg, ptr / 2); WASM_VECTOR_LEN = arg.length; return ptr; } function passArray32ToWasm0(arg, malloc) { const ptr = malloc(arg.length * 4, 4) >>> 0; getUint32ArrayMemory0().set(arg, ptr / 4); WASM_VECTOR_LEN = arg.length; return ptr; } function passArray64ToWasm0(arg, malloc) { const ptr = malloc(arg.length * 8, 8) >>> 0; getBigUint64ArrayMemory0().set(arg, ptr / 8); WASM_VECTOR_LEN = arg.length; return ptr; } function passArray8ToWasm0(arg, malloc) { const ptr = malloc(arg.length * 1, 1) >>> 0; getUint8ArrayMemory0().set(arg, ptr / 1); WASM_VECTOR_LEN = arg.length; return ptr; } function passArrayJsValueToWasm0(array, malloc) { const ptr = malloc(array.length * 4, 4) >>> 0; for (let i = 0; i < array.length; i++) { const add = addToExternrefTable0(array[i]); getDataViewMemory0().setUint32(ptr + 4 * i, add, true); } WASM_VECTOR_LEN = array.length; return ptr; } function passStringToWasm0(arg, malloc, realloc) { if (realloc === undefined) { const buf = cachedTextEncoder.encode(arg); const ptr = malloc(buf.length, 1) >>> 0; getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf); WASM_VECTOR_LEN = buf.length; return ptr; } let len = arg.length; let ptr = malloc(len, 1) >>> 0; const mem = getUint8ArrayMemory0(); let offset = 0; for (; offset < len; offset++) { const code = arg.charCodeAt(offset); if (code > 0x7F) break; mem[ptr + offset] = code; } if (offset !== len) { if (offset !== 0) { arg = arg.slice(offset); } ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0; const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len); const ret = cachedTextEncoder.encodeInto(arg, view); offset += ret.written; ptr = realloc(ptr, len, offset, 1) >>> 0; } WASM_VECTOR_LEN = offset; return ptr; } let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); cachedTextDecoder.decode(); const MAX_SAFARI_DECODE_BYTES = 2146435072; let numBytesDecoded = 0; function decodeText(ptr, len) { numBytesDecoded += len; if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) { cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); cachedTextDecoder.decode(); numBytesDecoded = len; } return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len)); } const cachedTextEncoder = new TextEncoder(); if (!('encodeInto' in cachedTextEncoder)) { cachedTextEncoder.encodeInto = function (arg, view) { const buf = cachedTextEncoder.encode(arg); view.set(buf); return { read: arg.length, written: buf.length }; }; } let WASM_VECTOR_LEN = 0; let wasm; export function __wbg_set_wasm(val) { wasm = val; } ---- reference::runtest::test_13_dynamic_union_rs stdout ---- thread 'reference::runtest::test_13_dynamic_union_rs' (65093) panicked at crates/cli/tests/wasm-bindgen/reference.rs:128:13: assertion failed: `(left == right)` Diff < left / right > : import { ImportedType } from 'tests'; export class ExportedStruct { static __wrap(ptr) { const obj = Object.create(ExportedStruct.prototype); obj.__wbg_ptr = ptr; ExportedStructFinalization.register(obj, obj.__wbg_ptr, obj); return obj; } static __unwrap(jsValue) { if (!(jsValue instanceof ExportedStruct)) { return 0; } return jsValue.__destroy_into_raw(); } __destroy_into_raw() { const ptr = this.__wbg_ptr; this.__wbg_ptr = 0; ExportedStructFinalization.unregister(this); return ptr; } free() { const ptr = this.__destroy_into_raw(); wasm.__wbg_exportedstruct_free(ptr, 0); } /** * @param {number} value */ constructor(value) { const ret = wasm.exportedstruct_new(value); this.__wbg_ptr = ret; ExportedStructFinalization.register(this, this.__wbg_ptr, this); return this; } } if (Symbol.dispose) ExportedStruct.prototype[Symbol.dispose] = ExportedStruct.prototype.free; /** * @param {FallbackUnion} u * @returns {FallbackUnion} */ export function echo_fallback(u) { const ret = wasm.echo_fallback(u); return ret; } /** * @param {Wrapper | null} [w] * @returns {Wrapper | undefined} */ export function echo_optional_wrapper(w) { const ret = wasm.echo_optional_wrapper(isLikeNone(w) ? 0 : addToExternrefTable0(w)); return ret; } /** * @param {ApiResponse} response * @returns {ApiResponse} */ export function echo_response(response) { const ret = wasm.echo_response(response); return ret; } /** * @param {Status} status * @returns {Status} */ export function echo_status(status) { const ret = wasm.echo_status(status); return ret; } /** * @param {Wrapper} w * @returns {Wrapper} */ export function echo_wrapper(w) { const ret = wasm.echo_wrapper(w); return ret; } export function __wbg___wbindgen_is_undefined_d44a4c1e41ccffb0(arg0) { const ret = arg0 === undefined; return ret; } export function __wbg___wbindgen_string_get_5d576fa1f3954188(arg0, arg1) { const obj = arg1; const ret = typeof(obj) === 'string' ? obj : undefined; var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); var len1 = WASM_VECTOR_LEN; getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); } export function __wbg___wbindgen_throw_466bb9aa11cb890a(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); } export function __wbg_exportedstruct_new(arg0) { const ret = ExportedStruct.__wrap(arg0); return ret; } export function __wbg_exportedstruct_unwrap(arg0) { const ret = ExportedStruct.__unwrap(arg0); return ret; } export function __wbg_instanceof_ImportedType_0243232e84bb3e1d(arg0) { let result; try { result = arg0 instanceof ImportedType; } catch (_) { result = false; } const ret = result; return ret; } export function __wbindgen_cast_0000000000000000(arg0, arg1) { // Cast intrinsic for `Ref(String) -> Externref`. const ret = getStringFromWasm0(arg0, arg1); return ret; } export function __wbindgen_init_externref_table() { const table = wasm.__wbindgen_externrefs; const offset = table.grow(4); table.set(0, undefined); table.set(offset + 0, undefined); table.set(offset + 1, null); table.set(offset + 2, true); table.set(offset + 3, false); } const ExportedStructFinalization = (typeof FinalizationRegistry === 'undefined') ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry(ptr => wasm.__wbg_exportedstruct_free(ptr, 1)); function addToExternrefTable0(obj) { const idx = wasm.__externref_table_alloc(); wasm.__wbindgen_externrefs.set(idx, obj); return idx; } let cachedDataViewMemory0 = null; function getDataViewMemory0() { if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) { cachedDataViewMemory0 = new DataView(wasm.memory.buffer); } return cachedDataViewMemory0; } function getStringFromWasm0(ptr, len) { return decodeText(ptr >>> 0, len); } let cachedUint8ArrayMemory0 = null; function getUint8ArrayMemory0() { if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) { cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer); } return cachedUint8ArrayMemory0; } function isLikeNone(x) { return x === undefined || x === null; } function passStringToWasm0(arg, malloc, realloc) { if (realloc === undefined) { const buf = cachedTextEncoder.encode(arg); const ptr = malloc(buf.length, 1) >>> 0; getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf); WASM_VECTOR_LEN = buf.length; return ptr; } let len = arg.length; let ptr = malloc(len, 1) >>> 0; const mem = getUint8ArrayMemory0(); let offset = 0; for (; offset < len; offset++) { const code = arg.charCodeAt(offset); if (code > 0x7F) break; mem[ptr + offset] = code; } if (offset !== len) { if (offset !== 0) { arg = arg.slice(offset); } ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0; const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len); const ret = cachedTextEncoder.encodeInto(arg, view); offset += ret.written; ptr = realloc(ptr, len, offset, 1) >>> 0; } WASM_VECTOR_LEN = offset; return ptr; } let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); cachedTextDecoder.decode(); const MAX_SAFARI_DECODE_BYTES = 2146435072; let numBytesDecoded = 0; function decodeText(ptr, len) { numBytesDecoded += len; if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) { cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); cachedTextDecoder.decode(); numBytesDecoded = len; } return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len)); } const cachedTextEncoder = new TextEncoder(); if (!('encodeInto' in cachedTextEncoder)) { cachedTextEncoder.encodeInto = function (arg, view) { const buf = cachedTextEncoder.encode(arg); view.set(buf); return { read: arg.length, written: buf.length }; }; } let WASM_VECTOR_LEN = 0; let wasm; export function __wbg_set_wasm(val) { wasm = val; } ---- reference::runtest::test_16_enums_rs stdout ---- thread 'reference::runtest::test_16_enums_rs' (65186) panicked at crates/cli/tests/wasm-bindgen/reference.rs:128:13: assertion failed: `(left == right)` Diff < left / right > : /** * A color. * @enum {0 | 1 | 2} */ export const Color = Object.freeze({ /** * Green as a leaf. */ Green: 0, "0": "Green", /** * Yellow as the sun. */ Yellow: 1, "1": "Yellow", /** * Red as a rose. */ Red: 2, "2": "Red", }); /** * @enum {0 | 1 | 42 | 43} */ export const ImplicitDiscriminant = Object.freeze({ A: 0, "0": "A", B: 1, "1": "B", C: 42, "42": "C", D: 43, "43": "D", }); /** * A C-style enum with negative discriminants. * @enum {-1 | 0 | 1} */ export const Ordering = Object.freeze({ Less: -1, "-1": "Less", Equal: 0, "0": "Equal", Greater: 1, "1": "Greater", }); /** * @param {Color} color * @returns {Color} */ export function enum_echo(color) { const ret = wasm.enum_echo(color); return ret; } /** * @param {Color} color * @returns {ColorName} */ export function get_name(color) { const ret = wasm.get_name(color); return __wbindgen_enum_ColorName[ret]; } /** * @param {Color | null} [color] * @returns {Color | undefined} */ export function option_enum_echo(color) { const ret = wasm.option_enum_echo(isLikeNone(color) ? 3 : color); return ret === 3 ? undefined : ret; } /** * @param {Ordering | null} [order] * @returns {Ordering | undefined} */ export function option_order(order) { const ret = wasm.option_order(isLikeNone(order) ? 2 : order); return ret === 2 ? undefined : ret; } /** * @param {ColorName | null} [color] * @returns {ColorName | undefined} */ export function option_string_enum_echo(color) { const ret = wasm.option_string_enum_echo(isLikeNone(color) ? 4 : ((__wbindgen_enum_ColorName.indexOf(color) + 1 || 4) - 1)); return __wbindgen_enum_ColorName[ret]; } export function __wbg___wbindgen_throw_466bb9aa11cb890a(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); } export function __wbindgen_init_externref_table() { const table = wasm.__wbindgen_externrefs; const offset = table.grow(4); table.set(0, undefined); table.set(offset + 0, undefined); table.set(offset + 1, null); table.set(offset + 2, true); table.set(offset + 3, false); } const __wbindgen_enum_ColorName = ["green", "yellow", "red"]; function getStringFromWasm0(ptr, len) { return decodeText(ptr >>> 0, len); } let cachedUint8ArrayMemory0 = null; function getUint8ArrayMemory0() { if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) { cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer); } return cachedUint8ArrayMemory0; } function isLikeNone(x) { return x === undefined || x === null; } let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); cachedTextDecoder.decode(); const MAX_SAFARI_DECODE_BYTES = 2146435072; let numBytesDecoded = 0; function decodeText(ptr, len) { numBytesDecoded += len; if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) { cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); cachedTextDecoder.decode(); numBytesDecoded = len; } return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len)); } let wasm; export function __wbg_set_wasm(val) { wasm = val; } ---- reference::runtest::test_17_exported_class_rename_collision_rs stdout ---- thread 'reference::runtest::test_17_exported_class_rename_collision_rs' (65199) panicked at crates/cli/tests/wasm-bindgen/reference.rs:128:13: assertion failed: `(left == right)` Diff < left / right > : export class BarPoint { __destroy_into_raw() { const ptr = this.__wbg_ptr; this.__wbg_ptr = 0; BarPointFinalization.unregister(this); return ptr; } free() { const ptr = this.__destroy_into_raw(); wasm.__wbg_barpoint_free(ptr, 0); } /** * @param {number} y */ constructor(y) { const ret = wasm.barpoint_new(y); this.__wbg_ptr = ret; BarPointFinalization.register(this, this.__wbg_ptr, this); return this; } /** * @returns {number} */ get y() { const ret = wasm.barpoint_y(this.__wbg_ptr); return ret; } } if (Symbol.dispose) BarPoint.prototype[Symbol.dispose] = BarPoint.prototype.free; export class FooPoint { __destroy_into_raw() { const ptr = this.__wbg_ptr; this.__wbg_ptr = 0; FooPointFinalization.unregister(this); return ptr; } free() { const ptr = this.__destroy_into_raw(); wasm.__wbg_foopoint_free(ptr, 0); } /** * @param {number} x */ constructor(x) { const ret = wasm.foopoint_new(x); this.__wbg_ptr = ret; FooPointFinalization.register(this, this.__wbg_ptr, this); return this; } /** * @returns {number} */ get x() { const ret = wasm.foopoint_x(this.__wbg_ptr); return ret; } } if (Symbol.dispose) FooPoint.prototype[Symbol.dispose] = FooPoint.prototype.free; export function __wbg___wbindgen_throw_466bb9aa11cb890a(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); } export function __wbindgen_init_externref_table() { const table = wasm.__wbindgen_externrefs; const offset = table.grow(4); table.set(0, undefined); table.set(offset + 0, undefined); table.set(offset + 1, null); table.set(offset + 2, true); table.set(offset + 3, false); } const BarPointFinalization = (typeof FinalizationRegistry === 'undefined') ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry(ptr => wasm.__wbg_barpoint_free(ptr, 1)); const FooPointFinalization = (typeof FinalizationRegistry === 'undefined') ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry(ptr => wasm.__wbg_foopoint_free(ptr, 1)); function getStringFromWasm0(ptr, len) { return decodeText(ptr >>> 0, len); } let cachedUint8ArrayMemory0 = null; function getUint8ArrayMemory0() { if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) { cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer); } return cachedUint8ArrayMemory0; } let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); cachedTextDecoder.decode(); const MAX_SAFARI_DECODE_BYTES = 2146435072; let numBytesDecoded = 0; function decodeText(ptr, len) { numBytesDecoded += len; if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) { cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); cachedTextDecoder.decode(); numBytesDecoded = len; } return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len)); } let wasm; export function __wbg_set_wasm(val) { wasm = val; } ---- reference::runtest::test_18_exported_class_rename_wrap_rs stdout ---- thread 'reference::runtest::test_18_exported_class_rename_wrap_rs' (65209) panicked at crates/cli/tests/wasm-bindgen/reference.rs:128:13: assertion failed: `(left == right)` Diff < left / right > : export class Renamed { static __wrap(ptr) { const obj = Object.create(Renamed.prototype); obj.__wbg_ptr = ptr; RenamedFinalization.register(obj, obj.__wbg_ptr, obj); return obj; } static __unwrap(jsValue) { if (!(jsValue instanceof Renamed)) { return 0; } return jsValue.__destroy_into_raw(); } __destroy_into_raw() { const ptr = this.__wbg_ptr; this.__wbg_ptr = 0; RenamedFinalization.unregister(this); return ptr; } free() { const ptr = this.__destroy_into_raw(); wasm.__wbg_renamed_free(ptr, 0); } /** * @param {number} value */ constructor(value) { const ret = wasm.renamed_new(value); this.__wbg_ptr = ret; RenamedFinalization.register(this, this.__wbg_ptr, this); return this; } /** * @returns {number} */ get value() { const ret = wasm.renamed_value(this.__wbg_ptr); return ret; } } if (Symbol.dispose) Renamed.prototype[Symbol.dispose] = Renamed.prototype.free; /** * @param {number} value * @returns {any} */ export function makeRenamed(value) { const ret = wasm.makeRenamed(value); return ret; } /** * @param {Renamed[]} renameds * @returns {number} */ export function readRenameds(renameds) { const ptr0 = passArrayJsValueToWasm0(renameds, wasm.__wbindgen_malloc); const len0 = WASM_VECTOR_LEN; const ret = wasm.readRenameds(ptr0, len0); return ret >>> 0; } export function __wbg___wbindgen_debug_string_1d67e6b9cb4af7dd(arg0, arg1) { const ret = debugString(arg1); const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); const len1 = WASM_VECTOR_LEN; getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); } export function __wbg___wbindgen_throw_466bb9aa11cb890a(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); } export function __wbg_renamed_new(arg0) { const ret = Renamed.__wrap(arg0); return ret; } export function __wbg_renamed_unwrap(arg0) { const ret = Renamed.__unwrap(arg0); return ret; } export function __wbindgen_init_externref_table() { const table = wasm.__wbindgen_externrefs; const offset = table.grow(4); table.set(0, undefined); table.set(offset + 0, undefined); table.set(offset + 1, null); table.set(offset + 2, true); table.set(offset + 3, false); } const RenamedFinalization = (typeof FinalizationRegistry === 'undefined') ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry(ptr => wasm.__wbg_renamed_free(ptr, 1)); function addToExternrefTable0(obj) { const idx = wasm.__externref_table_alloc(); wasm.__wbindgen_externrefs.set(idx, obj); return idx; } function debugString(val) { // primitive types const type = typeof val; if (type == 'number' || type == 'boolean' || val == null) { return `${val}`; } if (type == 'string') { return `"${val}"`; } if (type == 'symbol') { const description = val.description; if (description == null) { return 'Symbol'; } else { return `Symbol(${description})`; } } if (type == 'function') { const name = val.name; if (typeof name == 'string' && name.length > 0) { return `Function(${name})`; } else { return 'Function'; } } // objects if (Array.isArray(val)) { const length = val.length; let debug = '['; if (length > 0) { debug += debugString(val[0]); } for(let i = 1; i < length; i++) { debug += ', ' + debugString(val[i]); } debug += ']'; return debug; } // Test for built-in const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val)); let className; if (builtInMatches && builtInMatches.length > 1) { className = builtInMatches[1]; } else { // Failed to match the standard '[object ClassName]' return toString.call(val); } if (className == 'Object') { // we're a user defined class or Object // JSON.stringify avoids problems with cycles, and is generally much // easier than looping through ownProperties of `val`. try { return 'Object(' + JSON.stringify(val) + ')'; } catch (_) { return 'Object'; } } // errors if (val instanceof Error) { return `${val.name}: ${val.message}\n${val.stack}`; } // TODO we could test for more things here, like `Set`s and `Map`s. return className; } let cachedDataViewMemory0 = null; function getDataViewMemory0() { if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) { cachedDataViewMemory0 = new DataView(wasm.memory.buffer); } return cachedDataViewMemory0; } function getStringFromWasm0(ptr, len) { return decodeText(ptr >>> 0, len); } let cachedUint8ArrayMemory0 = null; function getUint8ArrayMemory0() { if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) { cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer); } return cachedUint8ArrayMemory0; } function passArrayJsValueToWasm0(array, malloc) { const ptr = malloc(array.length * 4, 4) >>> 0; for (let i = 0; i < array.length; i++) { const add = addToExternrefTable0(array[i]); getDataViewMemory0().setUint32(ptr + 4 * i, add, true); } WASM_VECTOR_LEN = array.length; return ptr; } function passStringToWasm0(arg, malloc, realloc) { if (realloc === undefined) { const buf = cachedTextEncoder.encode(arg); const ptr = malloc(buf.length, 1) >>> 0; getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf); WASM_VECTOR_LEN = buf.length; return ptr; } let len = arg.length; let ptr = malloc(len, 1) >>> 0; const mem = getUint8ArrayMemory0(); let offset = 0; for (; offset < len; offset++) { const code = arg.charCodeAt(offset); if (code > 0x7F) break; mem[ptr + offset] = code; } if (offset !== len) { if (offset !== 0) { arg = arg.slice(offset); } ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0; const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len); const ret = cachedTextEncoder.encodeInto(arg, view); offset += ret.written; ptr = realloc(ptr, len, offset, 1) >>> 0; } WASM_VECTOR_LEN = offset; return ptr; } let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); cachedTextDecoder.decode(); const MAX_SAFARI_DECODE_BYTES = 2146435072; let numBytesDecoded = 0; function decodeText(ptr, len) { numBytesDecoded += len; if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) { cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); cachedTextDecoder.decode(); numBytesDecoded = len; } return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len)); } const cachedTextEncoder = new TextEncoder(); if (!('encodeInto' in cachedTextEncoder)) { cachedTextEncoder.encodeInto = function (arg, view) { const buf = cachedTextEncoder.encode(arg); view.set(buf); return { read: arg.length, written: buf.length }; }; } let WASM_VECTOR_LEN = 0; let wasm; export function __wbg_set_wasm(val) { wasm = val; } ---- reference::runtest::test_19_exported_class_wrap_matrix_rs stdout ---- thread 'reference::runtest::test_19_exported_class_wrap_matrix_rs' (65231) panicked at crates/cli/tests/wasm-bindgen/reference.rs:128:13: assertion failed: `(left == right)` Diff < left / right > : export class Animal { static __wrap(ptr) { const obj = Object.create(Animal.prototype); obj.__wbg_ptr = ptr; obj.__wbg_ptr_Animal = ptr; AnimalFinalization.register(obj, { __wbg_ptr_Animal: obj.__wbg_ptr_Animal }, obj); return obj; } static __unwrap(jsValue) { if (jsValue.__wbg_ptr !== jsValue.__wbg_ptr_Animal) { return 0; } return jsValue.__destroy_into_raw(); } __destroy_into_raw() { const ptr = this.__wbg_ptr; this.__wbg_ptr = 0; this.__wbg_ptr_Animal = 0; AnimalFinalization.unregister(this); return ptr; } free() { if (this.__wbg_ptr !== this.__wbg_ptr_Animal) { throw new TypeError('Animal: free cannot be invoked through subclass prototype dispatch'); } const ptr = this.__destroy_into_raw(); wasm.__wbg_animal_free(ptr, 0); } /** * @returns {number} */ get legs() { const ret = wasm.animal_legs(this.__wbg_ptr_Animal); return ret; } /** * @param {number} legs */ constructor(legs) { if (arguments[0] === __wbgSuperSkip) return; const ret = wasm.animal_new(legs); this.__wbg_ptr = ret >>> 0; this.__wbg_ptr_Animal = ret >>> 0; AnimalFinalization.register(this, { __wbg_ptr_Animal: ret >>> 0 }, this); return this; } } if (Symbol.dispose) Animal.prototype[Symbol.dispose] = Animal.prototype.free; export class Dog extends Animal { static __wrap(ptr) { const obj = Object.create(Dog.prototype); obj.__wbg_ptr = ptr; obj.__wbg_ptr_Dog = ptr; const __wbg_anc_0 = wasm.__wbg_upcast_dog_to_animal(ptr) >>> 0; obj.__wbg_ptr_Animal = __wbg_anc_0; DogFinalization.register(obj, { __wbg_ptr_Dog: obj.__wbg_ptr_Dog, __wbg_ptr_Animal: obj.__wbg_ptr_Animal }, obj); return obj; } static __unwrap(jsValue) { if (jsValue.__wbg_ptr !== jsValue.__wbg_ptr_Dog) { return 0; } return jsValue.__destroy_into_raw(); } __destroy_into_raw() { const ptr = this.__wbg_ptr; this.__wbg_ptr = 0; this.__wbg_ptr_Dog = 0; const __anc_Animal = this.__wbg_ptr_Animal; this.__wbg_ptr_Animal = 0; if (__anc_Animal !== 0) wasm.__wbg_animal_free(__anc_Animal >>> 0, 1); DogFinalization.unregister(this); return ptr; } free() { if (this.__wbg_ptr !== this.__wbg_ptr_Dog) { throw new TypeError('Dog: free cannot be invoked through subclass prototype dispatch'); } const ptr = this.__destroy_into_raw(); wasm.__wbg_dog_free(ptr, 0); } /** * @returns {number} */ get breed() { const ret = wasm.dog_breed(this.__wbg_ptr_Dog); return ret; } /** * @param {number} legs * @param {number} breed */ constructor(legs, breed) { super(__wbgSuperSkip); if (arguments[0] === __wbgSuperSkip) return; const ret = wasm.dog_new(legs, breed); this.__wbg_ptr = ret >>> 0; this.__wbg_ptr_Dog = ret >>> 0; const __wbg_anc_0 = wasm.__wbg_upcast_dog_to_animal(ret >>> 0) >>> 0; this.__wbg_ptr_Animal = __wbg_anc_0; DogFinalization.register(this, { __wbg_ptr_Dog: ret >>> 0, __wbg_ptr_Animal: __wbg_anc_0 }, this); return this; } } if (Symbol.dispose) Dog.prototype[Symbol.dispose] = Dog.prototype.free; export class Reserve extends wild__Habitat { static __wrap(ptr) { const obj = Object.create(Reserve.prototype); obj.__wbg_ptr = ptr; obj.__wbg_ptr_Reserve = ptr; const __wbg_anc_0 = wasm.__wbg_upcast_reserve_to_wild__habitat(ptr) >>> 0; obj.__wbg_ptr_wild__Habitat = __wbg_anc_0; ReserveFinalization.register(obj, { __wbg_ptr_Reserve: obj.__wbg_ptr_Reserve, __wbg_ptr_wild__Habitat: obj.__wbg_ptr_wild__Habitat }, obj); return obj; } static __unwrap(jsValue) { if (jsValue.__wbg_ptr !== jsValue.__wbg_ptr_Reserve) { return 0; } return jsValue.__destroy_into_raw(); } __destroy_into_raw() { const ptr = this.__wbg_ptr; this.__wbg_ptr = 0; this.__wbg_ptr_Reserve = 0; const __anc_wild__Habitat = this.__wbg_ptr_wild__Habitat; this.__wbg_ptr_wild__Habitat = 0; if (__anc_wild__Habitat !== 0) wasm.__wbg_wild__habitat_free(__anc_wild__Habitat >>> 0, 1); ReserveFinalization.unregister(this); return ptr; } free() { if (this.__wbg_ptr !== this.__wbg_ptr_Reserve) { throw new TypeError('Reserve: free cannot be invoked through subclass prototype dispatch'); } const ptr = this.__destroy_into_raw(); wasm.__wbg_reserve_free(ptr, 0); } /** * @param {number} area * @param {number} rangers */ constructor(area, rangers) { super(__wbgSuperSkip); if (arguments[0] === __wbgSuperSkip) return; const ret = wasm.reserve_new(area, rangers); this.__wbg_ptr = ret >>> 0; this.__wbg_ptr_Reserve = ret >>> 0; const __wbg_anc_0 = wasm.__wbg_upcast_reserve_to_wild__habitat(ret >>> 0) >>> 0; this.__wbg_ptr_wild__Habitat = __wbg_anc_0; ReserveFinalization.register(this, { __wbg_ptr_Reserve: ret >>> 0, __wbg_ptr_wild__Habitat: __wbg_anc_0 }, this); return this; } /** * @returns {number} */ get rangers() { const ret = wasm.reserve_rangers(this.__wbg_ptr_Reserve); return ret; } } if (Symbol.dispose) Reserve.prototype[Symbol.dispose] = Reserve.prototype.free; export class Vehicle { static __wrap(ptr) { const obj = Object.create(Vehicle.prototype); obj.__wbg_ptr = ptr; obj.__wbg_ptr_Vehicle = ptr; VehicleFinalization.register(obj, { __wbg_ptr_Vehicle: obj.__wbg_ptr_Vehicle }, obj); return obj; } static __unwrap(jsValue) { if (jsValue.__wbg_ptr !== jsValue.__wbg_ptr_Vehicle) { return 0; } return jsValue.__destroy_into_raw(); } __destroy_into_raw() { const ptr = this.__wbg_ptr; this.__wbg_ptr = 0; this.__wbg_ptr_Vehicle = 0; VehicleFinalization.unregister(this); return ptr; } free() { if (this.__wbg_ptr !== this.__wbg_ptr_Vehicle) { throw new TypeError('Vehicle: free cannot be invoked through subclass prototype dispatch'); } const ptr = this.__destroy_into_raw(); wasm.__wbg_vehicle_free(ptr, 0); } /** * @param {number} wheels */ constructor(wheels) { if (arguments[0] === __wbgSuperSkip) return; const ret = wasm.vehicle_new(wheels); this.__wbg_ptr = ret >>> 0; this.__wbg_ptr_Vehicle = ret >>> 0; VehicleFinalization.register(this, { __wbg_ptr_Vehicle: ret >>> 0 }, this); return this; } /** * @returns {number} */ get wheels() { const ret = wasm.vehicle_wheels(this.__wbg_ptr_Vehicle); return ret; } } if (Symbol.dispose) Vehicle.prototype[Symbol.dispose] = Vehicle.prototype.free; class garden__Derived extends zoo__Base { static __wrap(ptr) { const obj = Object.create(garden__Derived.prototype); obj.__wbg_ptr = ptr; obj.__wbg_ptr_garden__Derived = ptr; const __wbg_anc_0 = wasm.__wbg_upcast_garden__derived_to_zoo__base(ptr) >>> 0; obj.__wbg_ptr_zoo__Base = __wbg_anc_0; garden__DerivedFinalization.register(obj, { __wbg_ptr_garden__Derived: obj.__wbg_ptr_garden__Derived, __wbg_ptr_zoo__Base: obj.__wbg_ptr_zoo__Base }, obj); return obj; } static __unwrap(jsValue) { if (jsValue.__wbg_ptr !== jsValue.__wbg_ptr_garden__Derived) { return 0; } return jsValue.__destroy_into_raw(); } __destroy_into_raw() { const ptr = this.__wbg_ptr; this.__wbg_ptr = 0; this.__wbg_ptr_garden__Derived = 0; const __anc_zoo__Base = this.__wbg_ptr_zoo__Base; this.__wbg_ptr_zoo__Base = 0; if (__anc_zoo__Base !== 0) wasm.__wbg_zoo__base_free(__anc_zoo__Base >>> 0, 1); garden__DerivedFinalization.unregister(this); return ptr; } free() { if (this.__wbg_ptr !== this.__wbg_ptr_garden__Derived) { throw new TypeError('garden__Derived: free cannot be invoked through subclass prototype dispatch'); } const ptr = this.__destroy_into_raw(); wasm.__wbg_garden__derived_free(ptr, 0); } /** * @param {number} id * @param {number} tag */ constructor(id, tag) { super(__wbgSuperSkip); if (arguments[0] === __wbgSuperSkip) return; const ret = wasm.garden__derived_new(id, tag); this.__wbg_ptr = ret >>> 0; this.__wbg_ptr_garden__Derived = ret >>> 0; const __wbg_anc_0 = wasm.__wbg_upcast_garden__derived_to_zoo__base(ret >>> 0) >>> 0; this.__wbg_ptr_zoo__Base = __wbg_anc_0; garden__DerivedFinalization.register(this, { __wbg_ptr_garden__Derived: ret >>> 0, __wbg_ptr_zoo__Base: __wbg_anc_0 }, this); return this; } /** * @returns {number} */ get tag() { const ret = wasm.garden__derived_tag(this.__wbg_ptr_garden__Derived); return ret; } } if (Symbol.dispose) garden__Derived.prototype[Symbol.dispose] = garden__Derived.prototype.free; export const garden = {}; garden.Derived = garden__Derived; /** * @param {number} legs * @returns {any} */ export function makeAnimal(legs) { const ret = wasm.makeAnimal(legs); return ret; } /** * @param {number} id * @returns {any} */ export function makeBase(id) { const ret = wasm.makeBase(id); return ret; } /** * @param {number} wheels * @param {number} doors * @returns {any} */ export function makeCar(wheels, doors) { const ret = wasm.makeCar(wheels, doors); return ret; } /** * @param {number} id * @param {number} tag * @returns {any} */ export function makeDerived(id, tag) { const ret = wasm.makeDerived(id, tag); return ret; } /** * @param {number} legs * @param {number} breed * @returns {any} */ export function makeDog(legs, breed) { const ret = wasm.makeDog(legs, breed); return ret; } /** * @param {number} area * @returns {any} */ export function makeHabitat(area) { const ret = wasm.makeHabitat(area); return ret; } /** * @param {number} area * @param {number} rangers * @returns {any} */ export function makeReserve(area, rangers) { const ret = wasm.makeReserve(area, rangers); return ret; } /** * @param {number} wheels * @returns {any} */ export function makeVehicle(wheels) { const ret = wasm.makeVehicle(wheels); return ret; } /** * @param {number} v * @returns {any} */ export function makeWidget(v) { const ret = wasm.makeWidget(v); return ret; } class nsa__Widget { static __wrap(ptr) { const obj = Object.create(nsa__Widget.prototype); obj.__wbg_ptr = ptr; nsa__WidgetFinalization.register(obj, obj.__wbg_ptr, obj); return obj; } static __unwrap(jsValue) { if (!(jsValue instanceof nsa__Widget)) { return 0; } return jsValue.__destroy_into_raw(); } __destroy_into_raw() { const ptr = this.__wbg_ptr; this.__wbg_ptr = 0; nsa__WidgetFinalization.unregister(this); return ptr; } free() { const ptr = this.__destroy_into_raw(); wasm.__wbg_nsa__widget_free(ptr, 0); } /** * @param {number} v */ constructor(v) { if (arguments[0] === __wbgSuperSkip) return; const ret = wasm.nsa__widget_new(v); this.__wbg_ptr = ret; nsa__WidgetFinalization.register(this, this.__wbg_ptr, this); return this; } /** * @returns {number} */ get v() { const ret = wasm.nsa__widget_v(this.__wbg_ptr); return ret; } } if (Symbol.dispose) nsa__Widget.prototype[Symbol.dispose] = nsa__Widget.prototype.free; export const nsa = {}; nsa.Widget = nsa__Widget; /** * @param {Animal[]} animals * @returns {number} */ export function readAnimals(animals) { const ptr0 = passArrayJsValueToWasm0(animals, wasm.__wbindgen_malloc); const len0 = WASM_VECTOR_LEN; const ret = wasm.readAnimals(ptr0, len0); return ret >>> 0; } /** * @param {zoo__Base[]} bases * @returns {number} */ export function readBases(bases) { const ptr0 = passArrayJsValueToWasm0(bases, wasm.__wbindgen_malloc); const len0 = WASM_VECTOR_LEN; const ret = wasm.readBases(ptr0, len0); return ret >>> 0; } /** * @param {Car[]} cars * @returns {number} */ export function readCars(cars) { const ptr0 = passArrayJsValueToWasm0(cars, wasm.__wbindgen_malloc); const len0 = WASM_VECTOR_LEN; const ret = wasm.readCars(ptr0, len0); return ret >>> 0; } /** * @param {garden__Derived[]} deriveds * @returns {number} */ export function readDeriveds(deriveds) { const ptr0 = passArrayJsValueToWasm0(deriveds, wasm.__wbindgen_malloc); const len0 = WASM_VECTOR_LEN; const ret = wasm.readDeriveds(ptr0, len0); return ret >>> 0; } /** * @param {Dog} d * @returns {number} */ export function readDog(d) { _assertClass(d, Dog); if (d.__wbg_ptr !== d.__wbg_ptr_Dog) { throw new TypeError('expected exact instance of Dog; a wasm-bindgen descendant cannot be consumed by-value as its ancestor'); } var ptr0 = d.__destroy_into_raw(); const ret = wasm.readDog(ptr0); return ret; } /** * @param {Dog[]} dogs * @returns {number} */ export function readDogs(dogs) { const ptr0 = passArrayJsValueToWasm0(dogs, wasm.__wbindgen_malloc); const len0 = WASM_VECTOR_LEN; const ret = wasm.readDogs(ptr0, len0); return ret >>> 0; } /** * @param {wild__Habitat[]} habitats * @returns {number} */ export function readHabitats(habitats) { const ptr0 = passArrayJsValueToWasm0(habitats, wasm.__wbindgen_malloc); const len0 = WASM_VECTOR_LEN; const ret = wasm.readHabitats(ptr0, len0); return ret >>> 0; } /** * @param {Reserve[]} reserves * @returns {number} */ export function readReserves(reserves) { const ptr0 = passArrayJsValueToWasm0(reserves, wasm.__wbindgen_malloc); const len0 = WASM_VECTOR_LEN; const ret = wasm.readReserves(ptr0, len0); return ret >>> 0; } /** * @param {Vehicle[]} vehicles * @returns {number} */ export function readVehicles(vehicles) { const ptr0 = passArrayJsValueToWasm0(vehicles, wasm.__wbindgen_malloc); const len0 = WASM_VECTOR_LEN; const ret = wasm.readVehicles(ptr0, len0); return ret >>> 0; } /** * @param {nsa__Widget} w * @returns {number} */ export function readWidget(w) { _assertClass(w, nsa__Widget); var ptr0 = w.__destroy_into_raw(); const ret = wasm.readWidget(ptr0); return ret; } /** * @param {nsa__Widget[]} widgets * @returns {number} */ export function readWidgets(widgets) { const ptr0 = passArrayJsValueToWasm0(widgets, wasm.__wbindgen_malloc); const len0 = WASM_VECTOR_LEN; const ret = wasm.readWidgets(ptr0, len0); return ret >>> 0; } class wild__Habitat { static __wrap(ptr) { const obj = Object.create(wild__Habitat.prototype); obj.__wbg_ptr = ptr; obj.__wbg_ptr_wild__Habitat = ptr; wild__HabitatFinalization.register(obj, { __wbg_ptr_wild__Habitat: obj.__wbg_ptr_wild__Habitat }, obj); return obj; } static __unwrap(jsValue) { if (jsValue.__wbg_ptr !== jsValue.__wbg_ptr_wild__Habitat) { return 0; } return jsValue.__destroy_into_raw(); } __destroy_into_raw() { const ptr = this.__wbg_ptr; this.__wbg_ptr = 0; this.__wbg_ptr_wild__Habitat = 0; wild__HabitatFinalization.unregister(this); return ptr; } free() { if (this.__wbg_ptr !== this.__wbg_ptr_wild__Habitat) { throw new TypeError('wild__Habitat: free cannot be invoked through subclass prototype dispatch'); } const ptr = this.__destroy_into_raw(); wasm.__wbg_wild__habitat_free(ptr, 0); } /** * @returns {number} */ get area() { const ret = wasm.wild__habitat_area(this.__wbg_ptr_wild__Habitat); return ret; } /** * @param {number} area */ constructor(area) { if (arguments[0] === __wbgSuperSkip) return; const ret = wasm.wild__habitat_new(area); this.__wbg_ptr = ret >>> 0; this.__wbg_ptr_wild__Habitat = ret >>> 0; wild__HabitatFinalization.register(this, { __wbg_ptr_wild__Habitat: ret >>> 0 }, this); return this; } } if (Symbol.dispose) wild__Habitat.prototype[Symbol.dispose] = wild__Habitat.prototype.free; export const wild = {}; wild.Habitat = wild__Habitat; class zoo__Base { static __wrap(ptr) { const obj = Object.create(zoo__Base.prototype); obj.__wbg_ptr = ptr; obj.__wbg_ptr_zoo__Base = ptr; zoo__BaseFinalization.register(obj, { __wbg_ptr_zoo__Base: obj.__wbg_ptr_zoo__Base }, obj); return obj; } static __unwrap(jsValue) { if (jsValue.__wbg_ptr !== jsValue.__wbg_ptr_zoo__Base) { return 0; } return jsValue.__destroy_into_raw(); } __destroy_into_raw() { const ptr = this.__wbg_ptr; this.__wbg_ptr = 0; this.__wbg_ptr_zoo__Base = 0; zoo__BaseFinalization.unregister(this); return ptr; } free() { if (this.__wbg_ptr !== this.__wbg_ptr_zoo__Base) { throw new TypeError('zoo__Base: free cannot be invoked through subclass prototype dispatch'); } const ptr = this.__destroy_into_raw(); wasm.__wbg_zoo__base_free(ptr, 0); } /** * @returns {number} */ get id() { const ret = wasm.zoo__base_id(this.__wbg_ptr_zoo__Base); return ret; } /** * @param {number} id */ constructor(id) { if (arguments[0] === __wbgSuperSkip) return; const ret = wasm.zoo__base_new(id); this.__wbg_ptr = ret >>> 0; this.__wbg_ptr_zoo__Base = ret >>> 0; zoo__BaseFinalization.register(this, { __wbg_ptr_zoo__Base: ret >>> 0 }, this); return this; } } if (Symbol.dispose) zoo__Base.prototype[Symbol.dispose] = zoo__Base.prototype.free; export const zoo = {}; zoo.Base = zoo__Base; export class Car extends Vehicle { static __wrap(ptr) { const obj = Object.create(Car.prototype); obj.__wbg_ptr = ptr; obj.__wbg_ptr_Car = ptr; const __wbg_anc_0 = wasm.__wbg_upcast_car_to_vehicle(ptr) >>> 0; obj.__wbg_ptr_Vehicle = __wbg_anc_0; CarFinalization.register(obj, { __wbg_ptr_Car: obj.__wbg_ptr_Car, __wbg_ptr_Vehicle: obj.__wbg_ptr_Vehicle }, obj); return obj; } static __unwrap(jsValue) { if (jsValue.__wbg_ptr !== jsValue.__wbg_ptr_Car) { return 0; } return jsValue.__destroy_into_raw(); } __destroy_into_raw() { const ptr = this.__wbg_ptr; this.__wbg_ptr = 0; this.__wbg_ptr_Car = 0; const __anc_Vehicle = this.__wbg_ptr_Vehicle; this.__wbg_ptr_Vehicle = 0; if (__anc_Vehicle !== 0) wasm.__wbg_vehicle_free(__anc_Vehicle >>> 0, 1); CarFinalization.unregister(this); return ptr; } free() { if (this.__wbg_ptr !== this.__wbg_ptr_Car) { throw new TypeError('Car: free cannot be invoked through subclass prototype dispatch'); } const ptr = this.__destroy_into_raw(); wasm.__wbg_car_free(ptr, 0); } /** * @returns {number} */ get doors() { const ret = wasm.car_doors(this.__wbg_ptr_Car); return ret; } /** * @param {number} wheels * @param {number} doors */ constructor(wheels, doors) { super(__wbgSuperSkip); if (arguments[0] === __wbgSuperSkip) return; const ret = wasm.car_new(wheels, doors); this.__wbg_ptr = ret >>> 0; this.__wbg_ptr_Car = ret >>> 0; const __wbg_anc_0 = wasm.__wbg_upcast_car_to_vehicle(ret >>> 0) >>> 0; this.__wbg_ptr_Vehicle = __wbg_anc_0; CarFinalization.register(this, { __wbg_ptr_Car: ret >>> 0, __wbg_ptr_Vehicle: __wbg_anc_0 }, this); return this; } } if (Symbol.dispose) Car.prototype[Symbol.dispose] = Car.prototype.free; export function __wbg___wbindgen_debug_string_1d67e6b9cb4af7dd(arg0, arg1) { const ret = debugString(arg1); const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); const len1 = WASM_VECTOR_LEN; getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); } export function __wbg___wbindgen_throw_466bb9aa11cb890a(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); } export function __wbg_animal_new(arg0) { const ret = Animal.__wrap(arg0); return ret; } export function __wbg_animal_unwrap(arg0) { const ret = Animal.__unwrap(arg0); return ret; } export function __wbg_car_new(arg0) { const ret = Car.__wrap(arg0); return ret; } export function __wbg_car_unwrap(arg0) { const ret = Car.__unwrap(arg0); return ret; } export function __wbg_dog_new(arg0) { const ret = Dog.__wrap(arg0); return ret; } export function __wbg_dog_unwrap(arg0) { const ret = Dog.__unwrap(arg0); return ret; } export function __wbg_garden__derived_new(arg0) { const ret = garden__Derived.__wrap(arg0); return ret; } export function __wbg_garden__derived_unwrap(arg0) { const ret = garden__Derived.__unwrap(arg0); return ret; } export function __wbg_nsa__widget_new(arg0) { const ret = nsa__Widget.__wrap(arg0); return ret; } export function __wbg_nsa__widget_unwrap(arg0) { const ret = nsa__Widget.__unwrap(arg0); return ret; } export function __wbg_reserve_new(arg0) { const ret = Reserve.__wrap(arg0); return ret; } export function __wbg_reserve_unwrap(arg0) { const ret = Reserve.__unwrap(arg0); return ret; } export function __wbg_vehicle_new(arg0) { const ret = Vehicle.__wrap(arg0); return ret; } export function __wbg_vehicle_unwrap(arg0) { const ret = Vehicle.__unwrap(arg0); return ret; } export function __wbg_wild__habitat_new(arg0) { const ret = wild__Habitat.__wrap(arg0); return ret; } export function __wbg_wild__habitat_unwrap(arg0) { const ret = wild__Habitat.__unwrap(arg0); return ret; } export function __wbg_zoo__base_new(arg0) { const ret = zoo__Base.__wrap(arg0); return ret; } export function __wbg_zoo__base_unwrap(arg0) { const ret = zoo__Base.__unwrap(arg0); return ret; } export function __wbindgen_init_externref_table() { const table = wasm.__wbindgen_externrefs; const offset = table.grow(4); table.set(0, undefined); table.set(offset + 0, undefined); table.set(offset + 1, null); table.set(offset + 2, true); table.set(offset + 3, false); } const __wbgSuperSkip = Symbol('wasm-bindgen.super-skip'); const AnimalFinalization = (typeof FinalizationRegistry === 'undefined') ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry((tok) => { wasm.__wbg_animal_free(tok.__wbg_ptr_Animal >>> 0, 1); }); const CarFinalization = (typeof FinalizationRegistry === 'undefined') ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry((tok) => { wasm.__wbg_car_free(tok.__wbg_ptr_Car >>> 0, 1); wasm.__wbg_vehicle_free(tok.__wbg_ptr_Vehicle >>> 0, 1); }); const DogFinalization = (typeof FinalizationRegistry === 'undefined') ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry((tok) => { wasm.__wbg_dog_free(tok.__wbg_ptr_Dog >>> 0, 1); wasm.__wbg_animal_free(tok.__wbg_ptr_Animal >>> 0, 1); }); const ReserveFinalization = (typeof FinalizationRegistry === 'undefined') ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry((tok) => { wasm.__wbg_reserve_free(tok.__wbg_ptr_Reserve >>> 0, 1); wasm.__wbg_wild__habitat_free(tok.__wbg_ptr_wild__Habitat >>> 0, 1); }); const VehicleFinalization = (typeof FinalizationRegistry === 'undefined') ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry((tok) => { wasm.__wbg_vehicle_free(tok.__wbg_ptr_Vehicle >>> 0, 1); }); const garden__DerivedFinalization = (typeof FinalizationRegistry === 'undefined') ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry((tok) => { wasm.__wbg_garden__derived_free(tok.__wbg_ptr_garden__Derived >>> 0, 1); wasm.__wbg_zoo__base_free(tok.__wbg_ptr_zoo__Base >>> 0, 1); }); const nsa__WidgetFinalization = (typeof FinalizationRegistry === 'undefined') ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry(ptr => wasm.__wbg_nsa__widget_free(ptr, 1)); const wild__HabitatFinalization = (typeof FinalizationRegistry === 'undefined') ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry((tok) => { wasm.__wbg_wild__habitat_free(tok.__wbg_ptr_wild__Habitat >>> 0, 1); }); const zoo__BaseFinalization = (typeof FinalizationRegistry === 'undefined') ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry((tok) => { wasm.__wbg_zoo__base_free(tok.__wbg_ptr_zoo__Base >>> 0, 1); }); function addToExternrefTable0(obj) { const idx = wasm.__externref_table_alloc(); wasm.__wbindgen_externrefs.set(idx, obj); return idx; } function _assertClass(instance, klass) { if (!(instance instanceof klass)) { throw new Error(`expected instance of ${klass.name}`); } } function debugString(val) { // primitive types const type = typeof val; if (type == 'number' || type == 'boolean' || val == null) { return `${val}`; } if (type == 'string') { return `"${val}"`; } if (type == 'symbol') { const description = val.description; if (description == null) { return 'Symbol'; } else { return `Symbol(${description})`; } } if (type == 'function') { const name = val.name; if (typeof name == 'string' && name.length > 0) { return `Function(${name})`; } else { return 'Function'; } } // objects if (Array.isArray(val)) { const length = val.length; let debug = '['; if (length > 0) { debug += debugString(val[0]); } for(let i = 1; i < length; i++) { debug += ', ' + debugString(val[i]); } debug += ']'; return debug; } // Test for built-in const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val)); let className; if (builtInMatches && builtInMatches.length > 1) { className = builtInMatches[1]; } else { // Failed to match the standard '[object ClassName]' return toString.call(val); } if (className == 'Object') { // we're a user defined class or Object // JSON.stringify avoids problems with cycles, and is generally much // easier than looping through ownProperties of `val`. try { return 'Object(' + JSON.stringify(val) + ')'; } catch (_) { return 'Object'; } } // errors if (val instanceof Error) { return `${val.name}: ${val.message}\n${val.stack}`; } // TODO we could test for more things here, like `Set`s and `Map`s. return className; } let cachedDataViewMemory0 = null; function getDataViewMemory0() { if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) { cachedDataViewMemory0 = new DataView(wasm.memory.buffer); } return cachedDataViewMemory0; } function getStringFromWasm0(ptr, len) { return decodeText(ptr >>> 0, len); } let cachedUint8ArrayMemory0 = null; function getUint8ArrayMemory0() { if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) { cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer); } return cachedUint8ArrayMemory0; } function passArrayJsValueToWasm0(array, malloc) { const ptr = malloc(array.length * 4, 4) >>> 0; for (let i = 0; i < array.length; i++) { const add = addToExternrefTable0(array[i]); getDataViewMemory0().setUint32(ptr + 4 * i, add, true); } WASM_VECTOR_LEN = array.length; return ptr; } function passStringToWasm0(arg, malloc, realloc) { if (realloc === undefined) { const buf = cachedTextEncoder.encode(arg); const ptr = malloc(buf.length, 1) >>> 0; getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf); WASM_VECTOR_LEN = buf.length; return ptr; } let len = arg.length; let ptr = malloc(len, 1) >>> 0; const mem = getUint8ArrayMemory0(); let offset = 0; for (; offset < len; offset++) { const code = arg.charCodeAt(offset); if (code > 0x7F) break; mem[ptr + offset] = code; } if (offset !== len) { if (offset !== 0) { arg = arg.slice(offset); } ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0; const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len); const ret = cachedTextEncoder.encodeInto(arg, view); offset += ret.written; ptr = realloc(ptr, len, offset, 1) >>> 0; } WASM_VECTOR_LEN = offset; return ptr; } let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); cachedTextDecoder.decode(); const MAX_SAFARI_DECODE_BYTES = 2146435072; let numBytesDecoded = 0; function decodeText(ptr, len) { numBytesDecoded += len; if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) { cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); cachedTextDecoder.decode(); numBytesDecoded = len; } return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len)); } const cachedTextEncoder = new TextEncoder(); if (!('encodeInto' in cachedTextEncoder)) { cachedTextEncoder.encodeInto = function (arg, view) { const buf = cachedTextEncoder.encode(arg); view.set(buf); return { read: arg.length, written: buf.length }; }; } let WASM_VECTOR_LEN = 0; let wasm; export function __wbg_set_wasm(val) { wasm = val; } ---- reference::runtest::test_20_extends_rust_rs stdout ---- thread 'reference::runtest::test_20_extends_rust_rs' (65253) panicked at crates/cli/tests/wasm-bindgen/reference.rs:128:13: assertion failed: `(left == right)` Diff < left / right > : export class InheritanceParent { __destroy_into_raw() { const ptr = this.__wbg_ptr; this.__wbg_ptr = 0; this.__wbg_ptr_InheritanceParent = 0; InheritanceParentFinalization.unregister(this); return ptr; } free() { if (this.__wbg_ptr !== this.__wbg_ptr_InheritanceParent) { throw new TypeError('InheritanceParent: free cannot be invoked through subclass prototype dispatch'); } const ptr = this.__destroy_into_raw(); wasm.__wbg_inheritanceparent_free(ptr, 0); } /** * @returns {string} */ name() { let deferred1_0; let deferred1_1; try { const ret = wasm.inheritanceparent_name(this.__wbg_ptr_InheritanceParent); deferred1_0 = ret[0]; deferred1_1 = ret[1]; return getStringFromWasm0(ret[0], ret[1]); } finally { wasm.__wbindgen_free(deferred1_0, deferred1_1, 1); } } /** * @param {string} name */ constructor(name) { if (arguments[0] === __wbgSuperSkip) return; const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); const len0 = WASM_VECTOR_LEN; const ret = wasm.inheritanceparent_new(ptr0, len0); this.__wbg_ptr = ret >>> 0; this.__wbg_ptr_InheritanceParent = ret >>> 0; InheritanceParentFinalization.register(this, { __wbg_ptr_InheritanceParent: ret >>> 0 }, this); return this; } } if (Symbol.dispose) InheritanceParent.prototype[Symbol.dispose] = InheritanceParent.prototype.free; /** * @param {InheritanceParent} p * @returns {string} */ export function inheritance_borrow_parent(p) { let deferred1_0; let deferred1_1; try { _assertClass(p, InheritanceParent); const ret = wasm.inheritance_borrow_parent(p.__wbg_ptr_InheritanceParent); deferred1_0 = ret[0]; deferred1_1 = ret[1]; return getStringFromWasm0(ret[0], ret[1]); } finally { wasm.__wbindgen_free(deferred1_0, deferred1_1, 1); } } class ns__NsParent { __destroy_into_raw() { const ptr = this.__wbg_ptr; this.__wbg_ptr = 0; this.__wbg_ptr_ns__NsParent = 0; ns__NsParentFinalization.unregister(this); return ptr; } free() { if (this.__wbg_ptr !== this.__wbg_ptr_ns__NsParent) { throw new TypeError('ns__NsParent: free cannot be invoked through subclass prototype dispatch'); } const ptr = this.__destroy_into_raw(); wasm.__wbg_ns__nsparent_free(ptr, 0); } /** * @returns {string} */ label() { let deferred1_0; let deferred1_1; try { const ret = wasm.ns__nsparent_label(this.__wbg_ptr_ns__NsParent); deferred1_0 = ret[0]; deferred1_1 = ret[1]; return getStringFromWasm0(ret[0], ret[1]); } finally { wasm.__wbindgen_free(deferred1_0, deferred1_1, 1); } } /** * @param {string} label */ constructor(label) { if (arguments[0] === __wbgSuperSkip) return; const ptr0 = passStringToWasm0(label, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); const len0 = WASM_VECTOR_LEN; const ret = wasm.ns__nsparent_new(ptr0, len0); this.__wbg_ptr = ret >>> 0; this.__wbg_ptr_ns__NsParent = ret >>> 0; ns__NsParentFinalization.register(this, { __wbg_ptr_ns__NsParent: ret >>> 0 }, this); return this; } } if (Symbol.dispose) ns__NsParent.prototype[Symbol.dispose] = ns__NsParent.prototype.free; class ns__NsChild extends ns__NsParent { __destroy_into_raw() { const ptr = this.__wbg_ptr; this.__wbg_ptr = 0; this.__wbg_ptr_ns__NsChild = 0; const __anc_ns__NsParent = this.__wbg_ptr_ns__NsParent; this.__wbg_ptr_ns__NsParent = 0; if (__anc_ns__NsParent !== 0) wasm.__wbg_ns__nsparent_free(__anc_ns__NsParent >>> 0, 1); ns__NsChildFinalization.unregister(this); return ptr; } free() { if (this.__wbg_ptr !== this.__wbg_ptr_ns__NsChild) { throw new TypeError('ns__NsChild: free cannot be invoked through subclass prototype dispatch'); } const ptr = this.__destroy_into_raw(); wasm.__wbg_ns__nschild_free(ptr, 0); } /** * @param {string} label * @param {string} note */ constructor(label, note) { super(__wbgSuperSkip); if (arguments[0] === __wbgSuperSkip) return; const ptr0 = passStringToWasm0(label, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); const len0 = WASM_VECTOR_LEN; const ptr1 = passStringToWasm0(note, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); const len1 = WASM_VECTOR_LEN; const ret = wasm.ns__nschild_new(ptr0, len0, ptr1, len1); this.__wbg_ptr = ret >>> 0; this.__wbg_ptr_ns__NsChild = ret >>> 0; const __wbg_anc_0 = wasm.__wbg_upcast_ns__nschild_to_ns__nsparent(ret >>> 0) >>> 0; this.__wbg_ptr_ns__NsParent = __wbg_anc_0; ns__NsChildFinalization.register(this, { __wbg_ptr_ns__NsChild: ret >>> 0, __wbg_ptr_ns__NsParent: __wbg_anc_0 }, this); return this; } /** * @returns {string} */ note() { let deferred1_0; let deferred1_1; try { const ret = wasm.ns__nschild_note(this.__wbg_ptr_ns__NsChild); deferred1_0 = ret[0]; deferred1_1 = ret[1]; return getStringFromWasm0(ret[0], ret[1]); } finally { wasm.__wbindgen_free(deferred1_0, deferred1_1, 1); } } } if (Symbol.dispose) ns__NsChild.prototype[Symbol.dispose] = ns__NsChild.prototype.free; export const ns = {}; ns.NsParent = ns__NsParent; ns.NsChild = ns__NsChild; export class InheritanceChild extends InheritanceParent { __destroy_into_raw() { const ptr = this.__wbg_ptr; this.__wbg_ptr = 0; this.__wbg_ptr_InheritanceChild = 0; const __anc_InheritanceParent = this.__wbg_ptr_InheritanceParent; this.__wbg_ptr_InheritanceParent = 0; if (__anc_InheritanceParent !== 0) wasm.__wbg_inheritanceparent_free(__anc_InheritanceParent >>> 0, 1); InheritanceChildFinalization.unregister(this); return ptr; } free() { if (this.__wbg_ptr !== this.__wbg_ptr_InheritanceChild) { throw new TypeError('InheritanceChild: free cannot be invoked through subclass prototype dispatch'); } const ptr = this.__destroy_into_raw(); wasm.__wbg_inheritancechild_free(ptr, 0); } /** * @returns {string} */ extra() { let deferred1_0; let deferred1_1; try { const ret = wasm.inheritancechild_extra(this.__wbg_ptr_InheritanceChild); deferred1_0 = ret[0]; deferred1_1 = ret[1]; return getStringFromWasm0(ret[0], ret[1]); } finally { wasm.__wbindgen_free(deferred1_0, deferred1_1, 1); } } /** * @param {string} name * @param {string} extra */ constructor(name, extra) { super(__wbgSuperSkip); if (arguments[0] === __wbgSuperSkip) return; const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); const len0 = WASM_VECTOR_LEN; const ptr1 = passStringToWasm0(extra, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); const len1 = WASM_VECTOR_LEN; const ret = wasm.inheritancechild_new(ptr0, len0, ptr1, len1); this.__wbg_ptr = ret >>> 0; this.__wbg_ptr_InheritanceChild = ret >>> 0; const __wbg_anc_0 = wasm.__wbg_upcast_inheritancechild_to_inheritanceparent(ret >>> 0) >>> 0; this.__wbg_ptr_InheritanceParent = __wbg_anc_0; InheritanceChildFinalization.register(this, { __wbg_ptr_InheritanceChild: ret >>> 0, __wbg_ptr_InheritanceParent: __wbg_anc_0 }, this); return this; } } if (Symbol.dispose) InheritanceChild.prototype[Symbol.dispose] = InheritanceChild.prototype.free; export class InheritanceGrandchild extends InheritanceChild { __destroy_into_raw() { const ptr = this.__wbg_ptr; this.__wbg_ptr = 0; this.__wbg_ptr_InheritanceGrandchild = 0; const __anc_InheritanceChild = this.__wbg_ptr_InheritanceChild; this.__wbg_ptr_InheritanceChild = 0; if (__anc_InheritanceChild !== 0) wasm.__wbg_inheritancechild_free(__anc_InheritanceChild >>> 0, 1); const __anc_InheritanceParent = this.__wbg_ptr_InheritanceParent; this.__wbg_ptr_InheritanceParent = 0; if (__anc_InheritanceParent !== 0) wasm.__wbg_inheritanceparent_free(__anc_InheritanceParent >>> 0, 1); InheritanceGrandchildFinalization.unregister(this); return ptr; } free() { if (this.__wbg_ptr !== this.__wbg_ptr_InheritanceGrandchild) { throw new TypeError('InheritanceGrandchild: free cannot be invoked through subclass prototype dispatch'); } const ptr = this.__destroy_into_raw(); wasm.__wbg_inheritancegrandchild_free(ptr, 0); } /** * @param {string} name * @param {string} extra * @param {string} tag */ constructor(name, extra, tag) { super(__wbgSuperSkip); if (arguments[0] === __wbgSuperSkip) return; const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); const len0 = WASM_VECTOR_LEN; const ptr1 = passStringToWasm0(extra, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); const len1 = WASM_VECTOR_LEN; const ptr2 = passStringToWasm0(tag, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); const len2 = WASM_VECTOR_LEN; const ret = wasm.inheritancegrandchild_new(ptr0, len0, ptr1, len1, ptr2, len2); this.__wbg_ptr = ret >>> 0; this.__wbg_ptr_InheritanceGrandchild = ret >>> 0; const __wbg_anc_0 = wasm.__wbg_upcast_inheritancegrandchild_to_inheritancechild(ret >>> 0) >>> 0; this.__wbg_ptr_InheritanceChild = __wbg_anc_0; const __wbg_anc_1 = wasm.__wbg_upcast_inheritancechild_to_inheritanceparent(__wbg_anc_0) >>> 0; this.__wbg_ptr_InheritanceParent = __wbg_anc_1; InheritanceGrandchildFinalization.register(this, { __wbg_ptr_InheritanceGrandchild: ret >>> 0, __wbg_ptr_InheritanceChild: __wbg_anc_0, __wbg_ptr_InheritanceParent: __wbg_anc_1 }, this); return this; } /** * @returns {string} */ tag() { let deferred1_0; let deferred1_1; try { const ret = wasm.inheritancegrandchild_tag(this.__wbg_ptr_InheritanceGrandchild); deferred1_0 = ret[0]; deferred1_1 = ret[1]; return getStringFromWasm0(ret[0], ret[1]); } finally { wasm.__wbindgen_free(deferred1_0, deferred1_1, 1); } } } if (Symbol.dispose) InheritanceGrandchild.prototype[Symbol.dispose] = InheritanceGrandchild.prototype.free; export function __wbg___wbindgen_throw_466bb9aa11cb890a(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); } export function __wbindgen_init_externref_table() { const table = wasm.__wbindgen_externrefs; const offset = table.grow(4); table.set(0, undefined); table.set(offset + 0, undefined); table.set(offset + 1, null); table.set(offset + 2, true); table.set(offset + 3, false); } const __wbgSuperSkip = Symbol('wasm-bindgen.super-skip'); const InheritanceChildFinalization = (typeof FinalizationRegistry === 'undefined') ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry((tok) => { wasm.__wbg_inheritancechild_free(tok.__wbg_ptr_InheritanceChild >>> 0, 1); wasm.__wbg_inheritanceparent_free(tok.__wbg_ptr_InheritanceParent >>> 0, 1); }); const InheritanceGrandchildFinalization = (typeof FinalizationRegistry === 'undefined') ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry((tok) => { wasm.__wbg_inheritancegrandchild_free(tok.__wbg_ptr_InheritanceGrandchild >>> 0, 1); wasm.__wbg_inheritancechild_free(tok.__wbg_ptr_InheritanceChild >>> 0, 1); wasm.__wbg_inheritanceparent_free(tok.__wbg_ptr_InheritanceParent >>> 0, 1); }); const InheritanceParentFinalization = (typeof FinalizationRegistry === 'undefined') ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry((tok) => { wasm.__wbg_inheritanceparent_free(tok.__wbg_ptr_InheritanceParent >>> 0, 1); }); const ns__NsChildFinalization = (typeof FinalizationRegistry === 'undefined') ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry((tok) => { wasm.__wbg_ns__nschild_free(tok.__wbg_ptr_ns__NsChild >>> 0, 1); wasm.__wbg_ns__nsparent_free(tok.__wbg_ptr_ns__NsParent >>> 0, 1); }); const ns__NsParentFinalization = (typeof FinalizationRegistry === 'undefined') ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry((tok) => { wasm.__wbg_ns__nsparent_free(tok.__wbg_ptr_ns__NsParent >>> 0, 1); }); function _assertClass(instance, klass) { if (!(instance instanceof klass)) { throw new Error(`expected instance of ${klass.name}`); } } function getStringFromWasm0(ptr, len) { return decodeText(ptr >>> 0, len); } let cachedUint8ArrayMemory0 = null; function getUint8ArrayMemory0() { if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) { cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer); } return cachedUint8ArrayMemory0; } function passStringToWasm0(arg, malloc, realloc) { if (realloc === undefined) { const buf = cachedTextEncoder.encode(arg); const ptr = malloc(buf.length, 1) >>> 0; getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf); WASM_VECTOR_LEN = buf.length; return ptr; } let len = arg.length; let ptr = malloc(len, 1) >>> 0; const mem = getUint8ArrayMemory0(); let offset = 0; for (; offset < len; offset++) { const code = arg.charCodeAt(offset); if (code > 0x7F) break; mem[ptr + offset] = code; } if (offset !== len) { if (offset !== 0) { arg = arg.slice(offset); } ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0; const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len); const ret = cachedTextEncoder.encodeInto(arg, view); offset += ret.written; ptr = realloc(ptr, len, offset, 1) >>> 0; } WASM_VECTOR_LEN = offset; return ptr; } let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); cachedTextDecoder.decode(); const MAX_SAFARI_DECODE_BYTES = 2146435072; let numBytesDecoded = 0; function decodeText(ptr, len) { numBytesDecoded += len; if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) { cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); cachedTextDecoder.decode(); numBytesDecoded = len; } return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len)); } const cachedTextEncoder = new TextEncoder(); if (!('encodeInto' in cachedTextEncoder)) { cachedTextEncoder.encodeInto = function (arg, view) { const buf = cachedTextEncoder.encode(arg); view.set(buf); return { read: arg.length, written: buf.length }; }; } let WASM_VECTOR_LEN = 0; let wasm; export function __wbg_set_wasm(val) { wasm = val; } ---- reference::runtest::test_23_import_getter_setter_rs stdout ---- thread 'reference::runtest::test_23_import_getter_setter_rs' (65316) panicked at crates/cli/tests/wasm-bindgen/reference.rs:128:13: assertion failed: `(left == right)` Diff < left / right > : export function exported() { wasm.exported(); } export function __wbg___wbindgen_throw_466bb9aa11cb890a(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); } export function __wbg_another_6b723be6c1616946(arg0) { const ret = arg0.prop2; return ret; } export function __wbg_b_91c8631eb7275e25(arg0) { const ret = arg0.a; return ret; } export function __wbg_bar2_cdad641180ea9002() { const ret = Bar.bar2(); return ret; } export function __wbg_get_foo_c6e317a352185c14() { const ret = Bar.get_foo(); return ret; } export function __wbg_new_db871bb70f22472d() { const ret = new SomeClass(); return ret; } export function __wbg_set_another_70d0586c759204a1(arg0, arg1) { arg0.prop2 = arg1 >>> 0; } export function __wbg_set_b_8fe9fad863f2bd8f(arg0, arg1) { arg0.a = arg1 >>> 0; } export function __wbg_set_bar2_b982f825a3df9347(arg0) { Bar.set_bar2(arg0 >>> 0); } export function __wbg_set_foo_b4560128dc222731(arg0) { Bar.set_foo(arg0 >>> 0); } export function __wbg_set_signal_209eff5e0f00261a(arg0, arg1) { arg0.signal = arg1 >>> 0; } export function __wbg_set_some_prop_c0e17184729a6acf(arg0, arg1) { arg0.some_prop = arg1 >>> 0; } export function __wbg_signal_8d07ef5b10d90d85(arg0) { const ret = arg0.signal; return ret; } export function __wbg_some_prop_986a15e6637e8ccb(arg0) { const ret = arg0.some_prop; return ret; } export function __wbindgen_init_externref_table() { const table = wasm.__wbindgen_externrefs; const offset = table.grow(4); table.set(0, undefined); table.set(offset + 0, undefined); table.set(offset + 1, null); table.set(offset + 2, true); table.set(offset + 3, false); } function getStringFromWasm0(ptr, len) { return decodeText(ptr >>> 0, len); } let cachedUint8ArrayMemory0 = null; function getUint8ArrayMemory0() { if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) { cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer); } return cachedUint8ArrayMemory0; } let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); cachedTextDecoder.decode(); const MAX_SAFARI_DECODE_BYTES = 2146435072; let numBytesDecoded = 0; function decodeText(ptr, len) { numBytesDecoded += len; if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) { cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); cachedTextDecoder.decode(); numBytesDecoded = len; } return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len)); } let wasm; export function __wbg_set_wasm(val) { wasm = val; } ---- reference::runtest::test_21_function_attrs_rs stdout ---- thread 'reference::runtest::test_21_function_attrs_rs' (65275) panicked at crates/cli/tests/wasm-bindgen/reference.rs:128:13: assertion failed: `(left == right)` Diff < left / right > : /** * Description for HoldsNumber */ export class HoldsNumber { static __wrap(ptr) { const obj = Object.create(HoldsNumber.prototype); obj.__wbg_ptr = ptr; HoldsNumberFinalization.register(obj, obj.__wbg_ptr, obj); return obj; } __destroy_into_raw() { const ptr = this.__wbg_ptr; this.__wbg_ptr = 0; HoldsNumberFinalization.unregister(this); return ptr; } free() { const ptr = this.__destroy_into_raw(); wasm.__wbg_holdsnumber_free(ptr, 0); } /** * Inner value * @returns {number} */ get inner() { const ret = wasm.holdsnumber_get_inner(this.__wbg_ptr); return ret; } /** * Description for method_with_attr * @param {number} firstArg - some number * @param {boolean | undefined} secondArg * @returns {number} returns arg1 if arg2 is true, or holding value of self if arg2 is undefined or false */ method_with_attr(firstArg, secondArg) { const ret = wasm.holdsnumber_method_with_attr(this.__wbg_ptr, firstArg, secondArg); return ret; } /** * Description for static_fn_with_attr * @param {number} firstArg - some number * @param {number | undefined} secondArg * @returns {HoldsNumber} returns an instance of HoldsNumber, holding arg1 if arg2 is undefined and holding arg2 if not */ static static_fn_with_attr(firstArg, secondArg) { const ret = wasm.holdsnumber_static_fn_with_attr(firstArg, secondArg); return HoldsNumber.__wrap(ret); } } if (Symbol.dispose) HoldsNumber.prototype[Symbol.dispose] = HoldsNumber.prototype.free; /** * Description for fn_with_attr * @param {number} firstArg - some number * @param {boolean | undefined} secondArg * @returns {number} returns 1 if arg2 is true, or arg1 if arg2 is undefined or false */ export function fn_with_attr(firstArg, secondArg) { const ret = wasm.fn_with_attr(firstArg, secondArg); return ret; } export function __wbg___wbindgen_debug_string_1d67e6b9cb4af7dd(arg0, arg1) { const ret = debugString(arg1); const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); const len1 = WASM_VECTOR_LEN; getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); } export function __wbg___wbindgen_is_falsy_152d7c687256b067(arg0) { const ret = !arg0; return ret; } export function __wbg___wbindgen_is_function_23e2dfe0c7e5054f(arg0) { const ret = typeof(arg0) === 'function'; return ret; } export function __wbg___wbindgen_is_undefined_d44a4c1e41ccffb0(arg0) { const ret = arg0 === undefined; return ret; } export function __wbg___wbindgen_throw_466bb9aa11cb890a(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); } export function __wbg__wbg_cb_unref_e94a945391d00ff2(arg0) { arg0._wbg_cb_unref(); } export function __wbg_call_d68e7770fba7f6eb() { return handleError(function (arg0, arg1, arg2) { const ret = arg0.call(arg1, arg2); return ret; }, arguments); } export function __wbg_new_typed_4c200accdde4f3a3(arg0, arg1) { try { var state0 = {a: arg0, b: arg1}; var cb0 = (arg0, arg1) => { const a = state0.a; state0.a = 0; try { return wasm_bindgen__convert__closures_____invoke__h0000000000000003(a, state0.b, arg0, arg1); } finally { state0.a = a; } }; const ret = new Promise(cb0); return ret; } finally { state0.a = 0; } } export function __wbg_queueMicrotask_10964779d964bef7(arg0) { const ret = arg0.queueMicrotask; return ret; } export function __wbg_queueMicrotask_5e31d26bee93a930(arg0) { > queueMicrotask(arg0); >} >export function __wbg_resolve_730d0fd7be4a6218(arg0) { const ret = Promise.resolve(arg0); return ret; } export function __wbg_run_9227ca2f41f878c5(arg0, arg1, arg2) { try { var state0 = {a: arg1, b: arg2}; var cb0 = () => { const a = state0.a; state0.a = 0; try { return wasm_bindgen__convert__closures_____invoke__h0000000000000004(a, state0.b, ); } finally { state0.a = a; } }; const ret = arg0.run(cb0); return ret; } finally { state0.a = 0; } } export function __wbg_static_accessor_CREATE_TASK_98c021c7bb4e201d() { const ret = typeof console === 'undefined' ? null : console?.createTask; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_GLOBAL_4f52c14942a6e24a() { const ret = typeof global === 'undefined' ? null : global; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_GLOBAL_THIS_4a5df4c30924bc39() { const ret = typeof globalThis === 'undefined' ? null : globalThis; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_SELF_c8dfd8be8f08e852() { const ret = typeof self === 'undefined' ? null : self; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_WINDOW_1a8fdd6a17dbaf35() { const ret = typeof window === 'undefined' ? null : window; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_then_f36f56a6cb7bcf6e(arg0, arg1) { const ret = arg0.then(arg1); return ret; } export function __wbindgen_cast_0000000000000000(arg0, arg1) { // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 6, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`. const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h0000000000000005); return ret; } export function __wbindgen_cast_0000000000000001(arg0) { // Cast intrinsic for `F64 -> Externref`. const ret = arg0; return ret; } export function __wbindgen_cast_0000000000000002(arg0, arg1) { // Cast intrinsic for `Ref(String) -> Externref`. const ret = getStringFromWasm0(arg0, arg1); return ret; } export function __wbindgen_init_externref_table() { const table = wasm.__wbindgen_externrefs; const offset = table.grow(4); table.set(0, undefined); table.set(offset + 0, undefined); table.set(offset + 1, null); table.set(offset + 2, true); table.set(offset + 3, false); } function wasm_bindgen__convert__closures_____invoke__h0000000000000004(arg0, arg1) { const ret = wasm.wasm_bindgen__convert__closures_____invoke__h0000000000000004(arg0, arg1); return ret !== 0; } function wasm_bindgen__convert__closures_____invoke__h0000000000000005(arg0, arg1, arg2) { const ret = wasm.wasm_bindgen__convert__closures_____invoke__h0000000000000005(arg0, arg1, arg2); if (ret[1]) { throw takeFromExternrefTable0(ret[0]); } } function wasm_bindgen__convert__closures_____invoke__h0000000000000003(arg0, arg1, arg2, arg3) { wasm.wasm_bindgen__convert__closures_____invoke__h0000000000000003(arg0, arg1, arg2, arg3); } const HoldsNumberFinalization = (typeof FinalizationRegistry === 'undefined') ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry(ptr => wasm.__wbg_holdsnumber_free(ptr, 1)); function addToExternrefTable0(obj) { const idx = wasm.__externref_table_alloc(); wasm.__wbindgen_externrefs.set(idx, obj); return idx; } const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined') ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry(state => wasm.__wbindgen_destroy_closure(state.a, state.b)); function debugString(val) { // primitive types const type = typeof val; if (type == 'number' || type == 'boolean' || val == null) { return `${val}`; } if (type == 'string') { return `"${val}"`; } if (type == 'symbol') { const description = val.description; if (description == null) { return 'Symbol'; } else { return `Symbol(${description})`; } } if (type == 'function') { const name = val.name; if (typeof name == 'string' && name.length > 0) { return `Function(${name})`; } else { return 'Function'; } } // objects if (Array.isArray(val)) { const length = val.length; let debug = '['; if (length > 0) { debug += debugString(val[0]); } for(let i = 1; i < length; i++) { debug += ', ' + debugString(val[i]); } debug += ']'; return debug; } // Test for built-in const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val)); let className; if (builtInMatches && builtInMatches.length > 1) { className = builtInMatches[1]; } else { // Failed to match the standard '[object ClassName]' return toString.call(val); } if (className == 'Object') { // we're a user defined class or Object // JSON.stringify avoids problems with cycles, and is generally much // easier than looping through ownProperties of `val`. try { return 'Object(' + JSON.stringify(val) + ')'; } catch (_) { return 'Object'; } } // errors if (val instanceof Error) { return `${val.name}: ${val.message}\n${val.stack}`; } // TODO we could test for more things here, like `Set`s and `Map`s. return className; } let cachedDataViewMemory0 = null; function getDataViewMemory0() { if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) { cachedDataViewMemory0 = new DataView(wasm.memory.buffer); } return cachedDataViewMemory0; } function getStringFromWasm0(ptr, len) { return decodeText(ptr >>> 0, len); } let cachedUint8ArrayMemory0 = null; function getUint8ArrayMemory0() { if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) { cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer); } return cachedUint8ArrayMemory0; } function handleError(f, args) { try { return f.apply(this, args); } catch (e) { const idx = addToExternrefTable0(e); wasm.__wbindgen_exn_store(idx); } } function isLikeNone(x) { return x === undefined || x === null; } function makeMutClosure(arg0, arg1, f) { const state = { a: arg0, b: arg1, cnt: 1 }; const real = (...args) => { // First up with a closure we increment the internal reference // count. This ensures that the Rust closure environment won't // be deallocated while we're invoking it. state.cnt++; const a = state.a; state.a = 0; try { return f(a, state.b, ...args); } finally { state.a = a; real._wbg_cb_unref(); } }; real._wbg_cb_unref = () => { if (--state.cnt === 0) { wasm.__wbindgen_destroy_closure(state.a, state.b); state.a = 0; CLOSURE_DTORS.unregister(state); } }; CLOSURE_DTORS.register(real, state, state); return real; } function passStringToWasm0(arg, malloc, realloc) { if (realloc === undefined) { const buf = cachedTextEncoder.encode(arg); const ptr = malloc(buf.length, 1) >>> 0; getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf); WASM_VECTOR_LEN = buf.length; return ptr; } let len = arg.length; let ptr = malloc(len, 1) >>> 0; const mem = getUint8ArrayMemory0(); let offset = 0; for (; offset < len; offset++) { const code = arg.charCodeAt(offset); if (code > 0x7F) break; mem[ptr + offset] = code; } if (offset !== len) { if (offset !== 0) { arg = arg.slice(offset); } ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0; const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len); const ret = cachedTextEncoder.encodeInto(arg, view); offset += ret.written; ptr = realloc(ptr, len, offset, 1) >>> 0; } WASM_VECTOR_LEN = offset; return ptr; } function takeFromExternrefTable0(idx) { const value = wasm.__wbindgen_externrefs.get(idx); wasm.__externref_table_dealloc(idx); return value; } let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); cachedTextDecoder.decode(); const MAX_SAFARI_DECODE_BYTES = 2146435072; let numBytesDecoded = 0; function decodeText(ptr, len) { numBytesDecoded += len; if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) { cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); cachedTextDecoder.decode(); numBytesDecoded = len; } return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len)); } const cachedTextEncoder = new TextEncoder(); if (!('encodeInto' in cachedTextEncoder)) { cachedTextEncoder.encodeInto = function (arg, view) { const buf = cachedTextEncoder.encode(arg); view.set(buf); return { read: arg.length, written: buf.length }; }; } let WASM_VECTOR_LEN = 0; let wasm; export function __wbg_set_wasm(val) { wasm = val; } ---- reference::runtest::test_22_getter_setter_rs stdout ---- thread 'reference::runtest::test_22_getter_setter_rs' (65309) panicked at crates/cli/tests/wasm-bindgen/reference.rs:128:13: assertion failed: `(left == right)` Diff < left / right > : export class Foo { __destroy_into_raw() { const ptr = this.__wbg_ptr; this.__wbg_ptr = 0; FooFinalization.unregister(this); return ptr; } free() { const ptr = this.__destroy_into_raw(); wasm.__wbg_foo_free(ptr, 0); } /** * @returns {number | undefined} */ get lone_getter() { const ret = wasm.foo_lone_getter(this.__wbg_ptr); return ret === Number.MAX_SAFE_INTEGER ? undefined : ret; } /** * @param {number | null} [value] */ set lone_setter(value) { wasm.foo_set_lone_setter(this.__wbg_ptr, isLikeNone(value) ? Number.MAX_SAFE_INTEGER : (value) >>> 0); } /** * But you must write strings. * * Yes, this is totally fine in JS. * @param {string | null} [value] */ set weird(value) { var ptr0 = isLikeNone(value) ? 0 : passStringToWasm0(value, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); var len0 = WASM_VECTOR_LEN; wasm.foo_set_weird(this.__wbg_ptr, ptr0, len0); } /** * @param {boolean | null} [value] */ static set x(value) { wasm.foo_set_x_static(isLikeNone(value) ? 0xFFFFFF : value ? 1 : 0); } /** * @param {number | null} [z] */ set z(z) { wasm.foo_set_z(this.__wbg_ptr, isLikeNone(z) ? Number.MAX_SAFE_INTEGER : (z) >>> 0); } /** * You will only read numbers. * @returns {number} */ get weird() { const ret = wasm.foo_weird(this.__wbg_ptr); return ret >>> 0; } /** * There can be static getters and setters too, and they can even have the * same name as instance getters and setters. * @returns {boolean | undefined} */ static get x() { const ret = wasm.foo_x_static(); return ret === 0xFFFFFF ? undefined : ret !== 0; } /** * @returns {number | undefined} */ get z() { const ret = wasm.foo_z(this.__wbg_ptr); return ret === Number.MAX_SAFE_INTEGER ? undefined : ret; } /** * @returns {number} */ get x() { const ret = wasm.__wbg_get_foo_x(this.__wbg_ptr); return ret >>> 0; } /** * @returns {number | undefined} */ get y() { const ret = wasm.__wbg_get_foo_y(this.__wbg_ptr); return ret === Number.MAX_SAFE_INTEGER ? undefined : ret; } /** * @param {number} arg0 */ set x(arg0) { wasm.__wbg_set_foo_x(this.__wbg_ptr, arg0); } /** * @param {number | null} [arg0] */ set y(arg0) { wasm.__wbg_set_foo_y(this.__wbg_ptr, isLikeNone(arg0) ? Number.MAX_SAFE_INTEGER : (arg0) >>> 0); } } if (Symbol.dispose) Foo.prototype[Symbol.dispose] = Foo.prototype.free; export function __wbg___wbindgen_throw_466bb9aa11cb890a(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); } export function __wbindgen_init_externref_table() { const table = wasm.__wbindgen_externrefs; const offset = table.grow(4); table.set(0, undefined); table.set(offset + 0, undefined); table.set(offset + 1, null); table.set(offset + 2, true); table.set(offset + 3, false); } const FooFinalization = (typeof FinalizationRegistry === 'undefined') ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry(ptr => wasm.__wbg_foo_free(ptr, 1)); function getStringFromWasm0(ptr, len) { return decodeText(ptr >>> 0, len); } let cachedUint8ArrayMemory0 = null; function getUint8ArrayMemory0() { if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) { cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer); } return cachedUint8ArrayMemory0; } function isLikeNone(x) { return x === undefined || x === null; } function passStringToWasm0(arg, malloc, realloc) { if (realloc === undefined) { const buf = cachedTextEncoder.encode(arg); const ptr = malloc(buf.length, 1) >>> 0; getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf); WASM_VECTOR_LEN = buf.length; return ptr; } let len = arg.length; let ptr = malloc(len, 1) >>> 0; const mem = getUint8ArrayMemory0(); let offset = 0; for (; offset < len; offset++) { const code = arg.charCodeAt(offset); if (code > 0x7F) break; mem[ptr + offset] = code; } if (offset !== len) { if (offset !== 0) { arg = arg.slice(offset); } ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0; const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len); const ret = cachedTextEncoder.encodeInto(arg, view); offset += ret.written; ptr = realloc(ptr, len, offset, 1) >>> 0; } WASM_VECTOR_LEN = offset; return ptr; } let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); cachedTextDecoder.decode(); const MAX_SAFARI_DECODE_BYTES = 2146435072; let numBytesDecoded = 0; function decodeText(ptr, len) { numBytesDecoded += len; if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) { cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); cachedTextDecoder.decode(); numBytesDecoded = len; } return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len)); } const cachedTextEncoder = new TextEncoder(); if (!('encodeInto' in cachedTextEncoder)) { cachedTextEncoder.encodeInto = function (arg, view) { const buf = cachedTextEncoder.encode(arg); view.set(buf); return { read: arg.length, written: buf.length }; }; } let WASM_VECTOR_LEN = 0; let wasm; export function __wbg_set_wasm(val) { wasm = val; } ---- reference::runtest::test_24_import_rs stdout ---- thread 'reference::runtest::test_24_import_rs' (65341) panicked at crates/cli/tests/wasm-bindgen/reference.rs:128:13: assertion failed: `(left == right)` Diff < left / right > : import { default as _default } from 'tests/wasm/import_class.js'; export function exported() { const ret = wasm.exported(); if (ret[1]) { throw takeFromExternrefTable0(ret[0]); } } export function __wbg___wbindgen_throw_466bb9aa11cb890a(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); } export function __wbg_catch_me_a13364060bec98eb() { return handleError(function () { catch_me(); }, arguments); } export function __wbg_get_20f095907c1dcae6(arg0) { const ret = arg0.get(); return ret; } export function __wbg_my_function_bd6826124e2339d6() { b.my_function(); } export function __wbg_new_9fc41dfc48e8020a(arg0) { const ret = new _default(arg0); return ret; } export function __wbg_no_catch_73a11d04a638a347() { no_catch(); } export function __wbg_reload_85517ae979c32e37() { window.location.reload(); } export function __wbg_static_accessor_CONST_d3e272df0fe9f8c5() { const ret = a.CONST; return ret; } export function __wbg_write_ddcc0f6c4f63fd00(arg0, arg1) { window.document.write(getStringFromWasm0(arg0, arg1)); } export function __wbindgen_init_externref_table() { const table = wasm.__wbindgen_externrefs; const offset = table.grow(4); table.set(0, undefined); table.set(offset + 0, undefined); table.set(offset + 1, null); table.set(offset + 2, true); table.set(offset + 3, false); } function addToExternrefTable0(obj) { const idx = wasm.__externref_table_alloc(); wasm.__wbindgen_externrefs.set(idx, obj); return idx; } function getStringFromWasm0(ptr, len) { return decodeText(ptr >>> 0, len); } let cachedUint8ArrayMemory0 = null; function getUint8ArrayMemory0() { if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) { cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer); } return cachedUint8ArrayMemory0; } function handleError(f, args) { try { return f.apply(this, args); } catch (e) { const idx = addToExternrefTable0(e); wasm.__wbindgen_exn_store(idx); } } function takeFromExternrefTable0(idx) { const value = wasm.__wbindgen_externrefs.get(idx); wasm.__externref_table_dealloc(idx); return value; } let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); cachedTextDecoder.decode(); const MAX_SAFARI_DECODE_BYTES = 2146435072; let numBytesDecoded = 0; function decodeText(ptr, len) { numBytesDecoded += len; if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) { cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); cachedTextDecoder.decode(); numBytesDecoded = len; } return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len)); } let wasm; export function __wbg_set_wasm(val) { wasm = val; } ---- reference::runtest::test_25_int128_rs stdout ---- thread 'reference::runtest::test_25_int128_rs' (65363) panicked at crates/cli/tests/wasm-bindgen/reference.rs:128:13: assertion failed: `(left == right)` Diff < left / right > : /** * @param {bigint} a * @returns {bigint} */ export function echo_i128(a) { const ret = wasm.echo_i128(a, a >> BigInt(64)); return (BigInt.asUintN(64, ret[0]) | (ret[1] << BigInt(64))); } /** * @param {bigint | null} [a] * @returns {bigint | undefined} */ export function echo_option_i128(a) { const ret = wasm.echo_option_i128(!isLikeNone(a), isLikeNone(a) ? BigInt(0) : a, isLikeNone(a) ? BigInt(0) : a >> BigInt(64)); return ret[0] === 0 ? undefined : (BigInt.asUintN(64, ret[1]) | (ret[2] << BigInt(64))); } /** * @param {bigint | null} [a] * @returns {bigint | undefined} */ export function echo_option_u128(a) { const ret = wasm.echo_option_u128(!isLikeNone(a), isLikeNone(a) ? BigInt(0) : a, isLikeNone(a) ? BigInt(0) : a >> BigInt(64)); return ret[0] === 0 ? undefined : (BigInt.asUintN(64, ret[1]) | (BigInt.asUintN(64, ret[2]) << BigInt(64))); } /** * @param {bigint} a * @returns {bigint} */ export function echo_u128(a) { const ret = wasm.echo_u128(a, a >> BigInt(64)); return (BigInt.asUintN(64, ret[0]) | (BigInt.asUintN(64, ret[1]) << BigInt(64))); } /** * @returns {bigint} */ export function throw_i128() { const ret = wasm.throw_i128(); if (ret[3]) { throw takeFromExternrefTable0(ret[2]); } return (BigInt.asUintN(64, ret[0]) | (ret[1] << BigInt(64))); } export function __wbg___wbindgen_throw_466bb9aa11cb890a(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); } export function __wbindgen_init_externref_table() { const table = wasm.__wbindgen_externrefs; const offset = table.grow(4); table.set(0, undefined); table.set(offset + 0, undefined); table.set(offset + 1, null); table.set(offset + 2, true); table.set(offset + 3, false); } function getStringFromWasm0(ptr, len) { return decodeText(ptr >>> 0, len); } let cachedUint8ArrayMemory0 = null; function getUint8ArrayMemory0() { if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) { cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer); } return cachedUint8ArrayMemory0; } function isLikeNone(x) { return x === undefined || x === null; } function takeFromExternrefTable0(idx) { const value = wasm.__wbindgen_externrefs.get(idx); wasm.__externref_table_dealloc(idx); return value; } let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); cachedTextDecoder.decode(); const MAX_SAFARI_DECODE_BYTES = 2146435072; let numBytesDecoded = 0; function decodeText(ptr, len) { numBytesDecoded += len; if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) { cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); cachedTextDecoder.decode(); numBytesDecoded = len; } return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len)); } let wasm; export function __wbg_set_wasm(val) { wasm = val; } ---- reference::runtest::test_26_intrinsic_only_rs stdout ---- thread 'reference::runtest::test_26_intrinsic_only_rs' (65385) panicked at crates/cli/tests/wasm-bindgen/reference.rs:128:13: assertion failed: `(left == right)` Diff < left / right > : /** * @returns {number} */ export function causes_error() { const ret = wasm.causes_error(); if (ret[2]) { throw takeFromExternrefTable0(ret[1]); } return ret[0]; } export function __wbg___wbindgen_throw_466bb9aa11cb890a(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); } export function __wbindgen_init_externref_table() { const table = wasm.__wbindgen_externrefs; const offset = table.grow(4); table.set(0, undefined); table.set(offset + 0, undefined); table.set(offset + 1, null); table.set(offset + 2, true); table.set(offset + 3, false); } function getStringFromWasm0(ptr, len) { return decodeText(ptr >>> 0, len); } let cachedUint8ArrayMemory0 = null; function getUint8ArrayMemory0() { if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) { cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer); } return cachedUint8ArrayMemory0; } function takeFromExternrefTable0(idx) { const value = wasm.__wbindgen_externrefs.get(idx); wasm.__externref_table_dealloc(idx); return value; } let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); cachedTextDecoder.decode(); const MAX_SAFARI_DECODE_BYTES = 2146435072; let numBytesDecoded = 0; function decodeText(ptr, len) { numBytesDecoded += len; if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) { cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); cachedTextDecoder.decode(); numBytesDecoded = len; } return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len)); } let wasm; export function __wbg_set_wasm(val) { wasm = val; } ---- reference::runtest::test_27_js_namespace_export_same_name_rs stdout ---- thread 'reference::runtest::test_27_js_namespace_export_same_name_rs' (65407) panicked at crates/cli/tests/wasm-bindgen/reference.rs:128:13: assertion failed: `(left == right)` Diff < left / right > : export class NamespaceConsumer { __destroy_into_raw() { const ptr = this.__wbg_ptr; this.__wbg_ptr = 0; NamespaceConsumerFinalization.unregister(this); return ptr; } free() { const ptr = this.__destroy_into_raw(); wasm.__wbg_namespaceconsumer_free(ptr, 0); } /** * @returns {bar__Point} */ get bar_point() { const ret = wasm.namespaceconsumer_bar_point(this.__wbg_ptr); return bar__Point.__wrap(ret); } /** * @returns {bar__Point[]} */ get bar_points() { const ret = wasm.namespaceconsumer_bar_points(this.__wbg_ptr); var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice(); wasm.__wbindgen_free(ret[0], ret[1] * 4, 4); return v1; } /** * @returns {bar__Status} */ get bar_status() { const ret = wasm.namespaceconsumer_bar_status(this.__wbg_ptr); return ret; } /** * @param {bar__Point[]} points * @returns {bar__Point[]} */ duplicate_bar_points(points) { const ptr0 = passArrayJsValueToWasm0(points, wasm.__wbindgen_malloc); const len0 = WASM_VECTOR_LEN; const ret = wasm.namespaceconsumer_duplicate_bar_points(this.__wbg_ptr, ptr0, len0); var v2 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice(); wasm.__wbindgen_free(ret[0], ret[1] * 4, 4); return v2; } /** * @param {foo__Point[]} points * @returns {foo__Point[]} */ duplicate_foo_points(points) { const ptr0 = passArrayJsValueToWasm0(points, wasm.__wbindgen_malloc); const len0 = WASM_VECTOR_LEN; const ret = wasm.namespaceconsumer_duplicate_foo_points(this.__wbg_ptr, ptr0, len0); var v2 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice(); wasm.__wbindgen_free(ret[0], ret[1] * 4, 4); return v2; } /** * @returns {foo__Point} */ get foo_point() { const ret = wasm.namespaceconsumer_foo_point(this.__wbg_ptr); return foo__Point.__wrap(ret); } /** * @returns {foo__Point[]} */ get foo_points() { const ret = wasm.namespaceconsumer_foo_points(this.__wbg_ptr); var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice(); wasm.__wbindgen_free(ret[0], ret[1] * 4, 4); return v1; } /** * @returns {foo__Status} */ get foo_status() { const ret = wasm.namespaceconsumer_foo_status(this.__wbg_ptr); return ret; } /** * @param {foo__Point} foo_point * @param {bar__Point} bar_point * @param {foo__Status} foo_status * @param {bar__Status} bar_status */ constructor(foo_point, bar_point, foo_status, bar_status) { _assertClass(foo_point, foo__Point); var ptr0 = foo_point.__destroy_into_raw(); _assertClass(bar_point, bar__Point); var ptr1 = bar_point.__destroy_into_raw(); const ret = wasm.namespaceconsumer_new(ptr0, ptr1, foo_status, bar_status); this.__wbg_ptr = ret; NamespaceConsumerFinalization.register(this, this.__wbg_ptr, this); return this; } /** * @param {bar__Status} status * @returns {bar__Status} */ next_bar_status(status) { const ret = wasm.namespaceconsumer_next_bar_status(this.__wbg_ptr, status); return ret; } /** * @param {foo__Status} status * @returns {foo__Status} */ next_foo_status(status) { const ret = wasm.namespaceconsumer_next_foo_status(this.__wbg_ptr, status); return ret; } /** * @param {bar__Point} point * @returns {bar__Point} */ normalize_bar(point) { _assertClass(point, bar__Point); var ptr0 = point.__destroy_into_raw(); const ret = wasm.namespaceconsumer_normalize_bar(this.__wbg_ptr, ptr0); return bar__Point.__wrap(ret); } /** * @param {foo__Point} point * @returns {foo__Point} */ rotate_foo(point) { _assertClass(point, foo__Point); var ptr0 = point.__destroy_into_raw(); const ret = wasm.namespaceconsumer_rotate_foo(this.__wbg_ptr, ptr0); return foo__Point.__wrap(ret); } /** * @param {bar__Point} bar_point */ set bar_point(bar_point) { _assertClass(bar_point, bar__Point); var ptr0 = bar_point.__destroy_into_raw(); wasm.namespaceconsumer_set_bar_point(this.__wbg_ptr, ptr0); } /** * @param {bar__Point[]} bar_points */ set bar_points(bar_points) { const ptr0 = passArrayJsValueToWasm0(bar_points, wasm.__wbindgen_malloc); const len0 = WASM_VECTOR_LEN; wasm.namespaceconsumer_set_bar_points(this.__wbg_ptr, ptr0, len0); } /** * @param {bar__Status} bar_status */ set bar_status(bar_status) { wasm.namespaceconsumer_set_bar_status(this.__wbg_ptr, bar_status); } /** * @param {foo__Point} foo_point */ set foo_point(foo_point) { _assertClass(foo_point, foo__Point); var ptr0 = foo_point.__destroy_into_raw(); wasm.namespaceconsumer_set_foo_point(this.__wbg_ptr, ptr0); } /** * @param {foo__Point[]} foo_points */ set foo_points(foo_points) { const ptr0 = passArrayJsValueToWasm0(foo_points, wasm.__wbindgen_malloc); const len0 = WASM_VECTOR_LEN; wasm.namespaceconsumer_set_foo_points(this.__wbg_ptr, ptr0, len0); } /** * @param {foo__Status} foo_status */ set foo_status(foo_status) { wasm.namespaceconsumer_set_foo_status(this.__wbg_ptr, foo_status); } } if (Symbol.dispose) NamespaceConsumer.prototype[Symbol.dispose] = NamespaceConsumer.prototype.free; /** * A top-level export colliding with an inner namespace export should not collide. */ export class Point { __destroy_into_raw() { const ptr = this.__wbg_ptr; this.__wbg_ptr = 0; PointFinalization.unregister(this); return ptr; } free() { const ptr = this.__destroy_into_raw(); wasm.__wbg_point_free(ptr, 0); } /** * @returns {number} */ get value() { const ret = wasm.__wbg_get_point_value(this.__wbg_ptr); return ret; } /** * @param {number} value */ constructor(value) { const ret = wasm.point_new(value); this.__wbg_ptr = ret; PointFinalization.register(this, this.__wbg_ptr, this); return this; } /** * @param {number} arg0 */ set value(arg0) { wasm.__wbg_set_point_value(this.__wbg_ptr, arg0); } } if (Symbol.dispose) Point.prototype[Symbol.dispose] = Point.prototype.free; /** * A top-level enum colliding with an inner namespace export should not collide. * @enum {0 | 1} */ export const Status = Object.freeze({ Ready: 0, "0": "Ready", Done: 1, "1": "Done", }); class bar__Point { static __wrap(ptr) { const obj = Object.create(bar__Point.prototype); obj.__wbg_ptr = ptr; bar__PointFinalization.register(obj, obj.__wbg_ptr, obj); return obj; } static __unwrap(jsValue) { if (!(jsValue instanceof bar__Point)) { return 0; } return jsValue.__destroy_into_raw(); } __destroy_into_raw() { const ptr = this.__wbg_ptr; this.__wbg_ptr = 0; bar__PointFinalization.unregister(this); return ptr; } free() { const ptr = this.__destroy_into_raw(); wasm.__wbg_bar__point_free(ptr, 0); } /** * @param {number} x * @param {number} y */ constructor(x, y) { const ret = wasm.bar__point_new(x, y); this.__wbg_ptr = ret; bar__PointFinalization.register(this, this.__wbg_ptr, this); return this; } /** * @returns {number} */ get x() { const ret = wasm.__wbg_get_bar__point_x(this.__wbg_ptr); return ret; } /** * @returns {number} */ get y() { const ret = wasm.__wbg_get_bar__point_y(this.__wbg_ptr); return ret; } /** * @param {number} arg0 */ set x(arg0) { wasm.__wbg_set_bar__point_x(this.__wbg_ptr, arg0); } /** * @param {number} arg0 */ set y(arg0) { wasm.__wbg_set_bar__point_y(this.__wbg_ptr, arg0); } } if (Symbol.dispose) bar__Point.prototype[Symbol.dispose] = bar__Point.prototype.free; class bar__RefToFoo { __destroy_into_raw() { const ptr = this.__wbg_ptr; this.__wbg_ptr = 0; bar__RefToFooFinalization.unregister(this); return ptr; } free() { const ptr = this.__destroy_into_raw(); wasm.__wbg_bar__reftofoo_free(ptr, 0); } /** * @returns {foo__Point} */ get foo_point() { const ret = wasm.bar__reftofoo_foo_point(this.__wbg_ptr); return foo__Point.__wrap(ret); } /** * @returns {foo__Status} */ get foo_status() { const ret = wasm.bar__reftofoo_foo_status(this.__wbg_ptr); return ret; } /** * @param {foo__Point} foo_point * @param {foo__Status} foo_status */ constructor(foo_point, foo_status) { _assertClass(foo_point, foo__Point); var ptr0 = foo_point.__destroy_into_raw(); const ret = wasm.bar__reftofoo_new(ptr0, foo_status); this.__wbg_ptr = ret; bar__RefToFooFinalization.register(this, this.__wbg_ptr, this); return this; } /** * @param {foo__Point} point * @returns {foo__Point} */ reflect_point(point) { _assertClass(point, foo__Point); var ptr0 = point.__destroy_into_raw(); const ret = wasm.bar__reftofoo_reflect_point(this.__wbg_ptr, ptr0); return foo__Point.__wrap(ret); } /** * @param {foo__Status} status * @returns {foo__Status} */ reflect_status(status) { const ret = wasm.bar__reftofoo_reflect_status(this.__wbg_ptr, status); return ret; } /** * @param {foo__Point} foo_point */ set foo_point(foo_point) { _assertClass(foo_point, foo__Point); var ptr0 = foo_point.__destroy_into_raw(); wasm.bar__reftofoo_set_foo_point(this.__wbg_ptr, ptr0); } /** * @param {foo__Status} foo_status */ set foo_status(foo_status) { wasm.bar__reftofoo_set_foo_status(this.__wbg_ptr, foo_status); } } if (Symbol.dispose) bar__RefToFoo.prototype[Symbol.dispose] = bar__RefToFoo.prototype.free; /** * @enum {0 | 1 | 2} */ const bar__Status = Object.freeze({ Pending: 0, "0": "Pending", Complete: 1, "1": "Complete", Failed: 2, "2": "Failed", }); /** * @returns {string} */ function bar__greet() { let deferred1_0; let deferred1_1; try { const ret = wasm.bar__greet(); deferred1_0 = ret[0]; deferred1_1 = ret[1]; return getStringFromWasm0(ret[0], ret[1]); } finally { wasm.__wbindgen_free(deferred1_0, deferred1_1, 1); } } class bar__nested__Point { __destroy_into_raw() { const ptr = this.__wbg_ptr; this.__wbg_ptr = 0; bar__nested__PointFinalization.unregister(this); return ptr; } free() { const ptr = this.__destroy_into_raw(); wasm.__wbg_bar__nested__point_free(ptr, 0); } /** * @param {number} magnitude */ constructor(magnitude) { const ret = wasm.bar__nested__point_new(magnitude); this.__wbg_ptr = ret; bar__nested__PointFinalization.register(this, this.__wbg_ptr, this); return this; } /** * @returns {number} */ get magnitude() { const ret = wasm.__wbg_get_bar__nested__point_magnitude(this.__wbg_ptr); return ret; } /** * @param {number} arg0 */ set magnitude(arg0) { wasm.__wbg_set_bar__nested__point_magnitude(this.__wbg_ptr, arg0); } } if (Symbol.dispose) bar__nested__Point.prototype[Symbol.dispose] = bar__nested__Point.prototype.free; export const bar = {}; bar.Point = bar__Point; bar.RefToFoo = bar__RefToFoo; bar.Status = bar__Status; bar.greet = bar__greet; bar.nested = {}; bar.nested.Point = bar__nested__Point; /** * Two structs with the same js_name in different namespaces should not collide. */ class foo__Point { static __wrap(ptr) { const obj = Object.create(foo__Point.prototype); obj.__wbg_ptr = ptr; foo__PointFinalization.register(obj, obj.__wbg_ptr, obj); return obj; } static __unwrap(jsValue) { if (!(jsValue instanceof foo__Point)) { return 0; } return jsValue.__destroy_into_raw(); } __destroy_into_raw() { const ptr = this.__wbg_ptr; this.__wbg_ptr = 0; foo__PointFinalization.unregister(this); return ptr; } free() { const ptr = this.__destroy_into_raw(); wasm.__wbg_foo__point_free(ptr, 0); } /** * @param {number} x */ constructor(x) { const ret = wasm.foo__point_new(x); this.__wbg_ptr = ret; foo__PointFinalization.register(this, this.__wbg_ptr, this); return this; } /** * @returns {number} */ get x() { const ret = wasm.__wbg_get_foo__point_x(this.__wbg_ptr); return ret; } /** * @param {number} arg0 */ set x(arg0) { wasm.__wbg_set_foo__point_x(this.__wbg_ptr, arg0); } } if (Symbol.dispose) foo__Point.prototype[Symbol.dispose] = foo__Point.prototype.free; class foo__RefToBar { __destroy_into_raw() { const ptr = this.__wbg_ptr; this.__wbg_ptr = 0; foo__RefToBarFinalization.unregister(this); return ptr; } free() { const ptr = this.__destroy_into_raw(); wasm.__wbg_foo__reftobar_free(ptr, 0); } /** * @returns {bar__Point} */ get bar_point() { const ret = wasm.foo__reftobar_bar_point(this.__wbg_ptr); return bar__Point.__wrap(ret); } /** * @returns {bar__Status} */ get bar_status() { const ret = wasm.foo__reftobar_bar_status(this.__wbg_ptr); return ret; } /** * @param {bar__Point} bar_point * @param {bar__Status} bar_status */ constructor(bar_point, bar_status) { _assertClass(bar_point, bar__Point); var ptr0 = bar_point.__destroy_into_raw(); const ret = wasm.foo__reftobar_new(ptr0, bar_status); this.__wbg_ptr = ret; foo__RefToBarFinalization.register(this, this.__wbg_ptr, this); return this; } /** * @param {bar__Point} point * @returns {bar__Point} */ reflect_point(point) { _assertClass(point, bar__Point); var ptr0 = point.__destroy_into_raw(); const ret = wasm.foo__reftobar_reflect_point(this.__wbg_ptr, ptr0); return bar__Point.__wrap(ret); } /** * @param {bar__Status} status * @returns {bar__Status} */ reflect_status(status) { const ret = wasm.foo__reftobar_reflect_status(this.__wbg_ptr, status); return ret; } /** * @param {bar__Point} bar_point */ set bar_point(bar_point) { _assertClass(bar_point, bar__Point); var ptr0 = bar_point.__destroy_into_raw(); wasm.foo__reftobar_set_bar_point(this.__wbg_ptr, ptr0); } /** * @param {bar__Status} bar_status */ set bar_status(bar_status) { wasm.foo__reftobar_set_bar_status(this.__wbg_ptr, bar_status); } } if (Symbol.dispose) foo__RefToBar.prototype[Symbol.dispose] = foo__RefToBar.prototype.free; /** * Two enums with the same js_name in different namespaces should not collide. * @enum {0 | 1} */ const foo__Status = Object.freeze({ Active: 0, "0": "Active", Inactive: 1, "1": "Inactive", }); /** * Two functions with the same js_name in different namespaces should not collide. * @returns {string} */ function foo__greet() { let deferred1_0; let deferred1_1; try { const ret = wasm.foo__greet(); deferred1_0 = ret[0]; deferred1_1 = ret[1]; return getStringFromWasm0(ret[0], ret[1]); } finally { wasm.__wbindgen_free(deferred1_0, deferred1_1, 1); } } /** * Two structs with the same js_name in nested namespaces should not collide. */ class foo__nested__Point { __destroy_into_raw() { const ptr = this.__wbg_ptr; this.__wbg_ptr = 0; foo__nested__PointFinalization.unregister(this); return ptr; } free() { const ptr = this.__destroy_into_raw(); wasm.__wbg_foo__nested__point_free(ptr, 0); } /** * @param {number} z */ constructor(z) { const ret = wasm.foo__nested__point_new(z); this.__wbg_ptr = ret; foo__nested__PointFinalization.register(this, this.__wbg_ptr, this); return this; } /** * @returns {number} */ get z() { const ret = wasm.__wbg_get_foo__nested__point_z(this.__wbg_ptr); return ret; } /** * @param {number} arg0 */ set z(arg0) { wasm.__wbg_set_foo__nested__point_z(this.__wbg_ptr, arg0); } } if (Symbol.dispose) foo__nested__Point.prototype[Symbol.dispose] = foo__nested__Point.prototype.free; /** * Same js_name reused across different namespace depths should not collide. * @enum {0 | 1} */ const foo__nested__Status = Object.freeze({ Cold: 0, "0": "Cold", Warm: 1, "1": "Warm", }); /** * Different exported kinds with the same js_name across namespace depths should not collide. * @returns {string} */ function foo__nested__deep__Status() { let deferred1_0; let deferred1_1; try { const ret = wasm.foo__nested__deep__Status(); deferred1_0 = ret[0]; deferred1_1 = ret[1]; return getStringFromWasm0(ret[0], ret[1]); } finally { wasm.__wbindgen_free(deferred1_0, deferred1_1, 1); } } /** * @returns {string} */ function foo__nested__greet() { let deferred1_0; let deferred1_1; try { const ret = wasm.foo__nested__greet(); deferred1_0 = ret[0]; deferred1_1 = ret[1]; return getStringFromWasm0(ret[0], ret[1]); } finally { wasm.__wbindgen_free(deferred1_0, deferred1_1, 1); } } export const foo = {}; foo.Point = foo__Point; foo.RefToBar = foo__RefToBar; foo.Status = foo__Status; foo.greet = foo__greet; foo.nested = {}; foo.nested.Point = foo__nested__Point; foo.nested.Status = foo__nested__Status; foo.nested.deep = {}; foo.nested.deep.Status = foo__nested__deep__Status; foo.nested.greet = foo__nested__greet; /** * A top-level function colliding with an inner namespace export should not collide. * @returns {string} */ export function greet() { let deferred1_0; let deferred1_1; try { const ret = wasm.greet(); deferred1_0 = ret[0]; deferred1_1 = ret[1]; return getStringFromWasm0(ret[0], ret[1]); } finally { wasm.__wbindgen_free(deferred1_0, deferred1_1, 1); } } export function __wbg___wbindgen_debug_string_1d67e6b9cb4af7dd(arg0, arg1) { const ret = debugString(arg1); const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); const len1 = WASM_VECTOR_LEN; getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); } export function __wbg___wbindgen_throw_466bb9aa11cb890a(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); } export function __wbg_bar__point_new(arg0) { const ret = bar__Point.__wrap(arg0); return ret; } export function __wbg_bar__point_unwrap(arg0) { const ret = bar__Point.__unwrap(arg0); return ret; } export function __wbg_foo__point_new(arg0) { const ret = foo__Point.__wrap(arg0); return ret; } export function __wbg_foo__point_unwrap(arg0) { const ret = foo__Point.__unwrap(arg0); return ret; } export function __wbindgen_init_externref_table() { const table = wasm.__wbindgen_externrefs; const offset = table.grow(4); table.set(0, undefined); table.set(offset + 0, undefined); table.set(offset + 1, null); table.set(offset + 2, true); table.set(offset + 3, false); } const NamespaceConsumerFinalization = (typeof FinalizationRegistry === 'undefined') ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry(ptr => wasm.__wbg_namespaceconsumer_free(ptr, 1)); const PointFinalization = (typeof FinalizationRegistry === 'undefined') ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry(ptr => wasm.__wbg_point_free(ptr, 1)); const bar__PointFinalization = (typeof FinalizationRegistry === 'undefined') ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry(ptr => wasm.__wbg_bar__point_free(ptr, 1)); const bar__RefToFooFinalization = (typeof FinalizationRegistry === 'undefined') ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry(ptr => wasm.__wbg_bar__reftofoo_free(ptr, 1)); const bar__nested__PointFinalization = (typeof FinalizationRegistry === 'undefined') ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry(ptr => wasm.__wbg_bar__nested__point_free(ptr, 1)); const foo__PointFinalization = (typeof FinalizationRegistry === 'undefined') ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry(ptr => wasm.__wbg_foo__point_free(ptr, 1)); const foo__RefToBarFinalization = (typeof FinalizationRegistry === 'undefined') ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry(ptr => wasm.__wbg_foo__reftobar_free(ptr, 1)); const foo__nested__PointFinalization = (typeof FinalizationRegistry === 'undefined') ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry(ptr => wasm.__wbg_foo__nested__point_free(ptr, 1)); function addToExternrefTable0(obj) { const idx = wasm.__externref_table_alloc(); wasm.__wbindgen_externrefs.set(idx, obj); return idx; } function _assertClass(instance, klass) { if (!(instance instanceof klass)) { throw new Error(`expected instance of ${klass.name}`); } } function debugString(val) { // primitive types const type = typeof val; if (type == 'number' || type == 'boolean' || val == null) { return `${val}`; } if (type == 'string') { return `"${val}"`; } if (type == 'symbol') { const description = val.description; if (description == null) { return 'Symbol'; } else { return `Symbol(${description})`; } } if (type == 'function') { const name = val.name; if (typeof name == 'string' && name.length > 0) { return `Function(${name})`; } else { return 'Function'; } } // objects if (Array.isArray(val)) { const length = val.length; let debug = '['; if (length > 0) { debug += debugString(val[0]); } for(let i = 1; i < length; i++) { debug += ', ' + debugString(val[i]); } debug += ']'; return debug; } // Test for built-in const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val)); let className; if (builtInMatches && builtInMatches.length > 1) { className = builtInMatches[1]; } else { // Failed to match the standard '[object ClassName]' return toString.call(val); } if (className == 'Object') { // we're a user defined class or Object // JSON.stringify avoids problems with cycles, and is generally much // easier than looping through ownProperties of `val`. try { return 'Object(' + JSON.stringify(val) + ')'; } catch (_) { return 'Object'; } } // errors if (val instanceof Error) { return `${val.name}: ${val.message}\n${val.stack}`; } // TODO we could test for more things here, like `Set`s and `Map`s. return className; } function getArrayJsValueFromWasm0(ptr, len) { ptr = ptr >>> 0; const mem = getDataViewMemory0(); const result = []; for (let i = ptr; i < ptr + 4 * len; i += 4) { result.push(wasm.__wbindgen_externrefs.get(mem.getUint32(i, true))); } wasm.__externref_drop_slice(ptr, len); return result; } let cachedDataViewMemory0 = null; function getDataViewMemory0() { if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) { cachedDataViewMemory0 = new DataView(wasm.memory.buffer); } return cachedDataViewMemory0; } function getStringFromWasm0(ptr, len) { return decodeText(ptr >>> 0, len); } let cachedUint8ArrayMemory0 = null; function getUint8ArrayMemory0() { if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) { cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer); } return cachedUint8ArrayMemory0; } function passArrayJsValueToWasm0(array, malloc) { const ptr = malloc(array.length * 4, 4) >>> 0; for (let i = 0; i < array.length; i++) { const add = addToExternrefTable0(array[i]); getDataViewMemory0().setUint32(ptr + 4 * i, add, true); } WASM_VECTOR_LEN = array.length; return ptr; } function passStringToWasm0(arg, malloc, realloc) { if (realloc === undefined) { const buf = cachedTextEncoder.encode(arg); const ptr = malloc(buf.length, 1) >>> 0; getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf); WASM_VECTOR_LEN = buf.length; return ptr; } let len = arg.length; let ptr = malloc(len, 1) >>> 0; const mem = getUint8ArrayMemory0(); let offset = 0; for (; offset < len; offset++) { const code = arg.charCodeAt(offset); if (code > 0x7F) break; mem[ptr + offset] = code; } if (offset !== len) { if (offset !== 0) { arg = arg.slice(offset); } ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0; const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len); const ret = cachedTextEncoder.encodeInto(arg, view); offset += ret.written; ptr = realloc(ptr, len, offset, 1) >>> 0; } WASM_VECTOR_LEN = offset; return ptr; } let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); cachedTextDecoder.decode(); const MAX_SAFARI_DECODE_BYTES = 2146435072; let numBytesDecoded = 0; function decodeText(ptr, len) { numBytesDecoded += len; if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) { cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); cachedTextDecoder.decode(); numBytesDecoded = len; } return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len)); } const cachedTextEncoder = new TextEncoder(); if (!('encodeInto' in cachedTextEncoder)) { cachedTextEncoder.encodeInto = function (arg, view) { const buf = cachedTextEncoder.encode(arg); view.set(buf); return { read: arg.length, written: buf.length }; }; } let WASM_VECTOR_LEN = 0; let wasm; export function __wbg_set_wasm(val) { wasm = val; } ---- reference::runtest::test_28_js_namespace_export_rs stdout ---- thread 'reference::runtest::test_28_js_namespace_export_rs' (65429) panicked at crates/cli/tests/wasm-bindgen/reference.rs:128:13: assertion failed: `(left == right)` Diff < left / right > : /** * @enum {0 | 1 | 2} */ export const Color = Object.freeze({ Red: 0, "0": "Red", Green: 1, "1": "Green", Blue: 2, "2": "Blue", }); export class Rectangle { __destroy_into_raw() { const ptr = this.__wbg_ptr; this.__wbg_ptr = 0; RectangleFinalization.unregister(this); return ptr; } free() { const ptr = this.__destroy_into_raw(); wasm.__wbg_rectangle_free(ptr, 0); } /** * @returns {number} */ get height() { const ret = wasm.__wbg_get_rectangle_height(this.__wbg_ptr); return ret; } /** * @returns {number} */ get width() { const ret = wasm.__wbg_get_rectangle_width(this.__wbg_ptr); return ret; } /** * @param {number} arg0 */ set height(arg0) { wasm.__wbg_set_rectangle_height(this.__wbg_ptr, arg0); } /** * @param {number} arg0 */ set width(arg0) { wasm.__wbg_set_rectangle_width(this.__wbg_ptr, arg0); } } if (Symbol.dispose) Rectangle.prototype[Symbol.dispose] = Rectangle.prototype.free; class default__Counter { __destroy_into_raw() { const ptr = this.__wbg_ptr; this.__wbg_ptr = 0; default__CounterFinalization.unregister(this); return ptr; } free() { const ptr = this.__destroy_into_raw(); wasm.__wbg_default__counter_free(ptr, 0); } increment() { wasm.default__counter_increment(this.__wbg_ptr); } /** * @param {number} initial */ constructor(initial) { const ret = wasm.default__counter_new(initial); this.__wbg_ptr = ret; default__CounterFinalization.register(this, this.__wbg_ptr, this); return this; } /** * @param {number} val */ set value(val) { wasm.default__counter_set_value(this.__wbg_ptr, val); } /** * @returns {number} */ get value() { const ret = wasm.default__counter_value(this.__wbg_ptr); return ret; } } if (Symbol.dispose) default__Counter.prototype[Symbol.dispose] = default__Counter.prototype.free; /** * @param {string} a * @param {string} b * @returns {string} */ function default__concat(a, b) { let deferred3_0; let deferred3_1; try { const ptr0 = passStringToWasm0(a, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); const len0 = WASM_VECTOR_LEN; const ptr1 = passStringToWasm0(b, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); const len1 = WASM_VECTOR_LEN; const ret = wasm.default__concat(ptr0, len0, ptr1, len1); deferred3_0 = ret[0]; deferred3_1 = ret[1]; return getStringFromWasm0(ret[0], ret[1]); } finally { wasm.__wbindgen_free(deferred3_0, deferred3_1, 1); } } /** * @param {string} s * @returns {string} */ function default__uppercase__uppercase(s) { let deferred2_0; let deferred2_1; try { const ptr0 = passStringToWasm0(s, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); const len0 = WASM_VECTOR_LEN; const ret = wasm.default__uppercase__uppercase(ptr0, len0); deferred2_0 = ret[0]; deferred2_1 = ret[1]; return getStringFromWasm0(ret[0], ret[1]); } finally { wasm.__wbindgen_free(deferred2_0, deferred2_1, 1); } } const _default = {}; _default.Counter = default__Counter; _default.concat = default__concat; _default.uppercase = {}; _default.uppercase.uppercase = default__uppercase__uppercase; export { _default as default } /** * @param {number} a * @param {number} b * @returns {number} */ function math__add(a, b) { const ret = wasm.math__add(a, b); return ret; } /** * @param {number} a * @param {number} b * @returns {number} */ function math__divide(a, b) { const ret = wasm.math__divide(a, b); return ret; } /** * @param {number} a * @param {number} b * @returns {number} */ function math__multiply(a, b) { const ret = wasm.math__multiply(a, b); return ret; } export const math = {}; math.add = math__add; math.divide = math__divide; math.multiply = math__multiply; class models__3d__Point3D { __destroy_into_raw() { const ptr = this.__wbg_ptr; this.__wbg_ptr = 0; models__3d__Point3DFinalization.unregister(this); return ptr; } free() { const ptr = this.__destroy_into_raw(); wasm.__wbg_models__3d__point3d_free(ptr, 0); } /** * @returns {number} */ get x() { const ret = wasm.__wbg_get_models__3d__point3d_x(this.__wbg_ptr); return ret; } /** * @returns {number} */ get y() { const ret = wasm.__wbg_get_models__3d__point3d_y(this.__wbg_ptr); return ret; } /** * @returns {number} */ get z() { const ret = wasm.__wbg_get_models__3d__point3d_z(this.__wbg_ptr); return ret; } /** * @param {number} arg0 */ set x(arg0) { wasm.__wbg_set_models__3d__point3d_x(this.__wbg_ptr, arg0); } /** * @param {number} arg0 */ set y(arg0) { wasm.__wbg_set_models__3d__point3d_y(this.__wbg_ptr, arg0); } /** * @param {number} arg0 */ set z(arg0) { wasm.__wbg_set_models__3d__point3d_z(this.__wbg_ptr, arg0); } } if (Symbol.dispose) models__3d__Point3D.prototype[Symbol.dispose] = models__3d__Point3D.prototype.free; class models__Point { __destroy_into_raw() { const ptr = this.__wbg_ptr; this.__wbg_ptr = 0; models__PointFinalization.unregister(this); return ptr; } free() { const ptr = this.__destroy_into_raw(); wasm.__wbg_models__point_free(ptr, 0); } /** * @returns {number} */ get x() { const ret = wasm.__wbg_get_models__point_x(this.__wbg_ptr); return ret; } /** * @returns {number} */ get y() { const ret = wasm.__wbg_get_models__point_y(this.__wbg_ptr); return ret; } /** * @param {number} arg0 */ set x(arg0) { wasm.__wbg_set_models__point_x(this.__wbg_ptr, arg0); } /** * @param {number} arg0 */ set y(arg0) { wasm.__wbg_set_models__point_y(this.__wbg_ptr, arg0); } } if (Symbol.dispose) models__Point.prototype[Symbol.dispose] = models__Point.prototype.free; export const models = {}; models['3d'] = {}; models['3d'].Point3D = models__3d__Point3D; models.Point = models__Point; /** * @returns {number} */ export function regular_function() { const ret = wasm.regular_function(); return ret; } /** * @enum {0 | 1 | 2} */ const types__Status = Object.freeze({ Pending: 0, "0": "Pending", Active: 1, "1": "Active", Complete: 2, "2": "Complete", }); /** * @enum {200 | 404 | 500} */ const types__http__HttpStatus = Object.freeze({ Ok: 200, "200": "Ok", NotFound: 404, "404": "NotFound", ServerError: 500, "500": "ServerError", }); export const types = {}; types.Status = types__Status; types.http = {}; types.http.HttpStatus = types__http__HttpStatus; /** * @param {string} s * @returns {string} */ function utils__string__uppercase(s) { let deferred2_0; let deferred2_1; try { const ptr0 = passStringToWasm0(s, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); const len0 = WASM_VECTOR_LEN; const ret = wasm.utils__string__uppercase(ptr0, len0); deferred2_0 = ret[0]; deferred2_1 = ret[1]; return getStringFromWasm0(ret[0], ret[1]); } finally { wasm.__wbindgen_free(deferred2_0, deferred2_1, 1); } } export const utils = {}; utils.string = {}; utils.string.uppercase = utils__string__uppercase; export function __wbg___wbindgen_throw_466bb9aa11cb890a(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); } export function __wbindgen_init_externref_table() { const table = wasm.__wbindgen_externrefs; const offset = table.grow(4); table.set(0, undefined); table.set(offset + 0, undefined); table.set(offset + 1, null); table.set(offset + 2, true); table.set(offset + 3, false); } const RectangleFinalization = (typeof FinalizationRegistry === 'undefined') ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry(ptr => wasm.__wbg_rectangle_free(ptr, 1)); const default__CounterFinalization = (typeof FinalizationRegistry === 'undefined') ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry(ptr => wasm.__wbg_default__counter_free(ptr, 1)); const models__3d__Point3DFinalization = (typeof FinalizationRegistry === 'undefined') ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry(ptr => wasm.__wbg_models__3d__point3d_free(ptr, 1)); const models__PointFinalization = (typeof FinalizationRegistry === 'undefined') ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry(ptr => wasm.__wbg_models__point_free(ptr, 1)); function getStringFromWasm0(ptr, len) { return decodeText(ptr >>> 0, len); } let cachedUint8ArrayMemory0 = null; function getUint8ArrayMemory0() { if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) { cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer); } return cachedUint8ArrayMemory0; } function passStringToWasm0(arg, malloc, realloc) { if (realloc === undefined) { const buf = cachedTextEncoder.encode(arg); const ptr = malloc(buf.length, 1) >>> 0; getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf); WASM_VECTOR_LEN = buf.length; return ptr; } let len = arg.length; let ptr = malloc(len, 1) >>> 0; const mem = getUint8ArrayMemory0(); let offset = 0; for (; offset < len; offset++) { const code = arg.charCodeAt(offset); if (code > 0x7F) break; mem[ptr + offset] = code; } if (offset !== len) { if (offset !== 0) { arg = arg.slice(offset); } ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0; const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len); const ret = cachedTextEncoder.encodeInto(arg, view); offset += ret.written; ptr = realloc(ptr, len, offset, 1) >>> 0; } WASM_VECTOR_LEN = offset; return ptr; } let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); cachedTextDecoder.decode(); const MAX_SAFARI_DECODE_BYTES = 2146435072; let numBytesDecoded = 0; function decodeText(ptr, len) { numBytesDecoded += len; if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) { cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); cachedTextDecoder.decode(); numBytesDecoded = len; } return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len)); } const cachedTextEncoder = new TextEncoder(); if (!('encodeInto' in cachedTextEncoder)) { cachedTextEncoder.encodeInto = function (arg, view) { const buf = cachedTextEncoder.encode(arg); view.set(buf); return { read: arg.length, written: buf.length }; }; } let WASM_VECTOR_LEN = 0; let wasm; export function __wbg_set_wasm(val) { wasm = val; } ---- reference::runtest::test_30_modules_rs stdout ---- thread 'reference::runtest::test_30_modules_rs' (65473) panicked at crates/cli/tests/wasm-bindgen/reference.rs:128:13: assertion failed: `(left == right)` Diff < left / right > : export function exported() { wasm.exported(); } export function __wbg___wbindgen_throw_466bb9aa11cb890a(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); } export function __wbg_parseFloat_5e1d49366e6f8cc2(arg0) { const ret = parseFloat(arg0); return ret; } export function __wbg_parseFloat_d0aa0a8c6bab3c14(arg0, arg1) { const ret = parseFloat(getStringFromWasm0(arg0, arg1)); return ret; } export function __wbindgen_cast_0000000000000000(arg0, arg1) { // Cast intrinsic for `Ref(String) -> Externref`. const ret = getStringFromWasm0(arg0, arg1); return ret; } export function __wbindgen_init_externref_table() { const table = wasm.__wbindgen_externrefs; const offset = table.grow(4); table.set(0, undefined); table.set(offset + 0, undefined); table.set(offset + 1, null); table.set(offset + 2, true); table.set(offset + 3, false); } function getStringFromWasm0(ptr, len) { return decodeText(ptr >>> 0, len); } let cachedUint8ArrayMemory0 = null; function getUint8ArrayMemory0() { if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) { cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer); } return cachedUint8ArrayMemory0; } let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); cachedTextDecoder.decode(); const MAX_SAFARI_DECODE_BYTES = 2146435072; let numBytesDecoded = 0; function decodeText(ptr, len) { numBytesDecoded += len; if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) { cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); cachedTextDecoder.decode(); numBytesDecoded = len; } return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len)); } let wasm; export function __wbg_set_wasm(val) { wasm = val; } ---- reference::runtest::test_29_keyword_rs stdout ---- thread 'reference::runtest::test_29_keyword_rs' (65469) panicked at crates/cli/tests/wasm-bindgen/reference.rs:128:13: assertion failed: `(left == right)` Diff < left / right > : export function _function() { wasm._function(); } export function _var() { wasm._var(); } export function exported() { wasm.exported(); } /** * @param {number} _new * @param {number} _var * @param {number} _switch * @param {number} _default * @param {number} _arguments */ export function weird_arguments(_new, _var, _switch, _default, _arguments) { wasm.weird_arguments(_new, _var, _switch, _default, _arguments); } export function __wbg___wbindgen_throw_466bb9aa11cb890a(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); } export function __wbg_await_975e1dc09dbe08f1() { await(); } export function __wbg_let_9dc4f48d5a80e219(arg0) { arg0.let(); } export function __wbg_new_1dc11ef8af98fbe0() { > const ret = A.new(); > return ret; } export function __wbg_new_d24b38b8862d926d() { const ret = window.__TAURI__.menu.Menu.new(); return ret; } export function __wbg_new_e27db70340dc1f26() { > B.new(); } export function __wbg_static_accessor_TRUE_c111d6be04efb4a7() { const ret = true; return ret; } export function __wbindgen_init_externref_table() { const table = wasm.__wbindgen_externrefs; const offset = table.grow(4); table.set(0, undefined); table.set(offset + 0, undefined); table.set(offset + 1, null); table.set(offset + 2, true); table.set(offset + 3, false); } function getStringFromWasm0(ptr, len) { return decodeText(ptr >>> 0, len); } let cachedUint8ArrayMemory0 = null; function getUint8ArrayMemory0() { if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) { cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer); } return cachedUint8ArrayMemory0; } let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); cachedTextDecoder.decode(); const MAX_SAFARI_DECODE_BYTES = 2146435072; let numBytesDecoded = 0; function decodeText(ptr, len) { numBytesDecoded += len; if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) { cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); cachedTextDecoder.decode(); numBytesDecoded = len; } return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len)); } let wasm; export function __wbg_set_wasm(val) { wasm = val; } ---- reference::runtest::test_35_private_rs stdout ---- thread 'reference::runtest::test_35_private_rs' (326) panicked at crates/cli/tests/wasm-bindgen/reference.rs:128:13: assertion failed: `(left == right)` Diff < left / right > : /** * A hidden enum that is not exported * @enum {0 | 1} */ const HiddenEnum = Object.freeze({ Variant1: 0, "0": "Variant1", Variant2: 1, "1": "Variant2", }); /** * A hidden struct that is not exported but can be used as an argument type */ class HiddenStruct { __destroy_into_raw() { const ptr = this.__wbg_ptr; this.__wbg_ptr = 0; HiddenStructFinalization.unregister(this); return ptr; } free() { const ptr = this.__destroy_into_raw(); wasm.__wbg_hiddenstruct_free(ptr, 0); } /** * @returns {number} */ get value() { const ret = wasm.__wbg_get_hiddenstruct_value(this.__wbg_ptr); return ret; } /** * @param {number} arg0 */ set value(arg0) { wasm.__wbg_set_hiddenstruct_value(this.__wbg_ptr, arg0); } } if (Symbol.dispose) HiddenStruct.prototype[Symbol.dispose] = HiddenStruct.prototype.free; /** * A public enum that is exported * @enum {0 | 1} */ export const PublicEnum = Object.freeze({ A: 0, "0": "A", B: 1, "1": "B", }); /** * A public struct that is exported */ export class PublicStruct { static __wrap(ptr) { const obj = Object.create(PublicStruct.prototype); obj.__wbg_ptr = ptr; PublicStructFinalization.register(obj, obj.__wbg_ptr, obj); return obj; } __destroy_into_raw() { const ptr = this.__wbg_ptr; this.__wbg_ptr = 0; PublicStructFinalization.unregister(this); return ptr; } free() { const ptr = this.__destroy_into_raw(); wasm.__wbg_publicstruct_free(ptr, 0); } /** * @returns {number} */ get value() { const ret = wasm.__wbg_get_publicstruct_value(this.__wbg_ptr); return ret; } /** * @param {number} arg0 */ set value(arg0) { wasm.__wbg_set_publicstruct_value(this.__wbg_ptr, arg0); } } if (Symbol.dispose) PublicStruct.prototype[Symbol.dispose] = PublicStruct.prototype.free; /** * Function that returns a public struct * @returns {PublicStruct} */ export function get_public_struct() { const ret = wasm.get_public_struct(); return PublicStruct.__wrap(ret); } class internal__NamespacedHidden { static __wrap(ptr) { const obj = Object.create(internal__NamespacedHidden.prototype); obj.__wbg_ptr = ptr; internal__NamespacedHiddenFinalization.register(obj, obj.__wbg_ptr, obj); return obj; } __destroy_into_raw() { const ptr = this.__wbg_ptr; this.__wbg_ptr = 0; internal__NamespacedHiddenFinalization.unregister(this); return ptr; } free() { const ptr = this.__destroy_into_raw(); wasm.__wbg_internal__namespacedhidden_free(ptr, 0); } /** * @returns {number} */ get data() { const ret = wasm.__wbg_get_internal__namespacedhidden_data(this.__wbg_ptr); return ret; } /** * @param {number} arg0 */ set data(arg0) { wasm.__wbg_set_internal__namespacedhidden_data(this.__wbg_ptr, arg0); } } if (Symbol.dispose) internal__NamespacedHidden.prototype[Symbol.dispose] = internal__NamespacedHidden.prototype.free; /** * @returns {internal__NamespacedHidden} */ function internal__create_namespaced() { const ret = wasm.internal__create_namespaced(); return internal__NamespacedHidden.__wrap(ret); } export const internal = {}; internal.NamespacedHidden = internal__NamespacedHidden; internal.create_namespaced = internal__create_namespaced; /** * Function that takes a hidden enum as an argument * @param {HiddenEnum} hidden * @returns {number} */ export function use_hidden_enum(hidden) { const ret = wasm.use_hidden_enum(hidden); return ret; } /** * Function that takes a hidden struct as an argument * @param {HiddenStruct} hidden * @returns {number} */ export function use_hidden_struct(hidden) { _assertClass(hidden, HiddenStruct); var ptr0 = hidden.__destroy_into_raw(); const ret = wasm.use_hidden_struct(ptr0); return ret; } export function __wbg___wbindgen_throw_466bb9aa11cb890a(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); } export function __wbindgen_init_externref_table() { const table = wasm.__wbindgen_externrefs; const offset = table.grow(4); table.set(0, undefined); table.set(offset + 0, undefined); table.set(offset + 1, null); table.set(offset + 2, true); table.set(offset + 3, false); } const HiddenStructFinalization = (typeof FinalizationRegistry === 'undefined') ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry(ptr => wasm.__wbg_hiddenstruct_free(ptr, 1)); const PublicStructFinalization = (typeof FinalizationRegistry === 'undefined') ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry(ptr => wasm.__wbg_publicstruct_free(ptr, 1)); const internal__NamespacedHiddenFinalization = (typeof FinalizationRegistry === 'undefined') ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry(ptr => wasm.__wbg_internal__namespacedhidden_free(ptr, 1)); function _assertClass(instance, klass) { if (!(instance instanceof klass)) { throw new Error(`expected instance of ${klass.name}`); } } function getStringFromWasm0(ptr, len) { return decodeText(ptr >>> 0, len); } let cachedUint8ArrayMemory0 = null; function getUint8ArrayMemory0() { if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) { cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer); } return cachedUint8ArrayMemory0; } let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); cachedTextDecoder.decode(); const MAX_SAFARI_DECODE_BYTES = 2146435072; let numBytesDecoded = 0; function decodeText(ptr, len) { numBytesDecoded += len; if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) { cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); cachedTextDecoder.decode(); numBytesDecoded = len; } return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len)); } let wasm; export function __wbg_set_wasm(val) { wasm = val; } ---- reference::runtest::test_36_raw_rs stdout ---- thread 'reference::runtest::test_36_raw_rs' (348) panicked at crates/cli/tests/wasm-bindgen/reference.rs:128:13: assertion failed: `(left == right)` Diff < left / right > : import { Other } from 'other'; /** * @enum {0 | 1} */ export const Enum = Object.freeze({ A: 0, "0": "A", B: 1, "1": "B", }); export class Test { static __wrap(ptr) { const obj = Object.create(Test.prototype); obj.__wbg_ptr = ptr; TestFinalization.register(obj, obj.__wbg_ptr, obj); return obj; } __destroy_into_raw() { const ptr = this.__wbg_ptr; this.__wbg_ptr = 0; TestFinalization.unregister(this); return ptr; } free() { const ptr = this.__destroy_into_raw(); wasm.__wbg_test_free(ptr, 0); } /** * @param {number} test * @returns {Test} */ static test1(test) { const ret = wasm.test_test1(test); return Test.__wrap(ret); } /** * @param {number} test */ test2(test) { wasm.test_test2(this.__wbg_ptr, test); } } if (Symbol.dispose) Test.prototype[Symbol.dispose] = Test.prototype.free; /** * @param {number} test * @returns {number} */ export function test1(test) { const ret = wasm.test1(test); return ret >>> 0; } export function __wbg___wbindgen_throw_466bb9aa11cb890a(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); } export function __wbg_do_b1df00ecd05ce3df(arg0) { arg0.do(); } export function __wbg_new_e1931d13759e9e51() { const ret = new Other(); return ret; } export function __wbindgen_init_externref_table() { const table = wasm.__wbindgen_externrefs; const offset = table.grow(4); table.set(0, undefined); table.set(offset + 0, undefined); table.set(offset + 1, null); table.set(offset + 2, true); table.set(offset + 3, false); } const TestFinalization = (typeof FinalizationRegistry === 'undefined') ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry(ptr => wasm.__wbg_test_free(ptr, 1)); function getStringFromWasm0(ptr, len) { return decodeText(ptr >>> 0, len); } let cachedUint8ArrayMemory0 = null; function getUint8ArrayMemory0() { if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) { cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer); } return cachedUint8ArrayMemory0; } let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); cachedTextDecoder.decode(); const MAX_SAFARI_DECODE_BYTES = 2146435072; let numBytesDecoded = 0; function decodeText(ptr, len) { numBytesDecoded += len; if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) { cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); cachedTextDecoder.decode(); numBytesDecoded = len; } return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len)); } let wasm; export function __wbg_set_wasm(val) { wasm = val; } ---- reference::runtest::test_37_reexport_rs stdout ---- thread 'reference::runtest::test_37_reexport_rs' (373) panicked at crates/cli/tests/wasm-bindgen/reference.rs:128:13: assertion failed: `(left == right)` Diff < left / right > : import { Snippet } from './snippets/reexport_reftest-70a761663a52c772/inline0.js'; import { original_config } from 'config'; import { MY_CONSTANT } from 'constants'; import { default as _default } from 'default-export-lib'; import { helperFunction } from 'helpers'; import { hiddenReexport } from 'hidden-lib'; import { OriginalName } from 'some-library'; import { CustomType } from 'types-lib'; import { original } from 'utils'; import { 'invalid-name' as invalid_name } from 'weird-exports'; export { CustomType } export { MY_CONSTANT } export { OriginalName as RenamedClass } function Snippet__foo() { wasm.Snippet__foo(); } Snippet.foo = Snippet__foo; export { Snippet } export { _default as default } export { helperFunction } export { hiddenReexport } export { invalid_name as 'invalid-name' } export { original_config as renamedConfig } export { original as renamedFunction } export function __wbindgen_init_externref_table() { const table = wasm.__wbindgen_externrefs; const offset = table.grow(4); table.set(0, undefined); table.set(offset + 0, undefined); table.set(offset + 1, null); table.set(offset + 2, true); table.set(offset + 3, false); } let wasm; export function __wbg_set_wasm(val) { wasm = val; } ---- reference::runtest::test_38_reserved_class_name_rs stdout ---- thread 'reference::runtest::test_38_reserved_class_name_rs' (392) panicked at crates/cli/tests/wasm-bindgen/reference.rs:128:13: assertion failed: `(left == right)` Diff < left / right > : class Array2 { __destroy_into_raw() { const ptr = this.__wbg_ptr; this.__wbg_ptr = 0; Array2Finalization.unregister(this); return ptr; } free() { const ptr = this.__destroy_into_raw(); wasm.__wbg_array_free(ptr, 0); } /** * @returns {number} */ get() { const ret = wasm.array_get(this.__wbg_ptr); return ret >>> 0; } constructor() { const ret = wasm.array_new(); this.__wbg_ptr = ret; Array2Finalization.register(this, this.__wbg_ptr, this); return this; } } if (Symbol.dispose) Array2.prototype[Symbol.dispose] = Array2.prototype.free; export { Array2 as Array } /** * @returns {any} */ export function use_js_array() { const ret = wasm.use_js_array(); return ret; } export function __wbg___wbindgen_throw_466bb9aa11cb890a(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); } export function __wbg_new_26ddc2b25ad6ef4b() { const ret = new Array(); return ret; } export function __wbindgen_init_externref_table() { const table = wasm.__wbindgen_externrefs; const offset = table.grow(4); table.set(0, undefined); table.set(offset + 0, undefined); table.set(offset + 1, null); table.set(offset + 2, true); table.set(offset + 3, false); } const Array2Finalization = (typeof FinalizationRegistry === 'undefined') ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry(ptr => wasm.__wbg_array_free(ptr, 1)); function getStringFromWasm0(ptr, len) { return decodeText(ptr >>> 0, len); } let cachedUint8ArrayMemory0 = null; function getUint8ArrayMemory0() { if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) { cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer); } return cachedUint8ArrayMemory0; } let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); cachedTextDecoder.decode(); const MAX_SAFARI_DECODE_BYTES = 2146435072; let numBytesDecoded = 0; function decodeText(ptr, len) { numBytesDecoded += len; if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) { cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); cachedTextDecoder.decode(); numBytesDecoded = len; } return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len)); } let wasm; export function __wbg_set_wasm(val) { wasm = val; } ---- reference::runtest::test_39_result_rs stdout ---- thread 'reference::runtest::test_39_result_rs' (418) panicked at crates/cli/tests/wasm-bindgen/reference.rs:128:13: assertion failed: `(left == right)` Diff < left / right > : /** * @returns {number} */ export function result_i32() { const ret = wasm.result_i32(); if (ret[2]) { throw takeFromExternrefTable0(ret[1]); } return ret[0]; } /** * @returns {string} */ export function result_string() { let deferred2_0; let deferred2_1; try { const ret = wasm.result_string(); var ptr1 = ret[0]; var len1 = ret[1]; if (ret[3]) { ptr1 = 0; len1 = 0; throw takeFromExternrefTable0(ret[2]); } deferred2_0 = ptr1; deferred2_1 = len1; return getStringFromWasm0(ptr1, len1); } finally { wasm.__wbindgen_free(deferred2_0, deferred2_1, 1); } } export function result_void() { const ret = wasm.result_void(); if (ret[1]) { throw takeFromExternrefTable0(ret[0]); } } export function __wbg_Error_cde4f71f84df276c(arg0, arg1) { const ret = Error(getStringFromWasm0(arg0, arg1)); return ret; } export function __wbg___wbindgen_throw_466bb9aa11cb890a(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); } export function __wbindgen_cast_0000000000000000(arg0) { // Cast intrinsic for `F64 -> Externref`. const ret = arg0; return ret; } export function __wbindgen_init_externref_table() { const table = wasm.__wbindgen_externrefs; const offset = table.grow(4); table.set(0, undefined); table.set(offset + 0, undefined); table.set(offset + 1, null); table.set(offset + 2, true); table.set(offset + 3, false); } function getStringFromWasm0(ptr, len) { return decodeText(ptr >>> 0, len); } let cachedUint8ArrayMemory0 = null; function getUint8ArrayMemory0() { if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) { cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer); } return cachedUint8ArrayMemory0; } function takeFromExternrefTable0(idx) { const value = wasm.__wbindgen_externrefs.get(idx); wasm.__externref_table_dealloc(idx); return value; } let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); cachedTextDecoder.decode(); const MAX_SAFARI_DECODE_BYTES = 2146435072; let numBytesDecoded = 0; function decodeText(ptr, len) { numBytesDecoded += len; if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) { cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); cachedTextDecoder.decode(); numBytesDecoded = len; } return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len)); } let wasm; export function __wbg_set_wasm(val) { wasm = val; } ---- reference::runtest::test_40_self_type_rs stdout ---- thread 'reference::runtest::test_40_self_type_rs' (437) panicked at crates/cli/tests/wasm-bindgen/reference.rs:128:13: assertion failed: `(left == right)` Diff < left / right > : export class Test { __destroy_into_raw() { const ptr = this.__wbg_ptr; this.__wbg_ptr = 0; TestFinalization.unregister(this); return ptr; } free() { const ptr = this.__destroy_into_raw(); wasm.__wbg_test_free(ptr, 0); } consume_self() { const ptr = this.__destroy_into_raw(); wasm.test_consume_self(ptr); } constructor() { const ret = wasm.test_new(); this.__wbg_ptr = ret; TestFinalization.register(this, this.__wbg_ptr, this); return this; } ref_mut_self() { wasm.test_ref_mut_self(this.__wbg_ptr); } ref_self() { wasm.test_ref_self(this.__wbg_ptr); } self_Self() { const ptr = this.__destroy_into_raw(); wasm.test_self_Self(ptr); } self_ref_Self() { wasm.test_self_ref_Self(this.__wbg_ptr); } self_ref_mut_Self() { wasm.test_self_ref_mut_Self(this.__wbg_ptr); } } if (Symbol.dispose) Test.prototype[Symbol.dispose] = Test.prototype.free; export function __wbg___wbindgen_throw_466bb9aa11cb890a(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); } export function __wbindgen_init_externref_table() { const table = wasm.__wbindgen_externrefs; const offset = table.grow(4); table.set(0, undefined); table.set(offset + 0, undefined); table.set(offset + 1, null); table.set(offset + 2, true); table.set(offset + 3, false); } const TestFinalization = (typeof FinalizationRegistry === 'undefined') ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry(ptr => wasm.__wbg_test_free(ptr, 1)); function getStringFromWasm0(ptr, len) { return decodeText(ptr >>> 0, len); } let cachedUint8ArrayMemory0 = null; function getUint8ArrayMemory0() { if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) { cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer); } return cachedUint8ArrayMemory0; } let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); cachedTextDecoder.decode(); const MAX_SAFARI_DECODE_BYTES = 2146435072; let numBytesDecoded = 0; function decodeText(ptr, len) { numBytesDecoded += len; if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) { cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); cachedTextDecoder.decode(); numBytesDecoded = len; } return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len)); } let wasm; export function __wbg_set_wasm(val) { wasm = val; } ---- reference::runtest::test_42_slice_to_array_rs stdout ---- thread 'reference::runtest::test_42_slice_to_array_rs' (483) panicked at crates/cli/tests/wasm-bindgen/reference.rs:128:13: assertion failed: `(left == right)` Diff < left / right > : export function driver() { wasm.driver(); } export function __wbg___wbindgen_throw_466bb9aa11cb890a(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); } export function __wbg_js_block_slice_u16_9c6c4bd009bc6f49(arg0, arg1) { var v0 = Array.from(getArrayU16FromWasm0(arg0, arg1)); js_block_slice_u16(v0); } export function __wbg_js_slice_optional_u16_as_array_35d7465d87209f67(arg0, arg1) { let v0; if (arg0 !== 0) { v0 = Array.from(getArrayU16FromWasm0(arg0, arg1)); } js_slice_optional_u16_as_array(v0); } export function __wbg_js_slice_string_as_array_9077d10207970b47(arg0, arg1) { var v0 = getArrayJsValueFromWasm0(arg0, arg1); wasm.__wbindgen_free(arg0, arg1 * 4, 4); js_slice_string_as_array(v0); } export function __wbg_js_slice_u16_as_array_faa44759fe893b10(arg0, arg1) { var v0 = Array.from(getArrayU16FromWasm0(arg0, arg1)); js_slice_u16_as_array(v0); } export function __wbindgen_cast_0000000000000000(arg0, arg1) { // Cast intrinsic for `Ref(String) -> Externref`. const ret = getStringFromWasm0(arg0, arg1); return ret; } export function __wbindgen_init_externref_table() { const table = wasm.__wbindgen_externrefs; const offset = table.grow(4); table.set(0, undefined); table.set(offset + 0, undefined); table.set(offset + 1, null); table.set(offset + 2, true); table.set(offset + 3, false); } function getArrayJsValueFromWasm0(ptr, len) { ptr = ptr >>> 0; const mem = getDataViewMemory0(); const result = []; for (let i = ptr; i < ptr + 4 * len; i += 4) { result.push(wasm.__wbindgen_externrefs.get(mem.getUint32(i, true))); } wasm.__externref_drop_slice(ptr, len); return result; } function getArrayU16FromWasm0(ptr, len) { ptr = ptr >>> 0; return getUint16ArrayMemory0().subarray(ptr / 2, ptr / 2 + len); } let cachedDataViewMemory0 = null; function getDataViewMemory0() { if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) { cachedDataViewMemory0 = new DataView(wasm.memory.buffer); } return cachedDataViewMemory0; } function getStringFromWasm0(ptr, len) { return decodeText(ptr >>> 0, len); } let cachedUint16ArrayMemory0 = null; function getUint16ArrayMemory0() { if (cachedUint16ArrayMemory0 === null || cachedUint16ArrayMemory0.byteLength === 0) { cachedUint16ArrayMemory0 = new Uint16Array(wasm.memory.buffer); } return cachedUint16ArrayMemory0; } let cachedUint8ArrayMemory0 = null; function getUint8ArrayMemory0() { if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) { cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer); } return cachedUint8ArrayMemory0; } let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); cachedTextDecoder.decode(); const MAX_SAFARI_DECODE_BYTES = 2146435072; let numBytesDecoded = 0; function decodeText(ptr, len) { numBytesDecoded += len; if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) { cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); cachedTextDecoder.decode(); numBytesDecoded = len; } return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len)); } let wasm; export function __wbg_set_wasm(val) { wasm = val; } ---- reference::runtest::test_44_string_arg_rs stdout ---- thread 'reference::runtest::test_44_string_arg_rs' (534) panicked at crates/cli/tests/wasm-bindgen/reference.rs:128:13: assertion failed: `(left == right)` Diff < left / right > : /** * @param {string} a */ export function foo(a) { const ptr0 = passStringToWasm0(a, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); const len0 = WASM_VECTOR_LEN; wasm.foo(ptr0, len0); } export function __wbg___wbindgen_throw_466bb9aa11cb890a(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); } export function __wbindgen_init_externref_table() { const table = wasm.__wbindgen_externrefs; const offset = table.grow(4); table.set(0, undefined); table.set(offset + 0, undefined); table.set(offset + 1, null); table.set(offset + 2, true); table.set(offset + 3, false); } function getStringFromWasm0(ptr, len) { return decodeText(ptr >>> 0, len); } let cachedUint8ArrayMemory0 = null; function getUint8ArrayMemory0() { if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) { cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer); } return cachedUint8ArrayMemory0; } function passStringToWasm0(arg, malloc, realloc) { if (realloc === undefined) { const buf = cachedTextEncoder.encode(arg); const ptr = malloc(buf.length, 1) >>> 0; getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf); WASM_VECTOR_LEN = buf.length; return ptr; } let len = arg.length; let ptr = malloc(len, 1) >>> 0; const mem = getUint8ArrayMemory0(); let offset = 0; for (; offset < len; offset++) { const code = arg.charCodeAt(offset); if (code > 0x7F) break; mem[ptr + offset] = code; } if (offset !== len) { if (offset !== 0) { arg = arg.slice(offset); } ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0; const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len); const ret = cachedTextEncoder.encodeInto(arg, view); offset += ret.written; ptr = realloc(ptr, len, offset, 1) >>> 0; } WASM_VECTOR_LEN = offset; return ptr; } let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); cachedTextDecoder.decode(); const MAX_SAFARI_DECODE_BYTES = 2146435072; let numBytesDecoded = 0; function decodeText(ptr, len) { numBytesDecoded += len; if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) { cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); cachedTextDecoder.decode(); numBytesDecoded = len; } return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len)); } const cachedTextEncoder = new TextEncoder(); if (!('encodeInto' in cachedTextEncoder)) { cachedTextEncoder.encodeInto = function (arg, view) { const buf = cachedTextEncoder.encode(arg); view.set(buf); return { read: arg.length, written: buf.length }; }; } let WASM_VECTOR_LEN = 0; let wasm; export function __wbg_set_wasm(val) { wasm = val; } ---- reference::runtest_panic_unwind stdout ---- thread 'reference::runtest_panic_unwind' (706) panicked at crates/cli/tests/wasm-bindgen/main.rs:151:37: Unexpected failure. code=101 stderr=`````` error: the `-Z` flag is only accepted on the nightly channel of Cargo, but this is the `stable` channel See https://doc.rust-lang.org/book/appendix-07-nightly-rust.html for more information about Rust release channels. ``` ``` command=`cd "/home/buildozer/aports/community/wasm-bindgen/src/wasm-bindgen-0.2.122/target/cli-tests/panic_unwind_reftest" && CARGO_TARGET_DIR="/home/buildozer/aports/community/wasm-bindgen/src/wasm-bindgen-0.2.122/target" RUSTFLAGS="-C panic=unwind" RUSTUP_TOOLCHAIN="nightly" "cargo" "build" "--target" "wasm32-unknown-unknown" "-Zbuild-std=std,panic_unwind"` code=101 stdout="" stderr=``` error: the `-Z` flag is only accepted on the nightly channel of Cargo, but this is the `stable` channel See https://doc.rust-lang.org/book/appendix-07-nightly-rust.html for more information about Rust release channels. ``` ---- reference::runtest::test_43_static_rs stdout ---- thread 'reference::runtest::test_43_static_rs' (507) panicked at crates/cli/tests/wasm-bindgen/reference.rs:128:13: assertion failed: `(left == right)` Diff < left / right > : export function exported() { wasm.exported(); } export function __wbg___wbindgen_throw_466bb9aa11cb890a(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); } export function __wbg_static_accessor_NAMESPACE_OPTIONAL_01cfde4628eccae3() { const ret = typeof test === 'undefined' ? null : test?.NAMESPACE_OPTIONAL; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_NAMESPACE_PLAIN_ab6a266d436ffdfa() { const ret = test.NAMESPACE_PLAIN; return ret; } export function __wbg_static_accessor_NESTED_NAMESPACE_OPTIONAL_13db6b26bb492ea5() { const ret = typeof test1 === 'undefined' ? null : test1?.test2?.NESTED_NAMESPACE_OPTIONAL; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_NESTED_NAMESPACE_PLAIN_5db6fe92577b11f5() { const ret = test1.test2.NESTED_NAMESPACE_PLAIN; return ret; } export function __wbg_static_accessor_OPTIONAL_8799b2023fbd0eac() { const ret = typeof OPTIONAL === 'undefined' ? null : OPTIONAL; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_PLAIN_a1989439758d3221() { const ret = PLAIN; return ret; } export function __wbindgen_init_externref_table() { const table = wasm.__wbindgen_externrefs; const offset = table.grow(4); table.set(0, undefined); table.set(offset + 0, undefined); table.set(offset + 1, null); table.set(offset + 2, true); table.set(offset + 3, false); } function addToExternrefTable0(obj) { const idx = wasm.__externref_table_alloc(); wasm.__wbindgen_externrefs.set(idx, obj); return idx; } function getStringFromWasm0(ptr, len) { return decodeText(ptr >>> 0, len); } let cachedUint8ArrayMemory0 = null; function getUint8ArrayMemory0() { if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) { cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer); } return cachedUint8ArrayMemory0; } function isLikeNone(x) { return x === undefined || x === null; } let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); cachedTextDecoder.decode(); const MAX_SAFARI_DECODE_BYTES = 2146435072; let numBytesDecoded = 0; function decodeText(ptr, len) { numBytesDecoded += len; if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) { cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); cachedTextDecoder.decode(); numBytesDecoded = len; } return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len)); } let wasm; export function __wbg_set_wasm(val) { wasm = val; } ---- termination_abort_handler stdout ---- thread 'termination_abort_handler' (714) panicked at crates/cli/tests/wasm-bindgen/main.rs:151:37: Unexpected failure. code=101 stderr=`````` error: the `-Z` flag is only accepted on the nightly channel of Cargo, but this is the `stable` channel See https://doc.rust-lang.org/book/appendix-07-nightly-rust.html for more information about Rust release channels. ``` ``` command=`cd "/home/buildozer/aports/community/wasm-bindgen/src/wasm-bindgen-0.2.122/target/cli-tests/termination_abort_handler" && CARGO_TARGET_DIR="/home/buildozer/aports/community/wasm-bindgen/src/wasm-bindgen-0.2.122/target" RUSTFLAGS="-Cpanic=unwind" RUSTUP_TOOLCHAIN="nightly" "cargo" "build" "--target" "wasm32-unknown-unknown" "-Zbuild-std=std,panic_unwind"` code=101 stdout="" stderr=``` error: the `-Z` flag is only accepted on the nightly channel of Cargo, but this is the `stable` channel See https://doc.rust-lang.org/book/appendix-07-nightly-rust.html for more information about Rust release channels. ``` ---- termination_reinit stdout ---- thread 'termination_reinit' (718) panicked at crates/cli/tests/wasm-bindgen/main.rs:151:37: Unexpected failure. code=101 stderr=`````` error: the `-Z` flag is only accepted on the nightly channel of Cargo, but this is the `stable` channel See https://doc.rust-lang.org/book/appendix-07-nightly-rust.html for more information about Rust release channels. ``` ``` command=`cd "/home/buildozer/aports/community/wasm-bindgen/src/wasm-bindgen-0.2.122/target/cli-tests/termination_reinit" && CARGO_TARGET_DIR="/home/buildozer/aports/community/wasm-bindgen/src/wasm-bindgen-0.2.122/target" RUSTFLAGS="-Cpanic=unwind" RUSTUP_TOOLCHAIN="nightly" "cargo" "build" "--target" "wasm32-unknown-unknown" "-Zbuild-std=std,panic_unwind"` code=101 stdout="" stderr=``` error: the `-Z` flag is only accepted on the nightly channel of Cargo, but this is the `stable` channel See https://doc.rust-lang.org/book/appendix-07-nightly-rust.html for more information about Rust release channels. ``` ---- termination_reinit_auto_detect stdout ---- thread 'termination_reinit_auto_detect' (722) panicked at crates/cli/tests/wasm-bindgen/main.rs:151:37: Unexpected failure. code=101 stderr=`````` error: the `-Z` flag is only accepted on the nightly channel of Cargo, but this is the `stable` channel See https://doc.rust-lang.org/book/appendix-07-nightly-rust.html for more information about Rust release channels. ``` ``` command=`cd "/home/buildozer/aports/community/wasm-bindgen/src/wasm-bindgen-0.2.122/target/cli-tests/termination_reinit_auto_detect" && CARGO_TARGET_DIR="/home/buildozer/aports/community/wasm-bindgen/src/wasm-bindgen-0.2.122/target" RUSTFLAGS="-Cpanic=unwind" RUSTUP_TOOLCHAIN="nightly" "cargo" "build" "--target" "wasm32-unknown-unknown" "-Zbuild-std=std,panic_unwind"` code=101 stdout="" stderr=``` error: the `-Z` flag is only accepted on the nightly channel of Cargo, but this is the `stable` channel See https://doc.rust-lang.org/book/appendix-07-nightly-rust.html for more information about Rust release channels. ``` ---- reference::runtest::test_45_symbol_rs stdout ---- thread 'reference::runtest::test_45_symbol_rs' (556) panicked at crates/cli/tests/wasm-bindgen/reference.rs:128:13: assertion failed: `(left == right)` Diff < left / right > : export class Foo { __destroy_into_raw() { const ptr = this.__wbg_ptr; this.__wbg_ptr = 0; FooFinalization.unregister(this); return ptr; } free() { const ptr = this.__destroy_into_raw(); wasm.__wbg_foo_free(ptr, 0); } /** * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/toPrimitive * @returns {string} */ [Symbol.toPrimitive]() { let deferred1_0; let deferred1_1; try { const ret = wasm.foo_Symbol_toPrimitive(this.__wbg_ptr); deferred1_0 = ret[0]; deferred1_1 = ret[1]; return getStringFromWasm0(ret[0], ret[1]); } finally { wasm.__wbindgen_free(deferred1_0, deferred1_1, 1); } } /** * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/toStringTag * @returns {string} */ get [Symbol.toStringTag]() { let deferred1_0; let deferred1_1; try { const ret = wasm.foo_to_string_tag(this.__wbg_ptr); deferred1_0 = ret[0]; deferred1_1 = ret[1]; return getStringFromWasm0(ret[0], ret[1]); } finally { wasm.__wbindgen_free(deferred1_0, deferred1_1, 1); } } } if (Symbol.dispose) Foo.prototype[Symbol.dispose] = Foo.prototype.free; export function __wbg_Symboliterator_db2085d648f2d984(arg0) { const ret = arg0[Symbol.iterator](); return ret; } export function __wbg_SymboltoPrimitive_b76a131d56a74939(arg0, arg1) { SomeClass[Symbol.toPrimitive](getStringFromWasm0(arg0, arg1)); } export function __wbg___wbindgen_throw_466bb9aa11cb890a(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); } export function __wbg_import_static_symbol_getter_0b9e52f669bd6905() { SomeClass.import_static_symbol_getter(); } export function __wbg_new_a082cb07dbdaa1d5() { const ret = new JsString(); return ret; } export function __wbg_string_getter_497aa751e5d41a20(arg0, arg1) { const ret = arg1[Symbol.toPrimitive]; const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); const len1 = WASM_VECTOR_LEN; getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); } export function __wbindgen_init_externref_table() { const table = wasm.__wbindgen_externrefs; const offset = table.grow(4); table.set(0, undefined); table.set(offset + 0, undefined); table.set(offset + 1, null); table.set(offset + 2, true); table.set(offset + 3, false); } const FooFinalization = (typeof FinalizationRegistry === 'undefined') ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry(ptr => wasm.__wbg_foo_free(ptr, 1)); let cachedDataViewMemory0 = null; function getDataViewMemory0() { if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) { cachedDataViewMemory0 = new DataView(wasm.memory.buffer); } return cachedDataViewMemory0; } function getStringFromWasm0(ptr, len) { return decodeText(ptr >>> 0, len); } let cachedUint8ArrayMemory0 = null; function getUint8ArrayMemory0() { if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) { cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer); } return cachedUint8ArrayMemory0; } function passStringToWasm0(arg, malloc, realloc) { if (realloc === undefined) { const buf = cachedTextEncoder.encode(arg); const ptr = malloc(buf.length, 1) >>> 0; getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf); WASM_VECTOR_LEN = buf.length; return ptr; } let len = arg.length; let ptr = malloc(len, 1) >>> 0; const mem = getUint8ArrayMemory0(); let offset = 0; for (; offset < len; offset++) { const code = arg.charCodeAt(offset); if (code > 0x7F) break; mem[ptr + offset] = code; } if (offset !== len) { if (offset !== 0) { arg = arg.slice(offset); } ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0; const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len); const ret = cachedTextEncoder.encodeInto(arg, view); offset += ret.written; ptr = realloc(ptr, len, offset, 1) >>> 0; } WASM_VECTOR_LEN = offset; return ptr; } let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); cachedTextDecoder.decode(); const MAX_SAFARI_DECODE_BYTES = 2146435072; let numBytesDecoded = 0; function decodeText(ptr, len) { numBytesDecoded += len; if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) { cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); cachedTextDecoder.decode(); numBytesDecoded = len; } return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len)); } const cachedTextEncoder = new TextEncoder(); if (!('encodeInto' in cachedTextEncoder)) { cachedTextEncoder.encodeInto = function (arg, view) { const buf = cachedTextEncoder.encode(arg); view.set(buf); return { read: arg.length, written: buf.length }; }; } let WASM_VECTOR_LEN = 0; let wasm; export function __wbg_set_wasm(val) { wasm = val; } ---- reference::runtest::test_46_targets_rs stdout ---- thread 'reference::runtest::test_46_targets_rs' (578) panicked at crates/cli/tests/wasm-bindgen/reference.rs:128:13: assertion failed: `(left == right)` Diff < left / right > : /** * @param {number} a * @param {number} b * @returns {number} */ export function add_that_might_fail(a, b) { const ret = wasm.add_that_might_fail(a, b); return ret >>> 0; } export function __wbg_random_c75248f66ad44ef9() { const ret = Math.random(); return ret; } export function __wbindgen_init_externref_table() { const table = wasm.__wbindgen_externrefs; const offset = table.grow(4); table.set(0, undefined); table.set(offset + 0, undefined); table.set(offset + 1, null); table.set(offset + 2, true); table.set(offset + 3, false); } let wasm; export function __wbg_set_wasm(val) { wasm = val; } ---- reference::runtest::test_47_typescript_type_rs stdout ---- thread 'reference::runtest::test_47_typescript_type_rs' (600) panicked at crates/cli/tests/wasm-bindgen/reference.rs:128:13: assertion failed: `(left == right)` Diff < left / right > : /** * @param {number | string} a */ export function single(a) { wasm.single(a); } /** * @param {(number | string)[]} a */ export function slice(a) { const ptr0 = passArrayJsValueToWasm0(a, wasm.__wbindgen_malloc); const len0 = WASM_VECTOR_LEN; wasm.slice(ptr0, len0); } export function __wbg___wbindgen_throw_466bb9aa11cb890a(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); } export function __wbindgen_init_externref_table() { const table = wasm.__wbindgen_externrefs; const offset = table.grow(4); table.set(0, undefined); table.set(offset + 0, undefined); table.set(offset + 1, null); table.set(offset + 2, true); table.set(offset + 3, false); } function addToExternrefTable0(obj) { const idx = wasm.__externref_table_alloc(); wasm.__wbindgen_externrefs.set(idx, obj); return idx; } let cachedDataViewMemory0 = null; function getDataViewMemory0() { if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) { cachedDataViewMemory0 = new DataView(wasm.memory.buffer); } return cachedDataViewMemory0; } function getStringFromWasm0(ptr, len) { return decodeText(ptr >>> 0, len); } let cachedUint8ArrayMemory0 = null; function getUint8ArrayMemory0() { if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) { cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer); } return cachedUint8ArrayMemory0; } function passArrayJsValueToWasm0(array, malloc) { const ptr = malloc(array.length * 4, 4) >>> 0; for (let i = 0; i < array.length; i++) { const add = addToExternrefTable0(array[i]); getDataViewMemory0().setUint32(ptr + 4 * i, add, true); } WASM_VECTOR_LEN = array.length; return ptr; } let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); cachedTextDecoder.decode(); const MAX_SAFARI_DECODE_BYTES = 2146435072; let numBytesDecoded = 0; function decodeText(ptr, len) { numBytesDecoded += len; if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) { cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); cachedTextDecoder.decode(); numBytesDecoded = len; } return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len)); } let WASM_VECTOR_LEN = 0; let wasm; export function __wbg_set_wasm(val) { wasm = val; } ---- reference::runtest::test_49_wasm_export_types_rs stdout ---- thread 'reference::runtest::test_49_wasm_export_types_rs' (644) panicked at crates/cli/tests/wasm-bindgen/reference.rs:128:13: assertion failed: `(left == right)` Diff < left / right > : /* @ts-self-types="./reference_test.d.ts" */ /** * @param {number} a * @param {bigint} b * @param {any} c * @param {string} d * @returns {string} */ export function example(a, b, c, d) { let deferred2_0; let deferred2_1; try { const ptr0 = passStringToWasm0(d, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); const len0 = WASM_VECTOR_LEN; const ret = wasm.example(a, b, c, ptr0, len0); deferred2_0 = ret[0]; deferred2_1 = ret[1]; return getStringFromWasm0(ret[0], ret[1]); } finally { wasm.__wbindgen_free(deferred2_0, deferred2_1, 1); } } /** * @param {bigint} a * @returns {bigint | undefined} */ export function example_128(a) { const ret = wasm.example_128(a, a >> BigInt(64)); return ret[0] === 0 ? undefined : (BigInt.asUintN(64, ret[1]) | (BigInt.asUintN(64, ret[2]) << BigInt(64))); } function __wbg_get_imports() { const import0 = { __proto__: null, < __wbg___wbindgen_throw_1506f2235d1bdba0: function(arg0, arg1) { > __wbg___wbindgen_throw_466bb9aa11cb890a: function(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); }, __wbindgen_init_externref_table: function() { const table = wasm.__wbindgen_externrefs; const offset = table.grow(4); table.set(0, undefined); table.set(offset + 0, undefined); table.set(offset + 1, null); table.set(offset + 2, true); table.set(offset + 3, false); }, }; return { __proto__: null, "./reference_test_bg.js": import0, }; } function getStringFromWasm0(ptr, len) { return decodeText(ptr >>> 0, len); } let cachedUint8ArrayMemory0 = null; function getUint8ArrayMemory0() { if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) { cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer); } return cachedUint8ArrayMemory0; } function passStringToWasm0(arg, malloc, realloc) { if (realloc === undefined) { const buf = cachedTextEncoder.encode(arg); const ptr = malloc(buf.length, 1) >>> 0; getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf); WASM_VECTOR_LEN = buf.length; return ptr; } let len = arg.length; let ptr = malloc(len, 1) >>> 0; const mem = getUint8ArrayMemory0(); let offset = 0; for (; offset < len; offset++) { const code = arg.charCodeAt(offset); if (code > 0x7F) break; mem[ptr + offset] = code; } if (offset !== len) { if (offset !== 0) { arg = arg.slice(offset); } ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0; const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len); const ret = cachedTextEncoder.encodeInto(arg, view); offset += ret.written; ptr = realloc(ptr, len, offset, 1) >>> 0; } WASM_VECTOR_LEN = offset; return ptr; } let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); cachedTextDecoder.decode(); const MAX_SAFARI_DECODE_BYTES = 2146435072; let numBytesDecoded = 0; function decodeText(ptr, len) { numBytesDecoded += len; if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) { cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); cachedTextDecoder.decode(); numBytesDecoded = len; } return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len)); } const cachedTextEncoder = new TextEncoder(); if (!('encodeInto' in cachedTextEncoder)) { cachedTextEncoder.encodeInto = function (arg, view) { const buf = cachedTextEncoder.encode(arg); view.set(buf); return { read: arg.length, written: buf.length }; }; } let WASM_VECTOR_LEN = 0; let wasmModule, wasmInstance, wasm; function __wbg_finalize_init(instance, module) { wasmInstance = instance; wasm = instance.exports; wasmModule = module; cachedUint8ArrayMemory0 = null; wasm.__wbindgen_start(); return wasm; } async function __wbg_load(module, imports) { if (typeof Response === 'function' && module instanceof Response) { if (typeof WebAssembly.instantiateStreaming === 'function') { try { return await WebAssembly.instantiateStreaming(module, imports); } catch (e) { const validResponse = module.ok && expectedResponseType(module.type); if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') { console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e); } else { throw e; } } } const bytes = await module.arrayBuffer(); return await WebAssembly.instantiate(bytes, imports); } else { const instance = await WebAssembly.instantiate(module, imports); if (instance instanceof WebAssembly.Instance) { return { instance, module }; } else { return instance; } } function expectedResponseType(type) { switch (type) { case 'basic': case 'cors': case 'default': return true; } return false; } } function initSync(module) { if (wasm !== undefined) return wasm; if (module !== undefined) { if (Object.getPrototypeOf(module) === Object.prototype) { ({module} = module) } else { console.warn('using deprecated parameters for `initSync()`; pass a single object instead') } } const imports = __wbg_get_imports(); if (!(module instanceof WebAssembly.Module)) { module = new WebAssembly.Module(module); } const instance = new WebAssembly.Instance(module, imports); return __wbg_finalize_init(instance, module); } async function __wbg_init(module_or_path) { if (wasm !== undefined) return wasm; if (module_or_path !== undefined) { if (Object.getPrototypeOf(module_or_path) === Object.prototype) { ({module_or_path} = module_or_path) } else { console.warn('using deprecated parameters for the initialization function; pass a single object instead') } } if (module_or_path === undefined) { module_or_path = new URL('reference_test_bg.wasm', import.meta.url); } const imports = __wbg_get_imports(); if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) { module_or_path = fetch(module_or_path); } const { instance, module } = await __wbg_load(await module_or_path, imports); return __wbg_finalize_init(instance, module); } export { initSync, __wbg_init as default }; ---- reference::runtest::test_48_wasm_export_colon_rs stdout ---- thread 'reference::runtest::test_48_wasm_export_colon_rs' (622) panicked at crates/cli/tests/wasm-bindgen/reference.rs:128:13: assertion failed: `(left == right)` Diff < left / right > : /* @ts-self-types="./reference_test.d.ts" */ /** * Runtime test harness support instantiated in JS. * * The node.js entry script instantiates a `Context` here which is used to * drive test execution. */ export class WasmBindgenTestContext { __destroy_into_raw() { const ptr = this.__wbg_ptr; this.__wbg_ptr = 0; WasmBindgenTestContextFinalization.unregister(this); return ptr; } free() { const ptr = this.__destroy_into_raw(); wasm.__wbg_wasmbindgentestcontext_free(ptr, 0); } /** * Handle filter argument. * @param {number} filtered */ filtered_count(filtered) { wasm.wasmbindgentestcontext_filtered_count(this.__wbg_ptr, filtered); } /** * Handle `--include-ignored` flag. * @param {boolean} include_ignored */ include_ignored(include_ignored) { wasm.wasmbindgentestcontext_include_ignored(this.__wbg_ptr, include_ignored); } /** * Creates a new context ready to run tests. * * A `Context` is the main structure through which test execution is * coordinated, and this will collect output and results for all executed * tests. * @param {boolean} is_bench */ constructor(is_bench) { const ret = wasm.wasmbindgentestcontext_new(is_bench); this.__wbg_ptr = ret; WasmBindgenTestContextFinalization.register(this, this.__wbg_ptr, this); return this; } /** * Executes a list of tests, returning a promise representing their * eventual completion. * * This is the main entry point for executing tests. All the tests passed * in are the JS `Function` object that was plucked off the * `WebAssembly.Instance` exports list. * * The promise returned resolves to either `true` if all tests passed or * `false` if at least one test failed. * @param {any[]} tests * @returns {Promise} */ run(tests) { const ptr0 = passArrayJsValueToWasm0(tests, wasm.__wbindgen_malloc); const len0 = WASM_VECTOR_LEN; const ret = wasm.wasmbindgentestcontext_run(this.__wbg_ptr, ptr0, len0); return ret; } } if (Symbol.dispose) WasmBindgenTestContext.prototype[Symbol.dispose] = WasmBindgenTestContext.prototype.free; /** * Used to read benchmark data, and then the runner stores it on the local disk. * @returns {Uint8Array | undefined} */ export function __wbgbench_dump() { const ret = wasm.__wbgbench_dump(); let v1; if (ret[0] !== 0) { v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice(); wasm.__wbindgen_free(ret[0], ret[1] * 1, 1); } return v1; } /** * Used to write previous benchmark data before the benchmark, for later comparison. * @param {Uint8Array} baseline */ export function __wbgbench_import(baseline) { const ptr0 = passArray8ToWasm0(baseline, wasm.__wbindgen_malloc); const len0 = WASM_VECTOR_LEN; wasm.__wbgbench_import(ptr0, len0); } /** * Handler for `console.debug` invocations. See above. * @param {Array} args */ export function __wbgtest_console_debug(args) { wasm.__wbgtest_console_debug(args); } /** * Handler for `console.error` invocations. See above. * @param {Array} args */ export function __wbgtest_console_error(args) { wasm.__wbgtest_console_error(args); } /** * Handler for `console.info` invocations. See above. * @param {Array} args */ export function __wbgtest_console_info(args) { wasm.__wbgtest_console_info(args); } /** * Handler for `console.log` invocations. * * If a test is currently running it takes the `args` array and stringifies * it and appends it to the current output of the test. Otherwise it passes * the arguments to the original `console.log` function, psased as * `original`. * @param {Array} args */ export function __wbgtest_console_log(args) { wasm.__wbgtest_console_log(args); } /** * Handler for `console.warn` invocations. See above. * @param {Array} args */ export function __wbgtest_console_warn(args) { wasm.__wbgtest_console_warn(args); } /** * @returns {Uint8Array | undefined} */ export function __wbgtest_cov_dump() { const ret = wasm.__wbgtest_cov_dump(); let v1; if (ret[0] !== 0) { v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice(); wasm.__wbindgen_free(ret[0], ret[1] * 1, 1); } return v1; } /** * Path to use for coverage data. * @param {string | null | undefined} env * @param {number} pid * @param {string} temp_dir * @param {bigint} module_signature * @returns {string} */ export function __wbgtest_coverage_path(env, pid, temp_dir, module_signature) { let deferred3_0; let deferred3_1; try { var ptr0 = isLikeNone(env) ? 0 : passStringToWasm0(env, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); var len0 = WASM_VECTOR_LEN; const ptr1 = passStringToWasm0(temp_dir, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); const len1 = WASM_VECTOR_LEN; const ret = wasm.__wbgtest_coverage_path(ptr0, len0, pid, ptr1, len1, module_signature); deferred3_0 = ret[0]; deferred3_1 = ret[1]; return getStringFromWasm0(ret[0], ret[1]); } finally { wasm.__wbindgen_free(deferred3_0, deferred3_1, 1); } } /** * @returns {bigint | undefined} */ export function __wbgtest_module_signature() { const ret = wasm.__wbgtest_module_signature(); return ret[0] === 0 ? undefined : BigInt.asUintN(64, ret[1]); } function __wbg_get_imports() { const import0 = { __proto__: null, < __wbg_Deno_0f7ae424903c6955: function(arg0) { > __wbg_Deno_6b69fd478939fcc9: function(arg0) { const ret = arg0.Deno; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); }, < __wbg_String_b66e26e812db682a: function(arg0, arg1) { > __wbg_String_25992774c5dc992c: function(arg0, arg1) { const ret = String(arg1); const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); const len1 = WASM_VECTOR_LEN; getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); }, < __wbg___wbg_test_invoke_48dc5082ce33e0ae: function() { return handleError(function (arg0, arg1) { > __wbg___wbg_test_invoke_e1494e6621aa5192: function() { return handleError(function (arg0, arg1) { try { var state0 = {a: arg0, b: arg1}; var cb0 = () => { const a = state0.a; state0.a = 0; try { return wasm_bindgen__convert__closures_____invoke__h0000000000000003(a, state0.b, ); } finally { state0.a = a; } }; __wbg_test_invoke(cb0); } finally { state0.a = 0; } }, arguments); }, < __wbg___wbg_test_output_writeln_3c260000ab6153ea: function(arg0) { > __wbg___wbg_test_output_writeln_8fe9752a0e99128d: function(arg0) { __wbg_test_output_writeln(arg0); }, < __wbg___wbgtest_og_console_log_5b24086944470fba: function(arg0, arg1) { > __wbg___wbgtest_og_console_log_24db06edcc85da24: function(arg0, arg1) { __wbgtest_og_console_log(getStringFromWasm0(arg0, arg1)); }, < __wbg___wbindgen_debug_string_0accd80f45e5faa2: function(arg0, arg1) { > __wbg___wbindgen_debug_string_1d67e6b9cb4af7dd: function(arg0, arg1) { const ret = debugString(arg1); const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); const len1 = WASM_VECTOR_LEN; getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); }, < __wbg___wbindgen_is_function_754e9f305ff6029e: function(arg0) { > __wbg___wbindgen_is_function_23e2dfe0c7e5054f: function(arg0) { const ret = typeof(arg0) === 'function'; return ret; }, < __wbg___wbindgen_is_undefined_67b456be8673d3d7: function(arg0) { > __wbg___wbindgen_is_undefined_d44a4c1e41ccffb0: function(arg0) { const ret = arg0 === undefined; return ret; }, < __wbg___wbindgen_string_get_72bdf95d3ae505b1: function(arg0, arg1) { > __wbg___wbindgen_string_get_5d576fa1f3954188: function(arg0, arg1) { const obj = arg1; const ret = typeof(obj) === 'string' ? obj : undefined; var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); var len1 = WASM_VECTOR_LEN; getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); }, < __wbg___wbindgen_throw_1506f2235d1bdba0: function(arg0, arg1) { > __wbg___wbindgen_throw_466bb9aa11cb890a: function(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); }, < __wbg__wbg_cb_unref_61db23ac97f16c31: function(arg0) { > __wbg__wbg_cb_unref_e94a945391d00ff2: function(arg0) { arg0._wbg_cb_unref(); }, < __wbg_call_9c758de292015997: function() { return handleError(function (arg0, arg1, arg2) { > __wbg_call_d68e7770fba7f6eb: function() { return handleError(function (arg0, arg1, arg2) { const ret = arg0.call(arg1, arg2); return ret; }, arguments); }, < __wbg_constructor_361ddf7c35fd56ef: function(arg0) { > __wbg_constructor_d739f86b96d0d53e: function(arg0) { const ret = arg0.constructor; return ret; }, < __wbg_error_6dfa145e31018b13: function(arg0, arg1) { > __wbg_error_4e424806ca5cebc3: function(arg0, arg1) { console.error(getStringFromWasm0(arg0, arg1)); }, < __wbg_forEach_768a075d31fa39b5: function(arg0, arg1, arg2) { > __wbg_forEach_2f6c301f53dffa95: function(arg0, arg1, arg2) { try { var state0 = {a: arg1, b: arg2}; var cb0 = (arg0, arg1, arg2) => { const a = state0.a; state0.a = 0; try { return wasm_bindgen__convert__closures_____invoke__h0000000000000004(a, state0.b, arg0, arg1, arg2); } finally { state0.a = a; } }; arg0.forEach(cb0); } finally { state0.a = 0; } }, < __wbg_getElementById_ec8fb07adfb911a7: function(arg0, arg1, arg2) { > __wbg_getElementById_ee8bc216c1414c77: function(arg0, arg1, arg2) { const ret = arg0.getElementById(getStringFromWasm0(arg1, arg2)); return ret; }, < __wbg_log_01d5b30d4d91ce8c: function(arg0, arg1) { > __wbg_log_2003da7f9838a137: function(arg0, arg1) { console.log(getStringFromWasm0(arg0, arg1)); }, < __wbg_message_40300ed2d1f8bdc6: function(arg0) { > __wbg_message_bdc9d0efbe11d808: function(arg0) { const ret = arg0.message; return ret; }, < __wbg_name_2e3d97e5d7abee6d: function(arg0) { > __wbg_name_4f5e0212ccfb1f78: function(arg0) { const ret = arg0.name; return ret; }, < __wbg_name_e0013edc217ef0cf: function(arg0, arg1) { > __wbg_name_dd33c8dc4b03b674: function(arg0, arg1) { const ret = arg1.name; const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); const len1 = WASM_VECTOR_LEN; getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); }, < __wbg_new_b3ab8e4b9c463e25: function() { > __wbg_new_c9896366ec25a360: function() { const ret = new Error(); return ret; }, < __wbg_new_typed_bf31d18f92484486: function(arg0, arg1) { > __wbg_new_typed_4c200accdde4f3a3: function(arg0, arg1) { try { var state0 = {a: arg0, b: arg1}; var cb0 = (arg0, arg1) => { const a = state0.a; state0.a = 0; try { return wasm_bindgen__convert__closures_____invoke__h0000000000000005(a, state0.b, arg0, arg1); } finally { state0.a = a; } }; const ret = new Promise(cb0); return ret; } finally { state0.a = 0; } }, < __wbg_now_222e3bbae5ec582e: function(arg0) { > __wbg_now_35aced3d37a80997: function(arg0) { const ret = arg0.now(); return ret; }, < __wbg_performance_1489fc2125d6bda9: function(arg0) { > __wbg_performance_8f45678d1edfb36f: function(arg0) { const ret = arg0.performance; return ret; }, < __wbg_queueMicrotask_35c611f4a14830b2: function(arg0) { < queueMicrotask(arg0); < }, < __wbg_queueMicrotask_404ed0a58e0b63cc: function(arg0) { > __wbg_queueMicrotask_10964779d964bef7: function(arg0) { const ret = arg0.queueMicrotask; return ret; }, < __wbg_resolve_25a7e548d5881dca: function(arg0) { > __wbg_queueMicrotask_5e31d26bee93a930: function(arg0) { > queueMicrotask(arg0); > }, > __wbg_resolve_730d0fd7be4a6218: function(arg0) { const ret = Promise.resolve(arg0); return ret; }, < __wbg_run_322bf7e1760605e9: function(arg0, arg1, arg2) { > __wbg_run_9227ca2f41f878c5: function(arg0, arg1, arg2) { try { var state0 = {a: arg1, b: arg2}; var cb0 = () => { const a = state0.a; state0.a = 0; try { return wasm_bindgen__convert__closures_____invoke__h0000000000000006(a, state0.b, ); } finally { state0.a = a; } }; const ret = arg0.run(cb0); return ret; } finally { state0.a = 0; } }, < __wbg_self_0a1b624d19b27707: function(arg0) { > __wbg_self_66106dccc5772672: function(arg0) { const ret = arg0.self; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); }, < __wbg_set_text_content_d23c8b18f8a35ec9: function(arg0, arg1, arg2) { > __wbg_set_text_content_2eb7b5dfe7af47d0: function(arg0, arg1, arg2) { arg0.textContent = getStringFromWasm0(arg1, arg2); }, < __wbg_stack_67ede902d95a6520: function(arg0) { > __wbg_stack_0930686eb278ab28: function(arg0) { const ret = arg0.stack; return ret; }, < __wbg_stack_6cefd16e46c65a30: function(arg0, arg1) { > __wbg_stack_0e033ad2fcc35b52: function(arg0, arg1) { const ret = arg1.stack; < const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); < const len1 = WASM_VECTOR_LEN; > var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); > var len1 = WASM_VECTOR_LEN; getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); }, < __wbg_stack_9fa1a5886a3b33b4: function(arg0, arg1) { > __wbg_stack_1103b1acd0ffdb78: function(arg0, arg1) { const ret = arg1.stack; < var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); < var len1 = WASM_VECTOR_LEN; > const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); > const len1 = WASM_VECTOR_LEN; getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); }, < __wbg_stack_c23041d892b82546: function(arg0) { > __wbg_stack_d4bf37baa019e61e: function(arg0) { const ret = arg0.stack; return ret; }, < __wbg_static_accessor_CREATE_TASK_b6a4b7f987c70792: function() { > __wbg_static_accessor_CREATE_TASK_98c021c7bb4e201d: function() { const ret = typeof console === 'undefined' ? null : console?.createTask; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); }, < __wbg_static_accessor_DOCUMENT_4ad5ebec4f50f5e1: function() { > __wbg_static_accessor_DOCUMENT_35e616e644a7ed30: function() { const ret = document; return ret; }, < __wbg_static_accessor_GLOBAL_9d53f2689e622ca1: function() { > __wbg_static_accessor_GLOBAL_4f52c14942a6e24a: function() { const ret = typeof global === 'undefined' ? null : global; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); }, < __wbg_static_accessor_GLOBAL_THIS_a1a35cec07001a8a: function() { > __wbg_static_accessor_GLOBAL_THIS_4a5df4c30924bc39: function() { const ret = typeof globalThis === 'undefined' ? null : globalThis; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); }, < __wbg_static_accessor_SELF_4c59f6c7ea29a144: function() { > __wbg_static_accessor_SELF_c8dfd8be8f08e852: function() { const ret = typeof self === 'undefined' ? null : self; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); }, < __wbg_static_accessor_WINDOW_e70ae9f2eb052253: function() { > __wbg_static_accessor_WINDOW_1a8fdd6a17dbaf35: function() { const ret = typeof window === 'undefined' ? null : window; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); }, < __wbg_text_content_d674374aef6a4b7a: function(arg0, arg1) { > __wbg_text_content_15676000d3ee687f: function(arg0, arg1) { const ret = arg1.textContent; const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); const len1 = WASM_VECTOR_LEN; getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); }, < __wbg_then_ac7b025999b52837: function(arg0, arg1) { > __wbg_then_f36f56a6cb7bcf6e: function(arg0, arg1) { const ret = arg0.then(arg1); return ret; }, < __wbg_toString_1567f82c9d228682: function() { return handleError(function (arg0, arg1) { > __wbg_toString_2b641865d8f444b1: function() { return handleError(function (arg0, arg1) { const ret = arg1.toString(); const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); const len1 = WASM_VECTOR_LEN; getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); }, arguments); }, __wbindgen_cast_0000000000000000: function(arg0, arg1) { // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 8, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`. const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h0000000000000007); return ret; }, __wbindgen_cast_0000000000000001: function(arg0) { // Cast intrinsic for `F64 -> Externref`. const ret = arg0; return ret; }, __wbindgen_cast_0000000000000002: function(arg0, arg1) { // Cast intrinsic for `Ref(String) -> Externref`. const ret = getStringFromWasm0(arg0, arg1); return ret; }, __wbindgen_init_externref_table: function() { const table = wasm.__wbindgen_externrefs; const offset = table.grow(4); table.set(0, undefined); table.set(offset + 0, undefined); table.set(offset + 1, null); table.set(offset + 2, true); table.set(offset + 3, false); }, }; return { __proto__: null, "./reference_test_bg.js": import0, }; } function wasm_bindgen__convert__closures_____invoke__h0000000000000003(arg0, arg1) { wasm.wasm_bindgen__convert__closures_____invoke__h0000000000000003(arg0, arg1); } function wasm_bindgen__convert__closures_____invoke__h0000000000000006(arg0, arg1) { const ret = wasm.wasm_bindgen__convert__closures_____invoke__h0000000000000006(arg0, arg1); return ret !== 0; } function wasm_bindgen__convert__closures_____invoke__h0000000000000007(arg0, arg1, arg2) { const ret = wasm.wasm_bindgen__convert__closures_____invoke__h0000000000000007(arg0, arg1, arg2); if (ret[1]) { throw takeFromExternrefTable0(ret[0]); } } function wasm_bindgen__convert__closures_____invoke__h0000000000000005(arg0, arg1, arg2, arg3) { wasm.wasm_bindgen__convert__closures_____invoke__h0000000000000005(arg0, arg1, arg2, arg3); } function wasm_bindgen__convert__closures_____invoke__h0000000000000004(arg0, arg1, arg2, arg3, arg4) { wasm.wasm_bindgen__convert__closures_____invoke__h0000000000000004(arg0, arg1, arg2, arg3, arg4); } const WasmBindgenTestContextFinalization = (typeof FinalizationRegistry === 'undefined') ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry(ptr => wasm.__wbg_wasmbindgentestcontext_free(ptr, 1)); function addToExternrefTable0(obj) { const idx = wasm.__externref_table_alloc(); wasm.__wbindgen_externrefs.set(idx, obj); return idx; } const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined') ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry(state => wasm.__wbindgen_destroy_closure(state.a, state.b)); function debugString(val) { // primitive types const type = typeof val; if (type == 'number' || type == 'boolean' || val == null) { return `${val}`; } if (type == 'string') { return `"${val}"`; } if (type == 'symbol') { const description = val.description; if (description == null) { return 'Symbol'; } else { return `Symbol(${description})`; } } if (type == 'function') { const name = val.name; if (typeof name == 'string' && name.length > 0) { return `Function(${name})`; } else { return 'Function'; } } // objects if (Array.isArray(val)) { const length = val.length; let debug = '['; if (length > 0) { debug += debugString(val[0]); } for(let i = 1; i < length; i++) { debug += ', ' + debugString(val[i]); } debug += ']'; return debug; } // Test for built-in const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val)); let className; if (builtInMatches && builtInMatches.length > 1) { className = builtInMatches[1]; } else { // Failed to match the standard '[object ClassName]' return toString.call(val); } if (className == 'Object') { // we're a user defined class or Object // JSON.stringify avoids problems with cycles, and is generally much // easier than looping through ownProperties of `val`. try { return 'Object(' + JSON.stringify(val) + ')'; } catch (_) { return 'Object'; } } // errors if (val instanceof Error) { return `${val.name}: ${val.message}\n${val.stack}`; } // TODO we could test for more things here, like `Set`s and `Map`s. return className; } function getArrayU8FromWasm0(ptr, len) { ptr = ptr >>> 0; return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len); } let cachedDataViewMemory0 = null; function getDataViewMemory0() { if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) { cachedDataViewMemory0 = new DataView(wasm.memory.buffer); } return cachedDataViewMemory0; } function getStringFromWasm0(ptr, len) { return decodeText(ptr >>> 0, len); } let cachedUint8ArrayMemory0 = null; function getUint8ArrayMemory0() { if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) { cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer); } return cachedUint8ArrayMemory0; } function handleError(f, args) { try { return f.apply(this, args); } catch (e) { const idx = addToExternrefTable0(e); wasm.__wbindgen_exn_store(idx); } } function isLikeNone(x) { return x === undefined || x === null; } function makeMutClosure(arg0, arg1, f) { const state = { a: arg0, b: arg1, cnt: 1 }; const real = (...args) => { // First up with a closure we increment the internal reference // count. This ensures that the Rust closure environment won't // be deallocated while we're invoking it. state.cnt++; const a = state.a; state.a = 0; try { return f(a, state.b, ...args); } finally { state.a = a; real._wbg_cb_unref(); } }; real._wbg_cb_unref = () => { if (--state.cnt === 0) { wasm.__wbindgen_destroy_closure(state.a, state.b); state.a = 0; CLOSURE_DTORS.unregister(state); } }; CLOSURE_DTORS.register(real, state, state); return real; } function passArray8ToWasm0(arg, malloc) { const ptr = malloc(arg.length * 1, 1) >>> 0; getUint8ArrayMemory0().set(arg, ptr / 1); WASM_VECTOR_LEN = arg.length; return ptr; } function passArrayJsValueToWasm0(array, malloc) { const ptr = malloc(array.length * 4, 4) >>> 0; for (let i = 0; i < array.length; i++) { const add = addToExternrefTable0(array[i]); getDataViewMemory0().setUint32(ptr + 4 * i, add, true); } WASM_VECTOR_LEN = array.length; return ptr; } function passStringToWasm0(arg, malloc, realloc) { if (realloc === undefined) { const buf = cachedTextEncoder.encode(arg); const ptr = malloc(buf.length, 1) >>> 0; getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf); WASM_VECTOR_LEN = buf.length; return ptr; } let len = arg.length; let ptr = malloc(len, 1) >>> 0; const mem = getUint8ArrayMemory0(); let offset = 0; for (; offset < len; offset++) { const code = arg.charCodeAt(offset); if (code > 0x7F) break; mem[ptr + offset] = code; } if (offset !== len) { if (offset !== 0) { arg = arg.slice(offset); } ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0; const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len); const ret = cachedTextEncoder.encodeInto(arg, view); offset += ret.written; ptr = realloc(ptr, len, offset, 1) >>> 0; } WASM_VECTOR_LEN = offset; return ptr; } function takeFromExternrefTable0(idx) { const value = wasm.__wbindgen_externrefs.get(idx); wasm.__externref_table_dealloc(idx); return value; } let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); cachedTextDecoder.decode(); const MAX_SAFARI_DECODE_BYTES = 2146435072; let numBytesDecoded = 0; function decodeText(ptr, len) { numBytesDecoded += len; if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) { cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); cachedTextDecoder.decode(); numBytesDecoded = len; } return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len)); } const cachedTextEncoder = new TextEncoder(); if (!('encodeInto' in cachedTextEncoder)) { cachedTextEncoder.encodeInto = function (arg, view) { const buf = cachedTextEncoder.encode(arg); view.set(buf); return { read: arg.length, written: buf.length }; }; } let WASM_VECTOR_LEN = 0; let wasmModule, wasmInstance, wasm; function __wbg_finalize_init(instance, module) { wasmInstance = instance; wasm = instance.exports; wasmModule = module; cachedDataViewMemory0 = null; cachedUint8ArrayMemory0 = null; wasm.__wbindgen_start(); return wasm; } async function __wbg_load(module, imports) { if (typeof Response === 'function' && module instanceof Response) { if (typeof WebAssembly.instantiateStreaming === 'function') { try { return await WebAssembly.instantiateStreaming(module, imports); } catch (e) { const validResponse = module.ok && expectedResponseType(module.type); if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') { console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e); } else { throw e; } } } const bytes = await module.arrayBuffer(); return await WebAssembly.instantiate(bytes, imports); } else { const instance = await WebAssembly.instantiate(module, imports); if (instance instanceof WebAssembly.Instance) { return { instance, module }; } else { return instance; } } function expectedResponseType(type) { switch (type) { case 'basic': case 'cors': case 'default': return true; } return false; } } function initSync(module) { if (wasm !== undefined) return wasm; if (module !== undefined) { if (Object.getPrototypeOf(module) === Object.prototype) { ({module} = module) } else { console.warn('using deprecated parameters for `initSync()`; pass a single object instead') } } const imports = __wbg_get_imports(); if (!(module instanceof WebAssembly.Module)) { module = new WebAssembly.Module(module); } const instance = new WebAssembly.Instance(module, imports); return __wbg_finalize_init(instance, module); } async function __wbg_init(module_or_path) { if (wasm !== undefined) return wasm; if (module_or_path !== undefined) { if (Object.getPrototypeOf(module_or_path) === Object.prototype) { ({module_or_path} = module_or_path) } else { console.warn('using deprecated parameters for the initialization function; pass a single object instead') } } if (module_or_path === undefined) { module_or_path = new URL('reference_test_bg.wasm', import.meta.url); } const imports = __wbg_get_imports(); if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) { module_or_path = fetch(module_or_path); } const { instance, module } = await __wbg_load(await module_or_path, imports); return __wbg_finalize_init(instance, module); } export { initSync, __wbg_init as default }; ---- reference::runtest::test_50_web_sys_rs stdout ---- thread 'reference::runtest::test_50_web_sys_rs' (666) panicked at crates/cli/tests/wasm-bindgen/reference.rs:128:13: assertion failed: `(left == right)` Diff < left / right > : /** * @returns {MediaSourceEnum} */ export function get_media_source() { const ret = wasm.get_media_source(); return __wbindgen_enum_MediaSourceEnum[ret]; } /** * @returns {URL} */ export function get_url() { const ret = wasm.get_url(); return ret; } export function __wbg___wbindgen_debug_string_1d67e6b9cb4af7dd(arg0, arg1) { const ret = debugString(arg1); const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); const len1 = WASM_VECTOR_LEN; getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); } export function __wbg___wbindgen_throw_466bb9aa11cb890a(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); } export function __wbg_new_d47a584b2f445ea5() { return handleError(function (arg0, arg1) { const ret = new URL(getStringFromWasm0(arg0, arg1)); return ret; }, arguments); } export function __wbindgen_init_externref_table() { const table = wasm.__wbindgen_externrefs; const offset = table.grow(4); table.set(0, undefined); table.set(offset + 0, undefined); table.set(offset + 1, null); table.set(offset + 2, true); table.set(offset + 3, false); } const __wbindgen_enum_MediaSourceEnum = ["camera", "screen", "application", "window", "browser", "microphone", "audioCapture", "other"]; function addToExternrefTable0(obj) { const idx = wasm.__externref_table_alloc(); wasm.__wbindgen_externrefs.set(idx, obj); return idx; } function debugString(val) { // primitive types const type = typeof val; if (type == 'number' || type == 'boolean' || val == null) { return `${val}`; } if (type == 'string') { return `"${val}"`; } if (type == 'symbol') { const description = val.description; if (description == null) { return 'Symbol'; } else { return `Symbol(${description})`; } } if (type == 'function') { const name = val.name; if (typeof name == 'string' && name.length > 0) { return `Function(${name})`; } else { return 'Function'; } } // objects if (Array.isArray(val)) { const length = val.length; let debug = '['; if (length > 0) { debug += debugString(val[0]); } for(let i = 1; i < length; i++) { debug += ', ' + debugString(val[i]); } debug += ']'; return debug; } // Test for built-in const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val)); let className; if (builtInMatches && builtInMatches.length > 1) { className = builtInMatches[1]; } else { // Failed to match the standard '[object ClassName]' return toString.call(val); } if (className == 'Object') { // we're a user defined class or Object // JSON.stringify avoids problems with cycles, and is generally much // easier than looping through ownProperties of `val`. try { return 'Object(' + JSON.stringify(val) + ')'; } catch (_) { return 'Object'; } } // errors if (val instanceof Error) { return `${val.name}: ${val.message}\n${val.stack}`; } // TODO we could test for more things here, like `Set`s and `Map`s. return className; } let cachedDataViewMemory0 = null; function getDataViewMemory0() { if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) { cachedDataViewMemory0 = new DataView(wasm.memory.buffer); } return cachedDataViewMemory0; } function getStringFromWasm0(ptr, len) { return decodeText(ptr >>> 0, len); } let cachedUint8ArrayMemory0 = null; function getUint8ArrayMemory0() { if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) { cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer); } return cachedUint8ArrayMemory0; } function handleError(f, args) { try { return f.apply(this, args); } catch (e) { const idx = addToExternrefTable0(e); wasm.__wbindgen_exn_store(idx); } } function passStringToWasm0(arg, malloc, realloc) { if (realloc === undefined) { const buf = cachedTextEncoder.encode(arg); const ptr = malloc(buf.length, 1) >>> 0; getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf); WASM_VECTOR_LEN = buf.length; return ptr; } let len = arg.length; let ptr = malloc(len, 1) >>> 0; const mem = getUint8ArrayMemory0(); let offset = 0; for (; offset < len; offset++) { const code = arg.charCodeAt(offset); if (code > 0x7F) break; mem[ptr + offset] = code; } if (offset !== len) { if (offset !== 0) { arg = arg.slice(offset); } ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0; const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len); const ret = cachedTextEncoder.encodeInto(arg, view); offset += ret.written; ptr = realloc(ptr, len, offset, 1) >>> 0; } WASM_VECTOR_LEN = offset; return ptr; } let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); cachedTextDecoder.decode(); const MAX_SAFARI_DECODE_BYTES = 2146435072; let numBytesDecoded = 0; function decodeText(ptr, len) { numBytesDecoded += len; if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) { cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); cachedTextDecoder.decode(); numBytesDecoded = len; } return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len)); } const cachedTextEncoder = new TextEncoder(); if (!('encodeInto' in cachedTextEncoder)) { cachedTextEncoder.encodeInto = function (arg, view) { const buf = cachedTextEncoder.encode(arg); view.set(buf); return { read: arg.length, written: buf.length }; }; } let WASM_VECTOR_LEN = 0; let wasm; export function __wbg_set_wasm(val) { wasm = val; } failures: reference::no_duplicate_wasm_export_in_node_esm_atomics_debug reference::runtest::test_03_anyref_import_catch_rs reference::runtest::test_05_async_number_rs reference::runtest::test_06_async_void_rs reference::runtest::test_07_builder_rs reference::runtest::test_08_closures_rs reference::runtest::test_09_constructor_rs reference::runtest::test_11_default_class_rs reference::runtest::test_13_dynamic_union_rs reference::runtest::test_14_echo_rs reference::runtest::test_16_enums_rs reference::runtest::test_17_exported_class_rename_collision_rs reference::runtest::test_18_exported_class_rename_wrap_rs reference::runtest::test_19_exported_class_wrap_matrix_rs reference::runtest::test_20_extends_rust_rs reference::runtest::test_21_function_attrs_rs reference::runtest::test_22_getter_setter_rs reference::runtest::test_23_import_getter_setter_rs reference::runtest::test_24_import_rs reference::runtest::test_25_int128_rs reference::runtest::test_26_intrinsic_only_rs reference::runtest::test_27_js_namespace_export_same_name_rs reference::runtest::test_28_js_namespace_export_rs reference::runtest::test_29_keyword_rs reference::runtest::test_30_modules_rs reference::runtest::test_35_private_rs reference::runtest::test_36_raw_rs reference::runtest::test_37_reexport_rs reference::runtest::test_38_reserved_class_name_rs reference::runtest::test_39_result_rs reference::runtest::test_40_self_type_rs reference::runtest::test_42_slice_to_array_rs reference::runtest::test_43_static_rs reference::runtest::test_44_string_arg_rs reference::runtest::test_45_symbol_rs reference::runtest::test_46_targets_rs reference::runtest::test_47_typescript_type_rs reference::runtest::test_48_wasm_export_colon_rs reference::runtest::test_49_wasm_export_types_rs reference::runtest::test_50_web_sys_rs reference::runtest_panic_unwind termination_abort_handler termination_reinit termination_reinit_auto_detect test result: FAILED. 36 passed; 44 failed; 0 ignored; 0 measured; 0 filtered out; finished in 68.93s error: test failed, to rerun pass `--test wasm-bindgen` Running tests/wasm-bindgen-test-runner/main.rs (/home/buildozer/aports/community/wasm-bindgen/src/wasm-bindgen-0.2.122/target/debug/deps/wasm_bindgen_test_runner-99d6d8dc15ee498a) running 41 tests test headless_streaming_tests::test_default_console_panic_headless ... ok test headless_streaming_tests::test_browser_console_no_panic_headless ... ok test headless_streaming_tests::test_browser_console_panic_headless ... ok test headless_streaming_tests::test_browser_no_carriage_return_in_output ... ok test headless_streaming_tests::test_browser_output_not_garbled ... ok test headless_streaming_tests::test_default_console_no_panic_headless ... ok test headless_streaming_tests::test_default_no_carriage_return_in_output ... ok test headless_streaming_tests::test_default_output_not_garbled ... ok test headless_streaming_tests::test_headless_worker_output_not_garbled ... ok test headless_streaming_tests::test_headless_worker_output_visible_with_no_stream ... ok test headless_streaming_tests::test_service_worker_console_no_panic_headless ... ok test headless_streaming_tests::test_no_carriage_return_in_output ... ok test headless_streaming_tests::test_service_worker_console_panic_headless ... ok test headless_streaming_tests::test_service_worker_no_carriage_return_in_output ... ok test headless_streaming_tests::test_service_worker_output_not_garbled ... ok test headless_streaming_tests::test_shared_worker_console_panic_headless ... ok test headless_streaming_tests::test_shared_worker_console_no_panic_headless ... ok test headless_streaming_tests::test_user_spawned_data_url_shared_worker_does_not_inject_browser ... ok test headless_streaming_tests::test_shared_worker_no_carriage_return_in_output ... ok test headless_streaming_tests::test_user_spawned_data_url_worker_does_not_inject_browser ... ok test headless_streaming_tests::test_shared_worker_output_not_garbled ... ok test headless_streaming_tests::test_user_spawned_dedicated_worker_logs_browser ... ok test headless_streaming_tests::test_user_spawned_module_worker_logs_browser ... ok test headless_streaming_tests::test_user_spawned_nested_worker_logs_browser ... ok test headless_streaming_tests::test_user_spawned_shared_worker_logs_on_failure_browser ... ok test headless_streaming_tests::test_user_spawned_shared_worker_non_cloneable_log_does_not_crash_browser ... ok test headless_streaming_tests::test_user_spawned_shared_worker_logs_browser ... ok test headless_streaming_tests::test_user_spawned_shared_worker_top_level_logs_browser ... ok test headless_streaming_tests::test_user_spawned_url_module_worker_logs_browser ... ok test headless_streaming_tests::test_user_spawned_worker_add_event_listener_coexists_browser ... ok test headless_streaming_tests::test_user_spawned_worker_logs_on_failure_browser ... ok test headless_streaming_tests::test_user_spawned_url_worker_logs_browser ... ok test headless_streaming_tests::test_user_spawned_worker_non_cloneable_log_does_not_crash_browser ... ok test headless_streaming_tests::test_worker_console_panic_headless ... ok test headless_streaming_tests::test_worker_console_no_panic_nocapture ... ok test headless_streaming_tests::test_worker_console_panic_nocapture ... ok test headless_streaming_tests::test_worker_console_no_panic_headless ... ok test headless_streaming_tests::test_user_spawned_worker_logs_on_failure_node ... ok test headless_streaming_tests::test_user_spawned_worker_logs_node_esm ... ok test headless_streaming_tests::test_user_spawned_worker_logs_node_cjs has been running for over 60 seconds test test_wasm_bindgen_test_runner_list has been running for over 60 seconds test headless_streaming_tests::test_user_spawned_worker_logs_node_cjs ... ok test test_wasm_bindgen_test_runner_list ... ok test result: ok. 41 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 68.81s Doc-tests wasm_bindgen_cli running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s error: 1 target failed: `--test wasm-bindgen` >>> wasm-bindgen: Entering fakeroot... >>> wasm-bindgen*: Running postcheck for wasm-bindgen >>> wasm-bindgen*: Preparing package wasm-bindgen... >>> wasm-bindgen*: Stripping binaries >>> wasm-bindgen*: Scanning shared objects >>> wasm-bindgen*: Tracing dependencies... cargo nodejs rust-wasm so:libc.musl-s390x.so.1 so:libgcc_s.so.1 >>> wasm-bindgen*: Package size: 11.1 MB >>> wasm-bindgen*: Compressing data... >>> wasm-bindgen*: Create checksum... >>> wasm-bindgen*: Create wasm-bindgen-0.2.122-r0.apk >>> wasm-bindgen: Build complete at Sun, 24 May 2026 17:28:01 +0000 elapsed time 0h 5m 17s >>> wasm-bindgen: Cleaning up srcdir >>> wasm-bindgen: Cleaning up pkgdir >>> wasm-bindgen: Uninstalling dependencies... ( 1/21) Purging .makedepends-wasm-bindgen (20260524.172245) ( 2/21) Purging nodejs (24.15.0-r0) ( 3/21) Purging ca-certificates (20260413-r0) Executing ca-certificates-20260413-r0.post-deinstall ( 4/21) Purging rust-wasm (1.95.0-r0) ( 5/21) Purging wasi-libc (0.20250204-r1) ( 6/21) Purging cargo-auditable (0.7.5-r0) ( 7/21) Purging ada-libs (3.3.0-r0) ( 8/21) Purging cargo (1.95.0-r0) ( 9/21) Purging rust (1.95.0-r0) (10/21) Purging icu-libs (78.1-r0) (11/21) Purging lld22 (22.1.3-r0) (12/21) Purging lld22-libs (22.1.3-r0) (13/21) Purging llvm22-libs (22.1.3-r0) (14/21) Purging scudo-malloc (22.1.3-r0) (15/21) Purging simdjson (4.2.4-r0) (16/21) Purging simdutf (9.0.0-r0) (17/21) Purging sqlite-libs (3.53.1-r0) (18/21) Purging icu-data-en (78.1-r0) (19/21) Purging libffi (3.5.2-r1) (20/21) Purging libxml2 (2.13.9-r1) (21/21) Purging xz-libs (5.8.3-r0) Executing busybox-1.37.0-r31.trigger OK: 386.3 MiB in 106 packages >>> wasm-bindgen: Updating the community/s390x repository index... >>> wasm-bindgen: Signing the index...