Skip to content

Commit 4bb1f90

Browse files
committed
Clarify SIMD prototype admission state
1 parent 6c4312e commit 4bb1f90

7 files changed

Lines changed: 71 additions & 82 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@
4444
encoding.
4545
- Updated the SIMD unsafe inventory for the AVX-512, AVX2, and AArch64 NEON
4646
prototypes, including staged stack-copy wiping and vector-register cleanup.
47+
- Refreshed the SIMD roadmap, admission manifest, and backend evidence output
48+
so `1.1.x` checkpoint tags consistently describe the current state as real
49+
non-dispatchable prototype evidence while active runtime dispatch remains
50+
scalar-only until a future `1.2.0` admission package.
4751

4852
## 1.1.0 - 2026-06-20
4953

docs/PLAN.md

Lines changed: 45 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -646,81 +646,56 @@ active-acceleration minor release, pause feature work for a short soak period
646646
so users can report platform-specific regressions before the next acceleration
647647
line begins.
648648

649-
- Remaining `1.0.x`: maintenance-only fixes if users report real issues during
650-
the pause window. Keep the current Kani proof gate running, refresh
651-
Miri/fuzz/dudect/generated-assembly evidence, and avoid broad API expansion.
652-
Optional sister crates may grow only when they keep the core package
653-
dependency-free and have their own supply-chain gates.
654-
- Optional post-`1.0.10` sister crates: consider additional profile-specific
655-
serde modules and full Tokio streaming adapters only after their dependency,
656-
audit, cancellation-safety, and misuse-resistance evidence is complete.
657-
- `1.1.0`: replace the SSSE3/SSE4.1 fixed-block encode scaffold with real
658-
vectorized encode logic for Standard and URL-safe alphabets only. Keep it
659-
non-dispatchable. The goal is meaningful scalar-equivalence tests, not active
660-
acceleration. The implementation must avoid over-reading fixed input blocks;
661-
any SIMD load must be backed by a proven readable region, masked load, or
662-
safe staging strategy.
663-
- `1.1.1`: add deterministic SSSE3/SSE4.1 evidence expansion. Cover block
664-
boundaries, randomized fixed-block vectors, URL-safe output, all 64 six-bit
665-
values, undersized output behavior at the API boundary, and generated
666-
assembly capture for the exact target-feature bundle.
667-
- `1.1.2`: add a real AVX2 fixed-block encode prototype using the same
668-
Standard/URL-safe semantics and evidence bar. Keep it inactive. Do not add
669-
`ActiveBackend::Avx2`, and do not allow runtime dispatch yet.
670-
- `1.1.3`: add AVX2 evidence expansion: scalar differential tests, generated
671-
assembly capture, register-retention cleanup review, x86 runtime feature
672-
gating tests where possible, and benchmark harness output that is explicitly
673-
labeled non-dispatchable prototype evidence.
674-
- `1.1.4`: expand fuzz and release-evidence coverage for the inactive x86
675-
encode prototypes. The fuzz harness should compare prototype block encoders
676-
against scalar output where the host supports the required CPU features, and
677-
the release evidence should record skipped-backend reasons on unsupported
678-
hardware.
679-
- `1.1.5`: add an inactive AVX-512 VBMI fixed-block encode prototype if the
680-
x86 baseline evidence remains clean. AVX-512 may use direct 64-byte alphabet
681-
lookup where it is safer and clearer than SSSE3/AVX2 range arithmetic, but it
682-
must include explicit ZMM/YMM/XMM register-retention cleanup evidence and
683-
generated-code review before any future dispatch is considered.
684-
- `1.1.6`: add AVX-512 evidence expansion: scalar differential tests,
685-
generated assembly capture, benchmark harness output labeled as inactive
686-
prototype evidence, and CPU-feature skip reporting on machines without the
687-
full `avx512f`, `avx512bw`, `avx512vl`, and `avx512vbmi` bundle.
688-
- `1.1.7`: add inactive NEON fixed-block encode logic for Standard and
689-
URL-safe alphabets. Keep it non-dispatchable and platform-evidence gated.
690-
AArch64 and ARM differ in availability assumptions, so the release evidence
691-
must record target triples, CPU details, and whether NEON availability is
692-
architectural or target-feature asserted.
693-
- `1.1.8`: add inactive wasm `simd128` encode logic only if the wasm wipe and
694-
JIT caveats remain clearly documented. Wasm evidence must include generated
695-
wasm/codegen review and must not make runtime/JIT timing or register-cleanup
696-
claims the crate cannot prove.
697-
- `1.1.9`: harden the SIMD admission tooling. Teach
698-
`scripts/validate-simd-admission.sh` and backend evidence scripts the
699-
difference between "real but non-dispatchable prototype" and "admitted active
700-
backend" so the gate still forbids acceleration while accepting the richer
701-
evidence package.
702-
- `1.1.10`: prepare the encode active-dispatch admission package without
703-
enabling it.
704-
Update draft docs, benchmark templates, runtime-report expectations, and
705-
release-note wording. `active_backend()` must still return scalar at the end
706-
of this release.
707-
- `1.2.0`: consider std-only runtime dispatch for admitted encode paths if and
708-
only if the relevant encode evidence is complete. It is acceptable to admit a
709-
subset of encode backends, but the release notes must name exactly which
710-
backends are active and which remain candidate-only. `active_backend()` may
711-
gain admitted encode backends only when the admission manifest, release
712-
notes, benchmark evidence, unsafe inventory, generated assembly evidence,
713-
fallback tests, and backend policy tests are updated in the same release.
714-
`no_std` builds remain scalar unless a later unsafe caller-contract API is
715-
designed and reviewed. After `1.2.0`, pause feature work for roughly two
716-
weeks before starting SIMD decode work.
717-
- `1.2.x`: build SIMD decode prototypes as a separate non-accelerated line.
649+
Current `1.1.x` checkpoint state:
650+
651+
- `1.1.0`: started the SIMD encode foundation line with real non-dispatchable
652+
SSSE3/SSE4.1 fixed-block encode logic for Standard and URL-safe alphabets.
653+
- `1.1.1`: hardened the SIMD encode prototype evidence line with AVX-512,
654+
AVX2, NEON, wasm `simd128`, generated assembly evidence, backend evidence,
655+
and the future encode-admission draft while keeping runtime dispatch
656+
scalar-only.
657+
- `1.1.2`: added the optional `base64-ng-subtle` companion crate and tightened
658+
SIMD prototype cleanup evidence, including inline AArch64 NEON register
659+
cleanup for the test-only prototype path.
660+
- Next `1.1.x` checkpoints: refresh documentation and machine gates so
661+
release evidence consistently distinguishes real non-dispatchable prototypes
662+
from admitted active backends, then run pentest/CI/Kani on the candidate
663+
before tagging the next GitHub checkpoint. Do not publish additional
664+
crates.io versions for this line unless a user-impacting fix requires it.
665+
666+
Remaining before `1.2.0` active encode dispatch can be considered:
667+
668+
- Keep `active_backend()` returning scalar and keep `ActiveBackend` without
669+
accelerated variants until the admission manifest is updated in the same
670+
commit as the admitted dispatch code.
671+
- Run the complete scalar differential, fuzz, Miri, Kani, dudect-style,
672+
generated assembly, backend evidence, unsafe-boundary, panic-policy,
673+
dependency, package, and release metadata gates on the exact release
674+
candidate.
675+
- Produce per-backend hardware evidence for any backend considered for active
676+
dispatch. A backend may stay real-but-non-dispatchable in `1.2.0` if its
677+
hardware evidence is incomplete.
678+
- Produce benchmark evidence with hardware, OS, Rust version, feature flags,
679+
command, raw output, scalar baseline, and exact admitted backend names.
680+
- Update `docs/SIMD_ADMISSION.md`, runtime report expectations, release notes,
681+
unsafe inventory, benchmark docs, and the release script in the same change
682+
that admits any backend.
683+
- Keep `no_std` acceleration disabled unless a future unsafe caller-contract
684+
API is designed, reviewed, and separately admitted.
685+
- Publish the next crates.io family sync as `1.2.0` only after the `1.1.x`
686+
checkpoint tags and user testing remain clean.
687+
688+
After `1.2.0`:
689+
690+
- Pause encode feature work for roughly two weeks before starting SIMD decode
691+
work.
692+
- Build SIMD decode prototypes as a separate non-accelerated `1.2.x` line.
718693
Start with strict Standard and URL-safe decode only. Keep prototypes
719694
non-dispatchable while proving invalid-byte handling, canonical trailing-bit
720695
rejection, padding behavior, output-retention cleanup, error-shape
721696
compatibility where promised, scalar differential tests, fuzz coverage, and
722697
timing-oriented evidence.
723-
- `1.3.0`: consider active SIMD decode dispatch only if the `1.2.x` decode
698+
- Consider active SIMD decode dispatch in `1.3.0` only if the `1.2.x` decode
724699
evidence line is complete and the `1.2.0` encode acceleration line has had a
725700
clean soak period. If admitted, release notes must distinguish encode
726701
backends from decode backends and keep `HighAssuranceScalarOnly` available

