Trying to add protoc
Some checks failed
ci/woodpecker/push/code_tests Pipeline failed
ci/woodpecker/push/pre_commit_test Pipeline was successful

This commit is contained in:
Nikolai Rodionov
2025-11-28 17:07:02 +01:00
parent c595cab609
commit 56aa1e1bbf
11 changed files with 1368 additions and 30 deletions

10
tui/Cargo.toml Normal file
View File

@@ -0,0 +1,10 @@
[package]
name = "tui"
version = "0.1.0"
edition = "2024"
[dependencies]
clap = { version = "4.5.53", features = ["derive"] }
color-eyre = "0.6.5"
crossterm = "0.29.0"
ratatui = "0.29.0"

31
tui/src/main.rs Normal file
View File

@@ -0,0 +1,31 @@
use color_eyre::Result;
use crossterm::event::{self, Event};
use ratatui::{DefaultTerminal, Frame};
use clap::Parser;
/// Simple program to greet a person
#[derive(Parser, Debug)]
#[command(version, about, long_about = None)]
struct Args {}
fn main() -> Result<()> {
let _ = Args::parse();
color_eyre::install()?;
let terminal = ratatui::init();
let result = run(terminal);
ratatui::restore();
result
}
fn run(mut terminal: DefaultTerminal) -> Result<()> {
loop {
terminal.draw(render)?;
if matches!(event::read()?, Event::Key(_)) {
break Ok(());
}
}
}
fn render(frame: &mut Frame) {
frame.render_widget("hello world", frame.area());
}