How treymouledoux/grid9 works
Grid9 is a Rust interpreter for an esoteric language whose state is a 3×3 binary grid. The primary workflow is to invoke the CLI with a script, load its optional TOML settings, preprocess and validate the source, then execute it and emit glyph-based output. The CLI also exposes glyph conversion, documentation, version/about, and cleanup commands. The README documents bundled examples and language documentation. Source excerpts establish preprocessing, configuration, storage, and glyph behavior; some CLI dispatch details are omitted, so those links are marked unverified.
Main entry points: main.rs CLI commands · file_man.rs Data manager · preprocessor.rs Preprocessor · interpreter.rs Grid interpreter
Components 11
CLI
- CLI commands
src/main.rs
Language runtime
- Script settings
src/language/config.rs - Preprocessor
src/language/preprocessor.rs - Grid interpreter
src/language/interpreter.rs - Glyph codec
src/language/glyphs.rs
User data
- Data manager
src/file_man.rs - User data
- Preprocessor cache
Bundled resources
- Language documentation
src/components/documentation - Example scripts
src/components/examples
Other components
- CLI user
Connections 13
- CLI user → CLI commands: runs commands
README.md - CLI commands → Script settings: loads settings
src/main.rs - CLI commands → Preprocessor: preprocesses source
src/main.rs - CLI commands → Grid interpreter: runs processed code
- CLI commands → Glyph codec: converts glyphs
- Grid interpreter → Glyph codec: decodes grid
src/language/interpreter.rs - Preprocessor → Preprocessor cache: writes cached code
src/language/preprocessor.rs - CLI commands → Data manager: initializes data
src/main.rs - Data manager → User data: creates and refreshes
src/file_man.rs - Data manager → Language documentation: installs resources
src/file_man.rs - Data manager → Example scripts: installs resources
src/file_man.rs - CLI commands → Language documentation: opens documentation
README.md - CLI commands → Example scripts: selects examples
src/main.rs