Releases: rustminded/xtask-wasm
Releases · rustminded/xtask-wasm
v0.6.4
Added
WatchLockandWatchLockGuardare now re-exported fromxtask-wasmso consumers don't need a directxtask-watchdependency 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
Changed
- Remove explicit
walrusdependency. It was added to force-enable theparallelfeature for performance, butwasm-bindgen-cli-supporthas been enabling that feature itself since v0.2.98, making the pin redundant.
Fixed
- Generated
index.htmlno longer passes the wasm file URL toinit(). Newer versions of wasm-bindgen do not require it. (xtask-wasm-run-examplev0.6.3)
v0.6.2
Fixed
- Re-release to activate the
xtask-wasm-run-example?/wasm-optfeature forwarding introduced inxtask-wasm-run-examplev0.6.1. The previously publishedxtask-wasmv0.6.1 predated that fix so users enabling thewasm-optfeature would still get a proc-macro compiled without it. - Default generated
index.htmlnow importsapp.jsvia a relative path (./app.jsinstead of/app.js), fixing deployments on hosts where the app is served under a subpath (e.g. GitHub Pages). (xtask-wasm-run-examplev0.6.2)
v0.6.1
Changed
#[run_example]now automatically appliesWasmOpt::level(1).shrink(2)on release builds when thewasm-optfeature 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 onxtask-wasm-run-example, forwarded from the parent'swasm-optfeature.
v0.6.0
Added
DevServer::xtask(name)andDevServer::cargo(subcommand)convenience builders for setting the main watch command.DevServer::arg(),DevServer::args(),DevServer::env(),DevServer::envs()restored as builder methods onDevServer.DevServer::dist_dir(path)builder to explicitly set the directory served by the dev server.Hooktrait forDevServerpre/post commands.Transformertrait forDistasset processing.Dist::transformer(impl Transformer)builder to register asset transformers.SassTransformerstruct (behind thesassfeature) implementingTransformerto compile SASS/SCSS files to CSS.Dist::optimize_wasm(WasmOpt)builder (behind thewasm-optfeature) to integrate wasm-opt directly into thebuild()pipeline.Dist::default_debug_dir()andDist::default_release_dir()associated functions returningcamino::Utf8PathBuf.- "Why xtask-wasm?" section added to the README and crate-level documentation.
Changed
- BREAKING
DevServer::start()no longer takes adist_dirpath argument. - BREAKING
DevServer::command()now accepts aprocess::Commandinstead of a program name string. - BREAKING
DevServer::not_found()renamed toDevServer::not_found_path(). - BREAKING
Dist::run()renamed toDist::build(). - BREAKING
Dist::dist_dir_path()renamed toDist::dist_dir(). - BREAKING
Dist::static_dir_path()renamed toDist::assets_dir(). The assets directory is now auto-discovered at<package_root>/assetswhen not explicitly set. - BREAKING
run_in_workspacefield anduse_workspace_root()/use_current_dir()methods removed fromDist. - BREAKING
SassTransformeris now opt-in via.transformer(SassTransformer::default()). - BREAKING
Request::dist_dir_pathfield renamed toRequest::dist_dir. Dist::default_debug_dir()andDist::default_release_dir()now return an ownedcamino::Utf8PathBuf.walkdirpromoted 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_examplemacro:static_dirargument renamed toassets_dir.run_examplemacro: defaultindex.htmlis no longer generated whenapp_nameis set.
Removed
- BREAKING Free functions
default_dist_dir(release: bool),default_dist_dir_debug(), anddefault_dist_dir_release()removed in favor ofDist::default_debug_dir()andDist::default_release_dir(). - BREAKING
Dist::sass_options()removed; configure viaSassTransformer { options: ... }.
Fixed
SassTransformer: SASS compilation errors are now propagated asErrinstead of panicking.copy_assets: transformer errors are now propagated immediately.- Auto-discovery was looking for a
public/directory while the rest of the codebase usedassets.