diff options
| author | Laurenz <laurmaedje@gmail.com> | 2021-07-21 20:35:02 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2021-07-25 01:03:38 +0200 |
| commit | adb71ee040752f9348b0c9a511b2ab7e3710cb80 (patch) | |
| tree | 13578f67cf7361a03924b2a7f18d3d17103dea09 /src/lib.rs | |
| parent | 927f1154fa983a13eda050d716d04dead96bf8fb (diff) | |
Move and refactor
Diffstat (limited to 'src/lib.rs')
| -rw-r--r-- | src/lib.rs | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -51,7 +51,7 @@ pub mod util; use std::rc::Rc; use crate::diag::Pass; -use crate::eval::Scope; +use crate::eval::{ModuleCache, Scope}; use crate::exec::State; use crate::font::FontCache; use crate::image::ImageCache; @@ -68,6 +68,8 @@ pub struct Context { pub fonts: FontCache, /// Caches decoded images. pub images: ImageCache, + /// Caches evaluated modules. + pub modules: ModuleCache, /// Caches layouting artifacts. #[cfg(feature = "layout-cache")] pub layouts: LayoutCache, @@ -145,6 +147,7 @@ impl ContextBuilder { loader: Rc::clone(&loader), fonts: FontCache::new(Rc::clone(&loader)), images: ImageCache::new(loader), + modules: ModuleCache::new(), #[cfg(feature = "layout-cache")] layouts: LayoutCache::new(), std: self.std.unwrap_or(library::new()), |
