Comments (12)
Suggestion: Use Github's new "Add a reaction" feature for voting. Add a +1 (π) to this comment to say "I would like this feature" and -1 (π) to say "I would not like this feature"
from cargo-watch.
This is now done with the entirely new version 4.0.0! It will run the command upon starting by default, but you can disable the behaviour using --postpone
.
from cargo-watch.
Used cargo watch run
with a simple iron example server, and expected it to run the command.
Maybe it should be an optional thing or depend on the cargo command?
from cargo-watch.
I think I'm going to rebuild cargo watch to more in the model of remy's
nodemon
, if you know of it, after I do Notify v3. This would include the
functionality requested in this ticket.
On Thu, 30 Jun 2016, 19:36 Robin Stocker [email protected] wrote:
Used cargo watch run with a simple iron
http://ironframework.io/doc/iron/ example server, and expected it to
run the command.Maybe it should be an optional thing or depend on the cargo command?
β
You are receiving this because you commented.Reply to this email directly, view it on GitHub
#37 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AAJgi3Z3-9fQMromw_IX0ARbfF3D1YRUks5qQ3HsgaJpZM4Hxa-W
.
from cargo-watch.
π Going to do this. Don't have an ETA, but it's on the todolist.
from cargo-watch.
I'm of either mind on this, so I'll wait for community feedback too.
from cargo-watch.
Yes please.
On Tue, Mar 15, 2016, 4:41 PM FΓ©lix Saparelli [email protected]
wrote:
I'm of either mind on this, so I'll wait for community feedback too.
β
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
#37 (comment)
from cargo-watch.
Also comment with your use case if it is different from the top-post. I'd love to have more insight into why people would want one or the other.
from cargo-watch.
I'm all for this as I wanted to watch
a server, so the first run before anything changes is definitely useful. One alternate thing is to allow pressing Enter to trigger a build, regardless of the state of files. I believe that guard allows something similar.
from cargo-watch.
Nodemon does it by typing rs
then Enter, which guards against restarting inadvertently if an interactive program is watched, or if one likes to use blank lines to visually separate runs when doing verbose debugging. That's probably what I'll go with. I use nodemon all the time, it's a very useful tool β it is very much the vision for cargo watch.
Speaking of, as much as I'd like to keep users here, I have no illusion of being able to bring it to greatness any time soon, so if you happen to have npm/node installed and want a very good cargo-watch alternative, go with nodemon:
# With long options for clarity:
$ nodemon --ext rs,toml --exec 'cargo run' --watch src --watch test --watch examples
# Short options for brevity:
$ nodemon -e rs,toml -x 'cargo run' -w src -w test -w examples
That should have the requisite behaviour.
from cargo-watch.
For other people landing here, there's now also a nodemon-like tool written in Rust: https://github.com/mattgreen/watchexec/
$ watchexec --restart "cargo run"
Edit: Removed --run-initially
from cargo-watch.
Note that --run-initially
is the default now, so you don't need to specify it.
from cargo-watch.
Related Issues (20)
- Salvo Support HOT 15
- Expose a list of modified files to shell commands HOT 5
- Long running process not ended on SIGINT, Rust 1.66+ (Mac M1 Ventura?) HOT 3
- Shell no longer displays characters after cargo watch -x run HOT 6
- Cargo watch hangs when I save my project HOT 3
- future incompat dependencies HOT 1
- Ignored directories are traversed and cause Error: I/O error: Permission denied (os error 13) HOT 2
- Feature Request : Print the execution time-stamp
- Feature request: test results as a notification HOT 1
- `cargo watch -x run` after some saves turns the terminal into a mess. HOT 8
- Recompiling takes too long inside docker container HOT 2
- reloaded after waiting running job is done. HOT 1
- Is there an option to re-run ONLY if a file content is changed? HOT 1
- How can cargo-watch monitor the html file even after I have modified it? Which parameter should I use to run it? HOT 1
- SIGKILL isn't killing the child? HOT 3
- Slow startup in monorepo HOT 4
- `rustc-ice-*.txt` files are watched, causing infinite loop of recompiling HOT 1
- Is this project still maintained? HOT 1
- cargo-watch dependency quarantined HOT 1
- Argument grouping bug HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cargo-watch.