diff options
author | Norbert Preining <norbert@preining.info> | 2019-12-03 03:01:24 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2019-12-03 03:01:24 +0000 |
commit | b8d4bb76703bcb15578e2b23c5d256532180b894 (patch) | |
tree | bedd1df7a00521a2bd986b3c0289d6556a59e39b /support/texlab/crates/tex/src/tectonic.rs | |
parent | 02e4625a78a5029e8b5dc2a4ec70193b232f497e (diff) |
CTAN sync 201912030301
Diffstat (limited to 'support/texlab/crates/tex/src/tectonic.rs')
-rw-r--r-- | support/texlab/crates/tex/src/tectonic.rs | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/support/texlab/crates/tex/src/tectonic.rs b/support/texlab/crates/tex/src/tectonic.rs new file mode 100644 index 0000000000..605e79dc92 --- /dev/null +++ b/support/texlab/crates/tex/src/tectonic.rs @@ -0,0 +1,32 @@ +use super::compile::*; +use super::{Distribution, DistributionKind}; +use futures_boxed::boxed; + +#[derive(Debug, Default)] +pub struct Tectonic; + +impl Distribution for Tectonic { + fn kind(&self) -> DistributionKind { + DistributionKind::Tectonic + } + + fn supports_format(&self, format: Format) -> bool { + match format { + Format::Latex | Format::Pdflatex | Format::Xelatex => true, + Format::Lualatex => false, + } + } + + fn output_kind(&self, _format: Format) -> OutputKind { + OutputKind::Pdf + } + + #[boxed] + async fn compile<'a>( + &'a self, + params: CompileParams<'a>, + ) -> Result<CompileResult, CompileError> { + let args = [params.file_name]; + compile("tectonic", &args, params).await + } +} |