Skip to content

chore: release candidate for EQL v4 and Stack Encrypt Rust and Go support - #1229

Open
coderdan wants to merge 1235 commits into
mainfrom
next
Open

coderdan wants to merge 1235 commits into
mainfrom
next

Conversation

@coderdan

Copy link
Copy Markdown
Contributor

Summary

This is the integration branch for a release candidate of EQL v4 and of Stack Encrypt's Rust and Go support. EQL is the SQL that lets PostgreSQL store and search encrypted values; EQL v4 is a second copy of it for values written by Stack Encrypt, the Rust encryption engine behind the Go SDK. The open pull requests for both are merged here first, so they can be tested together before any of them reaches main.

The release version is not decided yet.

Why a branch, not main

Some of this work depends on vitaminc and ore.rs code that is not yet on crates.io, so it pins those crates to a git commit. stack-encrypt and eql-bindings are published crates, and cargo publish drops those git pins, so nothing on this branch can be released until vitaminc 0.6 is published (cipherstash/vitaminc#389, which waits on cipherstash/vitaminc#463). Once it is, the git pins become crates.io versions and this branch merges to main as a normal release.

What lands here, in order

  1. EQL v4: docs(adr): one value model, three encodings in vitaminc, EQL v4 by producer #1139, refactor(eql): write the SQL source with schema and version placeholders #1147, feat(eql): build the eql_v4 bundle beside eql_v3 #1161, feat(eql-bindings): generate EQL v4 bindings and derive Stack Encrypt traits on v4 only #1162, feat(eql-bindings): produce the unordered EQL v4 number, boolean and text types #1163, feat(eql-bindings): produce EQL v4 TextMatch from Stack Encrypt match terms #1164, test(golang): prove the EQL v4 types from Go, against Rust and PostgreSQL #1165. Uses vitaminc 0.5.1 from crates.io only.
  2. Stack Encrypt operators: docs(adr): ADR-0009, operators select the index and a query term is not the stored term #1177, feat(stack-encrypt)!: a query names an operator, not an index #1190, feat(stack-encrypt): verify a match query's rows after decrypt #1191, feat(stack-encrypt): size a match query's fetch with target_limit #1192, feat(stack-encrypt): store short TextMatch text as an empty filter, refuse only short queries #1206, feat(stack-encrypt): ordering operators Lt, Lte, Gt, Gte and Between, and remove query_index #1208, feat(stack-encrypt): JSON operators Contains, ContainedBy and AtPath #1209, feat(stack-encrypt)!: move the stack crates, the guests and the Go module onto vitaminc ADR 0001 #1213, feat(stack-encrypt)!: derive terms through vitaminc-normalize and walk dynamic values as Plaintext #1214, feat(stack-encrypt): query a plan field by operator through the guest, with verify and target_limit as exports #1215, feat(golang)!: generate one query method per operator, with Verify and TargetLimit on a matches query #1216. Before it lands, feat(stack-encrypt)!: move the stack crates, the guests and the Go module onto vitaminc ADR 0001 #1213 moves its vitaminc pin from the deleted branch feat/aead-remove-legacy-traits to one commit on vitaminc main, and takes vitaminc's breaking changes since then.
  3. Not planned yet: the KMS stack (feat(stack-kms): ZeroKMS as a vitaminc key provider (CIP-3965) #1084, feat(stack-encrypt)!: keysets resolve through a KeysetRegistry, and sealed leaves move to format 2 (CIP-4140) #1085, feat(stack-encrypt): run vendor KMS backends through a static keyset registry (CIP-3965) #1083). It is built on a vitaminc commit that is no longer on any branch, and it needs vitaminc's KMS work rebased first.

Rules for this branch

  • Pin vitaminc and ore.rs with rev, never branch. A branch is deleted when its stack merges.
  • Use one vitaminc commit in every Cargo workspace that pins one: the root, both Go guests, packages/eql and packages/stack-encrypt/fuzz. Two commits mean two copies of vitaminc's traits, and the code stops compiling.

Changes

  • One empty commit, so the branch has a pull request. The stacks above add the content.

Verification

  • next was created from main at 2a70a47. Nothing has been built yet, because nothing has changed.

Related

@coderabbitai

coderabbitai Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Walkthrough

Warning

Review details and warnings were omitted to fit the comment limit.

@changeset-bot

changeset-bot Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 2c26998

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 27 packages
Name Type
@cipherstash/auth Patch
@cipherstash/protect-ffi Patch
@cipherstash/stack-prisma Minor
@cipherstash/eql Minor
stash Minor
@cipherstash/stack Minor
@cipherstash/wizard Minor
@cipherstash/ffi-integration-tests Patch
@cipherstash/stack-drizzle Minor
@cipherstash/stack-supabase Minor
@cipherstash/prisma-example Patch
@cipherstash/basic-example Patch
@cipherstash/e2e Patch
@cipherstash/bench Patch
@cipherstash/test-kit Patch
@cipherstash/protect-ffi-darwin-arm64 Patch
@cipherstash/protect-ffi-darwin-x64 Patch
@cipherstash/protect-ffi-linux-arm64-gnu Patch
@cipherstash/protect-ffi-linux-x64-gnu Patch
@cipherstash/protect-ffi-linux-x64-musl Patch
@cipherstash/protect-ffi-win32-x64-msvc Patch
@cipherstash/auth-darwin-arm64 Patch
@cipherstash/auth-darwin-x64 Patch
@cipherstash/auth-linux-arm64-gnu Patch
@cipherstash/auth-linux-x64-gnu Patch
@cipherstash/auth-linux-x64-musl Patch
@cipherstash/auth-win32-x64-msvc Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Mutation testing (cargo-mutants, --in-diff, stack-auth + stack-encrypt)

caught missed unviable timeout
436 0 203 0

cargo-mutants exited with no surviving mutants recorded. The run may not have completed cleanly; check the workflow run logs.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-19T13:51:48.267360Z a05affa Draft marked ready
🔒 Security Review ✅ Completed 2026-10-19T13:50:52.546472Z a05affa Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a05affaaa5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread languages/golang/encrypt/query.go Resolved
Comment thread languages/golang/encrypt/query.go Resolved
@coderdan
coderdan deployed to release-golang October 19, 2026 15:26 — with GitHub Actions Active
@coderdan
coderdan added this pull request to stack #1333 October 22, 2026 10:15

@freshtonic freshtonic left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I request changes for two release problems on the crates.io side. The code itself is in good shape, and every check I ran passes.

How I reviewed this
The diff is large because generated code is committed. I reviewed the generators and their templates, then I ran the drift checks to prove that the committed output matches them. I did not read each generated file.

  • EQL codegen: eql-codegen renders the version-neutral SQL source two times (eql_v3 and eql_v4) from the eql-domains catalogue. It also generates the Rust payload types and eql_gen.go.
  • Go: stashgen generates the *_stash.go files and the goldens.

Checks run (in a worktree at a05affaaa)

  • EQL:
    • cargo test -p eql-codegen (includes the Go parity test): pass.
    • mise run types:check, codegen:parity, test:schemas:parity: pass.
    • mise run build, with the installer completeness gate and the v4 isolation gate: pass.
    • git status was clean after all of these.
  • Rust and Go:
    • cargo fmt --check: pass.
    • cargo clippy --workspace --all-features --all-targets -D warnings: pass.
    • cargo test -p stack-guest-abi -p stack-encrypt --all-features: pass.
  • Go guests and SDK:
    • All five WASI guests build, and the import-surface checks pass.
    • go vet ./... and go test ./... in languages/golang: pass.
    • go generate ./... leaves no diff.
  • I built the v3 bundle and compared it with the @cipherstash/eql@3.0.6 tarball. Only lints() and comments changed, so the claim "v3 SQL unchanged" holds.
  • git merge-tree against current main: no conflicts.
  • cargo publish --dry-run -p stack-encrypt-derive -p stack-encrypt against crates.io: fails (see below).

Blocking

  1. stack-encrypt 0.3.0 cannot publish. The root release-plz line publishes every stack-* version that crates.io does not have, so merging this starts a publish of stack-encrypt 0.3.0. stack-encrypt requires stack-kms 0.1.0, and that is the only stack-kms version on crates.io. But src/lib.rs re-exports stack_kms::{diagnostic, ErrorPayload}, and these were added after the 0.1.0 release with no version bump. The packaged build fails with E0432: unresolved imports stack_kms::diagnostic, stack_kms::ErrorPayload.
    • Fix: bump stack-kms (for example to 0.2.0, with a CHANGELOG entry), and make stack-encrypt require that version.
    • Note that the publish dry run on main (tests-crates.yml) packages all five crates together, so stack-encrypt resolves the tree's stack-kms there. That step does not catch a stack-kms that crates.io lacks under the same version number.
  2. The stack-encrypt CHANGELOG has no 0.3.0 section. Cargo.toml says 0.3.0, but about 850 lines, including a ### Breaking section, are still under ## [Unreleased]. The root release-plz line only publishes and never rewrites the changelog, so 0.3.0 would ship under "Unreleased", as 0.1.0 did. Please rename the section to ## [0.3.0] - <date> in this PR.

Non-blocking (see inline)

  • SchemaVersion is now generic. Rust does not apply a default const parameter in an expression, so SchemaVersion::CURRENT and SchemaVersion::default() stop compiling (E0284). The changeset ships this as a minor bump and says "plain SchemaVersion still means v3".
  • The stored and single-bound query domain templates accept "v": null. The range template already guards against this.
  • stack-encrypt will publish with an exact pin on cllw-ore =0.5.2-rc.1.
  • There are some small nits: stale vitaminc version numbers in comments, a Go wipe path, an ADR reference, and the position of a use.

Before you merge
eql-bindings now requires stack-encrypt 0.3.0. Its crates.io publish (publish_all_features) succeeds only after release-crates has published stack-encrypt 0.3.0, so blocker 1 must be fixed first. Otherwise the EQL crate publish fails too.

Checked and fine

  • SQL renderer: it refuses literal eql_v3/eql_v4 names, unknown placeholders and unmatched blocks.
  • Range domains and between: correct, with STRICT/IMMUTABLE accessors and an inlinable between. On non-superuser installs, the ORE range domains are disabled with the same NOT VALID CHECK as the single-bound ORE domains.
  • v4 ore_block_v2 SQL: the layout offsets and the GF(2^128) doubling are correct, and errors do not echo the input bytes.
  • stack-guest-abi step and value: no new raw reads of host lengths, handles are never reused, MAX_OPEN is enforced, and secrets are Zeroizing with OpaqueDebug.
  • Go step loop: every early exit after a pause aborts the operation and wipes the buffers. maxPaused is tied to the Rust constant by a test.
  • Go public surface: QueryTerm, Verify and TargetLimit follow the existing Seal/Open pattern, and MatchQuery never prints its text.
  • CI: actions are pinned by SHA, both copies of the path filters were updated, and no release workflow changed.
  • Changesets: the EQL changesets are minor, which is correct apart from the SchemaVersion point. chacha20-0-10-2.md matches the lockfile moves.
  • Skills: no skill update is needed. stash eql install still installs v3 only, and no skill covers the Go SDK or Stack Encrypt.

Comment thread packages/stack-encrypt/Cargo.toml Resolved
Comment thread Cargo.toml Resolved
Comment thread .github/dependabot.yml Resolved
Comment thread packages/stack-encrypt/Cargo.toml Resolved
Comment thread languages/golang/encrypt/step.go Resolved
Comment thread packages/stack-guest-abi/src/call.rs Resolved
Deriving a data key from its key material (a recipher re-encryption and a
hash) is the costly part of a batch. send_chunked now yields to the async
runtime every 64 keys. On tokio that reschedules the task; in a wasm
guest it hands control back to the host between chunks.

Part of #1762.
A fulfilment can now do part of its work and return the rest
(Fulfilled::More). settle_with yields to the runtime between the parts.
In a wasm guest a column (Pending::all) stops after about 64 data keys'
worth of items, and a pair passes a side's partial result on, so a batch
of records yields between its rows. The guards that release recovered
plaintext move into the rest, so a batch dropped part way still wipes it.

Natively every fulfilment runs to its end as before: a chunk would hold
recovered items across a yield, and a native fulfilment must be Send,
which would ask T to be Send too.

Part of #1762.
A step with an empty list of requests is a yield: the host resumes it at
once with no responses, releasing the client lock in between, so the Go
garbage collector and other callers get their turn. Every operation now
takes a paused slot, since any can pause to yield. A step with no
requests field is still malformed.

Decrypting 1,410 values against ZeroKMS, the longest guest step falls from
42 ms to 11 ms; most steps take 1 to 2 ms. CPU is unchanged.

Closes #1762.
The test-only KeysetCipher::equality_term, match_terms, ore_term, and
ope_term were copies of the target path. Each repeated the derivation
that the term type's Term::encrypt_from already makes. So the lone_terms
tests compared each copy with its original. The four methods and the
lone_terms tests are removed.

The dynamic tests that compared a dynamic term with a typed one now
derive the typed term through its target, with
encrypt_into_with_context. That keeps two separate paths in each
comparison. The test file `tests/credential.rs` already checks that a
term built before the keyset loads is the term built after it. The
helpers equality_term_normalized and match_terms_under now compile only
with the dynamic feature, because only that path calls them.

The docs no longer say that the compiler enforces one context for a
term and its ciphertext. A bare term target still takes any context.
The term shares its ciphertext's context only as a field of a derived
record, or beside its ciphertext in Encrypted<(…)>. The wording changes
in ADR-0004's amendment, the CHANGELOG, and the sem module and impl
docs. Each also says that a bare MatchTerms with short words on is a
stored filter, not a query.

The CHANGELOG upgrade note now covers jiff's civil::Date and Timestamp,
and rust_decimal's Decimal. OreTerm<T> and OpeTerm<T> need T: Zeroize,
so those types take value::Date, value::Timestamp, or value::Decimal,
or the borrowed operation target::ope::<_, _, Borrowed>(). A scratch
test checked that both routes compile and give the same bytes.

The sem module docs say that a target and a field query's encrypt
return a Pending, since a field reference's operator returns a
FieldQuery. ADR-0009's match_terms bullet points to ADR-0004's
amendment. Two paragraphs are rewrapped.
KeysetCipher::ore_block_term built a block order-revealing encryption
(ORE) term outside a target, as the four term methods removed earlier on
this branch did. Nothing tied that term to the context of the ciphertext
stored beside it. The method is removed. The term type OreBlockTerm<T>,
the operation target::ore_block, and the index OreBlock stay public.

No helper becomes dead. order_pending, ore_block, and ore_block_error
still serve the OreBlockTerm target through the order_term macro.

The tests that called the method now build each term through its
target, with encrypt_into_with_context. The borrowed-value test runs
target::ore_block with a Borrowed source through KeysetCipher::run. The
credential test still checks that a term built before the keyset loads
equals one built after it. A block ORE term contains a random nonce, so
the test compares by the scheme's comparison. The pinned left halves
pass with the same bytes.

A scratch test, since deleted, checked the upgrade route for the three
types that are not Zeroize: jiff's civil::Date and Timestamp, and
rust_decimal's Decimal. KeysetCipher::run with
target::ore_block::<_, _, Borrowed>() compiles for each. The term it
builds has the same left half as the term of value::Date,
value::Timestamp, or value::Decimal built with encrypt_into_with_context.

The CHANGELOG Breaking entry and the Orderable rustdoc in lib.rs now
name that route. The amendment to architecture decision record 0004 now
says that the method is removed.
The earlier text said the methods were removed because nothing tied a
term to its ciphertext's context, and that most indexes send a query
term unlike the term they store. Neither is the reason. A term does not
have to share its ciphertext's context; a type that needs that ties the
two together, as an EQL type does with its one context field. And of the
indexes behind these methods, only match sends a different query term.

The reason is that a query must be built in the same domain as the
stored term it searches. A field reference does this from the field's
own context and options, and the removed methods copied their target's
code without that tie. The CHANGELOG entry, the ADR-0004 amendment and
the sem docs now say so.
…simulator

refactor(stack-encrypt): move the JsonDocument EQL simulators into eql_simulator
…a wedged Close

Review follow-ups for the stuck-call backstop.

- The stuck branch of Client.step now wipes a paused step's requests
  (bearer token, key-material contexts) as well as its output, as drive
  does on every other path that drops a step.
- Close on a wedged client releases the credentials at once: the stuck
  step reads only the token it was handed. They are released once
  (sync.OnceValue), whichever of Close and the step gets there first.
- Close reads `released` (now atomic, set last) instead of racing
  TryLock, so it returns nil once the stuck step has released the
  instance, never a spurious ErrState.
- One error, errStuck, for every call that fails on a wedged client. It
  matches ErrState and wraps guest.ErrStuck. Acquire is AcquireUnless
  with a nil channel.
- The test queues a caller before the backstop fires, and covers abort
  and the credential release on a wedged client.
- Docs: the stuck call's own caller now waits for it; comments that
  still said the runtime closes the module under a stuck step are fixed.
- Numbers: the option cost the guest 3.5 to 5 times its CPU, as #1761
  says. The EQL guest grows by 1.9 MB (4.9 MB at "s", 6.8 MB at 3,
  measured from this tree).
A wedged client failed only the callers waiting for its lock. A call
waiting for one of the 64 paused slots, or for its token, waited on, and
a new call fetched a token before it failed.

drive now returns ErrState at once on a wedged client, its wait for a
slot ends with the wedge, and the token fetch runs under a context the
wedge cancels. wedged is a context so the fetch can be tied to it.

A cancelled fetch also lets go of the auth strategy's lock, so Close on
a wedged client waits only for a refresh already sent. The docs now say
Close returns ErrState without waiting for the stuck call, not at once.
…nto feat/golang-guest-yield

# Conflicts:
#	languages/golang/encrypt/client.go
…nking from mutants

The chunking of a column and a pair (fulfil_column_from,
fulfil_column_item, fulfil_pair_right, and the wasm32 fulfil_column and
fulfil_pair) is compiled only for wasm32, so the native mutants build
never runs it and every mutant there survived. Exclude them, as the
wasm32 into_future impls already are; the native functions of the same
names have no viable mutant of these shapes.

The behaviour is pinned from Go instead. TestABigBatchYieldsAndRoundTrips
checked only that a 200-row batch yielded at all, which a broken weight
count or yield condition would still pass; it now asserts nine yields
each way: a User takes three keys, so a column yields every 22 rows.

Also say that every operation takes a paused slot, in drive's doc and
in the CHANGELOG, as it has since the guest could yield.
The first figures were measured while the laptop's performance cores
clocked down between ZeroKMS round trips, which made the fixed build look
about 2.5 times slower than it is. Measured again with the clock held
steady (cipherstash/benches#31): 100 rows of 14 columns take about 39 ms
of CPU, not 105, against about 400 before.
A call that never reaches ZeroKMS (a plan check, the catalog, a verify,
a limit) asks the guest for no keys, so it cannot pause: it neither
waits on ZeroKMS nor yields, since a yield needs at least 64 keys' worth
of items. Taking a slot only made it wait behind 64 calls in flight.
…or alone

A yield asks for no requests, so a caller that gives up at one has sent
none and was about to send none. Its call now fails with the context's
error, as it did before the guest yielded, rather than matching
ErrTransport too. A pause that asked for requests still matches both.
…st memory

The guest drops a batch between two chunks only in wasm, so no Rust test
reaches that drop. The new test encrypts 200 rows, cancels at the first
yield, and checks that the call fails with context.Canceled and not
ErrTransport, that none of the rows' plaintext remains in guest memory
(it is there at the yield, so the scan would see it), and that the
client still round-trips afterwards.

A test hook on the client, run at each yield, replaces the yield
counter: the yield-count tests count through it, and this test cancels
through it.
The rest of a column's work holds the items recovered so far, which can
be plaintext, in its guard, which releases and wipes them if the
operation is dropped at the yield.
…ant and future

YIELD_EVERY and YieldNow are defined in both crates. Sharing them would
make them public API of a published crate, so each copy now names the
other and says the two are meant to stay equal.
No native fulfilment stops part way, so nothing polled stack-encrypt's
yield future in a native test, and its mutants were unviable only by the
way the file names Poll. Each crate now tests its copy: pending once,
with one wake, then ready.
…est in flight

The loop yields every YIELD_EVERY keys, but buffered passes a yield on
only once two requests have yielded or it has polled them all. With one
request in flight, as the Go SDK's guest has, that is every YIELD_EVERY
keys. With more it is about twice as many, or more.
feat(golang): bound GC pauses by having the guest yield every 64 keys
…ate-term-methods

refactor(stack-encrypt)!: remove the lone term methods from the public API
Nothing explained how to build a binding on Stack Encrypt. The knowledge
was spread over the dynamic module's docs, the Go guest's module docs,
stack-guest-abi, ADR-0007 and ADR-0008, and an author had to reconstruct
it from the Go SDK. A Python integration has started without it.

The guide ships in the crate docs as `dynamic::guide`, included from
`docs/language-integration.md`, so it renders on docs.rs beside the API
it describes. It is ordered contract before API: the binding versus the
language SDK; native versus WebAssembly; the three operations and the
Go guest's exports; the plan grammar; control messages versus plaintext,
both frames, neither a tree; the plaintext hygiene rules and the heap
tests that prove them; the step loop, the token import and the
cancellation contract; the status table and se_last_error; versioning
and the frozen stored-rows fixtures; one int32 stored as EQL v4
IntegerEq, traced through encrypt, query and decrypt with the bytes from
the committed fixtures; and a checklist for a new binding. The frame
format stays in vitaminc-aead-frame's documentation and is linked, not
restated.

The frame bytes in the worked example are asserted by doctests, so the
guide fails the build if the engine's bytes move. The stored row and the
query term are quoted from fixtures the Go SDK and Rust both read, named
by file and key.

Linked from the crate docs, the SDK design principles and the Go SDK's
README.

Closes #1254.
…with next

The guide was written against a next that has since moved a long way.
Every claim was checked against the code again, and the guide now
describes what is there:

- The API as it is: plans read from a `ProtectedRef`, operators named by
  `Op`, decrypt through `&cipher` or `&keyset` (`CipherRef`), and
  `.audit(..)` and `.with_credential(..)` on every pending call.
- What a binding now has to know about: scopes and bindings, the plan's
  `null` and `bind` keys, the `json` type and the document operators,
  `json_open`, and the guest's new `se_json_open` and `se_contexts`
  exports and `audit` option.
- Credentials for a native binding: a strategy that takes a credential
  with each call needs `.with_credential(..)` on every call.
- The status table: code 5 is the only status a token refresh fixes,
  not the only retryable one (a transient KMS_TRANSPORT failure may be
  retried under the transport's policy), and a wrong context against
  ZeroKMS is KMS_FORBIDDEN, not AUTH.
- The checklist is built on `conformance/stack-encrypt`: run every
  profile in the binding's language, exchange fresh artifacts with Rust,
  and test the value conversion. A native binding that links the crate
  has no codec of its own; it tests its conversion to and from a frame,
  and the version it pins is its statement of the frame format.
- ADR-0008's location is corrected, the newer ADRs are linked, the
  frame-format link points at 0.10.0, and the fuzz targets are the ones
  that exist.

The worked example's bytes are unchanged and still asserted by the
doctests.
`OpSpec` was renamed to `Op` in this release and kept as a deprecated
type alias. Nothing in the repository uses the old name, and the rename
has not shipped yet, so there is no reason to carry it. Code written
against 0.3.0 renames `OpSpec` to `Op`; the variants and their wire
names are unchanged.

The CHANGELOG entry for the rename, the two ADRs that named the alias
and a Go comment now say `Op`.
…ve bindings

- Section 2 now says to link the engine natively through the language's
  own Rust binding tool (PyO3, Rustler, napi-rs). A WebAssembly guest is
  for a language that cannot link a native library cleanly, which is Go
  today and perhaps C or C++, never for one with a good binding story.
- Section 3 runs the operations through `dynamic::Planned`: a plan read
  once and paired with each value, through `encrypt_into` and
  `decrypt_from`, with queries planned ahead through `Plan::query` or
  `Plan::field`. The plan-and-value functions appear only as what the
  Go guest calls, and for the one check `Planned` does not take (a
  context-field plan's expected context).
- Sections 5 to 8 put the native extension first and mark the buffer
  registry, the step loop, the token import and the status table as the
  guest path. A native extension gets the engine's error as a Rust value.
- The worked example's doctest runs through `Planned`.
… not a guest

An edge runtime or a browser runs JavaScript, which cannot load a native
library. The answer there is the same extension crate compiled for
`wasm32-unknown-unknown` with `wasm-bindgen`, as the
`@cipherstash/stack/wasm-inline` entry is built, with ZeroKMS requests
going out through the runtime's `fetch`. It is not the WASI guest.
The guide is included in the crate's rustdoc, and doc_hygiene refuses a
rustdoc line that names a design record or a path into docs/adr: a
reader on docs.rs cannot follow it. Each reference now states the rule
it pointed at, and the closing list points at the SDK design principles
alone.
next now yields every 64 data keys on wasm32: the guest pauses a step with
no requests, and the host resumes it at once with no responses. A guest
host has to treat an empty request list as a yield rather than a malformed
step, so the step loop section says so. The native section says the same
batch yields to the async runtime when built for wasm32, and the Go
client's paused-slot bound now names which operations take a slot.
…uide

docs(stack-encrypt): a guide to building a language integration

This branch was successfully deployed

1 active (outdated) deployment
release-golang — 3aedcd1e Deployed Nov 18, 2026 by coderdan via Tag and release #8
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.

4 participants