make config (de)serializable

This commit is contained in:
alice pellerin
2026-04-05 18:55:23 -05:00
parent a042e6ae34
commit d45e0a5032
6 changed files with 683 additions and 172 deletions
+14
View File
@@ -5,9 +5,13 @@
#![feature(hash_set_entry)]
#![feature(trim_prefix_suffix)]
use std::fs::read_to_string;
use app::App;
use crossterm::{QueueableCommand, event::{DisableMouseCapture, EnableMouseCapture}};
use crate::config::Config;
mod app;
mod buffer;
mod config;
@@ -55,6 +59,16 @@ const BYTES_OF_PADDING: usize = LINES_OF_PADDING * BYTES_PER_LINE;
// - how to fit??! `-128` longer than `80`
fn main() {
// let config = Config::default();
// let toml_string = toml::to_string_pretty(&config);
// println!("{}", toml_string.unwrap());
// let string = read_to_string("/Users/simonomi/Desktop/hexapoda_config.toml").unwrap();
// let config: Config = toml::from_str(&string).unwrap();
// dbg!(config.0);
// return;
let mut app = App::new();
let mut terminal = ratatui::init();
crossterm::terminal::enable_raw_mode().unwrap();