Skip to content
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
02ad075
time: add `ignore-wasm` to failing wasm tests
lblack00 Aug 16, 2025
12e4572
task: add `ignore-wasm` to failing wasm tests
lblack00 Aug 16, 2025
3dfbeb3
sync: add `ignore-wasm` to failing wasm tests
lblack00 Aug 16, 2025
94c0796
runtime: add `ignore-wasm` to failing wasm tests
lblack00 Aug 16, 2025
92cb650
tokio|io|macros: add remaining `ignore-wasm` to failing doctests
lblack00 Aug 16, 2025
5a37a0b
ci: unpin rust version for wasm tests
lblack00 Aug 16, 2025
9a1484e
ci: update cfgs for WASI test tokio
lblack00 Aug 23, 2025
ab2a5f5
tokio|tokio-stream|tokio-util - ignore failing wasm tests
lblack00 Aug 23, 2025
6eaff54
Merge branch 'master' into ignore-failed-time-wasm-tests
lblack00 Aug 23, 2025
6dc771d
test: revert changes to `macros_type_mismatch.stderr`
lblack00 Aug 23, 2025
5bf9656
stream: revert annotations and utilize `futures::executor::block_on`
lblack00 Sep 2, 2025
e0762b6
ci|tokio: add `RUSTDOCFLAGS` and ignore subsequently failed tests
lblack00 Sep 3, 2025
2ea3529
stream: use `current_thread` flavor instead of `futures::executor::bl…
lblack00 Sep 3, 2025
f0df0a1
stream|util: revert and update `util` and `stream` annotations
lblack00 Sep 5, 2025
58f199e
util: lower memory allocated for `sync_bridge.rs` doctest
lblack00 Sep 5, 2025
8e453ba
revert most annotations and re-enable tests, overhaul formatting
lblack00 Sep 9, 2025
5ada932
add back annotations to conflicting test failures
lblack00 Sep 10, 2025
c7dc325
Merge branch 'master' into ignore-failed-time-wasm-tests
lblack00 Sep 11, 2025
a86c483
minor inconsistencies in formatting
lblack00 Sep 11, 2025
82afcd2
partially enable tests with conditional compilation
lblack00 Sep 22, 2025
8c7c68e
merge master
lblack00 Sep 22, 2025
6b5c4ee
partially enable `sync::oneshot::Receiver<T>::blocking_recv` test
lblack00 Sep 25, 2025
34ee661
Merge branch 'master' into ignore-failed-time-wasm-tests
lblack00 Sep 25, 2025
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
13 changes: 8 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1055,10 +1055,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Install Rust 1.88.0
- name: Install Rust ${{ env.rust_stable }}
uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.88.0
toolchain: ${{ env.rust_stable }}
- name: Install wasm-pack
uses: taiki-e/install-action@wasm-pack

Expand All @@ -1078,10 +1078,10 @@ jobs:
- wasm32-wasip1-threads
steps:
- uses: actions/checkout@v4
- name: Install Rust 1.88.0
- name: Install Rust ${{ env.rust_stable }}
uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.88.0
toolchain: ${{ env.rust_stable }}
targets: ${{ matrix.target }}

# Install dependencies
Expand All @@ -1092,11 +1092,14 @@ jobs:

- uses: Swatinem/rust-cache@v2
- name: WASI test tokio full
run: cargo test -p tokio --target ${{ matrix.target }} --features full
run: cargo test -p tokio --target ${{ matrix.target }} --features "sync,macros,io-util,rt,time"
env:
CARGO_TARGET_WASM32_WASIP1_RUNNER: "wasmtime run --"
CARGO_TARGET_WASM32_WASIP1_THREADS_RUNNER: "wasmtime run -W bulk-memory=y -W threads=y -S threads=y --"
RUSTFLAGS: --cfg tokio_unstable -Dwarnings -C target-feature=+atomics,+bulk-memory -C link-args=--max-memory=67108864
# in order to run doctests for unstable features, we must also pass
# the unstable cfg to RustDoc
RUSTDOCFLAGS: --cfg tokio_unstable

- name: WASI test tokio-util full
run: cargo test -p tokio-util --target ${{ matrix.target }} --features full
Expand Down
3 changes: 3 additions & 0 deletions tokio-stream/src/empty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ unsafe impl<T> Sync for Empty<T> {}
/// ```
/// use tokio_stream::{self as stream, StreamExt};
///
/// # /*
/// #[tokio::main]
/// # */
/// # #[tokio::main(flavor = "current_thread")]
/// async fn main() {
/// let mut none = stream::empty::<i32>();
///
Expand Down
3 changes: 3 additions & 0 deletions tokio-stream/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@
//! ```rust
//! use tokio_stream::{self as stream, StreamExt};
//!
//! # /*
//! #[tokio::main]
//! # */
//! # #[tokio::main(flavor = "current_thread")]
//! async fn main() {
//! let mut stream = stream::iter(vec![0, 1, 2]);
//!
Expand Down
3 changes: 3 additions & 0 deletions tokio-stream/src/once.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ impl<I> Unpin for Once<I> {}
/// ```
/// use tokio_stream::{self as stream, StreamExt};
///
/// # /*
/// #[tokio::main]
/// # */
/// # #[tokio::main(flavor = "current_thread")]
/// async fn main() {
/// // one is the loneliest number
/// let mut one = stream::once(1);
Expand Down
3 changes: 3 additions & 0 deletions tokio-stream/src/stream_close.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ pin_project! {
/// ```
/// use tokio_stream::{StreamExt, StreamMap, StreamNotifyClose};
///
/// # /*
/// #[tokio::main]
/// # */
/// # #[tokio::main(flavor = "current_thread")]
/// async fn main() {
/// let mut map = StreamMap::new();
/// let stream = StreamNotifyClose::new(tokio_stream::iter(vec![0, 1]));
Expand Down
49 changes: 31 additions & 18 deletions tokio-stream/src/stream_ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ pub trait StreamExt: Stream {
/// # Examples
///
/// ```
/// # #[tokio::main]
/// # #[tokio::main(flavor = "current_thread")]
/// # async fn main() {
/// use tokio_stream::{self as stream, StreamExt};
///
Expand Down Expand Up @@ -171,8 +171,9 @@ pub trait StreamExt: Stream {
/// # Examples
///
/// ```
/// # #[tokio::main]
/// # #[tokio::main(flavor = "current_thread")]
/// # async fn main() {
///
/// use tokio_stream::{self as stream, StreamExt};
///
/// let mut stream = stream::iter(vec![Ok(1), Ok(2), Err("nope")]);
Expand Down Expand Up @@ -203,7 +204,7 @@ pub trait StreamExt: Stream {
/// # Examples
///
/// ```
/// # #[tokio::main]
/// # #[tokio::main(flavor = "current_thread")]
/// # async fn main() {
/// use tokio_stream::{self as stream, StreamExt};
///
Expand Down Expand Up @@ -239,7 +240,7 @@ pub trait StreamExt: Stream {
/// # Examples
///
/// ```
/// # #[tokio::main]
/// # #[tokio::main(flavor = "current_thread")]
/// # async fn main() {
/// use tokio_stream::{self as stream, StreamExt};
///
Expand Down Expand Up @@ -283,7 +284,7 @@ pub trait StreamExt: Stream {
/// # Examples
///
/// ```
/// # #[tokio::main]
/// # #[tokio::main(flavor = "current_thread")]
/// # async fn main() {
/// use tokio_stream::{self as stream, StreamExt};
///
Expand Down Expand Up @@ -418,7 +419,7 @@ pub trait StreamExt: Stream {
/// # Examples
///
/// ```
/// # #[tokio::main]
/// # #[tokio::main(flavor = "current_thread")]
/// # async fn main() {
/// use tokio_stream::{self as stream, StreamExt};
///
Expand Down Expand Up @@ -454,7 +455,7 @@ pub trait StreamExt: Stream {
///
/// # Examples
/// ```
/// # #[tokio::main]
/// # #[tokio::main(flavor = "current_thread")]
/// # async fn main() {
/// use tokio_stream::{self as stream, StreamExt};
///
Expand Down Expand Up @@ -514,7 +515,10 @@ pub trait StreamExt: Stream {
/// }
/// }
///
/// # /*
/// #[tokio::main]
/// # */
/// # #[tokio::main(flavor = "current_thread")]
/// async fn main() {
/// let mut stream = Alternate { state: 0 };
///
Expand Down Expand Up @@ -551,7 +555,7 @@ pub trait StreamExt: Stream {
/// # Examples
///
/// ```
/// # #[tokio::main]
/// # #[tokio::main(flavor = "current_thread")]
/// # async fn main() {
/// use tokio_stream::{self as stream, StreamExt};
///
Expand Down Expand Up @@ -580,7 +584,7 @@ pub trait StreamExt: Stream {
/// # Examples
///
/// ```
/// # #[tokio::main]
/// # #[tokio::main(flavor = "current_thread")]
/// # async fn main() {
/// use tokio_stream::{self as stream, StreamExt};
///
Expand All @@ -606,7 +610,7 @@ pub trait StreamExt: Stream {
/// # Examples
///
/// ```
/// # #[tokio::main]
/// # #[tokio::main(flavor = "current_thread")]
/// # async fn main() {
/// use tokio_stream::{self as stream, StreamExt};
///
Expand Down Expand Up @@ -637,7 +641,7 @@ pub trait StreamExt: Stream {
/// # Examples
///
/// ```
/// # #[tokio::main]
/// # #[tokio::main(flavor = "current_thread")]
/// # async fn main() {
/// use tokio_stream::{self as stream, StreamExt};
/// let mut stream = stream::iter(vec![1,2,3,4,1]).skip_while(|x| *x < 3);
Expand Down Expand Up @@ -680,7 +684,7 @@ pub trait StreamExt: Stream {
/// Basic usage:
///
/// ```
/// # #[tokio::main]
/// # #[tokio::main(flavor = "current_thread")]
/// # async fn main() {
/// use tokio_stream::{self as stream, StreamExt};
///
Expand All @@ -695,7 +699,7 @@ pub trait StreamExt: Stream {
/// Stopping at the first `false`:
///
/// ```
/// # #[tokio::main]
/// # #[tokio::main(flavor = "current_thread")]
/// # async fn main() {
/// use tokio_stream::{self as stream, StreamExt};
///
Expand Down Expand Up @@ -739,7 +743,7 @@ pub trait StreamExt: Stream {
/// Basic usage:
///
/// ```
/// # #[tokio::main]
/// # #[tokio::main(flavor = "current_thread")]
/// # async fn main() {
/// use tokio_stream::{self as stream, StreamExt};
///
Expand All @@ -754,7 +758,7 @@ pub trait StreamExt: Stream {
/// Stopping at the first `true`:
///
/// ```
/// # #[tokio::main]
/// # #[tokio::main(flavor = "current_thread")]
/// # async fn main() {
/// use tokio_stream::{self as stream, StreamExt};
///
Expand Down Expand Up @@ -787,7 +791,10 @@ pub trait StreamExt: Stream {
/// ```
/// use tokio_stream::{self as stream, StreamExt};
///
/// # /*
/// #[tokio::main]
/// # */
/// # #[tokio::main(flavor = "current_thread")]
/// async fn main() {
/// let one = stream::iter(vec![1, 2, 3]);
/// let two = stream::iter(vec![4, 5, 6]);
Expand Down Expand Up @@ -823,7 +830,7 @@ pub trait StreamExt: Stream {
/// # Examples
/// Basic usage:
/// ```
/// # #[tokio::main]
/// # #[tokio::main(flavor = "current_thread")]
/// # async fn main() {
/// use tokio_stream::{self as stream, *};
///
Expand Down Expand Up @@ -874,7 +881,10 @@ pub trait StreamExt: Stream {
/// ```
/// use tokio_stream::{self as stream, StreamExt};
///
/// # /*
/// #[tokio::main]
/// # */
/// # #[tokio::main(flavor = "current_thread")]
/// async fn main() {
/// let doubled: Vec<i32> =
/// stream::iter(vec![1, 2, 3])
Expand All @@ -891,7 +901,10 @@ pub trait StreamExt: Stream {
/// ```
/// use tokio_stream::{self as stream, StreamExt};
///
/// # /*
/// #[tokio::main]
/// # */
/// # #[tokio::main(flavor = "current_thread")]
/// async fn main() {
/// // A stream containing only `Ok` values will be collected
/// let values: Result<Vec<i32>, &str> =
Expand Down Expand Up @@ -945,7 +958,7 @@ pub trait StreamExt: Stream {
/// Suppose we have a stream `int_stream` that yields 3 numbers (1, 2, 3):
///
/// ```
/// # #[tokio::main]
/// # #[tokio::main(flavor = "current_thread")]
/// # async fn main() {
/// use tokio_stream::{self as stream, StreamExt};
/// use std::time::Duration;
Expand Down Expand Up @@ -1031,7 +1044,7 @@ pub trait StreamExt: Stream {
/// Suppose we have a stream `int_stream` that yields 3 numbers (1, 2, 3):
///
/// ```
/// # #[tokio::main]
/// # #[tokio::main(flavor = "current_thread")]
/// # async fn main() {
/// use tokio_stream::{self as stream, StreamExt};
/// use std::time::Duration;
Expand Down
6 changes: 6 additions & 0 deletions tokio-stream/src/stream_map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,10 @@ use std::task::{ready, Context, Poll};
/// use tokio::sync::mpsc;
/// use std::pin::Pin;
///
/// # /*
/// #[tokio::main]
/// # */
/// # #[tokio::main(flavor = "current_thread")]
/// async fn main() {
/// let (tx1, mut rx1) = mpsc::channel::<usize>(10);
/// let (tx2, mut rx2) = mpsc::channel::<usize>(10);
Expand Down Expand Up @@ -185,7 +188,10 @@ use std::task::{ready, Context, Poll};
/// ```
/// use tokio_stream::{StreamExt, StreamMap, StreamNotifyClose};
///
/// # /*
/// #[tokio::main]
/// # */
/// # #[tokio::main(flavor = "current_thread")]
/// async fn main() {
/// let mut map = StreamMap::new();
/// let stream = StreamNotifyClose::new(tokio_stream::iter(vec![0, 1]));
Expand Down
2 changes: 1 addition & 1 deletion tokio-stream/src/wrappers/tcp_listener.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use tokio::net::{TcpListener, TcpStream};
///
/// Accept connections from both IPv4 and IPv6 listeners in the same loop:
///
/// ```no_run
/// ```no_run,ignore-wasm
/// use std::net::{Ipv4Addr, Ipv6Addr};
///
/// use tokio::net::TcpListener;
Expand Down
6 changes: 3 additions & 3 deletions tokio-stream/src/wrappers/watch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use tokio::sync::watch::error::RecvError;
/// # Examples
///
/// ```
/// # #[tokio::main]
/// # #[tokio::main(flavor = "current_thread")]
/// # async fn main() {
/// use tokio_stream::{StreamExt, wrappers::WatchStream};
/// use tokio::sync::watch;
Expand All @@ -33,7 +33,7 @@ use tokio::sync::watch::error::RecvError;
/// ```
///
/// ```
/// # #[tokio::main]
/// # #[tokio::main(flavor = "current_thread")]
/// # async fn main() {
/// use tokio_stream::{StreamExt, wrappers::WatchStream};
/// use tokio::sync::watch;
Expand All @@ -51,7 +51,7 @@ use tokio::sync::watch::error::RecvError;
/// Example with [`WatchStream<T>::from_changes`]:
///
/// ```
/// # #[tokio::main]
/// # #[tokio::main(flavor = "current_thread")]
/// # async fn main() {
/// use futures::future::FutureExt;
/// use tokio::sync::watch;
Expand Down
Loading
Loading