Project Structure
The repository is a TypeScript monorepo. Source-of-truth documents live alongside the code so implementation decisions and language spec stay in sync.
Top-level layout
packages/ workspace packages (compiler, CLI, server runtime, plugins)
spec/ modular language specification chapters
plan/ implementation plan, architecture, roadmap, and testing notes
testdata/ shared fixtures used by the CLI integration suite
integration/ cross-package smoke tests run against built artifacts
website/ this Docusaurus documentation site
Workspace packages
| Package | Name | Description |
|---|---|---|
packages/compiler | @rank-lang/compiler | Compiler library and programmatic API: parsing, resolution, type checking, evaluation, emission, providers |
packages/cli | rank | The rank CLI binary |
packages/server-runtime | @rank-lang/server-runtime | Serve-time runtime boundary for rank serve |
packages/plugins/faker | @rank-lang/plugin-faker | First-party Faker provider |
Dependency direction: rank → @rank-lang/compiler, rank → @rank-lang/server-runtime, @rank-lang/server-runtime → @rank-lang/compiler.
Compiler areas
Inside packages/compiler/src/:
| Directory | Responsibility |
|---|---|
parser/ | Lexing and parsing; produces the AST |
names/ | Import resolution and name binding |
types/ | Static type checking |
eval/ | Deterministic graph evaluation and provider runtime interaction |
modules/ | Project graph loading and manifest handling |
emit/ | JSON, YAML, and TOML output serialization |
annotations/ | Compile-time annotation and constraint evaluation |
providers/ | Provider process protocol and lifecycle |
diagnostics/ | Diagnostic formatting and rendering |
Fixture corpus
packages/compiler/testdata/ contains parser and type-checking fixtures scoped to the compiler package.
testdata/ at the repository root contains shared fixtures still used by the CLI integration suite — manifests, source programs, and module-level scenarios.
Source documents
The spec and plan are kept close to the code so implementation work can update language decisions and compiler behavior in the same commit.
spec/— modular language specification;SPEC.mdis the indexplan/— implementation plan and roadmap;PLAN.mdis the indexplan/roadmap/— one file per completed or planned phase
This docs site is the guided front door. The source documents remain authoritative for language semantics and compiler internals.