docs/RELEASE_EVIDENCE.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,11 @@ The release gate runs:
5050
- packaged release script presence, executable-bit, and shebang validation
5151
- zero-dependency policy check for the published crate
5252
- packaged dependency admission policy for future external-crate review
53-
- final `v1.0` dependency admission review keeping `tokio`, `serde`, `bytes`,
54-
`zeroize`, `subtle`, property-testing, and benchmark frameworks out of the
55-
published crate contract unless separately admitted
53+
- dependency admission review keeping the core crate dependency-free while
54+
treating `base64-ng-serde`, `base64-ng-bytes`, `base64-ng-subtle`, and
55+
`base64-ng-tokio` as separately reviewed optional companion crates; `zeroize`,
56+
property-testing, and benchmark frameworks remain out of the core package
57+
unless separately admitted
5658
- reserved feature placeholder checks for `tokio`, `kani`, and `fuzzing`,
5759
including inert-feature and per-feature dependency graph validation
5860
- fail-closed wasm wipe policy check proving default `wasm32` builds reject

docs/SIMD.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# SIMD Admission Policy
22

3-
`base64-ng` is intentionally scalar-only in the `1.1.0` release. Future SIMD
3+
`base64-ng` is intentionally scalar-only throughout the `1.1.x` line. Future SIMD
44
dispatch remains gated unless a complete SIMD admission evidence package lands
55
in a later release series. The crate uses `#![deny(unsafe_code)]` and permits
66
reviewed `allow(unsafe_code)` exceptions only for audited cleanup in
@@ -23,6 +23,9 @@ The SIMD roadmap separates implementation evidence from active acceleration:
2323
evidence, register-cleanup review, fuzz expansion, and admission-tooling
2424
updates. These releases must remain non-dispatchable: `active_backend()`
2525
stays scalar, and release notes must not claim user-visible acceleration.
26+
GitHub checkpoint tags in this line may move evidence forward without a
27+
matching crates.io publish; the next planned crates.io family sync is
28+
`1.2.0`.
2629
- `1.2.0` is the first release that may activate encode acceleration. It may
2730
admit std-only runtime dispatch for the encode backends whose evidence is
2831
complete in that release. Backends without complete evidence remain

