Commit b3e69e3
committed
Add native hot-reload watcher and hot_reload API
Replace the external cargo-watch flow with a native file-watcher using notify/notify-debouncer-mini and implement a full hot-reload loop. watch.rs was rewritten to perform debounce-based file watching, build the project, and restart the server (start/stop/build helpers added); WatchArgs gains features, release and package flags and the default debounce was changed to 300ms. run.rs now delegates --watch to the native watcher and forwards package/features flags and RUSTAPI_ENV. rustapi-core gained a hot_reload(bool) builder, prints a dev banner and sets RUSTAPI_HOT_RELOAD for watcher detection. Added unit tests for watcher helpers and integration tests for the hot_reload builder; Cargo.toml updated to include notify deps.1 parent 5a3bf33 commit b3e69e3
6 files changed
Lines changed: 596 additions & 163 deletions
File tree
- crates
- cargo-rustapi
- src/commands
- rustapi-core/src
- rustapi-rs/tests
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| 30 | + | |
29 | 31 | | |
30 | 32 | | |
31 | 33 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
| |||
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
27 | 32 | | |
28 | 33 | | |
29 | 34 | | |
| |||
44 | 49 | | |
45 | 50 | | |
46 | 51 | | |
47 | | - | |
48 | | - | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
49 | 77 | | |
50 | 78 | | |
51 | 79 | | |
| |||
64 | 92 | | |
65 | 93 | | |
66 | 94 | | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
| 95 | + | |
| 96 | + | |
106 | 97 | | |
107 | 98 | | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | 99 | | |
129 | | - | |
| 100 | + | |
130 | 101 | | |
131 | 102 | | |
132 | | - | |
133 | | - | |
| 103 | + | |
134 | 104 | | |
135 | 105 | | |
136 | 106 | | |
| |||
139 | 109 | | |
140 | 110 | | |
141 | 111 | | |
142 | | - | |
| 112 | + | |
143 | 113 | | |
144 | 114 | | |
145 | 115 | | |
| |||
0 commit comments