16 Commits
Author SHA1 Message Date
swaits ee40455c5f chore: repoint URLs at git.swaits.com and bump for release
CI / Test (1.93) (push) Canceled after 0s
CI / Test (stable) (push) Canceled after 0s
CI / Test (1.83, legacy-msrv) (push) Canceled after 0s
CI / Clippy (push) Canceled after 0s
CI / Format (push) Canceled after 0s
CI / Doc (push) Canceled after 0s
CI / Cargo Deny (push) Canceled after 0s
Rewrites remaining github.com / git.sr.ht references to git.swaits.com,
translating GitHub URL shapes to Gitea's (/blob/<ref>/ -> /src/branch/<ref>/,
/tree/<tag> -> /src/tag/<tag>, /actions/workflows/X -> /actions?workflow=X,
/edit/ -> /_edit/).

Left pointing at GitHub on purpose: pull-request links (PRs were not migrated)
and GitHub-only surfaces Gitea lacks (security advisories, discussions).
2026-08-31 17:58:39 -06:00
swaits 1eb7e09412 chore: point repository at git.swaits.com
CI / Test (1.93) (push) Canceled after 0s
CI / Test (stable) (push) Canceled after 0s
CI / Test (1.83, legacy-msrv) (push) Canceled after 0s
CI / Clippy (push) Canceled after 0s
CI / Format (push) Canceled after 0s
CI / Doc (push) Canceled after 0s
CI / Cargo Deny (push) Canceled after 0s
2026-08-31 17:19:24 -06:00
swaitsandClaude Opus 4.6 f805386bb8 chore: audit cleanup, CI, cargo-deny, encode fuzz target (0.3.4)
CI / Test (1.93) (push) Canceled after 0s
CI / Test (stable) (push) Canceled after 0s
CI / Test (1.83, legacy-msrv) (push) Canceled after 0s
CI / Clippy (push) Canceled after 0s
CI / Format (push) Canceled after 0s
CI / Doc (push) Canceled after 0s
CI / Cargo Deny (push) Canceled after 0s
Simplify encoder exit branch (−41 B code size), add GitHub Actions CI
with MSRV matrix, cargo-deny with permissive-only license policy,
encode-only fuzz target, and feature coverage across test gates.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 13:01:19 -06:00
swaitsandClaude Opus 4.6 f6778e20b8 fix: gate #[mutants::skip] behind cfg(test) for downstream compat (0.3.3)
The #[mutants::skip] proc macro from the mutants dev-dep was not available
to downstream users, causing compilation failure. Gate it with cfg_attr(test).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 10:24:05 -06:00
swaitsandClaude Opus 4.6 aa09783cdd test: 100% mutation kill rate, cargo-mutants v27, #[mutants::skip] (0.3.2)
89 mutants tested: 59 caught, 30 unviable (type system rejects them),
0 missed. Added mutants dev-dep for #[mutants::skip] on legacy-msrv
dead code. Upgraded cargo-mutants to v27.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 10:19:20 -06:00
swaitsandClaude Opus 4.6 b91fbb2ed9 test: mutation testing, block boundary tests, exact-fit decode tests (0.3.2)
Added cargo-mutants with 88 mutants tested, 59 caught, 0 missed. Added
targeted tests for 254-byte block boundary encoding (interop-verified)
and exact-fit/too-small decode buffer sizing for the batch zero path.
111 tests total (was 106).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 22:12:40 -06:00
swaitsandClaude Opus 4.6 777a37d4cd perf: decode rewrite, encode zeros optimization, iai-callgrind benchmarks (0.3.1)
Decode rewritten with shrinking-slice pattern (split_first/split_at)
instead of index arithmetic. Decode zeros 14% faster, decode nonzero
flips from 5% behind corncobs to 2% ahead, decode mixed closes to tied.

Encode zeros fast path moved before split_at — now tied with cobs
(was 6% behind). Code size reduced to 821B (was 869B).

Replaced criterion with iai-callgrind for deterministic instruction-count
benchmarks via Valgrind. Zero run-to-run variance. Expanded to 162
benchmarks across 9 sizes.

