Skip to content

Commit

Permalink
skibby compilies
Browse files Browse the repository at this point in the history
  • Loading branch information
CutestNekoAqua committed Jul 14, 2024
1 parent 2a5940e commit 93dabed
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ version = "0.1.0"

[dependencies]
actix-web = "4.8.0"
anyhow = "1.0.86"
clap = { version = "4.3.14", features = ["derive"] }
tectonic = { version = "0.15.0", features = ["external-harfbuzz"] }
9 changes: 7 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,19 @@ async fn hello() -> impl Responder {
HttpResponse::UnprocessableEntity().body("Ein Fehler ist aufgetreten.")
}

async fn gen_pdf() -> Result<Vec<u8>> {
async fn gen_pdf() -> anyhow::Result<Vec<u8>> {
let latex = r#"
\documentclass{article}
\begin{document}
Hello, world!
\end{document}
"#;
tectonic::latex_to_pdf(latex)
let res = tectonic::latex_to_pdf(latex);
if let Ok(good) = res {
return Ok(good);
} else {
return Err(anyhow::anyhow!("Awa error mommy"));
}
}

#[derive(Parser, Debug)]
Expand Down

0 comments on commit 93dabed

Please sign in to comment.