🏛️The 4 Core Pillars of definy
Code is edited directly as an Abstract Syntax Tree (AST), not characters in text. Parenthesis mismatches, typoed keywords, and syntax errors are mathematically impossible.
All functions, types, and values are identified by their cryptographic SHA-256 content hashes. Code once written can never be mutated, broken by dependencies, or lost in downstream breaking changes.
Every commit and account creation is signed with Ed25519 and encoded into RFC 8949 Deterministic CBOR. The client independently verifies proofs in WebAssembly without trusting the server.
definy's compiler, typechecker, and WebAssembly emitter run directly in the browser and Cloudflare Workers. definy is capable of evaluating and compiling its own language constructs natively.
⚖️Traditional Programming vs. definy
| Dimension | Traditional Ecosystems | definy |
|---|---|---|
| Code Representation | Flat text files (.ts, .rs, .py) | Cryptographic AST Nodes (ContentHash) |
| Syntax Errors | Frequent parse/syntax errors during typing | Impossible by design (Structure Editor) |
| Dependency Locking | SemVer string ranges (vulnerabilities & breakage) | Exact ContentHash linkage (Never breaks) |
| Transport Protocol | Ad-hoc REST / GraphQL endpoints | Connect-RPC (HTTP POST + Protobuf / JSON) |
| Verification & Trust | Centralized package registries (npm, crates.io) | Client-side cryptographic verification (Zero-trust) |
| Execution & Runtime | OS-dependent toolchains & package managers | Native WebAssembly JIT (Zero config edge/browser) |
📦Builtin Modules
AST node definitions, self-hosted type checker, evaluator, and WebAssembly fixed-point compiler.
Arithmetic, bitwise, boolean logic, string UTF-8 streams, and high-performance list utilities.
Standard clock, monotonic time, and cryptographically secure random number capabilities.
Instruction opcodes, LEB128, and sections of WebAssembly binaries, independent of the definy compiler.
Triangle area computation, greeting routines, prime number sieve, and AST calculator.
The order, titles and Zundamon's narration of the slides at the top of this page. The page draws the value story.slides.
⚡Connect-RPC (gRPC) & CAS Integration
definy replaces REST with Connect-RPC over HTTP POST. Every procedure uses deterministic Protobuf and CBOR payloads with content-addressed CAS caching.
Stream and query deterministic signed events from D1.
List every branch of every project with its creator and latest commit event.
Submit Ed25519-signed events (module commits or account creation) with verification.
Negotiate missing CAS content hashes between client and server before upload.
Upload raw content bytes addressed by their SHA-256 cryptographic hash.
Retrieve immutable CAS objects (AST trees, Wasm binaries, definitions).
Send an HTTP request the browser cannot send because of CORS on behalf of an allowed account (used by wasi.io programs).
Enter an expression and run it. Runs are kept here.