cargo-web icon indicating copy to clipboard operation
cargo-web copied to clipboard

How to deploy & watch?

Open Boscop opened this issue 6 years ago • 4 comments

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)?

Boscop avatar Jul 23 '18 07:07 Boscop

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? :)

Boscop avatar Jul 23 '18 19:07 Boscop

Currently only cargo web start can do this.

koute avatar Jul 23 '18 20:07 koute

But where does cargo web start build the files to? Can it be told to build to target/deploy?

Boscop avatar Jul 23 '18 20:07 Boscop

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.

mdtusz avatar Oct 25 '19 16:10 mdtusz