From e45be1826d0118f8eb569d5a4c626864babcc889 Mon Sep 17 00:00:00 2001 From: Dan Draper Date: Sat, 2 May 2026 19:35:49 +1000 Subject: [PATCH 1/2] chore: prepare 0.1.0 release for crates.io - Update Cargo.toml description so it reflects both NEON and AVX2 paths (was "NEON encode on aarch64") and includes decode support; add `homepage` field; add `[package.metadata.docs.rs]` so docs.rs renders the per-arch entry points (NeonEncoder, Avx2Encoder) cleanly across both x86_64 and aarch64 builds. - Mark `DecodeError` as `#[non_exhaustive]` so future error variants are not a breaking change. Doing this on the first publish is cheap; doing it later requires a major version bump. - Add CHANGELOG.md with an initial 0.1.0 entry following Keep a Changelog conventions. Verified `cargo package --list` and `cargo publish --dry-run`: 18 files, 38 KiB compressed, no warnings. The xlsx/mise.toml/DS_Store excludes are working. --- CHANGELOG.md | 29 +++++++++++++++++++++++++++++ Cargo.toml | 11 ++++++++++- src/lib.rs | 4 ++++ 3 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..ff3dcf1 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,29 @@ +# Changelog + +All notable changes to this crate are documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), +and this crate adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [Unreleased] + +## [0.1.0] - 2026-05-02 + +Initial release. + +- `encode(&[u8]) -> String` and `decode(&str) -> Result, DecodeError>`, + byte-for-byte compatible with the `base85` crate v2.0.0 on the success path. +- aarch64 NEON-accelerated encode (4 blocks/iter) and decode (4 blocks/iter, + ~10× the reference scalar throughput on Apple M-series). +- x86_64 AVX2-accelerated encode and decode (8 blocks/iter), with runtime + feature detection and scalar fallback for hosts lacking AVX2. +- Portable scalar implementation for other architectures. +- Strict overflow detection: 5-character blocks whose value exceeds `u32::MAX` + return `DecodeError::Overflow` rather than silently wrapping (release) or + panicking (debug) as the reference does. +- Diagnostic `DecodeError` enum with byte positions; marked `#[non_exhaustive]` + for forward-compatibility. +- MSRV: Rust 1.85. + +[Unreleased]: https://github.com/cipherstash/base85-simd/compare/v0.1.0...HEAD +[0.1.0]: https://github.com/cipherstash/base85-simd/releases/tag/v0.1.0 diff --git a/Cargo.toml b/Cargo.toml index e09f537..87b3e17 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,14 +3,23 @@ name = "base85-simd" version = "0.1.0" edition = "2024" rust-version = "1.85" -description = "Fast base85 (RFC 1924 / Z85-style) encoder and decoder, with a NEON SIMD encode path on aarch64." +description = "Fast base85 (RFC 1924 / Z85-style) encoder and decoder, with SIMD on aarch64 (NEON) and x86_64 (AVX2)." license = "MIT OR Apache-2.0" repository = "https://github.com/cipherstash/base85-simd" +homepage = "https://github.com/cipherstash/base85-simd" readme = "README.md" keywords = ["base85", "ascii85", "simd", "neon", "encoding"] categories = ["encoding"] exclude = ["*.xlsx", ".DS_Store", "mise.toml"] +[package.metadata.docs.rs] +# Build docs for both SIMD targets so the per-arch entry points +# (NeonEncoder / Avx2Encoder, etc.) all render. docs.rs's default +# x86_64-unknown-linux-gnu picks up the AVX2 path; we add aarch64 +# so the NEON path is also documented in the rendered output. +targets = ["x86_64-unknown-linux-gnu", "aarch64-unknown-linux-gnu"] +rustdoc-args = ["--cfg", "docsrs"] + [dependencies] [dev-dependencies] diff --git a/src/lib.rs b/src/lib.rs index de6eab4..ef0ca09 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -18,7 +18,11 @@ use block::{decode_block, decode_tail, encode_block, encode_tail}; use std::fmt; /// Errors returned by [`decode`]. +/// +/// Marked `#[non_exhaustive]` — match arms must include `_ => …` so future +/// additions don't break downstream code. #[derive(Debug, Clone, PartialEq, Eq)] +#[non_exhaustive] pub enum DecodeError { /// The input contained a byte that is not part of the base85 alphabet. InvalidChar { From 26c61a9a3777838c16026d6471cf59c936474c01 Mon Sep 17 00:00:00 2001 From: Dan Draper Date: Sat, 2 May 2026 19:49:41 +1000 Subject: [PATCH 2/2] chore: add author field to Cargo.toml --- Cargo.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/Cargo.toml b/Cargo.toml index 87b3e17..9a52971 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,6 +3,7 @@ name = "base85-simd" version = "0.1.0" edition = "2024" rust-version = "1.85" +authors = ["Dan Draper "] description = "Fast base85 (RFC 1924 / Z85-style) encoder and decoder, with SIMD on aarch64 (NEON) and x86_64 (AVX2)." license = "MIT OR Apache-2.0" repository = "https://github.com/cipherstash/base85-simd"