Skip to content

Layer 1 Interface

abduznik edited this page Jul 15, 2026 · 2 revisions

Layer 1 — Interface

Dual entry points providing the same operations through different communication mechanisms.

Linkable C ABI

A static/shared library with a stable C ABI. Callers link against it and call functions directly. This is the primary interface for languages with FFI support (C, C++, Rust, Zig, etc.).

ABI stability rules apply from the very first shipped version:

  • Opaque structs at the boundary — callers never allocate library structs
  • Append-only fields — new fields can be added without breaking old callers
  • No struct reordering or field removal once shipped
  • No struct passed by value across the API boundary

Standalone Binary with IPC

A standalone binary exposing the same operations over an IPC protocol. Intended for callers that can't easily FFI (e.g. some JS runtimes, scripting languages without native bindings).

Both entry points are thin wrappers over the same internal core — this is a communication layer, not a logic duplication.

Design Rationale

The dual-interface approach means:

  • High-performance languages get zero-overhead direct calls
  • Low-performance or restricted environments still get full functionality
  • The internal logic is implemented exactly once

See also: Architecture-Overview | API-Reference | Philosophy

Clone this wiki locally