#[non_exhaustive]pub enum CssTool {
LightningCss,
}Expand description
External tools mini-static knows how to invoke for CSS bundling/minification.
#[non_exhaustive] so a future preset (e.g. a second CSS tool) is an additive
variant, not a semver-breaking change for downstream match expressions.
§Installation
mini-static does not install or manage these binaries — only looks them up on
PATH at server startup and fails loudly if missing (see crate::Server::with_css_tool).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
LightningCss
https://lightningcss.dev, invoked via its separately-installed lightningcss
CLI (npm package lightningcss-cli) — a different artifact from the Rust
lightningcss crate this refactor removes.
§Trust boundary
Bundling delegates @import resolution entirely to this CLI process, which
resolves imports relative to the file being processed with no root boundary
mini-static can inject. This is an accepted trade-off: CSS source folders are
developer-authored build inputs, not request-time attacker input (unlike the
HTTP path resolver in resolve.rs, which stays fully guarded). An @import
escaping the intended source tree is a build misconfiguration to catch in
review, not a runtime exploit surface. [tool::TOOL_TIMEOUT] is the bound that
replaces the old in-process import-depth/file-count ceilings.
Trait Implementations§
impl Copy for CssTool
impl Eq for CssTool
impl StructuralPartialEq for CssTool
Auto Trait Implementations§
impl Freeze for CssTool
impl RefUnwindSafe for CssTool
impl Send for CssTool
impl Sync for CssTool
impl Unpin for CssTool
impl UnsafeUnpin for CssTool
impl UnwindSafe for CssTool
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.