Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 13 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,31 @@

### Fixed

### Removed

## [0.2.127](https://github.com/wasm-bindgen/wasm-bindgen/compare/0.2.126...0.2.127)

### Fixed

* Fixed compilation with `(feature = "std", panic = "unwind", target_feature = "atomics")`
and prevented a `Task` leak when a future unwinds out of `poll` (via a Rust
panic or a foreign JS exception) in both the single-threaded and
multi-threaded executors.
[#5214](https://github.com/wasm-bindgen/wasm-bindgen/pull/5214)

* Emscripten output now reaches wasm exports through emscripten's `wasmExports`
object using bracket (string-literal) access (`wasmExports['__wbindgen_start']`)
instead of a local `wasm` alias with dot access. `wasmExports['name']` is the
form emcc's DCE graph roots and its import/export minifier renames in the JS
and the wasm together, so the glue now survives and stays consistent under
`-O3`/`-Os` (previously the export names were minified without updating the JS
call sites, e.g. `__wbindgen_start is not defined`).
[#5217](https://github.com/wasm-bindgen/wasm-bindgen/pull/5217)

* The emscripten detection marker static is no longer leaked as public API.
[#5220](https://github.com/wasm-bindgen/wasm-bindgen/pull/5220)
[#5222](https://github.com/wasm-bindgen/wasm-bindgen/pull/5222)

### Removed

## [0.2.126](https://github.com/wasm-bindgen/wasm-bindgen/compare/0.2.125...0.2.126)

### Changed
Expand Down Expand Up @@ -55,11 +66,6 @@

* Relaxed alignment requirement for 8-byte types.
[#5204](https://github.com/wasm-bindgen/wasm-bindgen/pull/5204)
* Fixed compilation with `(feature = "std", panic = "unwind", target_feature = "atomics")`
and prevented a `Task` leak when a future unwinds out of `poll` (via a Rust
panic or a foreign JS exception) in both the single-threaded and
multi-threaded executors.
[#5214](https://github.com/wasm-bindgen/wasm-bindgen/pull/5214)

* Headless Chrome/Edge tests now surface the WebDriver's own error message when
session creation fails (e.g. a chromedriver/Chrome version mismatch) instead
Expand Down
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ name = "wasm-bindgen"
readme = "README.md"
repository = "https://github.com/wasm-bindgen/wasm-bindgen"
rust-version = "1.77"
version = "0.2.126"
version = "0.2.127"

[package.metadata.docs.rs]
features = ["serde-serialize"]
Expand Down Expand Up @@ -46,8 +46,8 @@ cfg-if = "1.0.0"
once_cell = { version = "1.12", default-features = false }
serde = { version = "1.0", optional = true }
serde_json = { version = "1.0", optional = true }
wasm-bindgen-macro = { path = "crates/macro", version = "=0.2.126" }
wasm-bindgen-shared = { path = "crates/shared", version = "=0.2.126" }
wasm-bindgen-macro = { path = "crates/macro", version = "=0.2.127" }
wasm-bindgen-shared = { path = "crates/shared", version = "=0.2.127" }

[build-dependencies]
# In older MSRVs, dependencies and crate features can't have the same name.
Expand Down
4 changes: 2 additions & 2 deletions crates/cli-support/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ license = "MIT OR Apache-2.0"
name = "wasm-bindgen-cli-support"
repository = "https://github.com/wasm-bindgen/wasm-bindgen/tree/master/crates/cli-support"
rust-version = "1.86"
version = "0.2.126"
version = "0.2.127"

[dependencies]
anyhow = "1.0"
Expand All @@ -22,7 +22,7 @@ rustc-demangle = "0.1.13"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
walrus = { version = "0.26.1", features = ['parallel'] }
wasm-bindgen-shared = { path = "../shared", version = "=0.2.126" }
wasm-bindgen-shared = { path = "../shared", version = "=0.2.127" }
wasmparser = "0.245"

[dev-dependencies]
Expand Down
6 changes: 3 additions & 3 deletions crates/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ license = "MIT OR Apache-2.0"
name = "wasm-bindgen-cli"
repository = "https://github.com/wasm-bindgen/wasm-bindgen/tree/master/crates/cli"
rust-version = "1.86"
version = "0.2.126"
version = "0.2.127"

[package.metadata.binstall]
bin-dir = "wasm-bindgen-{ version }-{ target }/{ bin }{ binary-ext }"
Expand Down Expand Up @@ -46,8 +46,8 @@ shlex = "1"
tempfile = "3.0"
ureq = { version = "3", default-features = false, features = ["brotli", "gzip"] }
walrus = "0.26.1"
wasm-bindgen-cli-support = { path = "../cli-support", version = "=0.2.126" }
wasm-bindgen-test-shared = { path = "../test-shared", version = "=0.2.126" }
wasm-bindgen-cli-support = { path = "../cli-support", version = "=0.2.127" }
wasm-bindgen-test-shared = { path = "../test-shared", version = "=0.2.127" }
wasmparser = "0.245"

[dev-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion crates/cli/tests/reference/anyref-import-catch.bg.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export function exported() {
throw takeFromExternrefTable0(ret[0]);
}
}
export function __wbg___wbindgen_throw_344f42d3211c4765(arg0, arg1) {
export function __wbg___wbindgen_throw_bb96b2010945f0bc(arg0, arg1) {
throw new Error(getStringFromWasm0(arg0, arg1));
}
export function __wbg_foo_fb65c8eea1052a08() { return handleError(function () {
Expand Down
2 changes: 1 addition & 1 deletion crates/cli/tests/reference/anyref-import-catch.wat
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
(type (;2;) (func (result i32 i32)))
(type (;3;) (func (result i32)))
(type (;4;) (func))
(import "./reference_test_bg.js" "__wbg___wbindgen_throw_344f42d3211c4765" (func (;0;) (type 0)))
(import "./reference_test_bg.js" "__wbg___wbindgen_throw_bb96b2010945f0bc" (func (;0;) (type 0)))
(import "./reference_test_bg.js" "__wbg_foo_fb65c8eea1052a08" (func (;1;) (type 4)))
(import "./reference_test_bg.js" "__wbindgen_init_externref_table" (func (;2;) (type 4)))
(table $__wbindgen_externrefs (;0;) 1024 externref)
Expand Down
42 changes: 21 additions & 21 deletions crates/cli/tests/reference/async-number.bg.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,32 +5,32 @@ export function foo() {
const ret = wasm.foo();
return ret;
}
export function __wbg___wbindgen_debug_string_c25d447a39f5578f(arg0, arg1) {
export function __wbg___wbindgen_debug_string_a57024b9c6e4a48b(arg0, arg1) {
const ret = debugString(arg1);
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
const len1 = WASM_VECTOR_LEN;
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
}
export function __wbg___wbindgen_is_function_1ff95bcc5517c252(arg0) {
export function __wbg___wbindgen_is_function_5e4570eb24ffa122(arg0) {
const ret = typeof(arg0) === 'function';
return ret;
}
export function __wbg___wbindgen_is_undefined_c05833b95a3cf397(arg0) {
export function __wbg___wbindgen_is_undefined_6cff064c44e0d823(arg0) {
const ret = arg0 === undefined;
return ret;
}
export function __wbg___wbindgen_throw_344f42d3211c4765(arg0, arg1) {
export function __wbg___wbindgen_throw_bb96b2010945f0bc(arg0, arg1) {
throw new Error(getStringFromWasm0(arg0, arg1));
}
export function __wbg__wbg_cb_unref_fffb441def202758(arg0) {
export function __wbg__wbg_cb_unref_be22cc64ae6946a0(arg0) {
arg0._wbg_cb_unref();
}
export function __wbg_call_a6e5c5dce5018821() { return handleError(function (arg0, arg1, arg2) {
export function __wbg_call_35dba3c747ad7521() { return handleError(function (arg0, arg1, arg2) {
const ret = arg0.call(arg1, arg2);
return ret;
}, arguments); }
export function __wbg_new_typed_1824d93f294193e5(arg0, arg1) {
export function __wbg_new_typed_cceaf62d8d95e9f2(arg0, arg1) {
try {
var state0 = {a: arg0, b: arg1};
var cb0 = (arg0, arg1) => {
Expand All @@ -48,18 +48,18 @@ export function __wbg_new_typed_1824d93f294193e5(arg0, arg1) {
state0.a = 0;
}
}
export function __wbg_queueMicrotask_0ab5b2d2393e99b9(arg0) {
export function __wbg_queueMicrotask_ac694eae12e92dfb(arg0) {
queueMicrotask(arg0);
}
export function __wbg_queueMicrotask_be5fe34a8f4cad4d(arg0) {
const ret = arg0.queueMicrotask;
return ret;
}
export function __wbg_queueMicrotask_6a09b7bc46549209(arg0) {
queueMicrotask(arg0);
}
export function __wbg_resolve_2191a4dfe481c25b(arg0) {
export function __wbg_resolve_020f95d838c6ef25(arg0) {
const ret = Promise.resolve(arg0);
return ret;
}
export function __wbg_run_5aa314612b150933(arg0, arg1, arg2) {
export function __wbg_run_ef366b557a6598c4(arg0, arg1, arg2) {
try {
var state0 = {a: arg1, b: arg2};
var cb0 = () => {
Expand All @@ -77,27 +77,27 @@ export function __wbg_run_5aa314612b150933(arg0, arg1, arg2) {
state0.a = 0;
}
}
export function __wbg_static_accessor_CREATE_TASK_7ee0dd8bc83df5b2() {
export function __wbg_static_accessor_CREATE_TASK_c2f8d517ff47221b() {
const ret = typeof console === 'undefined' ? null : console?.createTask;
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
}
export function __wbg_static_accessor_GLOBAL_4ef717fb391d88b7() {
const ret = typeof global === 'undefined' ? null : global;
export function __wbg_static_accessor_GLOBAL_THIS_466428f93b4eaa76() {
const ret = typeof globalThis === 'undefined' ? null : globalThis;
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
}
export function __wbg_static_accessor_GLOBAL_THIS_8d1badc68b5a74f4() {
const ret = typeof globalThis === 'undefined' ? null : globalThis;
export function __wbg_static_accessor_GLOBAL_c7aea38d4de089bc() {
const ret = typeof global === 'undefined' ? null : global;
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
}
export function __wbg_static_accessor_SELF_146583524fe1469b() {
export function __wbg_static_accessor_SELF_42d4fae05e59267a() {
const ret = typeof self === 'undefined' ? null : self;
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
}
export function __wbg_static_accessor_WINDOW_f2829a2234d7819e() {
export function __wbg_static_accessor_WINDOW_e0db14a0eba6a812() {
const ret = typeof window === 'undefined' ? null : window;
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
}
export function __wbg_then_6ec10ae38b3e92f7(arg0, arg1) {
export function __wbg_then_7026b513a94278a8(arg0, arg1) {
const ret = arg0.then(arg1);
return ret;
}
Expand Down
34 changes: 17 additions & 17 deletions crates/cli/tests/reference/async-number.wat
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,23 @@
(type (;15;) (func (result externref)))
(type (;16;) (func (result i32)))
(type (;17;) (func))
(import "./reference_test_bg.js" "__wbg___wbindgen_debug_string_c25d447a39f5578f" (func (;0;) (type 7)))
(import "./reference_test_bg.js" "__wbg___wbindgen_is_function_1ff95bcc5517c252" (func (;1;) (type 4)))
(import "./reference_test_bg.js" "__wbg___wbindgen_is_undefined_c05833b95a3cf397" (func (;2;) (type 4)))
(import "./reference_test_bg.js" "__wbg___wbindgen_throw_344f42d3211c4765" (func (;3;) (type 13)))
(import "./reference_test_bg.js" "__wbg__wbg_cb_unref_fffb441def202758" (func (;4;) (type 5)))
(import "./reference_test_bg.js" "__wbg_call_a6e5c5dce5018821" (func (;5;) (type 0)))
(import "./reference_test_bg.js" "__wbg_new_typed_1824d93f294193e5" (func (;6;) (type 11)))
(import "./reference_test_bg.js" "__wbg_queueMicrotask_0ab5b2d2393e99b9" (func (;7;) (type 3)))
(import "./reference_test_bg.js" "__wbg_queueMicrotask_6a09b7bc46549209" (func (;8;) (type 5)))
(import "./reference_test_bg.js" "__wbg_resolve_2191a4dfe481c25b" (func (;9;) (type 3)))
(import "./reference_test_bg.js" "__wbg_run_5aa314612b150933" (func (;10;) (type 2)))
(import "./reference_test_bg.js" "__wbg_static_accessor_CREATE_TASK_7ee0dd8bc83df5b2" (func (;11;) (type 16)))
(import "./reference_test_bg.js" "__wbg_static_accessor_GLOBAL_4ef717fb391d88b7" (func (;12;) (type 16)))
(import "./reference_test_bg.js" "__wbg_static_accessor_GLOBAL_THIS_8d1badc68b5a74f4" (func (;13;) (type 16)))
(import "./reference_test_bg.js" "__wbg_static_accessor_SELF_146583524fe1469b" (func (;14;) (type 16)))
(import "./reference_test_bg.js" "__wbg_static_accessor_WINDOW_f2829a2234d7819e" (func (;15;) (type 16)))
(import "./reference_test_bg.js" "__wbg_then_6ec10ae38b3e92f7" (func (;16;) (type 1)))
(import "./reference_test_bg.js" "__wbg___wbindgen_debug_string_a57024b9c6e4a48b" (func (;0;) (type 7)))
(import "./reference_test_bg.js" "__wbg___wbindgen_is_function_5e4570eb24ffa122" (func (;1;) (type 4)))
(import "./reference_test_bg.js" "__wbg___wbindgen_is_undefined_6cff064c44e0d823" (func (;2;) (type 4)))
(import "./reference_test_bg.js" "__wbg___wbindgen_throw_bb96b2010945f0bc" (func (;3;) (type 13)))
(import "./reference_test_bg.js" "__wbg__wbg_cb_unref_be22cc64ae6946a0" (func (;4;) (type 5)))
(import "./reference_test_bg.js" "__wbg_call_35dba3c747ad7521" (func (;5;) (type 0)))
(import "./reference_test_bg.js" "__wbg_new_typed_cceaf62d8d95e9f2" (func (;6;) (type 11)))
(import "./reference_test_bg.js" "__wbg_queueMicrotask_ac694eae12e92dfb" (func (;7;) (type 5)))
(import "./reference_test_bg.js" "__wbg_queueMicrotask_be5fe34a8f4cad4d" (func (;8;) (type 3)))
(import "./reference_test_bg.js" "__wbg_resolve_020f95d838c6ef25" (func (;9;) (type 3)))
(import "./reference_test_bg.js" "__wbg_run_ef366b557a6598c4" (func (;10;) (type 2)))
(import "./reference_test_bg.js" "__wbg_static_accessor_CREATE_TASK_c2f8d517ff47221b" (func (;11;) (type 16)))
(import "./reference_test_bg.js" "__wbg_static_accessor_GLOBAL_THIS_466428f93b4eaa76" (func (;12;) (type 16)))
(import "./reference_test_bg.js" "__wbg_static_accessor_GLOBAL_c7aea38d4de089bc" (func (;13;) (type 16)))
(import "./reference_test_bg.js" "__wbg_static_accessor_SELF_42d4fae05e59267a" (func (;14;) (type 16)))
(import "./reference_test_bg.js" "__wbg_static_accessor_WINDOW_e0db14a0eba6a812" (func (;15;) (type 16)))
(import "./reference_test_bg.js" "__wbg_then_7026b513a94278a8" (func (;16;) (type 1)))
(import "./reference_test_bg.js" "__wbindgen_cast_0000000000000000" (func (;17;) (type 11)))
(import "./reference_test_bg.js" "__wbindgen_cast_0000000000000001" (func (;18;) (type 6)))
(import "./reference_test_bg.js" "__wbindgen_cast_0000000000000002" (func (;19;) (type 11)))
Expand Down
42 changes: 21 additions & 21 deletions crates/cli/tests/reference/async-void.bg.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,32 +5,32 @@ export function foo() {
const ret = wasm.foo();
return ret;
}
export function __wbg___wbindgen_debug_string_c25d447a39f5578f(arg0, arg1) {
export function __wbg___wbindgen_debug_string_a57024b9c6e4a48b(arg0, arg1) {
const ret = debugString(arg1);
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
const len1 = WASM_VECTOR_LEN;
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
}
export function __wbg___wbindgen_is_function_1ff95bcc5517c252(arg0) {
export function __wbg___wbindgen_is_function_5e4570eb24ffa122(arg0) {
const ret = typeof(arg0) === 'function';
return ret;
}
export function __wbg___wbindgen_is_undefined_c05833b95a3cf397(arg0) {
export function __wbg___wbindgen_is_undefined_6cff064c44e0d823(arg0) {
const ret = arg0 === undefined;
return ret;
}
export function __wbg___wbindgen_throw_344f42d3211c4765(arg0, arg1) {
export function __wbg___wbindgen_throw_bb96b2010945f0bc(arg0, arg1) {
throw new Error(getStringFromWasm0(arg0, arg1));
}
export function __wbg__wbg_cb_unref_fffb441def202758(arg0) {
export function __wbg__wbg_cb_unref_be22cc64ae6946a0(arg0) {
arg0._wbg_cb_unref();
}
export function __wbg_call_a6e5c5dce5018821() { return handleError(function (arg0, arg1, arg2) {
export function __wbg_call_35dba3c747ad7521() { return handleError(function (arg0, arg1, arg2) {
const ret = arg0.call(arg1, arg2);
return ret;
}, arguments); }
export function __wbg_new_typed_1824d93f294193e5(arg0, arg1) {
export function __wbg_new_typed_cceaf62d8d95e9f2(arg0, arg1) {
try {
var state0 = {a: arg0, b: arg1};
var cb0 = (arg0, arg1) => {
Expand All @@ -48,18 +48,18 @@ export function __wbg_new_typed_1824d93f294193e5(arg0, arg1) {
state0.a = 0;
}
}
export function __wbg_queueMicrotask_0ab5b2d2393e99b9(arg0) {
export function __wbg_queueMicrotask_ac694eae12e92dfb(arg0) {
queueMicrotask(arg0);
}
export function __wbg_queueMicrotask_be5fe34a8f4cad4d(arg0) {
const ret = arg0.queueMicrotask;
return ret;
}
export function __wbg_queueMicrotask_6a09b7bc46549209(arg0) {
queueMicrotask(arg0);
}
export function __wbg_resolve_2191a4dfe481c25b(arg0) {
export function __wbg_resolve_020f95d838c6ef25(arg0) {
const ret = Promise.resolve(arg0);
return ret;
}
export function __wbg_run_5aa314612b150933(arg0, arg1, arg2) {
export function __wbg_run_ef366b557a6598c4(arg0, arg1, arg2) {
try {
var state0 = {a: arg1, b: arg2};
var cb0 = () => {
Expand All @@ -77,27 +77,27 @@ export function __wbg_run_5aa314612b150933(arg0, arg1, arg2) {
state0.a = 0;
}
}
export function __wbg_static_accessor_CREATE_TASK_7ee0dd8bc83df5b2() {
export function __wbg_static_accessor_CREATE_TASK_c2f8d517ff47221b() {
const ret = typeof console === 'undefined' ? null : console?.createTask;
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
}
export function __wbg_static_accessor_GLOBAL_4ef717fb391d88b7() {
const ret = typeof global === 'undefined' ? null : global;
export function __wbg_static_accessor_GLOBAL_THIS_466428f93b4eaa76() {
const ret = typeof globalThis === 'undefined' ? null : globalThis;
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
}
export function __wbg_static_accessor_GLOBAL_THIS_8d1badc68b5a74f4() {
const ret = typeof globalThis === 'undefined' ? null : globalThis;
export function __wbg_static_accessor_GLOBAL_c7aea38d4de089bc() {
const ret = typeof global === 'undefined' ? null : global;
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
}
export function __wbg_static_accessor_SELF_146583524fe1469b() {
export function __wbg_static_accessor_SELF_42d4fae05e59267a() {
const ret = typeof self === 'undefined' ? null : self;
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
}
export function __wbg_static_accessor_WINDOW_f2829a2234d7819e() {
export function __wbg_static_accessor_WINDOW_e0db14a0eba6a812() {
const ret = typeof window === 'undefined' ? null : window;
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
}
export function __wbg_then_6ec10ae38b3e92f7(arg0, arg1) {
export function __wbg_then_7026b513a94278a8(arg0, arg1) {
const ret = arg0.then(arg1);
return ret;
}
Expand Down
Loading