feat(io): make bytes optional#750
Merged
Berrysoft merged 4 commits intocompio-rs:masterfrom Mar 10, 2026
Merged
Conversation
e700a53 to
0533c6e
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR makes the bytes integration in compio-io feature-gated so consumers can build without pulling in bytes via compio-buf, while keeping the previous behavior enabled by default.
Changes:
- Gate
framed::codec::bytesandBytesFramedbehind a newbytesfeature (enabled by default). - Update
compio-io’s dependency oncompio-bufto no longer always enable itsbytesfeature. - Replace
bytes-trait-based length encoding/decoding inLengthDelimitedwith astd::io::Write-based approach.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 8 comments.
| File | Description |
|---|---|
| compio-io/src/framed/mod.rs | Adds a BytesFramed alias behind feature = "bytes" and updates docs/imports accordingly. |
| compio-io/src/framed/frame.rs | Reworks LengthDelimited header encoding/decoding to avoid bytes traits. |
| compio-io/src/framed/codec/mod.rs | Gates the bytes codec module behind feature = "bytes". |
| compio-io/Cargo.toml | Removes unconditional compio-buf/bytes dependency feature and introduces a bytes feature (default-on). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
7bcf228 to
9d5c55f
Compare
Berrysoft
reviewed
Mar 10, 2026
Berrysoft
reviewed
Mar 10, 2026
391e0f7 to
80979f9
Compare
Member
Author
|
Just to clarify on the panicking: By default bytes' |
03ed564 to
e1c3990
Compare
e1c3990 to
5d08d9f
Compare
Berrysoft
reviewed
Mar 10, 2026
Co-authored-by: Yuyi Wang <Strawberry_Str@hotmail.com>
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.