faster builds

This commit is contained in:
ari committed 2026-10-21 00:01:04 -04:00
1 parent b3b9103f2f
commit d8ad1c44c5
5 files changed
+15 -4

No files matched your search

+5
View File
@@ -0,0 +1,5 @@
[target.x86_64-unknown-linux-gnu]
rustflags = ["-C", "link-arg=-fuse-ld=lld"]
[target.aarch64-unknown-linux-gnu]
rustflags = ["-C", "link-arg=-fuse-ld=lld"]
+1 -1
View File
@@ -30,7 +30,7 @@ User-facing usage is in [`README.md`](README.md). Work tracking is in [`TODO.md`
| OpenAPI | `utoipa` 6 + `schemars` | Generated REST and MCP description (DEC-15) |
| Config | `figment` (TOML + env) + `clap` | Layered config with clear precedence |
Rust edition 2021; release profile uses LTO and `strip`. Cargo.lock is committed. The only dynamic dependencies are libc, libm, libgcc_s and libsystemd (check with `ldd`).
Rust edition 2021; release profile uses thin LTO and `strip`. Cargo.lock is committed. Local cargo builds link with lld via `.cargo/config.toml` (devenv provides it); the Nix package build excludes that file and keeps the default linker. The only dynamic dependencies are libc, libm, libgcc_s and libsystemd (check with `ldd`).
## Repo layout
+4 -1
View File
@@ -85,7 +85,10 @@ rcgen = { version = "0.14", default-features = false, features = ["ring", "pem"]
# Pausable clock for tests. `full` does not include this, and the runtime build must not.
tokio = { version = "1.53.3", features = ["test-util"] }
[profile.dev]
debug = "line-tables-only"
[profile.release]
lto = true
lto = "thin"
strip = true
codegen-units = 1
+2 -2
View File
@@ -33,11 +33,11 @@ The service listens on loopback by default. To reach it from another machine set
## Build
```sh
devenv shell # toolchain, pkg-config, libsystemd, otelcol-contrib
devenv shell # toolchain, pkg-config, lld, libsystemd, otelcol-contrib
cargo build --release # target/release/slinuxm
```
Without devenv you need a Rust toolchain, `pkg-config` and the libsystemd development files.
Without devenv you need a Rust toolchain, `pkg-config`, the `lld` linker (`.cargo/config.toml` links with it) and the libsystemd development files.
### Version
+3
View File
@@ -6,6 +6,9 @@
packages = [
pkgs.git
pkgs.pkg-config
# Linker: .cargo/config.toml passes -fuse-ld=lld for local builds, so it
# must be on PATH in this shell.
pkgs.lld
# libsystemd.pc lives in the .dev output; the pkg-config setup hook finds
# it when the package is in `packages`.
pkgs.systemd