1
0
mirror of https://github.com/actix/actix-website synced 2024-11-30 19:14:36 +01:00
actix-website/docs/autoreload.md

18 lines
622 B
Markdown
Raw Normal View History

---
2020-11-24 22:10:29 +01:00
title: Auto-Reloading
---
# Auto-Reloading Development Server
2022-02-26 05:41:49 +01:00
During development it can be very handy to have cargo automatically recompile the code on changes. This can be accomplished very easily by using [`cargo-watch`].
```sh
cargo watch -x run
2023-11-01 16:28:34 +01:00
```
## Historical Note
2022-02-26 05:41:49 +01:00
An old version of this page recommended using a combination of systemfd and listenfd, but this has many gotchas and was difficult to integrate properly, especially when part of a broader development workflow. We consider [`cargo-watch`] to be sufficient for auto-reloading purposes.
[`cargo-watch`]: https://github.com/passcod/cargo-watch