2025-08-09 15:14:44 +09:00
|
|
|
/*!
|
2025-09-20 09:11:52 +09:00
|
|
|
Minimal CLI entry point for Nyash.
|
|
|
|
|
Delegates to the library crate (`nyash_rust`) for all functionality.
|
|
|
|
|
*/
|
2025-08-19 05:43:37 +09:00
|
|
|
|
2025-08-19 05:36:01 +09:00
|
|
|
use nyash_rust::cli::CliConfig;
|
2025-09-03 05:04:56 +09:00
|
|
|
use nyash_rust::config::env as env_config;
|
2025-09-20 09:11:52 +09:00
|
|
|
use nyash_rust::runner::NyashRunner;
|
2025-08-09 15:14:44 +09:00
|
|
|
|
2025-08-14 13:16:12 +00:00
|
|
|
/// Thin entry point - delegates to CLI parsing and runner execution
|
|
|
|
|
fn main() {
|
2025-09-03 05:04:56 +09:00
|
|
|
// Bootstrap env overrides from nyash.toml [env] early (管理棟)
|
|
|
|
|
env_config::bootstrap_from_toml_env();
|
2025-08-14 13:16:12 +00:00
|
|
|
// Parse command-line arguments
|
|
|
|
|
let config = CliConfig::parse();
|
2025-09-17 07:43:07 +09:00
|
|
|
|
2025-08-14 13:16:12 +00:00
|
|
|
// Create and run the execution coordinator
|
|
|
|
|
let runner = NyashRunner::new(config);
|
|
|
|
|
runner.run();
|
2025-08-14 07:19:23 +09:00
|
|
|
}
|
|
|
|
|
|
2025-08-09 15:14:44 +09:00
|
|
|
#[cfg(test)]
|
|
|
|
|
mod tests {
|
|
|
|
|
use super::*;
|
2025-09-20 09:11:52 +09:00
|
|
|
use nyash_rust::box_trait::{BoxCore, NyashBox, StringBox};
|
2025-09-17 07:43:07 +09:00
|
|
|
|
2025-08-09 15:14:44 +09:00
|
|
|
#[test]
|
|
|
|
|
fn test_main_functionality() {
|
2025-09-20 09:11:52 +09:00
|
|
|
// Smoke: library module path wiring works
|
2025-08-14 13:16:12 +00:00
|
|
|
let string_box = StringBox::new("test".to_string());
|
2025-08-09 15:14:44 +09:00
|
|
|
assert_eq!(string_box.to_string_box().value, "test");
|
2025-09-20 09:11:52 +09:00
|
|
|
let _ = (); // CLI wiring exists via nyash_rust::cli
|
2025-08-09 15:14:44 +09:00
|
|
|
}
|
|
|
|
|
}
|