How iyilang/iyi works
iyi is a Crystal-compatible programming language and compiler, with declaration-based module compilation as its defining workflow: users invoke the compiler, which compiles modules against imported declarations and can reuse module artifacts containing declarations and machine code. The README also documents LLVM native output, Crystal compatibility, concurrency, dependencies, and an LSP/editor experience. Compiler implementation details were not excerpted, so stage-level links beyond those documented are omitted; dashed links mark plausible but unverified integration points.
Main entry points: command Compiler CLI · semantic Semantic analysis · llvm LLVM backend · artifact Module artifacts
Components 21
Compiler
- Compiler CLI
src/compiler/command - Syntax front end
src/compiler/syntax - Semantic analysis
src/compiler/semantic - IR normalization
src/compiler/crystal - Intermediate representation
src/compiler/ir - IR optimization
src/compiler/ir/opt - LLVM backend
src/compiler/backend/llvm - Native backend
src/compiler/native
Modules and tools
- Module artifacts
src/compiler/artifact - Module loader
src/compiler/iyi/loader - Dependency management
src/compiler/iyi/mod
Runtime and libraries
- Language runtime
src/crystal - Concurrency
src/fiber - Standard library
src - Wasm host bindings
src/iyi/wasm/iyi.mjs
Developer experience
- Language server
src/compiler/iyi/lsp - VS Code client
editors/vscode/extension.js
Other components
- Developer
- LLVM
- Crystal ecosystem
- Editor user
Connections 18
- Developer → Compiler CLI: invokes
README.md - Compiler CLI → Module artifacts: emits or uses
README.md - Module artifacts → Module loader: supplies declarations
README.md - Compiler CLI → LLVM backend: compiles via
README.md - LLVM backend → LLVM: generates code with
README.md - Compiler CLI → Crystal ecosystem: supports Crystal
README.md - Editor user → VS Code client: edits code
editors/vscode/extension.js - VS Code client → Language server: starts
editors/vscode/extension.js - Compiler CLI → Dependency management: resolves and pins
README.md - Compiler CLI → Concurrency: compiles support for
README.md - Compiler CLI → Wasm host bindings: targets freestanding wasm
- Semantic analysis → Module artifacts: checks declarations from
- Syntax front end → Semantic analysis: feeds analysis
- Semantic analysis → IR normalization: lowers program
- IR normalization → Intermediate representation: produces IR
- Intermediate representation → IR optimization: is optimized by
- IR optimization → LLVM backend: feeds backend
- Language runtime → Standard library: supports library