==> Synchronizing chroot copy [/home/alhp/workspace/chroot/root] -> [build_d75cca21-c414-47c1-b909-c924634b2918]...done ==> Making package: wasm-bindgen 0.2.101-1.1 (Fri Sep 5 10:24:56 2025) ==> Retrieving sources... -> Downloading wasm-bindgen-0.2.101.tar.gz... % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 384k 0 384k 0 0 356k 0 --:--:-- 0:00:01 --:--:-- 356k 100 1969k 0 1969k 0 0 1358k 0 --:--:-- 0:00:01 --:--:-- 4271k -> Found Cargo.lock ==> Validating source files with sha256sums... wasm-bindgen-0.2.101.tar.gz ... Passed Cargo.lock ... Passed ==> Making package: wasm-bindgen 0.2.101-1.1 (Fri Sep 5 08:24:59 2025) ==> Checking runtime dependencies... ==> Installing missing dependencies... resolving dependencies... looking for conflicting packages... Package (11) New Version Net Change extra/c-ares 1.34.5-1 0.51 MiB core/libedit 20250104_3.1-1 0.26 MiB extra/libngtcp2 1.13.0-2 0.61 MiB extra/libuv 1.51.0-1 0.62 MiB extra/lld 20.1.8-1 6.57 MiB extra/llvm-libs 20.1.8-1 150.01 MiB extra/rust 1:1.89.0-1 263.22 MiB extra/simdjson 1:3.13.0-1 5.23 MiB extra/wasm-component-ld 0.5.16-1 4.92 MiB extra/nodejs 24.7.0-1 67.72 MiB extra/rust-wasm 1:1.89.0-1 460.17 MiB Total Installed Size: 959.84 MiB :: Proceed with installation? [Y/n] checking keyring... checking package integrity... loading package files... checking for file conflicts... :: Processing package changes... installing libedit... installing llvm-libs... installing lld... installing rust... Optional dependencies for rust gdb: rust-gdb script lldb: rust-lldb script installing wasm-component-ld... installing rust-wasm... installing c-ares... installing libngtcp2... installing libuv... installing simdjson... installing nodejs... Optional dependencies for nodejs npm: nodejs package manager :: Running post-transaction hooks... (1/1) Arming ConditionNeedsUpdate... ==> Checking buildtime dependencies... ==> Retrieving sources... -> Found wasm-bindgen-0.2.101.tar.gz -> Found Cargo.lock ==> WARNING: Skipping all source file integrity checks. ==> Extracting sources... -> Extracting wasm-bindgen-0.2.101.tar.gz with bsdtar ==> Starting prepare()... Updating crates.io index Updating git repository `https://github.com/rustwasm/weedle.git` Updating git repository `https://github.com/alexcrichton/raytracer` Downloading crates ... Downloaded toml_datetime v0.7.0 Downloaded trybuild v1.0.110 Downloaded foreign-types-shared v0.1.1 Downloaded zeroize v1.8.1 Downloaded toml_writer v1.0.2 Downloaded toml_parser v1.0.2 Downloaded sync_wrapper v1.0.2 Downloaded serde v1.0.219 Downloaded futures-core v0.3.31 Downloaded toml v0.9.5 Downloaded openssl-probe v0.1.6 Downloaded futures-io v0.3.31 Downloaded target-triple v0.1.4 Downloaded mime v0.3.17 Downloaded yoke v0.8.0 Downloaded serde_derive v1.0.219 Downloaded ryu v1.0.20 Downloaded rustversion v1.0.22 Downloaded log v0.4.28 Downloaded termcolor v1.4.1 Downloaded tokio-macros v2.5.0 Downloaded equivalent v1.0.2 Downloaded serde_spanned v1.0.0 Downloaded icu_properties v2.0.1 Downloaded itoa v1.0.15 Downloaded socket2 v0.6.0 Downloaded ipnet v2.11.0 Downloaded gg-alloc v1.0.0 Downloaded futures-executor v0.3.31 Downloaded futures-task v0.3.31 Downloaded memchr v2.7.5 Downloaded idna_adapter v1.2.1 Downloaded futures-sink v0.3.31 Downloaded gloo-events v0.2.0 Downloaded tower-service v0.3.3 Downloaded pin-utils v0.1.0 Downloaded tower-layer v0.3.3 Downloaded http-body v1.0.1 Downloaded futures-channel v0.3.31 Downloaded futures-macro v0.3.31 Downloaded cfg-if v1.0.3 Downloaded glob v0.3.3 Downloaded gloo-utils v0.2.0 Downloaded slab v0.4.11 Downloaded percent-encoding v2.3.2 Downloaded utf8parse v0.2.2 Downloaded adler32 v1.2.0 Downloaded foreign-types v0.3.2 Downloaded openssl-macros v0.1.1 Downloaded cc v1.2.35 Downloaded form_urlencoded v1.2.2 Downloaded stable_deref_trait v1.2.0 Downloaded zerofrom-derive v0.1.6 Downloaded zerofrom v0.1.6 Downloaded utf8_iter v1.0.4 Downloaded yoke-derive v0.8.0 Downloaded gloo-timers v0.3.0 Downloaded shlex v1.3.0 Downloaded colorchoice v1.0.4 Downloaded fnv v1.0.7 Downloaded is_terminal_polyfill v1.70.1 Downloaded tinystr v0.8.1 Downloaded displaydoc v0.2.5 Downloaded pin-project-lite v0.2.16 Downloaded quote v1.0.40 Downloaded anstyle-query v1.1.4 Downloaded tokio-native-tls v0.3.1 Downloaded futures v0.3.31 Downloaded serde_urlencoded v0.7.1 Downloaded potential_utf v0.1.3 Downloaded synstructure v0.13.2 Downloaded zerovec-derive v0.11.1 Downloaded native-tls v0.2.14 Downloaded indexmap v2.11.0 Downloaded proc-macro2 v1.0.101 Downloaded once_cell v1.21.3 Downloaded pkg-config v0.3.32 Downloaded writeable v0.6.1 Downloaded litemap v0.8.0 Downloaded smallvec v1.15.1 Downloaded find-msvc-tools v0.1.0 Downloaded bytes v1.10.1 Downloaded gloo-worker-macros v0.1.0 Downloaded anstyle-parse v0.2.7 Downloaded leb128 v0.2.5 Downloaded unicode-ident v1.0.18 Downloaded clap_lex v0.7.5 Downloaded strsim v0.11.1 Downloaded bitflags v2.9.4 Downloaded gloo-dialogs v0.2.0 Downloaded leb128fmt v0.1.0 Downloaded http v1.3.1 Downloaded mio v1.0.4 Downloaded gloo-storage v0.3.0 Downloaded clap_derive v4.5.47 Downloaded winnow v0.7.13 Downloaded icu_provider v2.0.0 Downloaded walrus-macro v0.22.0 Downloaded want v0.3.1 Downloaded alloc-stdlib v0.2.2 Downloaded gloo-console v0.3.0 Downloaded icu_normalizer v2.0.0 Downloaded fallible-iterator v0.2.0 Downloaded try-lock v0.2.5 Downloaded num-conv v0.1.0 Downloaded enum_primitive v0.1.1 Downloaded url v2.5.7 Downloaded gloo-render v0.2.0 Downloaded zerotrie v0.2.2 Downloaded openssl-sys v0.9.109 Downloaded icu_collections v2.0.0 Downloaded icu_normalizer_data v2.0.0 Downloaded id-arena v2.2.1 Downloaded time-core v0.1.6 Downloaded icu_locale_core v2.0.0 Downloaded bumpalo v3.19.0 Downloaded anyhow v1.0.99 Downloaded untrusted v0.9.0 Downloaded webpki-roots v0.26.11 Downloaded proc-macro-crate v3.3.0 Downloaded rustc_version v0.4.1 Downloaded subtle v2.6.1 Downloaded adler2 v2.0.1 Downloaded futures-timer v3.0.3 Downloaded either v1.15.0 Downloaded alloc-no-stdlib v2.0.4 Downloaded semver v1.0.26 Downloaded serde-wasm-bindgen v0.6.5 Downloaded wasm-encoder v0.214.0 Downloaded num_threads v0.1.7 Downloaded errno v0.3.13 Downloaded fastrand v2.3.0 Downloaded chunked_transfer v1.5.0 Downloaded httpdate v1.0.3 Downloaded powerfmt v0.2.0 Downloaded gloo-history v0.2.2 Downloaded rustc-demangle v0.1.26 Downloaded clap v4.5.47 Downloaded num_cpus v1.17.0 Downloaded threadpool v1.8.1 Downloaded ahash v0.8.12 Downloaded rustc-hash v2.1.1 Downloaded rand_core v0.6.4 Downloaded sha1_smol v1.0.1 Downloaded rand_chacha v0.3.1 Downloaded thiserror v1.0.69 Downloaded normalize-line-endings v0.3.0 Downloaded float-cmp v0.10.0 Downloaded quick-error v1.2.3 Downloaded tempfile v3.21.0 Downloaded ascii v1.1.0 Downloaded scoped_threadpool v0.1.9 Downloaded rstest v0.26.1 Downloaded rustls-pki-types v1.12.0 Downloaded deranged v0.5.3 Downloaded tracing-core v0.1.34 Downloaded unicase v2.8.1 Downloaded hashbrown v0.15.5 Downloaded filetime v0.2.26 Downloaded ppv-lite86 v0.2.21 Downloaded buf_redux v0.8.4 Downloaded crc32fast v1.5.0 Downloaded doc-comment v0.3.3 Downloaded safemem v0.3.3 Downloaded predicates-core v1.0.9 Downloaded tower v0.5.2 Downloaded tiny_http v0.12.0 Downloaded rstest_macros v0.26.1 Downloaded mime_guess v2.0.5 Downloaded wait-timeout v0.2.1 Downloaded zerovec v0.11.4 Downloaded predicates-tree v1.0.12 Downloaded console_log v1.0.0 Downloaded tower-http v0.6.6 Downloaded byteorder v1.5.0 Downloaded miniz_oxide v0.8.9 Downloaded iri-string v0.7.8 Downloaded toml_edit v0.22.27 Downloaded wasm-encoder v0.238.1 Downloaded twoway v0.1.8 Downloaded num-integer v0.1.46 Downloaded toml_datetime v0.6.11 Downloaded assert_cmd v2.0.17 Downloaded futures-util v0.3.31 Downloaded getrandom v0.3.3 Downloaded lazy_static v1.5.0 Downloaded gloo-worker v0.5.0 Downloaded serde_json v1.0.143 Downloaded multipart v0.18.0 Downloaded heck v0.5.0 Downloaded diff v0.1.13 Downloaded num-iter v0.1.45 Downloaded gloo-net v0.5.0 Downloaded hashbrown v0.12.3 Downloaded humantime v2.2.0 Downloaded base64 v0.13.1 Downloaded rand v0.8.5 Downloaded flate2 v1.1.2 Downloaded gloo-file v0.3.0 Downloaded autocfg v1.5.0 Downloaded rouille v3.6.2 Downloaded idna v1.1.0 Downloaded reqwest v0.12.23 Downloaded version_check v0.9.5 Downloaded num-traits v0.1.43 Downloaded inflate v0.1.1 Downloaded atomic-waker v1.1.2 Downloaded http-body-util v0.1.3 Downloaded hyper-tls v0.6.0 Downloaded vcpkg v0.2.15 Downloaded hashbrown v0.14.5 Downloaded anstyle v1.0.11 Downloaded env_filter v0.1.3 Downloaded sourcefile v0.2.1 Downloaded color_quant v1.1.0 Downloaded icu_properties_data v2.0.1 Downloaded clap_builder v4.5.47 Downloaded futures-core-preview v0.3.0-alpha.19 Downloaded wast v214.0.0 Downloaded ureq v2.12.1 Downloaded num-rational v0.1.43 Downloaded aho-corasick v1.1.3 Downloaded time v0.3.43 Downloaded lzw v0.10.0 Downloaded wast v238.0.1 Downloaded env_logger v0.11.8 Downloaded walrus v0.23.3 Downloaded wat v1.238.1 Downloaded gif v0.9.2 Downloaded png v0.6.2 Downloaded proc-macro-crate v1.3.1 Downloaded getrandom v0.2.16 Downloaded syn v2.0.106 Downloaded wasmparser v0.214.0 Downloaded wasmparser v0.238.1 Downloaded crossbeam-deque v0.8.6 Downloaded zerocopy v0.8.26 Downloaded iana-time-zone v0.1.63 Downloaded openssl v0.10.73 Downloaded unicode-width v0.1.14 Downloaded tokio-rustls v0.26.2 Downloaded pin-project-internal v1.1.10 Downloaded webpki-roots v1.0.2 Downloaded unicode-width v0.2.1 Downloaded tracing v0.1.41 Downloaded bitflags v0.7.0 Downloaded relative-path v1.9.3 Downloaded bstr v1.12.0 Downloaded pinned v0.1.0 Downloaded console_error_panic_hook v0.1.7 Downloaded bincode v1.3.3 Downloaded thiserror-impl v1.0.69 Downloaded futures-channel-preview v0.3.0-alpha.19 Downloaded hyper-rustls v0.27.7 Downloaded anstream v0.6.20 Downloaded libc v0.2.175 Downloaded crossbeam-utils v0.8.21 Downloaded gimli v0.26.2 Downloaded tokio v1.47.1 Downloaded termtree v0.5.1 Downloaded difflib v0.4.0 Downloaded predicates v3.1.3 Downloaded pin-project v1.1.10 Downloaded askama v0.14.0 Downloaded hyper-util v0.1.16 Downloaded crossbeam-epoch v0.9.18 Downloaded num-traits v0.2.19 Downloaded httparse v1.10.1 Downloaded basic-toml v0.1.10 Downloaded linux-raw-sys v0.9.4 Downloaded wasmprinter v0.214.0 Downloaded indexmap v1.9.3 Downloaded askama_parser v0.14.0 Downloaded rustls-webpki v0.103.4 Downloaded rayon-core v1.13.0 Downloaded base64 v0.22.1 Downloaded askama_derive v0.14.0 Downloaded toml_edit v0.19.15 Downloaded http v0.2.12 Downloaded json v0.12.4 Downloaded hyper v1.7.0 Downloaded image v0.12.4 Downloaded deflate v0.7.20 Downloaded tokio-util v0.7.16 Downloaded nom v5.1.3 Downloaded winnow v0.5.40 Downloaded openssl-src v300.5.2+3.5.2 Downloaded regex v1.11.2 Downloaded rayon v1.11.0 Downloaded h2 v0.4.12 Downloaded brotli-decompressor v4.0.3 Downloaded jpeg-decoder v0.1.22 Downloaded chrono v0.4.41 Downloaded regex-syntax v0.8.6 Downloaded rustls v0.23.31 Downloaded gloo v0.11.0 Downloaded rustix v1.0.8 Downloaded regex-automata v0.4.10 Downloaded jiff v0.2.15 Downloaded encoding_rs v0.8.35 Downloaded ring v0.17.14 ==> Starting build()... Compiling proc-macro2 v1.0.101 Compiling unicode-ident v1.0.18 Compiling cfg-if v1.0.3 Compiling libc v0.2.175 Compiling stable_deref_trait v1.2.0 Compiling find-msvc-tools v0.1.0 Compiling shlex v1.3.0 Compiling once_cell v1.21.3 Compiling zerocopy v0.8.26 Compiling autocfg v1.5.0 Compiling memchr v2.7.5 Compiling serde v1.0.219 Compiling bitflags v2.9.4 Compiling log v0.4.28 Compiling litemap v0.8.0 Compiling writeable v0.6.1 Compiling crossbeam-utils v0.8.21 Compiling pkg-config v0.3.32 Compiling vcpkg v0.2.15 Compiling icu_normalizer_data v2.0.0 Compiling icu_properties_data v2.0.1 Compiling version_check v0.9.5 Compiling smallvec v1.15.1 Compiling rayon-core v1.13.0 Compiling zeroize v1.8.1 Compiling semver v1.0.26 Compiling rustix v1.0.8 Compiling cc v1.2.35 Compiling rustls-pki-types v1.12.0 Compiling unicase v2.8.1 Compiling heck v0.5.0 Compiling getrandom v0.3.3 Compiling utf8parse v0.2.2 Compiling linux-raw-sys v0.9.4 Compiling is_terminal_polyfill v1.70.1 Compiling anstyle-parse v0.2.7 Compiling anstyle-query v1.1.4 Compiling anyhow v1.0.99 Compiling regex-syntax v0.8.6 Compiling hashbrown v0.15.5 Compiling serde_json v1.0.143 Compiling httparse v1.10.1 Compiling colorchoice v1.0.4 Compiling percent-encoding v2.3.2 Compiling mime_guess v2.0.5 Compiling aho-corasick v1.1.3 Compiling either v1.15.0 Compiling openssl v0.10.73 Compiling equivalent v1.0.2 Compiling untrusted v0.9.0 Compiling foreign-types-shared v0.1.1 Compiling utf8_iter v1.0.4 Compiling anstyle v1.0.11 Compiling crc32fast v1.5.0 Compiling hashbrown v0.12.3 Compiling crossbeam-epoch v0.9.18 Compiling foreign-types v0.3.2 Compiling anstream v0.6.20 Compiling form_urlencoded v1.2.2 Compiling adler2 v2.0.1 Compiling alloc-no-stdlib v2.0.4 Compiling ahash v0.8.12 Compiling crossbeam-deque v0.8.6 Compiling fastrand v2.3.0 Compiling itoa v1.0.15 Compiling quote v1.0.40 Compiling openssl-src v300.5.2+3.5.2 Compiling rustls v0.23.31 Compiling native-tls v0.2.14 Compiling mime v0.3.17 Compiling fallible-iterator v0.2.0 Compiling ryu v1.0.20 Compiling syn v2.0.106 Compiling powerfmt v0.2.0 Compiling wasm-bindgen-shared v0.2.101 (/startdir/src/wasm-bindgen-0.2.101/crates/shared) Compiling leb128 v0.2.5 Compiling safemem v0.3.3 Compiling deranged v0.5.3 Compiling indexmap v1.9.3 Compiling num-traits v0.2.19 Compiling buf_redux v0.8.4 Compiling wasm-encoder v0.214.0 Compiling getrandom v0.2.16 Compiling regex-automata v0.4.10 Compiling rand_core v0.6.4 Compiling num_cpus v1.17.0 Compiling alloc-stdlib v0.2.2 Compiling rayon v1.11.0 Compiling miniz_oxide v0.8.9 Compiling webpki-roots v1.0.2 Compiling twoway v0.1.8 Compiling iana-time-zone v0.1.63 Compiling httpdate v1.0.3 Compiling base64 v0.22.1 Compiling num-conv v0.1.0 Compiling gimli v0.26.2 Compiling clap_lex v0.7.5 Compiling subtle v2.6.1 Compiling openssl-probe v0.1.6 Compiling strsim v0.11.1 Compiling num_threads v0.1.7 Compiling ascii v1.1.0 Compiling time-core v0.1.6 Compiling quick-error v1.2.3 Compiling chunked_transfer v1.5.0 Compiling tempfile v3.21.0 Compiling clap_builder v4.5.47 Compiling chrono v0.4.41 Compiling flate2 v1.1.2 Compiling webpki-roots v0.26.11 Compiling threadpool v1.8.1 Compiling brotli-decompressor v4.0.3 Compiling time v0.3.43 Compiling ppv-lite86 v0.2.21 Compiling tiny_http v0.12.0 Compiling filetime v0.2.26 Compiling sha1_smol v1.0.1 Compiling rustc-demangle v0.1.26 Compiling base64 v0.13.1 Compiling jiff v0.2.15 Compiling rand_chacha v0.3.1 Compiling rand v0.8.5 Compiling regex v1.11.2 Compiling id-arena v2.2.1 Compiling multipart v0.18.0 Compiling env_filter v0.1.3 Compiling synstructure v0.13.2 Compiling openssl-sys v0.9.109 Compiling ring v0.17.14 Compiling env_logger v0.11.8 Compiling rustls-webpki v0.103.4 Compiling zerofrom-derive v0.1.6 Compiling yoke-derive v0.8.0 Compiling zerovec-derive v0.11.1 Compiling displaydoc v0.2.5 Compiling serde_derive v1.0.219 Compiling openssl-macros v0.1.1 Compiling walrus-macro v0.22.0 Compiling clap_derive v4.5.47 Compiling clap v4.5.47 Compiling zerofrom v0.1.6 Compiling yoke v0.8.0 Compiling zerovec v0.11.4 Compiling zerotrie v0.2.2 Compiling tinystr v0.8.1 Compiling potential_utf v0.1.3 Compiling icu_collections v2.0.0 Compiling icu_locale_core v2.0.0 Compiling icu_provider v2.0.0 Compiling icu_properties v2.0.1 Compiling icu_normalizer v2.0.0 Compiling idna_adapter v1.2.1 Compiling idna v1.1.0 Compiling indexmap v2.11.0 Compiling hashbrown v0.14.5 Compiling url v2.5.7 Compiling ureq v2.12.1 Compiling wasmparser v0.214.0 Compiling rouille v3.6.2 Compiling walrus v0.23.3 Compiling wasm-bindgen-cli-support v0.2.101 (/startdir/src/wasm-bindgen-0.2.101/crates/cli-support) Compiling wasm-bindgen-cli v0.2.101 (/startdir/src/wasm-bindgen-0.2.101/crates/cli) Finished `release` profile [optimized] target(s) in 1m 37s 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` ==> Starting check()... Compiling unicode-ident v1.0.18 Compiling proc-macro2 v1.0.101 Compiling cfg-if v1.0.3 Compiling libc v0.2.175 Compiling stable_deref_trait v1.2.0 Compiling shlex v1.3.0 Compiling find-msvc-tools v0.1.0 Compiling autocfg v1.5.0 Compiling memchr v2.7.5 Compiling once_cell v1.21.3 Compiling zerocopy v0.8.26 Compiling serde v1.0.219 Compiling bitflags v2.9.4 Compiling regex-syntax v0.8.6 Compiling log v0.4.28 Compiling hashbrown v0.15.5 Compiling equivalent v1.0.2 Compiling writeable v0.6.1 Compiling litemap v0.8.0 Compiling crossbeam-utils v0.8.21 Compiling icu_normalizer_data v2.0.0 Compiling vcpkg v0.2.15 Compiling icu_properties_data v2.0.1 Compiling version_check v0.9.5 Compiling pkg-config v0.3.32 Compiling semver v1.0.26 Compiling rayon-core v1.13.0 Compiling anstyle v1.0.11 Compiling cc v1.2.35 Compiling zeroize v1.8.1 Compiling smallvec v1.15.1 Compiling utf8parse v0.2.2 Compiling getrandom v0.3.3 Compiling unicase v2.8.1 Compiling rustls-pki-types v1.12.0 Compiling rustix v1.0.8 Compiling heck v0.5.0 Compiling anyhow v1.0.99 Compiling anstyle-parse v0.2.7 Compiling hashbrown v0.12.3 Compiling utf8_iter v1.0.4 Compiling openssl v0.10.73 Compiling aho-corasick v1.1.3 Compiling mime_guess v2.0.5 Compiling percent-encoding v2.3.2 Compiling httparse v1.10.1 Compiling colorchoice v1.0.4 Compiling linux-raw-sys v0.9.4 Compiling is_terminal_polyfill v1.70.1 Compiling anstyle-query v1.1.4 Compiling either v1.15.0 Compiling crc32fast v1.5.0 Compiling crossbeam-epoch v0.9.18 Compiling foreign-types-shared v0.1.1 Compiling serde_json v1.0.143 Compiling untrusted v0.9.0 Compiling ahash v0.8.12 Compiling quote v1.0.40 Compiling openssl-src v300.5.2+3.5.2 Compiling crossbeam-deque v0.8.6 Compiling foreign-types v0.3.2 Compiling anstream v0.6.20 Compiling form_urlencoded v1.2.2 Compiling powerfmt v0.2.0 Compiling wasm-bindgen-shared v0.2.101 (/startdir/src/wasm-bindgen-0.2.101/crates/shared) Compiling fastrand v2.3.0 Compiling syn v2.0.106 Compiling leb128 v0.2.5 Compiling fallible-iterator v0.2.0 Compiling getrandom v0.2.16 Compiling num-traits v0.2.19 Compiling indexmap v1.9.3 Compiling itoa v1.0.15 Compiling native-tls v0.2.14 Compiling rand_core v0.6.4 Compiling adler2 v2.0.1 Compiling rustls v0.23.31 Compiling safemem v0.3.3 Compiling ryu v1.0.20 Compiling mime v0.3.17 Compiling alloc-no-stdlib v2.0.4 Compiling buf_redux v0.8.4 Compiling miniz_oxide v0.8.9 Compiling alloc-stdlib v0.2.2 Compiling wasm-encoder v0.214.0 Compiling num_cpus v1.17.0 Compiling rayon v1.11.0 Compiling regex-automata v0.4.10 Compiling deranged v0.5.3 Compiling webpki-roots v1.0.2 Compiling twoway v0.1.8 Compiling subtle v2.6.1 Compiling gimli v0.26.2 Compiling openssl-probe v0.1.6 Compiling clap_lex v0.7.5 Compiling time-core v0.1.6 Compiling ascii v1.1.0 Compiling iana-time-zone v0.1.63 Compiling num_threads v0.1.7 Compiling strsim v0.11.1 Compiling chunked_transfer v1.5.0 Compiling quick-error v1.2.3 Compiling base64 v0.22.1 Compiling num-conv v0.1.0 Compiling ppv-lite86 v0.2.21 Compiling tempfile v3.21.0 Compiling httpdate v1.0.3 Compiling clap_builder v4.5.47 Compiling chrono v0.4.41 Compiling webpki-roots v0.26.11 Compiling flate2 v1.1.2 Compiling tiny_http v0.12.0 Compiling rustc_version v0.4.1 Compiling threadpool v1.8.1 Compiling rand_chacha v0.3.1 Compiling rand v0.8.5 Compiling time v0.3.43 Compiling brotli-decompressor v4.0.3 Compiling filetime v0.2.26 Compiling indexmap v2.11.0 Compiling jiff v0.2.15 Compiling base64 v0.13.1 Compiling rustc-demangle v0.1.26 Compiling sha1_smol v1.0.1 Compiling winnow v0.7.13 Compiling multipart v0.18.0 Compiling toml_datetime v0.6.11 Compiling rstest_macros v0.26.1 Compiling doc-comment v0.3.3 Compiling id-arena v2.2.1 Compiling predicates-core v1.0.9 Compiling float-cmp v0.10.0 Compiling assert_cmd v2.0.17 Compiling futures-core v0.3.31 Compiling futures-task v0.3.31 Compiling relative-path v1.9.3 Compiling glob v0.3.3 Compiling pin-utils v0.1.0 Compiling slab v0.4.11 Compiling pin-project-lite v0.2.16 Compiling termtree v0.5.1 Compiling difflib v0.4.0 Compiling normalize-line-endings v0.3.0 Compiling wait-timeout v0.2.1 Compiling predicates-tree v1.0.12 Compiling futures-timer v3.0.3 Compiling termcolor v1.4.1 Compiling regex v1.11.2 Compiling bstr v1.12.0 Compiling diff v0.1.13 Compiling env_filter v0.1.3 Compiling predicates v3.1.3 Compiling toml_edit v0.22.27 Compiling synstructure v0.13.2 Compiling openssl-sys v0.9.109 Compiling ring v0.17.14 Compiling proc-macro-crate v3.3.0 Compiling env_logger v0.11.8 Compiling rustls-webpki v0.103.4 Compiling zerofrom-derive v0.1.6 Compiling yoke-derive v0.8.0 Compiling zerovec-derive v0.11.1 Compiling displaydoc v0.2.5 Compiling serde_derive v1.0.219 Compiling openssl-macros v0.1.1 Compiling walrus-macro v0.22.0 Compiling clap_derive v4.5.47 Compiling futures-macro v0.3.31 Compiling futures-util v0.3.31 Compiling clap v4.5.47 Compiling zerofrom v0.1.6 Compiling yoke v0.8.0 Compiling zerovec v0.11.4 Compiling zerotrie v0.2.2 Compiling tinystr v0.8.1 Compiling potential_utf v0.1.3 Compiling icu_collections v2.0.0 Compiling icu_locale_core v2.0.0 Compiling icu_provider v2.0.0 Compiling icu_properties v2.0.1 Compiling icu_normalizer v2.0.0 Compiling idna_adapter v1.2.1 Compiling idna v1.1.0 Compiling hashbrown v0.14.5 Compiling url v2.5.7 Compiling ureq v2.12.1 Compiling wasmparser v0.214.0 Compiling rouille v3.6.2 Compiling walrus v0.23.3 Compiling wasmprinter v0.214.0 Compiling wasm-bindgen-cli-support v0.2.101 (/startdir/src/wasm-bindgen-0.2.101/crates/cli-support) Compiling rstest v0.26.1 Compiling wasm-bindgen-cli v0.2.101 (/startdir/src/wasm-bindgen-0.2.101/crates/cli) Finished `test` profile [unoptimized + debuginfo] target(s) in 54.67s 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/bin/wasm-bindgen.rs (/startdir/src/wasm-bindgen-0.2.101/target/debug/deps/wasm_bindgen-d6a1202760602de3) 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/main.rs (/startdir/src/wasm-bindgen-0.2.101/target/debug/deps/wasm_bindgen_test_runner-4bdc1e378ebd6862) 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 (/startdir/src/wasm-bindgen-0.2.101/target/debug/deps/wasm2es6js-dbbdea9d5abd2b70) running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s Running tests/reference.rs (/startdir/src/wasm-bindgen-0.2.101/target/debug/deps/reference-5bef85c6c713ccd3) running 32 tests test runtest::test_19_modules_rs ... FAILED test runtest::test_16_int128_rs ... FAILED test runtest::test_05_async_number_rs ... ok test runtest::test_03_anyref_import_catch_rs ... FAILED test runtest::test_20_nop_rs ... ok test runtest::test_22_pointers_rs ... FAILED test runtest::test_17_intrinsic_only_rs ... FAILED test runtest::test_10_empty_rs ... ok test runtest::test_14_import_getter_setter_rs ... FAILED test runtest::test_06_async_void_rs ... ok test runtest::test_23_raw_rs ... ok test runtest::test_07_builder_rs ... ok test runtest::test_15_import_rs ... FAILED test runtest::test_13_getter_setter_rs ... FAILED test runtest::test_12_function_attrs_rs ... ok test runtest::test_21_optional_args_rs ... ok test runtest::test_02_anyref_empty_rs ... ok test runtest::test_24_result_rs ... FAILED test runtest::test_08_constructor_rs ... ok test runtest::test_11_enums_rs ... FAILED test runtest::test_04_anyref_nop_rs ... ok test runtest::test_18_keyword_rs ... FAILED test runtest::test_09_echo_rs ... FAILED test runtest::test_01_add_rs ... FAILED test runtest::test_25_self_type_rs ... FAILED test runtest::test_29_targets_rs ... ok test runtest::test_26_skip_jsdoc_rs ... FAILED test runtest::test_27_static_rs ... ok test runtest::test_31_wasm_export_types_rs ... FAILED test runtest::test_28_string_arg_rs ... FAILED test runtest::test_32_web_sys_rs ... ok test runtest::test_30_typescript_type_rs ... FAILED failures: ---- runtest::test_19_modules_rs stdout ---- Error: found a difference: let wasm; export function __wbg_set_wasm(val) { wasm = val; } let cachedUint8ArrayMemory0 = null; function getUint8ArrayMemory0() { if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) { cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer); } return cachedUint8ArrayMemory0; } const lTextDecoder = typeof TextDecoder === 'undefined' ? (0, module.require)('util').TextDecoder : TextDecoder; let cachedTextDecoder = new lTextDecoder('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 lTextDecoder('utf-8', { ignoreBOM: true, fatal: true }); cachedTextDecoder.decode(); numBytesDecoded = len; } return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len)); } function getStringFromWasm0(ptr, len) { ptr = ptr >>> 0; return decodeText(ptr, len); } export function exported() { wasm.exported(); } export function __wbg_parseFloat_2be7f01c31025438(arg0, arg1) { const ret = parseFloat(getStringFromWasm0(arg0, arg1)); return ret; }; export function __wbg_parseFloat_7bc8aecd47f33642(arg0) { const ret = parseFloat(arg0); return ret; }; export function __wbindgen_init_externref_table() { const table = wasm.__wbindgen_export_0; const offset = table.grow(4); table.set(0, undefined); table.set(offset + 0, undefined); table.set(offset + 1, null); table.set(offset + 2, true); table.set(offset + 3, false); ; }; export function __wbindgen_string_new(arg0, arg1) { const ret = getStringFromWasm0(arg0, arg1); return ret; }; -export function __wbindgen_throw(arg0, arg1) { - throw new Error(getStringFromWasm0(arg0, arg1)); -}; - ---- runtest::test_16_int128_rs stdout ---- Error: found a difference: let wasm; export function __wbg_set_wasm(val) { wasm = val; } - -let cachedUint8ArrayMemory0 = null; - -function getUint8ArrayMemory0() { - if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) { - cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer); - } - return cachedUint8ArrayMemory0; -} - -const lTextDecoder = typeof TextDecoder === 'undefined' ? (0, module.require)('util').TextDecoder : TextDecoder; - -let cachedTextDecoder = new lTextDecoder('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 lTextDecoder('utf-8', { ignoreBOM: true, fatal: true }); - cachedTextDecoder.decode(); - numBytesDecoded = len; - } - return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len)); -} - -function getStringFromWasm0(ptr, len) { - ptr = ptr >>> 0; - return decodeText(ptr, len); -} /** * @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} 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))); } function isLikeNone(x) { return x === undefined || x === null; } /** * @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))); } function takeFromExternrefTable0(idx) { const value = wasm.__wbindgen_export_0.get(idx); wasm.__externref_table_dealloc(idx); return value; } /** * @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 __wbindgen_init_externref_table() { const table = wasm.__wbindgen_export_0; const offset = table.grow(4); table.set(0, undefined); table.set(offset + 0, undefined); table.set(offset + 1, null); table.set(offset + 2, true); table.set(offset + 3, false); ; -}; - -export function __wbindgen_throw(arg0, arg1) { - throw new Error(getStringFromWasm0(arg0, arg1)); }; ---- runtest::test_03_anyref_import_catch_rs stdout ---- Error: found a difference: let wasm; export function __wbg_set_wasm(val) { wasm = val; } function addToExternrefTable0(obj) { const idx = wasm.__externref_table_alloc(); wasm.__wbindgen_export_2.set(idx, obj); return idx; } function handleError(f, args) { try { return f.apply(this, args); } catch (e) { const idx = addToExternrefTable0(e); wasm.__wbindgen_exn_store(idx); } } -let cachedUint8ArrayMemory0 = null; - -function getUint8ArrayMemory0() { - if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) { - cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer); - } - return cachedUint8ArrayMemory0; -} - -const lTextDecoder = typeof TextDecoder === 'undefined' ? (0, module.require)('util').TextDecoder : TextDecoder; - -let cachedTextDecoder = new lTextDecoder('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 lTextDecoder('utf-8', { ignoreBOM: true, fatal: true }); - cachedTextDecoder.decode(); - numBytesDecoded = len; - } - return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len)); -} - -function getStringFromWasm0(ptr, len) { - ptr = ptr >>> 0; - return decodeText(ptr, len); -} - function takeFromExternrefTable0(idx) { const value = wasm.__wbindgen_export_2.get(idx); wasm.__externref_table_dealloc(idx); return value; } export function exported() { const ret = wasm.exported(); if (ret[1]) { throw takeFromExternrefTable0(ret[0]); } } export function __wbg_foo_4e8309b1aa95a4ac() { return handleError(function () { foo(); }, arguments) }; export function __wbindgen_init_externref_table() { const table = wasm.__wbindgen_export_2; const offset = table.grow(4); table.set(0, undefined); table.set(offset + 0, undefined); table.set(offset + 1, null); table.set(offset + 2, true); table.set(offset + 3, false); ; -}; - -export function __wbindgen_throw(arg0, arg1) { - throw new Error(getStringFromWasm0(arg0, arg1)); }; ---- runtest::test_22_pointers_rs stdout ---- Error: found a difference: let wasm; export function __wbg_set_wasm(val) { wasm = val; } /** * @param {number} input * @returns {number} */ export function const_pointer(input) { const ret = wasm.const_pointer(input); return ret >>> 0; } /** * @param {number} input * @returns {number} */ export function mut_pointer(input) { - const ret = wasm.mut_pointer(input); + const ret = wasm.const_pointer(input); return ret >>> 0; } export function __wbindgen_init_externref_table() { const table = wasm.__wbindgen_export_0; 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); ; }; ---- runtest::test_17_intrinsic_only_rs stdout ---- Error: found a difference: let wasm; export function __wbg_set_wasm(val) { wasm = val; } -let cachedUint8ArrayMemory0 = null; - -function getUint8ArrayMemory0() { - if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) { - cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer); - } - return cachedUint8ArrayMemory0; -} - -const lTextDecoder = typeof TextDecoder === 'undefined' ? (0, module.require)('util').TextDecoder : TextDecoder; - -let cachedTextDecoder = new lTextDecoder('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 lTextDecoder('utf-8', { ignoreBOM: true, fatal: true }); - cachedTextDecoder.decode(); - numBytesDecoded = len; - } - return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len)); -} - -function getStringFromWasm0(ptr, len) { - ptr = ptr >>> 0; - return decodeText(ptr, len); -} - function takeFromExternrefTable0(idx) { const value = wasm.__wbindgen_export_0.get(idx); wasm.__externref_table_dealloc(idx); return value; } /** * @returns {number} */ export function causes_error() { const ret = wasm.causes_error(); if (ret[2]) { throw takeFromExternrefTable0(ret[1]); } return ret[0]; } export function __wbindgen_init_externref_table() { const table = wasm.__wbindgen_export_0; const offset = table.grow(4); table.set(0, undefined); table.set(offset + 0, undefined); table.set(offset + 1, null); table.set(offset + 2, true); table.set(offset + 3, false); ; -}; - -export function __wbindgen_throw(arg0, arg1) { - throw new Error(getStringFromWasm0(arg0, arg1)); }; ---- runtest::test_14_import_getter_setter_rs stdout ---- Error: found a difference: let wasm; export function __wbg_set_wasm(val) { wasm = val; } -let cachedUint8ArrayMemory0 = null; - -function getUint8ArrayMemory0() { - if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) { - cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer); - } - return cachedUint8ArrayMemory0; -} - -const lTextDecoder = typeof TextDecoder === 'undefined' ? (0, module.require)('util').TextDecoder : TextDecoder; - -let cachedTextDecoder = new lTextDecoder('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 lTextDecoder('utf-8', { ignoreBOM: true, fatal: true }); - cachedTextDecoder.decode(); - numBytesDecoded = len; - } - return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len)); -} - -function getStringFromWasm0(ptr, len) { - ptr = ptr >>> 0; - return decodeText(ptr, len); -} - export function exported() { wasm.exported(); } export function __wbg_another_79dcbfe47962d7a7(arg0) { const ret = arg0.prop2; return ret; }; export function __wbg_b_266c81b129cbc216(arg0) { const ret = arg0.a; return ret; }; export function __wbg_bar2_38c86771c0e03476() { const ret = Bar.bar2(); return ret; }; export function __wbg_getfoo_690459206923b526() { const ret = Bar.get_foo(); return ret; }; export function __wbg_new_98ff9abc2a3e2736() { const ret = new SomeClass(); return ret; }; export function __wbg_setanother_51e596d4d035bc4d(arg0, arg1) { arg0.prop2 = arg1 >>> 0; }; export function __wbg_setb_eda0c18669c4ad53(arg0, arg1) { arg0.a = arg1 >>> 0; }; export function __wbg_setbar2_d99cb80edd0e1959(arg0) { Bar.set_bar2(arg0 >>> 0); }; export function __wbg_setfoo_029452b4d4645d79(arg0) { Bar.set_foo(arg0 >>> 0); }; export function __wbg_setsignal_bd536e517c35da41(arg0, arg1) { arg0.signal = arg1 >>> 0; }; export function __wbg_setsomeprop_965004b0138eb32c(arg0, arg1) { arg0.some_prop = arg1 >>> 0; }; export function __wbg_signal_89fe6c5b19fec3df(arg0) { const ret = arg0.signal; return ret; }; export function __wbg_someprop_fd4fc05f44bf5de2(arg0) { const ret = arg0.some_prop; return ret; }; export function __wbindgen_init_externref_table() { const table = wasm.__wbindgen_export_0; const offset = table.grow(4); table.set(0, undefined); table.set(offset + 0, undefined); table.set(offset + 1, null); table.set(offset + 2, true); table.set(offset + 3, false); ; -}; - -export function __wbindgen_throw(arg0, arg1) { - throw new Error(getStringFromWasm0(arg0, arg1)); }; ---- runtest::test_15_import_rs stdout ---- Error: found a difference: import { default as default1 } from 'tests/wasm/import_class.js'; import * as __wbg_star0 from './snippets/reference-test-ddc0ab9a51c9d25f/inline0.js'; import * as __wbg_star1 from 'foo-raw'; import * as __wbg_star2 from 'pure-extern'; import * as __wbg_star3 from 'tests/wasm/imports.js'; let wasm; function addToExternrefTable0(obj) { const idx = wasm.__externref_table_alloc(); wasm.__wbindgen_export_2.set(idx, obj); return idx; } function handleError(f, args) { try { return f.apply(this, args); } catch (e) { const idx = addToExternrefTable0(e); wasm.__wbindgen_exn_store(idx); } } let cachedUint8ArrayMemory0 = null; function getUint8ArrayMemory0() { if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) { cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer); } return cachedUint8ArrayMemory0; } let cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } ); if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); }; const MAX_SAFARI_DECODE_BYTES = 2146435072; let numBytesDecoded = 0; function decodeText(ptr, len) { numBytesDecoded += len; if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) { cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } ); cachedTextDecoder.decode(); numBytesDecoded = len; } return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len)); } function getStringFromWasm0(ptr, len) { ptr = ptr >>> 0; return decodeText(ptr, len); } function takeFromExternrefTable0(idx) { const value = wasm.__wbindgen_export_2.get(idx); wasm.__externref_table_dealloc(idx); return value; } export function exported() { const ret = wasm.exported(); if (ret[1]) { throw takeFromExternrefTable0(ret[0]); } } const EXPECTED_RESPONSE_TYPES = new Set(['basic', 'cors', 'default']); 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 && EXPECTED_RESPONSE_TYPES.has(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 __wbg_get_imports() { const imports = {}; imports.wbg = {}; imports.wbg.__wbg_catchme_f7d87ea824a61e87 = function() { return handleError(function () { catch_me(); }, arguments) }; imports.wbg.__wbg_get_56ba567010fb9959 = function(arg0) { const ret = arg0.get(); return ret; }; imports.wbg.__wbg_myfunction_8c7b624429f78550 = function() { b.my_function(); }; imports.wbg.__wbg_new_d21827b66c7fd25d = function(arg0) { const ret = new default1(arg0); return ret; }; imports.wbg.__wbg_nocatch_be850a8dddd9599d = function() { no_catch(); }; imports.wbg.__wbg_reload_84c12f152ad689f0 = function() { window.location.reload(); }; imports.wbg.__wbg_static_accessor_CONST_9e9d5ae758197645 = function() { const ret = a.CONST; return ret; }; imports.wbg.__wbg_write_c2ce0ce33a6087d5 = function(arg0, arg1) { window.document.write(getStringFromWasm0(arg0, arg1)); }; imports.wbg.__wbindgen_init_externref_table = function() { const table = wasm.__wbindgen_export_2; 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); ; }; - imports.wbg.__wbindgen_throw = function(arg0, arg1) { - throw new Error(getStringFromWasm0(arg0, arg1)); - }; imports['./snippets/reference-test-ddc0ab9a51c9d25f/inline0.js'] = __wbg_star0; imports['foo-raw'] = __wbg_star1; imports['pure-extern'] = __wbg_star2; imports['tests/wasm/imports.js'] = __wbg_star3; return imports; } function __wbg_init_memory(imports, memory) { } function __wbg_finalize_init(instance, module) { wasm = instance.exports; __wbg_init.__wbindgen_wasm_module = module; cachedUint8ArrayMemory0 = null; wasm.__wbindgen_start(); return wasm; } function initSync(module) { if (wasm !== undefined) return wasm; if (typeof 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(); __wbg_init_memory(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 (typeof 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 (typeof 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); } __wbg_init_memory(imports); const { instance, module } = await __wbg_load(await module_or_path, imports); return __wbg_finalize_init(instance, module); } export { initSync }; export default __wbg_init; ---- runtest::test_13_getter_setter_rs stdout ---- Error: found a difference: let wasm; export function __wbg_set_wasm(val) { wasm = val; } let cachedUint8ArrayMemory0 = null; function getUint8ArrayMemory0() { if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) { cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer); } return cachedUint8ArrayMemory0; } const lTextDecoder = typeof TextDecoder === 'undefined' ? (0, module.require)('util').TextDecoder : TextDecoder; let cachedTextDecoder = new lTextDecoder('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 lTextDecoder('utf-8', { ignoreBOM: true, fatal: true }); cachedTextDecoder.decode(); numBytesDecoded = len; } return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len)); } function getStringFromWasm0(ptr, len) { ptr = ptr >>> 0; return decodeText(ptr, len); } function isLikeNone(x) { return x === undefined || x === null; } let WASM_VECTOR_LEN = 0; const lTextEncoder = typeof TextEncoder === 'undefined' ? (0, module.require)('util').TextEncoder : TextEncoder; const cachedTextEncoder = new lTextEncoder('utf-8'); const encodeString = (typeof cachedTextEncoder.encodeInto === 'function' ? function (arg, view) { return cachedTextEncoder.encodeInto(arg, view); } : function (arg, view) { const buf = cachedTextEncoder.encode(arg); view.set(buf); return { read: arg.length, written: buf.length }; }); 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 = encodeString(arg, view); offset += ret.written; ptr = realloc(ptr, len, offset, 1) >>> 0; } WASM_VECTOR_LEN = offset; return ptr; } const FooFinalization = (typeof FinalizationRegistry === 'undefined') ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry(ptr => wasm.__wbg_foo_free(ptr >>> 0, 1)); 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} */ get x() { const ret = wasm.__wbg_get_foo_x(this.__wbg_ptr); return ret >>> 0; } /** * @param {number} arg0 */ set x(arg0) { wasm.__wbg_set_foo_x(this.__wbg_ptr, arg0); } /** * @returns {number | undefined} */ get y() { const ret = wasm.__wbg_get_foo_y(this.__wbg_ptr); return ret === 0x100000001 ? undefined : ret; } /** * @param {number | null} [arg0] */ set y(arg0) { wasm.__wbg_set_foo_y(this.__wbg_ptr, isLikeNone(arg0) ? 0x100000001 : (arg0) >>> 0); } /** * @returns {number | undefined} */ get z() { - const ret = wasm.foo_z(this.__wbg_ptr); + const ret = wasm.foo_lone_getter(this.__wbg_ptr); return ret === 0x100000001 ? undefined : ret; } /** * @param {number | null} [z] */ set z(z) { wasm.foo_set_z(this.__wbg_ptr, isLikeNone(z) ? 0x100000001 : (z) >>> 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); } /** * You will only read numbers. * @returns {number} */ get weird() { const ret = wasm.foo_weird(this.__wbg_ptr); return ret >>> 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); } /** * 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; } /** * @param {boolean | null} [value] */ static set x(value) { wasm.foo_set_x_static(isLikeNone(value) ? 0xFFFFFF : value ? 1 : 0); } } export function __wbindgen_init_externref_table() { const table = wasm.__wbindgen_export_0; const offset = table.grow(4); table.set(0, undefined); table.set(offset + 0, undefined); table.set(offset + 1, null); table.set(offset + 2, true); table.set(offset + 3, false); ; }; export function __wbindgen_throw(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); }; ---- runtest::test_24_result_rs stdout ---- Error: found a difference: let wasm; export function __wbg_set_wasm(val) { wasm = val; } let cachedUint8ArrayMemory0 = null; function getUint8ArrayMemory0() { if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) { cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer); } return cachedUint8ArrayMemory0; } const lTextDecoder = typeof TextDecoder === 'undefined' ? (0, module.require)('util').TextDecoder : TextDecoder; let cachedTextDecoder = new lTextDecoder('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 lTextDecoder('utf-8', { ignoreBOM: true, fatal: true }); cachedTextDecoder.decode(); numBytesDecoded = len; } return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len)); } function getStringFromWasm0(ptr, len) { ptr = ptr >>> 0; return decodeText(ptr, len); } function takeFromExternrefTable0(idx) { const value = wasm.__wbindgen_export_0.get(idx); wasm.__externref_table_dealloc(idx); return value; } /** * @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]); } } /** * @returns {number} */ export function result_i32() { const ret = wasm.result_i32(); if (ret[2]) { throw takeFromExternrefTable0(ret[1]); } return ret[0]; } export function __wbg_Error_0497d5bdba9362e5(arg0, arg1) { const ret = Error(getStringFromWasm0(arg0, arg1)); return ret; }; export function __wbindgen_init_externref_table() { const table = wasm.__wbindgen_export_0; const offset = table.grow(4); table.set(0, undefined); table.set(offset + 0, undefined); table.set(offset + 1, null); table.set(offset + 2, true); table.set(offset + 3, false); ; }; export function __wbindgen_number_new(arg0) { const ret = arg0; return ret; }; -export function __wbindgen_throw(arg0, arg1) { - throw new Error(getStringFromWasm0(arg0, arg1)); -}; - ---- runtest::test_11_enums_rs stdout ---- Error: found a difference: let wasm; export function __wbg_set_wasm(val) { wasm = val; } let cachedUint8ArrayMemory0 = null; function getUint8ArrayMemory0() { if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) { cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer); } return cachedUint8ArrayMemory0; } const lTextDecoder = typeof TextDecoder === 'undefined' ? (0, module.require)('util').TextDecoder : TextDecoder; let cachedTextDecoder = new lTextDecoder('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 lTextDecoder('utf-8', { ignoreBOM: true, fatal: true }); cachedTextDecoder.decode(); numBytesDecoded = len; } return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len)); } function getStringFromWasm0(ptr, len) { ptr = ptr >>> 0; return decodeText(ptr, len); } /** * @param {Color} color * @returns {Color} */ export function enum_echo(color) { const ret = wasm.enum_echo(color); return ret; } function isLikeNone(x) { return x === undefined || x === null; } /** * @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 {Color} color * @returns {ColorName} */ export function get_name(color) { - const ret = wasm.get_name(color); + const ret = wasm.enum_echo(color); return __wbindgen_enum_ColorName[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]; } /** * @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; } /** * 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", }); const __wbindgen_enum_ColorName = ["green", "yellow", "red"]; export function __wbindgen_init_externref_table() { const table = wasm.__wbindgen_export_0; const offset = table.grow(4); table.set(0, undefined); table.set(offset + 0, undefined); table.set(offset + 1, null); table.set(offset + 2, true); table.set(offset + 3, false); ; }; export function __wbindgen_throw(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); }; ---- runtest::test_18_keyword_rs stdout ---- Error: found a difference: let wasm; export function __wbg_set_wasm(val) { wasm = val; } -let cachedUint8ArrayMemory0 = null; - -function getUint8ArrayMemory0() { - if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) { - cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer); - } - return cachedUint8ArrayMemory0; -} - -const lTextDecoder = typeof TextDecoder === 'undefined' ? (0, module.require)('util').TextDecoder : TextDecoder; - -let cachedTextDecoder = new lTextDecoder('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 lTextDecoder('utf-8', { ignoreBOM: true, fatal: true }); - cachedTextDecoder.decode(); - numBytesDecoded = len; - } - return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len)); -} - -function getStringFromWasm0(ptr, len) { - ptr = ptr >>> 0; - return decodeText(ptr, len); -} - export function exported() { wasm.exported(); } export function _function() { wasm._function(); } export function _var() { - wasm._var(); + wasm._function(); } /** * @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_await_e0a0e75be8b6fef6() { await(); }; export function __wbg_let_8d461e9e0592bd8c(arg0) { arg0.let(); }; export function __wbg_new_4b026aaf1c1e4438() { const ret = A.new(); return ret; }; export function __wbg_new_d4bfd9add722b492() { const ret = window.__TAURI__.menu.Menu.new(); return ret; }; export function __wbg_new_e17dd7c5a1cd57d8() { B.new(); }; export function __wbg_static_accessor_TRUE_c6b68bf8545d99a3() { const ret = true; return ret; }; export function __wbindgen_init_externref_table() { const table = wasm.__wbindgen_export_0; const offset = table.grow(4); table.set(0, undefined); table.set(offset + 0, undefined); table.set(offset + 1, null); table.set(offset + 2, true); table.set(offset + 3, false); ; -}; - -export function __wbindgen_throw(arg0, arg1) { - throw new Error(getStringFromWasm0(arg0, arg1)); }; ---- runtest::test_09_echo_rs stdout ---- Error: found a difference: let wasm; export function __wbg_set_wasm(val) { wasm = val; } -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 WASM_VECTOR_LEN = 0; let cachedUint8ArrayMemory0 = null; function getUint8ArrayMemory0() { if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) { cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer); } return cachedUint8ArrayMemory0; } const lTextEncoder = typeof TextEncoder === 'undefined' ? (0, module.require)('util').TextEncoder : TextEncoder; const cachedTextEncoder = new lTextEncoder('utf-8'); const encodeString = (typeof cachedTextEncoder.encodeInto === 'function' ? function (arg, view) { return cachedTextEncoder.encodeInto(arg, view); } : function (arg, view) { const buf = cachedTextEncoder.encode(arg); view.set(buf); return { read: arg.length, written: buf.length }; }); 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 = encodeString(arg, view); offset += ret.written; ptr = realloc(ptr, len, offset, 1) >>> 0; } WASM_VECTOR_LEN = offset; return ptr; } +function isLikeNone(x) { + return x === undefined || x === null; +} + 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 isLikeNone(x) { - return x === undefined || x === null; -} - const lTextDecoder = typeof TextDecoder === 'undefined' ? (0, module.require)('util').TextDecoder : TextDecoder; let cachedTextDecoder = new lTextDecoder('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 lTextDecoder('utf-8', { ignoreBOM: true, fatal: true }); cachedTextDecoder.decode(); numBytesDecoded = len; } return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len)); } function getStringFromWasm0(ptr, len) { ptr = ptr >>> 0; return decodeText(ptr, len); } /** * @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_i8(a) { const ret = wasm.echo_i8(a); return ret; } /** * @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_i16(a) { const ret = wasm.echo_i16(a); return ret; } /** * @param {number} a * @returns {number} */ export function echo_u32(a) { - const ret = wasm.echo_u32(a); + const ret = wasm.echo_i32(a); return ret >>> 0; } /** * @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_u64(a) { - const ret = wasm.echo_u64(a); + const ret = wasm.echo_i64(a); return BigInt.asUintN(64, ret); } /** * @param {bigint} a * @returns {bigint} */ export function echo_i64(a) { const ret = wasm.echo_i64(a); return 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 {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_usize(a) { - const ret = wasm.echo_usize(a); + const ret = wasm.echo_i32(a); return ret >>> 0; } /** * @param {number} a * @returns {number} */ export function echo_isize(a) { - const ret = wasm.echo_isize(a); + const ret = wasm.echo_i32(a); return 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 {boolean} a * @returns {boolean} */ export function echo_bool(a) { const ret = wasm.echo_bool(a); return ret !== 0; } function _assertChar(c) { if (typeof(c) === 'number' && (c >= 0x110000 || (c >= 0xD800 && c < 0xE000))) throw new Error(`expected a valid Unicode scalar value, found ${c}`); } /** * @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 {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); } } 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 getArrayU8FromWasm0(ptr, len) { ptr = ptr >>> 0; return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len); } /** * @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; } let cachedInt8ArrayMemory0 = null; function getInt8ArrayMemory0() { if (cachedInt8ArrayMemory0 === null || cachedInt8ArrayMemory0.byteLength === 0) { cachedInt8ArrayMemory0 = new Int8Array(wasm.memory.buffer); } return cachedInt8ArrayMemory0; } function getArrayI8FromWasm0(ptr, len) { ptr = ptr >>> 0; return getInt8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len); } /** * @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; } let cachedUint16ArrayMemory0 = null; function getUint16ArrayMemory0() { if (cachedUint16ArrayMemory0 === null || cachedUint16ArrayMemory0.byteLength === 0) { cachedUint16ArrayMemory0 = new Uint16Array(wasm.memory.buffer); } return cachedUint16ArrayMemory0; } 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 getArrayU16FromWasm0(ptr, len) { ptr = ptr >>> 0; return getUint16ArrayMemory0().subarray(ptr / 2, ptr / 2 + len); } /** * @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; } let cachedInt16ArrayMemory0 = null; function getInt16ArrayMemory0() { if (cachedInt16ArrayMemory0 === null || cachedInt16ArrayMemory0.byteLength === 0) { cachedInt16ArrayMemory0 = new Int16Array(wasm.memory.buffer); } return cachedInt16ArrayMemory0; } function getArrayI16FromWasm0(ptr, len) { ptr = ptr >>> 0; return getInt16ArrayMemory0().subarray(ptr / 2, ptr / 2 + len); } /** * @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; } let cachedUint32ArrayMemory0 = null; function getUint32ArrayMemory0() { if (cachedUint32ArrayMemory0 === null || cachedUint32ArrayMemory0.byteLength === 0) { cachedUint32ArrayMemory0 = new Uint32Array(wasm.memory.buffer); } return cachedUint32ArrayMemory0; } 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 getArrayU32FromWasm0(ptr, len) { ptr = ptr >>> 0; return getUint32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len); } /** * @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; } let cachedInt32ArrayMemory0 = null; function getInt32ArrayMemory0() { if (cachedInt32ArrayMemory0 === null || cachedInt32ArrayMemory0.byteLength === 0) { cachedInt32ArrayMemory0 = new Int32Array(wasm.memory.buffer); } return cachedInt32ArrayMemory0; } function getArrayI32FromWasm0(ptr, len) { ptr = ptr >>> 0; return getInt32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len); } /** * @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; } let cachedBigUint64ArrayMemory0 = null; function getBigUint64ArrayMemory0() { if (cachedBigUint64ArrayMemory0 === null || cachedBigUint64ArrayMemory0.byteLength === 0) { cachedBigUint64ArrayMemory0 = new BigUint64Array(wasm.memory.buffer); } return cachedBigUint64ArrayMemory0; } 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 getArrayU64FromWasm0(ptr, len) { ptr = ptr >>> 0; return getBigUint64ArrayMemory0().subarray(ptr / 8, ptr / 8 + len); } /** * @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; } let cachedBigInt64ArrayMemory0 = null; function getBigInt64ArrayMemory0() { if (cachedBigInt64ArrayMemory0 === null || cachedBigInt64ArrayMemory0.byteLength === 0) { cachedBigInt64ArrayMemory0 = new BigInt64Array(wasm.memory.buffer); } return cachedBigInt64ArrayMemory0; } function getArrayI64FromWasm0(ptr, len) { ptr = ptr >>> 0; return getBigInt64ArrayMemory0().subarray(ptr / 8, ptr / 8 + len); } /** * @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 {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; } /** * @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 {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 {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 {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 {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 {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; } function addToExternrefTable0(obj) { const idx = wasm.__externref_table_alloc(); - wasm.__wbindgen_export_2.set(idx, obj); + wasm.__wbindgen_export_0.set(idx, obj); return idx; } 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 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_export_2.get(mem.getUint32(i, true))); + result.push(wasm.__wbindgen_export_0.get(mem.getUint32(i, true))); } wasm.__externref_drop_slice(ptr, len); return result; } /** * @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; } function _assertClass(instance, klass) { if (!(instance instanceof klass)) { throw new Error(`expected instance of ${klass.name}`); } } /** * @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 {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 {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_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_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_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_u32(a) { const ret = wasm.echo_option_u32(isLikeNone(a) ? 0x100000001 : (a) >>> 0); return ret === 0x100000001 ? 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_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 {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 {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 | 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_usize(a) { - const ret = wasm.echo_option_usize(isLikeNone(a) ? 0x100000001 : (a) >>> 0); + const ret = wasm.echo_option_u32(isLikeNone(a) ? 0x100000001 : (a) >>> 0); return ret === 0x100000001 ? 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); + const ret = wasm.echo_option_i32(isLikeNone(a) ? 0x100000001 : (a) >> 0); return ret === 0x100000001 ? undefined : 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 {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 {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 {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 {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 {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 {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 {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 {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 {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 {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 {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 {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 {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 {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 {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 {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 {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 {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_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 {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; } const FooFinalization = (typeof FinalizationRegistry === 'undefined') ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry(ptr => wasm.__wbg_foo_free(ptr >>> 0, 1)); 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); } } 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_debug_string(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 __wbindgen_init_externref_table() { - const table = wasm.__wbindgen_export_2; + const table = wasm.__wbindgen_export_0; const offset = table.grow(4); table.set(0, undefined); table.set(offset + 0, undefined); table.set(offset + 1, null); table.set(offset + 2, true); table.set(offset + 3, false); ; }; export function __wbindgen_string_get(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 __wbindgen_string_new(arg0, arg1) { const ret = getStringFromWasm0(arg0, arg1); return ret; }; export function __wbindgen_throw(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); }; ---- runtest::test_01_add_rs stdout ---- Error: found a difference: let wasm; export function __wbg_set_wasm(val) { wasm = val; } /** * @param {number} a * @param {number} b * @returns {number} */ export function add_u32(a, b) { - const ret = wasm.add_u32(a, b); + const ret = wasm.add_i32(a, b); return ret >>> 0; } /** * @param {number} a * @param {number} b * @returns {number} */ export function add_i32(a, b) { const ret = wasm.add_i32(a, b); return ret; } export function __wbindgen_init_externref_table() { const table = wasm.__wbindgen_export_0; 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); ; }; ---- runtest::test_25_self_type_rs stdout ---- Error: found a difference: let wasm; export function __wbg_set_wasm(val) { wasm = val; } let cachedUint8ArrayMemory0 = null; function getUint8ArrayMemory0() { if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) { cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer); } return cachedUint8ArrayMemory0; } const lTextDecoder = typeof TextDecoder === 'undefined' ? (0, module.require)('util').TextDecoder : TextDecoder; let cachedTextDecoder = new lTextDecoder('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 lTextDecoder('utf-8', { ignoreBOM: true, fatal: true }); cachedTextDecoder.decode(); numBytesDecoded = len; } return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len)); } function getStringFromWasm0(ptr, len) { ptr = ptr >>> 0; return decodeText(ptr, len); } const TestFinalization = (typeof FinalizationRegistry === 'undefined') ? { register: () => {}, unregister: () => {} } : new FinalizationRegistry(ptr => wasm.__wbg_test_free(ptr >>> 0, 1)); 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); } constructor() { const ret = wasm.test_new(); this.__wbg_ptr = ret >>> 0; TestFinalization.register(this, this.__wbg_ptr, this); return this; } consume_self() { const ptr = this.__destroy_into_raw(); wasm.test_consume_self(ptr); } ref_self() { wasm.test_ref_self(this.__wbg_ptr); } ref_mut_self() { wasm.test_ref_mut_self(this.__wbg_ptr); } self_Self() { const ptr = this.__destroy_into_raw(); - wasm.test_self_Self(ptr); + wasm.test_consume_self(ptr); } self_ref_Self() { - wasm.test_self_ref_Self(this.__wbg_ptr); + wasm.test_ref_self(this.__wbg_ptr); } self_ref_mut_Self() { - wasm.test_self_ref_mut_Self(this.__wbg_ptr); + wasm.test_ref_mut_self(this.__wbg_ptr); } } export function __wbindgen_init_externref_table() { const table = wasm.__wbindgen_export_0; const offset = table.grow(4); table.set(0, undefined); table.set(offset + 0, undefined); table.set(offset + 1, null); table.set(offset + 2, true); table.set(offset + 3, false); ; }; export function __wbindgen_throw(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); }; ---- runtest::test_26_skip_jsdoc_rs stdout ---- Error: found a difference: let wasm; export function __wbg_set_wasm(val) { wasm = val; } /** * Manually documented function * * @param {number} arg - This is my arg. It is mine. * @returns to whence I came */ export function docme(arg) { const ret = wasm.docme(arg); return ret >>> 0; } /** * Regular documentation. * @param {number} arg * @returns {number} */ export function i_has_docs(arg) { - const ret = wasm.i_has_docs(arg); + const ret = wasm.docme(arg); return ret >>> 0; } export function __wbindgen_init_externref_table() { const table = wasm.__wbindgen_export_0; 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); ; }; ---- runtest::test_31_wasm_export_types_rs stdout ---- Error: found a difference: let wasm; +let WASM_VECTOR_LEN = 0; + let cachedUint8ArrayMemory0 = null; function getUint8ArrayMemory0() { if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) { cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer); } return cachedUint8ArrayMemory0; } -let cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } ); - -if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); }; - -const MAX_SAFARI_DECODE_BYTES = 2146435072; -let numBytesDecoded = 0; -function decodeText(ptr, len) { - numBytesDecoded += len; - if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) { - cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } ); - cachedTextDecoder.decode(); - numBytesDecoded = len; - } - return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len)); -} - -function getStringFromWasm0(ptr, len) { - ptr = ptr >>> 0; - return decodeText(ptr, len); -} - -let WASM_VECTOR_LEN = 0; - const cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available') } } ); const encodeString = (typeof cachedTextEncoder.encodeInto === 'function' ? function (arg, view) { return cachedTextEncoder.encodeInto(arg, view); } : function (arg, view) { const buf = cachedTextEncoder.encode(arg); view.set(buf); return { read: arg.length, written: buf.length }; }); 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 = encodeString(arg, view); offset += ret.written; ptr = realloc(ptr, len, offset, 1) >>> 0; } WASM_VECTOR_LEN = offset; return ptr; } + +let cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } ); + +if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); }; + +const MAX_SAFARI_DECODE_BYTES = 2146435072; +let numBytesDecoded = 0; +function decodeText(ptr, len) { + numBytesDecoded += len; + if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) { + cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } ); + cachedTextDecoder.decode(); + numBytesDecoded = len; + } + return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len)); +} + +function getStringFromWasm0(ptr, len) { + ptr = ptr >>> 0; + return decodeText(ptr, len); +} /** * @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))); } const EXPECTED_RESPONSE_TYPES = new Set(['basic', 'cors', 'default']); 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 && EXPECTED_RESPONSE_TYPES.has(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 __wbg_get_imports() { const imports = {}; imports.wbg = {}; imports.wbg.__wbindgen_init_externref_table = function() { const table = wasm.__wbindgen_export_0; 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); ; - }; - imports.wbg.__wbindgen_throw = function(arg0, arg1) { - throw new Error(getStringFromWasm0(arg0, arg1)); }; return imports; } function __wbg_init_memory(imports, memory) { } function __wbg_finalize_init(instance, module) { wasm = instance.exports; __wbg_init.__wbindgen_wasm_module = module; cachedUint8ArrayMemory0 = null; wasm.__wbindgen_start(); return wasm; } function initSync(module) { if (wasm !== undefined) return wasm; if (typeof 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(); __wbg_init_memory(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 (typeof 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 (typeof 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); } __wbg_init_memory(imports); const { instance, module } = await __wbg_load(await module_or_path, imports); return __wbg_finalize_init(instance, module); } export { initSync }; export default __wbg_init; ---- runtest::test_28_string_arg_rs stdout ---- Error: found a difference: let wasm; export function __wbg_set_wasm(val) { wasm = val; } +let WASM_VECTOR_LEN = 0; + let cachedUint8ArrayMemory0 = null; function getUint8ArrayMemory0() { if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) { cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer); } return cachedUint8ArrayMemory0; } -const lTextDecoder = typeof TextDecoder === 'undefined' ? (0, module.require)('util').TextDecoder : TextDecoder; - -let cachedTextDecoder = new lTextDecoder('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 lTextDecoder('utf-8', { ignoreBOM: true, fatal: true }); - cachedTextDecoder.decode(); - numBytesDecoded = len; - } - return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len)); -} - -function getStringFromWasm0(ptr, len) { - ptr = ptr >>> 0; - return decodeText(ptr, len); -} - -let WASM_VECTOR_LEN = 0; - const lTextEncoder = typeof TextEncoder === 'undefined' ? (0, module.require)('util').TextEncoder : TextEncoder; const cachedTextEncoder = new lTextEncoder('utf-8'); const encodeString = (typeof cachedTextEncoder.encodeInto === 'function' ? function (arg, view) { return cachedTextEncoder.encodeInto(arg, view); } : function (arg, view) { const buf = cachedTextEncoder.encode(arg); view.set(buf); return { read: arg.length, written: buf.length }; }); 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 = encodeString(arg, view); offset += ret.written; ptr = realloc(ptr, len, offset, 1) >>> 0; } WASM_VECTOR_LEN = offset; return ptr; } /** * @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 __wbindgen_init_externref_table() { const table = wasm.__wbindgen_export_0; const offset = table.grow(4); table.set(0, undefined); table.set(offset + 0, undefined); table.set(offset + 1, null); table.set(offset + 2, true); table.set(offset + 3, false); ; -}; - -export function __wbindgen_throw(arg0, arg1) { - throw new Error(getStringFromWasm0(arg0, arg1)); }; ---- runtest::test_30_typescript_type_rs stdout ---- Error: found a difference: let wasm; export function __wbg_set_wasm(val) { wasm = val; } - -let cachedUint8ArrayMemory0 = null; - -function getUint8ArrayMemory0() { - if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) { - cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer); - } - return cachedUint8ArrayMemory0; -} - -const lTextDecoder = typeof TextDecoder === 'undefined' ? (0, module.require)('util').TextDecoder : TextDecoder; - -let cachedTextDecoder = new lTextDecoder('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 lTextDecoder('utf-8', { ignoreBOM: true, fatal: true }); - cachedTextDecoder.decode(); - numBytesDecoded = len; - } - return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len)); -} - -function getStringFromWasm0(ptr, len) { - ptr = ptr >>> 0; - return decodeText(ptr, len); -} /** * @param {number | string} a */ export function single(a) { wasm.single(a); } 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 WASM_VECTOR_LEN = 0; function addToExternrefTable0(obj) { const idx = wasm.__externref_table_alloc(); wasm.__wbindgen_export_0.set(idx, obj); return idx; } 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; } /** * @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 __wbindgen_init_externref_table() { const table = wasm.__wbindgen_export_0; const offset = table.grow(4); table.set(0, undefined); table.set(offset + 0, undefined); table.set(offset + 1, null); table.set(offset + 2, true); table.set(offset + 3, false); ; -}; - -export function __wbindgen_throw(arg0, arg1) { - throw new Error(getStringFromWasm0(arg0, arg1)); }; failures: runtest::test_01_add_rs runtest::test_03_anyref_import_catch_rs runtest::test_09_echo_rs runtest::test_11_enums_rs runtest::test_13_getter_setter_rs runtest::test_14_import_getter_setter_rs runtest::test_15_import_rs runtest::test_16_int128_rs runtest::test_17_intrinsic_only_rs runtest::test_18_keyword_rs runtest::test_19_modules_rs runtest::test_22_pointers_rs runtest::test_24_result_rs runtest::test_25_self_type_rs runtest::test_26_skip_jsdoc_rs runtest::test_28_string_arg_rs runtest::test_30_typescript_type_rs runtest::test_31_wasm_export_types_rs test result: FAILED. 14 passed; 18 failed; 0 ignored; 0 measured; 0 filtered out; finished in 44.84s error: test failed, to rerun pass `--test reference` ==> ERROR: A failure occurred in check(). Aborting... ==> ERROR: Build failed, check /home/alhp/workspace/chroot/build_d75cca21-c414-47c1-b909-c924634b2918/build