Skip to content

Build the Rust addons in debug outside production - #3603

Merged
goastler merged 6 commits into
mainfrom
native-debug-builds
Oct 24, 2026
Merged

goastler merged 6 commits into
mainfrom
native-debug-builds

Conversation

@goastler

Copy link
Copy Markdown
Member

What changed

  • native-ja4, native-merkle, native-puzzle: build now runs build:debug unless NODE_ENV=production, which runs the new build:release (unchanged full-LTO release profile).
  • Their dependencies are optimised even in debug builds (opt-level = 2 in profile.dev.package."*"), so tests stay fast and deps compile once.
  • test:cargo and the CI cargo test job run in debug instead of --release; the CI job now has a cargo cache keyed on the exact rustc.
  • native-puzzle bench builds release first, so it never benchmarks a debug binary.

Effect
Local builds and CI tests stop paying for full link-time optimisation. Everything that ships (npm publish, provider image, service images) builds with NODE_ENV=production, so released binaries are unchanged.

Tests
The CI cargo test matrix runs every crate's tests in the new debug mode.

build now runs build:debug unless NODE_ENV=production, where it runs
build:release with the existing full-LTO profile. Dependencies are optimised
in debug (opt-level 2) so tests stay fast. CI cargo test drops --release and
gains a cargo cache keyed on the exact rustc.
@goastler goastler self-assigned this Oct 24, 2026
@goastler
goastler marked this pull request as ready for review October 24, 2026 00:24
@goastler
goastler enabled auto-merge (squash) October 24, 2026 00:24
@goastler
goastler merged commit f9c3fc3 into main Oct 24, 2026
21 checks passed
@goastler
goastler deleted the native-debug-builds branch October 24, 2026 00:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant