Introduction
Experimental alpha — Phoenix is a statically typed programming language that compiles to portable bytecode and runs on a verified stack VM, without a garbage collector.
What is Phoenix?
Phoenix targets systems-style programs where memory is managed through ownership and moves rather than a GC. The MVP compiler already rejects use-after-move; borrow checking is planned post-MVP.
Programs compile to PHX0 bytecode (portable on disk) and execute on a Phoenix VM per platform. The long-term model keeps runtime effects visible—schedulable I/O and explicit actors are designed into the type system rather than hidden behind opaque OS-thread or GC abstractions. Today's MVP runs main on a single-process stack interpreter with no scheduler and no standard I/O.
Errors are values (Result, Option in the standard library, ? propagation)—not exceptions. The bundled std defines those types as ordinary Phoenix enums.
Design principles
- No garbage collector — ownership-first memory with moves,
CopyablevsClone, and use-after-move errors that cite the original move site. - Portable PHX0 bytecode — on-disk format, verified before execution, cross-platform stack VM.
- Errors as values —
Result,Option, and?propagation; no exceptions or silent failure. - Uniform
::syntax — functions, structs, enums, traits, and impls share one declaration style. - Runtime transparency (roadmap) — schedulable I/O and explicit actors visible in types; no hidden
async/awaitsuspension.
Example
Every executable program needs a zero-argument main:
Syntax at a glance
Next steps
- Getting started — install the compiler and run your first program.
- CLI reference —
phx check,phx run, andphx build. - Compiler repository — source, examples, and design documents.
