Skip to main content

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

PackageNameDescription
packages/compiler@rank-lang/compilerCompiler library and programmatic API: parsing, resolution, type checking, evaluation, emission, providers
packages/clirankThe rank CLI binary
packages/server-runtime@rank-lang/server-runtimeServe-time runtime boundary for rank serve
packages/plugins/faker@rank-lang/plugin-fakerFirst-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/:

DirectoryResponsibility
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.md is the index
  • plan/ — implementation plan and roadmap; PLAN.md is the index
  • plan/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.