MCPcopy Create free account
hub / github.com/Eeive/Evcode-ide / main

Function main

src/main.rs:24–49  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

22
23#[tokio::main]
24async fn main() -> Result<()> {
25 enable_raw_mode()?;
26 let mut stdout = io::stdout();
27 execute!(
28 stdout,
29 EnterAlternateScreen,
30 EnableMouseCapture,
31 PushKeyboardEnhancementFlags(KeyboardEnhancementFlags::DISAMBIGUATE_ESCAPE_CODES)
32 )?;
33 let backend = CrosstermBackend::new(stdout);
34 let mut terminal = Terminal::new(backend)?;
35
36 let mut app = App::new().await;
37 let result = app.run(&mut terminal).await;
38
39 execute!(io::stdout(), DisableMouseCapture)?;
40 disable_raw_mode()?;
41 execute!(terminal.backend_mut(), LeaveAlternateScreen)?;
42 terminal.show_cursor()?;
43
44 if let Err(e) = result {
45 eprintln!("Error: {e}");
46 }
47
48 Ok(())
49}

Callers

nothing calls this directly

Calls 1

runMethod · 0.80

Tested by

no test coverage detected