Skip to content

Commit 435e16e

Browse files
authored
Merge pull request #1 from rustwasm/master
Pull Latest
2 parents 68a1519 + 7fd6702 commit 435e16e

File tree

154 files changed

+2972
-2275
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

154 files changed

+2972
-2275
lines changed

CHANGELOG.md

+60-12
Original file line numberDiff line numberDiff line change
@@ -2,33 +2,81 @@
22

33
--------------------------------------------------------------------------------
44

5-
## Unreleased
5+
## 0.2.50
66

7-
Released YYYY-MM-DD.
7+
Released 2019-08-19.
88

99
### Added
1010

11-
* TODO (or remove section if none)
11+
* Experimental support with a `WASM_INTERFACE_TYPES=1` environment variable has
12+
been added to emit a Wasm Interface Types custom section, making the output of
13+
`wasm-bindgen` a single standalone WebAssembly file.
14+
[#1725](https://github.com/rustwasm/wasm-bindgen/pull/1725)
1215

13-
### Changed
16+
### Fixed
1417

15-
* TODO (or remove section if none)
18+
* Unrelated errors are now no longer accidentally swallowed by the
19+
`instantiateStreaming` fallback.
20+
[#1723](https://github.com/rustwasm/wasm-bindgen/pull/1723)
1621

17-
### Deprecated
22+
--------------------------------------------------------------------------------
1823

19-
* TODO (or remove section if none)
24+
## 0.2.49
2025

21-
### Removed
26+
Released 2019-08-14.
27+
28+
### Added
29+
30+
* Add binding for `Element.getElementsByClassName`.
31+
[#1665](https://github.com/rustwasm/wasm-bindgen/pull/1665)
32+
33+
* `PartialEq` and `Eq` are now implementd for all `web-sys` types.
34+
[#1673](https://github.com/rustwasm/wasm-bindgen/pull/1673)
35+
36+
* The `wasm-bindgen-futures` crate now has support for futures when the
37+
experimental WebAssembly threading feature is enabled.
38+
[#1514](https://github.com/rustwasm/wasm-bindgen/pull/1514)
39+
40+
* A new `enable-interning` feature is available to intern strings and reduce the
41+
cost of transferring strings across the JS/Rust boundary.
42+
[#1612](https://github.com/rustwasm/wasm-bindgen/pull/1612)
43+
44+
* The `wasm-bindgen` CLI has experimental support for reading native
45+
`webidl-bindings` custom sections and generating JS glue. This support is in
46+
addition to Rust's own custom sections and allows using `wasm-bindgen` with
47+
binaries produced by other than rustc possibly.
48+
[#1690](https://github.com/rustwasm/wasm-bindgen/pull/1690)
49+
50+
* New environment variables have been added to configure webdriver startup
51+
arguments.
52+
[#1703](https://github.com/rustwasm/wasm-bindgen/pull/1703)
53+
54+
* New `JsValue::{is_truthy,is_falsy}` methods are now available.
55+
[#1638](https://github.com/rustwasm/wasm-bindgen/pull/1638)
56+
57+
### Changed
58+
59+
* JS import shims are now skipped again when they are unnecessary.
60+
[#1654](https://github.com/rustwasm/wasm-bindgen/pull/1654)
2261

23-
* TODO (or remove section if none)
62+
* WebAssembly output files now directly embed the module/name for imports if
63+
supported for the target and the import, reducing JS shims even further.
64+
[#1689](https://github.com/rustwasm/wasm-bindgen/pull/1689)
2465

2566
### Fixed
2667

27-
* TODO (or remove section if none)
68+
* Support for threads have been updated for LLVM 9 and nightly Rust.
69+
[#1675](https://github.com/rustwasm/wasm-bindgen/pull/1675)
70+
[#1688](https://github.com/rustwasm/wasm-bindgen/pull/1688)
2871

29-
### Security
72+
* The `anyref` passes in `wasm-bindgen` have seen a number of fixes to improve
73+
their correctness and get the full test suite running.
74+
[#1692](https://github.com/rustwasm/wasm-bindgen/pull/1692)
75+
[#1704](https://github.com/rustwasm/wasm-bindgen/pull/1704)
3076

31-
* TODO (or remove section if none)
77+
* Support for `futures-preview 0.3.0-alpha.18` has been added to
78+
`wasm-bindgen-futures`.
79+
[#1716](https://github.com/rustwasm/wasm-bindgen/pull/1716)
3280

3381
--------------------------------------------------------------------------------
3482

Cargo.toml

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "wasm-bindgen"
3-
version = "0.2.48"
3+
version = "0.2.50"
44
authors = ["The wasm-bindgen Developers"]
55
license = "MIT/Apache-2.0"
66
readme = "README.md"
@@ -36,14 +36,14 @@ strict-macro = ["wasm-bindgen-macro/strict-macro"]
3636
xxx_debug_only_print_generated_code = ["wasm-bindgen-macro/xxx_debug_only_print_generated_code"]
3737

3838
[dependencies]
39-
wasm-bindgen-macro = { path = "crates/macro", version = "=0.2.48" }
39+
wasm-bindgen-macro = { path = "crates/macro", version = "=0.2.50" }
4040
serde = { version = "1.0", optional = true }
4141
serde_json = { version = "1.0", optional = true }
4242
cfg-if = "0.1.9"
4343

4444
[target.'cfg(target_arch = "wasm32")'.dev-dependencies]
45-
js-sys = { path = 'crates/js-sys', version = '0.3.25' }
46-
wasm-bindgen-test = { path = 'crates/test', version = '=0.2.48' }
45+
js-sys = { path = 'crates/js-sys', version = '0.3.27' }
46+
wasm-bindgen-test = { path = 'crates/test', version = '=0.3.0' }
4747
serde_derive = "1.0"
4848
wasm-bindgen-test-crate-a = { path = 'tests/crates/a', version = '0.1' }
4949
wasm-bindgen-test-crate-b = { path = 'tests/crates/b', version = '0.1' }

_package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"serve": "webpack-dev-server -p"
55
},
66
"devDependencies": {
7-
"@wasm-tool/wasm-pack-plugin": "0.4.2",
7+
"@wasm-tool/wasm-pack-plugin": "1.0.1",
88
"html-webpack-plugin": "^3.2.0",
99
"text-encoding": "^0.7.0",
1010
"webpack": "^4.29.4",

azure-pipelines.yml

+40-5
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ jobs:
99
displayName: "Run wasm-bindgen crate tests (unix)"
1010
steps:
1111
- template: ci/azure-install-rust.yml
12+
# TODO: switch this back to `stable` when async/await is stable
13+
parameters:
14+
toolchain: nightly
1215
- template: ci/azure-install-node.yml
1316
- template: ci/azure-install-geckodriver.yml
1417
- template: ci/azure-install-sccache.yml
@@ -18,8 +21,6 @@ jobs:
1821
displayName: "Crate test suite"
1922
- script: WASM_BINDGEN_NO_DEBUG=1 cargo test --target wasm32-unknown-unknown
2023
displayName: "Crate test suite (no debug)"
21-
- script: NODE_ARGS=/dev/null WASM_BINDGEN_ANYREF=1 cargo test --target wasm32-unknown-unknown --test wasm
22-
displayName: "Anyref test suite builds"
2324
- script: cargo test --target wasm32-unknown-unknown --features serde-serialize
2425
displayName: "Crate test suite (with serde)"
2526
- script: cargo test --target wasm32-unknown-unknown --features enable-interning
@@ -30,13 +31,29 @@ jobs:
3031
displayName: "Futures test suite on native"
3132
- script: cargo test -p wasm-bindgen-futures --target wasm32-unknown-unknown
3233
displayName: "Futures test suite on wasm"
34+
- script: |
35+
set -e
36+
curl https://nodejs.org/download/nightly/v13.0.0-nightly2019081215b2d13310/node-v13.0.0-nightly2019081215b2d13310-linux-x64.tar.xz | tar xJf -
37+
echo "##vso[task.prependpath]$PWD/node-v13.0.0-nightly2019081215b2d13310-linux-x64/bin"
38+
echo "##vso[task.setvariable variable=NODE_ARGS]--experimental-wasm-anyref,--experimental-wasm-bulk_memory"
39+
echo "##vso[task.setvariable variable=WASM_BINDGEN_ANYREF]1"
40+
displayName: "Install a custom node.js and configure anyref"
41+
- script: cargo test --target wasm32-unknown-unknown --test wasm
42+
displayName: "(anyref) Crate test suite"
43+
- script: WASM_BINDGEN_NO_DEBUG=1 cargo test --target wasm32-unknown-unknown --test wasm
44+
displayName: "(anyref) Crate test suite (no debug)"
45+
- script: cargo test --target wasm32-unknown-unknown --features serde-serialize --test wasm
46+
displayName: "(anyref) Crate test suite (with serde)"
3347

3448
- job: test_wasm_bindgen_windows
3549
displayName: "Run wasm-bindgen crate tests (Windows)"
3650
pool:
3751
vmImage: vs2017-win2016
3852
steps:
3953
- template: ci/azure-install-rust.yml
54+
# TODO: switch this back to `stable` when async/await is stable
55+
parameters:
56+
toolchain: nightly
4057
- template: ci/azure-install-node.yml
4158
- template: ci/azure-install-geckodriver.yml
4259
- template: ci/azure-install-sccache.yml
@@ -80,6 +97,9 @@ jobs:
8097
displayName: "Run web-sys crate tests"
8198
steps:
8299
- template: ci/azure-install-rust.yml
100+
# TODO: switch this back to `stable` when async/await is stable
101+
parameters:
102+
toolchain: nightly
83103
- template: ci/azure-install-node.yml
84104
- template: ci/azure-install-geckodriver.yml
85105
- template: ci/azure-install-sccache.yml
@@ -93,6 +113,9 @@ jobs:
93113
displayName: "Run js-sys crate tests"
94114
steps:
95115
- template: ci/azure-install-rust.yml
116+
# TODO: switch this back to `stable` when async/await is stable
117+
parameters:
118+
toolchain: nightly
96119
- template: ci/azure-install-node.yml
97120
- template: ci/azure-install-geckodriver.yml
98121
- template: ci/azure-install-sccache.yml
@@ -102,6 +125,9 @@ jobs:
102125
displayName: "Run wasm-bindgen-webidl crate tests"
103126
steps:
104127
- template: ci/azure-install-rust.yml
128+
# TODO: switch this back to `stable` when async/await is stable
129+
parameters:
130+
toolchain: nightly
105131
- template: ci/azure-install-node.yml
106132
#- template: ci/azure-install-sccache.yml
107133
- script: cargo test -p wasm-bindgen-webidl
@@ -113,8 +139,9 @@ jobs:
113139
displayName: "Run UI tests"
114140
steps:
115141
- template: ci/azure-install-rust.yml
142+
# TODO: switch this back to `stable` when async/await is stable
116143
parameters:
117-
toolchain: beta
144+
toolchain: nightly
118145
- template: ci/azure-install-node.yml
119146
- template: ci/azure-install-sccache.yml
120147
- script: cargo test -p wasm-bindgen-macro
@@ -145,6 +172,9 @@ jobs:
145172
displayName: "Build almost all examples"
146173
steps:
147174
- template: ci/azure-install-rust.yml
175+
# TODO: switch this back to `stable` when async/await is stable
176+
parameters:
177+
toolchain: nightly
148178
- template: ci/azure-install-sccache.yml
149179
- template: ci/azure-install-wasm-pack.yml
150180
- script: mv _package.json package.json && npm install && rm package.json
@@ -166,7 +196,7 @@ jobs:
166196
steps:
167197
- template: ci/azure-install-rust.yml
168198
parameters:
169-
toolchain: nightly-2019-06-13
199+
toolchain: nightly-2019-08-27
170200
- template: ci/azure-install-sccache.yml
171201
- script: rustup component add rust-src
172202
displayName: "install rust-src"
@@ -187,6 +217,9 @@ jobs:
187217
displayName: "Build benchmarks"
188218
steps:
189219
- template: ci/azure-install-rust.yml
220+
# TODO: switch this back to `stable` when async/await is stable
221+
parameters:
222+
toolchain: nightly
190223
- template: ci/azure-install-sccache.yml
191224
- template: ci/azure-install-wasm-pack.yml
192225
- script: wasm-pack build --target web benchmarks
@@ -252,7 +285,6 @@ jobs:
252285
- job: doc_book
253286
displayName: "Doc - build the book"
254287
steps:
255-
- template: ci/azure-install-rust.yml
256288
- script: |
257289
set -e
258290
curl -L https://github.com/rust-lang-nursery/mdBook/releases/download/v0.3.0/mdbook-v0.3.0-x86_64-unknown-linux-gnu.tar.gz | tar xzf -
@@ -268,6 +300,9 @@ jobs:
268300
displayName: "Doc - build the API documentation"
269301
steps:
270302
- template: ci/azure-install-rust.yml
303+
# TODO: switch this back to `stable` when async/await is stable
304+
parameters:
305+
toolchain: nightly
271306
# Install rustfmt so we can format the web-sys bindings
272307
- script: rustup component add rustfmt
273308
displayName: "Install rustfmt"

ci/azure-install-sccache.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
steps:
22
- bash: |
33
set -ex
4-
curl -L https://github.com/mozilla/sccache/releases/download/0.2.8/sccache-0.2.8-x86_64-unknown-linux-musl.tar.gz | tar xzf -
5-
sccache=`pwd`/sccache-0.2.8-x86_64-unknown-linux-musl/sccache
4+
curl -L https://github.com/mozilla/sccache/releases/download/0.2.10/sccache-0.2.10-x86_64-unknown-linux-musl.tar.gz | tar xzf -
5+
sccache=`pwd`/sccache-0.2.10-x86_64-unknown-linux-musl/sccache
66
echo "##vso[task.setvariable variable=RUSTC_WRAPPER;]$sccache"
77
displayName: Install sccache - Linux
88
condition: eq( variables['Agent.OS'], 'Linux' )
99
1010
- bash: |
1111
set -ex
1212
brew install [email protected]
13-
curl -L https://github.com/mozilla/sccache/releases/download/0.2.8/sccache-0.2.8-x86_64-apple-darwin.tar.gz | tar xzf -
14-
sccache=`pwd`/sccache-0.2.8-x86_64-apple-darwin/sccache
13+
curl -L https://github.com/mozilla/sccache/releases/download/0.2.10/sccache-0.2.10-x86_64-apple-darwin.tar.gz | tar xzf -
14+
sccache=`pwd`/sccache-0.2.10-x86_64-apple-darwin/sccache
1515
echo "##vso[task.setvariable variable=RUSTC_WRAPPER;]$sccache"
1616
displayName: Install sccache - Darwin
1717
condition: eq( variables['Agent.OS'], 'Darwin' )
1818
1919
- powershell: |
20-
Invoke-WebRequest https://github.com/mozilla/sccache/releases/download/0.2.8/sccache-0.2.8-x86_64-pc-windows-msvc.tar.gz -OutFile sccache.tar.gz
20+
Invoke-WebRequest https://github.com/mozilla/sccache/releases/download/0.2.10/sccache-0.2.10-x86_64-pc-windows-msvc.tar.gz -OutFile sccache.tar.gz
2121
tar xzf sccache.tar.gz
22-
Write-Host "##vso[task.setvariable variable=RUSTC_WRAPPER;]$pwd/sccache-0.2.8-x86_64-pc-windows-msvc/sccache.exe"
22+
Write-Host "##vso[task.setvariable variable=RUSTC_WRAPPER;]$pwd/sccache-0.2.10-x86_64-pc-windows-msvc/sccache.exe"
2323
displayName: Install sccache - Windows
2424
condition: eq( variables['Agent.OS'], 'Windows_NT' )
2525

crates/anyref-xform/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "wasm-bindgen-anyref-xform"
3-
version = "0.2.48"
3+
version = "0.2.50"
44
authors = ["The wasm-bindgen Developers"]
55
license = "MIT/Apache-2.0"
66
repository = "https://github.com/rustwasm/wasm-bindgen/tree/master/crates/anyref-xform"
@@ -13,4 +13,4 @@ edition = '2018'
1313

1414
[dependencies]
1515
failure = "0.1"
16-
walrus = "0.8.0"
16+
walrus = "0.11.0"

0 commit comments

Comments
 (0)