summaryrefslogtreecommitdiff
path: root/src/cache.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2021-06-30 00:43:53 +0200
committerGitHub <noreply@github.com>2021-06-30 00:43:53 +0200
commitd5d2b80699a002594f429e30f5f1ca0ca58d3412 (patch)
tree15e0f0565d4aa7c8230cb76b057b99761788c86c /src/cache.rs
parent2f44d10aa4209b226cfc3d0f8f2c8516005edf6a (diff)
parentff0e3442ef68a23dba273122f3ba0a54a34c45bf (diff)
Merge pull request #34 from typst/cfg-conditional
Put incremental compilation behind feature
Diffstat (limited to 'src/cache.rs')
-rw-r--r--src/cache.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/cache.rs b/src/cache.rs
index aa9c10a0..2aa276aa 100644
--- a/src/cache.rs
+++ b/src/cache.rs
@@ -2,6 +2,7 @@
use crate::font::FontCache;
use crate::image::ImageCache;
+#[cfg(feature = "layout-cache")]
use crate::layout::LayoutCache;
use crate::loading::Loader;
@@ -12,6 +13,7 @@ pub struct Cache {
/// Caches decoded images.
pub image: ImageCache,
/// Caches layouting artifacts.
+ #[cfg(feature = "layout-cache")]
pub layout: LayoutCache,
}
@@ -21,6 +23,7 @@ impl Cache {
Self {
font: FontCache::new(loader),
image: ImageCache::new(),
+ #[cfg(feature = "layout-cache")]
layout: LayoutCache::new(),
}
}