1 use std::rc::Rc; 2 3 4 use starry_server::{base::display::Display, config::Config, core::{starry_server, StarryServer, SCREEN_HEIGHT, SCREEN_WIDTH}}; 5 6 7 fn main() { 8 // TODO 考虑多个显示器 9 let mut displays : Vec<Display> = Vec::new(); 10 displays.push(Display::new(0, 0, SCREEN_WIDTH as i32, SCREEN_HEIGHT as i32)); 11 12 // TODO 暂时不考虑配置文件 13 let config: Rc<Config> = Rc::new(Config::default()); 14 15 //开启Starry Server 16 StarryServer::new(config, displays); 17 let server = starry_server().unwrap(); 18 server.run(); 19 } 20