How huhm-cc/russd-core works
Russd is a statically typed, Rust-like language with an optimizing compiler and a safe bytecode VM; its documented workflow is to run, check, optimize, or inspect Russd source through the CLI. The graph also preserves the separate Next.js documentation site and its localized guides, configuration, core-download, and open-source pages. Core compilation calls are visible in the library façade; some CLI and bytecode-stage wiring is documented but not shown in the excerpts, so those links are marked unverified.
Main entry points: loader.rs Source loader · check.rs Type and borrow checker · interp.rs VM and interpreter · parser.rs Parser
Components 24
CLI and loading
- Command-line interface
src/main.rs - Source loader
crates/russd-lang/src/loader.rs
Language front end
- Lexer
crates/russd-lang/src/lexer.rs - Token model
crates/russd-lang/src/token.rs - Parser
crates/russd-lang/src/parser.rs - Syntax tree
crates/russd-lang/src/ast.rs - Type and borrow checker
crates/russd-lang/src/check.rs - Type definitions
crates/russd-lang/src/types.rs - Diagnostics
crates/russd-lang/src/diag.rs
Compiler and runtime
- AST optimizer
crates/russd-lang/src/opt.rs - Bytecode compiler
crates/russd-lang/src/bytecode.rs - VM and interpreter
crates/russd-lang/src/interp.rs - Runtime sandbox
crates/russd-lang/src/sandbox.rs - Local HTTP server
crates/russd-lang/src/http_server.rs
Documentation site
- Documentation pages
web/src/app/howto-use/[lang]/page.tsx - Guide content
web/src/lib/howto-use.ts - Configuration guide
web/src/app/howto-configuration/[lang]/page.tsx - Core download page
web/src/app/download-core/[lang]/page.tsx - Open-source page
web/src/app/opensource/page.tsx - Site homepage
web/src/app/page.tsx - Site content model
web/src/lib/site.ts
Other components
- Russd author
- Host environment
- Documentation reader
Connections 26
- Russd author → Command-line interface: runs commands
- Command-line interface → Source loader: loads source
- Source loader → Lexer: lexes source
crates/russd-lang/src/loader.rs - Source loader → Parser: parses tokens
crates/russd-lang/src/loader.rs - Source loader → Type and borrow checker: checks program
crates/russd-lang/src/loader.rs - Source loader → AST optimizer: optimizes program
crates/russd-lang/src/loader.rs - Lexer → Token model: produces tokens
crates/russd-lang/src/lexer.rs - Parser → Token model: reads tokens
crates/russd-lang/src/parser.rs - Parser → Syntax tree: builds AST
crates/russd-lang/src/parser.rs - Type and borrow checker → Syntax tree: checks AST
crates/russd-lang/src/check.rs - Type and borrow checker → Type definitions: resolves types
crates/russd-lang/src/check.rs - Type and borrow checker → Diagnostics: reports errors
crates/russd-lang/src/check.rs - Source loader → Diagnostics: returns errors
crates/russd-lang/src/loader.rs - AST optimizer → Syntax tree: rewrites AST
crates/russd-lang/src/opt.rs - AST optimizer → Bytecode compiler: emits bytecode
- Bytecode compiler → VM and interpreter: runs bytecode
crates/russd-lang/src/bytecode.rs - VM and interpreter → Runtime sandbox: enforces limits
crates/russd-lang/src/interp.rs - VM and interpreter → Local HTTP server: binds listener
crates/russd-lang/src/interp.rs - VM and interpreter → Host environment: uses host services
- Documentation reader → Site homepage: reads site
- Documentation reader → Documentation pages: opens guides
- Documentation reader → Configuration guide: opens guide
- Documentation reader → Core download page: opens downloads
- Documentation reader → Open-source page: reads license
- Documentation pages → Guide content: renders content
- Site homepage → Site content model: uses site data