Live-serve: a ~1 MB Live Server replacement with safe defaults and CSS hot swap

Hi all! I'd like to share my first published crate, live-serve: a static dev server with live reload, in one 1.4 MB binary.

I used VS Code's Live Server for years and wanted the same workflow in Zed and from the terminal, without installing Node. live-serve is built on axum and notify.

demo

What it does:

  • live reload; saving a stylesheet swaps it in place without a full reload, even when your editor saves through a temporary file
  • waits until the page actually works before reloading, so a half-finished build never shows a 404
  • --poll for WSL, Docker volumes and network drives
  • safe defaults: binds 127.0.0.1, refuses unknown Host headers (DNS rebinding), hides dotfiles, and the reload WebSocket refuses other origins
  • live-serve init vscode|zed writes the editor task, and there is a small VS Code extension with a Go Live button (the .vsix files are on the release page)

Install: cargo binstall live-serve, cargo install live-serve, brew install nguyentruong354/tap/live-serve, or Scoop (see the README).

Not there yet: HTTPS and an API proxy. Feedback on the code is very welcome, especially on the file watching and debouncing in src/lib.rs.

Do not forget to notify us when HTTPS is ready. I need to implement HTTPS as well, but I do not know how, so I want just learn from you.