43 lines
1.1 KiB
Rust
43 lines
1.1 KiB
Rust
//! Framework Binary
|
|
//!
|
|
//! Main entry point for the framework application.
|
|
|
|
use components::prelude::*;
|
|
use std::env;
|
|
|
|
#[tokio::main]
|
|
async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|
// Initialize logging
|
|
env_logger::init();
|
|
|
|
let args: Vec<String> = env::args().collect();
|
|
|
|
if args.len() < 2 {
|
|
println!("Framework v{}", VERSION);
|
|
println!("Usage: framework <command>");
|
|
println!();
|
|
println!("Commands:");
|
|
println!(" serve Start the web server");
|
|
println!(" version Show version information");
|
|
return Ok(());
|
|
}
|
|
|
|
match args[1].as_str() {
|
|
"serve" => {
|
|
println!("Starting framework server...");
|
|
// TODO: Implement server functionality using components
|
|
println!("Server functionality not yet implemented");
|
|
}
|
|
"version" => {
|
|
println!("Framework v{}", VERSION);
|
|
}
|
|
_ => {
|
|
eprintln!("Unknown command: {}", args[1]);
|
|
eprintln!("Run 'framework' for usage information");
|
|
std::process::exit(1);
|
|
}
|
|
}
|
|
|
|
Ok(())
|
|
}
|