Files
hakorune/src/main.rs

63 lines
1.5 KiB
Rust
Raw Normal View History

/*!
* Nyash Rust Implementation - Everything is Box in Memory Safe Rust
*
* This is the main entry point for the Rust implementation of Nyash,
* demonstrating the "Everything is Box" philosophy with Rust's ownership system.
*
* The main function serves as a thin entry point that delegates to the CLI
* and runner modules for actual processing.
*/
// Core modules
pub mod box_trait;
pub mod boxes;
pub mod environment;
pub mod tokenizer;
pub mod ast;
pub mod parser;
pub mod interpreter;
pub mod instance;
pub mod channel_box;
pub mod finalization;
pub mod exception_box;
pub mod method_box;
pub mod operator_traits;
pub mod box_operators;
pub mod value; // 🔥 NyashValue Revolutionary System
// 🚀 MIR Infrastructure
pub mod mir;
// 🚀 Backend Infrastructure
pub mod backend;
// 🚀 Refactored modules for better organization
pub mod cli;
pub mod runner;
use cli::CliConfig;
use runner::NyashRunner;
/// Thin entry point - delegates to CLI parsing and runner execution
fn main() {
// Parse command-line arguments
let config = CliConfig::parse();
// Create and run the execution coordinator
let runner = NyashRunner::new(config);
runner.run();
}
#[cfg(test)]
mod tests {
use super::*;
use box_trait::{StringBox, BoxCore};
#[test]
fn test_main_functionality() {
// This test ensures the module structure is correct
let string_box = StringBox::new("test".to_string());
assert_eq!(string_box.to_string_box().value, "test");
}
}