>>> wasm-bindgen: Building community/wasm-bindgen 0.2.122-r0 (using abuild 3.17.0_rc2-r0) started Sun, 24 May 2026 17:56:50 +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 rust (1.95.0-r0) ( 6/21) Installing sqlite-libs (3.53.1-r0) ( 7/21) Installing cargo (1.95.0-r0) ( 8/21) Installing ca-certificates (20260413-r0) ( 9/21) Installing ada-libs (3.3.0-r0) (10/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. (11/21) Installing icu-libs (78.1-r0) (12/21) Installing simdjson (4.2.4-r0) (13/21) Installing simdutf (9.0.0-r0) (14/21) Installing nodejs (24.15.0-r0) (15/21) Installing lld22-libs (22.1.3-r0) (16/21) Installing scudo-malloc (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.175651) Executing busybox-1.37.0-r31.trigger Executing ca-certificates-20260413-r0.trigger OK: 993.0 MiB in 125 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 /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 pin-project-lite v0.2.17 Downloaded tower-layer v0.3.3 Downloaded untrusted v0.9.0 Downloaded form_urlencoded v1.2.2 Downloaded potential_utf v0.1.5 Downloaded sync_wrapper v1.0.2 Downloaded idna_adapter v1.2.2 Downloaded zeroize v1.8.2 Downloaded bitflags v2.11.1 Downloaded stable_deref_trait v1.2.1 Downloaded toml_writer v1.1.1+spec-1.1.0 Downloaded futures-task v0.3.32 Downloaded percent-encoding v2.3.2 Downloaded lzw v0.10.0 Downloaded futures-core-preview v0.3.0-alpha.19 Downloaded bytes v1.11.1 Downloaded socket2 v0.6.3 Downloaded weedle v0.13.1 Downloaded icu_normalizer_data v2.2.0 Downloaded unicase v2.9.0 Downloaded diff v0.1.13 Downloaded pretty_assertions v1.4.1 Downloaded yansi v1.0.1 Downloaded chrono v0.4.44 Downloaded strsim v0.11.1 Downloaded gloo-events v0.2.0 Downloaded ryu v1.0.23 Downloaded simba v0.9.1 Downloaded console_log v1.0.0 Downloaded typenum v1.20.0 Downloaded gloo-dialogs v0.2.0 Downloaded rustls-native-certs v0.8.3 Downloaded utf8parse v0.2.2 Downloaded log v0.4.29 Downloaded console_error_panic_hook v0.1.7 Downloaded num-bigint v0.4.6 Downloaded wait-timeout v0.2.1 Downloaded predicates v3.1.4 Downloaded powerfmt v0.2.0 Downloaded termtree v0.5.1 Downloaded sha1_smol v1.0.1 Downloaded crossbeam-epoch v0.9.18 Downloaded futures-channel-preview v0.3.0-alpha.19 Downloaded thiserror-impl v1.0.69 Downloaded thiserror-impl v2.0.18 Downloaded thiserror v1.0.69 Downloaded approx v0.5.1 Downloaded base64 v0.22.1 Downloaded num-complex v0.4.6 Downloaded bytemuck v1.25.0 Downloaded rawpointer v0.2.1 Downloaded hyper-util v0.1.20 Downloaded rand_distr v0.4.3 Downloaded id-arena v2.3.0 Downloaded askama_parser v0.15.6 Downloaded wide v0.7.33 Downloaded askama_derive v0.15.6 Downloaded statrs v0.18.0 Downloaded heck v0.5.0 Downloaded jpeg-decoder v0.1.22 Downloaded nalgebra v0.33.3 Downloaded time-core v0.1.8 Downloaded foreign-types v0.3.2 Downloaded libc v0.2.186 Downloaded adler2 v2.0.1 Downloaded tokio v1.52.3 Downloaded wat v1.250.0 Downloaded bstr v1.12.1 Downloaded env_filter v1.0.1 Downloaded rustc_version v0.4.1 Downloaded leb128fmt v0.1.0 Downloaded gloo v0.11.0 Downloaded proc-macro-crate v3.5.0 Downloaded version_check v0.9.5 Downloaded tracing v0.1.44 Downloaded num-conv v0.2.2 Downloaded alloc-stdlib v0.2.2 Downloaded deflate v0.7.20 Downloaded toml_edit v0.19.15 Downloaded colorchoice v1.0.5 Downloaded json v0.12.4 Downloaded hyper v1.9.0 Downloaded quinn-proto v0.11.14 Downloaded num_threads v0.1.7 Downloaded is_terminal_polyfill v1.70.2 Downloaded httpdate v1.0.3 Downloaded sourcefile v0.2.1 Downloaded lazy_static v1.5.0 Downloaded leb128 v0.2.6 Downloaded basic-toml v0.1.10 Downloaded paste v1.0.15 Downloaded proc-macro-crate v1.3.1 Downloaded safe_arch v0.7.4 Downloaded quinn v0.11.9 Downloaded foldhash v0.2.0 Downloaded anstyle v1.0.14 Downloaded ring v0.17.14 Downloaded base64ct v1.8.3 Downloaded fallible-iterator v0.3.0 Downloaded tracing-core v0.1.36 Downloaded assert_cmd v2.2.2 Downloaded humantime v2.3.0 Downloaded askama_macros v0.15.6 Downloaded askama v0.15.6 Downloaded thiserror v2.0.18 Downloaded errno v0.3.14 Downloaded gloo-worker-macros v0.1.0 Downloaded walrus-macro v0.26.0 Downloaded pinned v0.1.0 Downloaded http-body-util v0.1.3 Downloaded gloo-worker v0.5.0 Downloaded hyper-rustls v0.27.9 Downloaded predicates-tree v1.0.13 Downloaded float-cmp v0.10.0 Downloaded gif v0.9.2 Downloaded crossbeam-deque v0.8.6 Downloaded inflate v0.1.1 Downloaded num-integer v0.1.46 Downloaded ipnet v2.12.0 Downloaded alloc-no-stdlib v2.0.4 Downloaded foreign-types-shared v0.1.1 Downloaded lru-slab v0.1.2 Downloaded openssl-macros v0.1.1 Downloaded either v1.16.0 Downloaded want v0.3.1 Downloaded utf8-zero v0.8.1 Downloaded encoding_rs v0.8.35 Downloaded pem-rfc7468 v1.0.0 Downloaded simd-adler32 v0.3.9 Downloaded pkg-config v0.3.33 Downloaded anstyle-parse v1.0.0 Downloaded anstyle-query v1.1.5 Downloaded mime v0.3.17 Downloaded rustc-hash v2.1.2 Downloaded difflib v0.4.0 Downloaded normalize-line-endings v0.3.0 Downloaded predicates-core v1.0.10 Downloaded num_cpus v1.17.0 Downloaded enum_primitive v0.1.1 Downloaded crossbeam-utils v0.8.21 Downloaded anstream v1.0.0 Downloaded zerocopy-derive v0.8.48 Downloaded rand v0.9.4 Downloaded quinn-udp v0.5.14 Downloaded num-rational v0.1.43 Downloaded num-traits v0.1.43 Downloaded bitflags v0.7.0 Downloaded relative-path v1.9.3 Downloaded adler32 v1.2.0 Downloaded byteorder v1.5.0 Downloaded getrandom v0.3.4 Downloaded rand_chacha v0.9.0 Downloaded tinyvec_macros v0.1.1 Downloaded native-tls v0.2.18 Downloaded cfg_aliases v0.2.1 Downloaded gloo-file v0.3.0 Downloaded zerocopy v0.8.48 Downloaded clap_derive v4.6.1 Downloaded rand_core v0.9.5 Downloaded tinyvec v1.11.0 Downloaded http v0.2.12 Downloaded winnow v0.5.40 Downloaded wasmprinter v0.245.1 Downloaded rustc-demangle v0.1.27 Downloaded h2 v0.4.14 Downloaded openssl-probe v0.2.1 Downloaded aws-lc-rs v1.17.0 Downloaded serde-wasm-bindgen v0.6.5 Downloaded chunked_transfer v1.5.0 Downloaded gloo-storage v0.3.0 Downloaded tokio-util v0.7.18 Downloaded rustls-platform-verifier v0.7.0 Downloaded futures-timer v3.0.4 Downloaded rustls v0.23.40 Downloaded deranged v0.5.8 Downloaded fastrand v2.4.1 Downloaded crc32fast v1.5.0 Downloaded semver v1.0.28 Downloaded clap_lex v1.1.0 Downloaded serde_urlencoded v0.7.1 Downloaded gloo-history v0.2.2 Downloaded tempfile v3.27.0 Downloaded anyhow v1.0.102 Downloaded gloo-timers v0.3.0 Downloaded gloo-console v0.3.0 Downloaded ascii v1.1.0 Downloaded bincode v1.3.3 Downloaded syn v2.0.117 Downloaded httparse v1.10.1 Downloaded jobserver v0.1.34 Downloaded env_logger v0.11.10 Downloaded rayon v1.12.0 Downloaded gloo-utils v0.2.0 Downloaded toml_datetime v0.6.11 Downloaded atomic-waker v1.1.2 Downloaded fnv v1.0.7 Downloaded try-lock v0.2.5 Downloaded ppv-lite86 v0.2.21 Downloaded cmake v0.1.58 Downloaded fs_extra v1.3.0 Downloaded find-msvc-tools v0.1.9 Downloaded base64 v0.13.1 Downloaded filetime v0.2.29 Downloaded buf_redux v0.8.4 Downloaded mime_guess v2.0.5 Downloaded quick-error v1.2.3 Downloaded twoway v0.1.8 Downloaded multipart v0.18.0 Downloaded rand_chacha v0.3.1 Downloaded rand_core v0.6.4 Downloaded rayon-core v1.13.0 Downloaded cc v1.2.62 Downloaded nom v5.1.3 Downloaded num-rational v0.4.2 Downloaded png v0.6.2 Downloaded image v0.12.4 Downloaded dunce v1.0.5 Downloaded tower v0.5.3 Downloaded tiny_http v0.12.0 Downloaded tower-http v0.6.11 Downloaded wasmprinter v0.243.0 Downloaded icu_properties_data v2.2.0 Downloaded zerovec v0.11.6 Downloaded idna v1.1.0 Downloaded reqwest v0.13.3 Downloaded getrandom v0.4.2 Downloaded openssl-sys v0.9.116 Downloaded libm v0.2.16 Downloaded rstest v0.26.1 Downloaded clap v4.6.1 Downloaded mio v1.2.0 Downloaded serde_json v1.0.150 Downloaded matrixmultiply v0.3.10 Downloaded miniz_oxide v0.8.9 Downloaded hashbrown v0.17.1 Downloaded indexmap v2.14.0 Downloaded ureq-proto v0.6.0 Downloaded winnow v1.0.3 Downloaded toml_edit v0.25.11+spec-1.1.0 Downloaded rstest_macros v0.26.1 Downloaded futures-util v0.3.32 Downloaded safemem v0.3.3 Downloaded threadpool v1.8.1 Downloaded color_quant v1.1.0 Downloaded num-iter v0.1.45 Downloaded iana-time-zone v0.1.65 Downloaded pin-project-internal v1.1.13 Downloaded pin-project v1.1.13 Downloaded gloo-render v0.2.0 Downloaded rustls-webpki v0.103.13 Downloaded http v1.4.0 Downloaded icu_properties v2.2.0 Downloaded url v2.5.8 Downloaded wasm-encoder v0.245.1 Downloaded wasm-encoder v0.243.0 Downloaded bumpalo v3.20.3 Downloaded serde v1.0.228 Downloaded icu_normalizer v2.2.0 Downloaded icu_collections v2.2.0 Downloaded icu_locale_core v2.2.0 Downloaded icu_provider v2.2.0 Downloaded zerotrie v0.2.4 Downloaded wasm-encoder v0.250.0 Downloaded serde_derive v1.0.228 Downloaded serde_core v1.0.228 Downloaded trybuild v1.0.116 Downloaded unicode-ident v1.0.24 Downloaded scoped_threadpool v0.1.9 Downloaded rustls-pki-types v1.14.1 Downloaded litemap v0.8.2 Downloaded num-traits v0.2.19 Downloaded rouille v3.6.2 Downloaded der v0.8.0 Downloaded memchr v2.8.0 Downloaded quote v1.0.45 Downloaded gloo-net v0.5.0 Downloaded shlex v1.3.0 Downloaded subtle v2.6.1 Downloaded tokio-rustls v0.26.4 Downloaded rand v0.8.6 Downloaded tinystr v0.8.3 Downloaded yoke v0.8.2 Downloaded smallvec v1.15.1 Downloaded futures-executor v0.3.32 Downloaded futures v0.3.32 Downloaded termcolor v1.4.1 Downloaded toml v1.1.2+spec-1.1.0 Downloaded cfg-if v1.0.4 Downloaded futures-core v0.3.32 Downloaded proc-macro2 v1.0.106 Downloaded futures-macro v0.3.32 Downloaded getrandom v0.2.17 Downloaded http-body v1.0.1 Downloaded tower-service v0.3.3 Downloaded flate2 v1.1.9 Downloaded writeable v0.6.3 Downloaded nu-ansi-term v0.50.3 Downloaded toml_parser v1.1.2+spec-1.1.0 Downloaded rustversion v1.0.22 Downloaded autocfg v1.5.1 Downloaded zmij v1.0.21 Downloaded toml_datetime v1.1.1+spec-1.1.0 Downloaded futures-io v0.3.32 Downloaded displaydoc v0.2.5 Downloaded synstructure v0.13.2 Downloaded hashbrown v0.16.1 Downloaded zerofrom-derive v0.1.7 Downloaded zerofrom v0.1.8 Downloaded zerovec-derive v0.11.3 Downloaded utf8_iter v1.0.4 Downloaded async-trait v0.1.89 Downloaded cast v0.3.0 Downloaded oorandom v11.1.5 Downloaded tokio-macros v2.7.0 Downloaded glob v0.3.3 Downloaded itoa v1.0.18 Downloaded futures-channel v0.3.32 Downloaded equivalent v1.0.2 Downloaded ureq v3.3.0 Downloaded webpki-root-certs v1.0.7 Downloaded yoke-derive v0.8.2 Downloaded regex v1.12.3 Downloaded target-triple v1.0.0 Downloaded serde_spanned v1.1.1 Downloaded gg-alloc v1.0.0 Downloaded futures-sink v0.3.32 Downloaded slab v0.4.12 Downloaded wast v250.0.0 Downloaded aws-lc-sys v0.41.0 Downloaded clap_builder v4.6.0 Downloaded brotli-decompressor v5.0.0 Downloaded webpki-roots v1.0.7 Downloaded time v0.3.47 Downloaded vcpkg v0.2.15 Downloaded wasmparser v0.245.1 Downloaded wasmparser v0.243.0 Downloaded wasmparser v0.250.0 Downloaded openssl v0.10.80 Downloaded gimli v0.32.3 Downloaded unicode-width v0.2.2 Downloaded walrus v0.26.2 Downloaded regex-syntax v0.8.10 Downloaded wast v243.0.0 Downloaded rustix v1.1.4 Downloaded aho-corasick v1.1.4 Downloaded regex-automata v0.4.14 Downloaded jiff v0.2.24 Downloaded linux-raw-sys v0.12.1 Downloaded openssl-src v300.6.0+3.6.2 Compiling proc-macro2 v1.0.106 Compiling quote v1.0.45 Compiling unicode-ident v1.0.24 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 find-msvc-tools v0.1.9 Compiling writeable v0.6.3 Compiling litemap v0.8.2 Compiling shlex v1.3.0 Compiling icu_properties_data v2.2.0 Compiling icu_normalizer_data v2.2.0 Compiling bitflags v2.11.1 Compiling utf8_iter v1.0.4 Compiling zerocopy v0.8.48 Compiling serde v1.0.228 Compiling itoa v1.0.18 Compiling rayon-core v1.13.0 Compiling httparse v1.10.1 Compiling unicase v2.9.0 Compiling rustix v1.1.4 Compiling hashbrown v0.17.1 Compiling autocfg v1.5.1 Compiling zmij v1.0.21 Compiling zeroize v1.8.2 Compiling smallvec v1.15.1 Compiling once_cell v1.21.4 Compiling utf8parse v0.2.2 Compiling equivalent v1.0.2 Compiling getrandom v0.4.2 Compiling heck v0.5.0 Compiling foldhash v0.2.0 Compiling either v1.16.0 Compiling crc32fast v1.5.0 Compiling anstyle-query v1.1.5 Compiling colorchoice v1.0.5 Compiling regex-syntax v0.8.10 Compiling anstyle v1.0.14 Compiling untrusted v0.9.0 Compiling percent-encoding v2.3.2 Compiling anyhow v1.0.102 Compiling linux-raw-sys v0.12.1 Compiling is_terminal_polyfill v1.70.2 Compiling serde_json v1.0.150 Compiling semver v1.0.28 Compiling powerfmt v0.2.0 Compiling simd-adler32 v0.3.9 Compiling safemem v0.3.3 Compiling alloc-no-stdlib v2.0.4 Compiling adler2 v2.0.1 Compiling rustls v0.23.40 Compiling wasm-bindgen-shared v0.2.122 (/home/buildozer/aports/community/wasm-bindgen/src/wasm-bindgen-0.2.122/crates/shared) Compiling bytes v1.11.1 Compiling leb128fmt v0.1.0 Compiling fastrand v2.4.1 Compiling base64 v0.22.1 Compiling mime v0.3.17 Compiling fallible-iterator v0.3.0 Compiling num_threads v0.1.7 Compiling strsim v0.11.1 Compiling leb128 v0.2.6 Compiling chunked_transfer v1.5.0 Compiling time-core v0.1.8 Compiling subtle v2.6.1 Compiling httpdate v1.0.3 Compiling iana-time-zone v0.1.65 Compiling num-conv v0.2.2 Compiling quick-error v1.2.3 Compiling ascii v1.1.0 Compiling clap_lex v1.1.0 Compiling base64 v0.13.1 Compiling wasm-bindgen-cli v0.2.122 (/home/buildozer/aports/community/wasm-bindgen/src/wasm-bindgen-0.2.122/crates/cli) Compiling rustc-demangle v0.1.27 Compiling utf8-zero v0.8.1 Compiling anstyle-parse v1.0.0 Compiling sha1_smol v1.0.1 Compiling jiff v0.2.24 Compiling wasm-bindgen-test-shared v0.2.122 (/home/buildozer/aports/community/wasm-bindgen/src/wasm-bindgen-0.2.122/crates/test-shared) Compiling alloc-stdlib v0.2.2 Compiling miniz_oxide v0.8.9 Compiling cc v1.2.62 Compiling deranged v0.5.8 Compiling wasm-encoder v0.245.1 Compiling form_urlencoded v1.2.2 Compiling brotli-decompressor v5.0.0 Compiling rustls-pki-types v1.14.1 Compiling anstream v1.0.0 Compiling tiny_http v0.12.0 Compiling aho-corasick v1.1.4 Compiling buf_redux v0.8.4 Compiling twoway v0.1.8 Compiling num-traits v0.2.19 Compiling mime_guess v2.0.5 Compiling clap_builder v4.6.0 Compiling flate2 v1.1.9 Compiling crossbeam-epoch v0.9.18 Compiling crossbeam-deque v0.8.6 Compiling webpki-roots v1.0.7 Compiling syn v2.0.117 Compiling http v1.4.0 Compiling chrono v0.4.44 Compiling getrandom v0.2.17 Compiling num_cpus v1.17.0 Compiling filetime v0.2.29 Compiling rand_core v0.6.4 Compiling rayon v1.12.0 Compiling threadpool v1.8.1 Compiling ring v0.17.14 Compiling time v0.3.47 Compiling regex-automata v0.4.14 Compiling ureq-proto v0.6.0 Compiling tempfile v3.27.0 Compiling indexmap v2.14.0 Compiling hashbrown v0.16.1 Compiling id-arena v2.3.0 Compiling gimli v0.32.3 Compiling regex v1.12.3 Compiling env_filter v1.0.1 Compiling env_logger v0.11.10 Compiling ppv-lite86 v0.2.21 Compiling rand_chacha v0.3.1 Compiling rand v0.8.6 Compiling rustls-webpki v0.103.13 Compiling synstructure v0.13.2 Compiling multipart v0.18.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 walrus-macro v0.26.0 Compiling clap_derive v4.6.1 Compiling zerofrom v0.1.8 Compiling yoke v0.8.2 Compiling zerovec v0.11.6 Compiling zerotrie v0.2.4 Compiling clap v4.6.1 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 icu_properties v2.2.0 Compiling icu_normalizer v2.2.0 Compiling wasmparser v0.245.1 Compiling ureq v3.3.0 Compiling idna_adapter v1.2.2 Compiling idna v1.1.0 Compiling url v2.5.8 Compiling rouille v3.6.2 Compiling walrus v0.26.2 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 3m 18s 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 stable_deref_trait v1.2.1 Compiling cfg-if v1.0.4 Compiling memchr v2.8.0 Compiling serde_core v1.0.228 Compiling equivalent v1.0.2 Compiling hashbrown v0.17.1 Compiling regex-syntax v0.8.10 Compiling log v0.4.29 Compiling crossbeam-utils v0.8.21 Compiling bitflags v2.11.1 Compiling writeable v0.6.3 Compiling autocfg v1.5.1 Compiling find-msvc-tools v0.1.9 Compiling litemap v0.8.2 Compiling shlex v1.3.0 Compiling zerocopy v0.8.48 Compiling serde v1.0.228 Compiling icu_properties_data v2.2.0 Compiling icu_normalizer_data v2.2.0 Compiling utf8_iter v1.0.4 Compiling httparse v1.10.1 Compiling rayon-core v1.13.0 Compiling anstyle v1.0.14 Compiling itoa v1.0.18 Compiling zmij v1.0.21 Compiling heck v0.5.0 Compiling utf8parse v0.2.2 Compiling zeroize v1.8.2 Compiling foldhash v0.2.0 Compiling once_cell v1.21.4 Compiling smallvec v1.15.1 Compiling getrandom v0.4.2 Compiling anyhow v1.0.102 Compiling rustix v1.1.4 Compiling unicase v2.9.0 Compiling untrusted v0.9.0 Compiling is_terminal_polyfill v1.70.2 Compiling linux-raw-sys v0.12.1 Compiling semver v1.0.28 Compiling crc32fast v1.5.0 Compiling serde_json v1.0.150 Compiling anstyle-query v1.1.5 Compiling either v1.16.0 Compiling percent-encoding v2.3.2 Compiling colorchoice v1.0.5 Compiling safemem v0.3.3 Compiling fastrand v2.4.1 Compiling mime v0.3.17 Compiling base64 v0.22.1 Compiling fallible-iterator v0.3.0 Compiling simd-adler32 v0.3.9 Compiling bytes v1.11.1 Compiling wasm-bindgen-shared v0.2.122 (/home/buildozer/aports/community/wasm-bindgen/src/wasm-bindgen-0.2.122/crates/shared) Compiling rustls v0.23.40 Compiling alloc-no-stdlib v2.0.4 Compiling leb128fmt v0.1.0 Compiling adler2 v2.0.1 Compiling powerfmt v0.2.0 Compiling httpdate v1.0.3 Compiling clap_lex v1.1.0 Compiling subtle v2.6.1 Compiling time-core v0.1.8 Compiling num-conv v0.2.2 Compiling quick-error v1.2.3 Compiling iana-time-zone v0.1.65 Compiling num_threads v0.1.7 Compiling chunked_transfer v1.5.0 Compiling ascii v1.1.0 Compiling strsim v0.11.1 Compiling leb128 v0.2.6 Compiling jiff v0.2.24 Compiling utf8-zero v0.8.1 Compiling wasm-bindgen-cli v0.2.122 (/home/buildozer/aports/community/wasm-bindgen/src/wasm-bindgen-0.2.122/crates/cli) Compiling rustc-demangle v0.1.27 Compiling sha1_smol v1.0.1 Compiling base64 v0.13.1 Compiling winnow v1.0.3 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 anstyle-parse v1.0.0 Compiling alloc-stdlib v0.2.2 Compiling predicates-core v1.0.10 Compiling assert_cmd v2.2.2 Compiling futures-core v0.3.32 Compiling termtree v0.5.1 Compiling miniz_oxide v0.8.9 Compiling wasm-encoder v0.245.1 Compiling relative-path v1.9.3 Compiling glob v0.3.3 Compiling normalize-line-endings v0.3.0 Compiling difflib v0.4.0 Compiling futures-task v0.3.32 Compiling deranged v0.5.8 Compiling pin-project-lite v0.2.17 Compiling slab v0.4.12 Compiling futures-timer v3.0.4 Compiling form_urlencoded v1.2.2 Compiling yansi v1.0.1 Compiling diff v0.1.13 Compiling brotli-decompressor v5.0.0 Compiling termcolor v1.4.1 Compiling rustc_version v0.4.1 Compiling anstream v1.0.0 Compiling cc v1.2.62 Compiling rustls-pki-types v1.14.1 Compiling predicates-tree v1.0.13 Compiling tiny_http v0.12.0 Compiling aho-corasick v1.1.4 Compiling buf_redux v0.8.4 Compiling twoway v0.1.8 Compiling mime_guess v2.0.5 Compiling http v1.4.0 Compiling pretty_assertions v1.4.1 Compiling clap_builder v4.6.0 Compiling rstest_macros v0.26.1 Compiling num-traits v0.2.19 Compiling webpki-roots v1.0.7 Compiling indexmap v2.14.0 Compiling syn v2.0.117 Compiling flate2 v1.1.9 Compiling crossbeam-epoch v0.9.18 Compiling crossbeam-deque v0.8.6 Compiling ureq-proto v0.6.0 Compiling ring v0.17.14 Compiling chrono v0.4.44 Compiling float-cmp v0.10.0 Compiling rayon v1.12.0 Compiling getrandom v0.2.17 Compiling num_cpus v1.17.0 Compiling time v0.3.47 Compiling filetime v0.2.29 Compiling wait-timeout v0.2.1 Compiling rand_core v0.6.4 Compiling threadpool v1.8.1 Compiling regex-automata v0.4.14 Compiling toml_parser v1.1.2+spec-1.1.0 Compiling toml_edit v0.25.11+spec-1.1.0 Compiling tempfile v3.27.0 Compiling hashbrown v0.16.1 Compiling proc-macro-crate v3.5.0 Compiling gimli v0.32.3 Compiling id-arena v2.3.0 Compiling regex v1.12.3 Compiling ppv-lite86 v0.2.21 Compiling rustls-webpki v0.103.13 Compiling bstr v1.12.1 Compiling rand_chacha v0.3.1 Compiling rand v0.8.6 Compiling env_filter v1.0.1 Compiling predicates v3.1.4 Compiling env_logger v0.11.10 Compiling multipart v0.18.0 Compiling synstructure v0.13.2 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 clap_derive v4.6.1 Compiling futures-macro v0.3.32 Compiling futures-util v0.3.32 Compiling zerofrom v0.1.8 Compiling yoke v0.8.2 Compiling zerovec v0.11.6 Compiling zerotrie v0.2.4 Compiling clap v4.6.1 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 ureq v3.3.0 Compiling icu_provider v2.2.0 Compiling icu_normalizer v2.2.0 Compiling icu_properties v2.2.0 Compiling wasmparser v0.245.1 Compiling rstest v0.26.1 Compiling idna_adapter v1.2.2 Compiling idna v1.1.0 Compiling url v2.5.8 Compiling rouille v3.6.2 Compiling walrus v0.26.2 Compiling wasmprinter v0.245.1 Compiling wasm-bindgen-cli-support v0.2.122 (/home/buildozer/aports/community/wasm-bindgen/src/wasm-bindgen-0.2.122/crates/cli-support) 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 1m 25s 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-34f2385566ad8d70) 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-fcefd81b30f5686b) 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-53d733b665cec612) 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-8e773ced1ecbe9ed) 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-cc80de1696a4b487) running 80 tests test reference::runtest::test_33_panic_unwind_rs ... ok test reference::no_duplicate_wasm_export_in_node_esm_atomics_debug ... FAILED test reference::canonicalize_wat_types_ignores_type_order ... ok test version_useful ... ok test termination_abort_handler ... FAILED test termination_reinit_auto_detect ... FAILED test reference::runtest_panic_unwind ... FAILED test termination_reinit ... FAILED test bin_crate_works has been running for over 60 seconds test bin_crate_works_without_name_section has been running for over 60 seconds test constructor_cannot_return_option_struct has been running for over 60 seconds test default_module_path_target_no_modules has been running for over 60 seconds test default_module_path_target_web has been running for over 60 seconds test diagnostics::missing_js_namespace_on_impl_nested_namespace has been running for over 60 seconds test diagnostics::missing_js_namespace_on_impl_suggests_struct_namespace has been running for over 60 seconds test diagnostics::typo_in_js_class_suggests_nearest_struct has been running for over 60 seconds test emscripten_namespaced_exports_valid_ts has been running for over 60 seconds test function_table_preserved has been running for over 60 seconds test function_table_preserved_for_stack_closures has been running for over 60 seconds test multiple_start_functions has been running for over 60 seconds test namespace_global_and_noglobal_works has been running for over 60 seconds test npm::more_package_json_fields_ignored has been running for over 60 seconds test npm::no_modules_rejects_npm has been running for over 60 seconds test npm::npm_conflict_rejected has been running for over 60 seconds test omit_default_module_path_target_no_modules has been running for over 60 seconds test omit_default_module_path_target_web has been running for over 60 seconds test one_export_works has been running for over 60 seconds test private_namespaced_classes_export_actual_ts_identifier has been running for over 60 seconds test private_start_function has been running for over 60 seconds test reference::runtest::test_01_add_rs has been running for over 60 seconds test reference::runtest::test_02_anyref_empty_rs has been running for over 60 seconds test reference::runtest::test_03_anyref_import_catch_rs has been running for over 60 seconds test reference::runtest::test_04_anyref_nop_rs has been running for over 60 seconds test reference::runtest::test_05_async_number_rs has been running for over 60 seconds test reference::runtest::test_06_async_void_rs has been running for over 60 seconds test reference::runtest::test_07_builder_rs has been running for over 60 seconds test reference::runtest::test_08_closures_rs has been running for over 60 seconds test reference::runtest::test_09_constructor_rs has been running for over 60 seconds test reference::runtest::test_10_custom_section_rs has been running for over 60 seconds test reference::runtest::test_11_default_class_rs has been running for over 60 seconds test reference::runtest::test_12_default_function_rs has been running for over 60 seconds test reference::runtest::test_13_dynamic_union_rs has been running for over 60 seconds test reference::runtest::test_14_echo_rs has been running for over 60 seconds test reference::runtest::test_15_empty_rs has been running for over 60 seconds test reference::runtest::test_16_enums_rs has been running for over 60 seconds test reference::runtest::test_17_exported_class_rename_collision_rs has been running for over 60 seconds test reference::runtest::test_18_exported_class_rename_wrap_rs has been running for over 60 seconds test reference::runtest::test_19_exported_class_wrap_matrix_rs has been running for over 60 seconds test reference::runtest::test_20_extends_rust_rs has been running for over 60 seconds test reference::runtest::test_21_function_attrs_rs has been running for over 60 seconds test reference::runtest::test_22_getter_setter_rs has been running for over 60 seconds test reference::runtest::test_23_import_getter_setter_rs has been running for over 60 seconds test reference::runtest::test_24_import_rs has been running for over 60 seconds test reference::runtest::test_25_int128_rs has been running for over 60 seconds test reference::runtest::test_26_intrinsic_only_rs has been running for over 60 seconds test reference::runtest::test_27_js_namespace_export_same_name_rs has been running for over 60 seconds test reference::runtest::test_28_js_namespace_export_rs has been running for over 60 seconds test reference::runtest::test_29_keyword_rs has been running for over 60 seconds test reference::runtest::test_30_modules_rs has been running for over 60 seconds test reference::runtest::test_31_nop_rs has been running for over 60 seconds test reference::runtest::test_32_optional_args_rs has been running for over 60 seconds test reference::runtest::test_34_pointers_rs has been running for over 60 seconds test reference::runtest::test_35_private_rs has been running for over 60 seconds test reference::runtest::test_36_raw_rs has been running for over 60 seconds test reference::runtest::test_37_reexport_rs has been running for over 60 seconds test reference::runtest::test_38_reserved_class_name_rs has been running for over 60 seconds test reference::runtest::test_39_result_rs has been running for over 60 seconds test reference::runtest::test_40_self_type_rs has been running for over 60 seconds test reference::runtest::test_41_skip_jsdoc_rs has been running for over 60 seconds test reference::runtest::test_42_slice_to_array_rs has been running for over 60 seconds test reference::runtest::test_43_static_rs has been running for over 60 seconds test reference::runtest::test_44_string_arg_rs has been running for over 60 seconds test reference::runtest::test_45_symbol_rs has been running for over 60 seconds test reference::runtest::test_46_targets_rs has been running for over 60 seconds test reference::runtest::test_47_typescript_type_rs has been running for over 60 seconds test reference::runtest::test_48_wasm_export_colon_rs has been running for over 60 seconds test reference::runtest::test_49_wasm_export_types_rs has been running for over 60 seconds test reference::runtest::test_50_web_sys_rs has been running for over 60 seconds test reinit_panic_abort has been running for over 60 seconds test works_on_empty_project has been running for over 60 seconds test reference::runtest::test_44_string_arg_rs ... FAILED test npm::no_modules_rejects_npm ... ok test reference::runtest::test_48_wasm_export_colon_rs ... FAILED test npm::npm_conflict_rejected ... ok test reference::runtest::test_35_private_rs ... FAILED test default_module_path_target_web ... ok test reference::runtest::test_08_closures_rs ... FAILED test reference::runtest::test_10_custom_section_rs ... ok test omit_default_module_path_target_web ... ok test bin_crate_works_without_name_section ... ok test reference::runtest::test_26_intrinsic_only_rs ... FAILED test reference::runtest::test_32_optional_args_rs ... ok test reference::runtest::test_15_empty_rs ... ok test diagnostics::typo_in_js_class_suggests_nearest_struct ... ok test reference::runtest::test_25_int128_rs ... FAILED test private_namespaced_classes_export_actual_ts_identifier ... ok test reference::runtest::test_38_reserved_class_name_rs ... FAILED test namespace_global_and_noglobal_works ... ok test reference::runtest::test_03_anyref_import_catch_rs ... FAILED test diagnostics::missing_js_namespace_on_impl_suggests_struct_namespace ... ok test reference::runtest::test_06_async_void_rs ... FAILED test reference::runtest::test_39_result_rs ... FAILED test reference::runtest::test_42_slice_to_array_rs ... FAILED test default_module_path_target_no_modules ... ok test reference::runtest::test_02_anyref_empty_rs ... ok test one_export_works ... ok test reference::runtest::test_21_function_attrs_rs ... FAILED test reference::runtest::test_16_enums_rs ... FAILED test constructor_cannot_return_option_struct ... ok test reference::runtest::test_17_exported_class_rename_collision_rs ... FAILED test function_table_preserved ... ok test reference::runtest::test_20_extends_rust_rs ... FAILED test function_table_preserved_for_stack_closures ... ok test npm::more_package_json_fields_ignored ... ok test omit_default_module_path_target_no_modules ... ok test multiple_start_functions ... ok test reference::runtest::test_14_echo_rs ... FAILED test reference::runtest::test_47_typescript_type_rs ... FAILED test reference::runtest::test_01_add_rs ... ok test reference::runtest::test_43_static_rs ... FAILED test reference::runtest::test_23_import_getter_setter_rs ... FAILED test reference::runtest::test_30_modules_rs ... FAILED test works_on_empty_project ... ok test reference::runtest::test_05_async_number_rs ... FAILED test reference::runtest::test_22_getter_setter_rs ... FAILED test reference::runtest::test_31_nop_rs ... ok test reference::runtest::test_27_js_namespace_export_same_name_rs ... FAILED test reference::runtest::test_18_exported_class_rename_wrap_rs ... FAILED test reinit_panic_abort ... ok test diagnostics::missing_js_namespace_on_impl_nested_namespace ... ok test emscripten_namespaced_exports_valid_ts ... ok test reference::runtest::test_04_anyref_nop_rs ... ok test reference::runtest::test_34_pointers_rs ... ok test reference::runtest::test_40_self_type_rs ... FAILED test reference::runtest::test_41_skip_jsdoc_rs ... ok test reference::runtest::test_28_js_namespace_export_rs ... FAILED test reference::runtest::test_19_exported_class_wrap_matrix_rs ... FAILED test reference::runtest::test_49_wasm_export_types_rs ... FAILED test bin_crate_works ... ok test private_start_function ... ok test reference::runtest::test_46_targets_rs ... FAILED test reference::runtest::test_50_web_sys_rs ... FAILED test reference::runtest::test_29_keyword_rs ... FAILED test reference::runtest::test_11_default_class_rs ... FAILED test reference::runtest::test_45_symbol_rs ... FAILED test reference::runtest::test_09_constructor_rs ... FAILED test reference::runtest::test_24_import_rs ... FAILED test reference::runtest::test_13_dynamic_union_rs ... FAILED test reference::runtest::test_37_reexport_rs ... FAILED test reference::runtest::test_36_raw_rs ... FAILED test reference::runtest::test_12_default_function_rs ... ok test reference::runtest::test_07_builder_rs ... FAILED failures: ---- reference::no_duplicate_wasm_export_in_node_esm_atomics_debug stdout ---- thread 'reference::no_duplicate_wasm_export_in_node_esm_atomics_debug' (1667472) 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 ---- termination_abort_handler stdout ---- thread 'termination_abort_handler' (1667619) 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_auto_detect stdout ---- thread 'termination_reinit_auto_detect' (1667621) 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_panic_unwind stdout ---- thread 'reference::runtest_panic_unwind' (1667617) 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. ``` ---- termination_reinit stdout ---- thread 'termination_reinit' (1667620) 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. ``` ---- reference::runtest::test_44_string_arg_rs stdout ---- thread 'reference::runtest::test_44_string_arg_rs' (1667566) 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_8e7f4446827dc96f(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::test_48_wasm_export_colon_rs stdout ---- thread 'reference::runtest::test_48_wasm_export_colon_rs' (1667614) 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_5a3872c9bb188e64: function(arg0) { const ret = arg0.Deno; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); }, < __wbg_String_b66e26e812db682a: function(arg0, arg1) { > __wbg_String_e390ef71698f1038: 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_ea012e7ab28f2a2b: 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_1dcce9fe05eb4273: function(arg0) { __wbg_test_output_writeln(arg0); }, < __wbg___wbgtest_og_console_log_5b24086944470fba: function(arg0, arg1) { > __wbg___wbgtest_og_console_log_3cef4cd5dd94c5ad: function(arg0, arg1) { __wbgtest_og_console_log(getStringFromWasm0(arg0, arg1)); }, < __wbg___wbindgen_debug_string_0accd80f45e5faa2: function(arg0, arg1) { > __wbg___wbindgen_debug_string_cd4b3a16a5c18187: 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_682df1fb1455276f: function(arg0) { const ret = typeof(arg0) === 'function'; return ret; }, < __wbg___wbindgen_is_undefined_67b456be8673d3d7: function(arg0) { > __wbg___wbindgen_is_undefined_3c611b1633efa47e: function(arg0) { const ret = arg0 === undefined; return ret; }, < __wbg___wbindgen_string_get_72bdf95d3ae505b1: function(arg0, arg1) { > __wbg___wbindgen_string_get_c04bf8a26870d07f: 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_8e7f4446827dc96f: function(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); }, < __wbg__wbg_cb_unref_61db23ac97f16c31: function(arg0) { > __wbg__wbg_cb_unref_0a63ca8b0ade610b: function(arg0) { arg0._wbg_cb_unref(); }, < __wbg_call_9c758de292015997: function() { return handleError(function (arg0, arg1, arg2) { > __wbg_call_c8f04da752819742: function() { return handleError(function (arg0, arg1, arg2) { const ret = arg0.call(arg1, arg2); return ret; }, arguments); }, < __wbg_constructor_361ddf7c35fd56ef: function(arg0) { > __wbg_constructor_01827f65703cd4e4: function(arg0) { const ret = arg0.constructor; return ret; }, < __wbg_error_6dfa145e31018b13: function(arg0, arg1) { > __wbg_error_b433be714ac36572: function(arg0, arg1) { console.error(getStringFromWasm0(arg0, arg1)); }, < __wbg_forEach_768a075d31fa39b5: function(arg0, arg1, arg2) { > __wbg_forEach_0675ada15af1cef8: 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_6dc0329ff86fba44: function(arg0, arg1, arg2) { const ret = arg0.getElementById(getStringFromWasm0(arg1, arg2)); return ret; }, < __wbg_log_01d5b30d4d91ce8c: function(arg0, arg1) { > __wbg_log_56ddec92a5277a41: function(arg0, arg1) { console.log(getStringFromWasm0(arg0, arg1)); }, < __wbg_message_40300ed2d1f8bdc6: function(arg0) { > __wbg_message_811e16b89c36ea63: function(arg0) { const ret = arg0.message; return ret; }, < __wbg_name_2e3d97e5d7abee6d: function(arg0) { < const ret = arg0.name; < return ret; < }, < __wbg_name_e0013edc217ef0cf: function(arg0, arg1) { > __wbg_name_26f7988ba9a20658: 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_name_cdbd8e1be1a2b8c1: function(arg0) { > const ret = arg0.name; > return ret; > }, > __wbg_new_cd3b6daafa1eb752: function() { const ret = new Error(); return ret; }, < __wbg_new_typed_bf31d18f92484486: function(arg0, arg1) { > __wbg_new_typed_381873a1721031a9: 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_6ee418a9407e245c: function(arg0) { const ret = arg0.now(); return ret; }, < __wbg_performance_1489fc2125d6bda9: function(arg0) { > __wbg_performance_a5b3b43823eec9fd: function(arg0) { const ret = arg0.performance; return ret; }, < __wbg_queueMicrotask_35c611f4a14830b2: function(arg0) { > __wbg_queueMicrotask_22b74015c27bce74: function(arg0) { queueMicrotask(arg0); }, < __wbg_queueMicrotask_404ed0a58e0b63cc: function(arg0) { > __wbg_queueMicrotask_b19ffb5db1c07729: function(arg0) { const ret = arg0.queueMicrotask; return ret; }, < __wbg_resolve_25a7e548d5881dca: function(arg0) { > __wbg_resolve_9dde944356e93c51: function(arg0) { const ret = Promise.resolve(arg0); return ret; }, < __wbg_run_322bf7e1760605e9: function(arg0, arg1, arg2) { > __wbg_run_fc02dfa2c83473f4: 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_f071e90de1b2782f: 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_10885d07af4bcf7d: function(arg0, arg1, arg2) { arg0.textContent = getStringFromWasm0(arg1, arg2); }, < __wbg_stack_67ede902d95a6520: function(arg0) { > __wbg_stack_44f03f0a7ee75c4e: 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; > getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); > getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); > }, > __wbg_stack_90a7995500f6ba40: function(arg0) { const ret = arg0.stack; return ret; }, < __wbg_stack_6cefd16e46c65a30: function(arg0, arg1) { > __wbg_stack_db0cfce028c1fd64: function(arg0, arg1) { const ret = arg1.stack; 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_9fa1a5886a3b33b4: 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; < getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); < getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); < }, < __wbg_stack_c23041d892b82546: function(arg0) { > __wbg_stack_f57cf1c31e724ae2: function(arg0) { const ret = arg0.stack; return ret; }, < __wbg_static_accessor_CREATE_TASK_b6a4b7f987c70792: function() { > __wbg_static_accessor_CREATE_TASK_24ba8eadf428e6a9: 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_ca7691acd84ab639: function() { const ret = document; return ret; }, < __wbg_static_accessor_GLOBAL_9d53f2689e622ca1: function() { < const ret = typeof global === 'undefined' ? null : global; > __wbg_static_accessor_GLOBAL_THIS_5d741775835285cf: function() { > const ret = typeof globalThis === 'undefined' ? null : globalThis; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); }, < __wbg_static_accessor_GLOBAL_THIS_a1a35cec07001a8a: function() { < const ret = typeof globalThis === 'undefined' ? null : globalThis; > __wbg_static_accessor_GLOBAL_df33b8e5e4771cc8: function() { > const ret = typeof global === 'undefined' ? null : global; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); }, < __wbg_static_accessor_SELF_4c59f6c7ea29a144: function() { > __wbg_static_accessor_SELF_45a727cb16dc0fe5: function() { const ret = typeof self === 'undefined' ? null : self; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); }, < __wbg_static_accessor_WINDOW_e70ae9f2eb052253: function() { > __wbg_static_accessor_WINDOW_c66741bde505fb7a: function() { const ret = typeof window === 'undefined' ? null : window; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); }, < __wbg_text_content_d674374aef6a4b7a: function(arg0, arg1) { > __wbg_text_content_7f548826ef51d4f5: 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_3ad40041c2944b9f: function(arg0, arg1) { const ret = arg0.then(arg1); return ret; }, < __wbg_toString_1567f82c9d228682: function() { return handleError(function (arg0, arg1) { > __wbg_toString_5c1f21bffaa5ea26: 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_35_private_rs stdout ---- thread 'reference::runtest::test_35_private_rs' (1667526) 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_8e7f4446827dc96f(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_08_closures_rs stdout ---- thread 'reference::runtest::test_08_closures_rs' (1667480) 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_3c611b1633efa47e(arg0) { const ret = arg0 === undefined; return ret; } export function __wbg___wbindgen_throw_8e7f4446827dc96f(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); } export function __wbg__wbg_cb_unref_0a63ca8b0ade610b(arg0) { arg0._wbg_cb_unref(); } export function __wbg_call_scoped_53e822ed08a3dd45(arg0) { call_scoped(arg0); } export function __wbg_forEach_0675ada15af1cef8(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_58e4f658fe1927b3(arg0) { let result; try { result = arg0 instanceof Window; } catch (_) { result = false; } const ret = result; return ret; } export function __wbg_log_d7f3d1d95b315a37(arg0) { console.log(arg0); } export function __wbg_setTimeout_1f0c9eb0742966f4() { return handleError(function (arg0, arg1) { const ret = arg0.setTimeout(arg1); return ret; }, arguments); } export function __wbg_static_accessor_GLOBAL_THIS_5d741775835285cf() { > const ret = typeof globalThis === 'undefined' ? null : globalThis; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_GLOBAL_df33b8e5e4771cc8() { > const ret = typeof global === 'undefined' ? null : global; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_SELF_45a727cb16dc0fe5() { const ret = typeof self === 'undefined' ? null : self; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_WINDOW_c66741bde505fb7a() { 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_26_intrinsic_only_rs stdout ---- thread 'reference::runtest::test_26_intrinsic_only_rs' (1667503) 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_8e7f4446827dc96f(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_25_int128_rs stdout ---- thread 'reference::runtest::test_25_int128_rs' (1667497) 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_8e7f4446827dc96f(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_38_reserved_class_name_rs stdout ---- thread 'reference::runtest::test_38_reserved_class_name_rs' (1667541) 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_8e7f4446827dc96f(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); } export function __wbg_new_829740aef8a0396a() { 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_03_anyref_import_catch_rs stdout ---- thread 'reference::runtest::test_03_anyref_import_catch_rs' (1667475) 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_8e7f4446827dc96f(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); } export function __wbg_foo_f10cbb40190caafb() { 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_06_async_void_rs stdout ---- thread 'reference::runtest::test_06_async_void_rs' (1667478) 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_cd4b3a16a5c18187(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_682df1fb1455276f(arg0) { const ret = typeof(arg0) === 'function'; return ret; } export function __wbg___wbindgen_is_undefined_3c611b1633efa47e(arg0) { const ret = arg0 === undefined; return ret; } export function __wbg___wbindgen_throw_8e7f4446827dc96f(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); } export function __wbg__wbg_cb_unref_0a63ca8b0ade610b(arg0) { arg0._wbg_cb_unref(); } export function __wbg_call_c8f04da752819742() { return handleError(function (arg0, arg1, arg2) { const ret = arg0.call(arg1, arg2); return ret; }, arguments); } export function __wbg_new_typed_381873a1721031a9(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_22b74015c27bce74(arg0) { queueMicrotask(arg0); } export function __wbg_queueMicrotask_b19ffb5db1c07729(arg0) { const ret = arg0.queueMicrotask; return ret; } export function __wbg_resolve_9dde944356e93c51(arg0) { const ret = Promise.resolve(arg0); return ret; } export function __wbg_run_fc02dfa2c83473f4(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_24ba8eadf428e6a9() { const ret = typeof console === 'undefined' ? null : console?.createTask; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_GLOBAL_THIS_5d741775835285cf() { > const ret = typeof globalThis === 'undefined' ? null : globalThis; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_GLOBAL_df33b8e5e4771cc8() { > const ret = typeof global === 'undefined' ? null : global; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_SELF_45a727cb16dc0fe5() { const ret = typeof self === 'undefined' ? null : self; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_WINDOW_c66741bde505fb7a() { const ret = typeof window === 'undefined' ? null : window; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_then_3ad40041c2944b9f(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_39_result_rs stdout ---- thread 'reference::runtest::test_39_result_rs' (1667542) 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_678959ae7324256c(arg0, arg1) { const ret = Error(getStringFromWasm0(arg0, arg1)); return ret; } export function __wbg___wbindgen_throw_8e7f4446827dc96f(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_42_slice_to_array_rs stdout ---- thread 'reference::runtest::test_42_slice_to_array_rs' (1667560) 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_8e7f4446827dc96f(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); } export function __wbg_js_block_slice_u16_543c01615ad6bfbf(arg0, arg1) { var v0 = Array.from(getArrayU16FromWasm0(arg0, arg1)); js_block_slice_u16(v0); } export function __wbg_js_slice_optional_u16_as_array_be80a2227f31268d(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_c22c6433b1d93341(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_669b06e2a037f5a4(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_21_function_attrs_rs stdout ---- thread 'reference::runtest::test_21_function_attrs_rs' (1667493) 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_cd4b3a16a5c18187(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_a38b2dac05e14d42(arg0) { const ret = !arg0; return ret; } export function __wbg___wbindgen_is_function_682df1fb1455276f(arg0) { const ret = typeof(arg0) === 'function'; return ret; } export function __wbg___wbindgen_is_undefined_3c611b1633efa47e(arg0) { const ret = arg0 === undefined; return ret; } export function __wbg___wbindgen_throw_8e7f4446827dc96f(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); } export function __wbg__wbg_cb_unref_0a63ca8b0ade610b(arg0) { arg0._wbg_cb_unref(); } export function __wbg_call_c8f04da752819742() { return handleError(function (arg0, arg1, arg2) { const ret = arg0.call(arg1, arg2); return ret; }, arguments); } export function __wbg_new_typed_381873a1721031a9(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_22b74015c27bce74(arg0) { queueMicrotask(arg0); } export function __wbg_queueMicrotask_b19ffb5db1c07729(arg0) { const ret = arg0.queueMicrotask; return ret; } export function __wbg_resolve_9dde944356e93c51(arg0) { const ret = Promise.resolve(arg0); return ret; } export function __wbg_run_fc02dfa2c83473f4(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_24ba8eadf428e6a9() { const ret = typeof console === 'undefined' ? null : console?.createTask; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_GLOBAL_THIS_5d741775835285cf() { > const ret = typeof globalThis === 'undefined' ? null : globalThis; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_GLOBAL_df33b8e5e4771cc8() { > const ret = typeof global === 'undefined' ? null : global; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_SELF_45a727cb16dc0fe5() { const ret = typeof self === 'undefined' ? null : self; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_WINDOW_c66741bde505fb7a() { const ret = typeof window === 'undefined' ? null : window; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_then_3ad40041c2944b9f(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_16_enums_rs stdout ---- thread 'reference::runtest::test_16_enums_rs' (1667488) 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_8e7f4446827dc96f(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' (1667489) 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_8e7f4446827dc96f(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_20_extends_rust_rs stdout ---- thread 'reference::runtest::test_20_extends_rust_rs' (1667492) 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_8e7f4446827dc96f(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_14_echo_rs stdout ---- thread 'reference::runtest::test_14_echo_rs' (1667486) 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_cd4b3a16a5c18187(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_c04bf8a26870d07f(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_8e7f4446827dc96f(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_47_typescript_type_rs stdout ---- thread 'reference::runtest::test_47_typescript_type_rs' (1667613) 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_8e7f4446827dc96f(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_43_static_rs stdout ---- thread 'reference::runtest::test_43_static_rs' (1667563) 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_8e7f4446827dc96f(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); } export function __wbg_static_accessor_NAMESPACE_OPTIONAL_4b6fe8b1000c311e() { const ret = typeof test === 'undefined' ? null : test?.NAMESPACE_OPTIONAL; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_NAMESPACE_PLAIN_0fa2e5d88b89c2e3() { const ret = test.NAMESPACE_PLAIN; return ret; } export function __wbg_static_accessor_NESTED_NAMESPACE_OPTIONAL_2fb700945519061a() { 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_4c19f2e57f2133c8() { const ret = test1.test2.NESTED_NAMESPACE_PLAIN; return ret; } export function __wbg_static_accessor_OPTIONAL_65c54d279c884bb9() { const ret = typeof OPTIONAL === 'undefined' ? null : OPTIONAL; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_PLAIN_6b7d19bd722065a9() { 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; } ---- reference::runtest::test_23_import_getter_setter_rs stdout ---- thread 'reference::runtest::test_23_import_getter_setter_rs' (1667495) 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_8e7f4446827dc96f(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); } export function __wbg_another_b5200612282b4794(arg0) { const ret = arg0.prop2; return ret; } export function __wbg_b_1d81c37ba3267428(arg0) { const ret = arg0.a; return ret; } export function __wbg_bar2_bbb421568716ee61() { const ret = Bar.bar2(); return ret; } export function __wbg_get_foo_da5abcc302d8259c() { const ret = Bar.get_foo(); return ret; } export function __wbg_new_0118420d55aa7752() { const ret = new SomeClass(); return ret; } export function __wbg_set_another_46a5a28410538257(arg0, arg1) { arg0.prop2 = arg1 >>> 0; } export function __wbg_set_b_b86073b9201eefa2(arg0, arg1) { arg0.a = arg1 >>> 0; } export function __wbg_set_bar2_f42a5f257cc0158e(arg0) { Bar.set_bar2(arg0 >>> 0); } export function __wbg_set_foo_9cf47d70d15a3ed2(arg0) { Bar.set_foo(arg0 >>> 0); } export function __wbg_set_signal_27679b85ca6328aa(arg0, arg1) { arg0.signal = arg1 >>> 0; } export function __wbg_set_some_prop_f1de6917d5deb737(arg0, arg1) { arg0.some_prop = arg1 >>> 0; } export function __wbg_signal_fad3a0b2f19e5af0(arg0) { const ret = arg0.signal; return ret; } export function __wbg_some_prop_61aed0b13af2dd39(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_30_modules_rs stdout ---- thread 'reference::runtest::test_30_modules_rs' (1667515) 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_8e7f4446827dc96f(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); } export function __wbg_parseFloat_42053797e2bb5de6(arg0, arg1) { > const ret = parseFloat(getStringFromWasm0(arg0, arg1)); return ret; } export function __wbg_parseFloat_f19573f8625f7ae3(arg0) { > const ret = parseFloat(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); } 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' (1667477) 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_cd4b3a16a5c18187(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_682df1fb1455276f(arg0) { const ret = typeof(arg0) === 'function'; return ret; } export function __wbg___wbindgen_is_undefined_3c611b1633efa47e(arg0) { const ret = arg0 === undefined; return ret; } export function __wbg___wbindgen_throw_8e7f4446827dc96f(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); } export function __wbg__wbg_cb_unref_0a63ca8b0ade610b(arg0) { arg0._wbg_cb_unref(); } export function __wbg_call_c8f04da752819742() { return handleError(function (arg0, arg1, arg2) { const ret = arg0.call(arg1, arg2); return ret; }, arguments); } export function __wbg_new_typed_381873a1721031a9(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_22b74015c27bce74(arg0) { queueMicrotask(arg0); } export function __wbg_queueMicrotask_b19ffb5db1c07729(arg0) { const ret = arg0.queueMicrotask; return ret; } export function __wbg_resolve_9dde944356e93c51(arg0) { const ret = Promise.resolve(arg0); return ret; } export function __wbg_run_fc02dfa2c83473f4(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_24ba8eadf428e6a9() { const ret = typeof console === 'undefined' ? null : console?.createTask; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_GLOBAL_THIS_5d741775835285cf() { > const ret = typeof globalThis === 'undefined' ? null : globalThis; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_GLOBAL_df33b8e5e4771cc8() { > const ret = typeof global === 'undefined' ? null : global; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_SELF_45a727cb16dc0fe5() { const ret = typeof self === 'undefined' ? null : self; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_WINDOW_c66741bde505fb7a() { const ret = typeof window === 'undefined' ? null : window; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_then_3ad40041c2944b9f(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_22_getter_setter_rs stdout ---- thread 'reference::runtest::test_22_getter_setter_rs' (1667494) 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_8e7f4446827dc96f(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_27_js_namespace_export_same_name_rs stdout ---- thread 'reference::runtest::test_27_js_namespace_export_same_name_rs' (1667505) 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_cd4b3a16a5c18187(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_8e7f4446827dc96f(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_18_exported_class_rename_wrap_rs stdout ---- thread 'reference::runtest::test_18_exported_class_rename_wrap_rs' (1667490) 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_cd4b3a16a5c18187(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_8e7f4446827dc96f(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_40_self_type_rs stdout ---- thread 'reference::runtest::test_40_self_type_rs' (1667546) 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_8e7f4446827dc96f(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_28_js_namespace_export_rs stdout ---- thread 'reference::runtest::test_28_js_namespace_export_rs' (1667506) 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_8e7f4446827dc96f(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_19_exported_class_wrap_matrix_rs stdout ---- thread 'reference::runtest::test_19_exported_class_wrap_matrix_rs' (1667491) 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_cd4b3a16a5c18187(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_8e7f4446827dc96f(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_49_wasm_export_types_rs stdout ---- thread 'reference::runtest::test_49_wasm_export_types_rs' (1667615) 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_8e7f4446827dc96f: 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_46_targets_rs stdout ---- thread 'reference::runtest::test_46_targets_rs' (1667598) 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_9fe016a4994d0c2e() { 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_50_web_sys_rs stdout ---- thread 'reference::runtest::test_50_web_sys_rs' (1667616) 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_cd4b3a16a5c18187(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_8e7f4446827dc96f(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); } export function __wbg_new_90c87694b9fac80e() { 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; } ---- reference::runtest::test_29_keyword_rs stdout ---- thread 'reference::runtest::test_29_keyword_rs' (1667513) 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_8e7f4446827dc96f(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); } export function __wbg_await_05e19f72f31e2ebf() { await(); } export function __wbg_let_f768ba9e4e5814eb(arg0) { arg0.let(); } export function __wbg_new_37ff36bc1970c6c1() { B.new(); } export function __wbg_new_6ba9a89a08218782() { > const ret = A.new(); return ret; } export function __wbg_new_9c9582edfb7e3b95() { > const ret = window.__TAURI__.menu.Menu.new(); return ret; } export function __wbg_static_accessor_TRUE_1b437a6a536585bd() { 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_11_default_class_rs stdout ---- thread 'reference::runtest::test_11_default_class_rs' (1667483) 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_8e7f4446827dc96f(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_45_symbol_rs stdout ---- thread 'reference::runtest::test_45_symbol_rs' (1667583) 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_8652799bf885f4f8(arg0) { const ret = arg0[Symbol.iterator](); return ret; } export function __wbg_SymboltoPrimitive_b8d164e0bfcc9b59(arg0, arg1) { SomeClass[Symbol.toPrimitive](getStringFromWasm0(arg0, arg1)); } export function __wbg___wbindgen_throw_8e7f4446827dc96f(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); } export function __wbg_import_static_symbol_getter_85a31f6f532f54e8() { SomeClass.import_static_symbol_getter(); } export function __wbg_new_726c9bab99abacb0() { const ret = new JsString(); return ret; } export function __wbg_string_getter_39827ce2aa94c33d(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_09_constructor_rs stdout ---- thread 'reference::runtest::test_09_constructor_rs' (1667481) 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_8e7f4446827dc96f(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_24_import_rs stdout ---- thread 'reference::runtest::test_24_import_rs' (1667496) 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_8e7f4446827dc96f(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); } export function __wbg_catch_me_72eeaba38abfaa00() { return handleError(function () { catch_me(); }, arguments); } export function __wbg_get_12768323623707f2(arg0) { const ret = arg0.get(); return ret; } export function __wbg_my_function_1d017d75f9af8c95() { b.my_function(); } export function __wbg_new_0e296df3d3edc5b9(arg0) { const ret = new _default(arg0); return ret; } export function __wbg_no_catch_ce3c9592ee7e6ffb() { no_catch(); } export function __wbg_reload_b5c492a3a91129bb() { window.location.reload(); } export function __wbg_static_accessor_CONST_301522b7c5260ebd() { const ret = a.CONST; return ret; } export function __wbg_write_e93770b42d6ddcea(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_13_dynamic_union_rs stdout ---- thread 'reference::runtest::test_13_dynamic_union_rs' (1667485) 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_3c611b1633efa47e(arg0) { const ret = arg0 === undefined; return ret; } export function __wbg___wbindgen_string_get_c04bf8a26870d07f(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_8e7f4446827dc96f(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_23311a193c9c35c6(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_37_reexport_rs stdout ---- thread 'reference::runtest::test_37_reexport_rs' (1667537) panicked at crates/cli/tests/wasm-bindgen/reference.rs:128:13: assertion failed: `(left == right)` Diff < left / right > : import { Snippet } from './snippets/reexport_reftest-99bc78b1927329b6/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_36_raw_rs stdout ---- thread 'reference::runtest::test_36_raw_rs' (1667531) 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_8e7f4446827dc96f(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); } export function __wbg_do_bfbb037ab0a70235(arg0) { arg0.do(); } export function __wbg_new_1adb46e96de639bc() { 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_07_builder_rs stdout ---- thread 'reference::runtest::test_07_builder_rs' (1667479) 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_8e7f4446827dc96f(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; } 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 145.89s 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-96b9b1a0aba8bdce) running 41 tests test headless_streaming_tests::test_default_console_no_panic_headless ... ok test headless_streaming_tests::test_default_console_panic_headless ... ok test headless_streaming_tests::test_headless_worker_output_not_garbled ... 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_output_not_garbled ... ok test headless_streaming_tests::test_user_spawned_shared_worker_top_level_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_user_spawned_module_worker_logs_browser ... ok test headless_streaming_tests::test_default_no_carriage_return_in_output ... ok test headless_streaming_tests::test_user_spawned_data_url_shared_worker_does_not_inject_browser ... ok test headless_streaming_tests::test_service_worker_no_carriage_return_in_output ... ok test headless_streaming_tests::test_worker_console_no_panic_headless ... ok test headless_streaming_tests::test_default_output_not_garbled ... ok test headless_streaming_tests::test_service_worker_console_panic_headless ... ok test headless_streaming_tests::test_service_worker_console_no_panic_headless ... ok test headless_streaming_tests::test_user_spawned_url_module_worker_logs_browser ... ok test headless_streaming_tests::test_user_spawned_shared_worker_logs_on_failure_browser ... ok test headless_streaming_tests::test_no_carriage_return_in_output ... ok test headless_streaming_tests::test_shared_worker_output_not_garbled ... ok test headless_streaming_tests::test_user_spawned_data_url_worker_does_not_inject_browser ... ok test headless_streaming_tests::test_worker_console_no_panic_nocapture ... ok test headless_streaming_tests::test_user_spawned_shared_worker_logs_browser ... ok test headless_streaming_tests::test_user_spawned_url_worker_logs_browser ... ok test headless_streaming_tests::test_user_spawned_nested_worker_logs_browser ... ok test headless_streaming_tests::test_user_spawned_worker_logs_on_failure_browser ... ok test headless_streaming_tests::test_headless_worker_output_visible_with_no_stream ... 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_worker_add_event_listener_coexists_browser ... ok test headless_streaming_tests::test_shared_worker_console_panic_headless ... ok test headless_streaming_tests::test_user_spawned_dedicated_worker_logs_browser ... ok test headless_streaming_tests::test_browser_no_carriage_return_in_output ... ok test headless_streaming_tests::test_worker_console_panic_nocapture ... ok test headless_streaming_tests::test_shared_worker_no_carriage_return_in_output ... ok test headless_streaming_tests::test_shared_worker_console_no_panic_headless ... ok test headless_streaming_tests::test_service_worker_output_not_garbled ... ok test headless_streaming_tests::test_user_spawned_worker_logs_node_cjs has been running for over 60 seconds test headless_streaming_tests::test_user_spawned_worker_logs_node_esm has been running for over 60 seconds test headless_streaming_tests::test_user_spawned_worker_logs_on_failure_node 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 headless_streaming_tests::test_user_spawned_worker_logs_node_esm ... ok test test_wasm_bindgen_test_runner_list ... ok test headless_streaming_tests::test_user_spawned_worker_logs_on_failure_node ... ok test result: ok. 41 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 176.87s 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-armv7.so.1 so:libgcc_s.so.1 >>> wasm-bindgen*: Package size: 6.6 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 18:07:09 +0000 elapsed time 0h 10m 19s >>> wasm-bindgen: Cleaning up srcdir >>> wasm-bindgen: Cleaning up pkgdir >>> wasm-bindgen: Cleaning up tmpdir >>> wasm-bindgen: Uninstalling dependencies... ( 1/21) Purging .makedepends-wasm-bindgen (20260524.175651) ( 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: 289.2 MiB in 104 packages >>> wasm-bindgen: Updating the community/armv7 repository index... >>> wasm-bindgen: Signing the index...