Status: Vision document. This describes the long-term direction for dist_agent_lang. For current capabilities, see AGENT_SETUP_AND_USAGE.md and the root README.
dist_agent_lang (DAL) is a domain-specific language executed by a tree-walking interpreter written in Rust. It is designed around two primary differentiators: autonomous agent orchestration and blockchain-native programming.
dal run <file.dal>
executes programs via the Rust-hosted tree-walking interpreter.@trust), and chain interaction
primitives.dal serve for
hosting agent endpoints and web services..mold.dal).dal run,
dal serve, dal test, dal fmt, and
related commands.DAL source is parsed into an AST and evaluated directly by the interpreter. There is no compilation to machine code, bytecode, or intermediate representation in the current release. The Rust host provides memory safety and performance for the interpreter itself, but DAL programs run at interpreted speed.
Compile targets (@compile_target("solidity"), etc.)
exist as transpilation / code-generation backends --
they emit source code for other platforms rather than producing native
binaries.
Most languages treat agents as an application-layer concern. DAL provides agent lifecycle management -- spawn, message-passing, coordination, evolution, and persistent memory -- as built-in language constructs. This makes multi-agent systems expressible in tens of lines rather than hundreds.
agent Coordinator {
fn on_message(msg) {
let workers = spawn_agents("Worker", 3);
broadcast(workers, msg);
let results = collect_responses(workers);
return aggregate(results);
}
}
DAL includes trust-model annotations, on-chain/off-chain separation, and a Solidity transpiler. Smart contract logic can be written in DAL syntax and converted to deployable Solidity, reducing context-switching for teams that work across application and contract layers.
@trust("hybrid")
service TokenTransfer {
fn transfer(from, to, amount) {
let tx = chain::send_transaction({
"from": from, "to": to, "amount": amount
});
log::info("transfer", {"tx_hash": tx.hash});
return tx;
}
}
The following sections describe planned capabilities that do not yet exist. They represent the long-term direction for DAL.
A future compiler pipeline would lower DAL programs to machine code (likely via Cranelift or LLVM), enabling:
Status: Not started. The interpreter remains the sole execution path.
A WASM compilation target would allow DAL programs to run in browsers and edge runtimes. Combined with the agent framework, this could enable client-side autonomous agents with near-native performance.
Status: Not started. The Solidity transpiler demonstrates the code-generation architecture that a WASM backend would follow.
Cross-compilation to iOS, Android, and resource-constrained edge devices would extend DAL's agent and blockchain primitives to mobile and IoT contexts.
Status: Not started. Depends on the native compilation pipeline.
Future compiler work could introduce ownership analysis or region-based memory management, providing compile-time safety guarantees beyond what the interpreter currently offers. Today, memory safety is inherited from the Rust interpreter host -- DAL programs themselves do not have independent memory safety properties.
Status: Research phase. No concrete design exists yet.
The end-state goal is a single DAL codebase that compiles to server (native), browser (WASM), mobile, and edge targets, with the agent and blockchain primitives available on all platforms.
@compile_target("wasm") // Browser
@compile_target("native") // Server
@compile_target("mobile") // iOS / Android
@compile_target("edge") // IoT / edge devices
Status: Aspirational. Each target depends on the compilation pipeline described above.
| Capability | Status | Dependencies |
|---|---|---|
| Tree-walking interpreter | Exists | -- |
| 30-module stdlib | Exists | -- |
| Agent framework (spawn/coordinate/evolve) | Exists | -- |
| Persistent agent memory | Exists | -- |
| Skills registry | Exists | -- |
HTTP server (dal serve) |
Exists | -- |
| Solidity transpiler | Exists | -- |
| Molds (module system) | Exists | -- |
| CLI toolchain | Exists | -- |
| Compile-time memory safety | Research | Ownership model design |
For general-purpose compiled application development, DAL is not yet a substitute for Rust, Go, or TypeScript. The roadmap above describes the path toward that goal.