Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to export js_name = round unless type is f64 #2338

Open
jramsley opened this issue Oct 25, 2020 · 13 comments
Open

Unable to export js_name = round unless type is f64 #2338

jramsley opened this issue Oct 25, 2020 · 13 comments
Labels

Comments

@jramsley
Copy link

Describe the Bug

#[wasm_bindgen(js_name = round)]
pub fn js_math_round(a: f32) -> f32

returns a signature mismatch of

rust-lld: error: function signature mismatch: round
          >>> defined as (f64) -> f64

Steps to Reproduce

  1. Create public function accessible in lib.rs
#[wasm_bindgen(js_name = round)]
pub fn js_math_round(a: f32) -> f32 {
    return a;
}
  1. wasm-pack build

circumvented in my repo by naming js_round and post-processing
https://github.com/jramsley/gl-matrix/blob/main/src/vec2.rs#L108

Expected Behavior

Generates an exported javascript function called round

Actual Behavior

rust-lld: error: function signature mismatch: round
          >>> defined as (f64) -> f64 in ~/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-unknown/lib/libcompiler_builtins-a30046ba00655967.rlib(compiler_builtins-a30046ba00655967.compiler_builtins.ara2xh13-cgu.0.rcgu.o)
          >>> defined as (f32) -> f32 in ~/gl-matrix/target/wasm32-unknown-unknown/release/deps/gl_matrix.gl_matrix.7mocmiy6-cgu.1.rcgu.o

Additional Context

First time writing something real in Rust, I may be missing something obvious.

@jramsley jramsley added the bug label Oct 25, 2020
@pauldorehill
Copy link
Contributor

pauldorehill commented Oct 26, 2020

Jake,

I couldn't get your bug to reproduce with your the repo posted or in a new project? Did at some stage you have use js_sys::Math::round? That has a signature of (x: f64) -> f64 and you may somehow be having a js namespacing issue?

Though the compiler does give the name 'round' is defined multiple times 'round' must be defined only once in the value namespace of this module straight away

@jramsley
Copy link
Author

Hi @pauldorehill,

I removed my target and pkg folders and tried again.

First thing was to check for any round, js_sys, or Math imports via grep

