-
Notifications
You must be signed in to change notification settings - Fork 0
Layer 1 Interface
Dual entry points providing the same operations through different communication mechanisms.
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
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.
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
libsavesync Wiki