15
15
RUST_BACKTRACE : 1
16
16
# Change to specific Rust release to pin
17
17
rust_stable : stable
18
- rust_nightly : nightly-2023-10-21
18
+ rust_nightly : nightly-2024-05-05
19
19
rust_clippy : ' 1.77'
20
20
# When updating this, also update:
21
21
# - README.md
67
67
- x86_64-fortanix-unknown-sgx
68
68
- check-redox
69
69
- wasm32-unknown-unknown
70
- - wasm32-wasi
70
+ - wasm32-wasip1
71
71
- check-external-types
72
72
- check-fuzzing
73
73
- check-unstable-mt-counters
@@ -908,17 +908,22 @@ jobs:
908
908
run : wasm-pack test --node -- --features "macros sync"
909
909
working-directory : tokio
910
910
911
- wasm32-wasi :
912
- name : wasm32-wasi
911
+ wasm32-wasip1 :
912
+ name : ${{ matrix.target }}
913
913
needs : basics
914
914
runs-on : ubuntu-latest
915
+ strategy :
916
+ matrix :
917
+ target :
918
+ - wasm32-wasip1
919
+ - wasm32-wasip1-threads
915
920
steps :
916
921
- uses : actions/checkout@v4
917
922
- name : Install Rust ${{ env.rust_stable }}
918
923
uses : dtolnay/rust-toolchain@stable
919
924
with :
920
925
toolchain : ${{ env.rust_stable }}
921
- targets : wasm32-wasi
926
+ targets : ${{ matrix.target }}
922
927
923
928
# Install dependencies
924
929
- name : Install cargo-hack, wasmtime, and cargo-wasi
@@ -928,28 +933,40 @@ jobs:
928
933
929
934
- uses : Swatinem/rust-cache@v2
930
935
- name : WASI test tokio full
931
- run : cargo test -p tokio --target wasm32-wasi --features full
936
+ run : cargo test -p tokio --target ${{ matrix.target }} --features full
932
937
env :
933
- CARGO_TARGET_WASM32_WASI_RUNNER : " wasmtime run --"
934
- RUSTFLAGS : --cfg tokio_unstable -Dwarnings
938
+ CARGO_TARGET_WASM32_WASIP1_RUNNER : " wasmtime run --"
939
+ CARGO_TARGET_WASM32_WASIP1_THREADS_RUNNER : " wasmtime run -W bulk-memory=y -W threads=y -S threads=y --"
940
+ RUSTFLAGS : --cfg tokio_unstable -Dwarnings -C target-feature=+atomics,+bulk-memory -C link-args=--max-memory=67108864
935
941
936
942
- name : WASI test tokio-util full
937
- run : cargo test -p tokio-util --target wasm32-wasi --features full
943
+ run : cargo test -p tokio-util --target ${{ matrix.target }} --features full
938
944
env :
939
- CARGO_TARGET_WASM32_WASI_RUNNER : " wasmtime run --"
940
- RUSTFLAGS : --cfg tokio_unstable -Dwarnings
945
+ CARGO_TARGET_WASM32_WASIP1_RUNNER : " wasmtime run --"
946
+ CARGO_TARGET_WASM32_WASIP1_THREADS_RUNNER : " wasmtime run -W bulk-memory=y -W threads=y -S threads=y --"
947
+ RUSTFLAGS : --cfg tokio_unstable -Dwarnings -C target-feature=+atomics,+bulk-memory -C link-args=--max-memory=67108864
941
948
942
949
- name : WASI test tokio-stream
943
- run : cargo test -p tokio-stream --target wasm32-wasi --features time,net,io-util,sync
950
+ run : cargo test -p tokio-stream --target ${{ matrix.target }} --features time,net,io-util,sync
944
951
env :
945
- CARGO_TARGET_WASM32_WASI_RUNNER : " wasmtime run --"
946
- RUSTFLAGS : --cfg tokio_unstable -Dwarnings
952
+ CARGO_TARGET_WASM32_WASIP1_RUNNER : " wasmtime run --"
953
+ CARGO_TARGET_WASM32_WASIP1_THREADS_RUNNER : " wasmtime run -W bulk-memory=y -W threads=y -S threads=y --"
954
+ RUSTFLAGS : --cfg tokio_unstable -Dwarnings -C target-feature=+atomics,+bulk-memory -C link-args=--max-memory=67108864
947
955
948
956
- name : test tests-integration --features wasi-rt
949
957
# TODO: this should become: `cargo hack wasi test --each-feature`
950
958
run : cargo wasi test --test rt_yield --features wasi-rt
959
+ if : matrix.target == 'wasm32-wasip1'
951
960
working-directory : tests-integration
952
961
962
+ - name : test tests-integration --features wasi-threads-rt
963
+ run : cargo test --target ${{ matrix.target }} --features wasi-threads-rt
964
+ if : matrix.target == 'wasm32-wasip1-threads'
965
+ working-directory : tests-integration
966
+ env :
967
+ CARGO_TARGET_WASM32_WASIP1_THREADS_RUNNER : " wasmtime run -W bulk-memory=y -W threads=y -S threads=y --"
968
+ RUSTFLAGS : --cfg tokio_unstable -Dwarnings -C target-feature=+atomics,+bulk-memory -C link-args=--max-memory=67108864
969
+
953
970
check-external-types :
954
971
name : check-external-types (${{ matrix.os }})
955
972
needs : basics
@@ -978,6 +995,23 @@ jobs:
978
995
run : cargo check-external-types --all-features
979
996
working-directory : tokio
980
997
998
+ check-unexpected-lints-cfgs :
999
+ name : check unexpected lints and cfgs
1000
+ needs : basics
1001
+ runs-on : ubuntu-latest
1002
+ steps :
1003
+ - uses : actions/checkout@v4
1004
+ - name : Install Rust ${{ env.rust_nightly }}
1005
+ uses : dtolnay/rust-toolchain@master
1006
+ with :
1007
+ toolchain : ${{ env.rust_nightly }}
1008
+ - name : don't allow warnings
1009
+ run : sed -i '/#!\[allow(unknown_lints, unexpected_cfgs)\]/d' */src/lib.rs */tests/*.rs
1010
+ - name : check for unknown lints and cfgs
1011
+ run : cargo check --all-features --tests
1012
+ env :
1013
+ RUSTFLAGS : -Dwarnings --check-cfg=cfg(loom,tokio_unstable,tokio_taskdump,fuzzing,mio_unsupported_force_poll_poll,tokio_internal_mt_counters,fs,tokio_no_parking_lot,tokio_no_tuning_tests) -Funexpected_cfgs -Funknown_lints
1014
+
981
1015
check-fuzzing :
982
1016
name : check-fuzzing
983
1017
needs : basics
0 commit comments