How thodark/astez works
Astez is a general-purpose language toolchain: users write .az programs and can run them on a register VM or build native AOT executables. The graph preserves the documented stages, runtime capabilities, and IDE support. Many implementation links are only implied by the README or repository structure; those are dashed and unverified rather than asserted as inspected calls.
Main entry points: main.rs vyloz CLI · vm.rs Register VM · stdlib.rs Core standard library · loader.rs Parser and loader
Components 24
Language Front End
- Lexer and tokens
crates/astez-lexer/src/lib.rs - Parser and loader
crates/astez-parser/src/loader.rs - Syntax tree
crates/astez-ast/src/ast.rs - Source formatter
crates/astez-ast/src/fmt.rs
Analysis and Diagnostics
- Type checker
crates/astez-types/src/checker.rs - Diagnostics and spans
crates/astez-diagnostics/src/source_map.rs
Execution and Runtime
- Bytecode compiler
crates/astez-bytecode/src/compiler.rs - Bytecode chunks and ISA
crates/astez-bytecode/src/chunk.rs - Register VM
crates/astez-vm/src/vm.rs - NaN-boxed values
crates/astez-vm/src/value.rs - Heap, arenas, and GC
crates/astez-vm/src/heap.rs - Core standard library
crates/astez-vm/src/stdlib.rs - OS, HTTP, and JSON
crates/astez-vm/src/std_extra.rs - Threads and channels
crates/astez-vm/src/concurrency.rs
Native AOT
- C code generation
crates/astez-codegen/src/emit.rs - Native build orchestration
crates/astez-codegen/src/build.rs - Generated C runtime
crates/astez-codegen/src/runtime_c.rs
Developer Tools
- vyloz CLI
crates/astez-cli/src/main.rs - Language server
crates/astez-lsp/src/lib.rs - VS Code extension
editors/vscode-astez/extension.js
Other components
- Astez programmer
- Astez source
- Native executable
- C compiler
Connections 26
- Astez programmer → vyloz CLI: invokes
- Astez programmer → Astez source: writes
- Astez source → vyloz CLI: runs or builds
README.md - vyloz CLI → Lexer and tokens: starts processing
- Lexer and tokens → Parser and loader: supplies tokens
- Parser and loader → Syntax tree: produces tree
- Parser and loader → Type checker: checks program
- Type checker → Diagnostics and spans: reports issues
- vyloz CLI → Bytecode compiler: compiles for VM
- Bytecode compiler → Bytecode chunks and ISA: emits instructions
crates/astez-bytecode/src/compiler.rs - Bytecode chunks and ISA → Register VM: executes
- Register VM → NaN-boxed values: uses
crates/astez-vm/src/vm.rs - Register VM → Heap, arenas, and GC: allocates and collects
crates/astez-vm/src/vm.rs - Register VM → Core standard library: dispatches builtins
crates/astez-vm/src/vm.rs - Core standard library → Heap, arenas, and GC: accesses objects
crates/astez-vm/src/stdlib.rs - Core standard library → OS, HTTP, and JSON: uses extended builtins
crates/astez-vm/src/stdlib.rs - Core standard library → Threads and channels: uses channels
crates/astez-vm/src/stdlib.rs - Threads and channels → Heap, arenas, and GC: transfers values
crates/astez-vm/src/concurrency.rs - vyloz CLI → C code generation: requests AOT
- C code generation → Generated C runtime: includes runtime
crates/astez-codegen/src/emit.rs - C code generation → Native build orchestration: provides generated C
crates/astez-codegen/src/build.rs - Native build orchestration → C compiler: invokes compiler
crates/astez-codegen/src/build.rs - C compiler → Native executable: produces executable
README.md - vyloz CLI → Source formatter: formats source
README.md - Astez programmer → Language server: requests IDE features
README.md - VS Code extension → Language server: connects to