A flake module to provide a live server version of cargo doc ― edit Rust code, and see the docs view in your web browser update automatically.
cargo-doc-live.mp4
Full example: https://github.com/srid/rust-nix-template
Add the following flake inputs,
process-compose-flake.url = "github:Platonic-Systems/process-compose-flake";
cargo-doc-live.url = "github:srid/cargo-doc-live";Import the relevant flake-parts modules,
imports = [
inputs.process-compose-flake.flakeModule
inputs.cargo-doc-live.flakeModule
];Add the following to the packages of your devShell
packages = [
config.process-compose.cargo-doc-live.outputs.package
];This will make the cargo-doc-live command available in your shell.