Skip to content

digest-io-async: initial commit - #1518

Open
baloo wants to merge 1 commit into
RustCrypto:masterfrom
baloo:push-kxltlypsyruw
Open

digest-io-async: initial commit#1518
baloo wants to merge 1 commit into
RustCrypto:masterfrom
baloo:push-kxltlypsyruw

Conversation

@baloo

@baloo baloo commented Aug 15, 2026

Copy link
Copy Markdown
Member

This introduces a new crate providing HashReader/HashWriter wrappers implementing AsyncRead/AsyncWrite, mirroring digest-io's sync API.

This only implement the tokio's async API for now, and it is gated behind a tokio feature.

The intent is to fold it in digest-io when the
AsyncReader/AsyncWriter eventually make their way into std.

@baloo

baloo commented Aug 15, 2026

Copy link
Copy Markdown
Member Author

This is a follow up on #1517

This introduces a new crate providing `HashReader`/`HashWriter`
wrappers implementing `AsyncRead`/`AsyncWrite`, mirroring `digest-io`'s
sync API.

This only implement the tokio's async API for now, and it is gated 
behind a `tokio` feature.

The intent is to fold it in `digest-io` when the
`AsyncReader`/`AsyncWriter` eventually make their way into `std`.
@baloo
baloo force-pushed the push-kxltlypsyruw branch from 41d3d1f to 33ba71a Compare August 15, 2026 01:07

@newpavlov newpavlov left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks as a fine addition to me. I will leave the final approval to @tarcieri since I (thankfully) barely deal with async Rust code.

@@ -0,0 +1,25 @@
Copyright (c) 2025 The RustCrypto Project Developers

@newpavlov newpavlov Aug 15, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change the year to 2026.

tokio-util = { version = "0.7", features = ["io"] }

[features]
tokio = ["dep:tokio", "dep:pin-project-lite"]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can remove the tokio crate feature for now. If we are to add support for other executors we could bring it back in a future breaking release.

Comment thread Cargo.toml
"ctutils",
"cpufeatures",
"dbl",
"digest-io",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

digest-io was intentionally excluded from the workspace (see below). Do the same for digest-io-async.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants