Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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 @@ -988,10 +988,10 @@ jobs:
features: "macros sync time rt"
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 @@ -1011,10 +1011,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 @@ -1025,11 +1025,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
10 changes: 5 additions & 5 deletions tokio-stream/src/empty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ unsafe impl<T> Sync for Empty<T> {}
/// ```
/// use tokio_stream::{self as stream, StreamExt};
///
/// #[tokio::main]
/// async fn main() {
/// let mut none = stream::empty::<i32>();
/// # #[tokio::main(flavor = "current_thread")]
/// # async fn main() {
/// let mut none = stream::empty::<i32>();
///
/// assert_eq!(None, none.next().await);
/// }
/// assert_eq!(None, none.next().await);
/// # }
/// ```
pub const fn empty<T>() -> Empty<T> {
Empty(PhantomData)
Expand Down
12 changes: 6 additions & 6 deletions tokio-stream/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@
//! ```rust
//! use tokio_stream::{self as stream, StreamExt};
//!
//! #[tokio::main]
//! async fn main() {
//! let mut stream = stream::iter(vec![0, 1, 2]);
//! # #[tokio::main(flavor = "current_thread")]
//! # async fn main() {
//! let mut stream = stream::iter(vec![0, 1, 2]);
//!
//! while let Some(value) = stream.next().await {
//! println!("Got {}", value);
//! }
//! while let Some(value) = stream.next().await {
//! println!("Got {}", value);
//! }
//! # }
//! ```
//!
//! # Returning a Stream from a function
Expand Down
16 changes: 8 additions & 8 deletions tokio-stream/src/once.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@ impl<I> Unpin for Once<I> {}
/// ```
/// use tokio_stream::{self as stream, StreamExt};
///
/// #[tokio::main]
/// async fn main() {
/// // one is the loneliest number
/// let mut one = stream::once(1);
/// # #[tokio::main(flavor = "current_thread")]
/// # async fn main() {
/// // one is the loneliest number
/// let mut one = stream::once(1);
///
/// assert_eq!(Some(1), one.next().await);
/// assert_eq!(Some(1), one.next().await);
///
/// // just one, that's all we get
/// assert_eq!(None, one.next().await);
/// }
/// // just one, that's all we get
/// assert_eq!(None, one.next().await);
/// # }
/// ```
pub fn once<T>(value: T) -> Once<T> {
Once {
Expand Down
24 changes: 12 additions & 12 deletions tokio-stream/src/stream_close.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,20 @@ pin_project! {
/// ```
/// use tokio_stream::{StreamExt, StreamMap, StreamNotifyClose};
///
/// #[tokio::main]
/// async fn main() {
/// let mut map = StreamMap::new();
/// let stream = StreamNotifyClose::new(tokio_stream::iter(vec![0, 1]));
/// let stream2 = StreamNotifyClose::new(tokio_stream::iter(vec![0, 1]));
/// map.insert(0, stream);
/// map.insert(1, stream2);
/// while let Some((key, val)) = map.next().await {
/// match val {
/// Some(val) => println!("got {val:?} from stream {key:?}"),
/// None => println!("stream {key:?} closed"),
/// }
/// # #[tokio::main(flavor = "current_thread")]
/// # async fn main() {
/// let mut map = StreamMap::new();
/// let stream = StreamNotifyClose::new(tokio_stream::iter(vec![0, 1]));
/// let stream2 = StreamNotifyClose::new(tokio_stream::iter(vec![0, 1]));
/// map.insert(0, stream);
/// map.insert(1, stream2);
/// while let Some((key, val)) = map.next().await {
/// match val {
/// Some(val) => println!("got {val:?} from stream {key:?}"),
/// None => println!("stream {key:?} closed"),
/// }
/// }
/// # }
/// ```
#[must_use = "streams do nothing unless polled"]
pub struct StreamNotifyClose<S> {
Expand Down
Loading
Loading