Skip to content

Fix debug and release-small build variants (#36)#88

Open
lukashes wants to merge 1 commit into
mainfrom
fix/build-variants
Open

Fix debug and release-small build variants (#36)#88
lukashes wants to merge 1 commit into
mainfrom
fix/build-variants

Conversation

@lukashes

Copy link
Copy Markdown
Owner

Problem

zig build debug and zig build release-small fail to compile: both build main.zig with no module imports and no rdkafka link, so main's imports are unresolved. Only the default zig build was wired correctly.

Solution

  • Add a wireMainExe helper that applies main.zig's module imports and C links (pq, rdkafka, libc) to an executable's root module.
  • Use it for the release, debug, and release-small variants so they can't drift apart again.

Split out of #70, which now covers only the dead-code removal.

Verified: zig build, zig build debug, zig build release-small all produce binaries (outboxx, outboxx-debug, outboxx-small).

Closes #36

Both built main.zig with no imports and no rdkafka link, so `zig build
debug` and `zig build release-small` failed to compile. Share main.zig's
imports and C links across the exe, debug, and release-small variants
through one wireMainExe helper instead of copies that drift.

Closes #36
@github-actions

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

Current run is the minimum over 3 passes, compared against the base branch (main @ 39e25a5), built on the same runner.

Benchmark Baseline Current Δ Time Allocs Status
Converter DELETE 134.55μs 134.83μs +0.2% 12 → 12 ➡️
Converter INSERT 130.41μs 130.54μs +0.1% 12 → 12 ➡️
Converter UPDATE 182.23μs 183.06μs +0.4% 21 → 21 ➡️
JsonSerializer 44.55μs 44.95μs +0.9% 3 → 3 ➡️
KafkaProducer produce 327.94μs 332.46μs +1.4% 1 → 1 ➡️
KafkaProducer sendMessage 390.82μs 399.79μs +2.3% 0 → 0 ➡️
PgOutputDecoder 101.97μs 101.69μs -0.3% 6 → 6 ➡️
getPartitionKeyValue boolean 16.90μs 16.86μs -0.2% 1 → 1 ➡️
getPartitionKeyValue integer 53.03μs 53.08μs +0.1% 3 → 3 ➡️
getPartitionKeyValue not found 0.03μs 0.03μs +0.0% 0 → 0 ⚪ noise
getPartitionKeyValue string 18.99μs 18.99μs +0.0% 1 → 1 ➡️
matchStreams found 19.21μs 19.23μs +0.1% 1 → 1 ➡️
matchStreams not found 0.17μs 0.05μs -69.0% 0 → 0 ⚪ noise

Summary: ➡️ 11 neutral · ⚪ 2 ignored (sub-μs)

Thresholds: <1μs ignore · 1–20μs 15% · 20–50μs 10% · ≥50μs 5%. Measured on a shared CI runner — treat small deltas as noise. Informational only; this check never fails the build.

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.

zig build debug and release-small fail to compile (unwired module imports)

1 participant