Initial project scaffold: Rust egui ePub reader
- Cargo.toml with eframe, egui, epub, rfd, serde dependencies - Source modules: app, book, font, persistence, reader, theme - MinGW static linking config - .gitignore for build artifacts
This commit is contained in:
11
src/app.rs
Normal file
11
src/app.rs
Normal file
@@ -0,0 +1,11 @@
|
||||
pub struct App;
|
||||
|
||||
impl App {
|
||||
pub fn new(_cc: &eframe::CreationContext) -> Self {
|
||||
Self
|
||||
}
|
||||
}
|
||||
|
||||
impl eframe::App for App {
|
||||
fn update(&mut self, _ctx: &egui::Context, _frame: &mut eframe::Frame) {}
|
||||
}
|
||||
0
src/book.rs
Normal file
0
src/book.rs
Normal file
1
src/font.rs
Normal file
1
src/font.rs
Normal file
@@ -0,0 +1 @@
|
||||
pub fn setup_fonts(_ctx: &egui::Context) {}
|
||||
25
src/main.rs
Normal file
25
src/main.rs
Normal file
@@ -0,0 +1,25 @@
|
||||
#![windows_subsystem = "windows"]
|
||||
|
||||
mod app;
|
||||
mod book;
|
||||
mod font;
|
||||
mod persistence;
|
||||
mod reader;
|
||||
mod theme;
|
||||
|
||||
fn main() -> eframe::Result {
|
||||
let native_options = eframe::NativeOptions {
|
||||
viewport: eframe::egui::ViewportBuilder::default()
|
||||
.with_inner_size([900.0, 700.0])
|
||||
.with_min_inner_size([600.0, 400.0]),
|
||||
..Default::default()
|
||||
};
|
||||
eframe::run_native(
|
||||
"ePub Reader",
|
||||
native_options,
|
||||
Box::new(|cc| {
|
||||
font::setup_fonts(&cc.egui_ctx);
|
||||
Ok(Box::new(app::App::new(cc)))
|
||||
}),
|
||||
)
|
||||
}
|
||||
0
src/persistence.rs
Normal file
0
src/persistence.rs
Normal file
0
src/reader.rs
Normal file
0
src/reader.rs
Normal file
0
src/theme.rs
Normal file
0
src/theme.rs
Normal file
Reference in New Issue
Block a user