>>> wasm-bindgen: Building community/wasm-bindgen 0.2.118-r0 (using abuild 3.17.0_rc1-r2) started Mon, 27 Apr 2026 21:45:04 +0000 >>> wasm-bindgen: Validating /home/buildozer/aports/community/wasm-bindgen/APKBUILD... >>> wasm-bindgen: Analyzing dependencies... >>> wasm-bindgen: Installing for build: build-base cargo nodejs rust-wasm cargo-auditable ( 1/21) Installing libffi (3.5.2-r1) ( 2/21) Installing xz-libs (5.8.3-r0) ( 3/21) Installing libxml2 (2.13.9-r1) ( 4/21) Installing llvm22-libs (22.1.3-r0) ( 5/21) Installing scudo-malloc (22.1.3-r0) ( 6/21) Installing rust (1.95.0-r0) ( 7/21) Installing sqlite-libs (3.53.0-r0) ( 8/21) Installing cargo (1.95.0-r0) ( 9/21) Installing ca-certificates (20260413-r0) (10/21) Installing ada-libs (3.3.0-r0) (11/21) Installing icu-data-en (78.1-r0) Executing icu-data-en-78.1-r0.post-install * If you need ICU with non-English locales and legacy charset support, install * package icu-data-full. (12/21) Installing icu-libs (78.1-r0) (13/21) Installing simdjson (4.2.4-r0) (14/21) Installing simdutf (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.95.0-r0) (20/21) Installing cargo-auditable (0.7.4-r0) (21/21) Installing .makedepends-wasm-bindgen (20260427.214506) Executing busybox-1.37.0-r31.trigger Executing ca-certificates-20260413-r0.trigger OK: 1249.4 MiB in 123 packages >>> wasm-bindgen: Cleaning up srcdir >>> wasm-bindgen: Cleaning up pkgdir >>> wasm-bindgen: Cleaning up tmpdir >>> wasm-bindgen: Fetching https://distfiles.alpinelinux.org/distfiles/v3.24/wasm-bindgen-0.2.118.tar.gz Connecting to distfiles.alpinelinux.org (172.105.82.32:443) saving to '/var/cache/distfiles/v3.24/wasm-bindgen-0.2.118.tar.gz.part' wasm-bindgen-0.2.118 100% |********************************| 2316k 0:00:00 ETA '/var/cache/distfiles/v3.24/wasm-bindgen-0.2.118.tar.gz.part' saved /var/cache/distfiles/v3.24/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/v3.24/wasm-bindgen-0.2.118.tar.gz /var/cache/distfiles/v3.24/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/v3.24/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-core v0.3.32 Downloaded yoke-derive v0.8.2 Downloaded cast v0.3.0 Downloaded http-body v1.0.1 Downloaded tower-layer v0.3.3 Downloaded shlex v1.3.0 Downloaded openssl-probe v0.2.1 Downloaded ppv-lite86 v0.2.21 Downloaded bitflags v0.7.0 Downloaded crossbeam-utils v0.8.21 Downloaded futures-core-preview v0.3.0-alpha.19 Downloaded strsim v0.11.1 Downloaded clap_lex v1.1.0 Downloaded num-conv v0.2.1 Downloaded num_threads v0.1.7 Downloaded termtree v0.5.1 Downloaded assert_cmd v2.2.1 Downloaded predicates v3.1.4 Downloaded diff v0.1.13 Downloaded yansi v1.0.1 Downloaded nom v5.1.3 Downloaded rustix v1.1.4 Downloaded filetime v0.2.27 Downloaded paste v1.0.15 Downloaded bytemuck v1.25.0 Downloaded safe_arch v0.7.4 Downloaded time v0.3.47 Downloaded statrs v0.18.0 Downloaded syn v2.0.117 Downloaded rawpointer v0.2.1 Downloaded num-rational v0.4.2 Downloaded num-complex v0.4.6 Downloaded matrixmultiply v0.3.10 Downloaded num-bigint v0.4.6 Downloaded console_error_panic_hook v0.1.7 Downloaded rand_distr v0.4.3 Downloaded nalgebra v0.33.3 Downloaded approx v0.5.1 Downloaded bstr v1.12.1 Downloaded rustls v0.23.38 Downloaded wasmparser v0.247.0 Downloaded wide v0.7.33 Downloaded jiff v0.2.23 Downloaded typenum v1.19.0 Downloaded simba v0.9.1 Downloaded libc v0.2.185 Downloaded tokio v1.52.1 Downloaded webpki-roots v1.0.7 Downloaded pretty_assertions v1.4.1 Downloaded base64 v0.13.1 Downloaded buf_redux v0.8.4 Downloaded unicase v2.9.0 Downloaded safemem v0.3.3 Downloaded rand v0.8.6 Downloaded sourcefile v0.2.1 Downloaded weedle v0.13.1 Downloaded ring v0.17.14 Downloaded gg-alloc v1.0.0 Downloaded aho-corasick v1.1.4 Downloaded winnow v1.0.1 Downloaded mime_guess v2.0.5 Downloaded quick-error v1.2.3 Downloaded twoway v0.1.8 Downloaded multipart v0.18.0 Downloaded rand_chacha v0.3.1 Downloaded rand_core v0.6.4 Downloaded sha1_smol v1.0.1 Downloaded num_cpus v1.17.0 Downloaded threadpool v1.8.1 Downloaded wast v247.0.0 Downloaded ureq v3.3.0 Downloaded tower-http v0.6.8 Downloaded icu_properties_data v2.2.0 Downloaded hashbrown v0.17.0 Downloaded iri-string v0.7.12 Downloaded zerovec v0.11.6 Downloaded linux-raw-sys v0.12.1 Downloaded idna v1.1.0 Downloaded reqwest v0.13.2 Downloaded libm v0.2.16 Downloaded serde_json v1.0.149 Downloaded futures-util v0.3.32 Downloaded rouille v3.6.2 Downloaded fastrand v2.4.1 Downloaded simd-adler32 v0.3.9 Downloaded tower v0.5.3 Downloaded mio v1.2.0 Downloaded tiny_http v0.12.0 Downloaded getrandom v0.4.2 Downloaded alloc-no-stdlib v2.0.4 Downloaded alloc-stdlib v0.2.2 Downloaded brotli-decompressor v5.0.0 Downloaded adler2 v2.0.1 Downloaded flate2 v1.1.9 Downloaded toml_edit v0.25.11+spec-1.1.0 Downloaded wasm-encoder v0.247.0 Downloaded http v1.4.0 Downloaded indexmap v2.14.0 Downloaded ascii v1.1.0 Downloaded errno v0.3.14 Downloaded tempfile v3.27.0 Downloaded base64ct v1.8.3 Downloaded der v0.8.0 Downloaded crc32fast v1.5.0 Downloaded miniz_oxide v0.8.9 Downloaded openssl-macros v0.1.1 Downloaded openssl v0.10.77 Downloaded pkg-config v0.3.33 Downloaded openssl-sys v0.9.113 Downloaded ureq-proto v0.6.0 Downloaded utf8-zero v0.8.1 Downloaded wasmprinter v0.245.1 Downloaded rustls-webpki v0.103.12 Downloaded icu_normalizer v2.2.0 Downloaded zerotrie v0.2.4 Downloaded serde v1.0.228 Downloaded pem-rfc7468 v1.0.0 Downloaded foreign-types-shared v0.1.1 Downloaded foreign-types v0.3.2 Downloaded vcpkg v0.2.15 Downloaded native-tls v0.2.18 Downloaded webpki-root-certs v1.0.7 Downloaded gimli v0.32.3 Downloaded wasmparser v0.245.1 Downloaded wasmparser v0.243.0 Downloaded wasm-encoder v0.243.0 Downloaded unicode-width v0.2.2 Downloaded icu_collections v2.2.0 Downloaded icu_locale_core v2.2.0 Downloaded icu_provider v2.2.0 Downloaded aws-lc-sys v0.40.0 Downloaded url v2.5.8 Downloaded bumpalo v3.20.2 Downloaded bytes v1.11.1 Downloaded unicode-ident v1.0.24 Downloaded predicates-tree v1.0.13 Downloaded wait-timeout v0.2.1 Downloaded difflib v0.4.0 Downloaded openssl-src v300.6.0+3.6.2 Downloaded inflate v0.1.1 Downloaded png v0.6.2 Downloaded float-cmp v0.10.0 Downloaded image v0.12.4 Downloaded normalize-line-endings v0.3.0 Downloaded predicates-core v1.0.10 Downloaded deranged v0.5.8 Downloaded rstest_macros v0.26.1 Downloaded rstest v0.26.1 Downloaded wasm-encoder v0.245.1 Downloaded walrus v0.26.1 Downloaded anyhow v1.0.102 Downloaded wast v243.0.0 Downloaded icu_normalizer_data v2.2.0 Downloaded proc-macro2 v1.0.106 Downloaded powerfmt v0.2.0 Downloaded time-core v0.1.8 Downloaded chunked_transfer v1.5.0 Downloaded httpdate v1.0.3 Downloaded futures-timer v3.0.3 Downloaded relative-path v1.9.3 Downloaded rustc-demangle v0.1.27 Downloaded fallible-iterator v0.3.0 Downloaded id-arena v2.3.0 Downloaded leb128 v0.2.5 Downloaded walrus-macro v0.26.0 Downloaded foldhash v0.2.0 Downloaded hashbrown v0.16.1 Downloaded wasmprinter v0.243.0 Downloaded leb128fmt v0.1.0 Downloaded semver v1.0.28 Downloaded encoding_rs v0.8.35 Downloaded num-traits v0.2.19 Downloaded socket2 v0.6.3 Downloaded serde_derive v1.0.228 Downloaded serde_core v1.0.228 Downloaded memchr v2.8.0 Downloaded proc-macro-crate v3.5.0 Downloaded rustc_version v0.4.1 Downloaded wat v1.247.0 Downloaded clap_builder v4.6.0 Downloaded anstream v1.0.0 Downloaded anstyle v1.0.14 Downloaded regex-automata v0.4.14 Downloaded regex-syntax v0.8.10 Downloaded crossbeam-epoch v0.9.18 Downloaded tracing v0.1.44 Downloaded icu_properties v2.2.0 Downloaded smallvec v1.15.1 Downloaded futures v0.3.32 Downloaded toml_parser v1.1.2+spec-1.1.0 Downloaded toml v1.1.2+spec-1.1.0 Downloaded trybuild v1.0.116 Downloaded clap v4.6.1 Downloaded anstyle-parse v1.0.0 Downloaded anstyle-query v1.1.5 Downloaded colorchoice v1.0.5 Downloaded is_terminal_polyfill v1.70.2 Downloaded utf8parse v0.2.2 Downloaded regex v1.12.3 Downloaded version_check v0.9.5 Downloaded humantime v2.3.0 Downloaded futures-channel-preview v0.3.0-alpha.19 Downloaded gif v0.9.2 Downloaded jpeg-decoder v0.1.22 Downloaded gloo v0.11.0 Downloaded h2 v0.4.13 Downloaded zerocopy v0.8.48 Downloaded quinn-proto v0.11.14 Downloaded aws-lc-rs v1.16.3 Downloaded tokio-rustls v0.26.4 Downloaded bitflags v2.11.1 Downloaded litemap v0.8.2 Downloaded clap_derive v4.6.1 Downloaded env_filter v1.0.1 Downloaded env_logger v0.11.10 Downloaded heck v0.5.0 Downloaded lazy_static v1.5.0 Downloaded either v1.15.0 Downloaded crossbeam-deque v0.8.6 Downloaded rayon v1.12.0 Downloaded deflate v0.7.20 Downloaded askama_derive v0.15.6 Downloaded chrono v0.4.44 Downloaded http v0.2.12 Downloaded winnow v0.5.40 Downloaded toml_edit v0.19.15 Downloaded json v0.12.4 Downloaded tokio-util v0.7.18 Downloaded hyper v1.9.0 Downloaded hyper-util v0.1.20 Downloaded zerocopy-derive v0.8.48 Downloaded rustls-pki-types v1.14.0 Downloaded zeroize v1.8.2 Downloaded yoke v0.8.2 Downloaded futures-executor v0.3.32 Downloaded glob v0.3.3 Downloaded zmij v1.0.21 Downloaded futures-channel v0.3.32 Downloaded enum_primitive v0.1.1 Downloaded color_quant v1.1.0 Downloaded lzw v0.10.0 Downloaded rayon-core v1.13.0 Downloaded askama_parser v0.15.6 Downloaded basic-toml v0.1.10 Downloaded serde-wasm-bindgen v0.6.5 Downloaded ryu v1.0.23 Downloaded gloo-history v0.2.2 Downloaded pin-project v1.1.11 Downloaded bincode v1.3.3 Downloaded thiserror-impl v1.0.69 Downloaded thiserror v1.0.69 Downloaded hyper-rustls v0.27.9 Downloaded base64 v0.22.1 Downloaded rand v0.9.4 Downloaded quinn-udp v0.5.14 Downloaded quinn v0.11.9 Downloaded rustls-platform-verifier v0.6.2 Downloaded displaydoc v0.2.5 Downloaded zerovec-derive v0.11.3 Downloaded rustversion v1.0.22 Downloaded async-trait v0.1.89 Downloaded nu-ansi-term v0.50.3 Downloaded oorandom v11.1.5 Downloaded toml_writer v1.1.1+spec-1.1.0 Downloaded num-rational v0.1.43 Downloaded num-traits v0.1.43 Downloaded adler32 v1.2.0 Downloaded byteorder v1.5.0 Downloaded num-iter v0.1.45 Downloaded scoped_threadpool v0.1.9 Downloaded askama_macros v0.15.6 Downloaded console_log v1.0.0 Downloaded iana-time-zone v0.1.65 Downloaded gloo-console v0.3.0 Downloaded gloo-dialogs v0.2.0 Downloaded serde_urlencoded v0.7.1 Downloaded gloo-net v0.5.0 Downloaded gloo-render v0.2.0 Downloaded gloo-storage v0.3.0 Downloaded gloo-timers v0.3.0 Downloaded gloo-utils v0.2.0 Downloaded gloo-worker-macros v0.1.0 Downloaded pinned v0.1.0 Downloaded fnv v1.0.7 Downloaded httparse v1.10.1 Downloaded try-lock v0.2.5 Downloaded ipnet v2.12.0 Downloaded getrandom v0.3.4 Downloaded tracing-core v0.1.36 Downloaded log v0.4.29 Downloaded cmake v0.1.58 Downloaded fs_extra v1.3.0 Downloaded tinystr v0.8.3 Downloaded writeable v0.6.3 Downloaded synstructure v0.13.2 Downloaded autocfg v1.5.0 Downloaded termcolor v1.4.1 Downloaded toml_datetime v1.1.1+spec-1.1.0 Downloaded cfg-if v1.0.4 Downloaded quote v1.0.45 Downloaded num-integer v0.1.46 Downloaded askama v0.15.6 Downloaded gloo-file v0.3.0 Downloaded gloo-events v0.2.0 Downloaded pin-project-internal v1.1.11 Downloaded toml_datetime v0.6.11 Downloaded proc-macro-crate v1.3.1 Downloaded gloo-worker v0.5.0 Downloaded http-body-util v0.1.3 Downloaded atomic-waker v1.1.2 Downloaded want v0.3.1 Downloaded mime v0.3.17 Downloaded lru-slab v0.1.2 Downloaded tinyvec v1.11.0 Downloaded cfg_aliases v0.2.1 Downloaded rustc-hash v2.1.2 Downloaded thiserror-impl v2.0.18 Downloaded rustls-native-certs v0.8.3 Downloaded dunce v1.0.5 Downloaded untrusted v0.9.0 Downloaded subtle v2.6.1 Downloaded tower-service v0.3.3 Downloaded stable_deref_trait v1.2.1 Downloaded percent-encoding v2.3.2 Downloaded itoa v1.0.18 Downloaded rand_chacha v0.9.0 Downloaded rand_core v0.9.5 Downloaded tinyvec_macros v0.1.1 Downloaded thiserror v2.0.18 Downloaded cc v1.2.60 Downloaded potential_utf v0.1.5 Downloaded zerofrom v0.1.7 Downloaded utf8_iter v1.0.4 Downloaded tokio-macros v2.7.0 Downloaded target-triple v1.0.0 Downloaded pin-project-lite v0.2.17 Downloaded find-msvc-tools v0.1.9 Downloaded jobserver v0.1.34 Downloaded getrandom v0.2.17 Downloaded futures-io v0.3.32 Downloaded sync_wrapper v1.0.2 Downloaded zerofrom-derive v0.1.7 Downloaded idna_adapter v1.2.1 Downloaded serde_spanned v1.1.1 Downloaded equivalent v1.0.2 Downloaded form_urlencoded v1.2.2 Downloaded futures-sink v0.3.32 Downloaded futures-macro v0.3.32 Downloaded futures-task v0.3.32 Downloaded slab v0.4.12 Downloaded once_cell v1.21.4 Compiling proc-macro2 v1.0.106 Compiling unicode-ident v1.0.24 Compiling quote v1.0.45 Compiling libc v0.2.185 Compiling stable_deref_trait v1.2.1 Compiling cfg-if v1.0.4 Compiling memchr v2.8.0 Compiling serde_core v1.0.228 Compiling log v0.4.29 Compiling crossbeam-utils v0.8.21 Compiling shlex v1.3.0 Compiling writeable v0.6.3 Compiling litemap v0.8.2 Compiling find-msvc-tools v0.1.9 Compiling utf8_iter v1.0.4 Compiling bitflags v2.11.1 Compiling zerocopy v0.8.48 Compiling icu_normalizer_data v2.2.0 Compiling icu_properties_data v2.2.0 Compiling serde v1.0.228 Compiling itoa v1.0.18 Compiling rayon-core v1.13.0 Compiling httparse v1.10.1 Compiling utf8parse v0.2.2 Compiling heck v0.5.0 Compiling once_cell v1.21.4 Compiling hashbrown v0.17.0 Compiling getrandom v0.4.2 Compiling zmij v1.0.21 Compiling unicase v2.9.0 Compiling rustix v1.1.4 Compiling zeroize v1.8.2 Compiling smallvec v1.15.1 Compiling autocfg v1.5.0 Compiling equivalent v1.0.2 Compiling linux-raw-sys v0.12.1 Compiling regex-syntax v0.8.10 Compiling serde_json v1.0.149 Compiling anstyle v1.0.14 Compiling untrusted v0.9.0 Compiling crc32fast v1.5.0 Compiling either v1.15.0 Compiling foldhash v0.2.0 Compiling anyhow v1.0.102 Compiling is_terminal_polyfill v1.70.2 Compiling percent-encoding v2.3.2 Compiling anstyle-query v1.1.5 Compiling colorchoice v1.0.5 Compiling rustls v0.23.38 Compiling bytes v1.11.1 Compiling adler2 v2.0.1 Compiling mime v0.3.17 Compiling safemem v0.3.3 Compiling fastrand v2.4.1 Compiling cc v1.2.60 Compiling anstyle-parse v1.0.0 Compiling wasm-bindgen-shared v0.2.118 (/home/buildozer/aports/community/wasm-bindgen/src/wasm-bindgen-0.2.118/crates/shared) Compiling leb128fmt v0.1.0 Compiling alloc-no-stdlib v2.0.4 Compiling fallible-iterator v0.3.0 Compiling base64 v0.22.1 Compiling semver v1.0.28 Compiling rustls-pki-types v1.14.0 Compiling simd-adler32 v0.3.9 Compiling powerfmt v0.2.0 Compiling form_urlencoded v1.2.2 Compiling mime_guess v2.0.5 Compiling subtle v2.6.1 Compiling alloc-stdlib v0.2.2 Compiling num-conv v0.2.1 Compiling httpdate v1.0.3 Compiling quick-error v1.2.3 Compiling num_threads v0.1.7 Compiling chunked_transfer v1.5.0 Compiling ascii v1.1.0 Compiling iana-time-zone v0.1.65 Compiling clap_lex v1.1.0 Compiling strsim v0.11.1 Compiling leb128 v0.2.5 Compiling anstream v1.0.0 Compiling time-core v0.1.8 Compiling wasm-bindgen-cli v0.2.118 (/home/buildozer/aports/community/wasm-bindgen/src/wasm-bindgen-0.2.118/crates/cli) Compiling wasm-encoder v0.245.1 Compiling miniz_oxide v0.8.9 Compiling brotli-decompressor v5.0.0 Compiling rustc-demangle v0.1.27 Compiling jiff v0.2.23 Compiling sha1_smol v1.0.1 Compiling base64 v0.13.1 Compiling utf8-zero v0.8.1 Compiling deranged v0.5.8 Compiling wasm-bindgen-test-shared v0.2.118 (/home/buildozer/aports/community/wasm-bindgen/src/wasm-bindgen-0.2.118/crates/test-shared) Compiling aho-corasick v1.1.4 Compiling buf_redux v0.8.4 Compiling twoway v0.1.8 Compiling clap_builder v4.6.0 Compiling webpki-roots v1.0.7 Compiling num-traits v0.2.19 Compiling tiny_http v0.12.0 Compiling crossbeam-epoch v0.9.18 Compiling http v1.4.0 Compiling crossbeam-deque v0.8.6 Compiling flate2 v1.1.9 Compiling syn v2.0.117 Compiling getrandom v0.2.17 Compiling num_cpus v1.17.0 Compiling filetime v0.2.27 Compiling ring v0.17.14 Compiling regex-automata v0.4.14 Compiling rand_core v0.6.4 Compiling rayon v1.12.0 Compiling threadpool v1.8.1 Compiling chrono v0.4.44 Compiling time v0.3.47 Compiling ureq-proto v0.6.0 Compiling tempfile v3.27.0 Compiling indexmap v2.14.0 Compiling hashbrown v0.16.1 Compiling id-arena v2.3.0 Compiling gimli v0.32.3 Compiling regex v1.12.3 Compiling env_filter v1.0.1 Compiling env_logger v0.11.10 Compiling ppv-lite86 v0.2.21 Compiling rand_chacha v0.3.1 Compiling synstructure v0.13.2 Compiling rand v0.8.6 Compiling zerofrom-derive v0.1.7 Compiling yoke-derive v0.8.2 Compiling zerovec-derive v0.11.3 Compiling displaydoc v0.2.5 Compiling serde_derive v1.0.228 Compiling walrus-macro v0.26.0 Compiling clap_derive v4.6.1 Compiling multipart v0.18.0 Compiling rustls-webpki v0.103.12 Compiling zerofrom v0.1.7 Compiling yoke v0.8.2 Compiling zerovec v0.11.6 Compiling zerotrie v0.2.4 Compiling clap v4.6.1 Compiling tinystr v0.8.3 Compiling potential_utf v0.1.5 Compiling icu_collections v2.2.0 Compiling icu_locale_core v2.2.0 Compiling icu_provider v2.2.0 Compiling icu_normalizer v2.2.0 Compiling icu_properties v2.2.0 Compiling wasmparser v0.245.1 Compiling idna_adapter v1.2.1 Compiling idna v1.1.0 Compiling url v2.5.8 Compiling ureq v3.3.0 Compiling rouille v3.6.2 Compiling walrus v0.26.1 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 2m 49s warning: the following packages contain code that will be rejected by a future version of Rust: buf_redux v0.8.4, multipart v0.18.0 note: to see what the problems were, use the option `--future-incompat-report`, or run `cargo report future-incompatibilities --id 1` Compiling proc-macro2 v1.0.106 Compiling unicode-ident v1.0.24 Compiling quote v1.0.45 Compiling libc v0.2.185 Compiling stable_deref_trait v1.2.1 Compiling cfg-if v1.0.4 Compiling memchr v2.8.0 Compiling serde_core v1.0.228 Compiling 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 find-msvc-tools v0.1.9 Compiling shlex v1.3.0 Compiling litemap v0.8.2 Compiling writeable v0.6.3 Compiling autocfg v1.5.0 Compiling serde v1.0.228 Compiling zerocopy v0.8.48 Compiling utf8_iter v1.0.4 Compiling icu_normalizer_data v2.2.0 Compiling icu_properties_data v2.2.0 Compiling httparse v1.10.1 Compiling rayon-core v1.13.0 Compiling anstyle v1.0.14 Compiling itoa v1.0.18 Compiling smallvec v1.15.1 Compiling zeroize v1.8.2 Compiling rustix v1.1.4 Compiling unicase v2.9.0 Compiling anyhow v1.0.102 Compiling getrandom v0.4.2 Compiling zmij v1.0.21 Compiling utf8parse v0.2.2 Compiling heck v0.5.0 Compiling once_cell v1.21.4 Compiling foldhash v0.2.0 Compiling anstyle-query v1.1.5 Compiling percent-encoding v2.3.2 Compiling colorchoice v1.0.5 Compiling serde_json v1.0.149 Compiling linux-raw-sys v0.12.1 Compiling is_terminal_polyfill v1.70.2 Compiling semver v1.0.28 Compiling crc32fast v1.5.0 Compiling untrusted v0.9.0 Compiling either v1.15.0 Compiling rustls v0.23.38 Compiling fallible-iterator v0.3.0 Compiling bytes v1.11.1 Compiling anstyle-parse v1.0.0 Compiling powerfmt v0.2.0 Compiling cc v1.2.60 Compiling fastrand v2.4.1 Compiling safemem v0.3.3 Compiling base64 v0.22.1 Compiling wasm-bindgen-shared v0.2.118 (/home/buildozer/aports/community/wasm-bindgen/src/wasm-bindgen-0.2.118/crates/shared) Compiling simd-adler32 v0.3.9 Compiling alloc-no-stdlib v2.0.4 Compiling rustls-pki-types v1.14.0 Compiling mime v0.3.17 Compiling leb128fmt v0.1.0 Compiling adler2 v2.0.1 Compiling deranged v0.5.8 Compiling form_urlencoded v1.2.2 Compiling time-core v0.1.8 Compiling strsim v0.11.1 Compiling ascii v1.1.0 Compiling chunked_transfer v1.5.0 Compiling alloc-stdlib v0.2.2 Compiling anstream v1.0.0 Compiling clap_lex v1.1.0 Compiling httpdate v1.0.3 Compiling subtle v2.6.1 Compiling num_threads v0.1.7 Compiling miniz_oxide v0.8.9 Compiling quick-error v1.2.3 Compiling num-conv v0.2.1 Compiling leb128 v0.2.5 Compiling wasm-encoder v0.245.1 Compiling iana-time-zone v0.1.65 Compiling jiff v0.2.23 Compiling mime_guess v2.0.5 Compiling base64 v0.13.1 Compiling brotli-decompressor v5.0.0 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 winnow v1.0.1 Compiling utf8-zero v0.8.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 toml_datetime v1.1.1+spec-1.1.0 Compiling predicates-core v1.0.10 Compiling webpki-roots v1.0.7 Compiling aho-corasick v1.1.4 Compiling buf_redux v0.8.4 Compiling twoway v0.1.8 Compiling normalize-line-endings v0.3.0 Compiling pin-project-lite v0.2.17 Compiling glob v0.3.3 Compiling futures-task v0.3.32 Compiling relative-path v1.9.3 Compiling tiny_http v0.12.0 Compiling difflib v0.4.0 Compiling clap_builder v4.6.0 Compiling futures-core v0.3.32 Compiling slab v0.4.12 Compiling termtree v0.5.1 Compiling assert_cmd v2.2.1 Compiling yansi v1.0.1 Compiling termcolor v1.4.1 Compiling futures-timer v3.0.3 Compiling rustc_version v0.4.1 Compiling diff v0.1.13 Compiling num-traits v0.2.19 Compiling flate2 v1.1.9 Compiling indexmap v2.14.0 Compiling predicates-tree v1.0.13 Compiling crossbeam-epoch v0.9.18 Compiling rstest_macros v0.26.1 Compiling pretty_assertions v1.4.1 Compiling http v1.4.0 Compiling crossbeam-deque v0.8.6 Compiling syn v2.0.117 Compiling getrandom v0.2.17 Compiling num_cpus v1.17.0 Compiling filetime v0.2.27 Compiling wait-timeout v0.2.1 Compiling ring v0.17.14 Compiling rand_core v0.6.4 Compiling rayon v1.12.0 Compiling threadpool v1.8.1 Compiling chrono v0.4.44 Compiling float-cmp v0.10.0 Compiling time v0.3.47 Compiling toml_parser v1.1.2+spec-1.1.0 Compiling ureq-proto v0.6.0 Compiling regex-automata v0.4.14 Compiling toml_edit v0.25.11+spec-1.1.0 Compiling tempfile v3.27.0 Compiling proc-macro-crate v3.5.0 Compiling hashbrown v0.16.1 Compiling gimli v0.32.3 Compiling id-arena v2.3.0 Compiling regex v1.12.3 Compiling ppv-lite86 v0.2.21 Compiling bstr v1.12.1 Compiling rand_chacha v0.3.1 Compiling rand v0.8.6 Compiling env_filter v1.0.1 Compiling predicates v3.1.4 Compiling env_logger v0.11.10 Compiling synstructure v0.13.2 Compiling multipart v0.18.0 Compiling zerofrom-derive v0.1.7 Compiling yoke-derive v0.8.2 Compiling zerovec-derive v0.11.3 Compiling displaydoc v0.2.5 Compiling serde_derive v1.0.228 Compiling walrus-macro v0.26.0 Compiling clap_derive v4.6.1 Compiling futures-macro v0.3.32 Compiling rustls-webpki v0.103.12 Compiling futures-util v0.3.32 Compiling zerofrom v0.1.7 Compiling yoke v0.8.2 Compiling zerovec v0.11.6 Compiling zerotrie v0.2.4 Compiling clap v4.6.1 Compiling tinystr v0.8.3 Compiling potential_utf v0.1.5 Compiling icu_collections v2.2.0 Compiling icu_locale_core v2.2.0 Compiling rstest v0.26.1 Compiling icu_provider v2.2.0 Compiling icu_properties v2.2.0 Compiling icu_normalizer v2.2.0 Compiling wasmparser v0.245.1 Compiling idna_adapter v1.2.1 Compiling idna v1.1.0 Compiling url v2.5.8 Compiling ureq v3.3.0 Compiling rouille v3.6.2 Compiling walrus v0.26.1 Compiling wasmprinter v0.245.1 Compiling wasm-bindgen-cli-support v0.2.118 (/home/buildozer/aports/community/wasm-bindgen/src/wasm-bindgen-0.2.118/crates/cli-support) 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 1m 02s 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-beea6b3661cb77ca) 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-56e8634f839db542) 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-6048655f135748f7) 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-493a7dd7cd99a9a2) 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-43d7fb2c84b85a0f) running 65 tests test reference::no_duplicate_wasm_export_in_node_esm_atomics_debug ... FAILED test omit_default_module_path_target_web ... ok test bin_crate_works has been running for over 60 seconds test bin_crate_works_without_name_section has been running for over 60 seconds test constructor_cannot_return_option_struct has been running for over 60 seconds test default_module_path_target_no_modules has been running for over 60 seconds test default_module_path_target_web has been running for over 60 seconds test function_table_preserved has been running for over 60 seconds test function_table_preserved_for_stack_closures has been running for over 60 seconds test multiple_start_functions has been running for over 60 seconds test namespace_global_and_noglobal_works has been running for over 60 seconds test npm::more_package_json_fields_ignored has been running for over 60 seconds test npm::no_modules_rejects_npm has been running for over 60 seconds test npm::npm_conflict_rejected has been running for over 60 seconds test omit_default_module_path_target_no_modules has been running for over 60 seconds test one_export_works has been running for over 60 seconds test private_start_function has been running for over 60 seconds test reference::runtest::test_01_add_rs has been running for over 60 seconds test reference::runtest::test_02_anyref_empty_rs has been running for over 60 seconds test reference::runtest::test_03_anyref_import_catch_rs has been running for over 60 seconds test reference::runtest::test_04_anyref_nop_rs has been running for over 60 seconds test reference::runtest::test_05_async_number_rs has been running for over 60 seconds test reference::runtest::test_06_async_void_rs has been running for over 60 seconds test reference::runtest::test_07_builder_rs has been running for over 60 seconds test reference::runtest::test_08_closures_rs has been running for over 60 seconds test reference::runtest::test_09_constructor_rs has been running for over 60 seconds test reference::runtest::test_10_custom_section_rs has been running for over 60 seconds test reference::runtest::test_11_default_class_rs has been running for over 60 seconds test reference::runtest::test_12_default_function_rs has been running for over 60 seconds test reference::runtest::test_13_echo_rs has been running for over 60 seconds test reference::runtest::test_14_empty_rs has been running for over 60 seconds test reference::runtest::test_15_enums_rs has been running for over 60 seconds test reference::runtest::test_16_function_attrs_rs has been running for over 60 seconds test reference::runtest::test_17_getter_setter_rs has been running for over 60 seconds test reference::runtest::test_18_import_getter_setter_rs has been running for over 60 seconds test reference::runtest::test_19_import_rs has been running for over 60 seconds test reference::runtest::test_20_int128_rs has been running for over 60 seconds test reference::runtest::test_21_intrinsic_only_rs has been running for over 60 seconds test reference::runtest::test_22_js_namespace_export_same_name_rs has been running for over 60 seconds test reference::runtest::test_23_js_namespace_export_rs has been running for over 60 seconds test reference::runtest::test_24_keyword_rs has been running for over 60 seconds test reference::runtest::test_25_modules_rs has been running for over 60 seconds test reference::runtest::test_26_nop_rs has been running for over 60 seconds test reference::runtest::test_27_optional_args_rs has been running for over 60 seconds test reference::runtest::test_28_pointers_rs has been running for over 60 seconds test reference::runtest::test_29_private_rs has been running for over 60 seconds test reference::runtest::test_30_raw_rs has been running for over 60 seconds test reference::runtest::test_31_reexport_rs has been running for over 60 seconds test reference::runtest::test_32_reserved_class_name_rs has been running for over 60 seconds test reference::runtest::test_12_default_function_rs ... ok test reference::runtest::test_05_async_number_rs ... FAILED test bin_crate_works_without_name_section ... ok test npm::more_package_json_fields_ignored ... ok test npm::npm_conflict_rejected ... ok test npm::no_modules_rejects_npm ... ok test namespace_global_and_noglobal_works ... ok test default_module_path_target_no_modules ... ok test function_table_preserved_for_stack_closures ... ok test reference::runtest::test_06_async_void_rs ... FAILED test function_table_preserved ... ok test termination_abort_handler ... FAILED test termination_reinit ... FAILED test termination_reinit_auto_detect ... FAILED test version_useful ... ok test reference::runtest::test_04_anyref_nop_rs ... ok test reference::runtest::test_14_empty_rs ... ok test reference::runtest::test_26_nop_rs ... ok test default_module_path_target_web ... ok test constructor_cannot_return_option_struct ... ok test bin_crate_works ... ok test reference::runtest::test_20_int128_rs ... FAILED test reference::runtest::test_17_getter_setter_rs ... FAILED test reference::runtest::test_02_anyref_empty_rs ... ok test omit_default_module_path_target_no_modules ... ok test reference::runtest::test_33_result_rs has been running for over 60 seconds test reference::runtest::test_19_import_rs ... FAILED test reference::runtest::test_21_intrinsic_only_rs ... FAILED test reference::runtest::test_08_closures_rs ... FAILED test reference::runtest::test_03_anyref_import_catch_rs ... FAILED test reference::runtest::test_13_echo_rs ... FAILED test reference::runtest::test_07_builder_rs ... FAILED test reference::runtest::test_18_import_getter_setter_rs ... FAILED test multiple_start_functions ... ok test private_start_function ... ok test reference::runtest::test_10_custom_section_rs ... ok test reference::runtest::test_15_enums_rs ... FAILED test reference::runtest::test_30_raw_rs ... FAILED test reference::runtest::test_25_modules_rs ... FAILED test reference::runtest::test_31_reexport_rs ... FAILED test reference::runtest::test_28_pointers_rs ... ok test reference::runtest::test_16_function_attrs_rs ... FAILED test reference::runtest::test_22_js_namespace_export_same_name_rs ... FAILED test reference::runtest::test_27_optional_args_rs ... ok test one_export_works ... ok test reference::runtest::test_01_add_rs ... ok test reference::runtest::test_11_default_class_rs ... FAILED test reference::runtest::test_09_constructor_rs ... FAILED test reference::runtest::test_24_keyword_rs ... FAILED test reference::runtest::test_32_reserved_class_name_rs ... FAILED test reference::runtest::test_23_js_namespace_export_rs ... FAILED test reference::runtest::test_29_private_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 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 works_on_empty_project ... ok test reference::runtest::test_40_wasm_export_colon_rs ... FAILED 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' (47828) panicked at /rustc/59807616e1fa2540724bfbac14d7976d7e4a3860/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_05_async_number_rs stdout ---- thread 'reference::runtest::test_05_async_number_rs' (47835) 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_005d00ee321d7569(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_7fc91128695aa3a8(arg0) { const ret = typeof(arg0) === 'function'; return ret; } export function __wbg___wbindgen_is_undefined_1243767ae0d71475(arg0) { const ret = arg0 === undefined; return ret; } export function __wbg___wbindgen_throw_b7725190c754ac89(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); } export function __wbg__wbg_cb_unref_9acd5667e3357d23(arg0) { arg0._wbg_cb_unref(); } export function __wbg_call_161da77603d29586() { return handleError(function (arg0, arg1, arg2) { const ret = arg0.call(arg1, arg2); return ret; }, arguments); } export function __wbg_new_typed_40adb194e32b5d79(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_01b529ad7b9444de(arg0) { const ret = arg0.queueMicrotask; return ret; } export function __wbg_queueMicrotask_157ff90b2ec0122d(arg0) { > queueMicrotask(arg0); >} >export function __wbg_resolve_fa502c2a0dade078(arg0) { const ret = Promise.resolve(arg0); return ret; } export function __wbg_run_4c437397a58aa17d(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_a7021e005658fe0b() { const ret = typeof console === 'undefined' ? null : console?.createTask; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_GLOBAL_2214f8fff4583d3f() { const ret = typeof global === 'undefined' ? null : global; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_GLOBAL_THIS_1af075a8bc108b27() { const ret = typeof globalThis === 'undefined' ? null : globalThis; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_SELF_96647c569278b068() { const ret = typeof self === 'undefined' ? null : self; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_WINDOW_2708584e4e296802() { const ret = typeof window === 'undefined' ? null : window; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_then_9350b39e5eaea123(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_06_async_void_rs stdout ---- thread 'reference::runtest::test_06_async_void_rs' (47836) 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_005d00ee321d7569(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_7fc91128695aa3a8(arg0) { const ret = typeof(arg0) === 'function'; return ret; } export function __wbg___wbindgen_is_undefined_1243767ae0d71475(arg0) { const ret = arg0 === undefined; return ret; } export function __wbg___wbindgen_throw_b7725190c754ac89(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); } export function __wbg__wbg_cb_unref_9acd5667e3357d23(arg0) { arg0._wbg_cb_unref(); } export function __wbg_call_161da77603d29586() { return handleError(function (arg0, arg1, arg2) { const ret = arg0.call(arg1, arg2); return ret; }, arguments); } export function __wbg_new_typed_40adb194e32b5d79(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_01b529ad7b9444de(arg0) { const ret = arg0.queueMicrotask; return ret; } export function __wbg_queueMicrotask_157ff90b2ec0122d(arg0) { > queueMicrotask(arg0); >} >export function __wbg_resolve_fa502c2a0dade078(arg0) { const ret = Promise.resolve(arg0); return ret; } export function __wbg_run_4c437397a58aa17d(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_a7021e005658fe0b() { const ret = typeof console === 'undefined' ? null : console?.createTask; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_GLOBAL_2214f8fff4583d3f() { const ret = typeof global === 'undefined' ? null : global; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_GLOBAL_THIS_1af075a8bc108b27() { const ret = typeof globalThis === 'undefined' ? null : globalThis; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_SELF_96647c569278b068() { const ret = typeof self === 'undefined' ? null : self; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_WINDOW_2708584e4e296802() { const ret = typeof window === 'undefined' ? null : window; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_then_9350b39e5eaea123(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; } ---- termination_abort_handler stdout ---- thread 'termination_abort_handler' (976) panicked at /rustc/59807616e1fa2540724bfbac14d7976d7e4a3860/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' (980) panicked at /rustc/59807616e1fa2540724bfbac14d7976d7e4a3860/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' (984) panicked at /rustc/59807616e1fa2540724bfbac14d7976d7e4a3860/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_20_int128_rs stdout ---- thread 'reference::runtest::test_20_int128_rs' (47858) 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_b7725190c754ac89(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_17_getter_setter_rs stdout ---- thread 'reference::runtest::test_17_getter_setter_rs' (47850) 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_b7725190c754ac89(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_19_import_rs stdout ---- thread 'reference::runtest::test_19_import_rs' (47853) 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_b7725190c754ac89(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); } export function __wbg_catch_me_72eeaba38abfaa00() { return handleError(function () { catch_me(); }, arguments); } export function __wbg_get_12768323623707f2(arg0) { const ret = arg0.get(); return ret; } export function __wbg_my_function_1d017d75f9af8c95() { b.my_function(); } export function __wbg_new_0e296df3d3edc5b9(arg0) { const ret = new _default(arg0); return ret; } export function __wbg_no_catch_ce3c9592ee7e6ffb() { no_catch(); } export function __wbg_reload_b5c492a3a91129bb() { window.location.reload(); } export function __wbg_static_accessor_CONST_301522b7c5260ebd() { const ret = a.CONST; return ret; } export function __wbg_write_e93770b42d6ddcea(arg0, arg1) { window.document.write(getStringFromWasm0(arg0, arg1)); } export function __wbindgen_init_externref_table() { const table = wasm.__wbindgen_externrefs; const offset = table.grow(4); table.set(0, undefined); table.set(offset + 0, undefined); table.set(offset + 1, null); table.set(offset + 2, true); table.set(offset + 3, false); } function addToExternrefTable0(obj) { const idx = wasm.__externref_table_alloc(); wasm.__wbindgen_externrefs.set(idx, obj); return idx; } function getStringFromWasm0(ptr, len) { 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_21_intrinsic_only_rs stdout ---- thread 'reference::runtest::test_21_intrinsic_only_rs' (47861) 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_b7725190c754ac89(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_08_closures_rs stdout ---- thread 'reference::runtest::test_08_closures_rs' (47839) 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_1243767ae0d71475(arg0) { const ret = arg0 === undefined; return ret; } export function __wbg___wbindgen_throw_b7725190c754ac89(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); } export function __wbg__wbg_cb_unref_9acd5667e3357d23(arg0) { arg0._wbg_cb_unref(); } export function __wbg_call_scoped_53e822ed08a3dd45(arg0) { call_scoped(arg0); } export function __wbg_forEach_4a58bd6c973dc9cf(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_f0ae53e75bb41539(arg0) { let result; try { result = arg0 instanceof Window; } catch (_) { result = false; } const ret = result; return ret; } export function __wbg_log_aa23a2f01b704114(arg0) { console.log(arg0); } export function __wbg_setTimeout_fa558235181a18ce() { return handleError(function (arg0, arg1) { const ret = arg0.setTimeout(arg1); return ret; }, arguments); } export function __wbg_static_accessor_GLOBAL_2214f8fff4583d3f() { const ret = typeof global === 'undefined' ? null : global; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_GLOBAL_THIS_1af075a8bc108b27() { const ret = typeof globalThis === 'undefined' ? null : globalThis; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_SELF_96647c569278b068() { const ret = typeof self === 'undefined' ? null : self; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_WINDOW_2708584e4e296802() { 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_03_anyref_import_catch_rs stdout ---- thread 'reference::runtest::test_03_anyref_import_catch_rs' (47833) 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_b7725190c754ac89(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); } export function __wbg_foo_f10cbb40190caafb() { return handleError(function () { foo(); }, arguments); } export function __wbindgen_init_externref_table() { const table = wasm.__wbindgen_externrefs; const offset = table.grow(4); table.set(0, undefined); table.set(offset + 0, undefined); table.set(offset + 1, null); table.set(offset + 2, true); table.set(offset + 3, false); } function addToExternrefTable0(obj) { const idx = wasm.__externref_table_alloc(); wasm.__wbindgen_externrefs.set(idx, obj); return idx; } function getStringFromWasm0(ptr, len) { 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_13_echo_rs stdout ---- thread 'reference::runtest::test_13_echo_rs' (47844) 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_005d00ee321d7569(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_1f66ad921e98e6a8(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_b7725190c754ac89(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_07_builder_rs stdout ---- thread 'reference::runtest::test_07_builder_rs' (47837) 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_b7725190c754ac89(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_18_import_getter_setter_rs stdout ---- thread 'reference::runtest::test_18_import_getter_setter_rs' (47852) 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_b7725190c754ac89(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); } export function __wbg_another_b5200612282b4794(arg0) { const ret = arg0.prop2; return ret; } export function __wbg_b_1d81c37ba3267428(arg0) { const ret = arg0.a; return ret; } export function __wbg_bar2_bbb421568716ee61() { const ret = Bar.bar2(); return ret; } export function __wbg_get_foo_da5abcc302d8259c() { const ret = Bar.get_foo(); return ret; } export function __wbg_new_0118420d55aa7752() { const ret = new SomeClass(); return ret; } export function __wbg_set_another_46a5a28410538257(arg0, arg1) { arg0.prop2 = arg1 >>> 0; } export function __wbg_set_b_b86073b9201eefa2(arg0, arg1) { arg0.a = arg1 >>> 0; } export function __wbg_set_bar2_f42a5f257cc0158e(arg0) { Bar.set_bar2(arg0 >>> 0); } export function __wbg_set_foo_9cf47d70d15a3ed2(arg0) { Bar.set_foo(arg0 >>> 0); } export function __wbg_set_signal_27679b85ca6328aa(arg0, arg1) { arg0.signal = arg1 >>> 0; } export function __wbg_set_some_prop_f1de6917d5deb737(arg0, arg1) { arg0.some_prop = arg1 >>> 0; } export function __wbg_signal_fad3a0b2f19e5af0(arg0) { const ret = arg0.signal; return ret; } export function __wbg_some_prop_61aed0b13af2dd39(arg0) { const ret = arg0.some_prop; return ret; } export function __wbindgen_init_externref_table() { const table = wasm.__wbindgen_externrefs; const offset = table.grow(4); table.set(0, undefined); table.set(offset + 0, undefined); table.set(offset + 1, null); table.set(offset + 2, true); table.set(offset + 3, false); } function getStringFromWasm0(ptr, len) { 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_15_enums_rs stdout ---- thread 'reference::runtest::test_15_enums_rs' (47846) 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_b7725190c754ac89(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_30_raw_rs stdout ---- thread 'reference::runtest::test_30_raw_rs' (47891) 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_b7725190c754ac89(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_25_modules_rs stdout ---- thread 'reference::runtest::test_25_modules_rs' (47871) 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_b7725190c754ac89(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); } export function __wbg_parseFloat_42053797e2bb5de6(arg0, arg1) { > const ret = parseFloat(getStringFromWasm0(arg0, arg1)); return ret; } export function __wbg_parseFloat_f19573f8625f7ae3(arg0) { > const ret = parseFloat(arg0); return ret; } export function __wbindgen_cast_0000000000000000(arg0, arg1) { // Cast intrinsic for `Ref(String) -> Externref`. const ret = getStringFromWasm0(arg0, arg1); return ret; } export function __wbindgen_init_externref_table() { const table = wasm.__wbindgen_externrefs; const offset = table.grow(4); table.set(0, undefined); table.set(offset + 0, undefined); table.set(offset + 1, null); table.set(offset + 2, true); table.set(offset + 3, false); } function getStringFromWasm0(ptr, len) { 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' (47902) panicked at crates/cli/tests/wasm-bindgen/reference.rs:121:13: assertion failed: `(left == right)` Diff < left / right > : import { Snippet } from './snippets/reexport_reftest-99bc78b1927329b6/inline0.js'; import { original_config } from 'config'; import { MY_CONSTANT } from 'constants'; import { default as _default } from 'default-export-lib'; import { helperFunction } from 'helpers'; import { hiddenReexport } from 'hidden-lib'; import { OriginalName } from 'some-library'; import { CustomType } from 'types-lib'; import { original } from 'utils'; import { 'invalid-name' as invalid_name } from 'weird-exports'; export { CustomType } export { MY_CONSTANT } export { OriginalName as RenamedClass } function 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_16_function_attrs_rs stdout ---- thread 'reference::runtest::test_16_function_attrs_rs' (47847) 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_005d00ee321d7569(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_06c3eb3d9ef23ed9(arg0) { const ret = !arg0; return ret; } export function __wbg___wbindgen_is_function_7fc91128695aa3a8(arg0) { const ret = typeof(arg0) === 'function'; return ret; } export function __wbg___wbindgen_is_undefined_1243767ae0d71475(arg0) { const ret = arg0 === undefined; return ret; } export function __wbg___wbindgen_throw_b7725190c754ac89(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); } export function __wbg__wbg_cb_unref_9acd5667e3357d23(arg0) { arg0._wbg_cb_unref(); } export function __wbg_call_161da77603d29586() { return handleError(function (arg0, arg1, arg2) { const ret = arg0.call(arg1, arg2); return ret; }, arguments); } export function __wbg_new_typed_40adb194e32b5d79(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_01b529ad7b9444de(arg0) { const ret = arg0.queueMicrotask; return ret; } export function __wbg_queueMicrotask_157ff90b2ec0122d(arg0) { > queueMicrotask(arg0); >} >export function __wbg_resolve_fa502c2a0dade078(arg0) { const ret = Promise.resolve(arg0); return ret; } export function __wbg_run_4c437397a58aa17d(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_a7021e005658fe0b() { const ret = typeof console === 'undefined' ? null : console?.createTask; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_GLOBAL_2214f8fff4583d3f() { const ret = typeof global === 'undefined' ? null : global; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_GLOBAL_THIS_1af075a8bc108b27() { const ret = typeof globalThis === 'undefined' ? null : globalThis; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_SELF_96647c569278b068() { const ret = typeof self === 'undefined' ? null : self; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_WINDOW_2708584e4e296802() { const ret = typeof window === 'undefined' ? null : window; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_then_9350b39e5eaea123(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_22_js_namespace_export_same_name_rs stdout ---- thread 'reference::runtest::test_22_js_namespace_export_same_name_rs' (47864) 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_b7725190c754ac89(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_11_default_class_rs stdout ---- thread 'reference::runtest::test_11_default_class_rs' (47842) 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_b7725190c754ac89(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_09_constructor_rs stdout ---- thread 'reference::runtest::test_09_constructor_rs' (47840) 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_b7725190c754ac89(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_24_keyword_rs stdout ---- thread 'reference::runtest::test_24_keyword_rs' (47870) 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_b7725190c754ac89(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); } export function __wbg_await_05e19f72f31e2ebf() { await(); } export function __wbg_let_f768ba9e4e5814eb(arg0) { arg0.let(); } export function __wbg_new_37ff36bc1970c6c1() { B.new(); } export function __wbg_new_6ba9a89a08218782() { > const ret = A.new(); return ret; } export function __wbg_new_9c9582edfb7e3b95() { > const ret = window.__TAURI__.menu.Menu.new(); return ret; } export function __wbg_static_accessor_TRUE_1b437a6a536585bd() { const ret = true; return ret; } export function __wbindgen_init_externref_table() { const table = wasm.__wbindgen_externrefs; const offset = table.grow(4); table.set(0, undefined); table.set(offset + 0, undefined); table.set(offset + 1, null); table.set(offset + 2, true); table.set(offset + 3, false); } function getStringFromWasm0(ptr, len) { 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_32_reserved_class_name_rs stdout ---- thread 'reference::runtest::test_32_reserved_class_name_rs' (48024) 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_b7725190c754ac89(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); } export function __wbg_new_829740aef8a0396a() { const ret = new Array(); return ret; } export function __wbindgen_init_externref_table() { const table = wasm.__wbindgen_externrefs; const offset = table.grow(4); table.set(0, undefined); table.set(offset + 0, undefined); table.set(offset + 1, null); table.set(offset + 2, true); table.set(offset + 3, false); } const Array2Finalization = (typeof FinalizationRegistry === 'undefined') ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry(ptr => wasm.__wbg_array_free(ptr >>> 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' (47865) 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_b7725190c754ac89(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_29_private_rs stdout ---- thread 'reference::runtest::test_29_private_rs' (47888) 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_b7725190c754ac89(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_33_result_rs stdout ---- thread 'reference::runtest::test_33_result_rs' (48890) 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_145e856f863639dd(arg0, arg1) { const ret = Error(getStringFromWasm0(arg0, arg1)); return ret; } export function __wbg___wbindgen_throw_b7725190c754ac89(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' (49039) 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_b7725190c754ac89(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' (558) 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_b7725190c754ac89(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; } ---- reference::runtest::test_36_static_rs stdout ---- thread 'reference::runtest::test_36_static_rs' (499) 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_b7725190c754ac89(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); } export function __wbg_static_accessor_NAMESPACE_OPTIONAL_4b6fe8b1000c311e() { const ret = typeof test === 'undefined' ? null : test?.NAMESPACE_OPTIONAL; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_NAMESPACE_PLAIN_0fa2e5d88b89c2e3() { const ret = test.NAMESPACE_PLAIN; return ret; } export function __wbg_static_accessor_NESTED_NAMESPACE_OPTIONAL_2fb700945519061a() { const ret = typeof test1 === 'undefined' ? null : test1?.test2?.NESTED_NAMESPACE_OPTIONAL; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_NESTED_NAMESPACE_PLAIN_4c19f2e57f2133c8() { const ret = test1.test2.NESTED_NAMESPACE_PLAIN; return ret; } export function __wbg_static_accessor_OPTIONAL_65c54d279c884bb9() { const ret = typeof OPTIONAL === 'undefined' ? null : OPTIONAL; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); } export function __wbg_static_accessor_PLAIN_6b7d19bd722065a9() { const ret = PLAIN; return ret; } export function __wbindgen_init_externref_table() { const table = wasm.__wbindgen_externrefs; const offset = table.grow(4); table.set(0, undefined); table.set(offset + 0, undefined); table.set(offset + 1, null); table.set(offset + 2, true); table.set(offset + 3, false); } function addToExternrefTable0(obj) { const idx = wasm.__externref_table_alloc(); wasm.__wbindgen_externrefs.set(idx, obj); return idx; } function getStringFromWasm0(ptr, len) { 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' (636) 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_9fe016a4994d0c2e() { const ret = Math.random(); return ret; } export function __wbindgen_init_externref_table() { const table = wasm.__wbindgen_externrefs; const offset = table.grow(4); table.set(0, undefined); table.set(offset + 0, undefined); table.set(offset + 1, null); table.set(offset + 2, true); table.set(offset + 3, false); } let wasm; export function __wbg_set_wasm(val) { wasm = val; } ---- reference::runtest::test_39_typescript_type_rs stdout ---- thread 'reference::runtest::test_39_typescript_type_rs' (698) 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_b7725190c754ac89(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' (782) 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_b7725190c754ac89: 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' (764) 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_cbd2876ab68fdb4d: function(arg0) { const ret = arg0.Deno; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); }, < __wbg_String_26c8265473c70dd8: function(arg0, arg1) { > __wbg_String_4902f39dbeaa064b: 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_f5ceed30c081b713: 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_d37cbb2b8050bdf5: function(arg0) { __wbg_test_output_writeln(arg0); }, < __wbg___wbgtest_og_console_log_3faab872ddb58658: function(arg0, arg1) { > __wbg___wbgtest_og_console_log_5d2739a0deb17a9d: function(arg0, arg1) { __wbgtest_og_console_log(getStringFromWasm0(arg0, arg1)); }, < __wbg___wbindgen_debug_string_ab4b34d23d6778bd: function(arg0, arg1) { > __wbg___wbindgen_debug_string_005d00ee321d7569: 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_7fc91128695aa3a8: function(arg0) { const ret = typeof(arg0) === 'function'; return ret; }, < __wbg___wbindgen_is_undefined_29a43b4d42920abd: function(arg0) { > __wbg___wbindgen_is_undefined_1243767ae0d71475: function(arg0) { const ret = arg0 === undefined; return ret; }, < __wbg___wbindgen_string_get_7ed5322991caaec5: function(arg0, arg1) { > __wbg___wbindgen_string_get_1f66ad921e98e6a8: 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_b7725190c754ac89: function(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); }, < __wbg__wbg_cb_unref_b46c9b5a9f08ec37: function(arg0) { > __wbg__wbg_cb_unref_9acd5667e3357d23: function(arg0) { arg0._wbg_cb_unref(); }, < __wbg_call_a24592a6f349a97e: function() { return handleError(function (arg0, arg1, arg2) { > __wbg_call_161da77603d29586: function() { return handleError(function (arg0, arg1, arg2) { const ret = arg0.call(arg1, arg2); return ret; }, arguments); }, < __wbg_constructor_8713802a1c774ccf: function(arg0) { > __wbg_constructor_2bb71e7a128b4f56: function(arg0) { const ret = arg0.constructor; return ret; }, < __wbg_error_b069f072b02d441d: function(arg0, arg1) { > __wbg_error_843c426615689bb2: function(arg0, arg1) { console.error(getStringFromWasm0(arg0, arg1)); }, < __wbg_forEach_99add773fc5cd5e6: function(arg0, arg1, arg2) { > __wbg_forEach_4a58bd6c973dc9cf: 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_4b31b7449aa2541d: function(arg0, arg1, arg2) { const ret = arg0.getElementById(getStringFromWasm0(arg1, arg2)); return ret; }, < __wbg_log_25aa23d07a6c5fc5: function(arg0, arg1) { > __wbg_log_da0b4c080d8bd44d: function(arg0, arg1) { console.log(getStringFromWasm0(arg0, arg1)); }, < __wbg_message_cb4f84ee66e5e341: function(arg0) { > __wbg_message_0b4a028865e85cf4: function(arg0) { const ret = arg0.message; return ret; }, < __wbg_name_4042d1d7bd3559e7: function(arg0, arg1) { > __wbg_name_969272f1c4ce208a: function(arg0) { > const ret = arg0.name; > return ret; > }, > __wbg_name_9fee3186ce818ec8: 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_5c1ca12d7fb9c198: function() { const ret = new Error(); return ret; }, < __wbg_new_typed_323f37fd55ab048d: function(arg0, arg1) { > __wbg_new_typed_40adb194e32b5d79: 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_be18f381bf0ebb22: function(arg0) { const ret = arg0.now(); return ret; }, < __wbg_performance_ce6182246e03f6e4: function(arg0) { > __wbg_performance_2618f4fe6f1c2729: function(arg0) { const ret = arg0.performance; return ret; }, < __wbg_queueMicrotask_5d15a957e6aa920e: function(arg0) { < queueMicrotask(arg0); < }, < __wbg_queueMicrotask_f8819e5ffc402f36: function(arg0) { > __wbg_queueMicrotask_01b529ad7b9444de: function(arg0) { const ret = arg0.queueMicrotask; return ret; }, < __wbg_resolve_e6c466bc1052f16c: function(arg0) { > __wbg_queueMicrotask_157ff90b2ec0122d: function(arg0) { > queueMicrotask(arg0); > }, > __wbg_resolve_fa502c2a0dade078: function(arg0) { const ret = Promise.resolve(arg0); return ret; }, < __wbg_run_0b0a622deae25fda: function(arg0, arg1, arg2) { > __wbg_run_4c437397a58aa17d: 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_4f6c7ad69634ba74: 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_149e39dd7e0c10c3: function(arg0, arg1, arg2) { arg0.textContent = getStringFromWasm0(arg1, arg2); }, < __wbg_stack_1a655760b7b0bcd6: function(arg0, arg1) { > __wbg_stack_678aa3dd4afa2a1e: function(arg0, arg1) { const ret = arg1.stack; > const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); > const len1 = WASM_VECTOR_LEN; > getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); > getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); > }, > __wbg_stack_67e6d29f60690575: function(arg0, arg1) { > const ret = arg1.stack; var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); var len1 = WASM_VECTOR_LEN; getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); }, < __wbg_stack_8e7038c7dfb8ef0c: function(arg0) { > __wbg_stack_d51faf024e6f3b17: function(arg0) { const ret = arg0.stack; return ret; }, < __wbg_stack_9a9286075fee826b: function(arg0, arg1) { < const ret = arg1.stack; < const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); < const len1 = WASM_VECTOR_LEN; < getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); < getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); < }, < __wbg_stack_b8010bb01b0907e0: function(arg0) { > __wbg_stack_fbc00584f85430c0: function(arg0) { const ret = arg0.stack; return ret; }, < __wbg_static_accessor_CREATE_TASK_f3ab6a6954bda493: function() { > __wbg_static_accessor_CREATE_TASK_a7021e005658fe0b: 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_33810ea5d443b339: function() { const ret = document; return ret; }, < __wbg_static_accessor_GLOBAL_8cfadc87a297ca02: function() { > __wbg_static_accessor_GLOBAL_2214f8fff4583d3f: 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_1af075a8bc108b27: function() { const ret = typeof globalThis === 'undefined' ? null : globalThis; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); }, < __wbg_static_accessor_SELF_e445c1c7484aecc3: function() { > __wbg_static_accessor_SELF_96647c569278b068: function() { const ret = typeof self === 'undefined' ? null : self; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); }, < __wbg_static_accessor_WINDOW_f20e8576ef1e0f17: function() { > __wbg_static_accessor_WINDOW_2708584e4e296802: function() { const ret = typeof window === 'undefined' ? null : window; return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); }, < __wbg_text_content_e82293d2152fc35c: function(arg0, arg1) { > __wbg_text_content_66135b9a0280c1af: 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_9350b39e5eaea123: function(arg0, arg1) { const ret = arg0.then(arg1); return ret; }, < __wbg_toString_f628025b410a36d6: function() { return handleError(function (arg0, arg1) { > __wbg_toString_d6581713a2a9e7aa: 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' (906) 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_005d00ee321d7569(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_b7725190c754ac89(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); } export function __wbg_new_d49e00fe0c2f646e() { 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 128.26s 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-2dabac351eb78602) running 41 tests test headless_streaming_tests::test_browser_console_panic_headless ... ok test headless_streaming_tests::test_service_worker_no_carriage_return_in_output ... ok test headless_streaming_tests::test_default_console_panic_headless ... ok test headless_streaming_tests::test_default_no_carriage_return_in_output ... ok test headless_streaming_tests::test_headless_worker_output_not_garbled ... ok test headless_streaming_tests::test_headless_worker_output_visible_with_no_stream ... ok test headless_streaming_tests::test_default_console_no_panic_headless ... ok test headless_streaming_tests::test_browser_console_no_panic_headless ... ok test headless_streaming_tests::test_default_output_not_garbled ... ok test headless_streaming_tests::test_worker_console_no_panic_nocapture ... ok test headless_streaming_tests::test_service_worker_console_no_panic_headless ... ok test headless_streaming_tests::test_user_spawned_module_worker_logs_browser ... ok test headless_streaming_tests::test_browser_no_carriage_return_in_output ... ok test headless_streaming_tests::test_user_spawned_shared_worker_logs_on_failure_browser ... ok test headless_streaming_tests::test_service_worker_console_panic_headless ... ok test headless_streaming_tests::test_browser_output_not_garbled ... ok test headless_streaming_tests::test_shared_worker_console_panic_headless ... ok test headless_streaming_tests::test_user_spawned_worker_non_cloneable_log_does_not_crash_browser ... ok test headless_streaming_tests::test_worker_console_panic_nocapture ... ok test headless_streaming_tests::test_shared_worker_output_not_garbled ... ok test headless_streaming_tests::test_user_spawned_shared_worker_top_level_logs_browser ... ok test headless_streaming_tests::test_user_spawned_dedicated_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_url_worker_logs_browser ... ok test headless_streaming_tests::test_shared_worker_console_no_panic_headless ... ok test headless_streaming_tests::test_user_spawned_worker_logs_on_failure_browser ... ok test headless_streaming_tests::test_shared_worker_no_carriage_return_in_output ... 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_service_worker_output_not_garbled ... 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_data_url_shared_worker_does_not_inject_browser ... ok test headless_streaming_tests::test_no_carriage_return_in_output ... ok test headless_streaming_tests::test_user_spawned_url_module_worker_logs_browser ... ok test headless_streaming_tests::test_user_spawned_data_url_worker_does_not_inject_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_worker_logs_node_cjs has been running for over 60 seconds test headless_streaming_tests::test_user_spawned_worker_logs_node_esm has been running for over 60 seconds test headless_streaming_tests::test_user_spawned_worker_logs_on_failure_node has been running for over 60 seconds test test_wasm_bindgen_test_runner_list has been running for over 60 seconds test headless_streaming_tests::test_user_spawned_worker_logs_node_esm ... ok test headless_streaming_tests::test_user_spawned_worker_logs_node_cjs ... ok test headless_streaming_tests::test_user_spawned_worker_logs_on_failure_node ... ok test test_wasm_bindgen_test_runner_list ... ok test result: ok. 41 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 124.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-x86.so.1 so:libgcc_s.so.1 >>> wasm-bindgen*: Package size: 9.4 MB >>> wasm-bindgen*: Compressing data... >>> wasm-bindgen*: Create checksum... >>> wasm-bindgen*: Create wasm-bindgen-0.2.118-r0.apk >>> wasm-bindgen: Build complete at Mon, 27 Apr 2026 21:53:29 +0000 elapsed time 0h 8m 25s >>> wasm-bindgen: Cleaning up srcdir >>> wasm-bindgen: Cleaning up pkgdir >>> wasm-bindgen: Uninstalling dependencies... ( 1/21) Purging .makedepends-wasm-bindgen (20260427.214506) ( 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.95.0-r0) ( 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.95.0-r0) ( 9/21) Purging rust (1.95.0-r0) (10/21) Purging icu-libs (78.1-r0) (11/21) Purging lld22 (22.1.3-r0) (12/21) Purging lld22-libs (22.1.3-r0) (13/21) Purging llvm22-libs (22.1.3-r0) (14/21) Purging scudo-malloc (22.1.3-r0) (15/21) Purging simdjson (4.2.4-r0) (16/21) Purging simdutf (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.3-r0) Executing busybox-1.37.0-r31.trigger OK: 425.2 MiB in 102 packages >>> wasm-bindgen: Updating the community/x86 repository index... >>> wasm-bindgen: Signing the index...