How usestrata/strata works
Strata is a self-hosted, statically typed language and native compiler for games and real-time software. The main workflow takes source through lexing, parsing, type checking, and code generation, then assembles and links a native program; it also supports C output, projects, and C interop. Separate capabilities include the embeddable compiler API and editor syntax highlighting. The README documents the compiler stages and capabilities, but most compiler implementation files were not sampled, so internal call relationships are not inferred.
Main entry points: stratac.strata stratac CLI · checker.strata Type Checker · strata.h C Embedding API · lexer.strata Lexer
Components 21
Compiler
- stratac CLI
compiler/src/stratac.strata - Lexer
compiler/src/lexer.strata - Parser
compiler/src/parser.strata - Type Checker
compiler/src/checker.strata - Module Loading
compiler/src/modules.strata - IR Lowering
compiler/src/lower.strata - Optimizer
compiler/src/opt.strata
Code Generation
- Native Backend
compiler/src/native.strata - Assembler
compiler/src/asm.strata - Linker
compiler/src/linker.strata - C Output
compiler/src/cheader.strata
Projects and Embedding
- Project Builds
compiler/src/project.strata - C Embedding API
compiler/api/strata.h - C++ Wrapper
compiler/api/strata.hpp - C# Bindings
compiler/api/Strata.cs - Runtime Libraries
compiler/lib
Editor Support
- VS Code Grammar
editors/vscode/syntaxes/strata.tmLanguage.json - Visual Studio Support
editors/visualstudio
Other components
- Programmer
- Strata Source
- Native Program
Connections 20
- Programmer → Strata Source: writes
README.md - Programmer → stratac CLI: invokes
README.md - stratac CLI → Lexer: compiles source
README.md - Lexer → Parser: tokens for
README.md - Parser → Type Checker: checks with
README.md - Type Checker → Module Loading: supports imports
- Type Checker → IR Lowering: lowers checked code
- IR Lowering → Optimizer: optimizes IR
- Optimizer → Native Backend: generates native code
README.md - Native Backend → Assembler: emits assembly
README.md - Assembler → Linker: produces object code
README.md - Linker → Native Program: links executable
README.md - stratac CLI → C Output: can target C
README.md - stratac CLI → Project Builds: builds projects
README.md - Programmer → C Embedding API: embeds compiler
compiler/api/strata.h - C++ Wrapper → C Embedding API: wraps
compiler/api/strata.hpp - C# Bindings → C Embedding API: calls API
compiler/api/Strata.cs - Project Builds → Runtime Libraries: uses libraries
- Programmer → VS Code Grammar: edits with
README.md - Programmer → Visual Studio Support: edits with
README.md