Avenir is a statically‑typed programming language with an explicit, readable syntax and a compact VM runtime. It is designed for building reliable software with clear type boundaries and a pragmatic standard library.
- Explicit types: no hidden inference; types are always visible.
- Practical standard library: filesystem, networking, JSON, HTTP, time.
- Simple runtime model: bytecode VM with clear semantics.
- Error handling:
try / catchwith a singleerrortype.
Alpha. The language is usable for experimentation, but the surface area is still evolving and some features are not yet implemented (see roadmap).
pckg main;
import std.time;
fun main() | void {
var now | time.DateTime = time.now();
print(now.format("YYYY-MM-DD HH:mm:ss"));
}
Requirements:
- Go 1.22+
Build the compiler/VM:
go build -o avenir ./cmd/avenir./avenir run ./examples/hello.avgo test ./...cmd/avenir— CLI entrypointinternal/lexer— lexerinternal/parser— parserinternal/ast— ASTinternal/types— type checkerinternal/ir— bytecode compilerinternal/vm— VM runtimeinternal/runtime— builtins and host servicesstd/— standard library (Avenir code)docs/— language and engine documentationexamples/— example programs
- Native code backend (currently VM only)
- Generics for user‑defined types
- Optional chaining and pattern matching
- Expanded stdlib utilities
MIT — see LICENSE.