Import teepee code
This commit is contained in:
parent
6b62c3fd54
commit
a2867b7188
9 changed files with 1439 additions and 5 deletions
|
|
@ -1,7 +1,31 @@
|
|||
mod color;
|
||||
mod command;
|
||||
mod printer;
|
||||
mod server;
|
||||
mod util;
|
||||
|
||||
use showbits_common::Vec2;
|
||||
use std::path::PathBuf;
|
||||
|
||||
fn main() {
|
||||
println!("{:?}", Vec2::EAST);
|
||||
use clap::Parser;
|
||||
use printer::Printer;
|
||||
use tokio::{runtime::Runtime, sync::mpsc};
|
||||
|
||||
#[derive(Parser)]
|
||||
struct Args {
|
||||
path: PathBuf,
|
||||
addr: String,
|
||||
}
|
||||
|
||||
fn main() -> anyhow::Result<()> {
|
||||
let args = Args::parse();
|
||||
|
||||
let (tx, rx) = mpsc::channel(3);
|
||||
let mut printer = Printer::new(rx, &args.path)?;
|
||||
|
||||
let runtime = Runtime::new()?;
|
||||
runtime.spawn(server::run(tx, args.addr));
|
||||
|
||||
println!("Running");
|
||||
printer.run()?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue