Skip to content

Releases: rustminded/xtask-wasm

v0.6.4

25 Apr 22:00

Choose a tag to compare

Added

  • WatchLock and WatchLockGuard are now re-exported from xtask-wasm so consumers don't need a direct xtask-watch dependency to name the types.
  • The dev server now acquires a read guard on the watcher lock before serving files, preventing browsers from receiving incomplete or inconsistent dist artifacts during an active rebuild.

v0.6.3

25 Apr 22:00

Choose a tag to compare

Changed

  • Remove explicit walrus dependency. It was added to force-enable the parallel feature for performance, but wasm-bindgen-cli-support has been enabling that feature itself since v0.2.98, making the pin redundant.

Fixed

  • Generated index.html no longer passes the wasm file URL to init(). Newer versions of wasm-bindgen do not require it. (xtask-wasm-run-example v0.6.3)

v0.6.2

25 Apr 21:59

Choose a tag to compare

Fixed

  • Re-release to activate the xtask-wasm-run-example?/wasm-opt feature forwarding introduced in xtask-wasm-run-example v0.6.1. The previously published xtask-wasm v0.6.1 predated that fix so users enabling the wasm-opt feature would still get a proc-macro compiled without it.
  • Default generated index.html now imports app.js via a relative path (./app.js instead of /app.js), fixing deployments on hosts where the app is served under a subpath (e.g. GitHub Pages). (xtask-wasm-run-example v0.6.2)

v0.6.1

25 Apr 21:59

Choose a tag to compare

Changed

  • #[run_example] now automatically applies WasmOpt::level(1).shrink(2) on release builds when the wasm-opt feature is enabled, matching the recommended manual setup.

Fixed

  • #[run_example] wasm-opt integration was non-functional: the #[cfg(feature = "wasm-opt")] guard was emitted into the generated code and evaluated against the user's crate, where the feature is never declared. The check now runs at proc-macro compile time via a feature on xtask-wasm-run-example, forwarded from the parent's wasm-opt feature.

v0.6.0

25 Apr 21:59

Choose a tag to compare

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.

v0.3.1

13 Jan 13:22

Choose a tag to compare

  • Bump MSRV to 1.78
  • Fix CI

v0.3.0

13 Jan 12:44

Choose a tag to compare

  • Add default module path (fix some issues with JS generation)
  • Fix broken demo
  • Update dependencies

v0.2.2

12 Jan 21:20

Choose a tag to compare

  • Support for JS snippets
  • Update dependencies

v0.2.1

25 Apr 22:00

Choose a tag to compare

Fixed

  • Fix xtask-wasm-run-example for the wasm filename change.

v0.2.0

25 Apr 22:00

Choose a tag to compare

Added

  • Support for JS snippets.

Changed

  • Update xtask-watch dependency.
  • Update xtask-wasm-run-example.