ucobs now wins or ties 16 of 18 benchmarks vs corncobs and cobs.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 21:43:06 -06:00
swaitsandClaude Opus 4.6 ff883d6f8e docs: update README benchmarks with fresh 7840U numbers and emoji indicators
Replace all N100 benchmark data with accurate 7840U results. Add emoji
legend (winner/loser/tie) to every comparison row. Update crate property
table, machine description, and recommendation prose to reflect current
competitive picture.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 16:30:05 -06:00
swaitsandClaude Opus 4.6 63ebaa0232 docs: document legacy-msrv feature in README and crate docs
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 00:39:48 -06:00
swaitsandClaude Opus 4.6 f4665a46cb chore: bump version to 0.3.0, add CHANGELOG
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 00:35:32 -06:00
swaitsandClaude Opus 4.6 92021a2608 feat: add legacy-msrv feature for Rust 1.83+ compat
Adds a `legacy-msrv` feature flag that replaces the const
copy_from_slice (Rust 1.93+) with a manual byte loop, allowing
the crate to compile on older toolchains like Xtensa.

All other optimizations (sub-slice scan, zero fast path, decode
batch fill) work on 1.83 without the feature.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 00:34:31 -06:00
swaitsandClaude Opus 4.6 adb0db7ee5 perf: major encode/decode optimization via const copy_from_slice and batch zero fill
Encode: rewrite to two-pass (scan + copy_from_slice) leveraging Rust 1.93's
const fn copy_from_slice for memcpy at runtime while keeping const fn encode.
Sub-slice scan pattern helps LLVM eliminate bounds checks. Added zero byte
fast path for all-zeros workloads. Now leads corncobs on nonzero/mixed encode.

Decode: batch consecutive 0x01 codes (all-zeros data) and fill zeros via
memset instead of per-byte loop. Decode zeros throughput jumps from ~1.2 GB/s
to ~4.6 GB/s, now 3x faster than corncobs on that workload.

Bump MSRV 1.83 → 1.93 for const copy_from_slice.
Update dev-deps: cobs 0.3→0.5, criterion 0.5→0.8, rand 0.8→0.10.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 23:00:33 -06:00
swaitsandClaude Opus 4.6 3d674989ab feat: const fn encode, decode optimization, comprehensive docs and examples
- Make `encode` const fn for compile-time COBS encoding (MSRV bumped to 1.83)
- Optimize decode by removing unnecessary branch in inner loop
- Add comprehensive rustdoc with examples for every function
- Add crate-level doc sections: quick start, buffer sizing, framing,
  stream parsing, compile-time encoding, error handling
- Expand README with decision matrix, examples section, testing depth
- Bump version to 0.2.0

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 18:31:41 -06:00
swaitsandClaude Opus 4.6 531f5311d8 docs: update README to use just commands instead of cargo
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 17:23:25 -06:00
swaitsandClaude Opus 4.6 a5e3e5f63b feat: add benchmarks, justfile, optimize throughput, harden quality gates
Benchmarking & comparison:
- Add criterion benchmarks (ucobs vs cobs 0.3 vs corncobs 0.1)
- Add Python cobs benchmark script
- Add performance comparison section to README with full results

Performance:
- Rewrite encode to scan-and-bulk-copy via copy_from_slice
- Rewrite decode to bulk-copy via copy_from_slice
- ~2-4x throughput improvement; now matches corncobs on most workloads

Quality hardening:
- Add #![forbid(unsafe_code)], #![warn(missing_docs)], #[must_use]
- Add [lints.rust] unsafe_code = "forbid" in Cargo.toml
- Add rust-version (MSRV) = "1.56"
- Add docs.rs metadata
- 106 tests: 80 unit/corpus + 25 property tests (25k cases each = 625k total)
- External test vectors from: Wikipedia, Cheshire & Baker paper, nanocobs,
  cobs-c, cobs2-rs, Jacques Fortier, Python cobs package
- Add fuzz_small_dest fuzz target (encode/decode with undersized buffers)
- Improve doc examples to show sentinel append/strip convention

Infrastructure:
- Add justfile with test (nextest), check, bench, fuzz, miri, fmt targets
- cargo-nextest for parallel test execution
- Update .gitignore for Python cache files

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 17:19:12 -06:00
swaitsandClaude Opus 4.6 08063391e8 feat: initial release of ucobs 0.1.0
μCOBS — Consistent Overhead Byte Stuffing encoder/decoder.
no_std, zero-alloc, spec-compliant (Cheshire & Baker 1999).
44 tests + doctests, property-based testing, fuzz targets,
cross-validation against corncobs.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 11:26:27 -06:00