Skip to content

Commit 2f00564

Browse files
committed
Document how to hack on the monitor locally
1 parent 05c1f39 commit 2f00564

File tree

3 files changed

+18
-1
lines changed

3 files changed

+18
-1
lines changed

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,23 @@ $ vim -p /config/monitor/.env /config/monitor/monitor.toml
134134
$ systemctl restart monitor
135135
```
136136

137+
Hacking on the monitor locally
138+
------------------------------
139+
140+
Easy but slow way:
141+
142+
```
143+
$ nix develop -c sudo [RUST_BACKTRACE=1] monitor
144+
```
145+
146+
Harder but faster way:
147+
148+
```
149+
$ export RUSTFLAGS=-Clink-arg=-fuse-ld=mold
150+
$ cargo build --manifest-path monitor/Cargo.toml
151+
$ sudo [RUST_BACKTRACE=1] IMAGE_DEPS_DIR=$(nix eval --raw .\#image-deps) LIB_MONITOR_DIR=. monitor/target/debug/monitor
152+
```
153+
137154
Windows 10 runner
138155
-----------------
139156

File renamed without changes.

monitor/settings/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ impl Toml {
230230

231231
#[cfg(any(test, feature = "test"))]
232232
fn load_for_tests() -> eyre::Result<Self> {
233-
let result: Toml = toml::from_str(include_str!("../../monitor.toml.example"))?;
233+
let result: Toml = toml::from_str(include_str!("../../../monitor.toml.example"))?;
234234

235235
result.validate()
236236
}

0 commit comments

Comments
 (0)