Migrate from bincode to rkyv v0.8.14 for memory-mapped serialization#20
Conversation
Co-authored-by: doublegate <6858123+doublegate@users.noreply.github.com>
Co-authored-by: doublegate <6858123+doublegate@users.noreply.github.com>
Co-authored-by: doublegate <6858123+doublegate@users.noreply.github.com>
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
doublegate
left a comment
There was a problem hiding this comment.
Reviewed / Approved - x9 file changes; migration from bincode to rkyv -- DG 1/24
There was a problem hiding this comment.
Pull request overview
This PR migrates from the deprecated bincode serialization library to rkyv v0.8.14 for memory-mapped scan result storage. The migration introduces a wrapper type (ScanResultRkyv) to handle types incompatible with rkyv's Archive trait, adds an 8-byte length prefix for alignment, and removes a dead documentation link.
Changes:
- Replace
bincodedependency withrkyvv0.8.14 across workspace and affected crates - Add
ScanResultRkyvwrapper struct with conversions to/fromScanResultfor rkyv compatibility - Implement length-prefixed serialization format with alignment handling via buffer copying
- Remove dead link to findsec.org in Phase 4 documentation
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| Cargo.toml | Replace bincode workspace dependency with rkyv 0.8.14 |
| Cargo.lock | Add rkyv and its dependencies, remove bincode |
| crates/prtip-core/Cargo.toml | Add rkyv dependency to core crate |
| crates/prtip-core/src/types.rs | Add ScanResultRkyv wrapper with Archive derives and conversions |
| crates/prtip-core/src/lib.rs | Export ScanResultRkyv type |
| crates/prtip-scanner/Cargo.toml | Replace bincode with rkyv (alloc feature) |
| crates/prtip-scanner/src/output/mmap_writer.rs | Update serialization to use rkyv with length prefixing |
| crates/prtip-scanner/src/output/mmap_reader.rs | Update deserialization with aligned buffer copying |
| docs/archive/19-PHASE4-ENHANCEMENTS.md | Remove dead findsec.org links |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
58ef878
into
dependabot/cargo/cargo-920260e05e
Replace deprecated
bincodedependency withrkyvv0.8.14 for memory-mapped scan result serialization. The migration addresses both the dependency update requirement and resolves a dead link in the Phase 4 documentation.Changes
Serialization Migration
bincode = "1.3"withrkyv = "0.8.14"in workspace and affected cratesScanResultRkyvwrapper struct to handle types incompatible with rkyv's Archive trait (DateTime<Utc>,Duration):mmap_writer.rsto userkyv::to_bytes()andmmap_reader.rsto userkyv::from_bytes()Documentation
docs/archive/19-PHASE4-ENHANCEMENTS.mdTrade-offs
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.