summaryrefslogtreecommitdiff
path: root/support/texlab/crates/tex/src/tectonic.rs
diff options
context:
space:
mode:
Diffstat (limited to 'support/texlab/crates/tex/src/tectonic.rs')
-rw-r--r--support/texlab/crates/tex/src/tectonic.rs32
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
+ }
+}