From f834a427d7796fe4c129b8a2f312c08d08e9989b Mon Sep 17 00:00:00 2001 From: Nick Fitzgerald Date: Wed, 26 Sep 2018 07:30:36 -0700 Subject: [PATCH 1/3] Bump to version 0.2.23 (and js-sys and wasm-bindgen-futures to 0.3.0) --- CHANGELOG.md | 49 ++++++++++++++++++++++++++++++ Cargo.toml | 8 ++--- crates/backend/Cargo.toml | 4 +-- crates/cli-support/Cargo.toml | 6 ++-- crates/cli/Cargo.toml | 6 ++-- crates/futures/Cargo.toml | 8 ++--- crates/js-sys/Cargo.toml | 8 ++--- crates/macro-support/Cargo.toml | 6 ++-- crates/macro/Cargo.toml | 4 +-- crates/shared/Cargo.toml | 2 +- crates/test-macro/Cargo.toml | 2 +- crates/test/Cargo.toml | 10 +++--- crates/wasm-interpreter/Cargo.toml | 2 +- crates/web-sys/Cargo.toml | 8 ++--- crates/webidl/Cargo.toml | 2 +- publish.rs | 4 +-- 16 files changed, 89 insertions(+), 40 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d481760a..716881c4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,6 +32,55 @@ Released YYYY-MM-DD. -------------------------------------------------------------------------------- +## 0.2.23 + +Released 2018-09-26. + +### Added + +* Added support for unions of interfaces and non-interfaces in the WebIDL + frontend. + +* Added a policy for inclusion of new ECMAScript features in `js-sys`: the + feature must be in stage 4 or greater for us to support it. + +* Added some documentation about size profiling and optimization with + `wasm-bindgen` to the guide. + +* Added the `Clamped` type for generating JavaScript `Uint8ClampedArray`s. + +* CI is now running on beta! Can't wait for the `rustc` release trains to roll + over, so we can run CI on stable too! + +* Added the `js_sys::try_iter` function, which checks arbitrary JS values for + compliance with the JS iteration protocol, and if they are iterable, converts + them into an iterator over the JS values that they yield. + +### Changed + +* We now only generate null checks on methods on the JS side when in debug + mode. For safety we will always null check on the Rust side, however. + +* Improved error messages when defining setters that don't start with `set_` and + don't use `js_name = ...`. + +* Improved generated code for classes in a way that avoids an unnecessary + allocation with static methods that return `Self` but are not the "main" + constructor. + +* **BREAKING:** `js_sys::Reflect` APIs are all fallible now. This is because + reflecting on `Proxy`s whose trap handlers throw an exception can cause any of + the reflection APIs to throw. Accordingly, `js_sys` has been bumped from + `0.2.X` to `0.3.X`. + +### Fixed + +* The method of ensuring that `__wbindgen_malloc` and `__wbindgen_free` are + always emitted in the `.wasm` binary, regardless of seeming reachability is + now zero-overhead. + +-------------------------------------------------------------------------------- + ## 0.2.22 Released 2018-09-21 diff --git a/Cargo.toml b/Cargo.toml index 3c8ae1e3..a9189e08 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasm-bindgen" -version = "0.2.22" +version = "0.2.23" authors = ["The wasm-bindgen Developers"] license = "MIT/Apache-2.0" # Because only a single `wasm_bindgen` version can be used in a dependency @@ -35,13 +35,13 @@ nightly = [] xxx_debug_only_print_generated_code = ["wasm-bindgen-macro/xxx_debug_only_print_generated_code"] [dependencies] -wasm-bindgen-macro = { path = "crates/macro", version = "=0.2.22" } +wasm-bindgen-macro = { path = "crates/macro", version = "=0.2.23" } serde = { version = "1.0", optional = true } serde_json = { version = "1.0", optional = true } [target.'cfg(target_arch = "wasm32")'.dev-dependencies] -js-sys = { path = 'crates/js-sys', version = '0.2.7' } -wasm-bindgen-test = { path = 'crates/test', version = '=0.2.22' } +js-sys = { path = 'crates/js-sys', version = '0.3.0' } +wasm-bindgen-test = { path = 'crates/test', version = '=0.2.23' } serde_derive = "1.0" wasm-bindgen-test-crate-a = { path = 'tests/crates/a', version = '0.1' } wasm-bindgen-test-crate-b = { path = 'tests/crates/b', version = '0.1' } diff --git a/crates/backend/Cargo.toml b/crates/backend/Cargo.toml index 4e7ac823..ae740148 100644 --- a/crates/backend/Cargo.toml +++ b/crates/backend/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasm-bindgen-backend" -version = "0.2.22" +version = "0.2.23" authors = ["The wasm-bindgen Developers"] license = "MIT/Apache-2.0" repository = "https://github.com/rustwasm/wasm-bindgen/tree/master/crates/backend" @@ -21,4 +21,4 @@ proc-macro2 = "0.4.8" quote = '0.6' serde_json = "1.0" syn = { version = '0.15', features = ['full', 'visit'] } -wasm-bindgen-shared = { path = "../shared", version = "=0.2.22" } +wasm-bindgen-shared = { path = "../shared", version = "=0.2.23" } diff --git a/crates/cli-support/Cargo.toml b/crates/cli-support/Cargo.toml index a9242d13..34f191c8 100644 --- a/crates/cli-support/Cargo.toml +++ b/crates/cli-support/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasm-bindgen-cli-support" -version = "0.2.22" +version = "0.2.23" authors = ["The wasm-bindgen Developers"] license = "MIT/Apache-2.0" repository = "https://github.com/rustwasm/wasm-bindgen/tree/master/crates/cli-support" @@ -17,6 +17,6 @@ parity-wasm = "0.32" serde = "1.0" serde_json = "1.0" tempfile = "3.0" -wasm-bindgen-shared = { path = "../shared", version = '=0.2.22' } -wasm-bindgen-wasm-interpreter = { path = "../wasm-interpreter", version = '=0.2.22' } +wasm-bindgen-shared = { path = "../shared", version = '=0.2.23' } +wasm-bindgen-wasm-interpreter = { path = "../wasm-interpreter", version = '=0.2.23' } wasm-gc-api = "0.1.9" diff --git a/crates/cli/Cargo.toml b/crates/cli/Cargo.toml index 3759678d..78867a68 100644 --- a/crates/cli/Cargo.toml +++ b/crates/cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasm-bindgen-cli" -version = "0.2.22" +version = "0.2.23" authors = ["The wasm-bindgen Developers"] license = "MIT/Apache-2.0" repository = "https://github.com/rustwasm/wasm-bindgen/tree/master/crates/cli" @@ -23,8 +23,8 @@ rouille = { version = "2.1.0", default-features = false } serde = "1.0" serde_derive = "1.0" serde_json = "1.0" -wasm-bindgen-cli-support = { path = "../cli-support", version = "=0.2.22" } -wasm-bindgen-shared = { path = "../shared", version = "=0.2.22" } +wasm-bindgen-cli-support = { path = "../cli-support", version = "=0.2.23" } +wasm-bindgen-shared = { path = "../shared", version = "=0.2.23" } openssl = { version = '0.10.11', optional = true } [features] diff --git a/crates/futures/Cargo.toml b/crates/futures/Cargo.toml index ef3cabb9..51daf1a4 100644 --- a/crates/futures/Cargo.toml +++ b/crates/futures/Cargo.toml @@ -7,12 +7,12 @@ license = "MIT/Apache-2.0" name = "wasm-bindgen-futures" repository = "https://github.com/rustwasm/wasm-bindgen/tree/master/crates/futures" readme = "./README.md" -version = "0.2.22" +version = "0.3.0" [dependencies] futures = "0.1.20" -js-sys = { path = "../js-sys", version = '0.2.7' } -wasm-bindgen = { path = "../..", version = '0.2.22' } +js-sys = { path = "../js-sys", version = '0.3.0' } +wasm-bindgen = { path = "../..", version = '0.2.23' } [target.'cfg(target_arch = "wasm32")'.dev-dependencies] -wasm-bindgen-test = { path = '../test', version = '0.2.22' } +wasm-bindgen-test = { path = '../test', version = '0.2.23' } diff --git a/crates/js-sys/Cargo.toml b/crates/js-sys/Cargo.toml index 4c0e4e21..799023a6 100644 --- a/crates/js-sys/Cargo.toml +++ b/crates/js-sys/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "js-sys" -version = "0.2.7" +version = "0.3.0" authors = ["The wasm-bindgen Developers"] readme = "./README.md" categories = ["wasm"] @@ -18,9 +18,9 @@ test = false doctest = false [dependencies] -wasm-bindgen = { path = "../..", version = "0.2.22" } +wasm-bindgen = { path = "../..", version = "0.2.23" } [target.'cfg(target_arch = "wasm32")'.dev-dependencies] futures = "0.1.20" -wasm-bindgen-test = { path = '../test', version = '=0.2.22' } -wasm-bindgen-futures = { path = '../futures', version = '=0.2.22' } +wasm-bindgen-test = { path = '../test', version = '=0.2.23' } +wasm-bindgen-futures = { path = '../futures', version = '=0.3.0' } diff --git a/crates/macro-support/Cargo.toml b/crates/macro-support/Cargo.toml index 3ccc3687..1a57bc5d 100644 --- a/crates/macro-support/Cargo.toml +++ b/crates/macro-support/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasm-bindgen-macro-support" -version = "0.2.22" +version = "0.2.23" authors = ["The wasm-bindgen Developers"] license = "MIT/Apache-2.0" repository = "https://github.com/rustwasm/wasm-bindgen/tree/master/crates/macro-support" @@ -18,5 +18,5 @@ extra-traits = ["syn/extra-traits"] syn = { version = '0.15.0', features = ['full'] } quote = '0.6' proc-macro2 = "0.4.9" -wasm-bindgen-backend = { path = "../backend", version = "=0.2.22" } -wasm-bindgen-shared = { path = "../shared", version = "=0.2.22" } +wasm-bindgen-backend = { path = "../backend", version = "=0.2.23" } +wasm-bindgen-shared = { path = "../shared", version = "=0.2.23" } diff --git a/crates/macro/Cargo.toml b/crates/macro/Cargo.toml index 7910786a..82303e25 100644 --- a/crates/macro/Cargo.toml +++ b/crates/macro/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasm-bindgen-macro" -version = "0.2.22" +version = "0.2.23" authors = ["The wasm-bindgen Developers"] license = "MIT/Apache-2.0" repository = "https://github.com/rustwasm/wasm-bindgen/tree/master/crates/macro" @@ -18,5 +18,5 @@ spans = ["wasm-bindgen-macro-support/spans"] xxx_debug_only_print_generated_code = [] [dependencies] -wasm-bindgen-macro-support = { path = "../macro-support", version = "=0.2.22" } +wasm-bindgen-macro-support = { path = "../macro-support", version = "=0.2.23" } quote = "0.6" diff --git a/crates/shared/Cargo.toml b/crates/shared/Cargo.toml index 90cd4ba0..64218771 100644 --- a/crates/shared/Cargo.toml +++ b/crates/shared/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasm-bindgen-shared" -version = "0.2.22" +version = "0.2.23" authors = ["The wasm-bindgen Developers"] license = "MIT/Apache-2.0" repository = "https://github.com/rustwasm/wasm-bindgen/tree/master/crates/shared" diff --git a/crates/test-macro/Cargo.toml b/crates/test-macro/Cargo.toml index 8c819257..2eadab37 100644 --- a/crates/test-macro/Cargo.toml +++ b/crates/test-macro/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasm-bindgen-test-macro" -version = "0.2.22" +version = "0.2.23" authors = ["The wasm-bindgen Developers"] description = "Internal testing macro for wasm-bindgen" license = "MIT/Apache-2.0" diff --git a/crates/test/Cargo.toml b/crates/test/Cargo.toml index 248c1cdb..75a1bd0c 100644 --- a/crates/test/Cargo.toml +++ b/crates/test/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasm-bindgen-test" -version = "0.2.22" +version = "0.2.23" authors = ["The wasm-bindgen Developers"] description = "Internal testing crate for wasm-bindgen" license = "MIT/Apache-2.0" @@ -9,11 +9,11 @@ repository = "https://github.com/rustwasm/wasm-bindgen" [dependencies] console_error_panic_hook = '0.1' futures = "0.1" -js-sys = { path = '../js-sys', version = '0.2.7' } +js-sys = { path = '../js-sys', version = '0.3.0' } scoped-tls = "0.1" -wasm-bindgen = { path = '../..', version = '0.2.22' } -wasm-bindgen-futures = { path = '../futures', version = '0.2.22' } -wasm-bindgen-test-macro = { path = '../test-macro', version = '=0.2.22' } +wasm-bindgen = { path = '../..', version = '0.2.23' } +wasm-bindgen-futures = { path = '../futures', version = '0.3.0' } +wasm-bindgen-test-macro = { path = '../test-macro', version = '=0.2.23' } [lib] test = false diff --git a/crates/wasm-interpreter/Cargo.toml b/crates/wasm-interpreter/Cargo.toml index e9efbadf..54355749 100644 --- a/crates/wasm-interpreter/Cargo.toml +++ b/crates/wasm-interpreter/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasm-bindgen-wasm-interpreter" -version = "0.2.22" +version = "0.2.23" authors = ["The wasm-bindgen Developers"] license = "MIT/Apache-2.0" repository = "https://github.com/rustwasm/wasm-bindgen/tree/master/crates/wasm-interpreter" diff --git a/crates/web-sys/Cargo.toml b/crates/web-sys/Cargo.toml index 9d8868bd..14fc26c6 100644 --- a/crates/web-sys/Cargo.toml +++ b/crates/web-sys/Cargo.toml @@ -20,13 +20,13 @@ wasm-bindgen-webidl = { path = "../webidl", version = "=0.2.17" } sourcefile = "0.1" [dependencies] -wasm-bindgen = { path = "../..", version = "0.2.22" } -js-sys = { path = '../js-sys', version = '0.2.7' } +wasm-bindgen = { path = "../..", version = "0.2.23" } +js-sys = { path = '../js-sys', version = '0.3.0' } [target.'cfg(target_arch = "wasm32")'.dev-dependencies] futures = "0.1" -wasm-bindgen-test = { path = '../test', version = '0.2.22' } -wasm-bindgen-futures = { path = '../futures', version = '0.2.22' } +wasm-bindgen-test = { path = '../test', version = '0.2.23' } +wasm-bindgen-futures = { path = '../futures', version = '0.3.0' } # This list is generated by passing `__WASM_BINDGEN_DUMP_FEATURES=foo` when # compiling this crate which dumps the total list of features to a file called diff --git a/crates/webidl/Cargo.toml b/crates/webidl/Cargo.toml index 658c7947..a12cb201 100644 --- a/crates/webidl/Cargo.toml +++ b/crates/webidl/Cargo.toml @@ -19,5 +19,5 @@ log = "0.4.1" proc-macro2 = "0.4.8" quote = '0.6' syn = { version = '0.15', features = ['full'] } -wasm-bindgen-backend = { version = "=0.2.22", path = "../backend" } +wasm-bindgen-backend = { version = "=0.2.23", path = "../backend" } weedle = "0.8" diff --git a/publish.rs b/publish.rs index 6afa8b16..27703510 100644 --- a/publish.rs +++ b/publish.rs @@ -27,13 +27,13 @@ const CRATES_TO_PUBLISH: &[&str] = &[ "wasm-bindgen-test", "wasm-bindgen-test-macro", "wasm-bindgen-wasm-interpreter", + "wasm-bindgen-webidl", + "web-sys", ]; const CRATES_TO_AVOID_PUBLISH: &[&str] = &[ // We'll publish these when they're ready one day "wasm-bindgen-typescript", - "web-sys", - "wasm-bindgen-webidl", // These are internal crates, unlikely to ever be published "ui-tests", From 4c766c5c7a6a833adec61e6bc40593f1b6e2a727 Mon Sep 17 00:00:00 2001 From: Nick Fitzgerald Date: Wed, 26 Sep 2018 07:37:51 -0700 Subject: [PATCH 2/3] Start `web-sys` at 0.3.0 --- crates/web-sys/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/web-sys/Cargo.toml b/crates/web-sys/Cargo.toml index 14fc26c6..695ec45d 100644 --- a/crates/web-sys/Cargo.toml +++ b/crates/web-sys/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "web-sys" -version = "0.1.0" +version = "0.3.0" authors = ["The wasm-bindgen Developers"] readme = "./README.md" homepage = "https://rustwasm.github.io/wasm-bindgen/web-sys/index.html" From e0f47935dbc8a3faa316f8f03c12b9f2d13f10df Mon Sep 17 00:00:00 2001 From: Nick Fitzgerald Date: Wed, 26 Sep 2018 07:43:57 -0700 Subject: [PATCH 3/3] changelog: Note that this is the first web-sys release --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 716881c4..0c9fad63 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -38,6 +38,9 @@ Released 2018-09-26. ### Added +* [This is the first release of the `web-sys` + crate!](https://rustwasm.github.io/2018/09/26/announcing-web-sys.html) + * Added support for unions of interfaces and non-interfaces in the WebIDL frontend.