mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-07 20:26:42 +01:00
refactor: compact
This commit is contained in:
parent
abee6cc2c8
commit
60627ac3e5
43 changed files with 923 additions and 780 deletions
8
.misc/crates/transport/Cargo.toml
Normal file
8
.misc/crates/transport/Cargo.toml
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
[package]
|
||||
name = "bloop_transport"
|
||||
|
||||
[dependencies]
|
||||
jack = "0.10"
|
||||
clap = { version = "4.5.4", features = [ "derive" ] }
|
||||
crossterm = "0.25"
|
||||
|
||||
39
.misc/crates/transport/src/main.rs
Normal file
39
.misc/crates/transport/src/main.rs
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
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,
|
||||
state: TransportState,
|
||||
}
|
||||
|
||||
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()?;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue