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

Default all async support to std::future #1741

Merged
merged 1 commit into from
Sep 5, 2019
Merged
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
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ cfg-if = "0.1.9"

[target.'cfg(target_arch = "wasm32")'.dev-dependencies]
js-sys = { path = 'crates/js-sys', version = '0.3.27' }
wasm-bindgen-test = { path = 'crates/test', version = '=0.2.50' }
wasm-bindgen-test = { path = 'crates/test', version = '=0.3.0' }
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' }
Expand Down
30 changes: 27 additions & 3 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ jobs:
displayName: "Run wasm-bindgen crate tests (unix)"
steps:
- template: ci/azure-install-rust.yml
# TODO: switch this back to `stable` when async/await is stable
parameters:
toolchain: nightly
- template: ci/azure-install-node.yml
- template: ci/azure-install-geckodriver.yml
- template: ci/azure-install-sccache.yml
Expand Down Expand Up @@ -48,6 +51,9 @@ jobs:
vmImage: vs2017-win2016
steps:
- template: ci/azure-install-rust.yml
# TODO: switch this back to `stable` when async/await is stable
parameters:
toolchain: nightly
- template: ci/azure-install-node.yml
- template: ci/azure-install-geckodriver.yml
- template: ci/azure-install-sccache.yml
Expand Down Expand Up @@ -91,6 +97,9 @@ jobs:
displayName: "Run web-sys crate tests"
steps:
- template: ci/azure-install-rust.yml
# TODO: switch this back to `stable` when async/await is stable
parameters:
toolchain: nightly
- template: ci/azure-install-node.yml
- template: ci/azure-install-geckodriver.yml
- template: ci/azure-install-sccache.yml
Expand All @@ -104,6 +113,9 @@ jobs:
displayName: "Run js-sys crate tests"
steps:
- template: ci/azure-install-rust.yml
# TODO: switch this back to `stable` when async/await is stable
parameters:
toolchain: nightly
- template: ci/azure-install-node.yml
- template: ci/azure-install-geckodriver.yml
- template: ci/azure-install-sccache.yml
Expand All @@ -113,6 +125,9 @@ jobs:
displayName: "Run wasm-bindgen-webidl crate tests"
steps:
- template: ci/azure-install-rust.yml
# TODO: switch this back to `stable` when async/await is stable
parameters:
toolchain: nightly
- template: ci/azure-install-node.yml
#- template: ci/azure-install-sccache.yml
- script: cargo test -p wasm-bindgen-webidl
Expand All @@ -124,8 +139,9 @@ jobs:
displayName: "Run UI tests"
steps:
- template: ci/azure-install-rust.yml
# TODO: switch this back to `stable` when async/await is stable
parameters:
toolchain: beta
toolchain: nightly
- template: ci/azure-install-node.yml
- template: ci/azure-install-sccache.yml
- script: cargo test -p wasm-bindgen-macro
Expand Down Expand Up @@ -156,6 +172,9 @@ jobs:
displayName: "Build almost all examples"
steps:
- template: ci/azure-install-rust.yml
# TODO: switch this back to `stable` when async/await is stable
parameters:
toolchain: nightly
- template: ci/azure-install-sccache.yml
- template: ci/azure-install-wasm-pack.yml
- script: mv _package.json package.json && npm install && rm package.json
Expand All @@ -177,7 +196,7 @@ jobs:
steps:
- template: ci/azure-install-rust.yml
parameters:
toolchain: nightly-2019-07-30
toolchain: nightly-2019-08-27
- template: ci/azure-install-sccache.yml
- script: rustup component add rust-src
displayName: "install rust-src"
Expand All @@ -198,6 +217,9 @@ jobs:
displayName: "Build benchmarks"
steps:
- template: ci/azure-install-rust.yml
# TODO: switch this back to `stable` when async/await is stable
parameters:
toolchain: nightly
- template: ci/azure-install-sccache.yml
- template: ci/azure-install-wasm-pack.yml
- script: wasm-pack build --target web benchmarks
Expand Down Expand Up @@ -263,7 +285,6 @@ jobs:
- job: doc_book
displayName: "Doc - build the book"
steps:
- template: ci/azure-install-rust.yml
- script: |
set -e
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 -
Expand All @@ -279,6 +300,9 @@ jobs:
displayName: "Doc - build the API documentation"
steps:
- template: ci/azure-install-rust.yml
# TODO: switch this back to `stable` when async/await is stable
parameters:
toolchain: nightly
# Install rustfmt so we can format the web-sys bindings
- script: rustup component add rustfmt
displayName: "Install rustfmt"
Expand Down
12 changes: 3 additions & 9 deletions crates/futures/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,13 @@ 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.3.27"
version = "0.4.0"
edition = "2018"

[dependencies]
cfg-if = "0.1.9"
futures = "0.1.20"
js-sys = { path = "../js-sys", version = '0.3.27' }
wasm-bindgen = { path = "../..", version = '0.2.50' }
futures-util-preview = { version = "0.3.0-alpha.18", optional = true }
futures-channel-preview = { version = "0.3.0-alpha.18", optional = true }
lazy_static = { version = "1.3.0", optional = true }

[target.'cfg(target_feature = "atomics")'.dependencies.web-sys]
path = "../web-sys"
Expand All @@ -28,7 +24,5 @@ features = [
]

[target.'cfg(target_arch = "wasm32")'.dev-dependencies]
wasm-bindgen-test = { path = '../test', version = '0.2.50' }

[features]
futures_0_3 = ["futures-util-preview", "futures-channel-preview", "lazy_static"]
wasm-bindgen-test = { path = '../test', version = '0.3.0' }
futures-channel-preview = { version = "0.3.0-alpha.18" }
Loading