Skip to content

v0.6.0

Choose a tag to compare

@cecton cecton released this 25 Apr 21:59
· 27 commits to main since this release

Added

  • DevServer::xtask(name) and DevServer::cargo(subcommand) convenience builders for setting the main watch command.
  • DevServer::arg(), DevServer::args(), DevServer::env(), DevServer::envs() restored as builder methods on DevServer.
  • DevServer::dist_dir(path) builder to explicitly set the directory served by the dev server.
  • Hook trait for DevServer pre/post commands.
  • Transformer trait for Dist asset processing.
  • Dist::transformer(impl Transformer) builder to register asset transformers.
  • SassTransformer struct (behind the sass feature) implementing Transformer to compile SASS/SCSS files to CSS.
  • Dist::optimize_wasm(WasmOpt) builder (behind the wasm-opt feature) to integrate wasm-opt directly into the build() pipeline.
  • Dist::default_debug_dir() and Dist::default_release_dir() associated functions returning camino::Utf8PathBuf.
  • "Why xtask-wasm?" section added to the README and crate-level documentation.

Changed

  • BREAKING DevServer::start() no longer takes a dist_dir path argument.
  • BREAKING DevServer::command() now accepts a process::Command instead of a program name string.
  • BREAKING DevServer::not_found() renamed to DevServer::not_found_path().
  • BREAKING Dist::run() renamed to Dist::build().
  • BREAKING Dist::dist_dir_path() renamed to Dist::dist_dir().
  • BREAKING Dist::static_dir_path() renamed to Dist::assets_dir(). The assets directory is now auto-discovered at <package_root>/assets when not explicitly set.
  • BREAKING run_in_workspace field and use_workspace_root() / use_current_dir() methods removed from Dist.
  • BREAKING SassTransformer is now opt-in via .transformer(SassTransformer::default()).
  • BREAKING Request::dist_dir_path field renamed to Request::dist_dir.
  • Dist::default_debug_dir() and Dist::default_release_dir() now return an owned camino::Utf8PathBuf.
  • walkdir promoted to a regular dependency.
  • cfg_not_wasm32! / cfg_wasm32! / cfg_sass! / cfg_wasm_opt! / cfg_run_example! macros removed; replaced with plain #[cfg(...)] attributes.
  • MSRV bumped to 1.88.
  • run_example macro: static_dir argument renamed to assets_dir.
  • run_example macro: default index.html is no longer generated when app_name is set.

Removed

  • BREAKING Free functions default_dist_dir(release: bool), default_dist_dir_debug(), and default_dist_dir_release() removed in favor of Dist::default_debug_dir() and Dist::default_release_dir().
  • BREAKING Dist::sass_options() removed; configure via SassTransformer { options: ... }.

Fixed

  • SassTransformer: SASS compilation errors are now propagated as Err instead of panicking.
  • copy_assets: transformer errors are now propagated immediately.
  • Auto-discovery was looking for a public/ directory while the rest of the codebase used assets.