Added 'src/main.rs'

This commit is contained in:
Hector PENG
2026-05-21 17:10:09 +08:00
parent 0aeb8a244f
commit a0f1e108b1

16
src/main.rs Normal file
View File

@@ -0,0 +1,16 @@
use std::process::Command;
fn main() -> std::io::Result<()> {
// Invoke mdbook build in the directory containing book.toml
let status = Command::new("mdbook")
.arg("build")
.status()?;
if status.success() {
println!("PDF successfully generated in book/pdf/output.pdf");
} else {
eprintln!("Failed to generate PDF");
}
Ok(())
}