What is traits.build?
A polyglot function platform — write a function in any language (JS, Python, Rust, Java, Perl, TypeScript), expose it at a dot-notation address, and call it from any other language or HTTP client. The core value proposition: "Universal Composable Functions — compose JS, Python, Rust into one seamless API."
Runtime architecture
A Rust binary (straits) acts as the polyglot router. It loads function definitions from .trait.toml files, starts language-specific worker subprocesses on demand (Node.js, Python, Java, Perl — Rust runs in-process), and dispatches calls over newline-delimited JSON on stdin/stdout. Each request carries a UUID for concurrent request/response multiplexing. The HTTP layer is Actix-web; the trait registry is a thread-safe DashMap.
Three-layer kernel model
Kernel — fixed infrastructure: registry, dependency resolution, trait loader, interface resolution.
Namespaces — capability domains (sys, net, gui, kernel, …), each defined by a namespace.toml manifest.
Traits — concrete implementations. A trait path can act as an interface (sys.rename) with multiple prioritised implementations (sys.rename.posix at priority 100, sys.rename.safe at 50).
Stable Traits — release & verification layer
Immutable, backward-compatible trait releases with blockchain-anchored integrity. Once a trait is published its signature, tests, and interface contracts are locked — future releases must be backward-compatible. Every release is SHA-256 checksummed and appended to a local hash-chain registry, optionally anchored to the Base (EVM) blockchain. All 14 sys.* traits are compiled as native Rust modules into the binary — no subprocess overhead for system calls.
Stable Traits system map
| Layer |
Trait |
Purpose |
| Checksum | sys.checksum | Deterministic SHA-256 over canonicalised JSON |
| Release | sys.release | Snapshot, verify, test, fix — creates .releases.json artefacts |
| Registry | sys.registry_chain | Append-only local hash-chain with genesis block and verification |
| Blockchain | sys.chain_anchor_* | 9 traits for Base network anchoring (prepare, submit, sign, verify, …) |
| Gated calls | sys.straits_call | Every call gated by chain + compat verification before execution |
| Versioning | sys.straits_version | Auto YYMMDD versioning with intraday suffix (YYMMDD.HHMMSS) |
Key CLI commands
traits call sys.release snapshot gui.straits_landing # snapshot a release
traits call sys.release verify gui.straits_landing # verify compat chain
traits call sys.release test gui.straits_landing # run feature tests
traits call sys.registry_chain verify # verify full hash-chain
traits call sys.straits_call gui.straits_landing.render dark true # gated call
traits validate traits/sys/ # backward-compat check
traits.build landing page scope (traits.build)
Phase 1: static marketing with tabbed code examples (API / Python / JS / TOML), 6-feature highlight grid (Polyglot, Composable, AI-Native, Visual Builder, Package Format, Handles & Streaming), SDK installation grid (Rust/Cargo, npm, pip), and install script. Phase 2: embedded live playground, trait marketplace browser, real-time execution demo.