microsoft-webui-dev-server
Shared dev-server primitives for WebUI tooling.
This crate provides primitives that any WebUI dev server can compose:
LiveReload— Server-Sent Events broadcaster. Cheap to clone, ships its own actix handler, generates the matching browser-side<script>, and injects it before</body>.watch::spawn_watcher— Debounced filesystem watcher backed bynotify. Calls a closure once per debounce window.spawn_rebuild_worker— Coalesces watcher ticks and runs rebuilds on an ownedRebuildWorker. Give the watcher a sender fromworker.sender(), keep the worker alive while serving, then stop the watcher and callworker.shutdown()to wait for an active rebuild. Dropping the worker also stops and joins it; pending ticks are discarded.path::*— URL path utilities for serving files under abasePathprefix without traversal vulnerabilities.
Used by microsoft-webui-press (static-site preview) and the webui serve
CLI command (HMR for app development).
This crate is not intended for direct end-user consumption; its public API follows the WebUI workspace versioning rather than semver.
Documentation
See the WebUI repository for full usage guides and examples.
License
MIT — Copyright (c) Microsoft Corporation.