Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--watch option for @monodon/rust #24

Open
wSedlacek opened this issue Jul 24, 2023 · 3 comments
Open

--watch option for @monodon/rust #24

wSedlacek opened this issue Jul 24, 2023 · 3 comments

Comments

@wSedlacek
Copy link

It would be nice to be able to have live updates particularly for web servers.
I am very new to rust but cargo-watch seems to be the go to for this.
Would love to see some solution for live reload added.

@wSedlacek wSedlacek changed the title --watch option --watch option for @monodon/rust Jul 24, 2023
@Cammisuli
Copy link
Owner

I was thinking of adding support for cargo-watch, but instead I wanted to utilize the watch functionality in nx.

https://nx.dev/recipes/managing-repository/workspace-watching

Admittedly, there's a few things with nx watch that I'd like to fix, but using it would be the end goal.

@100000001
Copy link

Probably not the way to go, but for now I installed watchexec and added this to the project.json targets:

"serve": {
  "executor": "nx:run-commands",
  "options": {
    "cwd": "apps/backend",
    "command": "watchexec --exts rs,toml -r -- cargo run"
  }
}

So now npx nx run-many -t serve starts both the front- and backend

@KerickHowlett
Copy link

@Cammisuli Are there any upstream blockers keeping you from implementing a watch task, or is it more of an issue with finding any free time and/or prioritization?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants