Capabilities
Which high-level features a Program can use when it renders to Rust — aimed at systems and back-end code, with the strong guarantees Rust brings.
Contents
How a Program becomes Rust, in parts. Start with the introduction, then follow each part into the rendered output and the runtime it links against.
- Introduction — what the Rust target is, and how to read the rest of this section.
- Capabilities — which high-level features are possible, built in or through a crate.
- Example — a full program using every keyword, and the Rust it renders to.
- Naming considerations — how Program's dotted names are carried into Rust.
- Entry point — starting a program from
mainwith its drivers. - Drivers — the native drivers that provide the interface, console and network.
- Runtime — the Reactive and Context machinery the rendered code links against.
- Native modules — the hand-written Rust behind
NATIVEfunctions. - Keywords — how each of Program's keywords renders to Rust.
- Project setup — the files and commands to build and run the rendered program.
- Reserved words — the words Rust keeps for itself, and how a colliding name is escaped.
What Rust is good for
Rust targets systems and back-end code where performance and safety matter. Like Go it has no native GUI, so the interface is a terminal; everything server-shaped is available through the standard library or a crate. The reactive core and the drivers are the same as any target; only the driver set differs.
| Feature | Status | How |
|---|---|---|
| User interface | Terminal | The interface driver renders Ui to a terminal. No built-in windowed GUI; the browser is served by JavaScript. |
| Console | Built in | Console maps to println! / std::io. |
| Networking | Via a crate | Network uses reqwest / tokio or hyper; the standard library has no HTTP client. |
| Asynchrony | Built in | A LOCKED state models an in-flight value; a driver on an async task completes it and re-enters the cycle. |
| Concurrency | Built in | Threads and async are first-class; the borrow checker keeps the shared reactive state on the main cycle safely. |
| Storage & files | Built in | Storage maps to std::fs. |
| Animation / graphics | Not native | No rendering surface on the server; time-based effects are limited to a terminal. |
Where a capability needs host code it arrives as a NATIVE
Rust function (needing a rust body) or a driver — see
native modules and
drivers.