Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,27 @@ license = "BSL-1.1"
repository = "https://github.com/odal-node/dpp-engine"
rust-version = "1.96"

# ---------------------------------------------------------------------------
# Debug-build profile
#
# `dpp-node`'s integration test binaries link 250+ object files across wasmtime,
# aws-lc, sqlx and the AWS SDK. With full DWARF, linking several of them in
# parallel exhausts memory on a 16 GB machine and the build dies at the *last*
# CI stage — as `LINK : fatal error LNK1102: out of memory`, or, when rustc is
# the one that runs out first, as a bare `STATUS_STACK_BUFFER_OVERRUN` abort
# with no diagnostic. Both read as a code failure and are not one.
#
# `line-tables-only` keeps what this workspace actually debugs with — function
# names, file and line numbers in backtraces and panics — and drops the
# variable-level DWARF that makes those links enormous. The cost is variable
# inspection under a step debugger, which is not how this codebase is worked on.
# `test` inherits from `dev`, so this covers test binaries too.
#
# Raise this back to full debug only with a plan for the link memory.
# ---------------------------------------------------------------------------
[profile.dev]
debug = "line-tables-only"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 MEDIUM RISK

Suggestion: Reducing debug info helps, but the root cause of linker memory pressure in large projects is often the high number of parallel link jobs. Since every .rs file in the tests/ directory is linked as a standalone binary, Cargo attempts many simultaneous links of the 250+ object files mentioned. Consolidating these into a single integration test suite (e.g., tests/it/main.rs) would reduce the link operations to a single event, drastically lowering memory requirements and potentially allowing you to retain full debug symbols. Try running the following prompt in your coding agent: > Consolidate all integration tests into a single test binary by creating a tests/it/main.rs that includes the existing test files as modules.


# ---------------------------------------------------------------------------
# Shared dependency versions — crates inherit these with `workspace = true`
# ---------------------------------------------------------------------------
Expand Down
Loading