diff options
| author | Laurenz <laurmaedje@gmail.com> | 2025-07-09 11:46:40 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-09 09:46:40 +0000 |
| commit | 52a708b988cf7d13898194e886790acb7edd510f (patch) | |
| tree | 54c5494377b272e032fb0fecfa7e3c03cc3517b1 /crates/typst-library/src/lib.rs | |
| parent | e71674f6b3db0768c3e9d6e0271628377f8c82d8 (diff) | |
Move `html` module to `typst-html` crate (#6577)
Diffstat (limited to 'crates/typst-library/src/lib.rs')
| -rw-r--r-- | crates/typst-library/src/lib.rs | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/crates/typst-library/src/lib.rs b/crates/typst-library/src/lib.rs index 3e2ce99e..5d047570 100644 --- a/crates/typst-library/src/lib.rs +++ b/crates/typst-library/src/lib.rs @@ -165,7 +165,6 @@ pub struct Library { /// Constructed via the `LibraryExt` trait. #[derive(Debug, Clone)] pub struct LibraryBuilder { - #[expect(unused, reason = "will be used in the future")] routines: &'static Routines, inputs: Option<Dict>, features: Features, @@ -200,7 +199,7 @@ impl LibraryBuilder { pub fn build(self) -> Library { let math = math::module(); let inputs = self.inputs.unwrap_or_default(); - let global = global(math.clone(), inputs, &self.features); + let global = global(self.routines, math.clone(), inputs, &self.features); Library { global: global.clone(), math, @@ -282,7 +281,12 @@ impl Category { } /// Construct the module with global definitions. -fn global(math: Module, inputs: Dict, features: &Features) -> Module { +fn global( + routines: &Routines, + math: Module, + inputs: Dict, + features: &Features, +) -> Module { let mut global = Scope::deduplicating(); self::foundations::define(&mut global, inputs, features); @@ -297,7 +301,7 @@ fn global(math: Module, inputs: Dict, features: &Features) -> Module { global.define("math", math); global.define("pdf", self::pdf::module()); if features.is_enabled(Feature::Html) { - global.define("html", self::html::module()); + global.define("html", (routines.html_module)()); } prelude(&mut global); |
