ARCHITECTURE · 00
What is Tebako?
Tebako is a portable-application platform. Package any Ruby application once and run it anywhere — as a single transparent executable your users never think about, or as a managed, versioned, signed payload with shared runtimes. Underneath sits TFS, a userland virtual filesystem that lets ordinary binaries mount embedded disk images.
The platform, on one map.
Everything orbits one seam: the tebako_fs_* C ABI. The product line mounts images through it; the patch home and the runtime factory feed it rubies; the trust layer sits beneath everything that moves bytes.
Three ways to use it.
Same engine, three relationships between the developer and the user. The first two are the spine; the third is the engine itself, on loan to everyone.
1 · Standalone mode — ship the app, hide the machinery
SHIPPEDA developer presses their app once per platform and publishes plain executables. Their users download one file and run it — no Ruby, no gem environment, no tebako to install, nothing to know. The lean variant keeps the download small: the first run fetches the shared runtime once into the machine-wide cache (image-era: an immutable .tfs, mounted, never extracted), where every tebako package on the machine reuses it. The fat variant carries the runtime inside and never touches the network. This is how the gem ships today — and how the Rust tebako-cli presses with golden byte-parity.
2 · Managed mode — the version manager
SHIPPED · v2.0.0A developer publishes signed .tfs payloads to their own GitHub releases — the registry is a manifest on infrastructure they already have. A user with tebako installed puts ~/.tebako/shims on PATH once and just runs metanorma: the dispatcher picks the payload version and a compatible cached runtime — no download, no per-shell hook. Payloads are immutable; swapping rubies under a running tool is a dispatch choice, not a reinstall. Native-extension payloads are ABI-locked to their ruby line, honestly, with named errors instead of segfaults. mnenv retires to the dispatcher — metanorma is the first dogfood. The mechanism: the version manager.
3 · Library mode — libtfs for everyone
SHIPPED · C ABI · C++ today, Rust interior shippingThe engine is a product in its own right. Any project, in any language, can attach dwarfs/zip/squashfs images to its binaries through the tebako_fs_* C ABI — 24 exports, multi-mount, read-only semantics — or drive images from the shell with the tfs CLI. dwarfs-t, dwarfs-t-rs and libtfs are standalone open-source components: consumable without knowing tebako exists, licensed for it (BSD-2-Clause; note the dwarfs backend links GPL-3.0 DwarFS). The Rust tfs crate is a drop-in libtfs.so/.a — same ABI, second implementation.
Anatomy of a package.
Every package is the same byte-strip: three parts plus a trailer that says what's inside and — when signed — proves it. The full field tables live in concepts and the chain of trust.
The trust chain.
One signature mechanism — OpenPGP via rnp-rs — from the publisher's key to the user's run. Verification happens at install, never per run; failures are named exits, never crashes. Details: the chain of trust.
Who it's for.
Developers publishing apps
Press once per platform in a matrix CI job — no heroics per target. Native-extension apps build against the runtime's SDK instead of a prayer. The packager needs no host Ruby: tebako-cli is a single static binary.
Developers distributing versions
Your own GitHub releases are the registry: signed .tfs payloads, a manifest, per-version runtime constraints. No central store, no gatekeeper — and your users get version pinning for free.
End users
Run a binary and never think about Ruby — or, with tebako installed, manage every tool's version with zero reinstalls: one shims directory on PATH, project pins that just work, runtimes shared and downloaded once.
Keep reading.
The rest of this section is the same story told precisely: concepts · the release pipeline · the VFS model · runtime as image · the chain of trust · the feature surface · the Rust track · the repo map · the version manager · for contributors.