All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
run_example: an existingindex.htmlfrom the assets directory is no longer overwritten by the generated default.
0.6.5 - 2026-04-28
run_example: an existingindex.htmlfrom the assets directory is no longer overwritten by the generated default.- Dev server now includes
Connection: closein all responses, fixing indefinite loading on local-network clients (e.g. mobile browsers) that follow HTTP/1.1 keep-alive strictly. - Dev server now detects incoming TLS/HTTPS connections and logs an actionable
warning instead of a cryptic
"Malformed request's header: Unexpected EOF"error.
0.6.4 - 2026-04-25
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.
- Generated
index.htmlno longer passes the wasm file URL toinit(). Newer versions of wasm-bindgen do not require it.
- 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.
- 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).
- Re-release to activate the
xtask-wasm-run-example?/wasm-optfeature forwarding introduced in v0.6.1 ofxtask-wasm-run-example. The previously publishedxtask-wasm v0.6.1predated that fix so users enabling thewasm-optfeature would still get a proc-macro compiled without it.
#[run_example]now automatically appliesWasmOpt::level(1).shrink(2)on release builds when thewasm-optfeature is enabled, matching the recommended manual setup.
#[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. (xtask-wasm-run-examplev0.6.1)
0.6.0 - 2026-04-11
DevServer::xtask(name)andDevServer::cargo(subcommand)convenience builders for setting the main watch command. These replace the old implicit behavior wherearg()would silently create an xtask command if none was set.DevServer::arg(),DevServer::args(),DevServer::env(),DevServer::envs()restored as builder methods onDevServerfor passing extra arguments/environment to thextask()andcargo()shorthands (which build the command internally). These now panic with a clear message if called before a command is set — a programmer error, not a runtime condition.DevServer::dist_dir(path)builder to explicitly set the directory served by the dev server (previously had to be passed tostart()).Hooktrait forDevServerpre/post commands. Lets you construct aprocess::Commandwith access to the final server configuration (e.g. resolvedport,dist_dir). A blanket impl is provided forprocess::Commanditself.Transformertrait forDistasset processing. Transformers are tried in order per file; the first to returnOk(true)claims the file, unclaimed files are plain-copied. Errors are propagated immediately via?.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. Automatically skipped for debug builds.Dist::default_debug_dir()andDist::default_release_dir()associated functions returningcamino::Utf8PathBuf.- "Why xtask-wasm?" section added to the README and crate-level documentation.
- BREAKING
DevServer::start()no longer takes adist_dirpath argument. The directory is inferred fromDist::default_debug_dir()or set via the newDevServer::dist_dir()builder. - BREAKING
DevServer::command()now accepts aprocess::Commandinstead of a program name string, consistent withpre()andpost(). - 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. The copy step is silently skipped (with alog::debug!) if the directory does not exist, allowing users with custom asset pipelines to callbuild()without a pre-existing assets directory on disk. - BREAKING
run_in_workspacefield anduse_workspace_root()/use_current_dir()methods removed fromDist. The build command always runs from the workspace root, which was the correct value in virtually all use-cases. Thefalsebranch was unreliable anyway since Cargo crate resolution requires being inside the workspace. - BREAKING
SassTransformeris now opt-in. PreviouslyDist::default()would auto-seed aSassTransformerwhen thesassfeature was enabled, meaning any user adding their ownSassTransformerwould silently end up with two in the pipeline. Use.transformer(SassTransformer::default())to opt in. - BREAKING
Request::dist_dir_pathfield renamed toRequest::dist_dir. Dist::default_debug_dir()andDist::default_release_dir()now return an ownedcamino::Utf8PathBufinstead of&'static camino::Utf8Path, removing thelazy_staticmachinery and the.as_std_path().to_path_buf()boilerplate at call sites.walkdirpromoted from asass-feature-gated dependency to a regular dependency (used unconditionally bycopy_assets).cfg_not_wasm32!/cfg_wasm32!/cfg_sass!/cfg_wasm_opt!/cfg_run_example!macros removed. These wrappedmoddeclarations inside macro bodies, making those modules invisible tocargo fmtand silently skipping format checks on the bulk of the codebase. 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. The default template hardcodesapp.js/app_bg.wasm; with a custom app name those filenames are wrong. Users settingapp_nameshould provide their ownindex.htmlvia theindexargument or in their assets directory.
- 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 SASS compilation options viaSassTransformer { options: ... }passed toDist::transformer().
SassTransformer: SASS compilation errors are now propagated asErrinstead of panicking.copy_assets: transformer errors are now propagated immediately. The previous iterator chain usedfind()withmap_or(false, ...)which treatedErrasfalseand silently fell through to the plain-copy fallback.- Auto-discovery was looking for a
public/directory while the rest of the codebase usedassets, silently breaking auto-discovery for anyone following the documented naming convention.