Skip to content

EQL bindings: generate the v4 Rust types, and derive Stack Encrypt's traits on v4 only #1179

Open

Description

@coderdan

Part of #1142, which keeps step 1 (publish @cipherstash/eql 4.0 with both bundles) and steps 3, 5 and 6.

Problem

Stack Encrypt's one producible type, TextEq, writes eql_v3_* domains. The eql_v3 TextEq and TextEqQuery structs derive Stack Encrypt's EncryptFrom (and TextEq its DecryptInto), but Stack Encrypt's output is not byte-for-byte compatible with cipherstash-client's. So those derives claim a v3 compatibility that doesn't exist. ADR-0002 (#1139) gives Stack Encrypt its own eql_v4 domains instead.

Proposal

#1142 steps 2 and 4:

  • eql-codegen generates the scalar domains into eql_bindings::v4 (eql_v4_* names, a SchemaVersion pinned to 4, payloads with "v": 4).
  • Only v4 structs derive EncryptFrom and DecryptInto. TextEq and TextEqQuery move to v4, and a test asserts that no v3 struct implements either trait.
  • The Stack Encrypt target table moves from v3/targets.rs to v4/targets.rs, and the v3 targets and their "producer profile" reasons are deleted.
  • The stack-encrypt:1: ciphertext prefix stays.
  • Go's encrypt/eql/eql_gen.go is regenerated against v4.

The PostgreSQL test for the encryption crate runs against an eql_v4 install.

Activity

  1. self-assigned this
    on Oct 13, 2026
  2. added
    StagedDone in the next branch; closes when next merges into main
    on Oct 17, 2026
  3. coderdan commented on Oct 17, 2026

    @coderdan
    ContributorAuthor

    Staged: done in next by #1162. This stays open until next merges into main, which closes it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

SDKStagedDone in the next branch; closes when next merges into mainenhancementNew feature or requestrustPull requests that update Rust code

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions