Skip to content

Inside Palamedes

“Written in Rust” is the boring half.

The useful question is where the model lives, how it crosses the host boundary, and what prevents a framework integration from becoming a second i18n system. Palamedes keeps the answer inspectable in source and decision records.

00 — The wrapper question

One model, several hosts

Adapters connect the application; they do not redefine the product.

An application owns its routing, locale policy, rendering, and hosting. Palamedes owns the work that must stay consistent when any of those choices changes: authoring, transforms, catalogs, validation, compilation, and the runtime contract.

  1. 01

    Application

    Routes, documents, locale policy, rendering

  2. 02

    Toolchain

    Author, transform, extract, validate

  3. 03

    Native core

    Catalog semantics, audit, merge, compile

  4. 04

    Artifacts

    Generated modules, types, locale catalogs

  5. 05

    Runtime

    Request-scoped lookup and formatting

Typed N-API boundary · between orchestration and native semantics

01 — Compiled output

A real production artifact

The catalog enters the application as code, not a parser job.

The native compiler renders executable catalog modules. This is exact output from the renderer—not a hand-written approximation. Production hosts load that checked artifact through the parser-free entrypoint.

Generated catalog module

Inspect native renderer →
import{defineCompiledCatalog as __palamedesDefineCompiledCatalog}from"@palamedes/core/compiled";const __pm0=(v,r)=>r.join("Hallo ",r.value(v,"name"));const __pb0=(v,r,p)=>r.join(r.pound(p)," Nachricht");const __pb1=(v,r,p)=>r.join(r.pound(p)," Nachrichten");const __pc0={["one"]:__pb0,["other"]:__pb1};const __pm1=(v,r)=>r.plural(v,"count",0,"plural",__pc0);export const messages=__palamedesDefineCompiledCatalog({["greeting"]:__pm0,["inbox"]:__pm1});export default { messages };

02 — The machine

Mechanisms, not adjectives

Ten places where the design refuses to split apart.

Every claim below points to an artifact or an accepted decision. The list is intentionally implementation-facing: it is more useful than a generic language or performance badge.

  1. 01

    Compiled, not interpreted

    Generated catalogs compile into message functions. The production entrypoints keep the ICU parser out of that module graph while compatibility entrypoints retain deliberate support for authored string catalogs.

    Native catalog renderer
  2. 02

    The cache trusts the file system, conservatively

    Extraction caches source analysis behind conservative file stamps. A cache miss is normal; a result that cannot be trusted is discarded instead of being treated as an optimization win.

    Extraction cache
  3. 03

    Arenas are reused, not allocated per file

    Each extraction worker owns a thread-local Oxc arena and resets it between files. On the 1,500-file corpus, replacing per-file allocation removed the allocator pressure that had obscured useful parallel work.

    Thread-local extraction arena
  4. 04

    SIMD is used where it pays

    Ferrocat's PO scanner uses vectorized byte search—including a NEON path—then falls back to portable search. The optimization lives below the catalog contract, so host adapters do not need to know it exists.

    Ferrocat PO scanner
  5. 05

    Parallelism is earned by measurement

    The 1,500-file fixture measured 119 ms serial, reached 45 ms at four workers, then regressed to 197 ms at twenty. Profiling attributed 92.8% of twenty-worker samples to mach_vm_protect, so the default is bounded rather than maximal.

    Worker-count evidence
  6. 06

    Ferrocat is one catalog engine

    Ferrocat performs catalog parsing, merging, auditing, and compilation as one semantic surface. It exists so catalog correctness does not depend on a set of loosely coordinated scripts.

    Catalog artifact pipeline
  7. 07

    The host boundary is typed and workflow-shaped

    The Node binding passes typed values across N-API and exposes meaningful workflow operations. It avoids JSON transport and avoids pushing catalog semantics back into TypeScript orchestration.

    Node binding surface
  8. 08

    Adapters stay thin

    Framework integrations own host concerns such as module hooks, routing conventions, and rendering. They do not become alternate implementations of extraction, catalog behavior, or runtime meaning.

    Adapter architecture
  9. 09

    Hosts converge on one runtime contract

    Each request receives one getI18n-shaped runtime and one document locale. Server rendering, hydration, formatters, and React Router RSC stay inside that request scope instead of accumulating framework-specific semantics.

    Request-scope contract
  10. 10

    Machine checks guard the marketing

    The site derives benchmark display, corpus scope, matrix axes, and decision indexes from checked repository data. A changed fixture or missing decision cannot silently become a stronger public claim.

    Public-evidence guards

Inspect the evidence before you choose the foundation.