cargo-web
cargo-web copied to clipboard
How to deploy & watch?
How can I watch & deploy so that it runs deploy as soon as a source file changes (either a .rs file or one in the static
folder)?
My use case is: I'm using rust-embed to embed the frontend files in release build but load from disk in debug build, so I'm using #[folder = "target/deploy"]
, that's why I have to watch & deploy.
Currently I'm doing cargo watch -x "web deploy"
but can cargo-web do this by itself? :)
Currently only cargo web start
can do this.
But where does cargo web start
build the files to?
Can it be told to build to target/deploy
?
Agreed on this one - it would be fantastic if there was a builtin cargo web watch
that would build the static files and place them in a specified directory the same way cargo web start
does.