Skip to content

docs: add UPGRADING.md for moving from dryoc 1.x to 2.0 - #225

Merged
brndnmtthws merged 1 commit into
mainfrom
docs/upgrading-2.0
Sep 28, 2026
Merged

brndnmtthws merged 1 commit into
mainfrom
docs/upgrading-2.0

Conversation

@brndnmtthws

Copy link
Copy Markdown
Owner

Adds UPGRADING.md, a single page for the 2.0.0 release notes to link to. It lists every breaking change between v1.0.0 and main, with a 1.x → 2.0 mapping for each. README.md gets one line linking to it, below the Quick Start Cargo.toml snippet. src/lib.rs is unchanged.

What the page covers

  • Cargo features: serde is now a default feature; wincode → wincode_0_6 (wincode 0.5 → 0.6); u64_backend removed; the std/alloc split, which changes what default-features = false means; nightly no longer enables protected, and it needs nightly-2026-09-24 or later.
  • Removed gen*, *_with_defaults, zero-key KeyPair::new/Default and StackByteArray::new, with the replacement for each.
  • Fixed-size inputs: ByteArray is no longer implemented for slices or Vec, so convert with try_from.
  • Imports and paths: algorithm modules no longer re-export types::*; keypair::protected, precalc::protected and protected::ptypes are private; alias renames (dryocbox::KeyPair, kx::KeyPair, sha3::Sha3*Digest, IncrementalSigner, sodium_increment).
  • Box, signing, MAC, secret stream (Tag enum), key exchange, HKDF, hashing and password hashing changes; generic parameter order for callers that use a turbofish; sealed traits.
  • Classic API: argument order in the three detached-open functions.
  • A section on the changes that still compile: a detached-open call with a 16-byte ciphertext in the old order, the wider generichash length ranges, protected-memory deserialization now returning errors, and new #[must_use] warnings.

It leaves out renames of APIs added after 1.0.0 (kem, dryocsealedbox, XOF), since no 1.x user can have code using them.

Sources

Verification

  • Wire formats, checked against the published dryoc 1.0.0 from crates.io. A throwaway crate depended on both dryoc =1.0.0 (features serde, wincode) and this branch (wincode_0_6).
    • Same bytes from both versions for to_vec, serde_json and bincode (1.3): secretbox, box, key pair, signing key pair and signed message.
    • Same bytes from wincode 0.5 (1.x) and wincode 0.6 (2.0) for the secretbox and box.
    • Written by 1.x, read and opened by 2.0: a sealed DryocBox (from bytes and from serde), an XChaCha20-Poly1305 VecEnvelope (from bytes, serde and wincode), a secret stream with MESSAGE and FINAL tags, and a password hash (encoded string and serde).
    • The page's claim that wire formats are unchanged rests on these checks.
  • 2.0 column. A second throwaway crate compiles and runs the 2.0 side of every table on this branch: the placeholder and try_from snippets, StackKeyPair/StackSigningKeyPair/StackKdf/HkdfSha256/HkdfSha512::generate, VecBox::from_parts/into_parts/open/open_to_vec, seal_to_vecbox, sign_to_vecbox, Ed25519phSigner, the borrowed-key MACs, the turbofish orders, stream Tag handling, StackSession, HKDF with a length-last argument, DefaultGenericHash, VecPwHash, increment_bytes, and the new Classic detached-open order.
    • Result: all 2.0 snippets ok.
    • This check changed one row: DryocBox::from_parts(None, ..) cannot infer its ephemeral key type, so those rows use VecBox::from_parts.
  • The Rust blocks in UPGRADING.md are not doctests, and CI runs no Markdown checks.

Collects every breaking change between v1.0.0 and 2.0.0 in one page, with
1.x to 2.0 mappings: Cargo features, removed gen/*_with_defaults/zero-key
constructors, fixed-size input types, module paths, boxes, signing, MACs,
secret streams, key exchange, HKDF/hashing/password hashing, generic
parameter order, sealed traits and the Classic detached-open argument
order, plus the changes that still compile. The README links it once
below the Quick Start snippet.
@netlify

netlify Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for dryoc-docs ready!

Name Link
🔨 Latest commit 3e75e53
🔍 Latest deploy log https://app.netlify.com/projects/dryoc-docs/deploys/6ab9c882510c0500085193e0
😎 Deploy Preview https://deploy-preview-225--dryoc-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@codecov

codecov Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 72.88%. Comparing base (b284037) to head (3e75e53).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #225      +/-   ##
==========================================
+ Coverage   68.32%   72.88%   +4.56%     
==========================================
  Files         115      115              
  Lines       10032    10032              
==========================================
+ Hits         6854     7312     +458     
+ Misses       3178     2720     -458     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@brndnmtthws
brndnmtthws marked this pull request as ready for review September 28, 2026 01:58
@brndnmtthws
brndnmtthws merged commit e419986 into main Sep 28, 2026
35 checks passed
@brndnmtthws
brndnmtthws deleted the docs/upgrading-2.0 branch September 28, 2026 01:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant