How tobureinhardt/neyuki works
Neyuki is a Lua-like scripting language whose primary workflow takes .nyk source through parsing, semantic checks and IR-based bytecode generation to execution on a register VM. The repository also provides linting, module loading, package management, debugger protocol support, and HTTP, SQL, crypto and UI libraries. Runtime wiring is based on the sampled entry points and module-loader code; library capability links are documented in the README, but their internal call paths were not sampled.
Main entry points: machine.rs Register VM · compiler/mod.rs Compiler · main.rs CLI · module_loader/mod.rs Module loader
Components 23
Language Front End
- Lexer
src/lexer.rs - Parser and AST
src/parser/mod.rs - Semantic analysis
src/sema/mod.rs - Lint rules
src/lint/mod.rs - Diagnostics
src/diagnostics/mod.rs
Compilation and Execution
- Compiler
src/compiler/mod.rs - IR optimizer
src/compiler/ir/mod.rs - Bytecode format
src/bytecode/mod.rs - Register VM
src/vm/machine.rs - Tree-walk runtime
src/runtime.rs
Runtime Capabilities
- Module loader
src/module_loader/mod.rs - HTTP library
src/http_lib.rs - Crypto library
src/crypto_lib.rs - SQL library
src/sql_lib.rs - UI library
src/ui_lib.rs - Filesystem library
src/fs_lib.rs
Developer and Package Services
- CLI
src/main.rs - Package manager
src/pkg/mod.rs - Debugger protocol
src/dap.rs - Stack traces
src/stack_trace/mod.rs
Other components
- Script author
- HTTP and database services
- Program output
Connections 27
- Script author → CLI: runs command
- CLI → Lint rules: runs lint
- CLI → Compiler: compiles source
- CLI → Register VM: runs file
- Lexer → Parser and AST: provides tokens
- Parser and AST → Compiler: provides AST
- Compiler → Semantic analysis: checks semantics
- Semantic analysis → Compiler: returns diagnostics
- Compiler → IR optimizer: builds and optimizes
- IR optimizer → Bytecode format: generates bytecode
- Bytecode format → Register VM: executes proto
- Lint rules → Compiler: parses source
- Lint rules → Diagnostics: renders report
- CLI → Package manager: runs package commands
- CLI → Debugger protocol: starts session
- Module loader → Filesystem library: reads modules
- Module loader → Compiler: compiles source modules
- Module loader → Bytecode format: deserializes and verifies
- Register VM → HTTP library: exposes library
- Register VM → Crypto library: exposes library
- Register VM → SQL library: exposes library
- Register VM → UI library: exposes library
- HTTP library → HTTP and database services: sends requests
- SQL library → HTTP and database services: queries databases
- Register VM → Program output: produces results
- Tree-walk runtime → Program output: evaluates source
- Register VM → Stack traces: formats trace