Compiler Pipeline

The current path from source text to native output.

The Zynx compiler is organized as a conventional front end plus LLVM backend, with module packaging and runtime support around it.

Pipeline

source.zx
  -> lexer
  -> parser
  -> semantic analysis
  -> borrow and move checks
  -> module/header generation
  -> LLVM lowering
  -> object, executable, or .zxm bundle

Main Areas

AreaRepository path
Lexingzynx/src/lex
Parsingzynx/src/parse
Analysiszynx/src/analysis
Module loadingzynx/src/module
Formattingzynx/src/format
LSPzynx/src/lsp
LLVM backendzynx/src/codegen
Runtimezynx/lib/runtime
Packageszynx/src/package
Standard libraryzynx/lib/std
Testszynx/tests

Contributor Map

The parser builds the source tree accepted by the current compiler. The Tree-sitter grammar is useful for editor tooling, while zynx/src/parse is the implementation path used by compilation.

Semantic analysis resolves names, imports, types, overloads, visibility, and attribute validity. Borrow/move/lifetime checks run on analyzed source and are where many "language contract" diagnostics come from.

Module/header generation writes the static interface consumed by later imports and .zxm verification. Dynamic runtime loading is experimental/internal; normal source reaches modules through import resolution before codegen.

LLVM lowering produces object code, executables, or module bundles. Runtime support in zynx/lib/runtime supplies lower-level services used by generated code and selected standard-library modules.

Package tooling reads zynx.json, zynx.lock, local sources, and exact git dependencies before compiler module resolution. The package cache is an input to the build, not a registry or semver solver.

Tooling Entrypoints

zynx build main.zx
zynx run main.zx
zynx test main.zx
zynx format src tests
zynx server

The command-line driver is the user-facing path into this pipeline.