mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-06 11:46:41 +01:00
38 lines
830 B
Rust
38 lines
830 B
Rust
extern crate clap;
|
|
extern crate crossterm;
|
|
extern crate engine;
|
|
|
|
type StdResult<T> = Result<T, Box<dyn std::error::Error>>
|
|
|
|
pub fn main () -> StdResult<()> {
|
|
let cli = Cli::parse();
|
|
let engine = run_jack_engine(move |_: &Client, _: &ProcessScope| {
|
|
Control::Continue
|
|
});
|
|
let app = App::new()
|
|
}
|
|
|
|
pub struct App {
|
|
sleep: std::time::Duration
|
|
}
|
|
|
|
impl App {
|
|
fn init () -> Self {
|
|
Self {
|
|
sleep: std::time::Duration::from_millis(16)
|
|
}
|
|
}
|
|
fn run (&self) -> StdResult<()> {
|
|
loop {
|
|
self.update()?;
|
|
self.render()?;
|
|
std::thread::sleep(self.sleep);
|
|
}
|
|
}
|
|
fn update (&self) -> StdResult<()> {
|
|
}
|
|
fn render (&self) -> StdResult<()> {
|
|
use crossterm::*;
|
|
let (cols, rows) = terminal::size()?;
|
|
}
|
|
}
|