diff --git a/backend/AGENTS.md b/backend/AGENTS.md index 1b14ec2..a3f70c4 100644 --- a/backend/AGENTS.md +++ b/backend/AGENTS.md @@ -43,6 +43,7 @@ backend/ ## Workflow - Use `just backend::` from the repository root. Before completing backend changes, run `format`, `clippy`, `test` and `build`. +- Development builds carry line tables only; use the `debugging` Cargo profile when you need full debug symbols. - Follow [`dev/AGENTS.md`](../dev/AGENTS.md) for the development stack, the workspace environment and `DOTCORE_BACKEND_RUN_MODE`. Composition owns the `DOTCORE_*` variables the backend reads; `dev/workspace-environment.mjs` derives them. - Every crate is published to crates.io, and each one must build from its own package: no build input outside its folder. `proto/dotcore` is a link to the repository's contracts for that reason; keep it a link. A new workspace crate: - inherits the shared package fields (`version`, `license`, `repository`, `homepage`, `readme`) with `.workspace = true`, and gets a `[workspace.dependencies]` entry with its version diff --git a/backend/Cargo.toml b/backend/Cargo.toml index ee31dee..0a7839c 100644 --- a/backend/Cargo.toml +++ b/backend/Cargo.toml @@ -57,3 +57,11 @@ tracing-appender = "0.2.5" tracing-subscriber = "0.3.23" url = "2.5.8" x509-parser = "0.18.0" + +# Line tables only to keep target dirs small; `debugging` has full symbols. +[profile.dev] +debug = "line-tables-only" + +[profile.debugging] +inherits = "dev" +debug = true diff --git a/backend/Justfile b/backend/Justfile index 144c23d..bbfaa96 100644 --- a/backend/Justfile +++ b/backend/Justfile @@ -133,9 +133,9 @@ gate-hardware-coverage: fi echo "hardware coverage gate: OK ($(wc -l < "$dir/hw_ignored" | tr -d ' ') hardware tests, $(wc -l < "$dir/allow" | tr -d ' ') marked non-hardware ignored tests)" -# Build all backend workspace packages with locked dependencies. -build: - cargo build --locked --workspace +# Build all backend workspace packages with locked dependencies; extra arguments go to Cargo, such as a profile. +build *args: + cargo build --locked --workspace "$@" # Remove Rust build output. clean: