Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bytes feature of aead is not re-exported by AEADs #600

Closed
davepollack opened this issue Apr 11, 2024 · 1 comment · Fixed by #631
Closed

bytes feature of aead is not re-exported by AEADs #600

davepollack opened this issue Apr 11, 2024 · 1 comment · Fixed by #631

Comments

@davepollack
Copy link
Contributor

Hi,

I have a BytesMut given to me by quinn-proto, that I would like to use as a Buffer with chacha20poly1305. The impl of Buffer for BytesMut is gated behind the bytes feature.

However I cannot specify features = ["bytes"] with chacha20poly1305, as its Cargo.toml (and I think other AEADs) does not re-export the feature. This seems to be inconsistent with other similar features like heapless and arrayvec that are re-exported.

Currently I've added aead with features = ["bytes"] to my Cargo.toml to union in the feature, which isn't too bad, but I'm wondering if this is an oversight.

Cheers

@tarcieri
Copy link
Member

Yeah, we can potentially add passthroughs for this like we have for heapless

tarcieri pushed a commit that referenced this issue Sep 27, 2024
This allows you to use a `BytesMut` as a `Buffer` with
`chacha20poly1305` (or other AEADs) by only including `chacha20poly1305`
in your Cargo.toml and not also having to include `aead` in your
Cargo.toml. This is similar to how `heapless` and `arrayvec` currently
have feature passthroughs.

Fixes #600
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 a pull request may close this issue.

2 participants