mirror of
https://github.com/rustwasm/wasm-bindgen.git
synced 2024-11-28 05:52:21 +03:00
269c491380
* Gate `web-sys` APIs on activated features Currently the compile times of `web-sys` are unfortunately prohibitive, increasing the barrier to using it. This commit updates the crate to instead have all APIs gated by a set of Cargo features which affect what bindings are generated at compile time (and which are then compiled by rustc). It's significantly faster to activate only a handful of features vs all thousand of them! A magical env var is added to print the list of all features that should be generated, and then necessary logic is added to ferry features from the build script to the webidl crate which then uses that as a filter to remove items after parsing. Currently parsing is pretty speedy so we'll unconditionally parse all WebIDL files, but this may change in the future! For now this will make the `web-sys` crate a bit less ergonomic to use as lots of features will need to be specified, but it should make it much more approachable in terms of first-user experience with compile times. * Fix AppVeyor testing web-sys * FIx a typo * Udpate feature listings from rebase conflicts * Add some crate docs and such
59 lines
1.8 KiB
YAML
59 lines
1.8 KiB
YAML
environment:
|
|
global:
|
|
RUSTFLAGS: -Zunstable-options -Ctarget-feature=+crt-static
|
|
RUST_BACKTRACE: 1
|
|
CARGO_INCREMENTAL: 0 # should turn this back on when fixed!
|
|
matrix:
|
|
- TARGET: x86_64-pc-windows-msvc
|
|
DEPLOY: 1
|
|
|
|
install:
|
|
- ps: Install-Product node 10
|
|
- appveyor-retry appveyor DownloadFile https://win.rustup.rs/ -FileName rustup-init.exe
|
|
- rustup-init.exe -y --default-host x86_64-pc-windows-msvc --default-toolchain nightly
|
|
- set PATH=%PATH%;C:\Users\appveyor\.cargo\bin
|
|
- rustc -V
|
|
- cargo -V
|
|
|
|
build: false
|
|
|
|
test_script:
|
|
- rustup target add wasm32-unknown-unknown
|
|
- npm install
|
|
- cargo test
|
|
- cargo build --release -p wasm-bindgen-cli
|
|
- where chromedriver
|
|
- set CHROMEDRIVER=C:\Tools\WebDriver\chromedriver.exe
|
|
- cargo test -p js-sys --target wasm32-unknown-unknown
|
|
- cargo test --manifest-path crates/web-sys/Cargo.toml --target wasm32-unknown-unknown --all-features
|
|
- cargo test -p webidl-tests --target wasm32-unknown-unknown
|
|
|
|
branches:
|
|
only:
|
|
- master
|
|
- /^\d/
|
|
|
|
before_deploy:
|
|
- ps: |
|
|
$NAME = "wasm-bindgen-${env:APPVEYOR_REPO_TAG_NAME}-${env:TARGET}"
|
|
New-Item -Path $NAME -ItemType directory
|
|
Copy-Item target/release/wasm-bindgen.exe "${NAME}/"
|
|
Copy-Item target/release/wasm2es6js.exe "${NAME}/"
|
|
Copy-Item target/release/wasm-bindgen-test-runner.exe "${NAME}/"
|
|
Copy-Item LICENSE-MIT "${NAME}/"
|
|
Copy-Item LICENSE-APACHE "${NAME}/"
|
|
Copy-Item README.md "${NAME}/"
|
|
7z a -ttar "${NAME}.tar" "${NAME}"
|
|
7z a "${NAME}.tar.gz" "${NAME}.tar"
|
|
Push-AppveyorArtifact "${NAME}.tar.gz"
|
|
|
|
deploy:
|
|
artifact: /.*\.tar.gz/
|
|
auth_token:
|
|
secure: dtHSvbZkdAFtL0J5YrSw8DpxjfYuHWgqD1SupmJT/yfYSjEBiX55RFXRoqBM2tx1
|
|
description: ''
|
|
on:
|
|
appveyor_repo_tag: true
|
|
provider: GitHub
|
|
|