docs/SIMD_ADMISSION.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ the admitted implementation.
1010
- Admitted backends: none.
1111
- Active backend: scalar only.
1212
- Public performance claims: none.
13-
- Release status: `1.1.0` remains scalar-only. Future releases may admit an
13+
- Release status: `1.1.x` remains scalar-only. Future releases may admit an
1414
accelerated backend only when this manifest is updated with a complete
1515
backend admission evidence package in the same release series.
1616

@@ -54,11 +54,11 @@ State labels are intentionally strict:
5454

5555
| Backend | State | Required CPU features | Evidence |
5656
| --- | --- | --- | --- |
57-
| AVX-512 VBMI | candidate only | `avx512f`, `avx512bw`, `avx512vl`, `avx512vbmi` | real fixed-block encode prototype for all alphabets; non-dispatchable |
58-
| AVX2 | candidate only | `avx2` | real fixed-block encode prototype for Standard and URL-safe alphabets; non-dispatchable |
59-
| SSSE3/SSE4.1 | candidate only | `ssse3`, `sse4.1` | real fixed-block encode prototype for Standard and URL-safe alphabets; non-dispatchable |
60-
| NEON | candidate only | `neon` | real AArch64 fixed-block encode prototype for Standard and URL-safe alphabets; 32-bit ARM scaffold; non-dispatchable |
61-
| wasm `simd128` | candidate only | `simd128` | real fixed-block encode prototype for Standard and URL-safe alphabets; test-binary compile evidence only; non-dispatchable |
57+
| AVX-512 VBMI | real non-dispatchable prototype | `avx512f`, `avx512bw`, `avx512vl`, `avx512vbmi` | real fixed-block encode prototype for all alphabets; non-dispatchable |
58+
| AVX2 | real non-dispatchable prototype | `avx2` | real fixed-block encode prototype for Standard and URL-safe alphabets; non-dispatchable |
59+
| SSSE3/SSE4.1 | real non-dispatchable prototype | `ssse3`, `sse4.1` | real fixed-block encode prototype for Standard and URL-safe alphabets; non-dispatchable |
60+
| NEON | real non-dispatchable prototype | `neon` | real AArch64 fixed-block encode prototype for Standard and URL-safe alphabets; 32-bit ARM scaffold; non-dispatchable |
61+
| wasm `simd128` | real non-dispatchable prototype | `simd128` | real fixed-block encode prototype for Standard and URL-safe alphabets; test-binary compile evidence only; non-dispatchable |
6262

6363
## Release Rule
6464

scripts/check_backend_evidence.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ cat "$prototype_output"
4444
echo "runtime_dispatch=scalar-only"
4545
echo "active_backend_admitted=false"
4646
echo "prototype_state=real-non-dispatchable"
47+
echo "prototype_avx512_vbmi=real-non-dispatchable"
48+
echo "prototype_avx2=real-non-dispatchable"
49+
echo "prototype_ssse3_sse41=real-non-dispatchable"
50+
echo "prototype_neon=real-non-dispatchable-aarch64-standard-family"
51+
echo "prototype_wasm_simd128=real-non-dispatchable-compile-evidence-only"
4752
echo "wasm_simd128_evidence=compile-test-binary-only"
4853
echo
4954
echo "artifacts:"

scripts/validate-simd-admission.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@ if [ "$backend_row_count" -ne 5 ]; then
103103
exit 1
104104
fi
105105

106-
if printf '%s\n' "$backend_rows" | grep -v '| candidate only |' >/dev/null 2>&1; then
107-
echo "simd admission: every backend row must remain candidate-only until admission" >&2
106+
if printf '%s\n' "$backend_rows" | grep -v '| real non-dispatchable prototype |' >/dev/null 2>&1; then
107+
echo "simd admission: every backend row must remain a real non-dispatchable prototype until admission" >&2
108108
printf '%s\n' "$backend_rows" >&2
109109
exit 1
110110
fi

0 commit comments

Comments
 (0)