>>> wasm-bindgen: Building community/wasm-bindgen 0.2.118-r0 (using abuild 3.17.0_rc1-r2) started Sun, 19 Apr 2026 19:21:38 +0000 >>> wasm-bindgen: Validating /home/buildozer/aports/community/wasm-bindgen/APKBUILD... >>> wasm-bindgen: Analyzing dependencies... >>> wasm-bindgen: Installing for build: build-base cargo nodejs rust-wasm cargo-auditable ( 1/21) Installing libffi (3.5.2-r1) ( 2/21) Installing xz-libs (5.8.2-r0) ( 3/21) Installing libxml2 (2.13.9-r1) ( 4/21) Installing llvm22-libs (22.1.3-r0) ( 5/21) Installing scudo-malloc (22.1.3-r0) ( 6/21) Installing rust (1.94.1-r1) ( 7/21) Installing sqlite-libs (3.53.0-r0) ( 8/21) Installing cargo (1.94.1-r1) ( 9/21) Installing ca-certificates (20260413-r0) (10/21) Installing ada-libs (3.3.0-r0) (11/21) Installing icu-data-en (78.1-r0) Executing icu-data-en-78.1-r0.post-install * If you need ICU with non-English locales and legacy charset support, install * package icu-data-full. (12/21) Installing icu-libs (78.1-r0) (13/21) Installing simdjson (4.2.4-r0) (14/21) Installing simdutf (8.2.0-r0) (15/21) Installing nodejs (24.14.1-r0) (16/21) Installing lld22-libs (22.1.3-r0) (17/21) Installing lld22 (22.1.3-r0) (18/21) Installing wasi-libc (0.20250204-r1) (19/21) Installing rust-wasm (1.94.1-r1) (20/21) Installing cargo-auditable (0.7.4-r0) (21/21) Installing .makedepends-wasm-bindgen (20260419.192138) Executing busybox-1.37.0-r31.trigger Executing ca-certificates-20260413-r0.trigger OK: 1203.6 MiB in 126 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.118.tar.gz Connecting to distfiles.alpinelinux.org (172.105.82.32:443) wget: server returned error: HTTP/1.1 404 Not Found >>> wasm-bindgen: Fetching https://github.com/rustwasm/wasm-bindgen/archive/refs/tags/0.2.118/wasm-bindgen-0.2.118.tar.gz Connecting to github.com (20.26.156.215:443) Connecting to github.com (20.26.156.215:443) Connecting to codeload.github.com (20.26.156.216:443) saving to '/var/cache/distfiles/edge/wasm-bindgen-0.2.118.tar.gz.part' wasm-bindgen-0.2.118 1736k --:--:-- ETA wasm-bindgen-0.2.118 100% |********************************| 2316k 0:00:00 ETA '/var/cache/distfiles/edge/wasm-bindgen-0.2.118.tar.gz.part' saved /var/cache/distfiles/edge/wasm-bindgen-0.2.118.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.118.tar.gz /var/cache/distfiles/edge/wasm-bindgen-0.2.118.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.118.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 patching file crates/cli/tests/wasm-bindgen/main.rs Updating crates.io index Updating git repository `https://github.com/alexcrichton/raytracer` Downloading crates ... Downloaded futures-sink v0.3.32 Downloaded futures-core v0.3.32 Downloaded gg-alloc v1.0.0 Downloaded utf8_iter v1.0.4 Downloaded percent-encoding v2.3.2 Downloaded untrusted v0.9.0 Downloaded tower-layer v0.3.3 Downloaded http-body v1.0.1 Downloaded slab v0.4.12 Downloaded jobserver v0.1.34 Downloaded futures-macro v0.3.32 Downloaded subtle v2.6.1 Downloaded tower-service v0.3.3 Downloaded cc v1.2.60 Downloaded toml_datetime v0.6.11 Downloaded potential_utf v0.1.5 Downloaded try-lock v0.2.5 Downloaded dunce v1.0.5 Downloaded gloo-dialogs v0.2.0 Downloaded sync_wrapper v1.0.2 Downloaded gloo-storage v0.3.0 Downloaded gloo-worker-macros v0.1.0 Downloaded pin-project-internal v1.1.11 Downloaded itoa v1.0.18 Downloaded bitflags v0.7.0 Downloaded gloo-history v0.2.2 Downloaded num-rational v0.1.43 Downloaded num-integer v0.1.46 Downloaded byteorder v1.5.0 Downloaded gloo-console v0.3.0 Downloaded crossbeam-utils v0.8.21 Downloaded askama v0.15.6 Downloaded serde-wasm-bindgen v0.6.5 Downloaded env_logger v0.11.10 Downloaded http v0.2.12 Downloaded env_filter v1.0.1 Downloaded anstyle v1.0.14 Downloaded heck v0.5.0 Downloaded anstyle-query v1.1.5 Downloaded anstream v1.0.0 Downloaded leb128fmt v0.1.0 Downloaded wat v1.247.0 Downloaded gloo v0.11.0 Downloaded foldhash v0.2.0 Downloaded wasm-encoder v0.245.1 Downloaded proc-macro-crate v3.5.0 Downloaded adler2 v2.0.1 Downloaded openssl-macros v0.1.1 Downloaded toml_edit v0.25.11+spec-1.1.0 Downloaded native-tls v0.2.18 Downloaded alloc-no-stdlib v2.0.4 Downloaded httpdate v1.0.3 Downloaded der v0.8.0 Downloaded chunked_transfer v1.5.0 Downloaded ascii v1.1.0 Downloaded anyhow v1.0.102 Downloaded num_threads v0.1.7 Downloaded tempfile v3.27.0 Downloaded foreign-types-shared v0.1.1 Downloaded lzw v0.10.0 Downloaded sha1_smol v1.0.1 Downloaded rand_core v0.6.4 Downloaded tiny_http v0.12.0 Downloaded powerfmt v0.2.0 Downloaded time v0.3.47 Downloaded diff v0.1.13 Downloaded safe_arch v0.7.4 Downloaded approx v0.5.1 Downloaded rawpointer v0.2.1 Downloaded statrs v0.18.0 Downloaded simba v0.9.1 Downloaded wide v0.7.33 Downloaded num-rational v0.4.2 Downloaded flate2 v1.1.9 Downloaded rand_distr v0.4.3 Downloaded rand_chacha v0.3.1 Downloaded num-complex v0.4.6 Downloaded safemem v0.3.3 Downloaded num-conv v0.2.1 Downloaded jpeg-decoder v0.1.22 Downloaded bytes v1.11.1 Downloaded termtree v0.5.1 Downloaded wait-timeout v0.2.1 Downloaded yansi v1.0.1 Downloaded assert_cmd v2.2.1 Downloaded normalize-line-endings v0.3.0 Downloaded predicates v3.1.4 Downloaded mime_guess v2.0.5 Downloaded float-cmp v0.10.0 Downloaded serde v1.0.228 Downloaded matrixmultiply v0.3.10 Downloaded bstr v1.12.1 Downloaded pretty_assertions v1.4.1 Downloaded nalgebra v0.33.3 Downloaded base64 v0.13.1 Downloaded futures-task v0.3.32 Downloaded filetime v0.2.27 Downloaded linux-raw-sys v0.12.1 Downloaded bytemuck v1.25.0 Downloaded foreign-types v0.3.2 Downloaded num-bigint v0.4.6 Downloaded leb128 v0.2.5 Downloaded fs_extra v1.3.0 Downloaded base64 v0.22.1 Downloaded clap_lex v1.1.0 Downloaded tinyvec_macros v0.1.1 Downloaded gloo-net v0.5.0 Downloaded enum_primitive v0.1.1 Downloaded target-triple v1.0.0 Downloaded predicates-tree v1.0.13 Downloaded colorchoice v1.0.5 Downloaded aws-lc-sys v0.40.0 Downloaded twoway v0.1.8 Downloaded base64ct v1.8.3 Downloaded tower-http v0.6.8 Downloaded version_check v0.9.5 Downloaded form_urlencoded v1.2.2 Downloaded openssl-src v300.6.0+3.6.2 Downloaded paste v1.0.15 Downloaded fallible-iterator v0.3.0 Downloaded tokio-rustls v0.26.4 Downloaded cmake v0.1.58 Downloaded difflib v0.4.0 Downloaded rstest_macros v0.26.1 Downloaded indexmap v2.14.0 Downloaded png v0.6.2 Downloaded regex-syntax v0.8.10 Downloaded gloo-worker v0.5.0 Downloaded wasmparser v0.243.0 Downloaded winnow v1.0.1 Downloaded gimli v0.32.3 Downloaded wasmparser v0.247.0 Downloaded predicates-core v1.0.10 Downloaded idna v1.1.0 Downloaded tracing v0.1.44 Downloaded rustls v0.23.38 Downloaded tower v0.5.3 Downloaded icu_normalizer_data v2.2.0 Downloaded icu_collections v2.2.0 Downloaded libc v0.2.185 Downloaded rouille v3.6.2 Downloaded lru-slab v0.1.2 Downloaded tokio v1.52.1 Downloaded num-traits v0.1.43 Downloaded shlex v1.3.0 Downloaded console_error_panic_hook v0.1.7 Downloaded zerotrie v0.2.4 Downloaded url v2.5.8 Downloaded rustls-webpki v0.103.12 Downloaded icu_normalizer v2.2.0 Downloaded icu_locale_core v2.2.0 Downloaded ring v0.17.14 Downloaded bumpalo v3.20.2 Downloaded webpki-root-certs v1.0.7 Downloaded rustls-native-certs v0.8.3 Downloaded icu_properties v2.2.0 Downloaded memchr v2.8.0 Downloaded futures-io v0.3.32 Downloaded futures v0.3.32 Downloaded oorandom v11.1.5 Downloaded weedle v0.13.1 Downloaded either v1.15.0 Downloaded toml_edit v0.19.15 Downloaded find-msvc-tools v0.1.9 Downloaded iri-string v0.7.12 Downloaded litemap v0.8.2 Downloaded synstructure v0.13.2 Downloaded zerovec-derive v0.11.3 Downloaded smallvec v1.15.1 Downloaded openssl v0.10.77 Downloaded nu-ansi-term v0.50.3 Downloaded libm v0.2.16 Downloaded zmij v1.0.21 Downloaded syn v2.0.117 Downloaded pin-project-lite v0.2.17 Downloaded wast v247.0.0 Downloaded anstyle-parse v1.0.0 Downloaded gif v0.9.2 Downloaded askama_macros v0.15.6 Downloaded thiserror-impl v1.0.69 Downloaded aws-lc-rs v1.16.3 Downloaded icu_properties_data v2.2.0 Downloaded yoke-derive v0.8.2 Downloaded zerofrom-derive v0.1.7 Downloaded cast v0.3.0 Downloaded color_quant v1.1.0 Downloaded zerofrom v0.1.7 Downloaded mio v1.2.0 Downloaded wasm-encoder v0.247.0 Downloaded aho-corasick v1.1.4 Downloaded bitflags v2.11.1 Downloaded http v1.4.0 Downloaded icu_provider v2.2.0 Downloaded reqwest v0.13.2 Downloaded socket2 v0.6.3 Downloaded glob v0.3.3 Downloaded serde_derive v1.0.228 Downloaded serde_json v1.0.149 Downloaded hashbrown v0.17.0 Downloaded serde_spanned v1.1.1 Downloaded futures-util v0.3.32 Downloaded deranged v0.5.8 Downloaded nom v5.1.3 Downloaded futures-core-preview v0.3.0-alpha.19 Downloaded futures-channel-preview v0.3.0-alpha.19 Downloaded rustls-pki-types v1.14.0 Downloaded zeroize v1.8.2 Downloaded equivalent v1.0.2 Downloaded typenum v1.19.0 Downloaded relative-path v1.9.3 Downloaded wasmparser v0.245.1 Downloaded cfg-if v1.0.4 Downloaded quote v1.0.45 Downloaded threadpool v1.8.1 Downloaded wasm-encoder v0.243.0 Downloaded lazy_static v1.5.0 Downloaded crossbeam-deque v0.8.6 Downloaded adler32 v1.2.0 Downloaded zerovec v0.11.6 Downloaded ryu v1.0.23 Downloaded rand_chacha v0.9.0 Downloaded unicase v2.9.0 Downloaded rand v0.8.6 Downloaded time-core v0.1.8 Downloaded crossbeam-epoch v0.9.18 Downloaded encoding_rs v0.8.35 Downloaded proc-macro2 v1.0.106 Downloaded buf_redux v0.8.4 Downloaded quick-error v1.2.3 Downloaded multipart v0.18.0 Downloaded num_cpus v1.17.0 Downloaded rustix v1.1.4 Downloaded crc32fast v1.5.0 Downloaded serde_core v1.0.228 Downloaded vcpkg v0.2.15 Downloaded chrono v0.4.44 Downloaded jiff v0.2.23 Downloaded toml v1.1.2+spec-1.1.0 Downloaded getrandom v0.4.2 Downloaded toml_parser v1.1.2+spec-1.1.0 Downloaded brotli-decompressor v5.0.0 Downloaded utf8parse v0.2.2 Downloaded http-body-util v0.1.3 Downloaded openssl-sys v0.9.113 Downloaded unicode-width v0.2.2 Downloaded regex-automata v0.4.14 Downloaded num-traits v0.2.19 Downloaded futures-channel v0.3.32 Downloaded fastrand v2.4.1 Downloaded pem-rfc7468 v1.0.0 Downloaded webpki-roots v1.0.7 Downloaded fnv v1.0.7 Downloaded yoke v0.8.2 Downloaded unicode-ident v1.0.24 Downloaded alloc-stdlib v0.2.2 Downloaded simd-adler32 v0.3.9 Downloaded utf8-zero v0.8.1 Downloaded ureq v3.3.0 Downloaded walrus v0.26.1 Downloaded hashbrown v0.16.1 Downloaded is_terminal_polyfill v1.70.2 Downloaded rustversion v1.0.22 Downloaded wast v243.0.0 Downloaded errno v0.3.14 Downloaded zerocopy v0.8.48 Downloaded miniz_oxide v0.8.9 Downloaded rustc-demangle v0.1.27 Downloaded trybuild v1.0.116 Downloaded wasmprinter v0.245.1 Downloaded futures-timer v3.0.3 Downloaded rstest v0.26.1 Downloaded pkg-config v0.3.33 Downloaded ureq-proto v0.6.0 Downloaded walrus-macro v0.26.0 Downloaded wasmprinter v0.243.0 Downloaded semver v1.0.28 Downloaded rustc_version v0.4.1 Downloaded id-arena v2.3.0 Downloaded sourcefile v0.2.1 Downloaded tokio-macros v2.7.0 Downloaded clap_builder v4.6.0 Downloaded clap_derive v4.6.1 Downloaded clap v4.6.1 Downloaded askama_parser v0.15.6 Downloaded strsim v0.11.1 Downloaded regex v1.12.3 Downloaded displaydoc v0.2.5 Downloaded toml_writer v1.1.1+spec-1.1.0 Downloaded humantime v2.3.0 Downloaded tokio-util v0.7.18 Downloaded quinn-proto v0.11.14 Downloaded rayon v1.12.0 Downloaded deflate v0.7.20 Downloaded askama_derive v0.15.6 Downloaded gloo-render v0.2.0 Downloaded winnow v0.5.40 Downloaded h2 v0.4.13 Downloaded hyper v1.9.0 Downloaded termcolor v1.4.1 Downloaded zerocopy-derive v0.8.48 Downloaded rand v0.9.4 Downloaded quinn-udp v0.5.14 Downloaded quinn v0.11.9 Downloaded getrandom v0.2.17 Downloaded rayon-core v1.13.0 Downloaded inflate v0.1.1 Downloaded pin-project v1.1.11 Downloaded json v0.12.4 Downloaded httparse v1.10.1 Downloaded getrandom v0.3.4 Downloaded tinyvec v1.11.0 Downloaded thiserror v2.0.18 Downloaded gloo-events v0.2.0 Downloaded async-trait v0.1.89 Downloaded image v0.12.4 Downloaded iana-time-zone v0.1.65 Downloaded rustls-platform-verifier v0.6.2 Downloaded proc-macro-crate v1.3.1 Downloaded hyper-rustls v0.27.9 Downloaded atomic-waker v1.1.2 Downloaded hyper-util v0.1.20 Downloaded tracing-core v0.1.36 Downloaded log v0.4.29 Downloaded idna_adapter v1.2.1 Downloaded once_cell v1.21.4 Downloaded num-iter v0.1.45 Downloaded scoped_threadpool v0.1.9 Downloaded basic-toml v0.1.10 Downloaded gloo-timers v0.3.0 Downloaded thiserror v1.0.69 Downloaded ipnet v2.12.0 Downloaded mime v0.3.17 Downloaded rand_core v0.9.5 Downloaded futures-executor v0.3.32 Downloaded toml_datetime v1.1.1+spec-1.1.0 Downloaded console_log v1.0.0 Downloaded pinned v0.1.0 Downloaded ppv-lite86 v0.2.21 Downloaded tinystr v0.8.3 Downloaded writeable v0.6.3 Downloaded autocfg v1.5.0 Downloaded gloo-file v0.3.0 Downloaded serde_urlencoded v0.7.1 Downloaded want v0.3.1 Downloaded rustc-hash v2.1.2 Downloaded openssl-probe v0.2.1 Downloaded bincode v1.3.3 Downloaded stable_deref_trait v1.2.1 Downloaded gloo-utils v0.2.0 Downloaded thiserror-impl v2.0.18 Downloaded cfg_aliases v0.2.1 Compiling proc-macro2 v1.0.106 Compiling quote v1.0.45 Compiling unicode-ident v1.0.24 Compiling libc v0.2.185 Compiling stable_deref_trait v1.2.1 Compiling cfg-if v1.0.4 Compiling serde_core v1.0.228 Compiling memchr v2.8.0 Compiling log v0.4.29 Compiling crossbeam-utils v0.8.21 Compiling find-msvc-tools v0.1.9 Compiling litemap v0.8.2 Compiling shlex v1.3.0 Compiling writeable v0.6.3 Compiling cc v1.2.60 Compiling zerocopy v0.8.48 Compiling icu_normalizer_data v2.2.0 Compiling utf8_iter v1.0.4 Compiling bitflags v2.11.1 Compiling icu_properties_data v2.2.0 Compiling rayon-core v1.13.0 Compiling crossbeam-epoch v0.9.18 Compiling serde v1.0.228 Compiling httparse v1.10.1 Compiling syn v2.0.117 Compiling itoa v1.0.18 Compiling crossbeam-deque v0.8.6 Compiling zmij v1.0.21 Compiling equivalent v1.0.2 Compiling getrandom v0.2.17 Compiling heck v0.5.0 Compiling getrandom v0.4.2 Compiling zeroize v1.8.2 Compiling autocfg v1.5.0 Compiling utf8parse v0.2.2 Compiling rustix v1.1.4 Compiling unicase v2.9.0 Compiling once_cell v1.21.4 Compiling smallvec v1.15.1 Compiling hashbrown v0.17.0 Compiling num-traits v0.2.19 Compiling mime_guess v2.0.5 Compiling ring v0.17.14 Compiling anstyle-parse v1.0.0 Compiling rustls-pki-types v1.14.0 Compiling rand_core v0.6.4 Compiling errno v0.3.14 Compiling aho-corasick v1.1.4 Compiling is_terminal_polyfill v1.70.2 Compiling indexmap v2.14.0 Compiling foldhash v0.2.0 Compiling percent-encoding v2.3.2 Compiling anstyle-query v1.1.5 Compiling anyhow v1.0.102 Compiling regex-syntax v0.8.10 Compiling colorchoice v1.0.5 Compiling serde_json v1.0.149 Compiling linux-raw-sys v0.12.1 Compiling untrusted v0.9.0 Compiling crc32fast v1.5.0 Compiling anstyle v1.0.14 Compiling either v1.15.0 Compiling anstream v1.0.0 Compiling rayon v1.12.0 Compiling regex-automata v0.4.14 Compiling synstructure v0.13.2 Compiling ppv-lite86 v0.2.21 Compiling hashbrown v0.16.1 Compiling rand_chacha v0.3.1 Compiling mime v0.3.17 Compiling rustls v0.23.38 Compiling leb128fmt v0.1.0 Compiling alloc-no-stdlib v2.0.4 Compiling adler2 v2.0.1 Compiling bytes v1.11.1 Compiling powerfmt v0.2.0 Compiling simd-adler32 v0.3.9 Compiling fallible-iterator v0.3.0 Compiling semver v1.0.28 Compiling zerofrom-derive v0.1.7 Compiling yoke-derive v0.8.2 Compiling zerovec-derive v0.11.3 Compiling displaydoc v0.2.5 Compiling serde_derive v1.0.228 Compiling base64 v0.22.1 Compiling safemem v0.3.3 Compiling wasm-bindgen-shared v0.2.118 (/home/buildozer/aports/community/wasm-bindgen/src/wasm-bindgen-0.2.118/crates/shared) Compiling fastrand v2.4.1 Compiling buf_redux v0.8.4 Compiling gimli v0.32.3 Compiling tempfile v3.27.0 Compiling http v1.4.0 Compiling walrus-macro v0.26.0 Compiling zerofrom v0.1.7 Compiling yoke v0.8.2 Compiling zerovec v0.11.6 Compiling zerotrie v0.2.4 Compiling miniz_oxide v0.8.9 Compiling deranged v0.5.8 Compiling wasm-encoder v0.245.1 Compiling tinystr v0.8.3 Compiling icu_locale_core v2.2.0 Compiling potential_utf v0.1.5 Compiling icu_collections v2.2.0 Compiling alloc-stdlib v0.2.2 Compiling regex v1.12.3 Compiling icu_provider v2.2.0 Compiling rustls-webpki v0.103.12 Compiling rand v0.8.6 Compiling id-arena v2.3.0 Compiling icu_normalizer v2.2.0 Compiling icu_properties v2.2.0 Compiling wasmparser v0.245.1 Compiling form_urlencoded v1.2.2 Compiling num_cpus v1.17.0 Compiling twoway v0.1.8 Compiling clap_lex v1.1.0 Compiling chunked_transfer v1.5.0 Compiling num_threads v0.1.7 Compiling time-core v0.1.8 Compiling subtle v2.6.1 Compiling idna_adapter v1.2.1 Compiling httpdate v1.0.3 Compiling iana-time-zone v0.1.65 Compiling idna v1.1.0 Compiling strsim v0.11.1 Compiling quick-error v1.2.3 Compiling ascii v1.1.0 Compiling leb128 v0.2.5 Compiling num-conv v0.2.1 Compiling time v0.3.47 Compiling clap_builder v4.6.0 Compiling tiny_http v0.12.0 Compiling multipart v0.18.0 Compiling url v2.5.8 Compiling chrono v0.4.44 Compiling threadpool v1.8.1 Compiling flate2 v1.1.9 Compiling env_filter v1.0.1 Compiling brotli-decompressor v5.0.0 Compiling ureq-proto v0.6.0 Compiling clap_derive v4.6.1 Compiling webpki-roots v1.0.7 Compiling filetime v0.2.27 Compiling jiff v0.2.23 Compiling rustc-demangle v0.1.27 Compiling sha1_smol v1.0.1 Compiling wasm-bindgen-cli v0.2.118 (/home/buildozer/aports/community/wasm-bindgen/src/wasm-bindgen-0.2.118/crates/cli) Compiling utf8-zero v0.8.1 Compiling base64 v0.13.1 Compiling clap v4.6.1 Compiling wasm-bindgen-test-shared v0.2.118 (/home/buildozer/aports/community/wasm-bindgen/src/wasm-bindgen-0.2.118/crates/test-shared) Compiling rouille v3.6.2 Compiling ureq v3.3.0 Compiling walrus v0.26.1 Compiling env_logger v0.11.10 Compiling wasm-bindgen-cli-support v0.2.118 (/home/buildozer/aports/community/wasm-bindgen/src/wasm-bindgen-0.2.118/crates/cli-support) Finished `release` profile [optimized] target(s) in 1m 29s warning: the following packages contain code that will be rejected by a future version of Rust: buf_redux v0.8.4, multipart v0.18.0 note: to see what the problems were, use the option `--future-incompat-report`, or run `cargo report future-incompatibilities --id 1` Compiling unicode-ident v1.0.24 Compiling proc-macro2 v1.0.106 Compiling quote v1.0.45 Compiling libc v0.2.185 Compiling cfg-if v1.0.4 Compiling stable_deref_trait v1.2.1 Compiling memchr v2.8.0 Compiling serde_core v1.0.228 Compiling hashbrown v0.17.0 Compiling regex-syntax v0.8.10 Compiling equivalent v1.0.2 Compiling log v0.4.29 Compiling crossbeam-utils v0.8.21 Compiling bitflags v2.11.1 Compiling autocfg v1.5.0 Compiling find-msvc-tools v0.1.9 Compiling litemap v0.8.2 Compiling writeable v0.6.3 Compiling shlex v1.3.0 Compiling cc v1.2.60 Compiling aho-corasick v1.1.4 Compiling num-traits v0.2.19 Compiling syn v2.0.117 Compiling getrandom v0.2.17 Compiling icu_normalizer_data v2.2.0 Compiling serde v1.0.228 Compiling utf8_iter v1.0.4 Compiling zerocopy v0.8.48 Compiling icu_properties_data v2.2.0 Compiling crossbeam-epoch v0.9.18 Compiling anstyle v1.0.14 Compiling httparse v1.10.1 Compiling rayon-core v1.13.0 Compiling itoa v1.0.18 Compiling regex-automata v0.4.14 Compiling crossbeam-deque v0.8.6 Compiling ring v0.17.14 Compiling indexmap v2.14.0 Compiling unicase v2.9.0 Compiling zeroize v1.8.2 Compiling once_cell v1.21.4 Compiling utf8parse v0.2.2 Compiling foldhash v0.2.0 Compiling heck v0.5.0 Compiling anyhow v1.0.102 Compiling zmij v1.0.21 Compiling getrandom v0.4.2 Compiling smallvec v1.15.1 Compiling rustix v1.1.4 Compiling hashbrown v0.16.1 Compiling anstyle-parse v1.0.0 Compiling mime_guess v2.0.5 Compiling rustls-pki-types v1.14.0 Compiling regex v1.12.3 Compiling rand_core v0.6.4 Compiling errno v0.3.14 Compiling either v1.15.0 Compiling serde_json v1.0.149 Compiling synstructure v0.13.2 Compiling linux-raw-sys v0.12.1 Compiling colorchoice v1.0.5 Compiling is_terminal_polyfill v1.70.2 Compiling anstyle-query v1.1.5 Compiling crc32fast v1.5.0 Compiling semver v1.0.28 Compiling untrusted v0.9.0 Compiling percent-encoding v2.3.2 Compiling anstream v1.0.0 Compiling rayon v1.12.0 Compiling alloc-no-stdlib v2.0.4 Compiling rustls v0.23.38 Compiling ppv-lite86 v0.2.21 Compiling mime v0.3.17 Compiling powerfmt v0.2.0 Compiling rand_chacha v0.3.1 Compiling bytes v1.11.1 Compiling base64 v0.22.1 Compiling leb128fmt v0.1.0 Compiling safemem v0.3.3 Compiling fallible-iterator v0.3.0 Compiling adler2 v2.0.1 Compiling zerofrom-derive v0.1.7 Compiling yoke-derive v0.8.2 Compiling zerovec-derive v0.11.3 Compiling displaydoc v0.2.5 Compiling serde_derive v1.0.228 Compiling simd-adler32 v0.3.9 Compiling fastrand v2.4.1 Compiling wasm-bindgen-shared v0.2.118 (/home/buildozer/aports/community/wasm-bindgen/src/wasm-bindgen-0.2.118/crates/shared) Compiling tempfile v3.27.0 Compiling miniz_oxide v0.8.9 Compiling id-arena v2.3.0 Compiling gimli v0.32.3 Compiling walrus-macro v0.26.0 Compiling buf_redux v0.8.4 Compiling http v1.4.0 Compiling wasm-encoder v0.245.1 Compiling zerofrom v0.1.7 Compiling rand v0.8.6 Compiling yoke v0.8.2 Compiling rustls-webpki v0.103.12 Compiling zerovec v0.11.6 Compiling zerotrie v0.2.4 Compiling deranged v0.5.8 Compiling tinystr v0.8.3 Compiling potential_utf v0.1.5 Compiling icu_locale_core v2.2.0 Compiling icu_collections v2.2.0 Compiling alloc-stdlib v0.2.2 Compiling form_urlencoded v1.2.2 Compiling num_cpus v1.17.0 Compiling twoway v0.1.8 Compiling leb128 v0.2.5 Compiling subtle v2.6.1 Compiling icu_provider v2.2.0 Compiling num-conv v0.2.1 Compiling ascii v1.1.0 Compiling iana-time-zone v0.1.65 Compiling icu_normalizer v2.2.0 Compiling icu_properties v2.2.0 Compiling httpdate v1.0.3 Compiling quick-error v1.2.3 Compiling chunked_transfer v1.5.0 Compiling clap_lex v1.1.0 Compiling time-core v0.1.8 Compiling strsim v0.11.1 Compiling num_threads v0.1.7 Compiling clap_builder v4.6.0 Compiling time v0.3.47 Compiling tiny_http v0.12.0 Compiling wasmparser v0.245.1 Compiling multipart v0.18.0 Compiling chrono v0.4.44 Compiling idna_adapter v1.2.1 Compiling idna v1.1.0 Compiling threadpool v1.8.1 Compiling flate2 v1.1.9 Compiling url v2.5.8 Compiling brotli-decompressor v5.0.0 Compiling ureq-proto v0.6.0 Compiling clap_derive v4.6.1 Compiling env_filter v1.0.1 Compiling webpki-roots v1.0.7 Compiling filetime v0.2.27 Compiling rustc-demangle v0.1.27 Compiling jiff v0.2.23 Compiling utf8-zero v0.8.1 Compiling wasm-bindgen-cli v0.2.118 (/home/buildozer/aports/community/wasm-bindgen/src/wasm-bindgen-0.2.118/crates/cli) Compiling sha1_smol v1.0.1 Compiling winnow v1.0.1 Compiling base64 v0.13.1 Compiling rouille v3.6.2 Compiling clap v4.6.1 Compiling ureq v3.3.0 Compiling toml_parser v1.1.2+spec-1.1.0 Compiling rustc_version v0.4.1 Compiling toml_datetime v1.1.1+spec-1.1.0 Compiling wasm-bindgen-test-shared v0.2.118 (/home/buildozer/aports/community/wasm-bindgen/src/wasm-bindgen-0.2.118/crates/test-shared) Compiling rstest_macros v0.26.1 Compiling toml_edit v0.25.11+spec-1.1.0 Compiling predicates-core v1.0.10 Compiling futures-macro v0.3.32 Compiling env_logger v0.11.10 Compiling proc-macro-crate v3.5.0 Compiling walrus v0.26.1 Compiling float-cmp v0.10.0 Compiling assert_cmd v2.2.1 Compiling difflib v0.4.0 Compiling pin-project-lite v0.2.17 Compiling slab v0.4.12 Compiling termtree v0.5.1 Compiling normalize-line-endings v0.3.0 Compiling futures-task v0.3.32 Compiling relative-path v1.9.3 Compiling glob v0.3.3 Compiling futures-core v0.3.32 Compiling predicates v3.1.4 Compiling futures-util v0.3.32 Compiling predicates-tree v1.0.13 Compiling bstr v1.12.1 Compiling wait-timeout v0.2.1 Compiling futures-timer v3.0.3 Compiling termcolor v1.4.1 Compiling diff v0.1.13 Compiling wasm-bindgen-cli-support v0.2.118 (/home/buildozer/aports/community/wasm-bindgen/src/wasm-bindgen-0.2.118/crates/cli-support) Compiling yansi v1.0.1 Compiling wasmprinter v0.245.1 Compiling pretty_assertions v1.4.1 Compiling rstest v0.26.1 warning: constant `TERMINATION_LIB_RS` is never used --> crates/cli/tests/wasm-bindgen/main.rs:544:7 | 544 | 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 31.07s 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.118/target/debug/deps/wasm_bindgen_cli-1b843dbec3c7694f) 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.rs (/home/buildozer/aports/community/wasm-bindgen/src/wasm-bindgen-0.2.118/target/debug/deps/wasm_bindgen-84da2e617308a928) 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.118/target/debug/deps/wasm_bindgen_test_runner-2d819a8ba4e22e8a) 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.118/target/debug/deps/wasm2es6js-d0c31dae793aa245) 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.118/target/debug/deps/wasm_bindgen-af77451f86e4ce38) running 65 tests test function_table_preserved_for_stack_closures ... ok test multiple_start_functions ... ok test default_module_path_target_no_modules ... ok test default_module_path_target_web ... ok test bin_crate_works ... ok test bin_crate_works_without_name_section ... ok test constructor_cannot_return_option_struct ... ok test function_table_preserved ... ok test namespace_global_and_noglobal_works ... ok test reference::no_duplicate_wasm_export_in_node_esm_atomics_debug ... FAILED test npm::npm_conflict_rejected ... ok test npm::no_modules_rejects_npm ... ok test npm::more_package_json_fields_ignored ... ok test omit_default_module_path_target_no_modules ... ok test omit_default_module_path_target_web ... ok test one_export_works ... ok test private_start_function ... ok test reference::runtest::test_01_add_rs ... ok test reference::runtest::test_03_anyref_import_catch_rs ... FAILED test reference::runtest::test_02_anyref_empty_rs ... ok test reference::runtest::test_04_anyref_nop_rs ... ok test reference::runtest::test_05_async_number_rs ... FAILED test reference::runtest::test_07_builder_rs ... FAILED test reference::runtest::test_06_async_void_rs ... FAILED test reference::runtest::test_09_constructor_rs ... FAILED test reference::runtest::test_08_closures_rs ... FAILED test reference::runtest::test_10_custom_section_rs ... ok test reference::runtest::test_11_default_class_rs ... FAILED test reference::runtest::test_12_default_function_rs ... ok test reference::runtest::test_14_empty_rs ... ok test reference::runtest::test_13_echo_rs ... FAILED test reference::runtest::test_15_enums_rs ... FAILED test reference::runtest::test_16_function_attrs_rs ... FAILED test reference::runtest::test_17_getter_setter_rs ... FAILED test reference::runtest::test_18_import_getter_setter_rs ... FAILED test reference::runtest::test_19_import_rs ... FAILED test reference::runtest::test_20_int128_rs ... FAILED test reference::runtest::test_21_intrinsic_only_rs ... FAILED test reference::runtest::test_22_js_namespace_export_same_name_rs ... FAILED test reference::runtest::test_23_js_namespace_export_rs ... FAILED test reference::runtest::test_24_keyword_rs ... FAILED test reference::runtest::test_25_modules_rs ... FAILED test reference::runtest::test_26_nop_rs ... ok test reference::runtest::test_27_optional_args_rs ... ok test reference::runtest::test_28_pointers_rs ... ok test reference::runtest::test_29_private_rs ... FAILED test reference::runtest::test_30_raw_rs ... FAILED test reference::runtest::test_31_reexport_rs ... FAILED test reference::runtest::test_32_reserved_class_name_rs ... FAILED test reference::runtest::test_33_result_rs ... FAILED test reference::runtest::test_34_self_type_rs ... FAILED test reference::runtest::test_35_skip_jsdoc_rs ... ok test reference::runtest::test_37_string_arg_rs ... FAILED test termination_abort_handler ... FAILED test termination_reinit ... FAILED test termination_reinit_auto_detect ... FAILED test version_useful ... ok test reference::runtest::test_36_static_rs ... FAILED test reference::runtest::test_38_targets_rs ... FAILED test reference::runtest::test_39_typescript_type_rs ... FAILED test reference::runtest::test_41_wasm_export_types_rs ... FAILED test reinit_panic_abort ... ok test reference::runtest::test_40_wasm_export_colon_rs ... FAILED test works_on_empty_project ... ok test reference::runtest::test_42_web_sys_rs ... FAILED failures: ---- reference::no_duplicate_wasm_export_in_node_esm_atomics_debug stdout ---- thread 'reference::no_duplicate_wasm_export_in_node_esm_atomics_debug' (11169) panicked at /rustc/e408947bfd200af42db322daf0fadfe7e26d3bd1/library/core/src/ops/function.rs:250:5: 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.118/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.118/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" "--target" "wasm32-unknown-unknown" "-Zbuild-std=std,panic_abort"` code=101 stdout="" stderr=``` error: the `-Z` flag is only accepted on the nightly channel of Cargo, but this is the `stable` channel See https://doc.rust-lang.org/book/appendix-07-nightly-rust.html for more information about Rust release channels. ``` note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace ---- reference::runtest::test_03_anyref_import_catch_rs stdout ---- thread 'reference::runtest::test_03_anyref_import_catch_rs' (11225) panicked at crates/cli/tests/wasm-bindgen/reference.rs:121: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_1410d59c8e85a52f(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); } export function __wbg_foo_042bb6ce1224637a() { return handleError(function () { foo(); }, arguments); } export function __wbindgen_init_externref_table() { const table = wasm.__wbindgen_externrefs; const offset = table.grow(4); table.set(0, undefined); table.set(offset + 0, undefined); table.set(offset + 1, null); table.set(offset + 2, true); table.set(offset + 3, false); } function addToExternrefTable0(obj) { const idx = wasm.__externref_table_alloc(); wasm.__wbindgen_externrefs.set(idx, obj); return idx; } function getStringFromWasm0(ptr, len) { ptr = ptr >>> 0; return decodeText(ptr, 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_05_async_number_rs stdout ---- thread 'reference::runtest::test_05_async_number_rs' (11266) panicked at crates/cli/tests/wasm-bindgen/reference.rs:121: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_5a55e4e124bee7e9(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_61e3cf6ff89514dd(arg0) { const ret = typeof(arg0) === 'function'; return ret; } export function __wbg___wbindgen_is_undefined_e306d09f09e981f5(arg0) { const ret = arg0 === undefined; return ret; } export function __wbg___wbindgen_throw_1410d59c8e85a52f(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); } export function __wbg__wbg_cb_unref_69ddae1f7a92abad(arg0) { arg0._wbg_cb_unref(); } export function __wbg_call_0b6d062449586dee() { return handleError(function (arg0, arg1, arg2) { const ret = arg0.call(arg1, arg2); return ret; }, arguments); } export function __wbg_new_typed_42dff9f5059d7cd7(arg0, arg1) { try { var state0 = {a: arg0, b: arg1}; var cb0 = (arg0, arg1) => { const a = state0.a; state0.a = 0; try { return wasm_bindgen__convert__closures_____invoke__h0000000000000003(a, state0.b, arg0, arg1); } finally { state0.a = a; } }; const ret = new Promise(cb0); return ret; } finally { state0.a = 0; } } export function __wbg_queueMicrotask_0d85784cb6a8da70(arg0) { const ret = arg0.queueMicrotask; return ret; } export function __wbg_queueMicrotask_ee1c789a0d5cecbd(arg0) { > queueMicrotask(arg0); >} >export function __wbg_resolve_5be899cf0ad1a4f7(arg0) { const ret = Promise.resolve(arg0); return ret; } export function __wbg_run_cac2bbcc87b83973(arg0, arg1, arg2) { try { var state0 = {a: arg1, b: arg2}; var cb0 = () => { const a = state0.a; state0.a = 0; try { return wasm_bindgen__convert__closures_____invoke__h0000000000000004(a, state0.b, ); } finally { state0.a = a; } }; const ret = arg0.run(cb0); return ret; } finally { state0.a = 0; } } export function __wbg_static_accessor_CREATE_TASK_7eafddd62448d762() { const ret = typeof console === 'undefined' ? null : console?.createTask; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_GLOBAL_537d0dde263d32a6() { const ret = typeof global === 'undefined' ? null : global; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_GLOBAL_THIS_60afdc9b804a8ae9() { const ret = typeof globalThis === 'undefined' ? null : globalThis; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_SELF_26ab35c2b64d08d1() { const ret = typeof self === 'undefined' ? null : self; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_WINDOW_9eec70044baf7346() { const ret = typeof window === 'undefined' ? null : window; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_then_3330f4d0372e69f5(arg0, arg1) { const ret = arg0.then(arg1); return ret; } export function __wbindgen_cast_0000000000000000(arg0, arg1) { // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 6, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`. const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h0000000000000005); return ret; } export function __wbindgen_cast_0000000000000001(arg0) { // Cast intrinsic for `F64 -> Externref`. const ret = arg0; return ret; } export function __wbindgen_cast_0000000000000002(arg0, arg1) { // Cast intrinsic for `Ref(String) -> Externref`. const ret = getStringFromWasm0(arg0, arg1); return ret; } export function __wbindgen_init_externref_table() { const table = wasm.__wbindgen_externrefs; const offset = table.grow(4); table.set(0, undefined); table.set(offset + 0, undefined); table.set(offset + 1, null); table.set(offset + 2, true); table.set(offset + 3, false); } function wasm_bindgen__convert__closures_____invoke__h0000000000000004(arg0, arg1) { const ret = wasm.wasm_bindgen__convert__closures_____invoke__h0000000000000004(arg0, arg1); return ret !== 0; } function wasm_bindgen__convert__closures_____invoke__h0000000000000005(arg0, arg1, arg2) { const ret = wasm.wasm_bindgen__convert__closures_____invoke__h0000000000000005(arg0, arg1, arg2); if (ret[1]) { throw takeFromExternrefTable0(ret[0]); } } function wasm_bindgen__convert__closures_____invoke__h0000000000000003(arg0, arg1, arg2, arg3) { wasm.wasm_bindgen__convert__closures_____invoke__h0000000000000003(arg0, arg1, arg2, arg3); } function addToExternrefTable0(obj) { const idx = wasm.__externref_table_alloc(); wasm.__wbindgen_externrefs.set(idx, obj); return idx; } const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined') ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry(state => wasm.__wbindgen_destroy_closure(state.a, state.b)); function debugString(val) { // primitive types const type = typeof val; if (type == 'number' || type == 'boolean' || val == null) { return `${val}`; } if (type == 'string') { return `"${val}"`; } if (type == 'symbol') { const description = val.description; if (description == null) { return 'Symbol'; } else { return `Symbol(${description})`; } } if (type == 'function') { const name = val.name; if (typeof name == 'string' && name.length > 0) { return `Function(${name})`; } else { return 'Function'; } } // objects if (Array.isArray(val)) { const length = val.length; let debug = '['; if (length > 0) { debug += debugString(val[0]); } for(let i = 1; i < length; i++) { debug += ', ' + debugString(val[i]); } debug += ']'; return debug; } // Test for built-in const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val)); let className; if (builtInMatches && builtInMatches.length > 1) { className = builtInMatches[1]; } else { // Failed to match the standard '[object ClassName]' return toString.call(val); } if (className == 'Object') { // we're a user defined class or Object // JSON.stringify avoids problems with cycles, and is generally much // easier than looping through ownProperties of `val`. try { return 'Object(' + JSON.stringify(val) + ')'; } catch (_) { return 'Object'; } } // errors if (val instanceof Error) { return `${val.name}: ${val.message}\n${val.stack}`; } // TODO we could test for more things here, like `Set`s and `Map`s. return className; } let cachedDataViewMemory0 = null; function getDataViewMemory0() { if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) { cachedDataViewMemory0 = new DataView(wasm.memory.buffer); } return cachedDataViewMemory0; } function getStringFromWasm0(ptr, len) { ptr = ptr >>> 0; return decodeText(ptr, 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_builder_rs stdout ---- thread 'reference::runtest::test_07_builder_rs' (11313) panicked at crates/cli/tests/wasm-bindgen/reference.rs:121:13: assertion failed: `(left == right)` Diff < left / right > : export class ClassBuilder { static __wrap(ptr) { ptr = ptr >>> 0; 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_1410d59c8e85a52f(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 >>> 0, 1)); function getStringFromWasm0(ptr, len) { ptr = ptr >>> 0; return decodeText(ptr, 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_06_async_void_rs stdout ---- thread 'reference::runtest::test_06_async_void_rs' (11288) panicked at crates/cli/tests/wasm-bindgen/reference.rs:121: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_5a55e4e124bee7e9(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_61e3cf6ff89514dd(arg0) { const ret = typeof(arg0) === 'function'; return ret; } export function __wbg___wbindgen_is_undefined_e306d09f09e981f5(arg0) { const ret = arg0 === undefined; return ret; } export function __wbg___wbindgen_throw_1410d59c8e85a52f(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); } export function __wbg__wbg_cb_unref_69ddae1f7a92abad(arg0) { arg0._wbg_cb_unref(); } export function __wbg_call_0b6d062449586dee() { return handleError(function (arg0, arg1, arg2) { const ret = arg0.call(arg1, arg2); return ret; }, arguments); } export function __wbg_new_typed_42dff9f5059d7cd7(arg0, arg1) { try { var state0 = {a: arg0, b: arg1}; var cb0 = (arg0, arg1) => { const a = state0.a; state0.a = 0; try { return wasm_bindgen__convert__closures_____invoke__h0000000000000002(a, state0.b, arg0, arg1); } finally { state0.a = a; } }; const ret = new Promise(cb0); return ret; } finally { state0.a = 0; } } export function __wbg_queueMicrotask_0d85784cb6a8da70(arg0) { const ret = arg0.queueMicrotask; return ret; } export function __wbg_queueMicrotask_ee1c789a0d5cecbd(arg0) { > queueMicrotask(arg0); >} >export function __wbg_resolve_5be899cf0ad1a4f7(arg0) { const ret = Promise.resolve(arg0); return ret; } export function __wbg_run_cac2bbcc87b83973(arg0, arg1, arg2) { try { var state0 = {a: arg1, b: arg2}; var cb0 = () => { const a = state0.a; state0.a = 0; try { return wasm_bindgen__convert__closures_____invoke__h0000000000000003(a, state0.b, ); } finally { state0.a = a; } }; const ret = arg0.run(cb0); return ret; } finally { state0.a = 0; } } export function __wbg_static_accessor_CREATE_TASK_7eafddd62448d762() { const ret = typeof console === 'undefined' ? null : console?.createTask; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_GLOBAL_537d0dde263d32a6() { const ret = typeof global === 'undefined' ? null : global; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_GLOBAL_THIS_60afdc9b804a8ae9() { const ret = typeof globalThis === 'undefined' ? null : globalThis; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_SELF_26ab35c2b64d08d1() { const ret = typeof self === 'undefined' ? null : self; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_WINDOW_9eec70044baf7346() { const ret = typeof window === 'undefined' ? null : window; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_then_3330f4d0372e69f5(arg0, arg1) { const ret = arg0.then(arg1); return ret; } export function __wbindgen_cast_0000000000000000(arg0, arg1) { // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 5, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`. const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h0000000000000004); return ret; } export function __wbindgen_cast_0000000000000001(arg0, arg1) { // Cast intrinsic for `Ref(String) -> Externref`. const ret = getStringFromWasm0(arg0, arg1); return ret; } export function __wbindgen_init_externref_table() { const table = wasm.__wbindgen_externrefs; const offset = table.grow(4); table.set(0, undefined); table.set(offset + 0, undefined); table.set(offset + 1, null); table.set(offset + 2, true); table.set(offset + 3, false); } function wasm_bindgen__convert__closures_____invoke__h0000000000000003(arg0, arg1) { const ret = wasm.wasm_bindgen__convert__closures_____invoke__h0000000000000003(arg0, arg1); return ret !== 0; } function wasm_bindgen__convert__closures_____invoke__h0000000000000004(arg0, arg1, arg2) { const ret = wasm.wasm_bindgen__convert__closures_____invoke__h0000000000000004(arg0, arg1, arg2); if (ret[1]) { throw takeFromExternrefTable0(ret[0]); } } function wasm_bindgen__convert__closures_____invoke__h0000000000000002(arg0, arg1, arg2, arg3) { wasm.wasm_bindgen__convert__closures_____invoke__h0000000000000002(arg0, arg1, arg2, arg3); } function addToExternrefTable0(obj) { const idx = wasm.__externref_table_alloc(); wasm.__wbindgen_externrefs.set(idx, obj); return idx; } const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined') ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry(state => wasm.__wbindgen_destroy_closure(state.a, state.b)); function debugString(val) { // primitive types const type = typeof val; if (type == 'number' || type == 'boolean' || val == null) { return `${val}`; } if (type == 'string') { return `"${val}"`; } if (type == 'symbol') { const description = val.description; if (description == null) { return 'Symbol'; } else { return `Symbol(${description})`; } } if (type == 'function') { const name = val.name; if (typeof name == 'string' && name.length > 0) { return `Function(${name})`; } else { return 'Function'; } } // objects if (Array.isArray(val)) { const length = val.length; let debug = '['; if (length > 0) { debug += debugString(val[0]); } for(let i = 1; i < length; i++) { debug += ', ' + debugString(val[i]); } debug += ']'; return debug; } // Test for built-in const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val)); let className; if (builtInMatches && builtInMatches.length > 1) { className = builtInMatches[1]; } else { // Failed to match the standard '[object ClassName]' return toString.call(val); } if (className == 'Object') { // we're a user defined class or Object // JSON.stringify avoids problems with cycles, and is generally much // easier than looping through ownProperties of `val`. try { return 'Object(' + JSON.stringify(val) + ')'; } catch (_) { return 'Object'; } } // errors if (val instanceof Error) { return `${val.name}: ${val.message}\n${val.stack}`; } // TODO we could test for more things here, like `Set`s and `Map`s. return className; } let cachedDataViewMemory0 = null; function getDataViewMemory0() { if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) { cachedDataViewMemory0 = new DataView(wasm.memory.buffer); } return cachedDataViewMemory0; } function getStringFromWasm0(ptr, len) { ptr = ptr >>> 0; return decodeText(ptr, 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_constructor_rs stdout ---- thread 'reference::runtest::test_09_constructor_rs' (11422) panicked at crates/cli/tests/wasm-bindgen/reference.rs:121: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 >>> 0; ClassConstructorFinalization.register(this, this.__wbg_ptr, this); return this; } } if (Symbol.dispose) ClassConstructor.prototype[Symbol.dispose] = ClassConstructor.prototype.free; export function __wbg___wbindgen_throw_1410d59c8e85a52f(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 >>> 0, 1)); function getStringFromWasm0(ptr, len) { ptr = ptr >>> 0; return decodeText(ptr, len); } let cachedUint8ArrayMemory0 = null; function getUint8ArrayMemory0() { if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) { cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer); } return cachedUint8ArrayMemory0; } let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); cachedTextDecoder.decode(); const MAX_SAFARI_DECODE_BYTES = 2146435072; let numBytesDecoded = 0; function decodeText(ptr, len) { numBytesDecoded += len; if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) { cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); cachedTextDecoder.decode(); numBytesDecoded = len; } return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len)); } let wasm; export function __wbg_set_wasm(val) { wasm = val; } ---- reference::runtest::test_08_closures_rs stdout ---- thread 'reference::runtest::test_08_closures_rs' (11368) panicked at crates/cli/tests/wasm-bindgen/reference.rs:121: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_e306d09f09e981f5(arg0) { const ret = arg0 === undefined; return ret; } export function __wbg___wbindgen_throw_1410d59c8e85a52f(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); } export function __wbg__wbg_cb_unref_69ddae1f7a92abad(arg0) { arg0._wbg_cb_unref(); } export function __wbg_call_scoped_dce7d2be0c47dc1c(arg0) { call_scoped(arg0); } export function __wbg_forEach_003ca89298f60e36(arg0, arg1, arg2) { try { var state0 = {a: arg1, b: arg2}; var cb0 = (arg0, arg1, arg2) => { const a = state0.a; state0.a = 0; try { return wasm_bindgen__convert__closures_____invoke__h0000000000000003(a, state0.b, arg0, arg1, arg2); } finally { state0.a = a; } }; arg0.forEach(cb0); } finally { state0.a = 0; } } export function __wbg_instanceof_Window_00ba763247f88607(arg0) { let result; try { result = arg0 instanceof Window; } catch (_) { result = false; } const ret = result; return ret; } export function __wbg_log_22e0598333d92929(arg0) { console.log(arg0); } export function __wbg_setTimeout_9dcb3a06022ed75d() { return handleError(function (arg0, arg1) { const ret = arg0.setTimeout(arg1); return ret; }, arguments); } export function __wbg_static_accessor_GLOBAL_537d0dde263d32a6() { const ret = typeof global === 'undefined' ? null : global; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_GLOBAL_THIS_60afdc9b804a8ae9() { const ret = typeof globalThis === 'undefined' ? null : globalThis; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_SELF_26ab35c2b64d08d1() { const ret = typeof self === 'undefined' ? null : self; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_WINDOW_9eec70044baf7346() { const ret = typeof window === 'undefined' ? null : window; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbindgen_cast_0000000000000000(arg0, arg1) { var state0 = {a: arg0, b: arg1}; var cb0 = () => { const a = state0.a; state0.a = 0; try { return wasm_bindgen__convert__closures_____invoke__h0000000000000004(a, state0.b, ); } finally { state0.a = a; } }; cb0._wbg_cb_unref = () => state0.a = 0; // Cast intrinsic for `Closure(Closure { owned: false, function: Function { arguments: [], shim_idx: 6, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`. const ret = cb0; return ret; } export function __wbindgen_cast_0000000000000001(arg0, arg1) { // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 7, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`. const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h0000000000000005); return ret; } export function __wbindgen_cast_0000000000000002(arg0, arg1) { // Cast intrinsic for `Ref(String) -> Externref`. const ret = getStringFromWasm0(arg0, arg1); return ret; } export function __wbindgen_init_externref_table() { const table = wasm.__wbindgen_externrefs; const offset = table.grow(4); table.set(0, undefined); table.set(offset + 0, undefined); table.set(offset + 1, null); table.set(offset + 2, true); table.set(offset + 3, false); } function wasm_bindgen__convert__closures_____invoke__h0000000000000004(arg0, arg1) { wasm.wasm_bindgen__convert__closures_____invoke__h0000000000000004(arg0, arg1); } function wasm_bindgen__convert__closures_____invoke__h0000000000000005(arg0, arg1) { wasm.wasm_bindgen__convert__closures_____invoke__h0000000000000005(arg0, arg1); } function wasm_bindgen__convert__closures_____invoke__h0000000000000003(arg0, arg1, arg2, arg3, arg4) { wasm.wasm_bindgen__convert__closures_____invoke__h0000000000000003(arg0, arg1, arg2, arg3, arg4); } function addToExternrefTable0(obj) { const idx = wasm.__externref_table_alloc(); wasm.__wbindgen_externrefs.set(idx, obj); return idx; } const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined') ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry(state => wasm.__wbindgen_destroy_closure(state.a, state.b)); function getStringFromWasm0(ptr, len) { ptr = ptr >>> 0; return decodeText(ptr, 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_11_default_class_rs stdout ---- thread 'reference::runtest::test_11_default_class_rs' (11463) panicked at crates/cli/tests/wasm-bindgen/reference.rs:121: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 >>> 0; _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_1410d59c8e85a52f(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 >>> 0, 1)); function getStringFromWasm0(ptr, len) { ptr = ptr >>> 0; return decodeText(ptr, 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_13_echo_rs stdout ---- thread 'reference::runtest::test_13_echo_rs' (11514) panicked at crates/cli/tests/wasm-bindgen/reference.rs:121:13: assertion failed: `(left == right)` Diff < left / right > : export class Foo { static __wrap(ptr) { ptr = ptr >>> 0; 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) ? 0x100000001 : Math.fround(a)); return ret === 0x100000001 ? 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) ? 0x100000001 : (a) >> 0); return ret === 0x100000001 ? 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) ? 0x100000001 : (a) >> 0); return ret === 0x100000001 ? undefined : ret; } /** * @param {string | null} [a] * @returns {string | undefined} */ export function echo_option_string(a) { var ptr0 = isLikeNone(a) ? 0 : passStringToWasm0(a, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); var len0 = WASM_VECTOR_LEN; const ret = wasm.echo_option_string(ptr0, len0); let v2; if (ret[0] !== 0) { v2 = getStringFromWasm0(ret[0], ret[1]).slice(); wasm.__wbindgen_free(ret[0], ret[1] * 1, 1); } return v2; } /** * @param {Foo | null} [a] * @returns {Foo | undefined} */ export function echo_option_struct(a) { let ptr0 = 0; if (!isLikeNone(a)) { _assertClass(a, Foo); ptr0 = a.__destroy_into_raw(); } const ret = wasm.echo_option_struct(ptr0); return ret === 0 ? undefined : Foo.__wrap(ret); } /** * @param {bigint | null} [a] * @returns {bigint | undefined} */ export function echo_option_u128(a) { const ret = wasm.echo_option_u128(!isLikeNone(a), isLikeNone(a) ? BigInt(0) : a, isLikeNone(a) ? BigInt(0) : a >> BigInt(64)); return ret[0] === 0 ? undefined : (BigInt.asUintN(64, ret[1]) | (BigInt.asUintN(64, ret[2]) << BigInt(64))); } /** * @param {number | null} [a] * @returns {number | undefined} */ export function echo_option_u16(a) { const ret = wasm.echo_option_u16(isLikeNone(a) ? 0xFFFFFF : a); return ret === 0xFFFFFF ? undefined : ret; } /** * @param {number | null} [a] * @returns {number | undefined} */ export function echo_option_u32(a) { const ret = wasm.echo_option_u32(isLikeNone(a) ? 0x100000001 : (a) >>> 0); return ret === 0x100000001 ? 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) ? 0x100000001 : (a) >>> 0); return ret === 0x100000001 ? undefined : ret; } /** * @param {Int16Array | null} [a] * @returns {Int16Array | undefined} */ export function echo_option_vec_i16(a) { var ptr0 = isLikeNone(a) ? 0 : passArray16ToWasm0(a, wasm.__wbindgen_malloc); var len0 = WASM_VECTOR_LEN; const ret = wasm.echo_option_vec_i16(ptr0, len0); let v2; if (ret[0] !== 0) { v2 = getArrayI16FromWasm0(ret[0], ret[1]).slice(); wasm.__wbindgen_free(ret[0], ret[1] * 2, 2); } return v2; } /** * @param {Int32Array | null} [a] * @returns {Int32Array | undefined} */ export function echo_option_vec_i32(a) { var ptr0 = isLikeNone(a) ? 0 : passArray32ToWasm0(a, wasm.__wbindgen_malloc); var len0 = WASM_VECTOR_LEN; const ret = wasm.echo_option_vec_i32(ptr0, len0); let v2; if (ret[0] !== 0) { v2 = getArrayI32FromWasm0(ret[0], ret[1]).slice(); wasm.__wbindgen_free(ret[0], ret[1] * 4, 4); } return v2; } /** * @param {BigInt64Array | null} [a] * @returns {BigInt64Array | undefined} */ export function echo_option_vec_i64(a) { var ptr0 = isLikeNone(a) ? 0 : passArray64ToWasm0(a, wasm.__wbindgen_malloc); var len0 = WASM_VECTOR_LEN; const ret = wasm.echo_option_vec_i64(ptr0, len0); let v2; if (ret[0] !== 0) { v2 = getArrayI64FromWasm0(ret[0], ret[1]).slice(); wasm.__wbindgen_free(ret[0], ret[1] * 8, 8); } return v2; } /** * @param {Int8Array | null} [a] * @returns {Int8Array | undefined} */ export function echo_option_vec_i8(a) { var ptr0 = isLikeNone(a) ? 0 : passArray8ToWasm0(a, wasm.__wbindgen_malloc); var len0 = WASM_VECTOR_LEN; const ret = wasm.echo_option_vec_i8(ptr0, len0); let v2; if (ret[0] !== 0) { v2 = getArrayI8FromWasm0(ret[0], ret[1]).slice(); wasm.__wbindgen_free(ret[0], ret[1] * 1, 1); } return v2; } /** * @param {string[] | null} [a] * @returns {string[] | undefined} */ export function echo_option_vec_string(a) { var ptr0 = isLikeNone(a) ? 0 : passArrayJsValueToWasm0(a, wasm.__wbindgen_malloc); var len0 = WASM_VECTOR_LEN; const ret = wasm.echo_option_vec_string(ptr0, len0); let v2; if (ret[0] !== 0) { v2 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice(); wasm.__wbindgen_free(ret[0], ret[1] * 4, 4); } return v2; } /** * @param {Foo[] | null} [a] * @returns {Foo[] | undefined} */ export function echo_option_vec_struct(a) { var ptr0 = isLikeNone(a) ? 0 : passArrayJsValueToWasm0(a, wasm.__wbindgen_malloc); var len0 = WASM_VECTOR_LEN; const ret = wasm.echo_option_vec_struct(ptr0, len0); let v2; if (ret[0] !== 0) { v2 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice(); wasm.__wbindgen_free(ret[0], ret[1] * 4, 4); } return v2; } /** * @param {Uint16Array | null} [a] * @returns {Uint16Array | undefined} */ export function echo_option_vec_u16(a) { var ptr0 = isLikeNone(a) ? 0 : passArray16ToWasm0(a, wasm.__wbindgen_malloc); var len0 = WASM_VECTOR_LEN; const ret = wasm.echo_option_vec_u16(ptr0, len0); let v2; if (ret[0] !== 0) { v2 = getArrayU16FromWasm0(ret[0], ret[1]).slice(); wasm.__wbindgen_free(ret[0], ret[1] * 2, 2); } return v2; } /** * @param {Uint32Array | null} [a] * @returns {Uint32Array | undefined} */ export function echo_option_vec_u32(a) { var ptr0 = isLikeNone(a) ? 0 : passArray32ToWasm0(a, wasm.__wbindgen_malloc); var len0 = WASM_VECTOR_LEN; const ret = wasm.echo_option_vec_u32(ptr0, len0); let v2; if (ret[0] !== 0) { v2 = getArrayU32FromWasm0(ret[0], ret[1]).slice(); wasm.__wbindgen_free(ret[0], ret[1] * 4, 4); } return v2; } /** * @param {BigUint64Array | null} [a] * @returns {BigUint64Array | undefined} */ export function echo_option_vec_u64(a) { var ptr0 = isLikeNone(a) ? 0 : passArray64ToWasm0(a, wasm.__wbindgen_malloc); var len0 = WASM_VECTOR_LEN; const ret = wasm.echo_option_vec_u64(ptr0, len0); let v2; if (ret[0] !== 0) { v2 = getArrayU64FromWasm0(ret[0], ret[1]).slice(); wasm.__wbindgen_free(ret[0], ret[1] * 8, 8); } return v2; } /** * @param {Uint8Array | null} [a] * @returns {Uint8Array | undefined} */ export function echo_option_vec_u8(a) { var ptr0 = isLikeNone(a) ? 0 : passArray8ToWasm0(a, wasm.__wbindgen_malloc); var len0 = WASM_VECTOR_LEN; const ret = wasm.echo_option_vec_u8(ptr0, len0); let v2; if (ret[0] !== 0) { v2 = getArrayU8FromWasm0(ret[0], ret[1]).slice(); wasm.__wbindgen_free(ret[0], ret[1] * 1, 1); } return v2; } /** * @param {Int16Array | null} [a] * @returns {Int16Array | undefined} */ export function echo_option_vec_uninit_i16(a) { var ptr0 = isLikeNone(a) ? 0 : passArray16ToWasm0(a, wasm.__wbindgen_malloc); var len0 = WASM_VECTOR_LEN; const ret = wasm.echo_option_vec_uninit_i16(ptr0, len0); let v2; if (ret[0] !== 0) { v2 = getArrayI16FromWasm0(ret[0], ret[1]).slice(); wasm.__wbindgen_free(ret[0], ret[1] * 2, 2); } return v2; } /** * @param {Int32Array | null} [a] * @returns {Int32Array | undefined} */ export function echo_option_vec_uninit_i32(a) { var ptr0 = isLikeNone(a) ? 0 : passArray32ToWasm0(a, wasm.__wbindgen_malloc); var len0 = WASM_VECTOR_LEN; const ret = wasm.echo_option_vec_uninit_i32(ptr0, len0); let v2; if (ret[0] !== 0) { v2 = getArrayI32FromWasm0(ret[0], ret[1]).slice(); wasm.__wbindgen_free(ret[0], ret[1] * 4, 4); } return v2; } /** * @param {BigInt64Array | null} [a] * @returns {BigInt64Array | undefined} */ export function echo_option_vec_uninit_i64(a) { var ptr0 = isLikeNone(a) ? 0 : passArray64ToWasm0(a, wasm.__wbindgen_malloc); var len0 = WASM_VECTOR_LEN; const ret = wasm.echo_option_vec_uninit_i64(ptr0, len0); let v2; if (ret[0] !== 0) { v2 = getArrayI64FromWasm0(ret[0], ret[1]).slice(); wasm.__wbindgen_free(ret[0], ret[1] * 8, 8); } return v2; } /** * @param {Int8Array | null} [a] * @returns {Int8Array | undefined} */ export function echo_option_vec_uninit_i8(a) { var ptr0 = isLikeNone(a) ? 0 : passArray8ToWasm0(a, wasm.__wbindgen_malloc); var len0 = WASM_VECTOR_LEN; const ret = wasm.echo_option_vec_uninit_i8(ptr0, len0); let v2; if (ret[0] !== 0) { v2 = getArrayI8FromWasm0(ret[0], ret[1]).slice(); wasm.__wbindgen_free(ret[0], ret[1] * 1, 1); } return v2; } /** * @param {Uint16Array | null} [a] * @returns {Uint16Array | undefined} */ export function echo_option_vec_uninit_u16(a) { var ptr0 = isLikeNone(a) ? 0 : passArray16ToWasm0(a, wasm.__wbindgen_malloc); var len0 = WASM_VECTOR_LEN; const ret = wasm.echo_option_vec_uninit_u16(ptr0, len0); let v2; if (ret[0] !== 0) { v2 = getArrayU16FromWasm0(ret[0], ret[1]).slice(); wasm.__wbindgen_free(ret[0], ret[1] * 2, 2); } return v2; } /** * @param {Uint32Array | null} [a] * @returns {Uint32Array | undefined} */ export function echo_option_vec_uninit_u32(a) { var ptr0 = isLikeNone(a) ? 0 : passArray32ToWasm0(a, wasm.__wbindgen_malloc); var len0 = WASM_VECTOR_LEN; const ret = wasm.echo_option_vec_uninit_u32(ptr0, len0); let v2; if (ret[0] !== 0) { v2 = getArrayU32FromWasm0(ret[0], ret[1]).slice(); wasm.__wbindgen_free(ret[0], ret[1] * 4, 4); } return v2; } /** * @param {BigUint64Array | null} [a] * @returns {BigUint64Array | undefined} */ export function echo_option_vec_uninit_u64(a) { var ptr0 = isLikeNone(a) ? 0 : passArray64ToWasm0(a, wasm.__wbindgen_malloc); var len0 = WASM_VECTOR_LEN; const ret = wasm.echo_option_vec_uninit_u64(ptr0, len0); let v2; if (ret[0] !== 0) { v2 = getArrayU64FromWasm0(ret[0], ret[1]).slice(); wasm.__wbindgen_free(ret[0], ret[1] * 8, 8); } return v2; } /** * @param {Uint8Array | null} [a] * @returns {Uint8Array | undefined} */ export function echo_option_vec_uninit_u8(a) { var ptr0 = isLikeNone(a) ? 0 : passArray8ToWasm0(a, wasm.__wbindgen_malloc); var len0 = WASM_VECTOR_LEN; const ret = wasm.echo_option_vec_uninit_u8(ptr0, len0); let v2; if (ret[0] !== 0) { v2 = getArrayU8FromWasm0(ret[0], ret[1]).slice(); wasm.__wbindgen_free(ret[0], ret[1] * 1, 1); } return v2; } /** * @param {string} a * @returns {string} */ export function echo_string(a) { let deferred2_0; let deferred2_1; try { const ptr0 = passStringToWasm0(a, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); const len0 = WASM_VECTOR_LEN; const ret = wasm.echo_string(ptr0, len0); deferred2_0 = ret[0]; deferred2_1 = ret[1]; return getStringFromWasm0(ret[0], ret[1]); } finally { wasm.__wbindgen_free(deferred2_0, deferred2_1, 1); } } /** * @param {Foo} a * @returns {Foo} */ export function echo_struct(a) { _assertClass(a, Foo); var ptr0 = a.__destroy_into_raw(); const ret = wasm.echo_struct(ptr0); return Foo.__wrap(ret); } /** * @param {bigint} a * @returns {bigint} */ export function echo_u128(a) { const ret = wasm.echo_u128(a, a >> BigInt(64)); return (BigInt.asUintN(64, ret[0]) | (BigInt.asUintN(64, ret[1]) << BigInt(64))); } /** * @param {number} a * @returns {number} */ export function echo_u16(a) { const ret = wasm.echo_u16(a); return ret; } /** * @param {number} a * @returns {number} */ export function echo_u32(a) { const ret = wasm.echo_u32(a); return ret >>> 0; } /** * @param {bigint} a * @returns {bigint} */ export function echo_u64(a) { const ret = wasm.echo_u64(a); return BigInt.asUintN(64, ret); } /** * @param {number} a * @returns {number} */ export function echo_u8(a) { const ret = wasm.echo_u8(a); return ret; } /** * @param {number} a * @returns {number} */ export function echo_usize(a) { const ret = wasm.echo_usize(a); return ret >>> 0; } /** * @param {Int16Array} a * @returns {Int16Array} */ export function echo_vec_i16(a) { const ptr0 = passArray16ToWasm0(a, wasm.__wbindgen_malloc); const len0 = WASM_VECTOR_LEN; const ret = wasm.echo_vec_i16(ptr0, len0); var v2 = getArrayI16FromWasm0(ret[0], ret[1]).slice(); wasm.__wbindgen_free(ret[0], ret[1] * 2, 2); return v2; } /** * @param {Int32Array} a * @returns {Int32Array} */ export function echo_vec_i32(a) { const ptr0 = passArray32ToWasm0(a, wasm.__wbindgen_malloc); const len0 = WASM_VECTOR_LEN; const ret = wasm.echo_vec_i32(ptr0, len0); var v2 = getArrayI32FromWasm0(ret[0], ret[1]).slice(); wasm.__wbindgen_free(ret[0], ret[1] * 4, 4); return v2; } /** * @param {BigInt64Array} a * @returns {BigInt64Array} */ export function echo_vec_i64(a) { const ptr0 = passArray64ToWasm0(a, wasm.__wbindgen_malloc); const len0 = WASM_VECTOR_LEN; const ret = wasm.echo_vec_i64(ptr0, len0); var v2 = getArrayI64FromWasm0(ret[0], ret[1]).slice(); wasm.__wbindgen_free(ret[0], ret[1] * 8, 8); return v2; } /** * @param {Int8Array} a * @returns {Int8Array} */ export function echo_vec_i8(a) { const ptr0 = passArray8ToWasm0(a, wasm.__wbindgen_malloc); const len0 = WASM_VECTOR_LEN; const ret = wasm.echo_vec_i8(ptr0, len0); var v2 = getArrayI8FromWasm0(ret[0], ret[1]).slice(); wasm.__wbindgen_free(ret[0], ret[1] * 1, 1); return v2; } /** * @param {string[]} a * @returns {string[]} */ export function echo_vec_string(a) { const ptr0 = passArrayJsValueToWasm0(a, wasm.__wbindgen_malloc); const len0 = WASM_VECTOR_LEN; const ret = wasm.echo_vec_string(ptr0, len0); var v2 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice(); wasm.__wbindgen_free(ret[0], ret[1] * 4, 4); return v2; } /** * @param {Foo[]} a * @returns {Foo[]} */ export function echo_vec_struct(a) { const ptr0 = passArrayJsValueToWasm0(a, wasm.__wbindgen_malloc); const len0 = WASM_VECTOR_LEN; const ret = wasm.echo_vec_struct(ptr0, len0); var v2 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice(); wasm.__wbindgen_free(ret[0], ret[1] * 4, 4); return v2; } /** * @param {Uint16Array} a * @returns {Uint16Array} */ export function echo_vec_u16(a) { const ptr0 = passArray16ToWasm0(a, wasm.__wbindgen_malloc); const len0 = WASM_VECTOR_LEN; const ret = wasm.echo_vec_u16(ptr0, len0); var v2 = getArrayU16FromWasm0(ret[0], ret[1]).slice(); wasm.__wbindgen_free(ret[0], ret[1] * 2, 2); return v2; } /** * @param {Uint32Array} a * @returns {Uint32Array} */ export function echo_vec_u32(a) { const ptr0 = passArray32ToWasm0(a, wasm.__wbindgen_malloc); const len0 = WASM_VECTOR_LEN; const ret = wasm.echo_vec_u32(ptr0, len0); var v2 = getArrayU32FromWasm0(ret[0], ret[1]).slice(); wasm.__wbindgen_free(ret[0], ret[1] * 4, 4); return v2; } /** * @param {BigUint64Array} a * @returns {BigUint64Array} */ export function echo_vec_u64(a) { const ptr0 = passArray64ToWasm0(a, wasm.__wbindgen_malloc); const len0 = WASM_VECTOR_LEN; const ret = wasm.echo_vec_u64(ptr0, len0); var v2 = getArrayU64FromWasm0(ret[0], ret[1]).slice(); wasm.__wbindgen_free(ret[0], ret[1] * 8, 8); return v2; } /** * @param {Uint8Array} a * @returns {Uint8Array} */ export function echo_vec_u8(a) { const ptr0 = passArray8ToWasm0(a, wasm.__wbindgen_malloc); const len0 = WASM_VECTOR_LEN; const ret = wasm.echo_vec_u8(ptr0, len0); var v2 = getArrayU8FromWasm0(ret[0], ret[1]).slice(); wasm.__wbindgen_free(ret[0], ret[1] * 1, 1); return v2; } /** * @param {Int16Array} a * @returns {Int16Array} */ export function echo_vec_uninit_i16(a) { const ptr0 = passArray16ToWasm0(a, wasm.__wbindgen_malloc); const len0 = WASM_VECTOR_LEN; const ret = wasm.echo_vec_uninit_i16(ptr0, len0); var v2 = getArrayI16FromWasm0(ret[0], ret[1]).slice(); wasm.__wbindgen_free(ret[0], ret[1] * 2, 2); return v2; } /** * @param {Int32Array} a * @returns {Int32Array} */ export function echo_vec_uninit_i32(a) { const ptr0 = passArray32ToWasm0(a, wasm.__wbindgen_malloc); const len0 = WASM_VECTOR_LEN; const ret = wasm.echo_vec_uninit_i32(ptr0, len0); var v2 = getArrayI32FromWasm0(ret[0], ret[1]).slice(); wasm.__wbindgen_free(ret[0], ret[1] * 4, 4); return v2; } /** * @param {BigInt64Array} a * @returns {BigInt64Array} */ export function echo_vec_uninit_i64(a) { const ptr0 = passArray64ToWasm0(a, wasm.__wbindgen_malloc); const len0 = WASM_VECTOR_LEN; const ret = wasm.echo_vec_uninit_i64(ptr0, len0); var v2 = getArrayI64FromWasm0(ret[0], ret[1]).slice(); wasm.__wbindgen_free(ret[0], ret[1] * 8, 8); return v2; } /** * @param {Int8Array} a * @returns {Int8Array} */ export function echo_vec_uninit_i8(a) { const ptr0 = passArray8ToWasm0(a, wasm.__wbindgen_malloc); const len0 = WASM_VECTOR_LEN; const ret = wasm.echo_vec_uninit_i8(ptr0, len0); var v2 = getArrayI8FromWasm0(ret[0], ret[1]).slice(); wasm.__wbindgen_free(ret[0], ret[1] * 1, 1); return v2; } /** * @param {Uint16Array} a * @returns {Uint16Array} */ export function echo_vec_uninit_u16(a) { const ptr0 = passArray16ToWasm0(a, wasm.__wbindgen_malloc); const len0 = WASM_VECTOR_LEN; const ret = wasm.echo_vec_uninit_u16(ptr0, len0); var v2 = getArrayU16FromWasm0(ret[0], ret[1]).slice(); wasm.__wbindgen_free(ret[0], ret[1] * 2, 2); return v2; } /** * @param {Uint32Array} a * @returns {Uint32Array} */ export function echo_vec_uninit_u32(a) { const ptr0 = passArray32ToWasm0(a, wasm.__wbindgen_malloc); const len0 = WASM_VECTOR_LEN; const ret = wasm.echo_vec_uninit_u32(ptr0, len0); var v2 = getArrayU32FromWasm0(ret[0], ret[1]).slice(); wasm.__wbindgen_free(ret[0], ret[1] * 4, 4); return v2; } /** * @param {BigUint64Array} a * @returns {BigUint64Array} */ export function echo_vec_uninit_u64(a) { const ptr0 = passArray64ToWasm0(a, wasm.__wbindgen_malloc); const len0 = WASM_VECTOR_LEN; const ret = wasm.echo_vec_uninit_u64(ptr0, len0); var v2 = getArrayU64FromWasm0(ret[0], ret[1]).slice(); wasm.__wbindgen_free(ret[0], ret[1] * 8, 8); return v2; } /** * @param {Uint8Array} a * @returns {Uint8Array} */ export function echo_vec_uninit_u8(a) { const ptr0 = passArray8ToWasm0(a, wasm.__wbindgen_malloc); const len0 = WASM_VECTOR_LEN; const ret = wasm.echo_vec_uninit_u8(ptr0, len0); var v2 = getArrayU8FromWasm0(ret[0], ret[1]).slice(); wasm.__wbindgen_free(ret[0], ret[1] * 1, 1); return v2; } export function __wbg___wbindgen_debug_string_5a55e4e124bee7e9(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_f1e4a54bccd84807(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_1410d59c8e85a52f(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); } export function __wbg_foo_new(arg0) { const ret = Foo.__wrap(arg0); return ret; } export function __wbg_foo_unwrap(arg0) { const ret = Foo.__unwrap(arg0); return ret; } export function __wbindgen_cast_0000000000000000(arg0, arg1) { // Cast intrinsic for `Ref(String) -> Externref`. const ret = getStringFromWasm0(arg0, arg1); return ret; } export function __wbindgen_init_externref_table() { const table = wasm.__wbindgen_externrefs; const offset = table.grow(4); table.set(0, undefined); table.set(offset + 0, undefined); table.set(offset + 1, null); table.set(offset + 2, true); table.set(offset + 3, false); } const FooFinalization = (typeof FinalizationRegistry === 'undefined') ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry(ptr => wasm.__wbg_foo_free(ptr >>> 0, 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) { ptr = ptr >>> 0; return decodeText(ptr, 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_15_enums_rs stdout ---- thread 'reference::runtest::test_15_enums_rs' (11554) panicked at crates/cli/tests/wasm-bindgen/reference.rs:121: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_1410d59c8e85a52f(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) { ptr = ptr >>> 0; return decodeText(ptr, 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_16_function_attrs_rs stdout ---- thread 'reference::runtest::test_16_function_attrs_rs' (11618) panicked at crates/cli/tests/wasm-bindgen/reference.rs:121:13: assertion failed: `(left == right)` Diff < left / right > : /** * Description for HoldsNumber */ export class HoldsNumber { static __wrap(ptr) { ptr = ptr >>> 0; 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_5a55e4e124bee7e9(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_d0c6ff8ec7c0253f(arg0) { const ret = !arg0; return ret; } export function __wbg___wbindgen_is_function_61e3cf6ff89514dd(arg0) { const ret = typeof(arg0) === 'function'; return ret; } export function __wbg___wbindgen_is_undefined_e306d09f09e981f5(arg0) { const ret = arg0 === undefined; return ret; } export function __wbg___wbindgen_throw_1410d59c8e85a52f(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); } export function __wbg__wbg_cb_unref_69ddae1f7a92abad(arg0) { arg0._wbg_cb_unref(); } export function __wbg_call_0b6d062449586dee() { return handleError(function (arg0, arg1, arg2) { const ret = arg0.call(arg1, arg2); return ret; }, arguments); } export function __wbg_new_typed_42dff9f5059d7cd7(arg0, arg1) { try { var state0 = {a: arg0, b: arg1}; var cb0 = (arg0, arg1) => { const a = state0.a; state0.a = 0; try { return wasm_bindgen__convert__closures_____invoke__h0000000000000003(a, state0.b, arg0, arg1); } finally { state0.a = a; } }; const ret = new Promise(cb0); return ret; } finally { state0.a = 0; } } export function __wbg_queueMicrotask_0d85784cb6a8da70(arg0) { const ret = arg0.queueMicrotask; return ret; } export function __wbg_queueMicrotask_ee1c789a0d5cecbd(arg0) { > queueMicrotask(arg0); >} >export function __wbg_resolve_5be899cf0ad1a4f7(arg0) { const ret = Promise.resolve(arg0); return ret; } export function __wbg_run_cac2bbcc87b83973(arg0, arg1, arg2) { try { var state0 = {a: arg1, b: arg2}; var cb0 = () => { const a = state0.a; state0.a = 0; try { return wasm_bindgen__convert__closures_____invoke__h0000000000000004(a, state0.b, ); } finally { state0.a = a; } }; const ret = arg0.run(cb0); return ret; } finally { state0.a = 0; } } export function __wbg_static_accessor_CREATE_TASK_7eafddd62448d762() { const ret = typeof console === 'undefined' ? null : console?.createTask; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_GLOBAL_537d0dde263d32a6() { const ret = typeof global === 'undefined' ? null : global; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_GLOBAL_THIS_60afdc9b804a8ae9() { const ret = typeof globalThis === 'undefined' ? null : globalThis; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_SELF_26ab35c2b64d08d1() { const ret = typeof self === 'undefined' ? null : self; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_WINDOW_9eec70044baf7346() { const ret = typeof window === 'undefined' ? null : window; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_then_3330f4d0372e69f5(arg0, arg1) { const ret = arg0.then(arg1); return ret; } export function __wbindgen_cast_0000000000000000(arg0, arg1) { // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 6, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`. const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h0000000000000005); return ret; } export function __wbindgen_cast_0000000000000001(arg0) { // Cast intrinsic for `F64 -> Externref`. const ret = arg0; return ret; } export function __wbindgen_cast_0000000000000002(arg0, arg1) { // Cast intrinsic for `Ref(String) -> Externref`. const ret = getStringFromWasm0(arg0, arg1); return ret; } export function __wbindgen_init_externref_table() { const table = wasm.__wbindgen_externrefs; const offset = table.grow(4); table.set(0, undefined); table.set(offset + 0, undefined); table.set(offset + 1, null); table.set(offset + 2, true); table.set(offset + 3, false); } function wasm_bindgen__convert__closures_____invoke__h0000000000000004(arg0, arg1) { const ret = wasm.wasm_bindgen__convert__closures_____invoke__h0000000000000004(arg0, arg1); return ret !== 0; } function wasm_bindgen__convert__closures_____invoke__h0000000000000005(arg0, arg1, arg2) { const ret = wasm.wasm_bindgen__convert__closures_____invoke__h0000000000000005(arg0, arg1, arg2); if (ret[1]) { throw takeFromExternrefTable0(ret[0]); } } function wasm_bindgen__convert__closures_____invoke__h0000000000000003(arg0, arg1, arg2, arg3) { wasm.wasm_bindgen__convert__closures_____invoke__h0000000000000003(arg0, arg1, arg2, arg3); } const HoldsNumberFinalization = (typeof FinalizationRegistry === 'undefined') ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry(ptr => wasm.__wbg_holdsnumber_free(ptr >>> 0, 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) { ptr = ptr >>> 0; return decodeText(ptr, 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_17_getter_setter_rs stdout ---- thread 'reference::runtest::test_17_getter_setter_rs' (11634) panicked at crates/cli/tests/wasm-bindgen/reference.rs:121: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 === 0x100000001 ? undefined : ret; } /** * @param {number | null} [value] */ set lone_setter(value) { wasm.foo_set_lone_setter(this.__wbg_ptr, isLikeNone(value) ? 0x100000001 : (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) ? 0x100000001 : (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 === 0x100000001 ? 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 === 0x100000001 ? 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) ? 0x100000001 : (arg0) >>> 0); } } if (Symbol.dispose) Foo.prototype[Symbol.dispose] = Foo.prototype.free; export function __wbg___wbindgen_throw_1410d59c8e85a52f(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 >>> 0, 1)); function getStringFromWasm0(ptr, len) { ptr = ptr >>> 0; return decodeText(ptr, 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_18_import_getter_setter_rs stdout ---- thread 'reference::runtest::test_18_import_getter_setter_rs' (11644) panicked at crates/cli/tests/wasm-bindgen/reference.rs:121:13: assertion failed: `(left == right)` Diff < left / right > : export function exported() { wasm.exported(); } export function __wbg___wbindgen_throw_1410d59c8e85a52f(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); } export function __wbg_another_6b723be6c1616946(arg0) { const ret = arg0.prop2; return ret; } export function __wbg_b_91c8631eb7275e25(arg0) { const ret = arg0.a; return ret; } export function __wbg_bar2_cdad641180ea9002() { const ret = Bar.bar2(); return ret; } export function __wbg_get_foo_c6e317a352185c14() { const ret = Bar.get_foo(); return ret; } export function __wbg_new_db871bb70f22472d() { const ret = new SomeClass(); return ret; } export function __wbg_set_another_70d0586c759204a1(arg0, arg1) { arg0.prop2 = arg1 >>> 0; } export function __wbg_set_b_8fe9fad863f2bd8f(arg0, arg1) { arg0.a = arg1 >>> 0; } export function __wbg_set_bar2_b982f825a3df9347(arg0) { Bar.set_bar2(arg0 >>> 0); } export function __wbg_set_foo_b4560128dc222731(arg0) { Bar.set_foo(arg0 >>> 0); } export function __wbg_set_signal_209eff5e0f00261a(arg0, arg1) { arg0.signal = arg1 >>> 0; } export function __wbg_set_some_prop_c0e17184729a6acf(arg0, arg1) { arg0.some_prop = arg1 >>> 0; } export function __wbg_signal_8d07ef5b10d90d85(arg0) { const ret = arg0.signal; return ret; } export function __wbg_some_prop_986a15e6637e8ccb(arg0) { const ret = arg0.some_prop; return ret; } export function __wbindgen_init_externref_table() { const table = wasm.__wbindgen_externrefs; const offset = table.grow(4); table.set(0, undefined); table.set(offset + 0, undefined); table.set(offset + 1, null); table.set(offset + 2, true); table.set(offset + 3, false); } function getStringFromWasm0(ptr, len) { ptr = ptr >>> 0; return decodeText(ptr, 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_19_import_rs stdout ---- thread 'reference::runtest::test_19_import_rs' (11666) panicked at crates/cli/tests/wasm-bindgen/reference.rs:121: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_1410d59c8e85a52f(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); } export function __wbg_catch_me_a13364060bec98eb() { return handleError(function () { catch_me(); }, arguments); } export function __wbg_get_20f095907c1dcae6(arg0) { const ret = arg0.get(); return ret; } export function __wbg_my_function_bd6826124e2339d6() { b.my_function(); } export function __wbg_new_9fc41dfc48e8020a(arg0) { const ret = new _default(arg0); return ret; } export function __wbg_no_catch_73a11d04a638a347() { no_catch(); } export function __wbg_reload_85517ae979c32e37() { window.location.reload(); } export function __wbg_static_accessor_CONST_d3e272df0fe9f8c5() { const ret = a.CONST; return ret; } export function __wbg_write_ddcc0f6c4f63fd00(arg0, arg1) { window.document.write(getStringFromWasm0(arg0, arg1)); } export function __wbindgen_init_externref_table() { const table = wasm.__wbindgen_externrefs; const offset = table.grow(4); table.set(0, undefined); table.set(offset + 0, undefined); table.set(offset + 1, null); table.set(offset + 2, true); table.set(offset + 3, false); } function addToExternrefTable0(obj) { const idx = wasm.__externref_table_alloc(); wasm.__wbindgen_externrefs.set(idx, obj); return idx; } function getStringFromWasm0(ptr, len) { ptr = ptr >>> 0; return decodeText(ptr, 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_20_int128_rs stdout ---- thread 'reference::runtest::test_20_int128_rs' (11688) panicked at crates/cli/tests/wasm-bindgen/reference.rs:121: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_1410d59c8e85a52f(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) { ptr = ptr >>> 0; return decodeText(ptr, 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_21_intrinsic_only_rs stdout ---- thread 'reference::runtest::test_21_intrinsic_only_rs' (11725) panicked at crates/cli/tests/wasm-bindgen/reference.rs:121: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_1410d59c8e85a52f(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) { ptr = ptr >>> 0; return decodeText(ptr, 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_22_js_namespace_export_same_name_rs stdout ---- thread 'reference::runtest::test_22_js_namespace_export_same_name_rs' (11732) panicked at crates/cli/tests/wasm-bindgen/reference.rs:121:13: assertion failed: `(left == right)` Diff < left / right > : 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_bar__point_free(ptr, 0); } /** * @param {number} x * @param {number} y */ constructor(x, y) { const ret = wasm.barpoint_new(x, y); this.__wbg_ptr = ret >>> 0; 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) Point.prototype[Symbol.dispose] = Point.prototype.free; /** * @enum {0 | 1 | 2} */ const Status = Object.freeze({ Pending: 0, "0": "Pending", Complete: 1, "1": "Complete", Failed: 2, "2": "Failed", }); /** * @returns {string} */ function 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); } } export const bar = {}; bar.Point = Point; bar.Status = Status; bar.greet = greet; /** * Two structs with the same js_name in different namespaces should not collide. */ class Point2 { __destroy_into_raw() { const ptr = this.__wbg_ptr; this.__wbg_ptr = 0; Point2Finalization.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.foopoint_new(x); this.__wbg_ptr = ret >>> 0; Point2Finalization.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) Point2.prototype[Symbol.dispose] = Point2.prototype.free; /** * Two enums with the same js_name in different namespaces should not collide. * @enum {0 | 1} */ const Status2 = 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 greet2() { 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); } } export const foo = {}; foo.Point = Point2; foo.Status = Status2; foo.greet = greet2; export function __wbg___wbindgen_throw_1410d59c8e85a52f(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 PointFinalization = (typeof FinalizationRegistry === 'undefined') ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry(ptr => wasm.__wbg_bar__point_free(ptr >>> 0, 1)); const Point2Finalization = (typeof FinalizationRegistry === 'undefined') ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry(ptr => wasm.__wbg_foo__point_free(ptr >>> 0, 1)); function getStringFromWasm0(ptr, len) { ptr = ptr >>> 0; return decodeText(ptr, 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_23_js_namespace_export_rs stdout ---- thread 'reference::runtest::test_23_js_namespace_export_rs' (11754) panicked at crates/cli/tests/wasm-bindgen/reference.rs:121: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 Counter { __destroy_into_raw() { const ptr = this.__wbg_ptr; this.__wbg_ptr = 0; CounterFinalization.unregister(this); return ptr; } free() { const ptr = this.__destroy_into_raw(); wasm.__wbg_default__counter_free(ptr, 0); } increment() { wasm.counter_increment(this.__wbg_ptr); } /** * @param {number} initial */ constructor(initial) { const ret = wasm.counter_new(initial); this.__wbg_ptr = ret >>> 0; CounterFinalization.register(this, this.__wbg_ptr, this); return this; } /** * @param {number} val */ set value(val) { wasm.counter_set_value(this.__wbg_ptr, val); } /** * @returns {number} */ get value() { const ret = wasm.counter_value(this.__wbg_ptr); return ret; } } if (Symbol.dispose) Counter.prototype[Symbol.dispose] = Counter.prototype.free; /** * @param {string} a * @param {string} b * @returns {string} */ function 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 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 = Counter; _default.concat = concat; _default.uppercase = {}; _default.uppercase.uppercase = uppercase; export { _default as default } /** * @param {number} a * @param {number} b * @returns {number} */ function add(a, b) { const ret = wasm.math__add(a, b); return ret; } /** * @param {number} a * @param {number} b * @returns {number} */ function divide(a, b) { const ret = wasm.math__divide(a, b); return ret; } /** * @param {number} a * @param {number} b * @returns {number} */ function multiply(a, b) { const ret = wasm.math__multiply(a, b); return ret; } export const math = {}; math.add = add; math.divide = divide; math.multiply = multiply; class Point3D { __destroy_into_raw() { const ptr = this.__wbg_ptr; this.__wbg_ptr = 0; 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) Point3D.prototype[Symbol.dispose] = Point3D.prototype.free; 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_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) Point.prototype[Symbol.dispose] = Point.prototype.free; export const models = {}; models['3d'] = {}; models['3d'].Point3D = Point3D; models.Point = Point; /** * @returns {number} */ export function regular_function() { const ret = wasm.regular_function(); return ret; } /** * @enum {0 | 1 | 2} */ const Status = Object.freeze({ Pending: 0, "0": "Pending", Active: 1, "1": "Active", Complete: 2, "2": "Complete", }); /** * @enum {200 | 404 | 500} */ const HttpStatus = Object.freeze({ Ok: 200, "200": "Ok", NotFound: 404, "404": "NotFound", ServerError: 500, "500": "ServerError", }); export const types = {}; types.Status = Status; types.http = {}; types.http.HttpStatus = HttpStatus; /** * @param {string} s * @returns {string} */ function uppercase2(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 = uppercase2; export function __wbg___wbindgen_throw_1410d59c8e85a52f(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 CounterFinalization = (typeof FinalizationRegistry === 'undefined') ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry(ptr => wasm.__wbg_default__counter_free(ptr >>> 0, 1)); const PointFinalization = (typeof FinalizationRegistry === 'undefined') ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry(ptr => wasm.__wbg_models__point_free(ptr >>> 0, 1)); const Point3DFinalization = (typeof FinalizationRegistry === 'undefined') ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry(ptr => wasm.__wbg_models__3d__point3d_free(ptr >>> 0, 1)); const RectangleFinalization = (typeof FinalizationRegistry === 'undefined') ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry(ptr => wasm.__wbg_rectangle_free(ptr >>> 0, 1)); function getStringFromWasm0(ptr, len) { ptr = ptr >>> 0; return decodeText(ptr, 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_24_keyword_rs stdout ---- thread 'reference::runtest::test_24_keyword_rs' (11791) panicked at crates/cli/tests/wasm-bindgen/reference.rs:121: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_1410d59c8e85a52f(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); } export function __wbg_await_975e1dc09dbe08f1() { await(); } export function __wbg_let_9dc4f48d5a80e219(arg0) { arg0.let(); } export function __wbg_new_1dc11ef8af98fbe0() { > const ret = A.new(); > return ret; } export function __wbg_new_d24b38b8862d926d() { const ret = window.__TAURI__.menu.Menu.new(); return ret; } export function __wbg_new_e27db70340dc1f26() { > B.new(); } export function __wbg_static_accessor_TRUE_c111d6be04efb4a7() { const ret = true; return ret; } export function __wbindgen_init_externref_table() { const table = wasm.__wbindgen_externrefs; const offset = table.grow(4); table.set(0, undefined); table.set(offset + 0, undefined); table.set(offset + 1, null); table.set(offset + 2, true); table.set(offset + 3, false); } function getStringFromWasm0(ptr, len) { ptr = ptr >>> 0; return decodeText(ptr, 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_modules_rs stdout ---- thread 'reference::runtest::test_25_modules_rs' (11798) panicked at crates/cli/tests/wasm-bindgen/reference.rs:121:13: assertion failed: `(left == right)` Diff < left / right > : export function exported() { wasm.exported(); } export function __wbg___wbindgen_throw_1410d59c8e85a52f(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); } export function __wbg_parseFloat_5e1d49366e6f8cc2(arg0) { const ret = parseFloat(arg0); return ret; } export function __wbg_parseFloat_d0aa0a8c6bab3c14(arg0, arg1) { const ret = parseFloat(getStringFromWasm0(arg0, arg1)); return ret; } export function __wbindgen_cast_0000000000000000(arg0, arg1) { // Cast intrinsic for `Ref(String) -> Externref`. const ret = getStringFromWasm0(arg0, arg1); return ret; } export function __wbindgen_init_externref_table() { const table = wasm.__wbindgen_externrefs; const offset = table.grow(4); table.set(0, undefined); table.set(offset + 0, undefined); table.set(offset + 1, null); table.set(offset + 2, true); table.set(offset + 3, false); } function getStringFromWasm0(ptr, len) { ptr = ptr >>> 0; return decodeText(ptr, 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_private_rs stdout ---- thread 'reference::runtest::test_29_private_rs' (11886) panicked at crates/cli/tests/wasm-bindgen/reference.rs:121: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) { ptr = ptr >>> 0; 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 NamespacedHidden { static __wrap(ptr) { ptr = ptr >>> 0; const obj = Object.create(NamespacedHidden.prototype); obj.__wbg_ptr = ptr; NamespacedHiddenFinalization.register(obj, obj.__wbg_ptr, obj); return obj; } __destroy_into_raw() { const ptr = this.__wbg_ptr; this.__wbg_ptr = 0; 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) NamespacedHidden.prototype[Symbol.dispose] = NamespacedHidden.prototype.free; /** * @returns {NamespacedHidden} */ function create_namespaced() { const ret = wasm.internal__create_namespaced(); return NamespacedHidden.__wrap(ret); } export const internal = {}; internal.NamespacedHidden = NamespacedHidden; internal.create_namespaced = 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_1410d59c8e85a52f(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 >>> 0, 1)); const NamespacedHiddenFinalization = (typeof FinalizationRegistry === 'undefined') ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry(ptr => wasm.__wbg_internal__namespacedhidden_free(ptr >>> 0, 1)); const PublicStructFinalization = (typeof FinalizationRegistry === 'undefined') ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry(ptr => wasm.__wbg_publicstruct_free(ptr >>> 0, 1)); function _assertClass(instance, klass) { if (!(instance instanceof klass)) { throw new Error(`expected instance of ${klass.name}`); } } function getStringFromWasm0(ptr, len) { ptr = ptr >>> 0; return decodeText(ptr, len); } let cachedUint8ArrayMemory0 = null; function getUint8ArrayMemory0() { if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) { cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer); } return cachedUint8ArrayMemory0; } let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); cachedTextDecoder.decode(); const MAX_SAFARI_DECODE_BYTES = 2146435072; let numBytesDecoded = 0; function decodeText(ptr, len) { numBytesDecoded += len; if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) { cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); cachedTextDecoder.decode(); numBytesDecoded = len; } return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len)); } let wasm; export function __wbg_set_wasm(val) { wasm = val; } ---- reference::runtest::test_30_raw_rs stdout ---- thread 'reference::runtest::test_30_raw_rs' (11908) panicked at crates/cli/tests/wasm-bindgen/reference.rs:121:13: assertion failed: `(left == right)` Diff < left / right > : export class Test { static __wrap(ptr) { ptr = ptr >>> 0; 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_1410d59c8e85a52f(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 >>> 0, 1)); function getStringFromWasm0(ptr, len) { ptr = ptr >>> 0; return decodeText(ptr, 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_31_reexport_rs stdout ---- thread 'reference::runtest::test_31_reexport_rs' (11930) panicked at crates/cli/tests/wasm-bindgen/reference.rs:121:13: assertion failed: `(left == right)` Diff < left / right > : import { Snippet } from './snippets/reexport_reftest-70a761663a52c772/inline0.js'; import { original_config } from 'config'; import { MY_CONSTANT } from 'constants'; import { default as _default } from 'default-export-lib'; import { helperFunction } from 'helpers'; import { hiddenReexport } from 'hidden-lib'; import { OriginalName } from 'some-library'; import { CustomType } from 'types-lib'; import { original } from 'utils'; import { 'invalid-name' as invalid_name } from 'weird-exports'; export { CustomType } export { MY_CONSTANT } export { OriginalName as RenamedClass } function foo() { wasm.Snippet__foo(); } Snippet.foo = foo; export { Snippet } export { _default as default } export { helperFunction } export { hiddenReexport } export { invalid_name as 'invalid-name' } export { original_config as renamedConfig } export { original as renamedFunction } export function __wbindgen_init_externref_table() { const table = wasm.__wbindgen_externrefs; const offset = table.grow(4); table.set(0, undefined); table.set(offset + 0, undefined); table.set(offset + 1, null); table.set(offset + 2, true); table.set(offset + 3, false); } let wasm; export function __wbg_set_wasm(val) { wasm = val; } ---- reference::runtest::test_32_reserved_class_name_rs stdout ---- thread 'reference::runtest::test_32_reserved_class_name_rs' (11952) panicked at crates/cli/tests/wasm-bindgen/reference.rs:121: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 >>> 0; 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_1410d59c8e85a52f(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); } export function __wbg_new_26ddc2b25ad6ef4b() { const ret = new Array(); return ret; } export function __wbindgen_init_externref_table() { const table = wasm.__wbindgen_externrefs; const offset = table.grow(4); table.set(0, undefined); table.set(offset + 0, undefined); table.set(offset + 1, null); table.set(offset + 2, true); table.set(offset + 3, false); } const Array2Finalization = (typeof FinalizationRegistry === 'undefined') ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry(ptr => wasm.__wbg_array_free(ptr >>> 0, 1)); function getStringFromWasm0(ptr, len) { ptr = ptr >>> 0; return decodeText(ptr, 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_result_rs stdout ---- thread 'reference::runtest::test_33_result_rs' (11974) panicked at crates/cli/tests/wasm-bindgen/reference.rs:121: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_6b76025f32b6dd26(arg0, arg1) { const ret = Error(getStringFromWasm0(arg0, arg1)); return ret; } export function __wbg___wbindgen_throw_1410d59c8e85a52f(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); } export function __wbindgen_cast_0000000000000000(arg0) { // Cast intrinsic for `F64 -> Externref`. const ret = arg0; return ret; } export function __wbindgen_init_externref_table() { const table = wasm.__wbindgen_externrefs; const offset = table.grow(4); table.set(0, undefined); table.set(offset + 0, undefined); table.set(offset + 1, null); table.set(offset + 2, true); table.set(offset + 3, false); } function getStringFromWasm0(ptr, len) { ptr = ptr >>> 0; return decodeText(ptr, 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_34_self_type_rs stdout ---- thread 'reference::runtest::test_34_self_type_rs' (11996) panicked at crates/cli/tests/wasm-bindgen/reference.rs:121: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 >>> 0; 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_1410d59c8e85a52f(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 >>> 0, 1)); function getStringFromWasm0(ptr, len) { ptr = ptr >>> 0; return decodeText(ptr, 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_string_arg_rs stdout ---- thread 'reference::runtest::test_37_string_arg_rs' (12062) panicked at crates/cli/tests/wasm-bindgen/reference.rs:121: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_1410d59c8e85a52f(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) { ptr = ptr >>> 0; return decodeText(ptr, 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; } ---- termination_abort_handler stdout ---- thread 'termination_abort_handler' (12234) panicked at /rustc/e408947bfd200af42db322daf0fadfe7e26d3bd1/library/core/src/ops/function.rs:250:5: 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.118/target/cli-tests/termination_abort_handler" && CARGO_TARGET_DIR="/home/buildozer/aports/community/wasm-bindgen/src/wasm-bindgen-0.2.118/target" RUSTFLAGS="-Cpanic=unwind" RUSTUP_TOOLCHAIN="nightly" "cargo" "build" "--target" "wasm32-unknown-unknown" "-Zbuild-std=std,panic_unwind"` code=101 stdout="" stderr=``` error: the `-Z` flag is only accepted on the nightly channel of Cargo, but this is the `stable` channel See https://doc.rust-lang.org/book/appendix-07-nightly-rust.html for more information about Rust release channels. ``` ---- termination_reinit stdout ---- thread 'termination_reinit' (12238) panicked at /rustc/e408947bfd200af42db322daf0fadfe7e26d3bd1/library/core/src/ops/function.rs:250:5: 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.118/target/cli-tests/termination_reinit" && CARGO_TARGET_DIR="/home/buildozer/aports/community/wasm-bindgen/src/wasm-bindgen-0.2.118/target" RUSTFLAGS="-Cpanic=unwind" RUSTUP_TOOLCHAIN="nightly" "cargo" "build" "--target" "wasm32-unknown-unknown" "-Zbuild-std=std,panic_unwind"` code=101 stdout="" stderr=``` error: the `-Z` flag is only accepted on the nightly channel of Cargo, but this is the `stable` channel See https://doc.rust-lang.org/book/appendix-07-nightly-rust.html for more information about Rust release channels. ``` ---- termination_reinit_auto_detect stdout ---- thread 'termination_reinit_auto_detect' (12242) panicked at /rustc/e408947bfd200af42db322daf0fadfe7e26d3bd1/library/core/src/ops/function.rs:250:5: 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.118/target/cli-tests/termination_reinit_auto_detect" && CARGO_TARGET_DIR="/home/buildozer/aports/community/wasm-bindgen/src/wasm-bindgen-0.2.118/target" RUSTFLAGS="-Cpanic=unwind" RUSTUP_TOOLCHAIN="nightly" "cargo" "build" "--target" "wasm32-unknown-unknown" "-Zbuild-std=std,panic_unwind"` code=101 stdout="" stderr=``` error: the `-Z` flag is only accepted on the nightly channel of Cargo, but this is the `stable` channel See https://doc.rust-lang.org/book/appendix-07-nightly-rust.html for more information about Rust release channels. ``` ---- reference::runtest::test_36_static_rs stdout ---- thread 'reference::runtest::test_36_static_rs' (12040) panicked at crates/cli/tests/wasm-bindgen/reference.rs:121:13: assertion failed: `(left == right)` Diff < left / right > : export function exported() { wasm.exported(); } export function __wbg___wbindgen_throw_1410d59c8e85a52f(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); } export function __wbg_static_accessor_NAMESPACE_OPTIONAL_01cfde4628eccae3() { const ret = typeof test === 'undefined' ? null : test?.NAMESPACE_OPTIONAL; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_NAMESPACE_PLAIN_ab6a266d436ffdfa() { const ret = test.NAMESPACE_PLAIN; return ret; } export function __wbg_static_accessor_NESTED_NAMESPACE_OPTIONAL_13db6b26bb492ea5() { const ret = typeof test1 === 'undefined' ? null : test1?.test2?.NESTED_NAMESPACE_OPTIONAL; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_NESTED_NAMESPACE_PLAIN_5db6fe92577b11f5() { const ret = test1.test2.NESTED_NAMESPACE_PLAIN; return ret; } export function __wbg_static_accessor_OPTIONAL_8799b2023fbd0eac() { const ret = typeof OPTIONAL === 'undefined' ? null : OPTIONAL; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_PLAIN_a1989439758d3221() { const ret = PLAIN; return ret; } export function __wbindgen_init_externref_table() { const table = wasm.__wbindgen_externrefs; const offset = table.grow(4); table.set(0, undefined); table.set(offset + 0, undefined); table.set(offset + 1, null); table.set(offset + 2, true); table.set(offset + 3, false); } function addToExternrefTable0(obj) { const idx = wasm.__externref_table_alloc(); wasm.__wbindgen_externrefs.set(idx, obj); return idx; } function getStringFromWasm0(ptr, len) { ptr = ptr >>> 0; return decodeText(ptr, 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_38_targets_rs stdout ---- thread 'reference::runtest::test_38_targets_rs' (12084) panicked at crates/cli/tests/wasm-bindgen/reference.rs:121:13: assertion failed: `(left == right)` Diff < left / right > : /** * @param {number} a * @param {number} b * @returns {number} */ export function add_that_might_fail(a, b) { const ret = wasm.add_that_might_fail(a, b); return ret >>> 0; } export function __wbg_random_c75248f66ad44ef9() { const ret = Math.random(); return ret; } export function __wbindgen_init_externref_table() { const table = wasm.__wbindgen_externrefs; const offset = table.grow(4); table.set(0, undefined); table.set(offset + 0, undefined); table.set(offset + 1, null); table.set(offset + 2, true); table.set(offset + 3, false); } let wasm; export function __wbg_set_wasm(val) { wasm = val; } ---- reference::runtest::test_39_typescript_type_rs stdout ---- thread 'reference::runtest::test_39_typescript_type_rs' (12106) panicked at crates/cli/tests/wasm-bindgen/reference.rs:121:13: assertion failed: `(left == right)` Diff < left / right > : /** * @param {number | string} a */ export function single(a) { wasm.single(a); } /** * @param {(number | string)[]} a */ export function slice(a) { const ptr0 = passArrayJsValueToWasm0(a, wasm.__wbindgen_malloc); const len0 = WASM_VECTOR_LEN; wasm.slice(ptr0, len0); } export function __wbg___wbindgen_throw_1410d59c8e85a52f(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); } export function __wbindgen_init_externref_table() { const table = wasm.__wbindgen_externrefs; const offset = table.grow(4); table.set(0, undefined); table.set(offset + 0, undefined); table.set(offset + 1, null); table.set(offset + 2, true); table.set(offset + 3, false); } function addToExternrefTable0(obj) { const idx = wasm.__externref_table_alloc(); wasm.__wbindgen_externrefs.set(idx, obj); return idx; } let cachedDataViewMemory0 = null; function getDataViewMemory0() { if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) { cachedDataViewMemory0 = new DataView(wasm.memory.buffer); } return cachedDataViewMemory0; } function getStringFromWasm0(ptr, len) { ptr = ptr >>> 0; return decodeText(ptr, 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_41_wasm_export_types_rs stdout ---- thread 'reference::runtest::test_41_wasm_export_types_rs' (12150) panicked at crates/cli/tests/wasm-bindgen/reference.rs:121: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_6b64449b9b9ed33c: function(arg0, arg1) { > __wbg___wbindgen_throw_1410d59c8e85a52f: 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) { ptr = ptr >>> 0; return decodeText(ptr, 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, wasm; function __wbg_finalize_init(instance, module) { wasm = instance.exports; wasmModule = module; cachedUint8ArrayMemory0 = null; wasm.__wbindgen_start(); return wasm; } async function __wbg_load(module, imports) { if (typeof Response === 'function' && module instanceof Response) { if (typeof WebAssembly.instantiateStreaming === 'function') { try { return await WebAssembly.instantiateStreaming(module, imports); } catch (e) { const validResponse = module.ok && expectedResponseType(module.type); if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') { console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e); } else { throw e; } } } const bytes = await module.arrayBuffer(); return await WebAssembly.instantiate(bytes, imports); } else { const instance = await WebAssembly.instantiate(module, imports); if (instance instanceof WebAssembly.Instance) { return { instance, module }; } else { return instance; } } function expectedResponseType(type) { switch (type) { case 'basic': case 'cors': case 'default': return true; } return false; } } function initSync(module) { if (wasm !== undefined) return wasm; if (module !== undefined) { if (Object.getPrototypeOf(module) === Object.prototype) { ({module} = module) } else { console.warn('using deprecated parameters for `initSync()`; pass a single object instead') } } const imports = __wbg_get_imports(); if (!(module instanceof WebAssembly.Module)) { module = new WebAssembly.Module(module); } const instance = new WebAssembly.Instance(module, imports); return __wbg_finalize_init(instance, module); } async function __wbg_init(module_or_path) { if (wasm !== undefined) return wasm; if (module_or_path !== undefined) { if (Object.getPrototypeOf(module_or_path) === Object.prototype) { ({module_or_path} = module_or_path) } else { console.warn('using deprecated parameters for the initialization function; pass a single object instead') } } if (module_or_path === undefined) { module_or_path = new URL('reference_test_bg.wasm', import.meta.url); } const imports = __wbg_get_imports(); if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) { module_or_path = fetch(module_or_path); } const { instance, module } = await __wbg_load(await module_or_path, imports); return __wbg_finalize_init(instance, module); } export { initSync, __wbg_init as default }; ---- reference::runtest::test_40_wasm_export_colon_rs stdout ---- thread 'reference::runtest::test_40_wasm_export_colon_rs' (12128) panicked at crates/cli/tests/wasm-bindgen/reference.rs:121: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 >>> 0; 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_173fc74caf556f75: function(arg0) { > __wbg_Deno_ab366c4b9a46f71d: function(arg0) { const ret = arg0.Deno; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); }, < __wbg_String_26c8265473c70dd8: function(arg0, arg1) { > __wbg_String_c169d252a5e64c71: 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_3a14602010a3bd95: function() { return handleError(function (arg0, arg1) { > __wbg___wbg_test_invoke_f1945be706ce43b0: function() { return handleError(function (arg0, arg1) { try { var state0 = {a: arg0, b: arg1}; var cb0 = () => { const a = state0.a; state0.a = 0; try { return wasm_bindgen__convert__closures_____invoke__h0000000000000003(a, state0.b, ); } finally { state0.a = a; } }; __wbg_test_invoke(cb0); } finally { state0.a = 0; } }, arguments); }, < __wbg___wbg_test_output_writeln_f53cfc32799965bf: function(arg0) { > __wbg___wbg_test_output_writeln_cee765e1e6b5368e: function(arg0) { __wbg_test_output_writeln(arg0); }, < __wbg___wbgtest_og_console_log_3faab872ddb58658: function(arg0, arg1) { > __wbg___wbgtest_og_console_log_bd9f0986b582139f: function(arg0, arg1) { __wbgtest_og_console_log(getStringFromWasm0(arg0, arg1)); }, < __wbg___wbindgen_debug_string_ab4b34d23d6778bd: function(arg0, arg1) { > __wbg___wbindgen_debug_string_5a55e4e124bee7e9: 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_3baa9db1a987f47d: function(arg0) { > __wbg___wbindgen_is_function_61e3cf6ff89514dd: function(arg0) { const ret = typeof(arg0) === 'function'; return ret; }, < __wbg___wbindgen_is_undefined_29a43b4d42920abd: function(arg0) { > __wbg___wbindgen_is_undefined_e306d09f09e981f5: function(arg0) { const ret = arg0 === undefined; return ret; }, < __wbg___wbindgen_string_get_7ed5322991caaec5: function(arg0, arg1) { > __wbg___wbindgen_string_get_f1e4a54bccd84807: 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_6b64449b9b9ed33c: function(arg0, arg1) { > __wbg___wbindgen_throw_1410d59c8e85a52f: function(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); }, < __wbg__wbg_cb_unref_b46c9b5a9f08ec37: function(arg0) { > __wbg__wbg_cb_unref_69ddae1f7a92abad: function(arg0) { arg0._wbg_cb_unref(); }, < __wbg_call_a24592a6f349a97e: function() { return handleError(function (arg0, arg1, arg2) { > __wbg_call_0b6d062449586dee: function() { return handleError(function (arg0, arg1, arg2) { const ret = arg0.call(arg1, arg2); return ret; }, arguments); }, < __wbg_constructor_8713802a1c774ccf: function(arg0) { > __wbg_constructor_6dc6a7243609ad15: function(arg0) { const ret = arg0.constructor; return ret; }, < __wbg_error_b069f072b02d441d: function(arg0, arg1) { > __wbg_error_d9d3edd486d03dbe: function(arg0, arg1) { console.error(getStringFromWasm0(arg0, arg1)); }, < __wbg_forEach_99add773fc5cd5e6: function(arg0, arg1, arg2) { > __wbg_forEach_003ca89298f60e36: function(arg0, arg1, arg2) { try { var state0 = {a: arg1, b: arg2}; var cb0 = (arg0, arg1, arg2) => { const a = state0.a; state0.a = 0; try { return wasm_bindgen__convert__closures_____invoke__h0000000000000004(a, state0.b, arg0, arg1, arg2); } finally { state0.a = a; } }; arg0.forEach(cb0); } finally { state0.a = 0; } }, < __wbg_getElementById_64495d207a556664: function(arg0, arg1, arg2) { > __wbg_getElementById_611faa2b8d324187: function(arg0, arg1, arg2) { const ret = arg0.getElementById(getStringFromWasm0(arg1, arg2)); return ret; }, < __wbg_log_25aa23d07a6c5fc5: function(arg0, arg1) { > __wbg_log_ebf0f172e723c305: function(arg0, arg1) { console.log(getStringFromWasm0(arg0, arg1)); }, < __wbg_message_cb4f84ee66e5e341: function(arg0) { > __wbg_message_c7b2480811c422b2: function(arg0) { const ret = arg0.message; return ret; }, < __wbg_name_4042d1d7bd3559e7: function(arg0, arg1) { > __wbg_name_468b7c4dcd2e04e6: function(arg0) { > const ret = arg0.name; > return ret; > }, > __wbg_name_a8056e29c9c9f1a3: 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_d3c35622d14bb080: function(arg0) { < const ret = arg0.name; < return ret; < }, < __wbg_new_cb2a314576635710: function() { > __wbg_new_454c2a60b56bd6b9: function() { const ret = new Error(); return ret; }, < __wbg_new_typed_323f37fd55ab048d: function(arg0, arg1) { > __wbg_new_typed_42dff9f5059d7cd7: function(arg0, arg1) { try { var state0 = {a: arg0, b: arg1}; var cb0 = (arg0, arg1) => { const a = state0.a; state0.a = 0; try { return wasm_bindgen__convert__closures_____invoke__h0000000000000005(a, state0.b, arg0, arg1); } finally { state0.a = a; } }; const ret = new Promise(cb0); return ret; } finally { state0.a = 0; } }, < __wbg_now_f583f05f4ed894e2: function(arg0) { > __wbg_now_c38ed8c8890c11e7: function(arg0) { const ret = arg0.now(); return ret; }, < __wbg_performance_ce6182246e03f6e4: function(arg0) { > __wbg_performance_5275b80eb5f288f7: function(arg0) { const ret = arg0.performance; return ret; }, < __wbg_queueMicrotask_5d15a957e6aa920e: function(arg0) { < queueMicrotask(arg0); < }, < __wbg_queueMicrotask_f8819e5ffc402f36: function(arg0) { > __wbg_queueMicrotask_0d85784cb6a8da70: function(arg0) { const ret = arg0.queueMicrotask; return ret; }, < __wbg_resolve_e6c466bc1052f16c: function(arg0) { > __wbg_queueMicrotask_ee1c789a0d5cecbd: function(arg0) { > queueMicrotask(arg0); > }, > __wbg_resolve_5be899cf0ad1a4f7: function(arg0) { const ret = Promise.resolve(arg0); return ret; }, < __wbg_run_0b0a622deae25fda: function(arg0, arg1, arg2) { > __wbg_run_cac2bbcc87b83973: function(arg0, arg1, arg2) { try { var state0 = {a: arg1, b: arg2}; var cb0 = () => { const a = state0.a; state0.a = 0; try { return wasm_bindgen__convert__closures_____invoke__h0000000000000006(a, state0.b, ); } finally { state0.a = a; } }; const ret = arg0.run(cb0); return ret; } finally { state0.a = 0; } }, < __wbg_self_f6dd7190276bb467: function(arg0) { > __wbg_self_88002b568bd0a06e: function(arg0) { const ret = arg0.self; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); }, < __wbg_set_text_content_f8314d87399890ad: function(arg0, arg1, arg2) { > __wbg_set_text_content_8623ea2b25d721f5: function(arg0, arg1, arg2) { arg0.textContent = getStringFromWasm0(arg1, arg2); }, < __wbg_stack_1a655760b7b0bcd6: function(arg0, arg1) { > __wbg_stack_08266e714e16eb57: function(arg0, arg1) { const ret = arg1.stack; < var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); < var len1 = WASM_VECTOR_LEN; > const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); > const len1 = WASM_VECTOR_LEN; getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); }, < __wbg_stack_8e7038c7dfb8ef0c: function(arg0) { > __wbg_stack_5795d6bf22b57389: function(arg0) { const ret = arg0.stack; return ret; }, < __wbg_stack_9a9286075fee826b: function(arg0, arg1) { > __wbg_stack_b30fa13586851f8a: function(arg0, arg1) { const ret = arg1.stack; < const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); < const len1 = WASM_VECTOR_LEN; > var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); > var len1 = WASM_VECTOR_LEN; getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); }, < __wbg_stack_b8010bb01b0907e0: function(arg0) { > __wbg_stack_d1da441911eac90b: function(arg0) { const ret = arg0.stack; return ret; }, < __wbg_static_accessor_CREATE_TASK_f3ab6a6954bda493: function() { > __wbg_static_accessor_CREATE_TASK_7eafddd62448d762: function() { const ret = typeof console === 'undefined' ? null : console?.createTask; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); }, < __wbg_static_accessor_DOCUMENT_5c19d4b0f2dbe384: function() { > __wbg_static_accessor_DOCUMENT_7c9ae861885ffe2c: function() { const ret = document; return ret; }, < __wbg_static_accessor_GLOBAL_8cfadc87a297ca02: function() { > __wbg_static_accessor_GLOBAL_537d0dde263d32a6: function() { const ret = typeof global === 'undefined' ? null : global; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); }, < __wbg_static_accessor_GLOBAL_THIS_602256ae5c8f42cf: function() { > __wbg_static_accessor_GLOBAL_THIS_60afdc9b804a8ae9: function() { const ret = typeof globalThis === 'undefined' ? null : globalThis; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); }, < __wbg_static_accessor_SELF_e445c1c7484aecc3: function() { > __wbg_static_accessor_SELF_26ab35c2b64d08d1: function() { const ret = typeof self === 'undefined' ? null : self; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); }, < __wbg_static_accessor_WINDOW_f20e8576ef1e0f17: function() { > __wbg_static_accessor_WINDOW_9eec70044baf7346: function() { const ret = typeof window === 'undefined' ? null : window; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); }, < __wbg_text_content_e82293d2152fc35c: function(arg0, arg1) { > __wbg_text_content_80e8052f7014335c: 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_8e16ee11f05e4827: function(arg0, arg1) { > __wbg_then_3330f4d0372e69f5: function(arg0, arg1) { const ret = arg0.then(arg1); return ret; }, < __wbg_toString_f628025b410a36d6: function() { return handleError(function (arg0, arg1) { > __wbg_toString_53e6fb17ae7926ce: function() { return handleError(function (arg0, arg1) { const ret = arg1.toString(); const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); const len1 = WASM_VECTOR_LEN; getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); }, arguments); }, __wbindgen_cast_0000000000000000: function(arg0, arg1) { // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 8, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`. const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h0000000000000007); return ret; }, __wbindgen_cast_0000000000000001: function(arg0) { // Cast intrinsic for `F64 -> Externref`. const ret = arg0; return ret; }, __wbindgen_cast_0000000000000002: function(arg0, arg1) { // Cast intrinsic for `Ref(String) -> Externref`. const ret = getStringFromWasm0(arg0, arg1); return ret; }, __wbindgen_init_externref_table: function() { const table = wasm.__wbindgen_externrefs; const offset = table.grow(4); table.set(0, undefined); table.set(offset + 0, undefined); table.set(offset + 1, null); table.set(offset + 2, true); table.set(offset + 3, false); }, }; return { __proto__: null, "./reference_test_bg.js": import0, }; } function wasm_bindgen__convert__closures_____invoke__h0000000000000003(arg0, arg1) { wasm.wasm_bindgen__convert__closures_____invoke__h0000000000000003(arg0, arg1); } function wasm_bindgen__convert__closures_____invoke__h0000000000000006(arg0, arg1) { const ret = wasm.wasm_bindgen__convert__closures_____invoke__h0000000000000006(arg0, arg1); return ret !== 0; } function wasm_bindgen__convert__closures_____invoke__h0000000000000007(arg0, arg1, arg2) { const ret = wasm.wasm_bindgen__convert__closures_____invoke__h0000000000000007(arg0, arg1, arg2); if (ret[1]) { throw takeFromExternrefTable0(ret[0]); } } function wasm_bindgen__convert__closures_____invoke__h0000000000000005(arg0, arg1, arg2, arg3) { wasm.wasm_bindgen__convert__closures_____invoke__h0000000000000005(arg0, arg1, arg2, arg3); } function wasm_bindgen__convert__closures_____invoke__h0000000000000004(arg0, arg1, arg2, arg3, arg4) { wasm.wasm_bindgen__convert__closures_____invoke__h0000000000000004(arg0, arg1, arg2, arg3, arg4); } const WasmBindgenTestContextFinalization = (typeof FinalizationRegistry === 'undefined') ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry(ptr => wasm.__wbg_wasmbindgentestcontext_free(ptr >>> 0, 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) { ptr = ptr >>> 0; return decodeText(ptr, 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, wasm; function __wbg_finalize_init(instance, module) { wasm = instance.exports; wasmModule = module; cachedDataViewMemory0 = null; cachedUint8ArrayMemory0 = null; wasm.__wbindgen_start(); return wasm; } async function __wbg_load(module, imports) { if (typeof Response === 'function' && module instanceof Response) { if (typeof WebAssembly.instantiateStreaming === 'function') { try { return await WebAssembly.instantiateStreaming(module, imports); } catch (e) { const validResponse = module.ok && expectedResponseType(module.type); if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') { console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e); } else { throw e; } } } const bytes = await module.arrayBuffer(); return await WebAssembly.instantiate(bytes, imports); } else { const instance = await WebAssembly.instantiate(module, imports); if (instance instanceof WebAssembly.Instance) { return { instance, module }; } else { return instance; } } function expectedResponseType(type) { switch (type) { case 'basic': case 'cors': case 'default': return true; } return false; } } function initSync(module) { if (wasm !== undefined) return wasm; if (module !== undefined) { if (Object.getPrototypeOf(module) === Object.prototype) { ({module} = module) } else { console.warn('using deprecated parameters for `initSync()`; pass a single object instead') } } const imports = __wbg_get_imports(); if (!(module instanceof WebAssembly.Module)) { module = new WebAssembly.Module(module); } const instance = new WebAssembly.Instance(module, imports); return __wbg_finalize_init(instance, module); } async function __wbg_init(module_or_path) { if (wasm !== undefined) return wasm; if (module_or_path !== undefined) { if (Object.getPrototypeOf(module_or_path) === Object.prototype) { ({module_or_path} = module_or_path) } else { console.warn('using deprecated parameters for the initialization function; pass a single object instead') } } if (module_or_path === undefined) { module_or_path = new URL('reference_test_bg.wasm', import.meta.url); } const imports = __wbg_get_imports(); if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) { module_or_path = fetch(module_or_path); } const { instance, module } = await __wbg_load(await module_or_path, imports); return __wbg_finalize_init(instance, module); } export { initSync, __wbg_init as default }; ---- reference::runtest::test_42_web_sys_rs stdout ---- thread 'reference::runtest::test_42_web_sys_rs' (12172) panicked at crates/cli/tests/wasm-bindgen/reference.rs:121: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_5a55e4e124bee7e9(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_1410d59c8e85a52f(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); } export function __wbg_new_cda0b7618a3d6af2() { 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) { ptr = ptr >>> 0; return decodeText(ptr, len); } let cachedUint8ArrayMemory0 = null; function getUint8ArrayMemory0() { if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) { cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer); } return cachedUint8ArrayMemory0; } function handleError(f, args) { try { return f.apply(this, args); } catch (e) { const idx = addToExternrefTable0(e); wasm.__wbindgen_exn_store(idx); } } function passStringToWasm0(arg, malloc, realloc) { if (realloc === undefined) { const buf = cachedTextEncoder.encode(arg); const ptr = malloc(buf.length, 1) >>> 0; getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf); WASM_VECTOR_LEN = buf.length; return ptr; } let len = arg.length; let ptr = malloc(len, 1) >>> 0; const mem = getUint8ArrayMemory0(); let offset = 0; for (; offset < len; offset++) { const code = arg.charCodeAt(offset); if (code > 0x7F) break; mem[ptr + offset] = code; } if (offset !== len) { if (offset !== 0) { arg = arg.slice(offset); } ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0; const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len); const ret = cachedTextEncoder.encodeInto(arg, view); offset += ret.written; ptr = realloc(ptr, len, offset, 1) >>> 0; } WASM_VECTOR_LEN = offset; return ptr; } let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); cachedTextDecoder.decode(); const MAX_SAFARI_DECODE_BYTES = 2146435072; let numBytesDecoded = 0; function decodeText(ptr, len) { numBytesDecoded += len; if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) { cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); cachedTextDecoder.decode(); numBytesDecoded = len; } return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len)); } const cachedTextEncoder = new TextEncoder(); if (!('encodeInto' in cachedTextEncoder)) { cachedTextEncoder.encodeInto = function (arg, view) { const buf = cachedTextEncoder.encode(arg); view.set(buf); return { read: arg.length, written: buf.length }; }; } let WASM_VECTOR_LEN = 0; let wasm; export function __wbg_set_wasm(val) { wasm = val; } failures: reference::no_duplicate_wasm_export_in_node_esm_atomics_debug reference::runtest::test_03_anyref_import_catch_rs reference::runtest::test_05_async_number_rs reference::runtest::test_06_async_void_rs reference::runtest::test_07_builder_rs reference::runtest::test_08_closures_rs reference::runtest::test_09_constructor_rs reference::runtest::test_11_default_class_rs reference::runtest::test_13_echo_rs reference::runtest::test_15_enums_rs reference::runtest::test_16_function_attrs_rs reference::runtest::test_17_getter_setter_rs reference::runtest::test_18_import_getter_setter_rs reference::runtest::test_19_import_rs reference::runtest::test_20_int128_rs reference::runtest::test_21_intrinsic_only_rs reference::runtest::test_22_js_namespace_export_same_name_rs reference::runtest::test_23_js_namespace_export_rs reference::runtest::test_24_keyword_rs reference::runtest::test_25_modules_rs reference::runtest::test_29_private_rs reference::runtest::test_30_raw_rs reference::runtest::test_31_reexport_rs reference::runtest::test_32_reserved_class_name_rs reference::runtest::test_33_result_rs reference::runtest::test_34_self_type_rs reference::runtest::test_36_static_rs reference::runtest::test_37_string_arg_rs reference::runtest::test_38_targets_rs reference::runtest::test_39_typescript_type_rs reference::runtest::test_40_wasm_export_colon_rs reference::runtest::test_41_wasm_export_types_rs reference::runtest::test_42_web_sys_rs termination_abort_handler termination_reinit termination_reinit_auto_detect test result: FAILED. 29 passed; 36 failed; 0 ignored; 0 measured; 0 filtered out; finished in 62.84s 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.118/target/debug/deps/wasm_bindgen_test_runner-1034b1c00a80b927) running 41 tests test headless_streaming_tests::test_browser_no_carriage_return_in_output ... ok test headless_streaming_tests::test_browser_console_no_panic_headless ... ok test headless_streaming_tests::test_default_console_panic_headless ... ok test headless_streaming_tests::test_browser_output_not_garbled ... ok test headless_streaming_tests::test_default_console_no_panic_headless ... ok test headless_streaming_tests::test_default_no_carriage_return_in_output ... ok test headless_streaming_tests::test_browser_console_panic_headless ... ok test headless_streaming_tests::test_default_output_not_garbled ... ok test headless_streaming_tests::test_service_worker_console_no_panic_headless ... ok test headless_streaming_tests::test_headless_worker_output_visible_with_no_stream ... ok test headless_streaming_tests::test_headless_worker_output_not_garbled ... ok test headless_streaming_tests::test_no_carriage_return_in_output ... ok test headless_streaming_tests::test_service_worker_console_panic_headless ... ok test headless_streaming_tests::test_service_worker_no_carriage_return_in_output ... ok test headless_streaming_tests::test_shared_worker_console_no_panic_headless ... ok test headless_streaming_tests::test_service_worker_output_not_garbled ... ok test headless_streaming_tests::test_shared_worker_no_carriage_return_in_output ... ok test headless_streaming_tests::test_shared_worker_console_panic_headless ... ok test headless_streaming_tests::test_shared_worker_output_not_garbled ... ok test headless_streaming_tests::test_user_spawned_data_url_shared_worker_does_not_inject_browser ... ok test headless_streaming_tests::test_user_spawned_data_url_worker_does_not_inject_browser ... ok test headless_streaming_tests::test_user_spawned_dedicated_worker_logs_browser ... ok test headless_streaming_tests::test_user_spawned_module_worker_logs_browser ... ok test headless_streaming_tests::test_user_spawned_nested_worker_logs_browser ... ok test headless_streaming_tests::test_user_spawned_shared_worker_logs_browser ... ok test headless_streaming_tests::test_user_spawned_shared_worker_logs_on_failure_browser ... ok test headless_streaming_tests::test_user_spawned_shared_worker_non_cloneable_log_does_not_crash_browser ... ok test headless_streaming_tests::test_user_spawned_shared_worker_top_level_logs_browser ... ok test headless_streaming_tests::test_user_spawned_url_module_worker_logs_browser ... ok test headless_streaming_tests::test_user_spawned_url_worker_logs_browser ... ok test headless_streaming_tests::test_user_spawned_worker_add_event_listener_coexists_browser ... ok test headless_streaming_tests::test_user_spawned_worker_logs_on_failure_browser ... ok test headless_streaming_tests::test_user_spawned_worker_non_cloneable_log_does_not_crash_browser ... ok test headless_streaming_tests::test_worker_console_no_panic_nocapture ... ok test headless_streaming_tests::test_worker_console_panic_headless ... ok test headless_streaming_tests::test_worker_console_no_panic_headless ... ok test headless_streaming_tests::test_worker_console_panic_nocapture ... ok test headless_streaming_tests::test_user_spawned_worker_logs_on_failure_node ... ok test headless_streaming_tests::test_user_spawned_worker_logs_node_cjs ... ok test headless_streaming_tests::test_user_spawned_worker_logs_node_esm ... ok test test_wasm_bindgen_test_runner_list has been running for over 60 seconds test test_wasm_bindgen_test_runner_list ... ok test result: ok. 41 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 62.91s 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 Please specify at least one package name on the command line. >>> wasm-bindgen*: Scanning shared objects >>> wasm-bindgen*: Tracing dependencies... cargo nodejs rust-wasm so:libc.musl-s390x.so.1 so:libgcc_s.so.1 >>> wasm-bindgen*: Package size: 10.9 MB >>> wasm-bindgen*: Compressing data... >>> wasm-bindgen*: Create checksum... >>> wasm-bindgen*: Create wasm-bindgen-0.2.118-r0.apk >>> wasm-bindgen: Build complete at Sun, 19 Apr 2026 19:26:01 +0000 elapsed time 0h 4m 23s >>> wasm-bindgen: Cleaning up srcdir >>> wasm-bindgen: Cleaning up pkgdir >>> wasm-bindgen: Uninstalling dependencies... ( 1/21) Purging .makedepends-wasm-bindgen (20260419.192138) ( 2/21) Purging nodejs (24.14.1-r0) ( 3/21) Purging ca-certificates (20260413-r0) Executing ca-certificates-20260413-r0.post-deinstall ( 4/21) Purging rust-wasm (1.94.1-r1) ( 5/21) Purging wasi-libc (0.20250204-r1) ( 6/21) Purging cargo-auditable (0.7.4-r0) ( 7/21) Purging ada-libs (3.3.0-r0) ( 8/21) Purging cargo (1.94.1-r1) ( 9/21) Purging rust (1.94.1-r1) (10/21) Purging icu-libs (78.1-r0) (11/21) Purging lld22 (22.1.3-r0) (12/21) Purging lld22-libs (22.1.3-r0) (13/21) Purging llvm22-libs (22.1.3-r0) (14/21) Purging scudo-malloc (22.1.3-r0) (15/21) Purging simdjson (4.2.4-r0) (16/21) Purging simdutf (8.2.0-r0) (17/21) Purging sqlite-libs (3.53.0-r0) (18/21) Purging icu-data-en (78.1-r0) (19/21) Purging libffi (3.5.2-r1) (20/21) Purging libxml2 (2.13.9-r1) (21/21) Purging xz-libs (5.8.2-r0) Executing busybox-1.37.0-r31.trigger OK: 385.7 MiB in 105 packages >>> wasm-bindgen: Updating the community/s390x repository index... >>> wasm-bindgen: Signing the index...