v1.0.0 - Stable API #1
jamesgober
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
v1.0.0 - Stable API
wire-codecreaches 1.0. The public surface is now frozen: every type, trait,function signature, and observable behaviour will remain stable across the
entire 1.x line. Bug fixes, performance work, and additive features will
continue; breaking changes will not.
This release ships no new functionality on top of
0.9.0. The work in thisrelease is the polish that justifies the major version: a substantive
README rewrite, a cookbook in the API reference, a fuller crate-level
rustdoc block, and the final benchmark capture.
What 1.0 means
wire_codec,wire_codec::error,wire_codec::buf,wire_codec::traits,wire_codec::varint,wire_codec::zigzag,wire_codec::bitfield, andwire_codec::framingare locked. Their signatures will not change without a
2.0release.error variants on existing inputs, and bit ordering are locked.
identically by any 1.x version. A buffer produced by any 1.x version
will be decoded identically by 1.0.
What can still change in 1.x without a major release:
Errorvariants ([Error] is#[non_exhaustive]).LengthWidthvariants ([LengthWidth] is#[non_exhaustive]).not conflict with the existing API.
Documentation polish
explaining the design boundaries, a feature list with cross-links into
the API, four usage patterns (length-prefixed, delimited, varint +
zigzag, bit-packed records), a performance table, a stability
statement, a
no_stdand feature-flag table, and a project-layoutdiagram. The edition claim and version pin are corrected to match
reality.
docs/API.mdgains a 1.0 stability note in the introduction and anew "Cookbook" section with four recipes: append-only stream over a
growing buffer, fixed-output buffer with
BufferFullback-pressure,length-prefixed envelope around a structured record, and the
pre-sized-output hot-loop pattern.
src/lib.rsrewritten with a "When toreach for this crate" section, a module map table, a stability
section that mirrors the README, and a feature-flag table. Doctest in
the rustdoc block continues to pass.
Benchmark baseline at 1.0
Captured on the development machine (Windows 11, single thread, release
profile). Numbers will vary by hardware; these are the reference for
regression detection.
benches/codec.rsvarint::encode_u32(value 300)varint::encode_u32(u32::MAX)varint::decode_u32(2 bytes)varint::decode_u32(5 bytes)varint::encode_u64(u64::MAX)varint::decode_u64(10 bytes)zigzag::encode_i32(-1)zigzag::encode_i64(i64::MIN)ReadBuf::read_u32_beWriteBuf::write_u32_bebenches/framing.rsLengthPrefixed::write_frame(64 B)LengthPrefixed::next_frame(64 B)Delimited::next_frame(short line)Delimited::next_frame(1 KiB scan + CRLF)The linear byte-by-byte scan inside
Delimited::next_frameremains theobvious candidate for future SIMD acceleration in a 1.x release.
What did not change from 0.9.0
unchanged against 1.0.0.
one dev-only dependency (
proptest, capped at<1.6for MSRV 1.75).0.9.0 carry forward unchanged.
Verification
Built and tested green across the full directives matrix:
cargo build(default features)cargo build --no-default-featurescargo build --all-featurescargo +1.75 build --all-features --testscargo +1.75 test --all-featurescargo fmt --all -- --checkcargo clippy --all-targets --all-features -- -D warningscargo +1.75 clippy --all-targets --all-features -- -D warningsRUSTDOCFLAGS="-D warnings" cargo doc --no-deps --all-featurescargo bench --bench codeccargo bench --bench framingTest totals: 26 unit + 5 integration + 6 + 5 + 6 + 3 property + 3 smoke +
18 doctests = 72 tests green on both stable and MSRV 1.75.
Compatibility
20211.75proptest(test-only)Migration from 0.9.0
None required.
1.0.0is0.9.0plus documentation. Acargo update -p wire-codecis sufficient.If you are migrating from
0.5.0directly to1.0.0, the only APIchange is
framing::Delimited::newnow returnsResult<Delimited<'_>, Error>. See the 0.9.0 release note for themigration recipe.
Acknowledgements
wire-codecis published under the dual Apache-2.0 OR MIT license and isopen to contributions under the same terms. The supply chain is enforced
by
cargo auditandcargo denyin CI; the standards it adheres to arecaptured in
REPS.md.Full Changelog: v0.9.0...v1.0.0
This discussion was created from the release v1.0.0 - Stable API.
Beta Was this translation helpful? Give feedback.
All reactions