>>> wasm-bindgen: Building community/wasm-bindgen 0.2.128-r0 (using abuild 3.18.0_rc5-r1) started Sat, 12 Sep 2026 13:54:43 +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/23) Installing libffi (3.8.0-r0) ( 2/23) Installing xz-libs (5.8.4-r0) ( 3/23) Installing libxml2 (2.13.9-r2) ( 4/23) Installing llvm22-libs (22.1.8-r1) ( 5/23) Installing scudo-malloc (23.1.1-r2) ( 6/23) Installing rust (1.97.0-r1) ( 7/23) Installing sqlite-libs (3.53.4-r0) ( 8/23) Installing libssh2 (1.11.1-r3) ( 9/23) Installing cargo (1.97.0-r1) (10/23) Installing ca-certificates (20260611-r0) (11/23) Installing ada-libs (3.3.0-r1) (12/23) 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. (13/23) Installing icu-libs (78.1-r0) (14/23) Installing simdjson (4.6.11-r0) (15/23) Installing simdutf (9.1.0-r0) (16/23) Installing nodejs (24.18.1-r2) (17/23) Installing llvm23-libs (23.1.1-r0) (18/23) Installing lld23-libs (23.1.1-r1) (19/23) Installing lld23 (23.1.1-r1) (20/23) Installing wasi-libc (27.20250626-r1) (21/23) Installing rust-wasm (1.97.0-r1) (22/23) Installing cargo-auditable (0.7.5-r0) (23/23) Installing .makedepends-wasm-bindgen (20260912.135444) Executing busybox-1.38.0-r6.trigger Executing ca-certificates-20260611-r0.trigger OK: 1456.1 MiB in 128 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.128.tar.gz Connecting to distfiles.alpinelinux.org (172.105.82.32:443) wget: server returned error: HTTP/1.1 404 Not Found >>> wasm-bindgen: Fetching https://github.com/wasm-bindgen/wasm-bindgen/archive/refs/tags/0.2.128/wasm-bindgen-0.2.128.tar.gz Connecting to github.com (140.82.121.4:443) Connecting to codeload.github.com (140.82.121.9:443) saving to '/var/cache/distfiles/edge/wasm-bindgen-0.2.128.tar.gz.part' wasm-bindgen-0.2.128 100% |********************************| 2686k 0:00:00 ETA '/var/cache/distfiles/edge/wasm-bindgen-0.2.128.tar.gz.part' saved /var/cache/distfiles/edge/wasm-bindgen-0.2.128.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.128.tar.gz /var/cache/distfiles/edge/wasm-bindgen-0.2.128.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.128.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 262 (offset 128 lines). Hunk #2 succeeded at 325 (offset 128 lines). patching file crates/cli/tests/wasm-bindgen/main.rs Hunk #1 succeeded at 1016 (offset 371 lines). Hunk #2 succeeded at 1444 (offset 518 lines). Updating crates.io index Updating git repository `https://github.com/alexcrichton/raytracer` Downloading crates ... Downloaded futures-task v0.3.34 Downloaded futures-sink v0.3.34 Downloaded futures-macro v0.3.34 Downloaded equivalent v1.0.2 Downloaded target-triple v1.0.1 Downloaded itoa v1.0.18 Downloaded gg-alloc v1.0.0 Downloaded cast v0.3.0 Downloaded utf8_iter v1.0.4 Downloaded idna_adapter v1.2.2 Downloaded zerofrom v0.1.8 Downloaded yoke-derive v0.8.2 Downloaded stable_deref_trait v1.2.1 Downloaded potential_utf v0.1.6 Downloaded form_urlencoded v1.2.2 Downloaded tower-service v0.3.3 Downloaded tower-layer v0.3.3 Downloaded http-body v1.1.0 Downloaded subtle v2.6.1 Downloaded untrusted v0.9.0 Downloaded slab v0.4.12 Downloaded pin-project-lite v0.2.17 Downloaded unicode-ident v1.0.24 Downloaded futures-io v0.3.34 Downloaded futures-core v0.3.34 Downloaded cfg-if v1.0.4 Downloaded toml_datetime v1.1.1+spec-1.1.0 Downloaded serde_spanned v1.1.1 Downloaded termcolor v1.4.1 Downloaded zmij v1.0.23 Downloaded tokio-macros v2.7.2 Downloaded async-trait v0.1.92 Downloaded percent-encoding v2.3.2 Downloaded smallvec v1.16.0 Downloaded zerovec-derive v0.11.6 Downloaded zerofrom-derive v0.1.7 Downloaded synstructure v0.13.2 Downloaded displaydoc v0.2.7 Downloaded writeable v0.6.4 Downloaded tokio-rustls v0.26.5 Downloaded zeroize v1.9.0 Downloaded gif v0.9.2 Downloaded lzw v0.10.0 Downloaded color_quant v1.1.0 Downloaded defmt-parser v1.0.0 Downloaded is_terminal_polyfill v1.70.2 Downloaded quote v1.0.47 Downloaded futures-channel v0.3.34 Downloaded trybuild v1.0.120 Downloaded toml_writer v1.1.2+spec-1.1.0 Downloaded glob v0.3.4 Downloaded oorandom v11.1.5 Downloaded num-traits v0.2.19 Downloaded autocfg v1.5.1 Downloaded nu-ansi-term v0.50.3 Downloaded rustversion v1.0.23 Downloaded once_cell v1.21.4 Downloaded futures-executor v0.3.34 Downloaded yoke v0.8.3 Downloaded icu_provider v2.3.1 Downloaded tinystr v0.8.4 Downloaded litemap v0.8.3 Downloaded sync_wrapper v1.0.2 Downloaded bitflags v2.13.1 Downloaded rustls-pki-types v1.15.1 Downloaded heck v0.5.0 Downloaded env_logger v0.11.11 Downloaded defmt v1.1.1 Downloaded anstyle-query v1.1.5 Downloaded strsim v0.11.1 Downloaded proc-macro-crate v3.5.0 Downloaded memchr v2.8.3 Downloaded proc-macro2 v1.0.107 Downloaded toml v1.1.5+spec-1.1.0 Downloaded toml_parser v1.1.3+spec-1.1.0 Downloaded serde_core v1.0.229 Downloaded serde_derive v1.0.229 Downloaded serde v1.0.229 Downloaded socket2 v0.6.5 Downloaded bytes v1.12.1 Downloaded futures v0.3.34 Downloaded zerotrie v0.2.5 Downloaded icu_locale_core v2.3.0 Downloaded icu_collections v2.3.0 Downloaded icu_normalizer_data v2.3.0 Downloaded tower v0.5.3 Downloaded rustls-webpki v0.103.15 Downloaded getrandom v0.2.17 Downloaded env_filter v2.0.0 Downloaded utf8parse v0.2.2 Downloaded colorchoice v1.0.5 Downloaded clap_lex v1.1.0 Downloaded leb128fmt v0.1.0 Downloaded futures-util v0.3.34 Downloaded indexmap v2.14.2 Downloaded hashbrown v0.17.1 Downloaded serde_json v1.0.151 Downloaded mio v1.2.3 Downloaded libm v0.2.16 Downloaded bumpalo v3.20.3 Downloaded reqwest v0.13.4 Downloaded url v2.5.8 Downloaded idna v1.1.0 Downloaded icu_properties v2.3.0 Downloaded zerovec v0.11.8 Downloaded icu_properties_data v2.3.0 Downloaded tower-http v0.6.11 Downloaded http v1.5.0 Downloaded utf8-zero v0.8.1 Downloaded openssl-macros v0.1.1 Downloaded alloc-stdlib v0.2.4 Downloaded alloc-no-stdlib v2.0.4 Downloaded errno v0.3.14 Downloaded httpdate v1.0.3 Downloaded time-core v0.1.9 Downloaded num_threads v0.1.7 Downloaded syn v3.0.5 Downloaded winnow v1.0.4 Downloaded syn v2.0.119 Downloaded rustls v0.23.43 Downloaded wat v1.258.0 Downloaded foreign-types-shared v0.1.1 Downloaded adler2 v2.0.1 Downloaded chunked_transfer v1.5.0 Downloaded powerfmt v0.2.0 Downloaded num-conv v0.2.2 Downloaded console_error_panic_hook v0.1.7 Downloaded icu_normalizer v2.3.0 Downloaded cc v1.4.5 Downloaded shlex v2.0.1 Downloaded jobserver v0.1.35 Downloaded find-msvc-tools v0.1.12 Downloaded pkg-config v0.3.34 Downloaded fs_extra v1.3.0 Downloaded dunce v1.0.5 Downloaded cmake v0.1.58 Downloaded log v0.4.34 Downloaded rustls-platform-verifier v0.7.0 Downloaded rustls-native-certs v0.8.4 Downloaded openssl-probe v0.2.1 Downloaded quinn v0.11.11 Downloaded tracing-core v0.1.36 Downloaded walrus-macro v0.26.0 Downloaded rustc_version v0.4.1 Downloaded foreign-types v0.3.2 Downloaded tokio v1.53.1 Downloaded libc v0.2.189 Downloaded aws-lc-rs v1.18.1 Downloaded tracing v0.1.44 Downloaded version_check v0.9.5 Downloaded sourcefile v0.2.1 Downloaded lazy_static v1.5.0 Downloaded defmt-macros v1.1.1 Downloaded bitflags v1.3.2 Downloaded threadpool v1.8.1 Downloaded num_cpus v1.17.0 Downloaded sha1_smol v1.0.1 Downloaded rand_core v0.6.4 Downloaded rand_chacha v0.3.1 Downloaded ppv-lite86 v0.2.21 Downloaded safemem v0.3.3 Downloaded quick-error v1.2.3 Downloaded unicase v2.9.0 Downloaded filetime v0.2.29 Downloaded predicates-core v1.0.10 Downloaded normalize-line-endings v0.3.0 Downloaded float-cmp v0.10.0 Downloaded difflib v0.4.0 Downloaded wait-timeout v0.2.1 Downloaded termtree v0.5.1 Downloaded pinned v0.1.0 Downloaded anstyle v1.0.14 Downloaded anstream v1.0.0 Downloaded anstyle-parse v1.0.0 Downloaded id-arena v2.3.0 Downloaded multipart v0.18.0 Downloaded twoway v0.1.8 Downloaded mime_guess v2.0.5 Downloaded buf_redux v0.8.4 Downloaded base64 v0.13.1 Downloaded ring v0.17.14 Downloaded nom v5.1.3 Downloaded foldhash v0.2.0 Downloaded leb128 v0.2.7 Downloaded fallible-iterator v0.3.0 Downloaded relative-path v1.9.3 Downloaded futures-timer v3.0.4 Downloaded fastrand v2.5.0 Downloaded deranged v0.5.8 Downloaded simd-adler32 v0.3.10 Downloaded shlex v1.3.0 Downloaded rand v0.8.8 Downloaded thiserror v2.0.20 Downloaded thiserror-impl v2.0.20 Downloaded rustc-hash v2.1.3 Downloaded quinn-udp v0.5.15 Downloaded cfg_aliases v0.2.2 Downloaded tinyvec v1.13.2 Downloaded tinyvec_macros v0.1.1 Downloaded rand_pcg v0.10.2 Downloaded rand_core v0.10.1 Downloaded getrandom v0.4.3 Downloaded chacha20 v0.10.2 Downloaded cpufeatures v0.3.1 Downloaded lru-slab v0.1.2 Downloaded mime v0.3.17 Downloaded ipnet v2.12.1 Downloaded zerocopy v0.8.56 Downloaded zerocopy-derive v0.8.56 Downloaded pretty_assertions v1.4.1 Downloaded yansi v1.0.1 Downloaded native-tls v0.2.18 Downloaded base64ct v1.8.3 Downloaded predicates v3.1.4 Downloaded assert_cmd v2.2.2 Downloaded predicates-tree v1.0.13 Downloaded quinn-proto v0.11.17 Downloaded approx v0.5.1 Downloaded rawpointer v0.2.1 Downloaded rand v0.10.2 Downloaded hyper-util v0.1.20 Downloaded hyper v1.11.1 Downloaded inflate v0.1.1 Downloaded num-traits v0.1.43 Downloaded aws-lc-sys v0.45.0 Downloaded want v0.3.1 Downloaded try-lock v0.2.5 Downloaded httparse v1.10.1 Downloaded fnv v1.0.7 Downloaded atomic-waker v1.1.2 Downloaded hyper-rustls v0.27.9 Downloaded gloo-worker v0.5.0 Downloaded h2 v0.4.19 Downloaded tokio-util v0.7.19 Downloaded base64 v0.22.1 Downloaded http-body-util v0.1.5 Downloaded json v0.12.4 Downloaded thiserror v1.0.69 Downloaded thiserror-impl v1.0.69 Downloaded wasmprinter v0.243.0 Downloaded rustc-demangle v0.1.28 Downloaded gloo v0.11.0 Downloaded clap_derive v4.6.4 Downloaded semver v1.0.28 Downloaded encoding_rs v0.8.35 Downloaded gloo-worker-macros v0.1.0 Downloaded proc-macro-crate v1.3.1 Downloaded toml_edit v0.19.15 Downloaded winnow v0.5.40 Downloaded toml_datetime v0.6.11 Downloaded gloo-utils v0.2.0 Downloaded bincode v1.3.3 Downloaded gloo-timers v0.3.0 Downloaded gloo-storage v0.3.0 Downloaded gloo-render v0.2.0 Downloaded gloo-net v0.5.0 Downloaded pin-project v1.1.13 Downloaded pin-project-internal v1.1.13 Downloaded http v0.2.12 Downloaded gloo-history v0.2.2 Downloaded serde_urlencoded v0.7.1 Downloaded serde-wasm-bindgen v0.6.5 Downloaded gloo-events v0.2.0 Downloaded askama_macros v0.15.6 Downloaded png v0.6.2 Downloaded num-iter v0.1.46 Downloaded pem-rfc7468 v1.0.0 Downloaded ryu v1.0.23 Downloaded gloo-file v0.3.0 Downloaded gloo-dialogs v0.2.0 Downloaded gloo-console v0.3.0 Downloaded iana-time-zone v0.1.65 Downloaded askama v0.15.6 Downloaded askama_derive v0.15.6 Downloaded basic-toml v0.1.10 Downloaded num-integer v0.1.47 Downloaded tempfile v3.27.0 Downloaded chrono v0.4.45 Downloaded console_log v1.1.0 Downloaded askama_parser v0.15.6 Downloaded image v0.12.4 Downloaded scoped_threadpool v0.1.9 Downloaded byteorder v1.5.0 Downloaded adler32 v1.2.0 Downloaded bitflags v0.7.0 Downloaded wasmprinter v0.245.1 Downloaded deflate v0.7.20 Downloaded crossbeam-deque v0.8.7 Downloaded ascii v1.1.0 Downloaded rayon v1.12.0 Downloaded rayon-core v1.13.0 Downloaded futures-channel-preview v0.3.0-alpha.19 Downloaded humantime v2.4.0 Downloaded crossbeam-epoch v0.9.20 Downloaded either v1.18.0 Downloaded enum_primitive v0.1.1 Downloaded futures-core-preview v0.3.0-alpha.19 Downloaded weedle v0.13.1 Downloaded paste v1.0.15 Downloaded crossbeam-utils v0.8.22 Downloaded diff v0.1.13 Downloaded num-complex v0.4.6 Downloaded num-rational v0.4.2 Downloaded num-rational v0.1.43 Downloaded anyhow v1.0.104 Downloaded ureq-proto v0.6.1 Downloaded tiny_http v0.12.0 Downloaded crc32fast v1.5.1 Downloaded clap v4.6.6 Downloaded rstest v0.26.1 Downloaded rstest_macros v0.26.1 Downloaded toml_edit v0.25.13+spec-1.1.0 Downloaded openssl-sys v0.9.117 Downloaded flate2 v1.1.10 Downloaded simba v0.9.1 Downloaded bytemuck v1.25.2 Downloaded wasm-encoder v0.258.0 Downloaded matrixmultiply v0.3.11 Downloaded wasm-encoder v0.243.0 Downloaded base64 v0.23.1 Downloaded miniz_oxide v0.9.1 Downloaded rouille v3.6.2 Downloaded safe_arch v0.7.4 Downloaded rand_distr v0.4.3 Downloaded jiff-core v0.1.0 Downloaded wasm-encoder v0.245.1 Downloaded typenum v1.20.1 Downloaded wide v0.7.33 Downloaded der v0.8.1 Downloaded webpki-root-certs v1.0.9 Downloaded num-bigint v0.4.8 Downloaded hashbrown v0.16.1 Downloaded regex v1.13.1 Downloaded ureq v3.4.0 Downloaded statrs v0.18.0 Downloaded wast v243.0.0 Downloaded clap_builder v4.6.6 Downloaded wast v258.0.0 Downloaded aho-corasick v1.1.5 Downloaded zlib-rs v0.6.7 Downloaded brotli-decompressor v5.0.3 Downloaded webpki-roots v1.0.9 Downloaded walrus v0.26.5 Downloaded vcpkg v0.2.15 Downloaded time v0.3.55 Downloaded jpeg-decoder v0.1.22 Downloaded unicode-width v0.2.2 Downloaded wasmparser v0.243.0 Downloaded wasmparser v0.245.1 Downloaded wasmparser v0.258.0 Downloaded openssl v0.10.81 Downloaded gimli v0.32.3 Downloaded regex-syntax v0.8.11 Downloaded bstr v1.13.1 Downloaded nalgebra v0.33.3 Downloaded rustix v1.1.4 Downloaded regex-automata v0.4.18 Downloaded jiff v0.2.35 Downloaded linux-raw-sys v0.12.1 Downloaded openssl-src v300.6.1+3.6.3 Compiling proc-macro2 v1.0.107 Compiling unicode-ident v1.0.24 Compiling quote v1.0.47 Compiling libc v0.2.189 Compiling stable_deref_trait v1.2.1 Compiling cfg-if v1.0.4 Compiling memchr v2.8.3 Compiling serde_core v1.0.229 Compiling log v0.4.34 Compiling crossbeam-utils v0.8.22 Compiling shlex v2.0.1 Compiling crossbeam-epoch v0.9.20 Compiling find-msvc-tools v0.1.12 Compiling litemap v0.8.3 Compiling writeable v0.6.4 Compiling bitflags v2.13.1 Compiling crossbeam-deque v0.8.7 Compiling icu_normalizer_data v2.3.0 Compiling zerocopy v0.8.56 Compiling icu_properties_data v2.3.0 Compiling utf8_iter v1.0.4 Compiling httparse v1.10.1 Compiling itoa v1.0.18 Compiling serde v1.0.229 Compiling rayon-core v1.13.0 Compiling smallvec v1.16.0 Compiling equivalent v1.0.2 Compiling zeroize v1.9.0 Compiling heck v0.5.0 Compiling getrandom v0.4.3 Compiling unicase v2.9.0 Compiling utf8parse v0.2.2 Compiling hashbrown v0.17.1 Compiling autocfg v1.5.1 Compiling rustix v1.1.4 Compiling zmij v1.0.23 Compiling once_cell v1.21.4 Compiling anstyle-query v1.1.5 Compiling is_terminal_polyfill v1.70.2 Compiling anyhow v1.0.104 Compiling regex-syntax v0.8.11 Compiling either v1.18.0 Compiling colorchoice v1.0.5 Compiling linux-raw-sys v0.12.1 Compiling percent-encoding v2.3.2 Compiling serde_json v1.0.151 Compiling untrusted v0.9.0 Compiling crc32fast v1.5.1 Compiling anstyle v1.0.14 Compiling foldhash v0.2.0 Compiling simd-adler32 v0.3.10 Compiling wasm-bindgen-shared v0.2.128 (/home/buildozer/aports/community/wasm-bindgen/src/wasm-bindgen-0.2.128/crates/shared) Compiling alloc-no-stdlib v2.0.4 Compiling anstyle-parse v1.0.0 Compiling fastrand v2.5.0 Compiling cc v1.4.5 Compiling bytes v1.12.1 Compiling safemem v0.3.3 Compiling adler2 v2.0.1 Compiling rustls v0.23.43 Compiling fallible-iterator v0.3.0 Compiling leb128fmt v0.1.0 Compiling rustls-pki-types v1.15.1 Compiling mime v0.3.17 Compiling semver v1.0.28 Compiling form_urlencoded v1.2.2 Compiling alloc-stdlib v0.2.4 Compiling mime_guess v2.0.5 Compiling ascii v1.1.0 Compiling miniz_oxide v0.9.1 Compiling base64 v0.23.1 Compiling time-core v0.1.9 Compiling num-conv v0.2.2 Compiling httpdate v1.0.3 Compiling clap_lex v1.1.0 Compiling num_threads v0.1.7 Compiling powerfmt v0.2.0 Compiling anstream v1.0.0 Compiling wasm-encoder v0.245.1 Compiling leb128 v0.2.7 Compiling strsim v0.11.1 Compiling quick-error v1.2.3 Compiling subtle v2.6.1 Compiling iana-time-zone v0.1.65 Compiling chunked_transfer v1.5.0 Compiling jiff-core v0.1.0 Compiling deranged v0.5.8 Compiling brotli-decompressor v5.0.3 Compiling aho-corasick v1.1.5 Compiling buf_redux v0.8.4 Compiling twoway v0.1.8 Compiling wasm-bindgen-cli v0.2.128 (/home/buildozer/aports/community/wasm-bindgen/src/wasm-bindgen-0.2.128/crates/cli) Compiling base64 v0.22.1 Compiling utf8-zero v0.8.1 Compiling sha1_smol v1.0.1 Compiling rustc-demangle v0.1.28 Compiling base64 v0.13.1 Compiling shlex v1.3.0 Compiling num-traits v0.2.19 Compiling wasm-bindgen-test-shared v0.2.128 (/home/buildozer/aports/community/wasm-bindgen/src/wasm-bindgen-0.2.128/crates/test-shared) Compiling tiny_http v0.12.0 Compiling clap_builder v4.6.6 Compiling webpki-roots v1.0.9 Compiling flate2 v1.1.10 Compiling http v1.5.0 Compiling syn v3.0.5 Compiling syn v2.0.119 Compiling jiff v0.2.35 Compiling getrandom v0.2.17 Compiling num_cpus v1.17.0 Compiling filetime v0.2.29 Compiling chrono v0.4.45 Compiling time v0.3.55 Compiling rand_core v0.6.4 Compiling threadpool v1.8.1 Compiling ring v0.17.14 Compiling regex-automata v0.4.18 Compiling ureq-proto v0.6.1 Compiling rayon v1.12.0 Compiling tempfile v3.27.0 Compiling indexmap v2.14.2 Compiling hashbrown v0.16.1 Compiling synstructure v0.13.2 Compiling gimli v0.32.3 Compiling zerofrom-derive v0.1.7 Compiling yoke-derive v0.8.2 Compiling walrus-macro v0.26.0 Compiling regex v1.13.1 Compiling id-arena v2.3.0 Compiling ppv-lite86 v0.2.21 Compiling env_filter v2.0.0 Compiling env_logger v0.11.11 Compiling zerofrom v0.1.8 Compiling rand_chacha v0.3.1 Compiling yoke v0.8.3 Compiling rand v0.8.8 Compiling zerovec-derive v0.11.6 Compiling displaydoc v0.2.7 Compiling serde_derive v1.0.229 Compiling clap_derive v4.6.4 Compiling multipart v0.18.0 Compiling zerotrie v0.2.5 Compiling zerovec v0.11.8 Compiling clap v4.6.6 Compiling rustls-webpki v0.103.15 Compiling tinystr v0.8.4 Compiling potential_utf v0.1.6 Compiling icu_collections v2.3.0 Compiling icu_locale_core v2.3.0 Compiling icu_provider v2.3.1 Compiling icu_properties v2.3.0 Compiling icu_normalizer v2.3.0 Compiling wasmparser v0.245.1 Compiling idna_adapter v1.2.2 Compiling idna v1.1.0 Compiling url v2.5.8 Compiling rouille v3.6.2 Compiling ureq v3.4.0 Compiling walrus v0.26.5 Compiling wasm-bindgen-cli-support v0.2.128 (/home/buildozer/aports/community/wasm-bindgen/src/wasm-bindgen-0.2.128/crates/cli-support) Finished `release` profile [optimized] target(s) in 2m 42s 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 proc-macro2 v1.0.107 Compiling unicode-ident v1.0.24 Compiling quote v1.0.47 Compiling libc v0.2.189 Compiling cfg-if v1.0.4 Compiling stable_deref_trait v1.2.1 Compiling memchr v2.8.3 Compiling serde_core v1.0.229 Compiling hashbrown v0.17.1 Compiling regex-syntax v0.8.11 Compiling equivalent v1.0.2 Compiling log v0.4.34 Compiling crossbeam-utils v0.8.22 Compiling autocfg v1.5.1 Compiling litemap v0.8.3 Compiling shlex v2.0.1 Compiling writeable v0.6.4 Compiling crossbeam-epoch v0.9.20 Compiling find-msvc-tools v0.1.12 Compiling bitflags v2.13.1 Compiling crossbeam-deque v0.8.7 Compiling zerocopy v0.8.56 Compiling serde v1.0.229 Compiling utf8_iter v1.0.4 Compiling icu_properties_data v2.3.0 Compiling icu_normalizer_data v2.3.0 Compiling itoa v1.0.18 Compiling anstyle v1.0.14 Compiling rayon-core v1.13.0 Compiling httparse v1.10.1 Compiling foldhash v0.2.0 Compiling once_cell v1.21.4 Compiling rustix v1.1.4 Compiling zeroize v1.9.0 Compiling utf8parse v0.2.2 Compiling unicase v2.9.0 Compiling heck v0.5.0 Compiling zmij v1.0.23 Compiling anyhow v1.0.104 Compiling getrandom v0.4.3 Compiling smallvec v1.16.0 Compiling anstyle-query v1.1.5 Compiling untrusted v0.9.0 Compiling semver v1.0.28 Compiling crc32fast v1.5.1 Compiling percent-encoding v2.3.2 Compiling colorchoice v1.0.5 Compiling is_terminal_polyfill v1.70.2 Compiling either v1.18.0 Compiling serde_json v1.0.151 Compiling linux-raw-sys v0.12.1 Compiling anstyle-parse v1.0.0 Compiling fastrand v2.5.0 Compiling cc v1.4.5 Compiling rustls v0.23.43 Compiling mime v0.3.17 Compiling wasm-bindgen-shared v0.2.128 (/home/buildozer/aports/community/wasm-bindgen/src/wasm-bindgen-0.2.128/crates/shared) Compiling alloc-no-stdlib v2.0.4 Compiling simd-adler32 v0.3.10 Compiling fallible-iterator v0.3.0 Compiling bytes v1.12.1 Compiling safemem v0.3.3 Compiling leb128fmt v0.1.0 Compiling adler2 v2.0.1 Compiling form_urlencoded v1.2.2 Compiling rustls-pki-types v1.15.1 Compiling anstream v1.0.0 Compiling alloc-stdlib v0.2.4 Compiling num-conv v0.2.2 Compiling time-core v0.1.9 Compiling powerfmt v0.2.0 Compiling ascii v1.1.0 Compiling iana-time-zone v0.1.65 Compiling clap_lex v1.1.0 Compiling leb128 v0.2.7 Compiling subtle v2.6.1 Compiling chunked_transfer v1.5.0 Compiling strsim v0.11.1 Compiling num_threads v0.1.7 Compiling mime_guess v2.0.5 Compiling jiff-core v0.1.0 Compiling base64 v0.23.1 Compiling miniz_oxide v0.9.1 Compiling wasm-encoder v0.245.1 Compiling deranged v0.5.8 Compiling quick-error v1.2.3 Compiling httpdate v1.0.3 Compiling brotli-decompressor v5.0.3 Compiling winnow v1.0.4 Compiling base64 v0.13.1 Compiling rustc-demangle v0.1.28 Compiling aho-corasick v1.1.5 Compiling buf_redux v0.8.4 Compiling twoway v0.1.8 Compiling utf8-zero v0.8.1 Compiling base64 v0.22.1 Compiling sha1_smol v1.0.1 Compiling wasm-bindgen-cli v0.2.128 (/home/buildozer/aports/community/wasm-bindgen/src/wasm-bindgen-0.2.128/crates/cli) Compiling shlex v1.3.0 Compiling clap_builder v4.6.6 Compiling toml_datetime v1.1.1+spec-1.1.0 Compiling num-traits v0.2.19 Compiling wasm-bindgen-test-shared v0.2.128 (/home/buildozer/aports/community/wasm-bindgen/src/wasm-bindgen-0.2.128/crates/test-shared) Compiling predicates-core v1.0.10 Compiling tiny_http v0.12.0 Compiling assert_cmd v2.2.2 Compiling pin-project-lite v0.2.17 Compiling termtree v0.5.1 Compiling webpki-roots v1.0.9 Compiling difflib v0.4.0 Compiling relative-path v1.9.3 Compiling slab v0.4.12 Compiling futures-core v0.3.34 Compiling glob v0.3.4 Compiling rustc_version v0.4.1 Compiling normalize-line-endings v0.3.0 Compiling indexmap v2.14.2 Compiling futures-task v0.3.34 Compiling predicates-tree v1.0.13 Compiling diff v0.1.13 Compiling futures-timer v3.0.4 Compiling yansi v1.0.1 Compiling termcolor v1.4.1 Compiling http v1.5.0 Compiling flate2 v1.1.10 Compiling rstest_macros v0.26.1 Compiling pretty_assertions v1.4.1 Compiling syn v3.0.5 Compiling syn v2.0.119 Compiling jiff v0.2.35 Compiling chrono v0.4.45 Compiling float-cmp v0.10.0 Compiling ring v0.17.14 Compiling getrandom v0.2.17 Compiling num_cpus v1.17.0 Compiling filetime v0.2.29 Compiling wait-timeout v0.2.1 Compiling time v0.3.55 Compiling rand_core v0.6.4 Compiling rayon v1.12.0 Compiling ureq-proto v0.6.1 Compiling threadpool v1.8.1 Compiling toml_parser v1.1.3+spec-1.1.0 Compiling toml_edit v0.25.13+spec-1.1.0 Compiling regex-automata v0.4.18 Compiling tempfile v3.27.0 Compiling proc-macro-crate v3.5.0 Compiling hashbrown v0.16.1 Compiling gimli v0.32.3 Compiling id-arena v2.3.0 Compiling ppv-lite86 v0.2.21 Compiling regex v1.13.1 Compiling rand_chacha v0.3.1 Compiling rand v0.8.8 Compiling zerovec-derive v0.11.6 Compiling displaydoc v0.2.7 Compiling serde_derive v1.0.229 Compiling clap_derive v4.6.4 Compiling futures-macro v0.3.34 Compiling synstructure v0.13.2 Compiling bstr v1.13.1 Compiling multipart v0.18.0 Compiling env_filter v2.0.0 Compiling predicates v3.1.4 Compiling futures-util v0.3.34 Compiling env_logger v0.11.11 Compiling zerofrom-derive v0.1.7 Compiling yoke-derive v0.8.2 Compiling walrus-macro v0.26.0 Compiling rustls-webpki v0.103.15 Compiling clap v4.6.6 Compiling zerofrom v0.1.8 Compiling yoke v0.8.3 Compiling zerovec v0.11.8 Compiling zerotrie v0.2.5 Compiling tinystr v0.8.4 Compiling potential_utf v0.1.6 Compiling icu_collections v2.3.0 Compiling icu_locale_core v2.3.0 Compiling wasmparser v0.245.1 Compiling icu_provider v2.3.1 Compiling rstest v0.26.1 Compiling icu_properties v2.3.0 Compiling icu_normalizer v2.3.0 Compiling idna_adapter v1.2.2 Compiling idna v1.1.0 Compiling ureq v3.4.0 Compiling url v2.5.8 Compiling rouille v3.6.2 Compiling walrus v0.26.5 Compiling wasmprinter v0.245.1 Compiling wasm-bindgen-cli-support v0.2.128 (/home/buildozer/aports/community/wasm-bindgen/src/wasm-bindgen-0.2.128/crates/cli-support) warning: constant `TERMINATION_LIB_RS` is never used --> crates/cli/tests/wasm-bindgen/main.rs:915:7 | 915 | 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 52.73s 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.128/target/debug/deps/wasm_bindgen_cli-5ca0d4d919f5d133) running 3 tests test wasm_bindgen_test_runner::headless::tests::returns_session_id_on_success ... ok test wasm_bindgen_test_runner::headless::tests::surfaces_driver_error_message ... ok test wasm_bindgen_test_runner::tests::runner_args_keep_filtered_count_on_number_abi ... ok test result: ok. 3 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.128/target/debug/deps/wasm_bindgen-db2760963ec870f6) 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.128/target/debug/deps/wasm_bindgen_test_runner-c3fcc342d4734fc9) 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.128/target/debug/deps/wasm2es6js-4de8ffbf3b4d68df) 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.128/target/debug/deps/wasm_bindgen-4203cbe103ad7114) running 123 tests test emscripten_shared_memory_skips_thread_transform ... ok test reference::no_duplicate_wasm_export_in_node_esm_atomics_debug ... FAILED test reference::canonicalize_wat_types_ignores_type_order ... ok test jspi_panic_unwind ... FAILED test bin_crate_works ... ok test private_namespaced_classes_export_actual_ts_identifier ... ok test default_module_path_target_web ... ok test generated_paths_survive_shadowed_core_alloc_std ... ok 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 cross_crate_experimental_generic_mono_only_block has been running for over 60 seconds test default_module_path_target_no_modules has been running for over 60 seconds test diagnostics::duplicate_public_class_across_crates_errors has been running for over 60 seconds test diagnostics::duplicate_public_function_across_crates_errors has been running for over 60 seconds test diagnostics::experimental_generic_mono_genuine_collision_is_reported has been running for over 60 seconds test diagnostics::experimental_generic_mono_identical_imports_deduplicate has been running for over 60 seconds test diagnostics::experimental_generic_mono_js_namespace_does_not_collide_on_the_shim_key has been running for over 60 seconds test diagnostics::external_all_private_type_collision_resolves has been running for over 60 seconds test diagnostics::external_private_type_ref_binds_to_public_collision 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_exports_hoisted_to_library_symbols has been running for over 60 seconds test emscripten_jspi_codegen has been running for over 60 seconds test emscripten_namespaced_exports_valid_ts has been running for over 60 seconds test emscripten_user_imports_are_prefixed has been running for over 60 seconds test experimental_generic_mono_shim_paths_survive_shadowing has been running for over 60 seconds test experimental_generic_mono_unsafe_op_in_unsafe_fn has been running for over 60 seconds test externref_table_ops_have_no_panic_location_data 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 jspi_abort_handler_happy_and_panic has been running for over 60 seconds test jspi_abort_handler_suspend_misuse has been running for over 60 seconds test jspi_async_only_module has been running for over 60 seconds test jspi_runtime_basics 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_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_import_rs has been running for over 60 seconds test reference::runtest::test_06_async_number_rs has been running for over 60 seconds test reference::runtest::test_07_async_void_rs has been running for over 60 seconds test reference::runtest::test_08_builder_rs has been running for over 60 seconds test externref_table_ops_have_no_panic_location_data ... ok test diagnostics::external_private_type_ref_binds_to_public_collision ... ok test multiple_start_functions ... ok test npm::npm_conflict_rejected ... ok test experimental_generic_mono_shim_paths_survive_shadowing ... ok test diagnostics::missing_js_namespace_on_impl_suggests_struct_namespace ... ok test one_export_works ... ok test default_module_path_target_no_modules ... ok test emscripten_namespaced_exports_valid_ts ... ok test reference::runtest::test_09_closures_rs has been running for over 60 seconds test reference::runtest::test_10_constructor_rs has been running for over 60 seconds test reference::runtest::test_11_custom_section_rs has been running for over 60 seconds test emscripten_exports_hoisted_to_library_symbols ... ok test jspi_abort_handler_suspend_misuse ... ok test function_table_preserved ... ok test jspi_async_only_module ... ok test omit_default_module_path_target_no_modules ... ok test diagnostics::experimental_generic_mono_js_namespace_does_not_collide_on_the_shim_key ... ok test diagnostics::duplicate_public_class_across_crates_errors ... ok test jspi_runtime_basics ... ok test bin_crate_works_without_name_section ... ok test experimental_generic_mono_unsafe_op_in_unsafe_fn ... ok test constructor_cannot_return_option_struct ... ok test cross_crate_experimental_generic_mono_only_block ... ok test private_start_function ... ok test npm::no_modules_rejects_npm ... ok test diagnostics::external_all_private_type_collision_resolves ... ok test diagnostics::experimental_generic_mono_genuine_collision_is_reported ... ok test emscripten_jspi_codegen ... ok test emscripten_user_imports_are_prefixed ... ok test diagnostics::duplicate_public_function_across_crates_errors ... ok test namespace_global_and_noglobal_works ... ok test reference::runtest::test_41_panic_unwind_legacy_rs ... ok test reference::runtest::test_42_panic_unwind_rs ... ok test omit_default_module_path_target_web ... ok test diagnostics::experimental_generic_mono_identical_imports_deduplicate ... ok test diagnostics::missing_js_namespace_on_impl_nested_namespace ... ok test diagnostics::typo_in_js_class_suggests_nearest_struct ... ok test function_table_preserved_for_stack_closures ... ok test npm::more_package_json_fields_ignored ... ok test jspi_abort_handler_happy_and_panic ... ok test reference::runtest::test_12_default_class_rs has been running for over 60 seconds test reference::runtest::test_02_anyref_empty_rs ... ok test reference::runtest::test_16_empty_rs ... ok test reference::runtest::test_19_exported_class_rename_collision_rs ... FAILED test reference::runtest::test_46_raw_rs ... FAILED test reference::runtest::test_37_modules_rs ... FAILED test reference::runtest::test_45_private_rs ... FAILED test reference::runtest::test_27_import_getter_setter_rs ... FAILED test reference::runtest::test_33_js_namespace_shim_key_rs ... FAILED test reference::runtest::test_36_keyword_rs ... FAILED test reference::runtest::test_28_import_rs ... FAILED test reference::runtest::test_34_jspi_intrinsics_rs ... FAILED test reference::runtest::test_25_getter_setter_rs ... FAILED test reference::runtest::test_52_slice_to_array_rs ... FAILED test reference::runtest::test_47_reexport_rs ... FAILED test reference::runtest_panic_unwind ... FAILED test reference::runtest::test_18_enums_rs ... FAILED test reference::runtest::test_49_result_rs ... FAILED test reference::runtest_panic_unwind_legacy ... FAILED test reference::runtest::test_48_reserved_class_name_rs ... FAILED test reference::runtest::test_29_int128_rs ... FAILED test reference::runtest::test_35_jspi_rs ... FAILED test reference::runtest::test_50_self_type_rs ... FAILED test spawn_local_panic_frees_future ... FAILED test termination_abort_handler_unwind_panic ... FAILED test termination_reinit ... FAILED test reference::runtest::test_13_default_function_rs ... ok test version_useful ... ok test reference::runtest::test_20_exported_class_rename_wrap_rs ... FAILED test termination_reinit_auto_detect ... FAILED test wasi_target_has_no_placeholder_imports_panic_unwind ... FAILED test reference::runtest::test_01_add_rs ... ok test reference::runtest::test_30_intrinsic_only_rs ... FAILED test reference::runtest::test_10_constructor_rs ... FAILED test reference::runtest::test_08_builder_rs ... FAILED test reference::runtest::test_03_anyref_import_catch_rs ... FAILED test reference::runtest::test_26_import_catch_i64_rs ... FAILED test reference::runtest::test_11_custom_section_rs ... ok test reference::runtest::test_12_default_class_rs ... FAILED test reference::runtest::test_14_dynamic_union_rs ... FAILED test reference::runtest::test_22_extends_rust_rs ... FAILED test reference::runtest::test_32_js_namespace_export_rs ... FAILED test reference::runtest::test_39_nop_rs ... ok test reference::runtest::test_04_anyref_nop_rs ... ok test reference::runtest::test_43_pointers_rs ... ok test reference::runtest::test_51_skip_jsdoc_rs ... ok test reference::runtest::test_38_no_modules_global_rs ... ok test reference::runtest::test_40_optional_args_rs ... ok test reference::runtest::test_44_private_dedupe_rs ... FAILED test reference::runtest::test_17_enum_vec_rs ... FAILED test reference::runtest::test_56_targets_rs ... FAILED test reference::runtest::test_54_string_arg_rs ... FAILED test reference::runtest::test_60_wasm_export_types_rs ... FAILED test reference::runtest::test_58_typescript_type_rs ... FAILED test reference::runtest::test_55_symbol_rs ... FAILED test reference::runtest::test_21_exported_class_wrap_matrix_rs ... FAILED test reference::runtest::test_31_js_namespace_export_same_name_rs ... FAILED test reference::runtest::test_15_echo_rs ... FAILED test reference::runtest::test_06_async_number_rs ... FAILED test reference::runtest::test_07_async_void_rs ... FAILED test reference::runtest::test_53_static_rs ... FAILED test reference::runtest::test_23_function_attrs_rs ... FAILED test reference::runtest::test_09_closures_rs ... FAILED test reference::runtest::test_61_web_sys_rs ... FAILED test reference::runtest::test_05_async_import_rs ... FAILED test reference::runtest::test_24_generic_import_rs ... FAILED test reference::runtest::test_57_typed_array_buffers_rs ... FAILED test reference::runtest::test_59_wasm_export_colon_rs ... FAILED test slice_to_array_works_in_a_no_std_crate ... ok test slice_to_array_is_a_no_op_on_exported_mut_slice_args ... ok test termination_abort_handler_unwind_abort2 ... ok test termination_abort_handler_unwind_abort1 ... ok test termination_abort_handler_unwind_abort3 ... ok test wasi_target_has_no_placeholder_imports ... ok test stripped_custom_section_errors_helpfully ... ok test works_on_empty_project ... ok test reinit_panic_abort ... ok test split_debug_info ... ok failures: ---- reference::no_duplicate_wasm_export_in_node_esm_atomics_debug stdout ---- thread 'reference::no_duplicate_wasm_export_in_node_esm_atomics_debug' (846218) panicked at crates/cli/tests/wasm-bindgen/main.rs:155: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.128/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.128/target" RUSTFLAGS="-Ctarget-feature=+atomics -Clink-args=--shared-memory -Clink-args=--max-memory=1073741824 -Clink-args=--import-memory -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" "-Zbuild-std=std,panic_abort" "--target" "wasm32-unknown-unknown"` 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 ---- jspi_panic_unwind stdout ---- thread 'jspi_panic_unwind' (846199) panicked at crates/cli/tests/wasm-bindgen/main.rs:155: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.128/target/cli-tests/jspi_panic_unwind" && CARGO_TARGET_DIR="/home/buildozer/aports/community/wasm-bindgen/src/wasm-bindgen-0.2.128/target" RUSTFLAGS="-Cpanic=unwind" RUSTUP_TOOLCHAIN="nightly" "cargo" "build" "-Zbuild-std=std,panic_unwind" "--target" "wasm32-unknown-unknown"` 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_19_exported_class_rename_collision_rs stdout ---- thread 'reference::runtest::test_19_exported_class_rename_collision_rs' (848766) panicked at crates/cli/tests/wasm-bindgen/reference.rs:139: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_1c829eb3b94d5955(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_46_raw_rs stdout ---- thread 'reference::runtest::test_46_raw_rs' (850310) panicked at crates/cli/tests/wasm-bindgen/reference.rs:139: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_1c829eb3b94d5955(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_37_modules_rs stdout ---- thread 'reference::runtest::test_37_modules_rs' (849911) panicked at crates/cli/tests/wasm-bindgen/reference.rs:139:13: assertion failed: `(left == right)` Diff < left / right > : export function exported() { wasm.exported(); } export function __wbg___wbindgen_throw_1c829eb3b94d5955(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_generic_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_45_private_rs stdout ---- thread 'reference::runtest::test_45_private_rs' (850250) panicked at crates/cli/tests/wasm-bindgen/reference.rs:139: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_1c829eb3b94d5955(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_27_import_getter_setter_rs stdout ---- thread 'reference::runtest::test_27_import_getter_setter_rs' (849304) panicked at crates/cli/tests/wasm-bindgen/reference.rs:139:13: assertion failed: `(left == right)` Diff < left / right > : export function exported() { wasm.exported(); } export function __wbg___wbindgen_throw_1c829eb3b94d5955(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_ed056e971f611931() { const ret = Bar.bar2(); return ret; } export function __wbg_get_foo_acf71acc1d5241e7() { 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_9244f03e18678e23(arg0) { Bar.set_bar2(arg0 >>> 0); } export function __wbg_set_foo_5d25b708f02844fc(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_33_js_namespace_shim_key_rs stdout ---- thread 'reference::runtest::test_33_js_namespace_shim_key_rs' (849650) panicked at crates/cli/tests/wasm-bindgen/reference.rs:139:13: assertion failed: `(left == right)` Diff < left / right > : export function exported() { wasm.exported(); } export function __wbg___wbindgen_throw_1c829eb3b94d5955(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); } export function __wbg_c_5dbf0047a0f2df2e(arg0, arg1) { a.c(getStringFromWasm0(arg0, arg1)); } export function __wbg_c_c428e4c21e48068f(arg0, arg1) { a.b.c(getStringFromWasm0(arg0, arg1)); } export function __wbg_info_7b4b72e9ff12cb27(arg0, arg1) { delta.info(getStringFromWasm0(arg0, arg1)); } export function __wbg_info_d4e57718ace9e0fd(arg0, arg1) { > epsilon.info(getStringFromWasm0(arg0, arg1)); } export function __wbg_log_4a8fc10b9da1bbae(arg0, arg1) { beta.log(getStringFromWasm0(arg0, arg1)); } export function __wbg_log_78b8a3946336b5a5(arg0, arg1) { > alpha.log(getStringFromWasm0(arg0, arg1)); >} >export function __wbg_static_accessor_STATE_ca8eef4c9d136df4() { const ret = iota.STATE; return ret; } export function __wbg_static_accessor_STATE_ebb0bf35d89d8dcc() { const ret = theta.STATE; return ret; } export function __wbg_warn_2111271f97bf0e0a(arg0, arg1) { gamma.warn(getStringFromWasm0(arg0, arg1)); >} >export function __wbg_warn_a1262a88eb5753fc(arg0, arg1) { > warn(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; } let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); cachedTextDecoder.decode(); const MAX_SAFARI_DECODE_BYTES = 2146435072; let numBytesDecoded = 0; function decodeText(ptr, len) { numBytesDecoded += len; if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) { cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); cachedTextDecoder.decode(); numBytesDecoded = len; } return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len)); } let wasm; export function __wbg_set_wasm(val) { wasm = val; } ---- reference::runtest::test_36_keyword_rs stdout ---- thread 'reference::runtest::test_36_keyword_rs' (849852) panicked at crates/cli/tests/wasm-bindgen/reference.rs:139: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_1c829eb3b94d5955(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_54207b22bc5c4bf2() { B.new(); } export function __wbg_new_6ba9a89a08218782() { const ret = A.new(); return ret; } export function __wbg_new_b5e36ce091e7e5db() { 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_28_import_rs stdout ---- thread 'reference::runtest::test_28_import_rs' (849388) panicked at crates/cli/tests/wasm-bindgen/reference.rs:139: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_1c829eb3b94d5955(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_101f29b5f9a026d0() { a.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_46d0a38793df5c94() { window.location.reload(); } export function __wbg_static_accessor_CONST_857a5a5ee1236a08() { const ret = a.CONST; return ret; } export function __wbg_write_cbf4734310f45bca(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_34_jspi_intrinsics_rs stdout ---- thread 'reference::runtest::test_34_jspi_intrinsics_rs' (849774) panicked at crates/cli/tests/wasm-bindgen/reference.rs:139:13: assertion failed: `(left == right)` Diff < left / right > : /** * @param {any} promise * @returns {Promise} */ export async function drive(promise) { const ret = await (__wbg_jspi_drive ??= WebAssembly.promising(wasm.drive))(promise); return ret; }  new WebAssembly.Suspending(function(...args) { >export const __wbg___wbindgen_jspi_suspend_5438ae6192e20add = ((__inner) => new WebAssembly.Suspending(function(...args) { try { return __inner.apply(this, args); } catch (e) { return Promise.reject(e); } }))(function(arg0) { const ret = arg0; return ret; }); export function __wbg___wbindgen_throw_1c829eb3b94d5955(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); } export function __wbindgen_generic_0000000000000000(arg0) { // Cast intrinsic for `Externref -> 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); } export const __wbindgen_jstag = WebAssembly.JSTag; let __wbg_jspi_drive; 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_25_getter_setter_rs stdout ---- thread 'reference::runtest::test_25_getter_setter_rs' (849155) panicked at crates/cli/tests/wasm-bindgen/reference.rs:139: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_1c829eb3b94d5955(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_52_slice_to_array_rs stdout ---- thread 'reference::runtest::test_52_slice_to_array_rs' (854211) panicked at crates/cli/tests/wasm-bindgen/reference.rs:139:13: assertion failed: `(left == right)` Diff < left / right > : export function driver() { wasm.driver(); } export function __wbg___wbindgen_throw_1c829eb3b94d5955(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_string_as_array_5825508e75de1e31(arg0, arg1) { let v0; if (arg0 !== 0) { v0 = getArrayJsValueFromWasm0(arg0, arg1); wasm.__wbindgen_free(arg0, arg1 * 4, 4); } js_slice_optional_string_as_array(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_generic_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_47_reexport_rs stdout ---- thread 'reference::runtest::test_47_reexport_rs' (850369) panicked at crates/cli/tests/wasm-bindgen/reference.rs:139: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_panic_unwind stdout ---- thread 'reference::runtest_panic_unwind' (854222) panicked at crates/cli/tests/wasm-bindgen/main.rs:155: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.128/target/cli-tests/panic_unwind_reftest" && CARGO_TARGET_DIR="/home/buildozer/aports/community/wasm-bindgen/src/wasm-bindgen-0.2.128/target" RUSTFLAGS="-C panic=unwind" RUSTUP_TOOLCHAIN="nightly" "cargo" "build" "-Zbuild-std=std,panic_unwind" "--target" "wasm32-unknown-unknown"` 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_18_enums_rs stdout ---- thread 'reference::runtest::test_18_enums_rs' (848711) panicked at crates/cli/tests/wasm-bindgen/reference.rs:139: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_1c829eb3b94d5955(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_49_result_rs stdout ---- thread 'reference::runtest::test_49_result_rs' (850487) panicked at crates/cli/tests/wasm-bindgen/reference.rs:139: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_826287bbed9e4c99(arg0, arg1) { const ret = Error(getStringFromWasm0(arg0, arg1)); return ret; } export function __wbg___wbindgen_throw_1c829eb3b94d5955(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); } export function __wbindgen_generic_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_panic_unwind_legacy stdout ---- thread 'reference::runtest_panic_unwind_legacy' (854224) panicked at crates/cli/tests/wasm-bindgen/main.rs:155: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.128/target/cli-tests/panic_unwind_legacy_reftest" && CARGO_TARGET_DIR="/home/buildozer/aports/community/wasm-bindgen/src/wasm-bindgen-0.2.128/target" RUSTFLAGS="-C panic=unwind -Cllvm-args=-wasm-use-legacy-eh" RUSTUP_TOOLCHAIN="nightly" "cargo" "build" "-Zbuild-std=std,panic_unwind" "--target" "wasm32-unknown-unknown"` 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_48_reserved_class_name_rs stdout ---- thread 'reference::runtest::test_48_reserved_class_name_rs' (850428) panicked at crates/cli/tests/wasm-bindgen/reference.rs:139: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_1c829eb3b94d5955(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_29_int128_rs stdout ---- thread 'reference::runtest::test_29_int128_rs' (849454) panicked at crates/cli/tests/wasm-bindgen/reference.rs:139: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_1c829eb3b94d5955(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_35_jspi_rs stdout ---- thread 'reference::runtest::test_35_jspi_rs' (849781) panicked at crates/cli/tests/wasm-bindgen/reference.rs:139:13: assertion failed: `(left == right)` Diff < left / right > : /** * Export returning a primitive: TypeScript becomes `(): Promise`. * @returns {Promise} */ export async function compute() { const ret = await (__wbg_jspi_compute ??= WebAssembly.promising(wasm.compute))(); return ret >>> 0; } /** * Export returning void: wrapped with `WebAssembly.promising` in JS. * TypeScript signature becomes `(): Promise`. * @returns {Promise} */ export async function do_work() { await (__wbg_jspi_do_work ??= WebAssembly.promising(wasm.do_work))(); } export function __wbg___wbindgen_throw_1c829eb3b94d5955(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); }  new WebAssembly.Suspending(function(...args) { >export const __wbg_fetch_number_3f18b6475771db89 = ((__inner) => new WebAssembly.Suspending(function(...args) { try { return __inner.apply(this, args); } catch (e) { return Promise.reject(e); } }))(function() { const ret = fetch_number(); return ret; });  new WebAssembly.Suspending(function(...args) { >export const __wbg_fetch_text_29c1943c202d0cac = ((__inner) => new WebAssembly.Suspending(function(...args) { try { return __inner.apply(this, args); } catch (e) { return Promise.reject(e); } }))(function() { const ret = fetch_text(); return ret; });  new WebAssembly.Suspending(function(...args) { >export const __wbg_sleep_f3a267168603c5c4 = ((__inner) => new WebAssembly.Suspending(function(...args) { try { return __inner.apply(this, args); } catch (e) { return Promise.reject(e); } }))(function(arg0) { return sleep(arg0 >>> 0); });  new WebAssembly.Suspending(function(...args) { >export const __wbg_try_fetch_1e1a91c2ba22ed44 = ((__inner) => new WebAssembly.Suspending(function(...args) { try { return __inner.apply(this, args); } catch (e) { return Promise.reject(e); } }))(function() { const ret = try_fetch(); return ret; }); export function __wbindgen_generic_0000000000000000(arg0, arg1) { // Cast intrinsic for `Externref -> String`. const ret = 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 __wbindgen_generic_0000000000000001(arg0) { // Cast intrinsic for `Externref -> U32`. 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); } export const __wbindgen_jstag = WebAssembly.JSTag; let __wbg_jspi_compute; let __wbg_jspi_do_work; 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_50_self_type_rs stdout ---- thread 'reference::runtest::test_50_self_type_rs' (853754) panicked at crates/cli/tests/wasm-bindgen/reference.rs:139: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_1c829eb3b94d5955(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; } ---- spawn_local_panic_frees_future stdout ---- thread 'spawn_local_panic_frees_future' (854237) panicked at crates/cli/tests/wasm-bindgen/main.rs:155: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.128/target/cli-tests/spawn_local_panic_frees_future" && CARGO_TARGET_DIR="/home/buildozer/aports/community/wasm-bindgen/src/wasm-bindgen-0.2.128/target" RUSTFLAGS="-Cpanic=unwind" RUSTUP_TOOLCHAIN="nightly" "cargo" "build" "-Zbuild-std=std,panic_unwind" "--target" "wasm32-unknown-unknown"` 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_abort_handler_unwind_panic stdout ---- thread 'termination_abort_handler_unwind_panic' (854267) panicked at crates/cli/tests/wasm-bindgen/main.rs:155: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.128/target/cli-tests/termination_abort_handler_unwind_panic" && CARGO_TARGET_DIR="/home/buildozer/aports/community/wasm-bindgen/src/wasm-bindgen-0.2.128/target" RUSTFLAGS="-Cpanic=unwind" RUSTUP_TOOLCHAIN="nightly" "cargo" "build" "-Zbuild-std=std,panic_unwind" "--target" "wasm32-unknown-unknown"` 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' (854271) panicked at crates/cli/tests/wasm-bindgen/main.rs:155: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.128/target/cli-tests/termination_reinit" && CARGO_TARGET_DIR="/home/buildozer/aports/community/wasm-bindgen/src/wasm-bindgen-0.2.128/target" RUSTFLAGS="-Cpanic=unwind" RUSTUP_TOOLCHAIN="nightly" "cargo" "build" "-Zbuild-std=std,panic_unwind" "--target" "wasm32-unknown-unknown"` 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_20_exported_class_rename_wrap_rs stdout ---- thread 'reference::runtest::test_20_exported_class_rename_wrap_rs' (848843) panicked at crates/cli/tests/wasm-bindgen/reference.rs:139: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_309e693289c1af1f(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_1c829eb3b94d5955(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; } ---- termination_reinit_auto_detect stdout ---- thread 'termination_reinit_auto_detect' (854275) panicked at crates/cli/tests/wasm-bindgen/main.rs:155: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.128/target/cli-tests/termination_reinit_auto_detect" && CARGO_TARGET_DIR="/home/buildozer/aports/community/wasm-bindgen/src/wasm-bindgen-0.2.128/target" RUSTFLAGS="-Cpanic=unwind" RUSTUP_TOOLCHAIN="nightly" "cargo" "build" "-Zbuild-std=std,panic_unwind" "--target" "wasm32-unknown-unknown"` 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. ``` ---- wasi_target_has_no_placeholder_imports_panic_unwind stdout ---- thread 'wasi_target_has_no_placeholder_imports_panic_unwind' (854287) panicked at crates/cli/tests/wasm-bindgen/main.rs:155: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.128/target/cli-tests/wasi_target_has_no_placeholder_imports_panic_unwind" && CARGO_TARGET_DIR="/home/buildozer/aports/community/wasm-bindgen/src/wasm-bindgen-0.2.128/target" RUSTFLAGS="-Cpanic=unwind" RUSTUP_TOOLCHAIN="nightly" "cargo" "build" "-Zbuild-std=std,panic_unwind" "--target" "wasm32-wasip1"` 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_30_intrinsic_only_rs stdout ---- thread 'reference::runtest::test_30_intrinsic_only_rs' (849467) panicked at crates/cli/tests/wasm-bindgen/reference.rs:139: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_1c829eb3b94d5955(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_10_constructor_rs stdout ---- thread 'reference::runtest::test_10_constructor_rs' (847651) panicked at crates/cli/tests/wasm-bindgen/reference.rs:139: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_1c829eb3b94d5955(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_08_builder_rs stdout ---- thread 'reference::runtest::test_08_builder_rs' (846614) panicked at crates/cli/tests/wasm-bindgen/reference.rs:139: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_1c829eb3b94d5955(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); } export function __wbindgen_init_externref_table() { const table = wasm.__wbindgen_externrefs; const offset = table.grow(4); table.set(0, undefined); table.set(offset + 0, undefined); table.set(offset + 1, null); table.set(offset + 2, true); table.set(offset + 3, false); } const ClassBuilderFinalization = (typeof FinalizationRegistry === 'undefined') ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry(ptr => wasm.__wbg_classbuilder_free(ptr, 1)); function getStringFromWasm0(ptr, len) { return decodeText(ptr >>> 0, len); } let cachedUint8ArrayMemory0 = null; function getUint8ArrayMemory0() { if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) { cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer); } return cachedUint8ArrayMemory0; } let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); cachedTextDecoder.decode(); const MAX_SAFARI_DECODE_BYTES = 2146435072; let numBytesDecoded = 0; function decodeText(ptr, len) { numBytesDecoded += len; if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) { cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); cachedTextDecoder.decode(); numBytesDecoded = len; } return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len)); } let wasm; export function __wbg_set_wasm(val) { wasm = val; } ---- reference::runtest::test_03_anyref_import_catch_rs stdout ---- thread 'reference::runtest::test_03_anyref_import_catch_rs' (846221) panicked at crates/cli/tests/wasm-bindgen/reference.rs:139: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_1c829eb3b94d5955(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_26_import_catch_i64_rs stdout ---- thread 'reference::runtest::test_26_import_catch_i64_rs' (849239) panicked at crates/cli/tests/wasm-bindgen/reference.rs:139:13: assertion failed: `(left == right)` Diff < left / right > : /** * @returns {bigint} */ export function exported() { const ret = wasm.exported(); if (ret[2]) { throw takeFromExternrefTable0(ret[1]); } return ret[0]; } export function __wbg___wbindgen_throw_1c829eb3b94d5955(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); } export function __wbg_foo_f480943a77a3b379() { return handleError(function () { const ret = foo(); return ret; }, arguments) ?? 0n; } 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_12_default_class_rs stdout ---- thread 'reference::runtest::test_12_default_class_rs' (847803) panicked at crates/cli/tests/wasm-bindgen/reference.rs:139: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_1c829eb3b94d5955(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); } export function __wbindgen_init_externref_table() { const table = wasm.__wbindgen_externrefs; const offset = table.grow(4); table.set(0, undefined); table.set(offset + 0, undefined); table.set(offset + 1, null); table.set(offset + 2, true); table.set(offset + 3, false); } const _defaultFinalization = (typeof FinalizationRegistry === 'undefined') ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry(ptr => wasm.__wbg_default_free(ptr, 1)); function getStringFromWasm0(ptr, len) { return decodeText(ptr >>> 0, len); } let cachedUint8ArrayMemory0 = null; function getUint8ArrayMemory0() { if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) { cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer); } return cachedUint8ArrayMemory0; } let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); cachedTextDecoder.decode(); const MAX_SAFARI_DECODE_BYTES = 2146435072; let numBytesDecoded = 0; function decodeText(ptr, len) { numBytesDecoded += len; if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) { cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); cachedTextDecoder.decode(); numBytesDecoded = len; } return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len)); } let wasm; export function __wbg_set_wasm(val) { wasm = val; } ---- reference::runtest::test_14_dynamic_union_rs stdout ---- thread 'reference::runtest::test_14_dynamic_union_rs' (848464) panicked at crates/cli/tests/wasm-bindgen/reference.rs:139: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_2bf58b2ef57e76b5(arg0) { const ret = arg0 === undefined; return ret; } export function __wbg___wbindgen_string_get_6c035dcb6a80d204(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_1c829eb3b94d5955(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_generic_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_22_extends_rust_rs stdout ---- thread 'reference::runtest::test_22_extends_rust_rs' (849083) panicked at crates/cli/tests/wasm-bindgen/reference.rs:139: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_1c829eb3b94d5955(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_32_js_namespace_export_rs stdout ---- thread 'reference::runtest::test_32_js_namespace_export_rs' (849583) panicked at crates/cli/tests/wasm-bindgen/reference.rs:139: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_1c829eb3b94d5955(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_44_private_dedupe_rs stdout ---- thread 'reference::runtest::test_44_private_dedupe_rs' (850191) panicked at crates/cli/tests/wasm-bindgen/reference.rs:139:13: assertion failed: `(left == right)` Diff < left / right > : /** * @enum {0 | 1} */ const Level = Object.freeze({ Low: 0, "0": "Low", High: 1, "1": "High", }); /** * @enum {0 | 1} */ const Level2 = Object.freeze({ Low: 0, "0": "Low", High: 1, "1": "High", }); class Status { static __wrap(ptr) { const obj = Object.create(Status.prototype); obj.__wbg_ptr = ptr; StatusFinalization.register(obj, obj.__wbg_ptr, obj); return obj; } __destroy_into_raw() { const ptr = this.__wbg_ptr; this.__wbg_ptr = 0; StatusFinalization.unregister(this); return ptr; } free() { const ptr = this.__destroy_into_raw(); wasm.__wbg_status_free(ptr, 0); } /** * @returns {number} */ get code() { const ret = wasm.__wbg_get_status_code(this.__wbg_ptr); return ret >>> 0; } /** * @param {number} arg0 */ set code(arg0) { wasm.__wbg_set_status_code(this.__wbg_ptr, arg0); } /** * @returns {string} */ describe() { let deferred1_0; let deferred1_1; try { const ret = wasm.status_describe(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) Status.prototype[Symbol.dispose] = Status.prototype.free; class Status2 { static __wrap(ptr) { const obj = Object.create(Status2.prototype); obj.__wbg_ptr = ptr; Status2Finalization.register(obj, obj.__wbg_ptr, obj); return obj; } __destroy_into_raw() { const ptr = this.__wbg_ptr; this.__wbg_ptr = 0; Status2Finalization.unregister(this); return ptr; } free() { const ptr = this.__destroy_into_raw(); wasm.__wbg_status2_free(ptr, 0); } /** * @returns {number} */ get code() { const ret = wasm.__wbg_get_status2_code(this.__wbg_ptr); return ret >>> 0; } /** * @param {number} arg0 */ set code(arg0) { wasm.__wbg_set_status2_code(this.__wbg_ptr, arg0); } /** * @returns {string} */ describe() { let deferred1_0; let deferred1_1; try { const ret = wasm.status2_describe(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) Status2.prototype[Symbol.dispose] = Status2.prototype.free; /** * @returns {Level[]} */ export function a_levels() { const ret = wasm.a_levels(); var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]); wasm.__wbindgen_free(ret[0], ret[1] * 4, 4); return v1; } /** * @returns {Level2[]} */ export function b_levels() { const ret = wasm.b_levels(); var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]); wasm.__wbindgen_free(ret[0], ret[1] * 4, 4); return v1; } /** * @returns {Status2[]} */ export function b_statuses() { const ret = wasm.b_statuses(); var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]); wasm.__wbindgen_free(ret[0], ret[1] * 4, 4); return v1; } /** * @returns {any[]} */ export function statuses() { const ret = wasm.statuses(); var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]); wasm.__wbindgen_free(ret[0], ret[1] * 4, 4); return v1; } export function __wbg___wbindgen_throw_1c829eb3b94d5955(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); } export function __wbg_status2_new(arg0) { const ret = Status2.__wrap(arg0); return ret; } export function __wbg_status_new(arg0) { const ret = Status.__wrap(arg0); return ret; } export function __wbindgen_generic_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); } const StatusFinalization = (typeof FinalizationRegistry === 'undefined') ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry(ptr => wasm.__wbg_status_free(ptr, 1)); const Status2Finalization = (typeof FinalizationRegistry === 'undefined') ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry(ptr => wasm.__wbg_status2_free(ptr, 1)); 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; } 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_enum_vec_rs stdout ---- thread 'reference::runtest::test_17_enum_vec_rs' (848649) panicked at crates/cli/tests/wasm-bindgen/reference.rs:139:13: assertion failed: `(left == right)` Diff < left / right > : /** * @enum {0 | 1 | 2} */ export const Color = Object.freeze({ Green: 0, "0": "Green", Yellow: 1, "1": "Yellow", Red: 2, "2": "Red", }); /** * @enum {0 | 1} */ const HiddenErr = Object.freeze({ X: 0, "0": "X", Y: 1, "1": "Y", }); /** * @enum {0 | 1} */ export const RenamedErr = Object.freeze({ One: 0, "0": "One", Two: 1, "1": "Two", }); /** * @param {Color[]} values * @returns {Color[]} */ export function enum_vec_echo(values) { const ptr0 = passArrayJsValueToWasm0(values, wasm.__wbindgen_malloc); const len0 = WASM_VECTOR_LEN; const ret = wasm.enum_vec_echo(ptr0, len0); var v2 = getArrayJsValueFromWasm0(ret[0], ret[1]); wasm.__wbindgen_free(ret[0], ret[1] * 4, 4); return v2; } /** * @param {HiddenErr[]} values * @returns {HiddenErr[]} */ export function hidden_err_vec_echo(values) { const ptr0 = passArrayJsValueToWasm0(values, wasm.__wbindgen_malloc); const len0 = WASM_VECTOR_LEN; const ret = wasm.hidden_err_vec_echo(ptr0, len0); var v2 = getArrayJsValueFromWasm0(ret[0], ret[1]); wasm.__wbindgen_free(ret[0], ret[1] * 4, 4); return v2; } /** * @enum {0 | 1} */ const ns__NsErr = Object.freeze({ A: 0, "0": "A", B: 1, "1": "B", }); export const ns = {}; ns.NsErr = ns__NsErr; /** * @param {ns__NsErr[]} values * @returns {ns__NsErr[]} */ export function ns_err_vec_echo(values) { const ptr0 = passArrayJsValueToWasm0(values, wasm.__wbindgen_malloc); const len0 = WASM_VECTOR_LEN; const ret = wasm.ns_err_vec_echo(ptr0, len0); var v2 = getArrayJsValueFromWasm0(ret[0], ret[1]); wasm.__wbindgen_free(ret[0], ret[1] * 4, 4); return v2; } /** * @param {Color[] | null} [values] * @returns {Color[] | undefined} */ export function option_enum_vec_echo(values) { var ptr0 = isLikeNone(values) ? 0 : passArrayJsValueToWasm0(values, wasm.__wbindgen_malloc); var len0 = WASM_VECTOR_LEN; const ret = wasm.option_enum_vec_echo(ptr0, len0); let v2; if (ret[0] !== 0) { v2 = getArrayJsValueFromWasm0(ret[0], ret[1]); wasm.__wbindgen_free(ret[0], ret[1] * 4, 4); } return v2; } /** * @param {RenamedErr[]} values * @returns {RenamedErr[]} */ export function renamed_err_vec_echo(values) { const ptr0 = passArrayJsValueToWasm0(values, wasm.__wbindgen_malloc); const len0 = WASM_VECTOR_LEN; const ret = wasm.renamed_err_vec_echo(ptr0, len0); var v2 = getArrayJsValueFromWasm0(ret[0], ret[1]); wasm.__wbindgen_free(ret[0], ret[1] * 4, 4); return v2; } export function __wbg___wbindgen_debug_string_309e693289c1af1f(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_number_get_8415677682f01507(arg0, arg1) { const obj = arg1; const ret = typeof(obj) === 'number' ? obj : undefined; getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true); getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true); } export function __wbg___wbindgen_throw_1c829eb3b94d5955(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); } export function __wbindgen_generic_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 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; } 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 isLikeNone(x) { return x === undefined || x === null; } 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_56_targets_rs stdout ---- thread 'reference::runtest::test_56_targets_rs' (854216) panicked at crates/cli/tests/wasm-bindgen/reference.rs:139: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_a00f4045ede1eb78() { 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_54_string_arg_rs stdout ---- thread 'reference::runtest::test_54_string_arg_rs' (854214) panicked at crates/cli/tests/wasm-bindgen/reference.rs:139: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_1c829eb3b94d5955(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_60_wasm_export_types_rs stdout ---- thread 'reference::runtest::test_60_wasm_export_types_rs' (854220) panicked at crates/cli/tests/wasm-bindgen/reference.rs:139: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_5d9e815e6fdf150f: function(arg0, arg1) { > __wbg___wbindgen_throw_1c829eb3b94d5955: 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 (!module.ok) { throw new Error(`failed to fetch Wasm: ${module.status} ${module.statusText} fetching '${module.url}'`); } if (typeof WebAssembly.instantiateStreaming === 'function') { try { return await WebAssembly.instantiateStreaming(module, imports); } catch (e) { const validResponse = 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_58_typescript_type_rs stdout ---- thread 'reference::runtest::test_58_typescript_type_rs' (854218) panicked at crates/cli/tests/wasm-bindgen/reference.rs:139:13: assertion failed: `(left == right)` Diff < left / right > : /** * @enum {1 | 2} */ export const Größe = Object.freeze({ Klein: 1, "1": "Klein", Gross: 2, "2": "Gross", }); /** * @param {"Café" | "naïve"} a */ export function accented(a) { wasm.accented(a); } /** * @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); } /** * @param {Café} c * @returns {Café} */ export function take_cafe(c) { const ret = wasm.take_cafe((__wbindgen_enum_Café.indexOf(c) + 1 || 3) - 1); return __wbindgen_enum_Café[ret]; } /** * @param {Größe} g * @returns {Größe} */ export function take_groesse(g) { const ret = wasm.take_groesse(g); return ret; } export function __wbg___wbindgen_throw_1c829eb3b94d5955(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_Café = ["espresso", "crème"]; 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_55_symbol_rs stdout ---- thread 'reference::runtest::test_55_symbol_rs' (854215) panicked at crates/cli/tests/wasm-bindgen/reference.rs:139: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_d991b9310ffe3d01(arg0, arg1) { SomeClass[Symbol.toPrimitive](getStringFromWasm0(arg0, arg1)); } export function __wbg___wbindgen_throw_1c829eb3b94d5955(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); } export function __wbg_import_static_symbol_getter_095359247fcaf551() { 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_21_exported_class_wrap_matrix_rs stdout ---- thread 'reference::runtest::test_21_exported_class_wrap_matrix_rs' (848847) panicked at crates/cli/tests/wasm-bindgen/reference.rs:139: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_309e693289c1af1f(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_1c829eb3b94d5955(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_31_js_namespace_export_same_name_rs stdout ---- thread 'reference::runtest::test_31_js_namespace_export_same_name_rs' (849520) panicked at crates/cli/tests/wasm-bindgen/reference.rs:139: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]); 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]); 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]); 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]); 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_309e693289c1af1f(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_1c829eb3b94d5955(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_15_echo_rs stdout ---- thread 'reference::runtest::test_15_echo_rs' (848533) panicked at crates/cli/tests/wasm-bindgen/reference.rs:139: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]); 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]); 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]); 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]); 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]); 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_309e693289c1af1f(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_6c035dcb6a80d204(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_1c829eb3b94d5955(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_generic_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_06_async_number_rs stdout ---- thread 'reference::runtest::test_06_async_number_rs' (846399) panicked at crates/cli/tests/wasm-bindgen/reference.rs:139: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_309e693289c1af1f(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_d3b7c7e93dbab525(arg0) { const ret = typeof(arg0) === 'function'; return ret; } export function __wbg___wbindgen_is_undefined_2bf58b2ef57e76b5(arg0) { const ret = arg0 === undefined; return ret; } export function __wbg___wbindgen_throw_1c829eb3b94d5955(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); } export function __wbg__wbg_cb_unref_9f26c718880a0f0f(arg0) { arg0._wbg_cb_unref(); } export function __wbg_call_377f7c1ea23294ff() { return handleError(function (arg0, arg1, arg2) { const ret = arg0.call(arg1, arg2); return ret; }, arguments); } export function __wbg_new_typed_dc70da51eb0a74dd(arg0, arg1) { try { var state0 = {a: arg0, b: arg1}; var cb0 = (arg0, arg1) => { const a = state0.a; state0.a = 0; try { return wasm_bindgen_0000000000000003___convert__closures_____invoke___js_sys_0000000000000004___Function_fn_wasm_bindgen_0000000000000003___JsValue_____wasm_bindgen_0000000000000003___sys__Undefined___js_sys_0000000000000004___Function_fn_wasm_bindgen_0000000000000003___JsValue_____wasm_bindgen_0000000000000003___sys__Undefined_______true_(a, state0.b, arg0, arg1); } finally { state0.a = a; } }; const ret = new Promise(cb0); return ret; } finally { state0.a = 0; } } export function __wbg_queueMicrotask_5ee6eeac30187c5a(arg0) { const ret = arg0.queueMicrotask; return ret; } export function __wbg_queueMicrotask_bfdd12404c86c1f1(arg0) { queueMicrotask(arg0); } export function __wbg_resolve_75f91a406e4c7acc(arg0) { const ret = Promise.resolve(arg0); return ret; } export function __wbg_run_61515237262b73e7(arg0, arg1, arg2) { try { var state0 = {a: arg1, b: arg2}; var cb0 = () => { const a = state0.a; state0.a = 0; try { return wasm_bindgen_0000000000000003___convert__closures_____invoke___bool__true_(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_97feb4760b008bb3() { const ret = typeof console === 'undefined' ? null : console?.createTask; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_GLOBAL_THIS_a75424ae9326a686() { > const ret = typeof globalThis === 'undefined' ? null : globalThis; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_GLOBAL_bf6a42a8e3526e71() { > const ret = typeof global === 'undefined' ? null : global; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_SELF_bc906dcc225f4e8b() { const ret = typeof self === 'undefined' ? null : self; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_WINDOW_399df0f891175ff8() { const ret = typeof window === 'undefined' ? null : window; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_then_4544c2484ec8ea07(arg0, arg1) { const ret = arg0.then(arg1); return ret; } export function __wbindgen_generic_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_0000000000000003___convert__closures_____invoke___wasm_bindgen_0000000000000003___JsValue__core_0000000000000005___result__Result_____wasm_bindgen_0000000000000003___JsError___true_); return ret; } export function __wbindgen_generic_0000000000000001(arg0) { // Cast intrinsic for `F64 -> Externref`. const ret = arg0; return ret; } export function __wbindgen_generic_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_0000000000000003___convert__closures_____invoke___bool__true_(arg0, arg1) { const ret = wasm.wasm_bindgen_0000000000000003___convert__closures_____invoke___bool__true_(arg0, arg1); return ret !== 0; } function wasm_bindgen_0000000000000003___convert__closures_____invoke___wasm_bindgen_0000000000000003___JsValue__core_0000000000000005___result__Result_____wasm_bindgen_0000000000000003___JsError___true_(arg0, arg1, arg2) { const ret = wasm.wasm_bindgen_0000000000000003___convert__closures_____invoke___wasm_bindgen_0000000000000003___JsValue__core_0000000000000005___result__Result_____wasm_bindgen_0000000000000003___JsError___true_(arg0, arg1, arg2); if (ret[1]) { throw takeFromExternrefTable0(ret[0]); } } function wasm_bindgen_0000000000000003___convert__closures_____invoke___js_sys_0000000000000004___Function_fn_wasm_bindgen_0000000000000003___JsValue_____wasm_bindgen_0000000000000003___sys__Undefined___js_sys_0000000000000004___Function_fn_wasm_bindgen_0000000000000003___JsValue_____wasm_bindgen_0000000000000003___sys__Undefined_______true_(arg0, arg1, arg2, arg3) { wasm.wasm_bindgen_0000000000000003___convert__closures_____invoke___js_sys_0000000000000004___Function_fn_wasm_bindgen_0000000000000003___JsValue_____wasm_bindgen_0000000000000003___sys__Undefined___js_sys_0000000000000004___Function_fn_wasm_bindgen_0000000000000003___JsValue_____wasm_bindgen_0000000000000003___sys__Undefined_______true_(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_07_async_void_rs stdout ---- thread 'reference::runtest::test_07_async_void_rs' (846420) panicked at crates/cli/tests/wasm-bindgen/reference.rs:139: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_309e693289c1af1f(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_d3b7c7e93dbab525(arg0) { const ret = typeof(arg0) === 'function'; return ret; } export function __wbg___wbindgen_is_undefined_2bf58b2ef57e76b5(arg0) { const ret = arg0 === undefined; return ret; } export function __wbg___wbindgen_throw_1c829eb3b94d5955(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); } export function __wbg__wbg_cb_unref_9f26c718880a0f0f(arg0) { arg0._wbg_cb_unref(); } export function __wbg_call_377f7c1ea23294ff() { return handleError(function (arg0, arg1, arg2) { const ret = arg0.call(arg1, arg2); return ret; }, arguments); } export function __wbg_new_typed_dc70da51eb0a74dd(arg0, arg1) { try { var state0 = {a: arg0, b: arg1}; var cb0 = (arg0, arg1) => { const a = state0.a; state0.a = 0; try { return wasm_bindgen_0000000000000002___convert__closures_____invoke___js_sys_0000000000000003___Function_fn_wasm_bindgen_0000000000000002___JsValue_____wasm_bindgen_0000000000000002___sys__Undefined___js_sys_0000000000000003___Function_fn_wasm_bindgen_0000000000000002___JsValue_____wasm_bindgen_0000000000000002___sys__Undefined_______true_(a, state0.b, arg0, arg1); } finally { state0.a = a; } }; const ret = new Promise(cb0); return ret; } finally { state0.a = 0; } } export function __wbg_queueMicrotask_5ee6eeac30187c5a(arg0) { const ret = arg0.queueMicrotask; return ret; } export function __wbg_queueMicrotask_bfdd12404c86c1f1(arg0) { queueMicrotask(arg0); } export function __wbg_resolve_75f91a406e4c7acc(arg0) { const ret = Promise.resolve(arg0); return ret; } export function __wbg_run_61515237262b73e7(arg0, arg1, arg2) { try { var state0 = {a: arg1, b: arg2}; var cb0 = () => { const a = state0.a; state0.a = 0; try { return wasm_bindgen_0000000000000002___convert__closures_____invoke___bool__true_(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_97feb4760b008bb3() { const ret = typeof console === 'undefined' ? null : console?.createTask; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_GLOBAL_THIS_a75424ae9326a686() { > const ret = typeof globalThis === 'undefined' ? null : globalThis; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_GLOBAL_bf6a42a8e3526e71() { > const ret = typeof global === 'undefined' ? null : global; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_SELF_bc906dcc225f4e8b() { const ret = typeof self === 'undefined' ? null : self; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_WINDOW_399df0f891175ff8() { const ret = typeof window === 'undefined' ? null : window; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_then_4544c2484ec8ea07(arg0, arg1) { const ret = arg0.then(arg1); return ret; } export function __wbindgen_generic_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_0000000000000002___convert__closures_____invoke___wasm_bindgen_0000000000000002___JsValue__core_0000000000000004___result__Result_____wasm_bindgen_0000000000000002___JsError___true_); return ret; } export function __wbindgen_generic_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_0000000000000002___convert__closures_____invoke___bool__true_(arg0, arg1) { const ret = wasm.wasm_bindgen_0000000000000002___convert__closures_____invoke___bool__true_(arg0, arg1); return ret !== 0; } function wasm_bindgen_0000000000000002___convert__closures_____invoke___wasm_bindgen_0000000000000002___JsValue__core_0000000000000004___result__Result_____wasm_bindgen_0000000000000002___JsError___true_(arg0, arg1, arg2) { const ret = wasm.wasm_bindgen_0000000000000002___convert__closures_____invoke___wasm_bindgen_0000000000000002___JsValue__core_0000000000000004___result__Result_____wasm_bindgen_0000000000000002___JsError___true_(arg0, arg1, arg2); if (ret[1]) { throw takeFromExternrefTable0(ret[0]); } } function wasm_bindgen_0000000000000002___convert__closures_____invoke___js_sys_0000000000000003___Function_fn_wasm_bindgen_0000000000000002___JsValue_____wasm_bindgen_0000000000000002___sys__Undefined___js_sys_0000000000000003___Function_fn_wasm_bindgen_0000000000000002___JsValue_____wasm_bindgen_0000000000000002___sys__Undefined_______true_(arg0, arg1, arg2, arg3) { wasm.wasm_bindgen_0000000000000002___convert__closures_____invoke___js_sys_0000000000000003___Function_fn_wasm_bindgen_0000000000000002___JsValue_____wasm_bindgen_0000000000000002___sys__Undefined___js_sys_0000000000000003___Function_fn_wasm_bindgen_0000000000000002___JsValue_____wasm_bindgen_0000000000000002___sys__Undefined_______true_(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_53_static_rs stdout ---- thread 'reference::runtest::test_53_static_rs' (854213) panicked at crates/cli/tests/wasm-bindgen/reference.rs:139:13: assertion failed: `(left == right)` Diff < left / right > : export function exported() { wasm.exported(); } export function __wbg___wbindgen_throw_1c829eb3b94d5955(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); } export function __wbg_static_accessor_NAMESPACE_OPTIONAL_d5e07d87d6b5688b() { const ret = typeof test === 'undefined' ? null : test?.NAMESPACE_OPTIONAL; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_NAMESPACE_PLAIN_63db3b5df2a8d1e0() { const ret = test.NAMESPACE_PLAIN; return ret; } export function __wbg_static_accessor_NESTED_NAMESPACE_OPTIONAL_52ff64f007c9edc1() { 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_b7177ff8239eefb3() { 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_function_attrs_rs stdout ---- thread 'reference::runtest::test_23_function_attrs_rs' (849146) panicked at crates/cli/tests/wasm-bindgen/reference.rs:139: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_309e693289c1af1f(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_0478e681fd4cbeb0(arg0) { const ret = !arg0; return ret; } export function __wbg___wbindgen_is_function_d3b7c7e93dbab525(arg0) { const ret = typeof(arg0) === 'function'; return ret; } export function __wbg___wbindgen_is_undefined_2bf58b2ef57e76b5(arg0) { const ret = arg0 === undefined; return ret; } export function __wbg___wbindgen_throw_1c829eb3b94d5955(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); } export function __wbg__wbg_cb_unref_9f26c718880a0f0f(arg0) { arg0._wbg_cb_unref(); } export function __wbg_call_377f7c1ea23294ff() { return handleError(function (arg0, arg1, arg2) { const ret = arg0.call(arg1, arg2); return ret; }, arguments); } export function __wbg_new_typed_dc70da51eb0a74dd(arg0, arg1) { try { var state0 = {a: arg0, b: arg1}; var cb0 = (arg0, arg1) => { const a = state0.a; state0.a = 0; try { return wasm_bindgen_0000000000000003___convert__closures_____invoke___js_sys_0000000000000004___Function_fn_wasm_bindgen_0000000000000003___JsValue_____wasm_bindgen_0000000000000003___sys__Undefined___js_sys_0000000000000004___Function_fn_wasm_bindgen_0000000000000003___JsValue_____wasm_bindgen_0000000000000003___sys__Undefined_______true_(a, state0.b, arg0, arg1); } finally { state0.a = a; } }; const ret = new Promise(cb0); return ret; } finally { state0.a = 0; } } export function __wbg_queueMicrotask_5ee6eeac30187c5a(arg0) { const ret = arg0.queueMicrotask; return ret; } export function __wbg_queueMicrotask_bfdd12404c86c1f1(arg0) { queueMicrotask(arg0); } export function __wbg_resolve_75f91a406e4c7acc(arg0) { const ret = Promise.resolve(arg0); return ret; } export function __wbg_run_61515237262b73e7(arg0, arg1, arg2) { try { var state0 = {a: arg1, b: arg2}; var cb0 = () => { const a = state0.a; state0.a = 0; try { return wasm_bindgen_0000000000000003___convert__closures_____invoke___bool__true_(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_97feb4760b008bb3() { const ret = typeof console === 'undefined' ? null : console?.createTask; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_GLOBAL_THIS_a75424ae9326a686() { > const ret = typeof globalThis === 'undefined' ? null : globalThis; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_GLOBAL_bf6a42a8e3526e71() { > const ret = typeof global === 'undefined' ? null : global; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_SELF_bc906dcc225f4e8b() { const ret = typeof self === 'undefined' ? null : self; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_WINDOW_399df0f891175ff8() { const ret = typeof window === 'undefined' ? null : window; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_then_4544c2484ec8ea07(arg0, arg1) { const ret = arg0.then(arg1); return ret; } export function __wbindgen_generic_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_0000000000000003___convert__closures_____invoke___wasm_bindgen_0000000000000003___JsValue__core_0000000000000005___result__Result_____wasm_bindgen_0000000000000003___JsError___true_); return ret; } export function __wbindgen_generic_0000000000000001(arg0) { // Cast intrinsic for `F64 -> Externref`. const ret = arg0; return ret; } export function __wbindgen_generic_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_0000000000000003___convert__closures_____invoke___bool__true_(arg0, arg1) { const ret = wasm.wasm_bindgen_0000000000000003___convert__closures_____invoke___bool__true_(arg0, arg1); return ret !== 0; } function wasm_bindgen_0000000000000003___convert__closures_____invoke___wasm_bindgen_0000000000000003___JsValue__core_0000000000000005___result__Result_____wasm_bindgen_0000000000000003___JsError___true_(arg0, arg1, arg2) { const ret = wasm.wasm_bindgen_0000000000000003___convert__closures_____invoke___wasm_bindgen_0000000000000003___JsValue__core_0000000000000005___result__Result_____wasm_bindgen_0000000000000003___JsError___true_(arg0, arg1, arg2); if (ret[1]) { throw takeFromExternrefTable0(ret[0]); } } function wasm_bindgen_0000000000000003___convert__closures_____invoke___js_sys_0000000000000004___Function_fn_wasm_bindgen_0000000000000003___JsValue_____wasm_bindgen_0000000000000003___sys__Undefined___js_sys_0000000000000004___Function_fn_wasm_bindgen_0000000000000003___JsValue_____wasm_bindgen_0000000000000003___sys__Undefined_______true_(arg0, arg1, arg2, arg3) { wasm.wasm_bindgen_0000000000000003___convert__closures_____invoke___js_sys_0000000000000004___Function_fn_wasm_bindgen_0000000000000003___JsValue_____wasm_bindgen_0000000000000003___sys__Undefined___js_sys_0000000000000004___Function_fn_wasm_bindgen_0000000000000003___JsValue_____wasm_bindgen_0000000000000003___sys__Undefined_______true_(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_09_closures_rs stdout ---- thread 'reference::runtest::test_09_closures_rs' (847549) panicked at crates/cli/tests/wasm-bindgen/reference.rs:139: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_2bf58b2ef57e76b5(arg0) { const ret = arg0 === undefined; return ret; } export function __wbg___wbindgen_throw_1c829eb3b94d5955(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); } export function __wbg__wbg_cb_unref_9f26c718880a0f0f(arg0) { arg0._wbg_cb_unref(); } export function __wbg_call_scoped_53e822ed08a3dd45(arg0) { call_scoped(arg0); } export function __wbg_forEach_dbd1aec42ad341eb(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_0000000000000003___convert__closures_____invoke___wasm_bindgen_0000000000000003___JsValue__u32__js_sys_0000000000000004___Array______true_(a, state0.b, arg0, arg1, arg2); } finally { state0.a = a; } }; arg0.forEach(cb0); } finally { state0.a = 0; } } export function __wbg_instanceof_Window_21399dbd01521f4a(arg0) { let result; try { result = arg0 instanceof Window; } catch (_) { result = false; } const ret = result; return ret; } export function __wbg_log_6992044be9253e94(arg0) { console.log(arg0); } export function __wbg_setTimeout_816606f6cdeb7cda() { return handleError(function (arg0, arg1) { const ret = arg0.setTimeout(arg1); return ret; }, arguments); } export function __wbg_static_accessor_GLOBAL_THIS_a75424ae9326a686() { > const ret = typeof globalThis === 'undefined' ? null : globalThis; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_GLOBAL_bf6a42a8e3526e71() { > const ret = typeof global === 'undefined' ? null : global; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_SELF_bc906dcc225f4e8b() { const ret = typeof self === 'undefined' ? null : self; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_WINDOW_399df0f891175ff8() { const ret = typeof window === 'undefined' ? null : window; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbindgen_generic_0000000000000000(arg0, arg1) { var state0 = {a: arg0, b: arg1}; var cb0 = () => { const a = state0.a; state0.a = 0; try { return wasm_bindgen_0000000000000003___convert__closures_____invoke_______false_(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: 5, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`. const ret = cb0; return ret; } export function __wbindgen_generic_0000000000000001(arg0, arg1) { // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 6, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`. const ret = makeMutClosure(arg0, arg1, wasm_bindgen_0000000000000003___convert__closures_____invoke_______true_); return ret; } export function __wbindgen_generic_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_0000000000000003___convert__closures_____invoke_______false_(arg0, arg1) { wasm.wasm_bindgen_0000000000000003___convert__closures_____invoke_______false_(arg0, arg1); } function wasm_bindgen_0000000000000003___convert__closures_____invoke_______true_(arg0, arg1) { wasm.wasm_bindgen_0000000000000003___convert__closures_____invoke_______true_(arg0, arg1); } function wasm_bindgen_0000000000000003___convert__closures_____invoke___wasm_bindgen_0000000000000003___JsValue__u32__js_sys_0000000000000004___Array______true_(arg0, arg1, arg2, arg3, arg4) { wasm.wasm_bindgen_0000000000000003___convert__closures_____invoke___wasm_bindgen_0000000000000003___JsValue__u32__js_sys_0000000000000004___Array______true_(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_61_web_sys_rs stdout ---- thread 'reference::runtest::test_61_web_sys_rs' (854221) panicked at crates/cli/tests/wasm-bindgen/reference.rs:139: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_309e693289c1af1f(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_1c829eb3b94d5955(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); } export function __wbg_new_38ef9d7b1a2bd722() { 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_05_async_import_rs stdout ---- thread 'reference::runtest::test_05_async_import_rs' (846309) panicked at crates/cli/tests/wasm-bindgen/reference.rs:139:13: assertion failed: `(left == right)` Diff < left / right > : /** * @returns {Promise} */ export function exported() { const ret = wasm.exported(); return ret; } export function __wbg___wbindgen_debug_string_309e693289c1af1f(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_d3b7c7e93dbab525(arg0) { const ret = typeof(arg0) === 'function'; return ret; } export function __wbg___wbindgen_is_undefined_2bf58b2ef57e76b5(arg0) { const ret = arg0 === undefined; return ret; } export function __wbg___wbindgen_throw_1c829eb3b94d5955(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); } export function __wbg__wbg_cb_unref_9f26c718880a0f0f(arg0) { arg0._wbg_cb_unref(); } export function __wbg_async_catch_d26cc6f8398192b3() { return handleError(function () { const ret = async_catch(); return ret; }, arguments); } export function __wbg_async_handle_811b0e71759ea26d() { const ret = async_handle(); return ret; } export function __wbg_async_number_2d4b222b86ae49a9() { const ret = async_number(); return ret; } export function __wbg_async_string_de9c9cee2551c8bf() { const ret = async_string(); return ret; } export function __wbg_async_unit_a5fb6acaaa6d2cbe() { const ret = async_unit(); return ret; } export function __wbg_call_377f7c1ea23294ff() { return handleError(function (arg0, arg1, arg2) { const ret = arg0.call(arg1, arg2); return ret; }, arguments); } export function __wbg_new_typed_dc70da51eb0a74dd(arg0, arg1) { try { var state0 = {a: arg0, b: arg1}; var cb0 = (arg0, arg1) => { const a = state0.a; state0.a = 0; try { return wasm_bindgen_0000000000000005___convert__closures_____invoke___js_sys_0000000000000006___Function_fn_wasm_bindgen_0000000000000005___JsValue_____wasm_bindgen_0000000000000005___sys__Undefined___js_sys_0000000000000006___Function_fn_wasm_bindgen_0000000000000005___JsValue_____wasm_bindgen_0000000000000005___sys__Undefined_______true_(a, state0.b, arg0, arg1); } finally { state0.a = a; } }; const ret = new Promise(cb0); return ret; } finally { state0.a = 0; } } export function __wbg_queueMicrotask_5ee6eeac30187c5a(arg0) { const ret = arg0.queueMicrotask; return ret; } export function __wbg_queueMicrotask_bfdd12404c86c1f1(arg0) { queueMicrotask(arg0); } export function __wbg_resolve_75f91a406e4c7acc(arg0) { const ret = Promise.resolve(arg0); return ret; } export function __wbg_run_61515237262b73e7(arg0, arg1, arg2) { try { var state0 = {a: arg1, b: arg2}; var cb0 = () => { const a = state0.a; state0.a = 0; try { return wasm_bindgen_0000000000000005___convert__closures_____invoke___bool__true_(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_97feb4760b008bb3() { const ret = typeof console === 'undefined' ? null : console?.createTask; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_GLOBAL_THIS_a75424ae9326a686() { > const ret = typeof globalThis === 'undefined' ? null : globalThis; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_GLOBAL_bf6a42a8e3526e71() { > const ret = typeof global === 'undefined' ? null : global; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_SELF_bc906dcc225f4e8b() { const ret = typeof self === 'undefined' ? null : self; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_WINDOW_399df0f891175ff8() { const ret = typeof window === 'undefined' ? null : window; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_then_17f311ca2ea4fd80(arg0, arg1, arg2) { const ret = arg0.then(arg1, arg2); return ret; } export function __wbg_then_4544c2484ec8ea07(arg0, arg1) { const ret = arg0.then(arg1); return ret; } export function __wbindgen_generic_0000000000000000(arg0, arg1) { // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 10, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`. const ret = makeMutClosure(arg0, arg1, wasm_bindgen_0000000000000005___convert__closures_____invoke___async_import_reftest_0000000000000007___Widget__core_0000000000000008___result__Result_____wasm_bindgen_0000000000000005___JsError___true_); return ret; } export function __wbindgen_generic_0000000000000001(arg0, arg1) { // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 11, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`. const ret = makeMutClosure(arg0, arg1, wasm_bindgen_0000000000000005___convert__closures_____invoke___wasm_bindgen_0000000000000005___JsValue__core_0000000000000008___result__Result_____wasm_bindgen_0000000000000005___JsError___true_); return ret; } export function __wbindgen_generic_0000000000000002(arg0, arg1) { // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [String], shim_idx: 12, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`. const ret = makeMutClosure(arg0, arg1, wasm_bindgen_0000000000000005___convert__closures_____invoke___alloc_0000000000000009___string__String__core_0000000000000008___result__Result_____wasm_bindgen_0000000000000005___JsError___true_); return ret; } export function __wbindgen_generic_0000000000000003(arg0, arg1) { // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [U32], shim_idx: 13, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`. const ret = makeMutClosure(arg0, arg1, wasm_bindgen_0000000000000005___convert__closures_____invoke___u32__core_0000000000000008___result__Result_____wasm_bindgen_0000000000000005___JsError___true_); return ret; } export function __wbindgen_generic_0000000000000004(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_0000000000000005___convert__closures_____invoke___bool__true_(arg0, arg1) { const ret = wasm.wasm_bindgen_0000000000000005___convert__closures_____invoke___bool__true_(arg0, arg1); return ret !== 0; } function wasm_bindgen_0000000000000005___convert__closures_____invoke___async_import_reftest_0000000000000007___Widget__core_0000000000000008___result__Result_____wasm_bindgen_0000000000000005___JsError___true_(arg0, arg1, arg2) { const ret = wasm.wasm_bindgen_0000000000000005___convert__closures_____invoke___async_import_reftest_0000000000000007___Widget__core_0000000000000008___result__Result_____wasm_bindgen_0000000000000005___JsError___true_(arg0, arg1, arg2); if (ret[1]) { throw takeFromExternrefTable0(ret[0]); } } function wasm_bindgen_0000000000000005___convert__closures_____invoke___wasm_bindgen_0000000000000005___JsValue__core_0000000000000008___result__Result_____wasm_bindgen_0000000000000005___JsError___true_(arg0, arg1, arg2) { const ret = wasm.wasm_bindgen_0000000000000005___convert__closures_____invoke___wasm_bindgen_0000000000000005___JsValue__core_0000000000000008___result__Result_____wasm_bindgen_0000000000000005___JsError___true_(arg0, arg1, arg2); if (ret[1]) { throw takeFromExternrefTable0(ret[0]); } } function wasm_bindgen_0000000000000005___convert__closures_____invoke___js_sys_0000000000000006___Function_fn_wasm_bindgen_0000000000000005___JsValue_____wasm_bindgen_0000000000000005___sys__Undefined___js_sys_0000000000000006___Function_fn_wasm_bindgen_0000000000000005___JsValue_____wasm_bindgen_0000000000000005___sys__Undefined_______true_(arg0, arg1, arg2, arg3) { wasm.wasm_bindgen_0000000000000005___convert__closures_____invoke___js_sys_0000000000000006___Function_fn_wasm_bindgen_0000000000000005___JsValue_____wasm_bindgen_0000000000000005___sys__Undefined___js_sys_0000000000000006___Function_fn_wasm_bindgen_0000000000000005___JsValue_____wasm_bindgen_0000000000000005___sys__Undefined_______true_(arg0, arg1, arg2, arg3); } function wasm_bindgen_0000000000000005___convert__closures_____invoke___u32__core_0000000000000008___result__Result_____wasm_bindgen_0000000000000005___JsError___true_(arg0, arg1, arg2) { const ret = wasm.wasm_bindgen_0000000000000005___convert__closures_____invoke___u32__core_0000000000000008___result__Result_____wasm_bindgen_0000000000000005___JsError___true_(arg0, arg1, arg2); if (ret[1]) { throw takeFromExternrefTable0(ret[0]); } } function wasm_bindgen_0000000000000005___convert__closures_____invoke___alloc_0000000000000009___string__String__core_0000000000000008___result__Result_____wasm_bindgen_0000000000000005___JsError___true_(arg0, arg1, arg2) { const ptr0 = passStringToWasm0(arg2, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); const len0 = WASM_VECTOR_LEN; const ret = wasm.wasm_bindgen_0000000000000005___convert__closures_____invoke___alloc_0000000000000009___string__String__core_0000000000000008___result__Result_____wasm_bindgen_0000000000000005___JsError___true_(arg0, arg1, ptr0, len0); if (ret[1]) { throw takeFromExternrefTable0(ret[0]); } } 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_24_generic_import_rs stdout ---- thread 'reference::runtest::test_24_generic_import_rs' (849147) panicked at crates/cli/tests/wasm-bindgen/reference.rs:139:13: assertion failed: `(left == right)` Diff < left / right > : /** * @param {any} widget * @param {any} lifetime_holder * @returns {Promise} */ export function run(widget, lifetime_holder) { const ret = wasm.run(widget, lifetime_holder); return ret; } export function __wbg___wbindgen_debug_string_309e693289c1af1f(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_d3b7c7e93dbab525(arg0) { const ret = typeof(arg0) === 'function'; return ret; } export function __wbg___wbindgen_is_undefined_2bf58b2ef57e76b5(arg0) { const ret = arg0 === undefined; return ret; } export function __wbg___wbindgen_throw_1c829eb3b94d5955(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); } export function __wbg__wbg_cb_unref_9f26c718880a0f0f(arg0) { arg0._wbg_cb_unref(); } export function __wbg_blockNotGeneric_30cbf46e7a0678c1(arg0) { blockNotGeneric(arg0 >>> 0); } export function __wbg_call_377f7c1ea23294ff() { return handleError(function (arg0, arg1, arg2) { const ret = arg0.call(arg1, arg2); return ret; }, arguments); } export function __wbg_new_typed_dc70da51eb0a74dd(arg0, arg1) { try { var state0 = {a: arg0, b: arg1}; var cb0 = (arg0, arg1) => { const a = state0.a; state0.a = 0; try { return wasm_bindgen_000000000000004b___convert__closures_____invoke___js_sys_000000000000004c___Function_fn_wasm_bindgen_000000000000004b___JsValue_____wasm_bindgen_000000000000004b___sys__Undefined___js_sys_000000000000004c___Function_fn_wasm_bindgen_000000000000004b___JsValue_____wasm_bindgen_000000000000004b___sys__Undefined_______true_(a, state0.b, arg0, arg1); } finally { state0.a = a; } }; const ret = new Promise(cb0); return ret; } finally { state0.a = 0; } } export function __wbg_queueMicrotask_5ee6eeac30187c5a(arg0) { const ret = arg0.queueMicrotask; return ret; } export function __wbg_queueMicrotask_bfdd12404c86c1f1(arg0) { queueMicrotask(arg0); } export function __wbg_resolve_75f91a406e4c7acc(arg0) { const ret = Promise.resolve(arg0); return ret; } export function __wbg_run_61515237262b73e7(arg0, arg1, arg2) { try { var state0 = {a: arg1, b: arg2}; var cb0 = () => { const a = state0.a; state0.a = 0; try { return wasm_bindgen_000000000000004b___convert__closures_____invoke___bool__true_(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_97feb4760b008bb3() { const ret = typeof console === 'undefined' ? null : console?.createTask; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_GLOBAL_THIS_a75424ae9326a686() { > const ret = typeof globalThis === 'undefined' ? null : globalThis; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_GLOBAL_bf6a42a8e3526e71() { > const ret = typeof global === 'undefined' ? null : global; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_SELF_bc906dcc225f4e8b() { const ret = typeof self === 'undefined' ? null : self; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_WINDOW_399df0f891175ff8() { const ret = typeof window === 'undefined' ? null : window; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_takeScalars_07e9782968b28528(arg0, arg1, arg2, arg3, arg4, arg5, arg6) { takeScalars(arg0 >>> 0, arg1, arg2 !== 0, String.fromCodePoint(arg3), arg4, arg5, arg6); } export function __wbg_takeWideScalars_1f254315f44d9363(arg0, arg1, arg2, arg3, arg4) { takeWideScalars((BigInt.asUintN(64, arg0) | (arg1 << BigInt(64))), (BigInt.asUintN(64, arg2) | (BigInt.asUintN(64, arg3) << BigInt(64))), arg4); } export function __wbg_then_17f311ca2ea4fd80(arg0, arg1, arg2) { const ret = arg0.then(arg1, arg2); return ret; } export function __wbg_then_4544c2484ec8ea07(arg0, arg1) { const ret = arg0.then(arg1); return ret; } export function __wbindgen_generic_0000000000000000(arg0, arg1) { // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 79, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`. const ret = makeMutClosure(arg0, arg1, wasm_bindgen_000000000000004b___convert__closures_____invoke___wasm_bindgen_000000000000004b___JsValue__core_000000000000004d___result__Result_____wasm_bindgen_000000000000004b___JsError___true_); return ret; } export function __wbindgen_generic_0000000000000001(arg0, arg1) { // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [String], shim_idx: 80, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`. const ret = makeMutClosure(arg0, arg1, wasm_bindgen_000000000000004b___convert__closures_____invoke___alloc_000000000000004e___string__String__core_000000000000004d___result__Result_____wasm_bindgen_000000000000004b___JsError___true_); return ret; } export function __wbindgen_generic_0000000000000002(arg0, arg1) { // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [U32], shim_idx: 81, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`. const ret = makeMutClosure(arg0, arg1, wasm_bindgen_000000000000004b___convert__closures_____invoke___u32__core_000000000000004d___result__Result_____wasm_bindgen_000000000000004b___JsError___true_); return ret; } export function __wbindgen_generic_0000000000000003(arg0, arg1) { // Cast intrinsic for `Ref(String) -> Externref`. const ret = getStringFromWasm0(arg0, arg1); return ret; } export function __wbindgen_generic_0000000000000004(arg0) { // generic import `asyncCount`: [U32] -> Externref const ret = asyncCount(arg0 >>> 0); return ret; } export function __wbindgen_generic_0000000000000005(arg0, arg1) { let deferred0_0; let deferred0_1; try { deferred0_0 = arg0; deferred0_1 = arg1; // generic import `asyncIdentity`: [String] -> Externref const ret = asyncIdentity(getStringFromWasm0(arg0, arg1)); return ret; } finally { wasm.__wbindgen_free(deferred0_0, deferred0_1, 1); } } export function __wbindgen_generic_0000000000000006(arg0) { // generic import `asyncIdentity`: [U32] -> Externref const ret = asyncIdentity(arg0 >>> 0); return ret; } export function __wbindgen_generic_0000000000000007() { return handleError(function (arg0) { // generic import `asyncTry`: [U32] -> Externref const ret = asyncTry(arg0 >>> 0); return ret; }, arguments); } export function __wbindgen_generic_0000000000000008(arg0, arg1) { // generic import `attach`: [Ref(Externref), Ref(Externref)] -> Unit arg0.attach(arg1); } export function __wbindgen_generic_0000000000000009(arg0) { // generic import `blockInheritedImplTrait`: [F64] -> Unit blockInheritedImplTrait(arg0); } export function __wbindgen_generic_000000000000000a(arg0) { // generic import `blockInheritedImplTrait`: [U32] -> Unit blockInheritedImplTrait(arg0 >>> 0); } export function __wbindgen_generic_000000000000000b(arg0, arg1) { // generic import `blockInheritedTwo`: [U32, F64] -> F64 const ret = blockInheritedTwo(arg0 >>> 0, arg1); return ret; } export function __wbindgen_generic_000000000000000c(arg0) { // generic import `blockInherited`: [F64] -> Unit blockInherited(arg0); } export function __wbindgen_generic_000000000000000d(arg0) { // generic import `blockInherited`: [U32] -> Unit blockInherited(arg0 >>> 0); } export function __wbindgen_generic_000000000000000e(arg0, arg1) { // generic import `combine`: [Ref(Externref), F64] -> Unit arg0.combine(arg1); } export function __wbindgen_generic_000000000000000f(arg0, arg1) { // generic import `combine`: [Ref(Externref), U32] -> Unit arg0.combine(arg1 >>> 0); } export function __wbindgen_generic_0000000000000010(arg0) { // generic import `a.b.deepLog`: [F64] -> Unit a.b.deepLog(arg0); } export function __wbindgen_generic_0000000000000011(arg0, arg1, arg2) { // generic import `delete_indexed`: [Ref(Externref), Ref(String)] -> Unit delete arg0[getStringFromWasm0(arg1, arg2)]; } export function __wbindgen_generic_0000000000000012(arg0, arg1, arg2) { // generic import `fillSlice`: [RefMut(Slice(U16)), U32] -> Unit fillSlice(getArrayU16FromWasm0(arg0, arg1), arg2 >>> 0); }  U32 < const ret = arg0[getStringFromWasm0(arg1, arg2)]; < return ret; <} export function __wbindgen_generic_0000000000000013(arg0, arg1) { // generic import `get`: [Ref(Externref)] -> String const ret = arg1.get(); 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_generic_0000000000000014(arg0) { // generic import `get`: [Ref(Externref)] -> U32 const ret = arg0.get(); > return ret; >} >export function __wbindgen_generic_0000000000000015(arg0, arg1, arg2) { > // generic import `get`: [Ref(Externref), Ref(String)] -> U32 > const ret = arg0[getStringFromWasm0(arg1, arg2)]; return ret; } export function __wbindgen_generic_0000000000000016(arg0, arg1) { // generic import `get`: [Ref(Externref)] -> String const ret = arg1.get(); 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_generic_0000000000000017(arg0) { // generic import `get`: [Ref(Externref)] -> U32 const ret = arg0.get(); return ret; } export function __wbindgen_generic_0000000000000018(arg0) { // generic import `identity`: [F64] -> F64 const ret = identity(arg0); return ret; } export function __wbindgen_generic_0000000000000019(arg0) { // generic import `identity`: [U32] -> U32 const ret = identity(arg0 >>> 0); return ret; } export function __wbindgen_generic_000000000000001a(arg0) { // generic import `kind`: [Ref(Externref)] -> U32 const ret = GetOwnOrInheritedPropertyDescriptor(Widget.prototype, 'kind').get.call(arg0); return ret; } export function __wbindgen_generic_000000000000001b(arg0, arg1, arg2) { var v0 = Array.from(getArrayU16FromWasm0(arg0, arg1)); // generic import `logBlockSlice`: [Ref(Vector(U16)), U32] -> Unit logBlockSlice(v0, arg2 >>> 0); } export function __wbindgen_generic_000000000000001c(arg0, arg1) { // generic import `logGenericSlice`: [Ref(Slice(F64))] -> Unit logGenericSlice(getArrayF64FromWasm0(arg0, arg1)); } export function __wbindgen_generic_000000000000001d(arg0, arg1) { // generic import `logGenericSlice`: [Ref(Slice(U32))] -> Unit logGenericSlice(getArrayU32FromWasm0(arg0, arg1)); } export function __wbindgen_generic_000000000000001e(arg0) { // generic import `logImplTrait`: [F64] -> Unit logImplTrait(arg0); } export function __wbindgen_generic_000000000000001f(arg0) { // generic import `logImplTrait`: [U32] -> Unit logImplTrait(arg0 >>> 0); } export function __wbindgen_generic_0000000000000020(arg0, arg1) { var v0 = getArrayF64FromWasm0(arg0, arg1).slice(); wasm.__wbindgen_free(arg0, arg1 * 8, 8); // generic import `logNestedImplTrait`: [Vector(F64)] -> Unit logNestedImplTrait(v0); } export function __wbindgen_generic_0000000000000021(arg0, arg1) { var v0 = getArrayU32FromWasm0(arg0, arg1).slice(); wasm.__wbindgen_free(arg0, arg1 * 4, 4); // generic import `logNestedImplTrait`: [Vector(U32)] -> Unit logNestedImplTrait(v0); } export function __wbindgen_generic_0000000000000022(arg0, arg1, arg2) { let v0; if (arg0 !== 0) { v0 = Array.from(getArrayU16FromWasm0(arg0, arg1)); } // generic import `logOptSlice`: [Option(Ref(Vector(U16))), U32] -> Unit logOptSlice(v0, arg2 >>> 0); } export function __wbindgen_generic_0000000000000023(arg0, arg1, arg2) { let v0; if (arg0 !== 0) { v0 = getArrayJsValueFromWasm0(arg0, arg1); wasm.__wbindgen_free(arg0, arg1 * 4, 4); } // generic import `logOptStrSlice`: [Option(Ref(Vector(NamedExternref("string")))), U32] -> Unit logOptStrSlice(v0, arg2 >>> 0); } export function __wbindgen_generic_0000000000000024(arg0) { // generic import `logRef`: [Ref(Externref)] -> Unit logRef(arg0); } export function __wbindgen_generic_0000000000000025(arg0, arg1, arg2) { var v0 = Array.from(getArrayU16FromWasm0(arg0, arg1)); // generic import `logSlice`: [Ref(Vector(U16)), F64] -> Unit logSlice(v0, arg2); } export function __wbindgen_generic_0000000000000026(arg0, arg1, arg2) { var v0 = Array.from(getArrayU16FromWasm0(arg0, arg1)); // generic import `logSlice`: [Ref(Vector(U16)), U32] -> Unit logSlice(v0, arg2 >>> 0); } export function __wbindgen_generic_0000000000000027(arg0, arg1, arg2) { var v0 = getArrayJsValueFromWasm0(arg0, arg1); wasm.__wbindgen_free(arg0, arg1 * 4, 4); // generic import `logStrSlice`: [Ref(Vector(NamedExternref("string"))), U32] -> Unit logStrSlice(v0, arg2 >>> 0); } export function __wbindgen_generic_0000000000000028(arg0) { // generic import `log`: [F64] -> Unit log(arg0); } export function __wbindgen_generic_0000000000000029(arg0, arg1) { // generic import `log`: [Ref(String)] -> Unit log(getStringFromWasm0(arg0, arg1)); } export function __wbindgen_generic_000000000000002a(arg0, arg1) { let deferred0_0; let deferred0_1; try { deferred0_0 = arg0; deferred0_1 = arg1; // generic import `log`: [String] -> Unit log(getStringFromWasm0(arg0, arg1)); } finally { wasm.__wbindgen_free(deferred0_0, deferred0_1, 1); } } export function __wbindgen_generic_000000000000002b(arg0) { // generic import `log`: [U32] -> Unit log(arg0 >>> 0); } export function __wbindgen_generic_000000000000002c(arg0) { // generic import `console.log`: [U32] -> Unit console.log(arg0 >>> 0); } export function __wbindgen_generic_000000000000002d(arg0, arg1) { // generic import `mixImplTrait`: [F64, U32] -> Unit mixImplTrait(arg0, arg1 >>> 0); } export function __wbindgen_generic_000000000000002e(arg0, arg1) { // generic import `mixImplTrait`: [U32, U32] -> Unit mixImplTrait(arg0 >>> 0, arg1 >>> 0); } export function __wbindgen_generic_000000000000002f(arg0, arg1) { // generic import `mix`: [U32, F64] -> Unit mix(arg0 >>> 0, arg1); } export function __wbindgen_generic_0000000000000030(arg0, arg1) { // generic import `mix`: [U32, U32] -> Unit mix(arg0 >>> 0, arg1 >>> 0); } export function __wbindgen_generic_0000000000000031(arg0) { // generic import `new`: [F64] -> Externref const ret = new Widget(arg0); return ret; } export function __wbindgen_generic_0000000000000032(arg0) { // generic import `new`: [U32] -> Externref const ret = new Widget(arg0 >>> 0); return ret; } export function __wbindgen_generic_0000000000000033(arg0, arg1) { let deferred0_0; let deferred0_1; try { deferred0_0 = arg0; deferred0_1 = arg1; // generic import `new_holder`: [String] -> Externref const ret = new Holder(getStringFromWasm0(arg0, arg1)); return ret; } finally { wasm.__wbindgen_free(deferred0_0, deferred0_1, 1); } } export function __wbindgen_generic_0000000000000034(arg0) { // generic import `new_holder`: [U32] -> Externref const ret = new Holder(arg0 >>> 0); return ret; } export function __wbindgen_generic_0000000000000035(arg0, arg1) { let deferred0_0; let deferred0_1; try { deferred0_0 = arg0; deferred0_1 = arg1; // generic import `of`: [String] -> Externref const ret = Holder.of(getStringFromWasm0(arg0, arg1)); return ret; } finally { wasm.__wbindgen_free(deferred0_0, deferred0_1, 1); } } export function __wbindgen_generic_0000000000000036(arg0) { // generic import `of`: [U32] -> Externref const ret = Holder.of(arg0 >>> 0); return ret; } export function __wbindgen_generic_0000000000000037(arg0) { // generic import `of`: [F64] -> Externref const ret = Widget.of(arg0); return ret; } export function __wbindgen_generic_0000000000000038(arg0) { // generic import `of`: [U32] -> Externref const ret = Widget.of(arg0 >>> 0); return ret; } export function __wbindgen_generic_0000000000000039(arg0, arg1) { // generic import `pair`: [U32, F64] -> Unit pair(arg0 >>> 0, arg1); } export function __wbindgen_generic_000000000000003a(arg0, arg1) { // generic import `setImplTrait`: [Ref(Externref), F64] -> Unit arg0.setImplTrait(arg1); } export function __wbindgen_generic_000000000000003b(arg0, arg1) { // generic import `setImplTrait`: [Ref(Externref), U32] -> Unit arg0.setImplTrait(arg1 >>> 0); } export function __wbindgen_generic_000000000000003c(arg0, arg1) { // generic import `set`: [Ref(Externref), F64] -> Unit arg0.set(arg1); } export function __wbindgen_generic_000000000000003d(arg0, arg1) { // generic import `set`: [Ref(Externref), U32] -> Unit arg0.set(arg1 >>> 0); } export function __wbindgen_generic_000000000000003e(arg0, arg1, arg2, arg3) { // generic import `set_indexed`: [Ref(Externref), Ref(String), U32] -> Unit arg0[getStringFromWasm0(arg1, arg2)] = arg3 >>> 0; } export function __wbindgen_generic_000000000000003f(arg0, arg1) { // generic import `set_tag`: [Ref(Externref), F64] -> Unit arg0.tag = arg1; } export function __wbindgen_generic_0000000000000040(arg0, arg1) { // generic import `set_value`: [Ref(Externref), U32] -> Unit arg0.value = arg1 >>> 0; } export function __wbindgen_generic_0000000000000041(arg0, arg1, arg2) { // generic import `spreadGeneric`: [U32, Ref(Slice(U32))] -> Unit spreadGeneric(arg0 >>> 0, ...(getArrayU32FromWasm0(arg1, arg2))); } export function __wbindgen_generic_0000000000000042(arg0, arg1) { var v0 = getArrayU32FromWasm0(arg0, arg1).slice(); wasm.__wbindgen_free(arg0, arg1 * 4, 4); // generic import `sumItems`: [Vector(U32)] -> F64 const ret = sumItems(v0); return ret; } export function __wbindgen_generic_0000000000000043(arg0) { // generic import `tag`: [Ref(Externref)] -> U32 const ret = arg0.tag; return ret; } export function __wbindgen_generic_0000000000000044() { return handleError(function (arg0) { // generic import `tryGet`: [U32] -> F64 const ret = tryGet(arg0 >>> 0); return ret; }, arguments); } export function __wbindgen_generic_0000000000000045() { return handleError(function (arg0) { // generic import `tryGet`: [U32] -> U32 const ret = tryGet(arg0 >>> 0); return ret; }, arguments); } export function __wbindgen_generic_0000000000000046() { return handleError(function (arg0) { // generic import `tryLog`: [U32] -> Unit tryLog(arg0 >>> 0); }, arguments); } export function __wbindgen_generic_0000000000000047(arg0) { // generic import `value`: [Ref(Externref)] -> F64 const ret = arg0.value; return ret; } export function __wbindgen_generic_0000000000000048(arg0) { // generic import `value`: [Ref(Externref)] -> U32 const ret = arg0.value; return ret; } export function __wbindgen_generic_0000000000000049(arg0, arg1, arg2) { var v0 = getArrayU32FromWasm0(arg1, arg2).slice(); wasm.__wbindgen_free(arg1, arg2 * 4, 4); // generic import `variadicLog`: [U32, Vector(U32)] -> Unit variadicLog(arg0 >>> 0, ...(v0)); } export function __wbindgen_generic_000000000000004a(arg0, arg1, arg2) { try { var state0 = {a: arg0, b: arg1}; var cb0 = (arg0) => { const a = state0.a; state0.a = 0; try { return wasm_bindgen_000000000000004b___convert__closures_____invoke___u32______true_(a, state0.b, arg0); } finally { state0.a = a; } }; // generic import `withCallback`: [RefMut(Function(Function { arguments: [U32], shim_idx: 82, ret: Unit, inner_ret: Some(Unit) })), U32] -> Unit withCallback(cb0, arg2 >>> 0); } finally { state0.a = 0; } } 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_000000000000004b___convert__closures_____invoke___bool__true_(arg0, arg1) { const ret = wasm.wasm_bindgen_000000000000004b___convert__closures_____invoke___bool__true_(arg0, arg1); return ret !== 0; } function wasm_bindgen_000000000000004b___convert__closures_____invoke___wasm_bindgen_000000000000004b___JsValue__core_000000000000004d___result__Result_____wasm_bindgen_000000000000004b___JsError___true_(arg0, arg1, arg2) { const ret = wasm.wasm_bindgen_000000000000004b___convert__closures_____invoke___wasm_bindgen_000000000000004b___JsValue__core_000000000000004d___result__Result_____wasm_bindgen_000000000000004b___JsError___true_(arg0, arg1, arg2); if (ret[1]) { throw takeFromExternrefTable0(ret[0]); } } function wasm_bindgen_000000000000004b___convert__closures_____invoke___js_sys_000000000000004c___Function_fn_wasm_bindgen_000000000000004b___JsValue_____wasm_bindgen_000000000000004b___sys__Undefined___js_sys_000000000000004c___Function_fn_wasm_bindgen_000000000000004b___JsValue_____wasm_bindgen_000000000000004b___sys__Undefined_______true_(arg0, arg1, arg2, arg3) { wasm.wasm_bindgen_000000000000004b___convert__closures_____invoke___js_sys_000000000000004c___Function_fn_wasm_bindgen_000000000000004b___JsValue_____wasm_bindgen_000000000000004b___sys__Undefined___js_sys_000000000000004c___Function_fn_wasm_bindgen_000000000000004b___JsValue_____wasm_bindgen_000000000000004b___sys__Undefined_______true_(arg0, arg1, arg2, arg3); } function wasm_bindgen_000000000000004b___convert__closures_____invoke___u32______true_(arg0, arg1, arg2) { wasm.wasm_bindgen_000000000000004b___convert__closures_____invoke___u32______true_(arg0, arg1, arg2); } function wasm_bindgen_000000000000004b___convert__closures_____invoke___u32__core_000000000000004d___result__Result_____wasm_bindgen_000000000000004b___JsError___true_(arg0, arg1, arg2) { const ret = wasm.wasm_bindgen_000000000000004b___convert__closures_____invoke___u32__core_000000000000004d___result__Result_____wasm_bindgen_000000000000004b___JsError___true_(arg0, arg1, arg2); if (ret[1]) { throw takeFromExternrefTable0(ret[0]); } } function wasm_bindgen_000000000000004b___convert__closures_____invoke___alloc_000000000000004e___string__String__core_000000000000004d___result__Result_____wasm_bindgen_000000000000004b___JsError___true_(arg0, arg1, arg2) { const ptr0 = passStringToWasm0(arg2, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); const len0 = WASM_VECTOR_LEN; const ret = wasm.wasm_bindgen_000000000000004b___convert__closures_____invoke___alloc_000000000000004e___string__String__core_000000000000004d___result__Result_____wasm_bindgen_000000000000004b___JsError___true_(arg0, arg1, ptr0, len0); if (ret[1]) { throw takeFromExternrefTable0(ret[0]); } } 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 getArrayF64FromWasm0(ptr, len) { ptr = ptr >>> 0; return getFloat64ArrayMemory0().subarray(ptr / 8, ptr / 8 + 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); } 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 cachedFloat64ArrayMemory0 = null; function getFloat64ArrayMemory0() { if (cachedFloat64ArrayMemory0 === null || cachedFloat64ArrayMemory0.byteLength === 0) { cachedFloat64ArrayMemory0 = new Float64Array(wasm.memory.buffer); } return cachedFloat64ArrayMemory0; } 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 GetOwnOrInheritedPropertyDescriptor(obj, id) { while (obj) { let desc = Object.getOwnPropertyDescriptor(obj, id); if (desc) return desc; obj = Object.getPrototypeOf(obj); } return {}; } 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_57_typed_array_buffers_rs stdout ---- thread 'reference::runtest::test_57_typed_array_buffers_rs' (854217) panicked at crates/cli/tests/wasm-bindgen/reference.rs:139:13: assertion failed: `(left == right)` Diff < left / right > : /** * @returns {Promise>} */ export function async_bytes() { const ret = wasm.async_bytes(); return ret; } /** * @returns {Uint8Array | undefined} */ export function optional_bytes() { const ret = wasm.optional_bytes(); let v1; if (ret[0] !== 0) { v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice(); wasm.__wbindgen_free(ret[0], ret[1] * 1, 1); } return v1; } /** * @returns {Uint8Array} */ export function owned_bytes() { const ret = wasm.owned_bytes(); var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice(); wasm.__wbindgen_free(ret[0], ret[1] * 1, 1); return v1; } /** * @returns {Float32Array} */ export function owned_floats() { const ret = wasm.owned_floats(); var v1 = getArrayF32FromWasm0(ret[0], ret[1]).slice(); wasm.__wbindgen_free(ret[0], ret[1] * 4, 4); return v1; } /** * @param {Uint8Array} borrowed * @param {Uint8Array} owned * @returns {Uint8Array} */ export function roundtrip(borrowed, owned) { const ptr0 = passArray8ToWasm0(borrowed, wasm.__wbindgen_malloc); const len0 = WASM_VECTOR_LEN; const ptr1 = passArray8ToWasm0(owned, wasm.__wbindgen_malloc); const len1 = WASM_VECTOR_LEN; const ret = wasm.roundtrip(ptr0, len0, ptr1, len1); var v3 = getArrayU8FromWasm0(ret[0], ret[1]).slice(); wasm.__wbindgen_free(ret[0], ret[1] * 1, 1); return v3; } /** * @param {string[]} input * @returns {string[]} */ export function strings(input) { const ptr0 = passArrayJsValueToWasm0(input, wasm.__wbindgen_malloc); const len0 = WASM_VECTOR_LEN; const ret = wasm.strings(ptr0, len0); var v2 = getArrayJsValueFromWasm0(ret[0], ret[1]); wasm.__wbindgen_free(ret[0], ret[1] * 4, 4); return v2; } export function __wbg___wbindgen_debug_string_309e693289c1af1f(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_d3b7c7e93dbab525(arg0) { const ret = typeof(arg0) === 'function'; return ret; } export function __wbg___wbindgen_is_undefined_2bf58b2ef57e76b5(arg0) { const ret = arg0 === undefined; return ret; } export function __wbg___wbindgen_string_get_6c035dcb6a80d204(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_1c829eb3b94d5955(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); } export function __wbg__wbg_cb_unref_9f26c718880a0f0f(arg0) { arg0._wbg_cb_unref(); } export function __wbg_call_377f7c1ea23294ff() { return handleError(function (arg0, arg1, arg2) { const ret = arg0.call(arg1, arg2); return ret; }, arguments); } export function __wbg_new_typed_dc70da51eb0a74dd(arg0, arg1) { try { var state0 = {a: arg0, b: arg1}; var cb0 = (arg0, arg1) => { const a = state0.a; state0.a = 0; try { return wasm_bindgen_0000000000000003___convert__closures_____invoke___js_sys_0000000000000004___Function_fn_wasm_bindgen_0000000000000003___JsValue_____wasm_bindgen_0000000000000003___sys__Undefined___js_sys_0000000000000004___Function_fn_wasm_bindgen_0000000000000003___JsValue_____wasm_bindgen_0000000000000003___sys__Undefined_______true_(a, state0.b, arg0, arg1); } finally { state0.a = a; } }; const ret = new Promise(cb0); return ret; } finally { state0.a = 0; } } export function __wbg_queueMicrotask_5ee6eeac30187c5a(arg0) { const ret = arg0.queueMicrotask; return ret; } export function __wbg_queueMicrotask_bfdd12404c86c1f1(arg0) { queueMicrotask(arg0); } export function __wbg_resolve_75f91a406e4c7acc(arg0) { const ret = Promise.resolve(arg0); return ret; } export function __wbg_run_61515237262b73e7(arg0, arg1, arg2) { try { var state0 = {a: arg1, b: arg2}; var cb0 = () => { const a = state0.a; state0.a = 0; try { return wasm_bindgen_0000000000000003___convert__closures_____invoke___bool__true_(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_97feb4760b008bb3() { const ret = typeof console === 'undefined' ? null : console?.createTask; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_GLOBAL_THIS_a75424ae9326a686() { > const ret = typeof globalThis === 'undefined' ? null : globalThis; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_GLOBAL_bf6a42a8e3526e71() { > const ret = typeof global === 'undefined' ? null : global; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_SELF_bc906dcc225f4e8b() { const ret = typeof self === 'undefined' ? null : self; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_WINDOW_399df0f891175ff8() { const ret = typeof window === 'undefined' ? null : window; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_then_4544c2484ec8ea07(arg0, arg1) { const ret = arg0.then(arg1); return ret; } export function __wbindgen_generic_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_0000000000000003___convert__closures_____invoke___wasm_bindgen_0000000000000003___JsValue__core_0000000000000005___result__Result_____wasm_bindgen_0000000000000003___JsError___true_); return ret; } export function __wbindgen_generic_0000000000000001(arg0, arg1) { // Cast intrinsic for `Ref(String) -> Externref`. const ret = getStringFromWasm0(arg0, arg1); return ret; } export function __wbindgen_generic_0000000000000002(arg0, arg1) { var v0 = getArrayU8FromWasm0(arg0, arg1).slice(); wasm.__wbindgen_free(arg0, arg1 * 1, 1); // Cast intrinsic for `Vector(U8) -> Externref`. const ret = v0; 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_0000000000000003___convert__closures_____invoke___bool__true_(arg0, arg1) { const ret = wasm.wasm_bindgen_0000000000000003___convert__closures_____invoke___bool__true_(arg0, arg1); return ret !== 0; } function wasm_bindgen_0000000000000003___convert__closures_____invoke___wasm_bindgen_0000000000000003___JsValue__core_0000000000000005___result__Result_____wasm_bindgen_0000000000000003___JsError___true_(arg0, arg1, arg2) { const ret = wasm.wasm_bindgen_0000000000000003___convert__closures_____invoke___wasm_bindgen_0000000000000003___JsValue__core_0000000000000005___result__Result_____wasm_bindgen_0000000000000003___JsError___true_(arg0, arg1, arg2); if (ret[1]) { throw takeFromExternrefTable0(ret[0]); } } function wasm_bindgen_0000000000000003___convert__closures_____invoke___js_sys_0000000000000004___Function_fn_wasm_bindgen_0000000000000003___JsValue_____wasm_bindgen_0000000000000003___sys__Undefined___js_sys_0000000000000004___Function_fn_wasm_bindgen_0000000000000003___JsValue_____wasm_bindgen_0000000000000003___sys__Undefined_______true_(arg0, arg1, arg2, arg3) { wasm.wasm_bindgen_0000000000000003___convert__closures_____invoke___js_sys_0000000000000004___Function_fn_wasm_bindgen_0000000000000003___JsValue_____wasm_bindgen_0000000000000003___sys__Undefined___js_sys_0000000000000004___Function_fn_wasm_bindgen_0000000000000003___JsValue_____wasm_bindgen_0000000000000003___sys__Undefined_______true_(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; } function getArrayF32FromWasm0(ptr, len) { ptr = ptr >>> 0; return getFloat32ArrayMemory0().subarray(ptr / 4, ptr / 4 + 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 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; } let cachedFloat32ArrayMemory0 = null; function getFloat32ArrayMemory0() { if (cachedFloat32ArrayMemory0 === null || cachedFloat32ArrayMemory0.byteLength === 0) { cachedFloat32ArrayMemory0 = new Float32Array(wasm.memory.buffer); } return cachedFloat32ArrayMemory0; } 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 wasm; export function __wbg_set_wasm(val) { wasm = val; } ---- reference::runtest::test_59_wasm_export_colon_rs stdout ---- thread 'reference::runtest::test_59_wasm_export_colon_rs' (854219) panicked at crates/cli/tests/wasm-bindgen/reference.rs:139: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_f0ddeac7fb112662: function(arg0) { > __wbg_Deno_5d6779d487f5fa85: function(arg0) { const ret = arg0.Deno; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); }, < __wbg_String_131361c85fedafe7: function(arg0, arg1) { > __wbg_String_32b5fde6e6f9b4f5: 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_cd8d4b84ecba52b8: function() { return handleError(function (arg0, arg1) { > __wbg___wbg_test_invoke_e577add093e5db98: 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_0000000000000003___convert__closures_____invoke_______true_(a, state0.b, ); } finally { state0.a = a; } }; __wbg_test_invoke(cb0); } finally { state0.a = 0; } }, arguments); }, < __wbg___wbg_test_output_writeln_a37106971edabdc4: function(arg0) { > __wbg___wbg_test_output_writeln_f1aa2b7c8070f430: function(arg0) { __wbg_test_output_writeln(arg0); }, < __wbg___wbgtest_og_console_log_21c78ba57e3eb666: function(arg0, arg1) { > __wbg___wbgtest_og_console_log_4dd070341c5b99f0: function(arg0, arg1) { __wbgtest_og_console_log(getStringFromWasm0(arg0, arg1)); }, < __wbg___wbindgen_debug_string_0e68cf47c9cbd9b0: function(arg0, arg1) { > __wbg___wbindgen_debug_string_309e693289c1af1f: 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_fcda5e3902d732fe: function(arg0) { > __wbg___wbindgen_is_function_d3b7c7e93dbab525: function(arg0) { const ret = typeof(arg0) === 'function'; return ret; }, < __wbg___wbindgen_is_undefined_8c687d0b90d5b524: function(arg0) { > __wbg___wbindgen_is_undefined_2bf58b2ef57e76b5: function(arg0) { const ret = arg0 === undefined; return ret; }, < __wbg___wbindgen_string_get_92ab86bb19cbc12f: function(arg0, arg1) { > __wbg___wbindgen_string_get_6c035dcb6a80d204: 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_5d9e815e6fdf150f: function(arg0, arg1) { > __wbg___wbindgen_throw_1c829eb3b94d5955: function(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); }, < __wbg__wbg_cb_unref_997e73d32238e655: function(arg0) { > __wbg__wbg_cb_unref_9f26c718880a0f0f: function(arg0) { arg0._wbg_cb_unref(); }, < __wbg_call_6bcf8d3e20937e46: function() { return handleError(function (arg0, arg1, arg2) { > __wbg_call_377f7c1ea23294ff: function() { return handleError(function (arg0, arg1, arg2) { const ret = arg0.call(arg1, arg2); return ret; }, arguments); }, < __wbg_constructor_cfa8add39988893a: function(arg0) { > __wbg_constructor_7476d0143cd4321b: function(arg0) { const ret = arg0.constructor; return ret; }, < __wbg_error_75bb5311085b3ba0: function(arg0, arg1) { > __wbg_error_8665de2e62e1f7d5: function(arg0, arg1) { console.error(getStringFromWasm0(arg0, arg1)); }, < __wbg_forEach_a94541f60e671002: function(arg0, arg1, arg2) { > __wbg_forEach_dbd1aec42ad341eb: 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_0000000000000003___convert__closures_____invoke___wasm_bindgen_0000000000000003___JsValue__u32__js_sys_0000000000000004___Array______true_(a, state0.b, arg0, arg1, arg2); } finally { state0.a = a; } }; arg0.forEach(cb0); } finally { state0.a = 0; } }, < __wbg_getElementById_2f733d0ec8ccae62: function(arg0, arg1, arg2) { > __wbg_getElementById_6ae557c90ff5a818: function(arg0, arg1, arg2) { const ret = arg0.getElementById(getStringFromWasm0(arg1, arg2)); return ret; }, < __wbg_log_7f120d11e07874ed: function(arg0, arg1) { > __wbg_log_1d8af77720c9eeb8: function(arg0, arg1) { console.log(getStringFromWasm0(arg0, arg1)); }, < __wbg_message_1cbc5bc03dcf1dee: function(arg0) { > __wbg_message_6c5c475942921f78: function(arg0) { const ret = arg0.message; return ret; }, < __wbg_name_a8f8a2e4fb5fb187: function(arg0, arg1) { > __wbg_name_158cef7d4ce9d105: function(arg0) { > const ret = arg0.name; > return ret; > }, > __wbg_name_6aacf02537bbe34f: 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_name_b9d8f2ea16b22045: function(arg0) { < const ret = arg0.name; < return ret; < }, < __wbg_new_af0ec6b7fe765f33: function() { > __wbg_new_3b19b0eaaa97e850: function() { const ret = new Error(); return ret; }, < __wbg_new_typed_6f8b0d724fe26c07: function(arg0, arg1) { > __wbg_new_typed_dc70da51eb0a74dd: 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_0000000000000003___convert__closures_____invoke___js_sys_0000000000000004___Function_fn_wasm_bindgen_0000000000000003___JsValue_____wasm_bindgen_0000000000000003___sys__Undefined___js_sys_0000000000000004___Function_fn_wasm_bindgen_0000000000000003___JsValue_____wasm_bindgen_0000000000000003___sys__Undefined_______true_(a, state0.b, arg0, arg1); } finally { state0.a = a; } }; const ret = new Promise(cb0); return ret; } finally { state0.a = 0; } }, < __wbg_now_7f7e8c455034fd73: function(arg0) { > __wbg_now_595793ac85d9ecfb: function(arg0) { const ret = arg0.now(); return ret; }, < __wbg_performance_95dd2078bc11026f: function(arg0) { > __wbg_performance_1145306c1d7ec593: function(arg0) { const ret = arg0.performance; return ret; }, < __wbg_queueMicrotask_85c90f6987555d65: function(arg0) { > __wbg_queueMicrotask_5ee6eeac30187c5a: function(arg0) { const ret = arg0.queueMicrotask; return ret; }, < __wbg_queueMicrotask_f6a1fa10b81d1fc0: function(arg0) { > __wbg_queueMicrotask_bfdd12404c86c1f1: function(arg0) { queueMicrotask(arg0); }, < __wbg_resolve_35ec7e0c6af4c82c: function(arg0) { > __wbg_resolve_75f91a406e4c7acc: function(arg0) { const ret = Promise.resolve(arg0); return ret; }, < __wbg_run_f19543b086e90d43: function(arg0, arg1, arg2) { > __wbg_run_61515237262b73e7: function(arg0, arg1, arg2) { try { var state0 = {a: arg1, b: arg2}; var cb0 = () => { const a = state0.a; state0.a = 0; try { return wasm_bindgen_0000000000000003___convert__closures_____invoke___bool__true_(a, state0.b, ); } finally { state0.a = a; } }; const ret = arg0.run(cb0); return ret; } finally { state0.a = 0; } }, < __wbg_self_ea338e05cde5bccc: function(arg0) { > __wbg_self_4817d406167e0911: function(arg0) { const ret = arg0.self; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); }, < __wbg_set_text_content_fe61ba691200438a: function(arg0, arg1, arg2) { > __wbg_set_text_content_e39771896305d9b0: function(arg0, arg1, arg2) { arg0.textContent = getStringFromWasm0(arg1, arg2); }, < __wbg_stack_69c45304d50c9f83: function(arg0, arg1) { > __wbg_stack_23ec56e2e12c3e6a: 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_6eade66e766863c3: function(arg0) { > __wbg_stack_2c9cbca9dd5dac9e: function(arg0) { const ret = arg0.stack; return ret; }, < __wbg_stack_d71dcda4c404356b: function(arg0) { < const ret = arg0.stack; < return ret; < }, < __wbg_stack_e2458ea6023766b9: function(arg0, arg1) { > __wbg_stack_44b594c303f74570: 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_static_accessor_CREATE_TASK_04be768c473932c0: function() { > __wbg_stack_5c6e0b6071346b22: function(arg0) { > const ret = arg0.stack; > return ret; > }, > __wbg_static_accessor_CREATE_TASK_97feb4760b008bb3: function() { const ret = typeof console === 'undefined' ? null : console?.createTask; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); }, < __wbg_static_accessor_DOCUMENT_b21d454297410800: function() { > __wbg_static_accessor_DOCUMENT_a4088b1dbe681620: function() { const ret = document; return ret; }, < __wbg_static_accessor_GLOBAL_8eb4cd83130a11a0: function() { < const ret = typeof global === 'undefined' ? null : global; > __wbg_static_accessor_GLOBAL_THIS_a75424ae9326a686: function() { > const ret = typeof globalThis === 'undefined' ? null : globalThis; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); }, < __wbg_static_accessor_GLOBAL_THIS_1e7044f654e934db: function() { < const ret = typeof globalThis === 'undefined' ? null : globalThis; > __wbg_static_accessor_GLOBAL_bf6a42a8e3526e71: function() { > const ret = typeof global === 'undefined' ? null : global; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); }, < __wbg_static_accessor_SELF_d8b50611246a6d92: function() { > __wbg_static_accessor_SELF_bc906dcc225f4e8b: function() { const ret = typeof self === 'undefined' ? null : self; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); }, < __wbg_static_accessor_WINDOW_fd0bc376bf0f8b42: function() { > __wbg_static_accessor_WINDOW_399df0f891175ff8: function() { const ret = typeof window === 'undefined' ? null : window; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); }, < __wbg_text_content_7f2637c82a5f8a79: function(arg0, arg1) { > __wbg_text_content_48e47d212c7ddd97: 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_b830475380919203: function(arg0, arg1) { > __wbg_then_4544c2484ec8ea07: function(arg0, arg1) { const ret = arg0.then(arg1); return ret; }, < __wbg_toString_b263241c03891737: function() { return handleError(function (arg0, arg1) { > __wbg_toString_003797eeb1c0d433: 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_generic_0000000000000000: function(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_0000000000000003___convert__closures_____invoke___wasm_bindgen_0000000000000003___JsValue__core_0000000000000005___result__Result_____wasm_bindgen_0000000000000003___JsError___true_); return ret; }, __wbindgen_generic_0000000000000001: function(arg0) { // Cast intrinsic for `F64 -> Externref`. const ret = arg0; return ret; }, __wbindgen_generic_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_0000000000000003___convert__closures_____invoke_______true_(arg0, arg1) { wasm.wasm_bindgen_0000000000000003___convert__closures_____invoke_______true_(arg0, arg1); } function wasm_bindgen_0000000000000003___convert__closures_____invoke___bool__true_(arg0, arg1) { const ret = wasm.wasm_bindgen_0000000000000003___convert__closures_____invoke___bool__true_(arg0, arg1); return ret !== 0; } function wasm_bindgen_0000000000000003___convert__closures_____invoke___wasm_bindgen_0000000000000003___JsValue__core_0000000000000005___result__Result_____wasm_bindgen_0000000000000003___JsError___true_(arg0, arg1, arg2) { const ret = wasm.wasm_bindgen_0000000000000003___convert__closures_____invoke___wasm_bindgen_0000000000000003___JsValue__core_0000000000000005___result__Result_____wasm_bindgen_0000000000000003___JsError___true_(arg0, arg1, arg2); if (ret[1]) { throw takeFromExternrefTable0(ret[0]); } } function wasm_bindgen_0000000000000003___convert__closures_____invoke___js_sys_0000000000000004___Function_fn_wasm_bindgen_0000000000000003___JsValue_____wasm_bindgen_0000000000000003___sys__Undefined___js_sys_0000000000000004___Function_fn_wasm_bindgen_0000000000000003___JsValue_____wasm_bindgen_0000000000000003___sys__Undefined_______true_(arg0, arg1, arg2, arg3) { wasm.wasm_bindgen_0000000000000003___convert__closures_____invoke___js_sys_0000000000000004___Function_fn_wasm_bindgen_0000000000000003___JsValue_____wasm_bindgen_0000000000000003___sys__Undefined___js_sys_0000000000000004___Function_fn_wasm_bindgen_0000000000000003___JsValue_____wasm_bindgen_0000000000000003___sys__Undefined_______true_(arg0, arg1, arg2, arg3); } function wasm_bindgen_0000000000000003___convert__closures_____invoke___wasm_bindgen_0000000000000003___JsValue__u32__js_sys_0000000000000004___Array______true_(arg0, arg1, arg2, arg3, arg4) { wasm.wasm_bindgen_0000000000000003___convert__closures_____invoke___wasm_bindgen_0000000000000003___JsValue__u32__js_sys_0000000000000004___Array______true_(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 (!module.ok) { throw new Error(`failed to fetch Wasm: ${module.status} ${module.statusText} fetching '${module.url}'`); } if (typeof WebAssembly.instantiateStreaming === 'function') { try { return await WebAssembly.instantiateStreaming(module, imports); } catch (e) { const validResponse = 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 }; failures: jspi_panic_unwind reference::no_duplicate_wasm_export_in_node_esm_atomics_debug reference::runtest::test_03_anyref_import_catch_rs reference::runtest::test_05_async_import_rs reference::runtest::test_06_async_number_rs reference::runtest::test_07_async_void_rs reference::runtest::test_08_builder_rs reference::runtest::test_09_closures_rs reference::runtest::test_10_constructor_rs reference::runtest::test_12_default_class_rs reference::runtest::test_14_dynamic_union_rs reference::runtest::test_15_echo_rs reference::runtest::test_17_enum_vec_rs reference::runtest::test_18_enums_rs reference::runtest::test_19_exported_class_rename_collision_rs reference::runtest::test_20_exported_class_rename_wrap_rs reference::runtest::test_21_exported_class_wrap_matrix_rs reference::runtest::test_22_extends_rust_rs reference::runtest::test_23_function_attrs_rs reference::runtest::test_24_generic_import_rs reference::runtest::test_25_getter_setter_rs reference::runtest::test_26_import_catch_i64_rs reference::runtest::test_27_import_getter_setter_rs reference::runtest::test_28_import_rs reference::runtest::test_29_int128_rs reference::runtest::test_30_intrinsic_only_rs reference::runtest::test_31_js_namespace_export_same_name_rs reference::runtest::test_32_js_namespace_export_rs reference::runtest::test_33_js_namespace_shim_key_rs reference::runtest::test_34_jspi_intrinsics_rs reference::runtest::test_35_jspi_rs reference::runtest::test_36_keyword_rs reference::runtest::test_37_modules_rs reference::runtest::test_44_private_dedupe_rs reference::runtest::test_45_private_rs reference::runtest::test_46_raw_rs reference::runtest::test_47_reexport_rs reference::runtest::test_48_reserved_class_name_rs reference::runtest::test_49_result_rs reference::runtest::test_50_self_type_rs reference::runtest::test_52_slice_to_array_rs reference::runtest::test_53_static_rs reference::runtest::test_54_string_arg_rs reference::runtest::test_55_symbol_rs reference::runtest::test_56_targets_rs reference::runtest::test_57_typed_array_buffers_rs reference::runtest::test_58_typescript_type_rs reference::runtest::test_59_wasm_export_colon_rs reference::runtest::test_60_wasm_export_types_rs reference::runtest::test_61_web_sys_rs reference::runtest_panic_unwind reference::runtest_panic_unwind_legacy spawn_local_panic_frees_future termination_abort_handler_unwind_panic termination_reinit termination_reinit_auto_detect wasi_target_has_no_placeholder_imports_panic_unwind test result: FAILED. 66 passed; 57 failed; 0 ignored; 0 measured; 0 filtered out; finished in 136.74s 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.128/target/debug/deps/wasm_bindgen_test_runner-0426502125f571f2) running 41 tests test headless_streaming_tests::test_browser_no_carriage_return_in_output ... ok test headless_streaming_tests::test_user_spawned_url_module_worker_logs_browser ... ok test headless_streaming_tests::test_browser_output_not_garbled ... ok test headless_streaming_tests::test_user_spawned_dedicated_worker_logs_browser ... ok test headless_streaming_tests::test_worker_console_panic_headless ... ok test headless_streaming_tests::test_browser_console_no_panic_headless ... ok test headless_streaming_tests::test_service_worker_output_not_garbled ... ok test headless_streaming_tests::test_default_output_not_garbled ... ok test headless_streaming_tests::test_headless_worker_output_visible_with_no_stream ... ok test headless_streaming_tests::test_no_carriage_return_in_output ... ok test headless_streaming_tests::test_headless_worker_output_not_garbled ... ok test headless_streaming_tests::test_service_worker_console_no_panic_headless ... ok test headless_streaming_tests::test_shared_worker_console_panic_headless ... ok test headless_streaming_tests::test_default_console_no_panic_headless ... ok test headless_streaming_tests::test_default_no_carriage_return_in_output ... ok test headless_streaming_tests::test_user_spawned_shared_worker_logs_on_failure_browser ... ok test headless_streaming_tests::test_user_spawned_worker_add_event_listener_coexists_browser ... ok test headless_streaming_tests::test_user_spawned_worker_non_cloneable_log_does_not_crash_browser ... ok test headless_streaming_tests::test_user_spawned_shared_worker_non_cloneable_log_does_not_crash_browser ... ok test headless_streaming_tests::test_worker_console_panic_nocapture ... ok test headless_streaming_tests::test_user_spawned_worker_logs_on_failure_browser ... ok test headless_streaming_tests::test_service_worker_no_carriage_return_in_output ... ok test headless_streaming_tests::test_user_spawned_nested_worker_logs_browser ... ok test headless_streaming_tests::test_user_spawned_shared_worker_logs_browser ... ok test headless_streaming_tests::test_worker_console_no_panic_nocapture ... ok test headless_streaming_tests::test_user_spawned_data_url_shared_worker_does_not_inject_browser ... ok test headless_streaming_tests::test_user_spawned_module_worker_logs_browser ... ok test headless_streaming_tests::test_service_worker_console_panic_headless ... ok test headless_streaming_tests::test_shared_worker_console_no_panic_headless ... ok test headless_streaming_tests::test_worker_console_no_panic_headless ... ok test headless_streaming_tests::test_browser_console_panic_headless ... ok test headless_streaming_tests::test_shared_worker_output_not_garbled ... ok test headless_streaming_tests::test_user_spawned_url_worker_logs_browser ... ok test headless_streaming_tests::test_default_console_panic_headless ... ok test headless_streaming_tests::test_user_spawned_data_url_worker_does_not_inject_browser ... ok test headless_streaming_tests::test_shared_worker_no_carriage_return_in_output ... ok test headless_streaming_tests::test_user_spawned_shared_worker_top_level_logs_browser ... ok test test_wasm_bindgen_test_runner_list ... 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 headless_streaming_tests::test_user_spawned_worker_logs_on_failure_node ... ok test headless_streaming_tests::test_user_spawned_worker_logs_node_esm ... ok test headless_streaming_tests::test_user_spawned_worker_logs_node_cjs ... ok test result: ok. 41 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 111.50s 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-x86.so.1 so:libgcc_s.so.1 >>> wasm-bindgen*: Package size: 9.8 MB >>> wasm-bindgen*: Compressing data... >>> wasm-bindgen*: Create checksum... >>> wasm-bindgen*: Create wasm-bindgen-0.2.128-r0.apk >>> wasm-bindgen: Build complete at Sat, 12 Sep 2026 14:02:44 +0000 elapsed time 0h 8m 1s >>> wasm-bindgen: Cleaning up srcdir >>> wasm-bindgen: Cleaning up pkgdir >>> wasm-bindgen: Cleaning up tmpdir >>> wasm-bindgen: Uninstalling dependencies... ( 1/23) Purging .makedepends-wasm-bindgen (20260912.135444) ( 2/23) Purging nodejs (24.18.1-r2) ( 3/23) Purging ca-certificates (20260611-r0) Executing ca-certificates-20260611-r0.post-deinstall ( 4/23) Purging rust-wasm (1.97.0-r1) ( 5/23) Purging wasi-libc (27.20250626-r1) ( 6/23) Purging cargo-auditable (0.7.5-r0) ( 7/23) Purging ada-libs (3.3.0-r1) ( 8/23) Purging cargo (1.97.0-r1) ( 9/23) Purging rust (1.97.0-r1) (10/23) Purging icu-libs (78.1-r0) (11/23) Purging libssh2 (1.11.1-r3) (12/23) Purging lld23 (23.1.1-r1) (13/23) Purging lld23-libs (23.1.1-r1) (14/23) Purging llvm22-libs (22.1.8-r1) (15/23) Purging llvm23-libs (23.1.1-r0) (16/23) Purging scudo-malloc (23.1.1-r2) (17/23) Purging simdjson (4.6.11-r0) (18/23) Purging simdutf (9.1.0-r0) (19/23) Purging sqlite-libs (3.53.4-r0) (20/23) Purging icu-data-en (78.1-r0) (21/23) Purging libffi (3.8.0-r0) (22/23) Purging libxml2 (2.13.9-r2) (23/23) Purging xz-libs (5.8.4-r0) Executing busybox-1.38.0-r6.trigger OK: 427.0 MiB in 105 packages >>> wasm-bindgen: Updating the community/x86 repository index... >>> wasm-bindgen: Signing the index...