summaryrefslogtreecommitdiff
path: root/crates/typst-cli
diff options
context:
space:
mode:
Diffstat (limited to 'crates/typst-cli')
-rw-r--r--crates/typst-cli/src/args.rs9
-rw-r--r--crates/typst-cli/src/world.rs5
2 files changed, 13 insertions, 1 deletions
diff --git a/crates/typst-cli/src/args.rs b/crates/typst-cli/src/args.rs
index a4ac4bd9..9437f848 100644
--- a/crates/typst-cli/src/args.rs
+++ b/crates/typst-cli/src/args.rs
@@ -274,8 +274,17 @@ pub struct SharedArgs {
/// defaults to number of CPUs. Setting it to 1 disables parallelism.
#[clap(long, short)]
pub jobs: Option<usize>,
+
+ /// Enables in-development features that may be changed or removed at any
+ /// time.
+ #[arg(long = "feature", value_delimiter = ',')]
+ pub feature: Vec<Feature>,
}
+/// An in-development feature that may be changed or removed at any time.
+#[derive(Debug, Copy, Clone, Eq, PartialEq, ValueEnum)]
+pub enum Feature {}
+
/// Arguments related to where packages are stored in the system.
#[derive(Debug, Clone, Args)]
pub struct PackageStorageArgs {
diff --git a/crates/typst-cli/src/world.rs b/crates/typst-cli/src/world.rs
index f3597544..a04de2c0 100644
--- a/crates/typst-cli/src/world.rs
+++ b/crates/typst-cli/src/world.rs
@@ -112,7 +112,10 @@ impl SystemWorld {
.map(|(k, v)| (k.as_str().into(), v.as_str().into_value()))
.collect();
- Library::builder().with_inputs(inputs).build()
+ let features =
+ command.feature.iter().map(|&feature| match feature {}).collect();
+
+ Library::builder().with_inputs(inputs).with_features(features).build()
};
let fonts = Fonts::searcher()