What is in the language
Everything here is implemented, statically checked and specified unless its row says otherwise: the syntax parses, the checks run and the runtime path exists. The specification describes current behaviour, and this page follows it.
Rows whose evidence differs are marked. linuxis a platform-specific path, modeled is checked as a formal model whose match to the shipped code is maintained by hand, and reserved is named and specified but not built. next release is on the compiler's main branch and ships in the next release.
One construct
- The locus
One construct where other languages have class, module, package, actor and service. An app, a cache, a handler and a library are all loci. Composition is a locus inside a locus.
- Lifecycle
birth,runanddissolve;params { }with defaults; parent and child nesting with deterministic cleanup on dissolve. - Perspectives
Live hot code swap at the cost of a pointer flip.
reperspectivecarries state across and re-points bus edges without dropping messages. - Modes
bulk,harmonicandresolutionprojections over capacity slots, for programs that reshape under load.
The typed bus
- Topics are declarations
topic T { payload: P; }with wire subjects, routing keys (keyed_by), and per-topic bounds with an explicit backpressure contract (or wait). - Traffic is declared
Peer loci do not reference one another. They communicate through a declared topic, and messages are copies. Subscription and publish are declared surface, so the compiler sees the whole message graph.
- Topology checked at compile time
hale checkrejects payload mismatches and unconditional re-entry inside a locus. It reports orphaned topics, cross-locus cycles and statically unbounded backpressure as advisories.hale verifyturns every advisory into a failing gate, so a project chooses its own strictness and the two kinds of finding stay distinct.
Types and data
- Structural interfaces
An
interfaceis satisfied by shape. There is noimpl I for L. - Synthesized forms
@form(vec | hashmap | ring_buffer | lru_cache)generates type-specialized collections;bounded[T; N]gives fixed capacity. No generics on the everyday path. - Element chains
xs.filter(it > 2).count()compiles to one loop, allocation-free, with no closure or iterator object. - Money and time as types
Decimal, typed timestamps and durations. Inference forlet, returns and locus params. f-strings. - Units, quantities, identities, ranges
A program declares units and the equations between them (
unit USD = 100 cent;), then integer types counted in them: aquantitysuch as Money, apointsuch as Price, adistinct Intthat never mixes with another, and anInt { range: 0..256; }. Every conversion is one exact factor; widening is free and narrowing names its rounding. The standard library's time units are declared the same way. New in 0.23.
Failure
fallible(E)in the typeEvery call that can fail is addressed at the call site with a disposition:
or default,or raise,or waitand the rest. No exceptions, nopanic.- Failure travels up
A child's failure goes to its parent, which owns recovery. There is no sideways error channel.
closureassertionsDeclared invariants, audited by the runtime at phase boundaries.
Effects, claims, constitutions, fleets
- Effect certificates
Ten effect classes (
syscall,block,time,entropy,allocand five more). Opt-in assertions such as@no_block,@deterministicand@effects(only: …)are proven transitively over the whole call graph, with numeric budgets (@budget) and per-phase contracts (@phase_effects). Incompleteness fails closed. - Claims
Named sentences over the assembled program graph, declared in
main, checked as errors, no runtime cost:forbid reaches,only edges,require,cover,count,bound, interposition withavoiding, lifecycle slices withduring. A violation returns a minimal countermodel in your own names. - Constitutions
One claimset adopted by many entry points, composed by union only, bound per deployment target in
hale.toml, and proven pairwise byhale check --matrix. - Fleets
Per-application topology artifacts compose into one deployment model. Cross-binary claims get cross-binary witnesses. Only an explicit route creates an edge. Signing and binary attestation carry the certificate to the machine that deploys it.
- The topology artifact
Byte-reproducible JSON with source maps, an integrity digest and every claim verdict. Commit it, and diff the architecture in review along with the text.
Memory and runtime
- Arena per locus
No garbage collector, no borrow checker, no lifetime annotations. Memory is freed deterministically when a locus dissolves.
- Model-checked synchronization modeled
Hand-transcribed models of the runtime's concurrent protocols (the lock-free bus, mailboxes, rings, arenas) are explored with GenMC in CI. The models check the synchronization logic across permitted interleavings. Their match to the production runtime is maintained by hand and is part of the trusted base. What that does and does not establish.
- Static dispatch by default
Devirtualized bus delivery and calls. Cooperative pools with epoll-backed parking. Pinned threads and
replicas = Kfan-out declared inmain. NUMA-aware arena placement and cache-domain pinning linux.
Deployment
- Same source, many shapes
placement { }andbindings { }inmaindecide threads, cores and transports. A test, one binary or a mesh of binaries is an edit to one block. - Transports
In-process queues, Unix sockets, zero-copy shared-memory rings, and broker adapters written as ordinary loci. Pluggable codecs.
Exposure next release
- API surfaces
api NAME { rpc Locus::fn requires: [role]; }, or@rpcon the handler. The compiler checks the rows, folds each surface into a contract digest, and prints the description a caller may see.hale check --apiprints the inventory, and--openapi,--json-schemaand--mcpprint a surface's client forms. - Roles
Declared vocabulary:
role manager includes clerk;. A requirement is written once on the row; who holds a role is a source the serve site names,std::api::StaticRolesor any locus satisfyingstd::api::RoleSource. - Serving
api::serve(Surface, transport, as:, receivers:, bound:, on_full:)overunix::Rpc,http::Rpcormcp::Rpc; a stream is a topic bound to aws::Hub. A handler may takectx: std::api::Contextfor the caller, the request id and the door it came through. - Clients
hale describe,call,watch,adminandmcp --appread an exposure's description and speak the contract's wire. The DNA head serves its commands the same way.
Interop
- C
@ffi("c")bindings with[ffi] csrccompilation, in both directions across the boundary. - WebAssembly
A
wasm32target with@exportloci and@ffi("js"). The playground runs the result in the browser. - Packages
hale fetchvendors pinned git dependencies. pond is the contributed library collection.
Standard library
- Path-called, no imports
Processes, env, filesystem, TCP and UDP with zero-copy readers, TLS, HTTP (router and client), JSON including a streaming builder, metrics, logging with sinks, compression, tar, crypto and hashing, encodings, randomness, strings, regex, sets, time.
hale doc --stdlibpublishes each function's effect classes from the same registry the checker proves against.
Toolchain
- One binary
build, run, check, verify, test, bench, fmt, doc, fetch and fleet, with the language server and the MCP server compiled in, so an editor, a CI job and a coding assistant read the same diagnostic. The toolchain in full.
Platforms
Three different questions, easy to run together: where a prebuilt compiler exists, where one can be built, and what a build can emit.
- Prebuilt compiler
Linux x86-64, Linux ARM64 and macOS on Apple Silicon, on GitHub Releases, selected automatically by the install script.
- Builds from source
The above, plus Intel macOS. Needs the LLVM 18 development libraries and
clang. - Emits
Native binaries for Linux and macOS, and
wasm32objects for the browser.x86_64-pc-windows-msvcis named byhale --list-targetsand refused with a precise error before any link step reserved.
Reserved
- Surface awaiting a workload
asyncandawaitkeywords, traits with explicit impls, macros, richer form shapes. The runtime frontier is cost: a cheaper call protocol and spawn path. The spec stays the arbiter of what ships. - To move a priority
The fastest signal is a real program that needs it. See community.