$ grep -i -r round .
./src/vec2.rs:macro_rules! js_round {
./src/vec2.rs:#[wasm_bindgen(js_name = round)]
./src/vec2.rs:pub fn js_round(out: Float32Array, a: &Float32Array) -> Float32Array {
./src/vec2.rs:    out.set_index(0, js_round!(a.get_index(0)));
./src/vec2.rs:    out.set_index(1, js_round!(a.get_index(1)));

$ grep -i -r js_sys .
./src/vec2.rs:use js_sys::Float32Array;
./src/vec2.rs:use js_sys::JsString;

$ grep -i -r math .

Which looks like just the public functions I've defined and specific imports of js_sys.

$ wasm-pack build
[INFO]: 🎯  Checking for the Wasm target...
[INFO]: 🌀  Compiling to Wasm...
   Compiling proc-macro2 v1.0.24
   Compiling unicode-xid v0.2.1
   Compiling log v0.4.11
   Compiling syn v1.0.46
   Compiling wasm-bindgen-shared v0.2.68
   Compiling cfg-if v0.1.10
   Compiling bumpalo v3.4.0
   Compiling lazy_static v1.4.0
   Compiling getrandom v0.1.15
   Compiling wasm-bindgen v0.2.68
   Compiling ppv-lite86 v0.2.9
   Compiling rand_core v0.5.1
   Compiling rand_chacha v0.2.2
   Compiling rand v0.7.3
   Compiling quote v1.0.7
   Compiling wasm-bindgen-backend v0.2.68
   Compiling wasm-bindgen-macro-support v0.2.68
   Compiling wasm-bindgen-macro v0.2.68
   Compiling console_error_panic_hook v0.1.6
   Compiling js-sys v0.3.45
   Compiling gl-matrix v0.1.0 (/Users/jramsley/gl-matrix)
warning: unused import: `wasm_bindgen::prelude::*`
  --> src/utils.rs:12:5
   |
12 | use wasm_bindgen::prelude::*;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: `#[warn(unused_imports)]` on by default

warning: function is never used: `set_panic_hook`
 --> src/utils.rs:1:8
  |
1 | pub fn set_panic_hook() {
  |        ^^^^^^^^^^^^^^
  |
  = note: `#[warn(dead_code)]` on by default

error: linking with `rust-lld` failed: exit code: 1
  |
  = note: "rust-lld" "-flavor" "wasm" "--no-threads" "-z" "stack-size=1048576" "--stack-first" "--allow-undefined" "--fatal-warnings" "--no-demangle" "--export-dynamic" "--no-entry" "-L" "/Users/jramsley/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-unknown/lib" "/Users/jramsley/gl-matrix/target/wasm32-unknown-unknown/release/deps/gl_matrix.gl_matrix.7mocmiy6-cgu.0.rcgu.o" "/Users/jramsley/gl-matrix/target/wasm32-unknown-unknown/release/deps/gl_matrix.gl_matrix.7mocmiy6-cgu.1.rcgu.o" "/Users/jramsley/gl-matrix/target/wasm32-unknown-unknown/release/deps/gl_matrix.gl_matrix.7mocmiy6-cgu.2.rcgu.o" "/Users/jramsley/gl-matrix/target/wasm32-unknown-unknown/release/deps/gl_matrix.gl_matrix.7mocmiy6-cgu.3.rcgu.o" "-o" "/Users/jramsley/gl-matrix/target/wasm32-unknown-unknown/release/deps/gl_matrix.wasm" "--export" "__wbindgen_describe_add" "--export" "__wbindgen_describe_angle" "--export" "__wbindgen_describe_ceil" "--export" "__wbindgen_describe_clone" "--export" "__wbindgen_describe_commonequals" "--export" "__wbindgen_describe_copy" "--export" "__wbindgen_describe_create" "--export" "__wbindgen_describe_cross" "--export" "__wbindgen_describe_distance" "--export" "__wbindgen_describe_divide" "--export" "__wbindgen_describe_dot" "--export" "__wbindgen_describe_equals" "--export" "__wbindgen_describe_exactEquals" "--export" "__wbindgen_describe_floor" "--export" "__wbindgen_describe_fromValues" "--export" "__wbindgen_describe_inverse" "--export" "__wbindgen_describe_length" "--export" "__wbindgen_describe_lerp" "--export" "__wbindgen_describe_max" "--export" "__wbindgen_describe_min" "--export" "__wbindgen_describe_multiply" "--export" "__wbindgen_describe_negate" "--export" "__wbindgen_describe_normalize" "--export" "__wbindgen_describe_random" "--export" "__wbindgen_describe_rotate" "--export" "__wbindgen_describe_round" "--export" "__wbindgen_describe_scale" "--export" "__wbindgen_describe_scaleAndAdd" "--export" "__wbindgen_describe_set" "--export" "__wbindgen_describe_squaredDistance" "--export" "__wbindgen_describe_squaredLength" "--export" "__wbindgen_describe_str" "--export" "__wbindgen_describe_subtract" "--export" "__wbindgen_describe_toRadian" "--export" "__wbindgen_describe_transformMat2" "--export" "__wbindgen_describe_transformMat2d" "--export" "__wbindgen_describe_transformMat3" "--export" "__wbindgen_describe_transformMat4" "--export" "__wbindgen_describe_zero" "--export" "add" "--export" "angle" "--export" "ceil" "--export" "clone" "--export" "commonequals" "--export" "copy" "--export" "create" "--export" "cross" "--export" "distance" "--export" "divide" "--export" "dot" "--export" "equals" "--export" "exactEquals" "--export" "floor" "--export" "fromValues" "--export" "inverse" "--export" "length" "--export" "lerp" "--export" "max" "--export" "min" "--export" "multiply" "--export" "negate" "--export" "normalize" "--export" "random" "--export" "rotate" "--export" "round" "--export" "scale" "--export" "scaleAndAdd" "--export" "set" "--export" "squaredDistance" "--export" "squaredLength" "--export" "str" "--export" "subtract" "--export" "toRadian" "--export" "transformMat2" "--export" "transformMat2d" "--export" "transformMat3" "--export" "transformMat4" "--export" "zero" "--export" "__externref_drop_slice" "--export" "__externref_heap_live_count" "--export" "__externref_table_alloc" "--export" "__externref_table_dealloc" "--export" "__wbindgen_exn_store" "--export" "__wbindgen_free" "--export" "__wbindgen_malloc" "--export" "__wbindgen_realloc" "--export" "__wbindgen_describe___wbg_1_17266f941f8bf46f" "--export" "__wbindgen_describe___wbg_2_e174c61a86dfe961" "--export" "__wbindgen_describe___wbg_3_c6554722b06723c2" "--export" "__wbindgen_describe___wbg_4_2d3b9d442221badf" "--export" "__wbindgen_describe___wbg_5_ae581236df2331b3" "--export" "__wbindgen_describe___wbg_6_a595785fba973890" "--export" "__wbindgen_describe___wbg_7_13edd05d1de8677e" "--export" "__wbindgen_describe___wbg_8_e0994c8617a739e0" "--export" "__wbindgen_describe___wbg_9_addab3bcf401b0d7" "--export" "__wbindgen_describe___wbg_UTC_4f7e5a544840c034" "--export" "__wbindgen_describe___wbg_abs_4085aeb516ccafb9" "--export" "__wbindgen_describe___wbg_acos_d0a15dd75205bfb6" "--export" "__wbindgen_describe___wbg_acosh_68c3e606ddc9e313" "--export" "__wbindgen_describe___wbg_add_055a876d0d93d2cc" "--export" "__wbindgen_describe___wbg_add_89768c32cc1de71e" "--export" "__wbindgen_describe___wbg_add_b49cf7cecc50c551" "--export" "__wbindgen_describe___wbg_all_ec6f71d29947d5bc" "--export" "__wbindgen_describe___wbg_and_b77aba41e2234ed3" "--export" "__wbindgen_describe___wbg_apply_28bd29e919552baf" "--export" "__wbindgen_describe___wbg_apply_af51c5bdbfe42016" "--export" "__wbindgen_describe___wbg_asin_cf9d4fa498a1b2c2" "--export" "__wbindgen_describe___wbg_asinh_77121de6610938a4" "--export" "__wbindgen_describe___wbg_assign_13aae56a28e041b6" "--export" "__wbindgen_describe___wbg_assign_ec25191066478c64" "--export" "__wbindgen_describe___wbg_assign_fc32c77d52acbac8" "--export" "__wbindgen_describe___wbg_asyncIterator_c78334b8e6504a8c" "--export" "__wbindgen_describe___wbg_atan2_8cca3ee4969d719d" "--export" "__wbindgen_describe___wbg_atan_8d26813864fd19a7" "--export" "__wbindgen_describe___wbg_atanh_6843909c081d6703" "--export" "__wbindgen_describe___wbg_bind_bd867113dd9caa95" "--export" "__wbindgen_describe___wbg_bind_d9649d8eb032ef04" "--export" "__wbindgen_describe___wbg_bind_db795ca576473a30" "--export" "__wbindgen_describe___wbg_bind_fce2ef5a4ec4d79f" "--export" "__wbindgen_describe___wbg_bind_ff9d7e4b22da05d0" "--export" "__wbindgen_describe___wbg_buffer_059acb3eca99e644" "--export" "__wbindgen_describe___wbg_buffer_23e687987c047165" "--export" "__wbindgen_describe___wbg_buffer_3d4c28111c30d143" "--export" "__wbindgen_describe___wbg_buffer_49131c283a06686f" "--export" "__wbindgen_describe___wbg_buffer_516cae61741d1a2d" "--export" "__wbindgen_describe___wbg_buffer_76c662facbf5dd5c" "--export" "__wbindgen_describe___wbg_buffer_9c218c74a5701fa6" "--export" "__wbindgen_describe___wbg_buffer_b45d00551a9605c9" "--export" "__wbindgen_describe___wbg_buffer_bdb51af8469a380b" "--export" "__wbindgen_describe___wbg_buffer_cb6e4e7d81ae6185" "--export" "__wbindgen_describe___wbg_buffer_d64ca15e2506b5c1" "--export" "__wbindgen_describe___wbg_byteLength_0265a22f51050bf7" "--export" "__wbindgen_describe___wbg_byteLength_2fe9032787247514" "--export" "__wbindgen_describe___wbg_byteLength_6b35f0de1e471360" "--export" "__wbindgen_describe___wbg_byteLength_6deffa82d93c724f" "--export" "__wbindgen_describe___wbg_byteLength_7293d4b8f0768f3c" "--export" "__wbindgen_describe___wbg_byteLength_77923efa8d7b401c" "--export" "__wbindgen_describe___wbg_byteLength_837b1d2902ffc5dc" "--export" "__wbindgen_describe___wbg_byteLength_9828cd72f704b139" "--export" "__wbindgen_describe___wbg_byteLength_a34daff7217f8377" "--export" "__wbindgen_describe___wbg_byteLength_be5751300618d7a1" "--export" "__wbindgen_describe___wbg_byteLength_c19954342f931947" "--export" "__wbindgen_describe___wbg_byteLength_d73a81cbd7e06636" "--export" "__wbindgen_describe___wbg_byteOffset_00403b83b3b9fd7e" "--export" "__wbindgen_describe___wbg_byteOffset_040586c3021799b0" "--export" "__wbindgen_describe___wbg_byteOffset_17cb06bc8e017546" "--export" "__wbindgen_describe___wbg_byteOffset_1b6fab342b80f20d" "--export" "__wbindgen_describe___wbg_byteOffset_790a81b20061c33e" "--export" "__wbindgen_describe___wbg_byteOffset_79464a24b09d1a40" "--export" "__wbindgen_describe___wbg_byteOffset_dcd628fcd9eef7d9" "--export" "__wbindgen_describe___wbg_byteOffset_e0b2972d6ae7a39b" "--export" "__wbindgen_describe___wbg_byteOffset_e9c2bcf9c14abfda" "--export" "__wbindgen_describe___wbg_byteOffset_f1c8675df80869c5" "--export" "__wbindgen_describe___wbg_call_8e95613cc6524977" "--export" "__wbindgen_describe___wbg_call_acb1ec2343d35cab" "--export" "__wbindgen_describe___wbg_call_d713ea0274dfc6d2" "--export" "__wbindgen_describe___wbg_call_fefe07773a6460f6" "--export" "__wbindgen_describe___wbg_catch_c64b2c46b8a789d2" "--export" "__wbindgen_describe___wbg_cbrt_fad6ff3c1960115b" "--export" "__wbindgen_describe___wbg_ceil_d1ad4d5b4d7068df" "--export" "__wbindgen_describe___wbg_charAt_efedfd328ad287c8" "--export" "__wbindgen_describe___wbg_charCodeAt_a3a63ce25fe12cb5" "--export" "__wbindgen_describe___wbg_clear_64ba8c12967a9f97" "--export" "__wbindgen_describe___wbg_clear_acf6dd145e3c5db8" "--export" "__wbindgen_describe___wbg_clz32_81f91133e946651a" "--export" "__wbindgen_describe___wbg_codePointAt_faa887d00b6802f6" "--export" "__wbindgen_describe___wbg_compareExchange_8826017d1c232527" "--export" "__wbindgen_describe___wbg_compare_cd1335dfdb075f8f" "--export" "__wbindgen_describe___wbg_compile_f17bea9fc591d34a" "--export" "__wbindgen_describe___wbg_concat_5653b185474371af" "--export" "__wbindgen_describe___wbg_concat_6e3acbadfaa38d77" "--export" "__wbindgen_describe___wbg_construct_69f762c5452b598a" "--export" "__wbindgen_describe___wbg_construct_770dadfff99bdf1a" "--export" "__wbindgen_describe___wbg_constructor_096b1420237ba003" "--export" "__wbindgen_describe___wbg_copyWithin_b8c22140bfb2a481" "--export" "__wbindgen_describe___wbg_cos_35455dc058c10b7d" "--export" "__wbindgen_describe___wbg_cosh_dc367a96f8681b6b" "--export" "__wbindgen_describe___wbg_create_df0e1fc9b2ff86d5" "--export" "__wbindgen_describe___wbg_customSections_9945135807cf46ea" "--export" "__wbindgen_describe___wbg_decodeURIComponent_01fe81d04512fc8b" "--export" "__wbindgen_describe___wbg_decodeURI_2b206a3230c08ac1" "--export" "__wbindgen_describe___wbg_defineProperties_442b9432a8bf868e" "--export" "__wbindgen_describe___wbg_defineProperty_58fde6febeea25b1" "--export" "__wbindgen_describe___wbg_defineProperty_f16af73a9e366b05" "--export" "__wbindgen_describe___wbg_deleteProperty_ca1466113e18ef12" "--export" "__wbindgen_describe___wbg_delete_5b2a96dc6a488749" "--export" "__wbindgen_describe___wbg_delete_6bf54dd2d6f6d5af" "--export" "__wbindgen_describe___wbg_delete_74b0f3046219f5c0" "--export" "__wbindgen_describe___wbg_delete_804816daf7a81096" "--export" "__wbindgen_describe___wbg_delete_dbf1cad8b7d85eee" "--export" "__wbindgen_describe___wbg_done_037d0a173aef1834" "--export" "__wbindgen_describe___wbg_encodeURIComponent_e5c53e1c04882590" "--export" "__wbindgen_describe___wbg_encodeURI_8aab37b1f61e9ead" "--export" "__wbindgen_describe___wbg_endsWith_979970108a1a4441" "--export" "__wbindgen_describe___wbg_entries_0eb51034d48ad820" "--export" "__wbindgen_describe___wbg_entries_6e2cec3126c06500" "--export" "__wbindgen_describe___wbg_entries_dd7ad7504bc24b64" "--export" "__wbindgen_describe___wbg_entries_ed58b33145506ef0" "--export" "__wbindgen_describe___wbg_escape_c4727fc903b93b7f" "--export" "__wbindgen_describe___wbg_eval_6f69d6583c7dbee1" "--export" "__wbindgen_describe___wbg_every_6321888f756a8a75" "--export" "__wbindgen_describe___wbg_exchange_c751408809c44359" "--export" "__wbindgen_describe___wbg_exec_97fc7ceba71c04b6" "--export" "__wbindgen_describe___wbg_exp_bcbd60546d3cf777" "--export" "__wbindgen_describe___wbg_expm1_9080525b2781144a" "--export" "__wbindgen_describe___wbg_exports_98a00d0267bd1d9d" "--export" "__wbindgen_describe___wbg_exports_ae93c338940e07e0" "--export" "__wbindgen_describe___wbg_fill_05ca5d6523a0ec47" "--export" "__wbindgen_describe___wbg_fill_44ae2e5759524f2f" "--export" "__wbindgen_describe___wbg_fill_5a33634f73b3c9d4" "--export" "__wbindgen_describe___wbg_fill_8df6a966d46f5d0c" "--export" "__wbindgen_describe___wbg_fill_8f0f872f8b84a115" "--export" "__wbindgen_describe___wbg_fill_9b92cc74cb7e8629" "--export" "__wbindgen_describe___wbg_fill_a6c5e1dcfc12b33d" "--export" "__wbindgen_describe___wbg_fill_d8375b3689882586" "--export" "__wbindgen_describe___wbg_fill_e08f90110ec6c8ef" "--export" "__wbindgen_describe___wbg_fill_f039b662e7e107cc" "--export" "__wbindgen_describe___wbg_filter_7d0e692c2a577c9b" "--export" "__wbindgen_describe___wbg_finally_3e557d32b5884532" "--export" "__wbindgen_describe___wbg_findIndex_a4ba2ab65c8868b2" "--export" "__wbindgen_describe___wbg_find_84f908189f72e70c" "--export" "__wbindgen_describe___wbg_flags_133a235249c4129b" "--export" "__wbindgen_describe___wbg_flatMap_0daaebb8ea64f6a4" "--export" "__wbindgen_describe___wbg_flat_24c30777fa5d0388" "--export" "__wbindgen_describe___wbg_floor_70333489bdfd5793" "--export" "__wbindgen_describe___wbg_forEach_0dc96511476def3c" "--export" "__wbindgen_describe___wbg_forEach_31a44410f83b33be" "--export" "__wbindgen_describe___wbg_forEach_477cd14dd6338445" "--export" "__wbindgen_describe___wbg_forEach_4bbc11e8d377cd18" "--export" "__wbindgen_describe___wbg_forEach_4fefc92bdf3a8803" "--export" "__wbindgen_describe___wbg_forEach_563f8f432b1df432" "--export" "__wbindgen_describe___wbg_forEach_ba86a1b26d8480b7" "--export" "__wbindgen_describe___wbg_forEach_c31fe0a8f21cdca3" "--export" "__wbindgen_describe___wbg_forEach_cbf6e96261a24e92" "--export" "__wbindgen_describe___wbg_forEach_e8150d9b57b1318e" "--export" "__wbindgen_describe___wbg_forEach_ef35f4fb46f0fdbc" "--export" "__wbindgen_describe___wbg_forEach_fda3bbfc3029ba8f" "--export" "__wbindgen_describe___wbg_for_b41272e530ac4940" "--export" "__wbindgen_describe___wbg_formatToParts_746fcf431ac4dcd7" "--export" "__wbindgen_describe___wbg_formatToParts_d386dbe7ce059f78" "--export" "__wbindgen_describe___wbg_format_00689e95800ce738" "--export" "__wbindgen_describe___wbg_format_6cd74ccc1374e455" "--export" "__wbindgen_describe___wbg_freeze_365385a326ac8adc" "--export" "__wbindgen_describe___wbg_fromCharCode_0978dd0b575a2410" "--export" "__wbindgen_describe___wbg_fromCharCode_4a83307ce05ce4da" "--export" "__wbindgen_describe___wbg_fromCharCode_6e6ef23fd304f61e" "--export" "__wbindgen_describe___wbg_fromCharCode_928f1d572e0aae7e" "--export" "__wbindgen_describe___wbg_fromCharCode_cfb12f40d7a3a8d8" "--export" "__wbindgen_describe___wbg_fromCharCode_e557956ac4c0ebb3" "--export" "__wbindgen_describe___wbg_fromCodePoint_1a69015bf0407dfa" "--export" "__wbindgen_describe___wbg_fromCodePoint_2df461d3074c22ef" "--export" "__wbindgen_describe___wbg_fromCodePoint_2fae9a5e2fd391e4" "--export" "__wbindgen_describe___wbg_fromCodePoint_cd69e8e60afde7f6" "--export" "__wbindgen_describe___wbg_fromCodePoint_db4377f590197276" "--export" "__wbindgen_describe___wbg_fromCodePoint_e972855cee42bd49" "--export" "__wbindgen_describe___wbg_fromEntries_e51e19fc1d1624ee" "--export" "__wbindgen_describe___wbg_from_2a5d647e62275bfd" "--export" "__wbindgen_describe___wbg_fround_1ba2cad44129f9aa" "--export" "__wbindgen_describe___wbg_getCanonicalLocales_5cdba87e397232c8" "--export" "__wbindgen_describe___wbg_getDate_320156c582a33358" "--export" "__wbindgen_describe___wbg_getDay_1fb70f861c7c40fd" "--export" "__wbindgen_describe___wbg_getFloat32_df9a658a1182efad" "--export" "__wbindgen_describe___wbg_getFloat32_e4493ea7e2228931" "--export" "__wbindgen_describe___wbg_getFloat64_5b70379a1a419982" "--export" "__wbindgen_describe___wbg_getFloat64_9a03d2d8647abecf" "--export" "__wbindgen_describe___wbg_getFullYear_ed8f5c16a7ed242f" "--export" "__wbindgen_describe___wbg_getHours_551ae9f419d47a3b" "--export" "__wbindgen_describe___wbg_getInt16_31928c29541bb3c1" "--export" "__wbindgen_describe___wbg_getInt16_ae280f6f019d87bb" "--export" "__wbindgen_describe___wbg_getInt32_ee1dcd7faa67029d" "--export" "__wbindgen_describe___wbg_getInt32_f0a79073615883dd" "--export" "__wbindgen_describe___wbg_getInt8_2d8863b69238af75" "--export" "__wbindgen_describe___wbg_getMilliseconds_c188d73c551e97d1" "--export" "__wbindgen_describe___wbg_getMinutes_054a5442be4b9aa6" "--export" "__wbindgen_describe___wbg_getMonth_4d9670669c25d35e" "--export" "__wbindgen_describe___wbg_getOwnPropertyDescriptor_5ce87de8437fa2fe" "--export" "__wbindgen_describe___wbg_getOwnPropertyDescriptor_b5a8bcc18b1a1f54" "--export" "__wbindgen_describe___wbg_getOwnPropertyDescriptors_300ff8554fe493c9" "--export" "__wbindgen_describe___wbg_getOwnPropertyNames_6835f7a21dda38a9" "--export" "__wbindgen_describe___wbg_getOwnPropertySymbols_81937e7bc55c63b5" "--export" "__wbindgen_describe___wbg_getPrototypeOf_26ecfed6931c6c96" "--export" "__wbindgen_describe___wbg_getPrototypeOf_649c60982be446cf" "--export" "__wbindgen_describe___wbg_getSeconds_9cda850b6648721a" "--export" "__wbindgen_describe___wbg_getTime_29addd71c7089c47" "--export" "__wbindgen_describe___wbg_getTimezoneOffset_1b96e0e6b6ed265c" "--export" "__wbindgen_describe___wbg_getUTCDate_7538c48a5eaec769" "--export" "__wbindgen_describe___wbg_getUTCDay_8d3b9316980ea630" "--export" "__wbindgen_describe___wbg_getUTCFullYear_5f37fccd78838a5a" "--export" "__wbindgen_describe___wbg_getUTCHours_22b0a86bfb61b775" "--export" "__wbindgen_describe___wbg_getUTCMilliseconds_66b572455f25c9df" "--export" "__wbindgen_describe___wbg_getUTCMinutes_184552d6741758f1" "--export" "__wbindgen_describe___wbg_getUTCMonth_aef6de588d09d2db" "--export" "__wbindgen_describe___wbg_getUTCSeconds_2b422efd757af3d8" "--export" "__wbindgen_describe___wbg_getUint16_695bf9189d301e6a" "--export" "__wbindgen_describe___wbg_getUint16_95c2f972d212523a" "--export" "__wbindgen_describe___wbg_getUint32_ae78a771eb6b8eae" "--export" "__wbindgen_describe___wbg_getUint32_f5956cd43005ec9d" "--export" "__wbindgen_describe___wbg_getUint8_59fc2975d7468ce7" "--export" "__wbindgen_describe___wbg_get_0b7471a43ea0dc05" "--export" "__wbindgen_describe___wbg_get_0e3f2950cdf758ae" "--export" "__wbindgen_describe___wbg_get_27693110cb44e852" "--export" "__wbindgen_describe___wbg_get_4b2d0664f95e8320" "--export" "__wbindgen_describe___wbg_get_6f7c002bf77d49ca" "--export" "__wbindgen_describe___wbg_get_9d4f08bc641dcc4f" "--export" "__wbindgen_describe___wbg_get_d49998d098ad410b" "--export" "__wbindgen_describe___wbg_getindex_10cb25c1fd267da6" "--export" "__wbindgen_describe___wbg_getindex_12564c699da9ab3b" "--export" "__wbindgen_describe___wbg_getindex_18b6ba107dc972f5" "--export" "__wbindgen_describe___wbg_getindex_18e0810523d75d5a" "--export" "__wbindgen_describe___wbg_getindex_25a73cf7094932e4" "--export" "__wbindgen_describe___wbg_getindex_4293d80bb704736f" "--export" "__wbindgen_describe___wbg_getindex_b5f78538a430af24" "--export" "__wbindgen_describe___wbg_getindex_b64511a63fb1b087" "--export" "__wbindgen_describe___wbg_getindex_e8f2294046c64658" "--export" "__wbindgen_describe___wbg_globalThis_b9277fc37e201fe5" "--export" "__wbindgen_describe___wbg_global_3974edf1e7412c94" "--export" "__wbindgen_describe___wbg_global_e16303fe83e1d57f" "--export" "__wbindgen_describe___wbg_grow_bf623a8b387dc69e" "--export" "__wbindgen_describe___wbg_grow_d3778a1d826d7d3f" "--export" "__wbindgen_describe___wbg_hasInstance_55f60589a26fa3be" "--export" "__wbindgen_describe___wbg_hasOwnProperty_b1149818610907c2" "--export" "__wbindgen_describe___wbg_has_4633bc75415d6bef" "--export" "__wbindgen_describe___wbg_has_7311bd62d0495e51" "--export" "__wbindgen_describe___wbg_has_9291c391fe94c60b" "--export" "__wbindgen_describe___wbg_has_a9d961c7ebb2caf5" "--export" "__wbindgen_describe___wbg_has_c10fc8c7bef9b293" "--export" "__wbindgen_describe___wbg_hypot_4d2fe51ecc1dda58" "--export" "__wbindgen_describe___wbg_ignoreCase_3949d2a34f201576" "--export" "__wbindgen_describe___wbg_imports_6615f0726c689239" "--export" "__wbindgen_describe___wbg_imul_4a819e79e76cce75" "--export" "__wbindgen_describe___wbg_includes_12f9309236d498a4" "--export" "__wbindgen_describe___wbg_includes_87cf19ad0902d06d" "--export" "__wbindgen_describe___wbg_indexOf_20e4c259b9e0b57c" "--export" "__wbindgen_describe___wbg_indexOf_b4f06842ce1434fb" "--export" "__wbindgen_describe___wbg_input_75f0b21d71770e6f" "--export" "__wbindgen_describe___wbg_instantiateStreaming_7516bc6afc10f98a" "--export" "__wbindgen_describe___wbg_instantiate_54df3f9163a8ca27" "--export" "__wbindgen_describe___wbg_instantiate_fd21b87130944c79" "--export" "__wbindgen_describe___wbg_isArray_8719d1387c4e1aca" "--export" "__wbindgen_describe___wbg_isConcatSpreadable_a2f7be32b5852edd" "--export" "__wbindgen_describe___wbg_isExtensible_1f96c99bf26d9a32" "--export" "__wbindgen_describe___wbg_isExtensible_976213fe0fd58ada" "--export" "__wbindgen_describe___wbg_isFinite_9ab20e1651f9d9c3" "--export" "__wbindgen_describe___wbg_isFinite_ae0e7da03e205f1f" "--export" "__wbindgen_describe___wbg_isFrozen_c580202e3899f3be" "--export" "__wbindgen_describe___wbg_isInteger_e207ca27c287fe8a" "--export" "__wbindgen_describe___wbg_isLockFree_847fbf4c7dc7a5c8" "--export" "__wbindgen_describe___wbg_isNaN_055bde15a0319c98" "--export" "__wbindgen_describe___wbg_isPrototypeOf_1aa8339b88c612f0" "--export" "__wbindgen_describe___wbg_isSafeInteger_cd80928ebe3e6591" "--export" "__wbindgen_describe___wbg_isSealed_90faa9335c6de3b0" "--export" "__wbindgen_describe___wbg_isView_03ae1c78cee23172" "--export" "__wbindgen_describe___wbg_is_333329c4a02916de" "--export" "__wbindgen_describe___wbg_iterator_09191f8878ea9877" "--export" "__wbindgen_describe___wbg_join_b352f1cdd4dfd417" "--export" "__wbindgen_describe___wbg_keyFor_161a81c0b165cc9e" "--export" "__wbindgen_describe___wbg_keys_578d586ef84504e4" "--export" "__wbindgen_describe___wbg_keys_7cb794f873cec791" "--export" "__wbindgen_describe___wbg_keys_84471a9240844b4d" "--export" "__wbindgen_describe___wbg_keys_ddc5c42683a0f2fd" "--export" "__wbindgen_describe___wbg_lastIndexOf_39073f5b086c0179" "--export" "__wbindgen_describe___wbg_lastIndexOf_9e1a2ebb4c40373f" "--export" "__wbindgen_describe___wbg_lastMatch_98fb5a6900403095" "--export" "__wbindgen_describe___wbg_lastParen_535b83aaa2fbec60" "--export" "__wbindgen_describe___wbg_lastindex_59eb1509d739675b" "--export" "__wbindgen_describe___wbg_leftContext_1fe2c3841b5894c4" "--export" "__wbindgen_describe___wbg_length_03e6dbfe03348de1" "--export" "__wbindgen_describe___wbg_length_079c4e509ec6d375" "--export" "__wbindgen_describe___wbg_length_2b13641a9d906653" "--export" "__wbindgen_describe___wbg_length_4306a35ca4194f07" "--export" "__wbindgen_describe___wbg_length_61e185fe1c3633f0" "--export" "__wbindgen_describe___wbg_length_7e5f0bec2aba44cd" "--export" "__wbindgen_describe___wbg_length_9198df0984c0880d" "--export" "__wbindgen_describe___wbg_length_a5ad13d3ed90620f" "--export" "__wbindgen_describe___wbg_length_a96cf2775171ce80" "--export" "__wbindgen_describe___wbg_length_c1ff580f5e6eafc0" "--export" "__wbindgen_describe___wbg_length_e39ba2e60cae8cf9" "--export" "__wbindgen_describe___wbg_length_ec9916826d6b1561" "--export" "__wbindgen_describe___wbg_length_ef6029cdbb2cf7da" "--export" "__wbindgen_describe___wbg_load_1f4a224ea00b3fd0" "--export" "__wbindgen_describe___wbg_localeCompare_b91d3b4ee44a0d87" "--export" "__wbindgen_describe___wbg_log10_23299dd072e0e686" "--export" "__wbindgen_describe___wbg_log1p_6be14165f6e2fe5a" "--export" "__wbindgen_describe___wbg_log2_3354ee350cb04d95" "--export" "__wbindgen_describe___wbg_log_f1884b07dc308b53" "--export" "__wbindgen_describe___wbg_map_610ddd331ba7c7c5" "--export" "__wbindgen_describe___wbg_match_2db78539b8fc62f7" "--export" "__wbindgen_describe___wbg_match_58603f7c91c2d929" "--export" "__wbindgen_describe___wbg_max_1c776f51c8ff050e" "--export" "__wbindgen_describe___wbg_message_648d5860715944a3" "--export" "__wbindgen_describe___wbg_min_3a95bea01cf3a24a" "--export" "__wbindgen_describe___wbg_multiline_5eaee474b5918555" "--export" "__wbindgen_describe___wbg_name_a08ace2acd4dd302" "--export" "__wbindgen_describe___wbg_name_fc3f17e6300898bb" "--export" "__wbindgen_describe___wbg_new0_a3af66503e735141" "--export" "__wbindgen_describe___wbg_new_066196c5e92c30d6" "--export" "__wbindgen_describe___wbg_new_0cba93ba92e34de7" "--export" "__wbindgen_describe___wbg_new_0d307f8656ebf4da" "--export" "__wbindgen_describe___wbg_new_1192d65414040ad9" "--export" "__wbindgen_describe___wbg_new_12143e33a1bd4faf" "--export" "__wbindgen_describe___wbg_new_185b9fbaf8470071" "--export" "__wbindgen_describe___wbg_new_20bee5d3538499f2" "--export" "__wbindgen_describe___wbg_new_20cc9c1e8e319ac2" "--export" "__wbindgen_describe___wbg_new_3e06d4f36713e4cb" "--export" "__wbindgen_describe___wbg_new_4e77eba4afdaea3d" "--export" "__wbindgen_describe___wbg_new_4fbadb1a621fed6e" "--export" "__wbindgen_describe___wbg_new_5a27dfccf8bf3a79" "--export" "__wbindgen_describe___wbg_new_6163f4677d099230" "--export" "__wbindgen_describe___wbg_new_61f28b15896b8358" "--export" "__wbindgen_describe___wbg_new_655c6c9b93be753c" "--export" "__wbindgen_describe___wbg_new_66c33b6634b6eb23" "--export" "__wbindgen_describe___wbg_new_6eff960c41aa6bcc" "--export" "__wbindgen_describe___wbg_new_79f4487112eba5a7" "--export" "__wbindgen_describe___wbg_new_7a009cea190c3f71" "--export" "__wbindgen_describe___wbg_new_7d947369a94000d3" "--export" "__wbindgen_describe___wbg_new_8d81f38c044c1aed" "--export" "__wbindgen_describe___wbg_new_978d50b11e5afc43" "--export" "__wbindgen_describe___wbg_new_992c5abe0aba19b9" "--export" "__wbindgen_describe___wbg_new_9b295d24cf1d706f" "--export" "__wbindgen_describe___wbg_new_9f4bde2fd7cfeca4" "--export" "__wbindgen_describe___wbg_new_a9d61c82f5938874" "--export" "__wbindgen_describe___wbg_new_b9332ed862dda802" "--export" "__wbindgen_describe___wbg_new_cac77e20620218e5" "--export" "__wbindgen_describe___wbg_new_d0c63652ab4d825c" "--export" "__wbindgen_describe___wbg_new_d91fc4d0395d2ffe" "--export" "__wbindgen_describe___wbg_new_da3aa65c3391ff56" "--export" "__wbindgen_describe___wbg_new_da6da0062a7a95be" "--export" "__wbindgen_describe___wbg_new_dd7dc7729db41a82" "--export" "__wbindgen_describe___wbg_new_e13110f81ae347cf" "--export" "__wbindgen_describe___wbg_new_e4679013d435841e" "--export" "__wbindgen_describe___wbg_new_e691434b4947c758" "--export" "__wbindgen_describe___wbg_new_e95bc3d328234326" "--export" "__wbindgen_describe___wbg_new_ee539bf486f37a42" "--export" "__wbindgen_describe___wbg_new_f12c852023b51c76" "--export" "__wbindgen_describe___wbg_new_f1d7058883215eee" "--export" "__wbindgen_describe___wbg_new_f6cb1818fbc46b68" "--export" "__wbindgen_describe___wbg_new_fe21ae77f86b12cc" "--export" "__wbindgen_describe___wbg_newnoargs_f3b8a801d5d4b079" "--export" "__wbindgen_describe___wbg_newregexp_5afd6e18ae9f67df" "--export" "__wbindgen_describe___wbg_newwithargs_7016a63b18bd53e2" "--export" "__wbindgen_describe___wbg_newwithbyteoffset_2104d0d662f1f19b" "--export" "__wbindgen_describe___wbg_newwithbyteoffset_22b933cf1c1ee461" "--export" "__wbindgen_describe___wbg_newwithbyteoffset_3004c4bbbe34d797" "--export" "__wbindgen_describe___wbg_newwithbyteoffset_3b1281a6047bb1b6" "--export" "__wbindgen_describe___wbg_newwithbyteoffset_457584a3440e443a" "--export" "__wbindgen_describe___wbg_newwithbyteoffset_5add91b160c2e5c1" "--export" "__wbindgen_describe___wbg_newwithbyteoffset_6f93c889d7634bc3" "--export" "__wbindgen_describe___wbg_newwithbyteoffset_7733a3f8fe7d21dd" "--export" "__wbindgen_describe___wbg_newwithbyteoffset_b5ee26600cda4950" "--export" "__wbindgen_describe___wbg_newwithbyteoffsetandlength_0515e4dbf41ebe10" "--export" "__wbindgen_describe___wbg_newwithbyteoffsetandlength_17b60ac1a19c43e4" "--export" "__wbindgen_describe___wbg_newwithbyteoffsetandlength_205200207c0c1946" "--export" "__wbindgen_describe___wbg_newwithbyteoffsetandlength_2bb274757ee00221" "--export" "__wbindgen_describe___wbg_newwithbyteoffsetandlength_52b3c77a0f7c0b59" "--export" "__wbindgen_describe___wbg_newwithbyteoffsetandlength_8b2cc58f355e5fdf" "--export" "__wbindgen_describe___wbg_newwithbyteoffsetandlength_9ee1bb579a24898f" "--export" "__wbindgen_describe___wbg_newwithbyteoffsetandlength_c0f38401daad5a22" "--export" "__wbindgen_describe___wbg_newwithbyteoffsetandlength_f73969c100aaf71d" "--export" "__wbindgen_describe___wbg_newwithlength_265b59e73fc01aac" "--export" "__wbindgen_describe___wbg_newwithlength_3c570aeea9a95954" "--export" "__wbindgen_describe___wbg_newwithlength_5c044c3fbad10a0e" "--export" "__wbindgen_describe___wbg_newwithlength_756b3bd5fff1d218" "--export" "__wbindgen_describe___wbg_newwithlength_8c0368c446e0a286" "--export" "__wbindgen_describe___wbg_newwithlength_8ca2d1860b37aa07" "--export" "__wbindgen_describe___wbg_newwithlength_92233db452effb4b" "--export" "__wbindgen_describe___wbg_newwithlength_9f0173cd3df67a6e" "--export" "__wbindgen_describe___wbg_newwithlength_e6bfbd1a5c57733d" "--export" "__wbindgen_describe___wbg_newwithlength_f61ae8c39d0bcf31" "--export" "__wbindgen_describe___wbg_newwithyearmonth_08037fb50cc1afe5" "--export" "__wbindgen_describe___wbg_newwithyearmonthday_a76b012523cf3c65" "--export" "__wbindgen_describe___wbg_newwithyearmonthdayhr_bc0452147bd26025" "--export" "__wbindgen_describe___wbg_newwithyearmonthdayhrmin_4bdb960c4ad2d3b4" "--export" "__wbindgen_describe___wbg_newwithyearmonthdayhrminsec_84ebceee0997f18b" "--export" "__wbindgen_describe___wbg_newwithyearmonthdayhrminsecmilli_4028c2864c371a7a" "--export" "__wbindgen_describe___wbg_next_16a1d65a8459f3ff" "--export" "__wbindgen_describe___wbg_next_2966fa909601a075" "--export" "__wbindgen_describe___wbg_next_9a20cbca311068b7" "--export" "__wbindgen_describe___wbg_next_edda7e0003e5daf9" "--export" "__wbindgen_describe___wbg_normalize_08403b30cc174447" "--export" "__wbindgen_describe___wbg_notify_12cbd15167e75469" "--export" "__wbindgen_describe___wbg_notify_b8ed830bcae77df3" "--export" "__wbindgen_describe___wbg_now_4de5b53a19e45567" "--export" "__wbindgen_describe___wbg_of_2ba162a940ab64f0" "--export" "__wbindgen_describe___wbg_of_61aa6827ec81b617" "--export" "__wbindgen_describe___wbg_of_c0fdee514e26e119" "--export" "__wbindgen_describe___wbg_of_de6ee285099ec772" "--export" "__wbindgen_describe___wbg_of_fe76ab624877be38" "--export" "__wbindgen_describe___wbg_or_27271652bc819f73" "--export" "__wbindgen_describe___wbg_ownKeys_328c4007fe203386" "--export" "__wbindgen_describe___wbg_padEnd_dd66da76224cfe92" "--export" "__wbindgen_describe___wbg_padStart_e70a9fda63dcc43d" "--export" "__wbindgen_describe___wbg_parseFloat_344fc59dd8f7fa8a" "--export" "__wbindgen_describe___wbg_parseFloat_b354a7dea0c15421" "--export" "__wbindgen_describe___wbg_parseInt_92dd6bcc240472b3" "--export" "__wbindgen_describe___wbg_parseInt_d563d599ce2ac611" "--export" "__wbindgen_describe___wbg_parse_33f736b060e2a9f7" "--export" "__wbindgen_describe___wbg_parse_ba49950ce04b31a1" "--export" "__wbindgen_describe___wbg_pop_230bbc88c11bdf1b" "--export" "__wbindgen_describe___wbg_pow_a9fad77c64ad5a4d" "--export" "__wbindgen_describe___wbg_preventExtensions_1f63e3fd98552e8c" "--export" "__wbindgen_describe___wbg_preventExtensions_7191d45942d5fe1f" "--export" "__wbindgen_describe___wbg_propertyIsEnumerable_6a8ff21d496c9c4b" "--export" "__wbindgen_describe___wbg_push_b46eeec52d2b03bb" "--export" "__wbindgen_describe___wbg_race_6ea9fd8de617c1bb" "--export" "__wbindgen_describe___wbg_random_a3b3bcffa2ed629c" "--export" "__wbindgen_describe___wbg_raw_148850bf19588c93" "--export" "__wbindgen_describe___wbg_raw_2562213f6b5aa1db" "--export" "__wbindgen_describe___wbg_raw_7dc09b9c1286fcae" "--export" "__wbindgen_describe___wbg_raw_bd755bab890deee8" "--export" "__wbindgen_describe___wbg_raw_beca8a4387d5159a" "--export" "__wbindgen_describe___wbg_raw_c172c573bd9e11bf" "--export" "__wbindgen_describe___wbg_raw_ca70b8b85aa2fa69" "--export" "__wbindgen_describe___wbg_raw_dbf03bc50689d4f8" "--export" "__wbindgen_describe___wbg_raw_ef3d2183b72245b6" "--export" "__wbindgen_describe___wbg_reduceRight_f2b0069eac4ef60a" "--export" "__wbindgen_describe___wbg_reduce_ee4b5d87a15e35bd" "--export" "__wbindgen_describe___wbg_reject_5d8c18a490c1b8b2" "--export" "__wbindgen_describe___wbg_repeat_e9d983e6c5e56544" "--export" "__wbindgen_describe___wbg_replace_09149af11b08bfc2" "--export" "__wbindgen_describe___wbg_replace_532b003842fd3d1f" "--export" "__wbindgen_describe___wbg_replace_70da62e46527d4e5" "--export" "__wbindgen_describe___wbg_replace_c7f26c2a42e951f7" "--export" "__wbindgen_describe___wbg_replace_f246fabd17e6247b" "--export" "__wbindgen_describe___wbg_resolve_2529512c3bb73938" "--export" "__wbindgen_describe___wbg_resolvedOptions_58c82865f4bfeab3" "--export" "__wbindgen_describe___wbg_resolvedOptions_a32e37f25454383e" "--export" "__wbindgen_describe___wbg_resolvedOptions_b5a12435f98b0f0c" "--export" "__wbindgen_describe___wbg_resolvedOptions_ef33ac0067a82b65" "--export" "__wbindgen_describe___wbg_return_4ea1f84575c0eb94" "--export" "__wbindgen_describe___wbg_reverse_e3f4b77f2a684f19" "--export" "__wbindgen_describe___wbg_revocable_93486ea33d533d3a" "--export" "__wbindgen_describe___wbg_rightContext_041614af17a9e6d3" "--export" "__wbindgen_describe___wbg_round_b4075bea7a2d3793" "--export" "__wbindgen_describe___wbg_seal_90e1fa1f72c01db9" "--export" "__wbindgen_describe___wbg_search_47a4b6da52a78b28" "--export" "__wbindgen_describe___wbg_search_6173924910a3d7e2" "--export" "__wbindgen_describe___wbg_select_ecc11f867083b18f" "--export" "__wbindgen_describe___wbg_self_07b2f89e82ceb76d" "--export" "__wbindgen_describe___wbg_setDate_efbb72eeee478764" "--export" "__wbindgen_describe___wbg_setFloat32_a224f84169784099" "--export" "__wbindgen_describe___wbg_setFloat32_b956451b41ad78a6" "--export" "__wbindgen_describe___wbg_setFloat64_087256215dab0384" "--export" "__wbindgen_describe___wbg_setFloat64_feb56bc11beb2532" "--export" "__wbindgen_describe___wbg_setFullYear_2f53ef4825e03809" "--export" "__wbindgen_describe___wbg_setFullYear_62b35e9ca91cf175" "--export" "__wbindgen_describe___wbg_setFullYear_641d603d03e05989" "--export" "__wbindgen_describe___wbg_setHours_0be79331dd3e2009" "--export" "__wbindgen_describe___wbg_setInt16_829c52f2027f505d" "--export" "__wbindgen_describe___wbg_setInt16_ba2082142fffe6ad" "--export" "__wbindgen_describe___wbg_setInt32_10e36889b1f24233" "--export" "__wbindgen_describe___wbg_setInt32_e7cf5cf74d33f904" "--export" "__wbindgen_describe___wbg_setInt8_d6f2fa5168b98c60" "--export" "__wbindgen_describe___wbg_setMilliseconds_2c72ec17df709dff" "--export" "__wbindgen_describe___wbg_setMinutes_93a148e68adbd01a" "--export" "__wbindgen_describe___wbg_setMonth_de51a8c7af0f7ff2" "--export" "__wbindgen_describe___wbg_setPrototypeOf_1be880cd9fc9bfdb" "--export" "__wbindgen_describe___wbg_setPrototypeOf_44599b4c8526b24e" "--export" "__wbindgen_describe___wbg_setSeconds_3ddcdcd49f7a4324" "--export" "__wbindgen_describe___wbg_setTime_5089ec2aaf5f849c" "--export" "__wbindgen_describe___wbg_setUTCDate_59d489eeb2704700" "--export" "__wbindgen_describe___wbg_setUTCFullYear_3d4e53298f936423" "--export" "__wbindgen_describe___wbg_setUTCFullYear_a7472b427d643286" "--export" "__wbindgen_describe___wbg_setUTCFullYear_d94536c7c8ce71e5" "--export" "__wbindgen_describe___wbg_setUTCHours_c8d7dcee7d52ede0" "--export" "__wbindgen_describe___wbg_setUTCMilliseconds_aa81155e3eff895c" "--export" "__wbindgen_describe___wbg_setUTCMinutes_803d93e3cbffaf34" "--export" "__wbindgen_describe___wbg_setUTCMonth_c3dac2b654d1e033" "--export" "__wbindgen_describe___wbg_setUTCSeconds_169588bdc0dc108b" "--export" "__wbindgen_describe___wbg_setUint16_073831fb09acc6b5" "--export" "__wbindgen_describe___wbg_setUint16_a84c09e9c203443b" "--export" "__wbindgen_describe___wbg_setUint32_7d5dec578cb6ebc2" "--export" "__wbindgen_describe___wbg_setUint32_a9bc5ba51979c16e" "--export" "__wbindgen_describe___wbg_setUint8_c630034deb5a216a" "--export" "__wbindgen_describe___wbg_set_01d92d5fbd57fb94" "--export" "__wbindgen_describe___wbg_set_155dce297caef4bd" "--export" "__wbindgen_describe___wbg_set_304f2ec1a3ab3b79" "--export" "__wbindgen_describe___wbg_set_37ab1e2f5d12f1f1" "--export" "__wbindgen_describe___wbg_set_3bb960a9975f3cd2" "--export" "__wbindgen_describe___wbg_set_472ee5aff6a86300" "--export" "__wbindgen_describe___wbg_set_47d59fa6a95bb4a5" "--export" "__wbindgen_describe___wbg_set_6d80223db43eba88" "--export" "__wbindgen_describe___wbg_set_7a804f2a7a766d05" "--export" "__wbindgen_describe___wbg_set_7abcc5fc4503d434" "--export" "__wbindgen_describe___wbg_set_7dc299c314366736" "--export" "__wbindgen_describe___wbg_set_a78be169fd49beda" "--export" "__wbindgen_describe___wbg_set_b9d9b76f1c2eefec" "--export" "__wbindgen_describe___wbg_set_ba5f6f14542c82b2" "--export" "__wbindgen_describe___wbg_set_dc1747928aa0076f" "--export" "__wbindgen_describe___wbg_set_eaabec8218647f1c" "--export" "__wbindgen_describe___wbg_set_fc4f48ed74989763" "--export" "__wbindgen_describe___wbg_setindex_144fb914015cb02d" "--export" "__wbindgen_describe___wbg_setindex_1c6d0b19dd7d67ba" "--export" "__wbindgen_describe___wbg_setindex_2c8ef52ef60a2f0e" "--export" "__wbindgen_describe___wbg_setindex_377fe773b00004a4" "--export" "__wbindgen_describe___wbg_setindex_3fda2ea47e324c06" "--export" "__wbindgen_describe___wbg_setindex_99a182708ee24cca" "--export" "__wbindgen_describe___wbg_setindex_bc95373b06338cd0" "--export" "__wbindgen_describe___wbg_setindex_c6623b058b2d0617" "--export" "__wbindgen_describe___wbg_setindex_f7a76ef1dd6bb045" "--export" "__wbindgen_describe___wbg_setlastindex_f43d8f0391bf0675" "--export" "__wbindgen_describe___wbg_setmessage_6ee1f6013ce3e966" "--export" "__wbindgen_describe___wbg_setname_a2f5f3bdfc971d1d" "--export" "__wbindgen_describe___wbg_shift_35b1ab6602dacc9a" "--export" "__wbindgen_describe___wbg_sign_89c26c6e09fd089e" "--export" "__wbindgen_describe___wbg_sin_2bcc247eb4970fb9" "--export" "__wbindgen_describe___wbg_sinh_1e384eee40be1b32" "--export" "__wbindgen_describe___wbg_size_bd71acbe16b074eb" "--export" "__wbindgen_describe___wbg_size_dfe933c97af1c843" "--export" "__wbindgen_describe___wbg_slice_397938495b4ce9c3" "--export" "__wbindgen_describe___wbg_slice_5b634d85cba6763c" "--export" "__wbindgen_describe___wbg_slice_5ffa1e4097c164ab" "--export" "__wbindgen_describe___wbg_slice_72f5977940ceb5d4" "--export" "__wbindgen_describe___wbg_slice_736f8024878d6a4c" "--export" "__wbindgen_describe___wbg_slice_859f6d7f048ad111" "--export" "__wbindgen_describe___wbg_slice_85dfe18344bc767d" "--export" "__wbindgen_describe___wbg_slice_8af316ba914062a3" "--export" "__wbindgen_describe___wbg_slice_8ce5426c0aa8d083" "--export" "__wbindgen_describe___wbg_slice_917dceb4dbc9c9d5" "--export" "__wbindgen_describe___wbg_slice_a175499d5eb7cf7b" "--export" "__wbindgen_describe___wbg_slice_af74b96959d4e7d6" "--export" "__wbindgen_describe___wbg_slice_b36ec61abe482503" "--export" "__wbindgen_describe___wbg_slice_e736cb8db3a6a070" "--export" "__wbindgen_describe___wbg_slice_e7b3c55dc835318e" "--export" "__wbindgen_describe___wbg_some_a25f2a92cec822b7" "--export" "__wbindgen_describe___wbg_sort_eb67c7cc1d33349d" "--export" "__wbindgen_describe___wbg_source_5eaf502fcecc3b5f" "--export" "__wbindgen_describe___wbg_species_4b77223556270f2f" "--export" "__wbindgen_describe___wbg_splice_d41eb8cc4b404432" "--export" "__wbindgen_describe___wbg_split_5ed30a3e1e599193" "--export" "__wbindgen_describe___wbg_split_a761c8794da7381d" "--export" "__wbindgen_describe___wbg_split_c7fbd9009868fc02" "--export" "__wbindgen_describe___wbg_split_d0cad2be4e8f9727" "--export" "__wbindgen_describe___wbg_split_f4159514dff0b162" "--export" "__wbindgen_describe___wbg_sqrt_748a5a9086610051" "--export" "__wbindgen_describe___wbg_startsWith_3e0a2954922ecbe3" "--export" "__wbindgen_describe___wbg_sticky_c91bf0d41a62dd90" "--export" "__wbindgen_describe___wbg_store_2ae1fa457ad837c7" "--export" "__wbindgen_describe___wbg_stringify_5d3f3e81ec4aa600" "--export" "__wbindgen_describe___wbg_stringify_76a93a99847c51d6" "--export" "__wbindgen_describe___wbg_stringify_9239c76d801a735d" "--export" "__wbindgen_describe___wbg_sub_981578df9ebec48c" "--export" "__wbindgen_describe___wbg_subarray_11fae3a1e8184ff8" "--export" "__wbindgen_describe___wbg_subarray_4cf58941ccdff8e8" "--export" "__wbindgen_describe___wbg_subarray_4eaeb3de00cf1955" "--export" "__wbindgen_describe___wbg_subarray_50804224b5474627" "--export" "__wbindgen_describe___wbg_subarray_714ad6c789c9d07f" "--export" "__wbindgen_describe___wbg_subarray_74a8d6353bd81dcd" "--export" "__wbindgen_describe___wbg_subarray_bb335411a4cc112f" "--export" "__wbindgen_describe___wbg_subarray_d4e9014908bef0f6" "--export" "__wbindgen_describe___wbg_subarray_f5aa665f0873e6e8" "--export" "__wbindgen_describe___wbg_substr_3f76327de5916bc1" "--export" "__wbindgen_describe___wbg_substring_9fedfa7a85037871" "--export" "__wbindgen_describe___wbg_supportedLocalesOf_0df6e6aa0de2db38" "--export" "__wbindgen_describe___wbg_supportedLocalesOf_4e39aa82adaeec15" "--export" "__wbindgen_describe___wbg_supportedLocalesOf_5cfce70a9a308159" "--export" "__wbindgen_describe___wbg_supportedLocalesOf_dd549821cec1bd66" "--export" "__wbindgen_describe___wbg_tan_92ba4f5fa733a987" "--export" "__wbindgen_describe___wbg_tanh_8db65a7ee642c973" "--export" "__wbindgen_describe___wbg_test_8d3e513a6884f5cb" "--export" "__wbindgen_describe___wbg_then_3b7ac098cfda2fa5" "--export" "__wbindgen_describe___wbg_then_4a7a614abbbe6d81" "--export" "__wbindgen_describe___wbg_throw_1467d729e96712db" "--export" "__wbindgen_describe___wbg_toDateString_0b356faf91d150c4" "--export" "__wbindgen_describe___wbg_toExponential_75097283ccf94efa" "--export" "__wbindgen_describe___wbg_toFixed_91175a22bde40f1a" "--export" "__wbindgen_describe___wbg_toISOString_43f6e380a080527c" "--export" "__wbindgen_describe___wbg_toJSON_a99cc530d1ad675b" "--export" "__wbindgen_describe___wbg_toLocaleDateString_bc071102e038311d" "--export" "__wbindgen_describe___wbg_toLocaleLowerCase_98a7b1f938784254" "--export" "__wbindgen_describe___wbg_toLocaleString_12f52503c07a20f4" "--export" "__wbindgen_describe___wbg_toLocaleString_5167d08fbf0240ac" "--export" "__wbindgen_describe___wbg_toLocaleString_9de46dab733b006e" "--export" "__wbindgen_describe___wbg_toLocaleString_b30840863297e27e" "--export" "__wbindgen_describe___wbg_toLocaleTimeString_ad93df50b4a523c9" "--export" "__wbindgen_describe___wbg_toLocaleUpperCase_75900956023d74df" "--export" "__wbindgen_describe___wbg_toLowerCase_df3a8097d22f2dbe" "--export" "__wbindgen_describe___wbg_toPrecision_37b4223c0774a73e" "--export" "__wbindgen_describe___wbg_toPrimitive_bb5fa85be0f6dfce" "--export" "__wbindgen_describe___wbg_toStringTag_dd0550a633b04a6d" "--export" "__wbindgen_describe___wbg_toString_380767dc94884950" "--export" "__wbindgen_describe___wbg_toString_41f616718cc7fc20" "--export" "__wbindgen_describe___wbg_toString_99f65d662d822384" "--export" "__wbindgen_describe___wbg_toString_ae4f72e88ee70451" "--export" "__wbindgen_describe___wbg_toString_bfc985ae4b696a7d" "--export" "__wbindgen_describe___wbg_toString_c411323ffe42cbba" "--export" "__wbindgen_describe___wbg_toString_cfbf28ad6e63e6b7" "--export" "__wbindgen_describe___wbg_toString_e6310bbb63613448" "--export" "__wbindgen_describe___wbg_toString_f0111dfd17acfddf" "--export" "__wbindgen_describe___wbg_toTimeString_a814ff17b66fab71" "--export" "__wbindgen_describe___wbg_toUTCString_863065a2095e0e9c" "--export" "__wbindgen_describe___wbg_toUpperCase_5826035d02c18a91" "--export" "__wbindgen_describe___wbg_trimEnd_ce4c7e48757d251e" "--export" "__wbindgen_describe___wbg_trimLeft_7f73f82c60c928c1" "--export" "__wbindgen_describe___wbg_trimRight_107157e07d5659c3" "--export" "__wbindgen_describe___wbg_trimStart_28b47fc4b4daa2a8" "--export" "__wbindgen_describe___wbg_trim_fc57a2c6592c32a5" "--export" "__wbindgen_describe___wbg_trunc_37ad74cb03e6eff5" "--export" "__wbindgen_describe___wbg_unescape_39436f01e2631713" "--export" "__wbindgen_describe___wbg_unicode_a28f51600a876e7d" "--export" "__wbindgen_describe___wbg_unscopables_036a3416bb915ef9" "--export" "__wbindgen_describe___wbg_unshift_70fde3f57541ea8d" "--export" "__wbindgen_describe___wbg_validate_bb2905150bfd201b" "--export" "__wbindgen_describe___wbg_valueOf_0121869f62e216cc" "--export" "__wbindgen_describe___wbg_valueOf_0a03b98e97e5d95b" "--export" "__wbindgen_describe___wbg_valueOf_3db85f398e0c80b9" "--export" "__wbindgen_describe___wbg_valueOf_4cd86fb98145938d" "--export" "__wbindgen_describe___wbg_valueOf_5990070343459b40" "--export" "__wbindgen_describe___wbg_valueOf_f6d2b0994b83b882" "--export" "__wbindgen_describe___wbg_value_e60bbfb7d52af62f" "--export" "__wbindgen_describe___wbg_values_8046c75f9795db9a" "--export" "__wbindgen_describe___wbg_values_833681ea0af6b73c" "--export" "__wbindgen_describe___wbg_values_a8e8f7b69d5eb117" "--export" "__wbindgen_describe___wbg_values_e682b14fa05e16b2" "--export" "__wbindgen_describe___wbg_wait_92f745c042351c89" "--export" "__wbindgen_describe___wbg_wait_b2bd9754ae1567f8" "--export" "__wbindgen_describe___wbg_window_ba85d88572adc0dc" "--export" "__wbindgen_describe___wbg_xor_451e54e45550935d" "--export" "__wbindgen_describe___wbg_error_4bb6c2a97407129a" "--export" "__wbindgen_describe___wbg_new_59cb74e423758ede" "--export" "__wbindgen_describe___wbg_stack_558ba5917b466edd" "--export=__heap_base" "--export=__data_end" "/Users/jramsley/gl-matrix/target/wasm32-unknown-unknown/release/deps/gl_matrix.171488lp5fwl87m.rcgu.o" "--gc-sections" "-O2" "-L" "/Users/jramsley/gl-matrix/target/wasm32-unknown-unknown/release/deps" "-L" "/Users/jramsley/gl-matrix/target/release/deps" "-L" "/Users/jramsley/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-unknown/lib" "/Users/jramsley/gl-matrix/target/wasm32-unknown-unknown/release/deps/libconsole_error_panic_hook-ff82d09f4695f891.rlib" "/Users/jramsley/gl-matrix/target/wasm32-unknown-unknown/release/deps/librand-e9ca69cc7b12b707.rlib" "/Users/jramsley/gl-matrix/target/wasm32-unknown-unknown/release/deps/librand_chacha-1fa4fda614a821ac.rlib" "/Users/jramsley/gl-matrix/target/wasm32-unknown-unknown/release/deps/libppv_lite86-37014f0089a18b3e.rlib" "/Users/jramsley/gl-matrix/target/wasm32-unknown-unknown/release/deps/librand_core-39a89fc4fc76225e.rlib" "/Users/jramsley/gl-matrix/target/wasm32-unknown-unknown/release/deps/libgetrandom-fc5b8151f09f7b33.rlib" "/Users/jramsley/gl-matrix/target/wasm32-unknown-unknown/release/deps/libjs_sys-a68c5b2993cd645c.rlib" "/Users/jramsley/gl-matrix/target/wasm32-unknown-unknown/release/deps/libwasm_bindgen-19ee7a9a75901bcd.rlib" "/Users/jramsley/gl-matrix/target/wasm32-unknown-unknown/release/deps/libcfg_if-da21b908ed718d9c.rlib" "/Users/jramsley/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-unknown/lib/libstd-687f129154fbe984.rlib" "/Users/jramsley/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-unknown/lib/libpanic_abort-212dd0f5576b083a.rlib" "/Users/jramsley/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-unknown/lib/libdlmalloc-39a71c5c99988946.rlib" "/Users/jramsley/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-unknown/lib/libhashbrown-fd5199061bda0fc4.rlib" "/Users/jramsley/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-unknown/lib/librustc_std_workspace_alloc-d7e03f542cb15881.rlib" "/Users/jramsley/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-unknown/lib/libbacktrace-df04d2299f2f8e28.rlib" "/Users/jramsley/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-unknown/lib/librustc_demangle-6b8a088e8b7e8a8b.rlib" "/Users/jramsley/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-unknown/lib/libunwind-620bfeb965efa66b.rlib" "/Users/jramsley/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-unknown/lib/libcfg_if-1a5625b7df28182c.rlib" "/Users/jramsley/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-unknown/lib/liblibc-59945eb96c821df9.rlib" "/Users/jramsley/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-unknown/lib/liballoc-3ad7188e526dda08.rlib" "/Users/jramsley/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-unknown/lib/librustc_std_workspace_core-b29fc8d64efc633b.rlib" "/Users/jramsley/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-unknown/lib/libcore-f5e59180f144f2b1.rlib" "/Users/jramsley/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-unknown/lib/libcompiler_builtins-a30046ba00655967.rlib" "--no-entry"
  = note: rust-lld: error: function signature mismatch: round
          >>> defined as (f64) -> f64 in /Users/jramsley/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-unknown/lib/libcompiler_builtins-a30046ba00655967.rlib(compiler_builtins-a30046ba00655967.compiler_builtins.ara2xh13-cgu.0.rcgu.o)
          >>> defined as (i32, i32) -> i32 in /Users/jramsley/gl-matrix/target/wasm32-unknown-unknown/release/deps/gl_matrix.gl_matrix.7mocmiy6-cgu.1.rcgu.o
          

error: aborting due to previous error

error: could not compile `gl-matrix`.

@alexcrichton
Copy link
Contributor

This is a bit unfortunate, but the way linkage and symbols work with LLD and LLVM right now you can't duplicate symbols, and symbols are tied to function exports as well. The round function is actually typically something from libm which provides support for various floating-point operations, and which for Rust is located in the compiler-builtins crate.

Unfortunately there's not really much that can be done about this I think. There's a similar issue with functions named log or similarly. Until a better story is figured out for exporting a function in a wasm module with a different name than the symbol itself our hands here are sort of tied :(

If possible, can a different function be used?

@jramsley
Copy link
Author

It's easy enough to post-process to change the exported function name

/**
* @param {Float32Array} out
* @param {Float32Array} a
* @returns {Float32Array}
*/
export function js_round(out, a) {
    try {
        var ret = wasm.js_round(addHeapObject(out), addBorrowedObject(a));
        return takeObject(ret);
    } finally {
        heap[stack_pointer++] = undefined;
    }
}

to

/**
* @param {Float32Array} out
* @param {Float32Array} a
* @returns {Float32Array}
*/
export function round(out, a) {
    try {
        var ret = wasm.js_round(addHeapObject(out), addBorrowedObject(a));
        return takeObject(ret);
    } finally {
        heap[stack_pointer++] = undefined;
    }
}

I would assume there would be some form of uniqueness to the internal symbols though and the js_name would refer to the exported interface. It could be that I am not thinking about web assemblies the same as others though. This is my first real foray into webasm/Rust and wanted to see if converting a library we commonly use has benefit.

@alexcrichton
Copy link
Contributor

Yeah that's another way to fix it! We can theoretically fix this as well by only applying js_name to the JS wrapper and not the wasm itself too, I think.

@samestep
Copy link
Contributor

samestep commented Jun 5, 2023

Yeah that's another way to fix it! We can theoretically fix this as well by only applying js_name to the JS wrapper and not the wasm itself too, I think.

@alexcrichton This is what I would like to do. Would you be open to a PR making this change?

@daxpedda
Copy link
Collaborator

daxpedda commented Jun 5, 2023

Wouldn't that be a breaking change?
I'm not sure if this is considered an implementation detail, but some people might rely on these exported functions directly, which I'm not sure makes sense, would have to look into it further.

@samestep
Copy link
Contributor

samestep commented Jun 5, 2023

Yeah, this is why I was asking. What is the wasm-bindgen policy around breaking changes in general? We're still in v0.x so by semver I assume it'd be OK; and also, bumping from v0.2.83 to v0.2.84 modified the exported signature of a Wasm function in one of my projects anyway, so it seems like we're already making breaking changes in practice.

@daxpedda
Copy link
Collaborator

daxpedda commented Jun 5, 2023

and also, bumping from v0.2.83 to v0.2.84 modified the exported signature of a Wasm function in one of my projects anyway, so it seems like we're already making breaking changes in practice.

Could you elaborate?

What is the wasm-bindgen policy around breaking changes in general?

We try not do any breaking changes until v0.3, except increasing the MSRV. The question is really what falls under breaking change and what doesn't. As far as I know that isn't something that's clearly defined.

@samestep
Copy link
Contributor

samestep commented Jun 5, 2023

Could you elaborate?

Sure! You can find all the details of that particular case at penrose/penrose#1284, but basically I had a function that looked something like this:

use wasm_bindgen::prelude::wasm_bindgen;

#[wasm_bindgen]
pub fn foo(v: &mut [f64]) {
    for x in v.iter_mut() {
        *x = -*x;
    }
}

With wasm-bindgen v0.2.83 this produces a function with two i32 parameters, whereas with wasm-bindgen v0.2.84 this produces a function with three i32 parameters. At the time I depended on the actual interface of the WebAssembly module itself, so I had to change that function from #[wasm_bindgen] to #[no_mangle] in order to deal with the breaking change, but later I refactored my system architecture so now I no longer depend on the Wasm module interface at all, and instead interact with it only through the wasm-bindgen-generated interface.

We try not do any breaking changes until v0.3, except increasing the MSRV. The question is really what falls under breaking change and what doesn't. As far as I know that isn't something that's clearly defined.

Makes sense, thanks for clarifying!

@daxpedda
Copy link
Collaborator

daxpedda commented Jun 5, 2023

Interesting, I don't remember in particular what caused this change, but that's the same question as above: is the interface of exported functions like this an implementation detail?

If yes, then this wasn't a breaking change, if not, then this was a breaking change.
Either way I don't feel qualified enough to answer this, so let's wait for other maintainers to chime in.

@Liamolucko
Copy link
Collaborator

Interesting, I don't remember in particular what caused this change

That was #3188; the extra parameter is a JsValue reference to the original Float64Array so that the modified data can be written back when the function returns, which used to be handled in JS.

but that's the same question as above: is the interface of exported functions like this an implementation detail?

I'd argue that yes, they're supposed to be an implementation detail, but that's just my opinion; like you said, I don't think it's clearly defined. wasm-bindgen's stability seems to pretty much just be on an 'is it likely to break people's code' basis.

@daxpedda
Copy link
Collaborator

daxpedda commented Jun 7, 2023

I'd argue that yes, they're supposed to be an implementation detail, but that's just my opinion

I looked into it further in the meantime, I feel confident now that this has to be labeled as an implementation detail. Not only did we change it quite often, but almost all of the time these functions are not usable without all the helpers defined in the JS shim. I think if users need a stable Wasm export, they should just use #[no_mangle] instead of #[wasm_bindgen].

Would you be open to a PR making this change?

@samestep I would be fine with that now.
@Liamolucko if you still feel uncomfortable with that change, we can wait for alexcrichton's opinion as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants