Skip to content

feat(buf): add support for memmap2#684

Merged
Berrysoft merged 2 commits intocompio-rs:masterfrom
George-Miao:feat/buf/memmap2
Feb 14, 2026
Merged

feat(buf): add support for memmap2#684
Berrysoft merged 2 commits intocompio-rs:masterfrom
George-Miao:feat/buf/memmap2

Conversation

@George-Miao
Copy link
Member

No description provided.

Copilot AI review requested due to automatic review settings February 13, 2026 19:13
@George-Miao George-Miao self-assigned this Feb 13, 2026
@George-Miao George-Miao added enhancement New feature or request package: buf Related to compio-buf labels Feb 13, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request adds support for the memmap2 library to compio-buf by implementing the necessary buffer traits (IoBuf, IoBufMut, and SetLen) for memory-mapped types.

Changes:

  • Added memmap2 as an optional dependency with a corresponding feature flag
  • Implemented IoBuf trait for both memmap2::Mmap and memmap2::MmapMut
  • Implemented IoBufMut and SetLen traits for memmap2::MmapMut

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
compio-buf/Cargo.toml Added memmap2 0.9.9 as an optional dependency and created corresponding feature flag
compio-buf/src/lib.rs Added conditional re-export of memmap2 crate when feature is enabled
compio-buf/src/io_buf.rs Implemented IoBuf, IoBufMut, and SetLen traits for memmap2 types to enable use as IO buffers

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Berrysoft Berrysoft merged commit 74070d2 into compio-rs:master Feb 14, 2026
53 of 56 checks passed
@github-actions github-actions bot mentioned this pull request Feb 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request package: buf Related to compio-buf

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants