Skip to content

Latest commit

 

History

History
57 lines (45 loc) · 1.83 KB

File metadata and controls

57 lines (45 loc) · 1.83 KB

ReallyMe Codec Contract

This repository owns the reallyme-codec Rust crate family and the generated SDK facades for Swift, Kotlin, and TypeScript.

Owned Surfaces

  • crates/codec/** contains the Rust implementation that defines codec behavior.
  • crates/ffi exposes the native C ABI and JNI boundary used by Swift and Kotlin.
  • crates/wasm exposes the WASM boundary used by @reallyme/codec.
  • crates/proto owns the publishable protobuf crate, generated bindings, and source schema for the cross-language codec wire contract.
  • packages/ts, packages/swift, packages/kotlin, and packages/kotlin-android are thin TypeScript, Swift, Java/Kotlin, and Android facades over the Rust implementation.

The protobuf schema is canonical for cross-language request, response, and error shapes. Rust primitive modules remain canonical for behavior, but SDK wire DTOs and typed boundary errors must be generated from, or mechanically backed by, the protobuf schema rather than maintained as independent parallel models.

Repository Shape

reallyme/codec
  crates/
    codec/
    proto/codec/
  packages/
    ts/
    swift/
    kotlin/
    kotlin-android/

Crypto primitives, provider policy, key generation, signing, encryption, KDFs, and crypto conformance vectors belong in the separate crypto repository.

SDK Boundary Rule

TypeScript uses the codec WASM package. Swift uses the codec C ABI. Java and Kotlin use the codec JNI provider. Those SDKs may validate arguments and present typed facades, but they must not hand-roll codec logic that would diverge from Rust.

Expected failures are mapped to typed codec errors. Errors must not include raw input bytes, backend exception text, PII, or secret material.