#[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.