Skip to content

Position reld as a wild successor; add test, stress, and benchmark infrastructure - #1

Merged
zackees merged 4 commits into
mainfrom
docs/position-as-wild-successor
Aug 1, 2026
Merged

zackees merged 4 commits into
mainfrom
docs/position-as-wild-successor

Conversation

@zackees

@zackees zackees commented Aug 1, 2026

Copy link
Copy Markdown
Collaborator

Positions reld as a successor to wild, and stands up the test and benchmark
infrastructure before any linker code exists.

Docs

  • README + DESIGN.md: tri-platform targets, incremental as the architecture, and a
    falsifiable "faster than wild in every category" claim (cold, warm full, warm
    incremental, peak RSS, and single-threaded — the category mold loses to lld).
  • Performance figures are labeled as targets throughout. Nothing is benchmarked
    because nothing is implemented.

Test infrastructure

  • reld-testkit generates deterministic workloads from a u64 seed, with independent
    dials for cross-unit reference density, weak symbols, TLS, and COMDAT-equivalents.
  • reld-stress runs generate -> compile -> link -> run -> check the exit code. The
    oracle is the point: a mis-resolved symbol links cleanly and then behaves wrong.
  • Sanitizer CI (ASAN/UBSAN/Miri) wired now while nearly vacuous on safe Rust, so it is
    in place when the unsafe object parsing lands.

Benchmarks

  • reld-bench times only the link step; ci/benchmark_stats.py renders the chart and
    publishes to an orphan benchmark-stats branch, mirroring zccache.
  • Absent linkers chart as n/a rather than being dropped.

Verified locally

  • fmt / clippy / test clean on the workspace
  • 9 python parser+renderer tests pass
  • all 4 workflow YAMLs parse
  • bench -> render produces a real chart
  • 100 stress seeds against lld, 0 failures

🤖 Generated with Claude Code

zackees and others added 4 commits August 1, 2026 14:00
Frames reld against wild on four axes: tri-platform targets, incremental
as architecture, a falsifiable "faster in every category" claim, and
CI-generated benchmarks.

Performance figures are labeled as targets throughout — nothing has been
benchmarked because there is no implementation yet.

Co-Authored-By: Claude <[email protected]>
reld-testkit generates deterministic synthetic link workloads from a u64
seed, with independent dials for the things that actually break linkers:
cross-unit reference density, weak symbols, TLS, and COMDAT-equivalent
inline functions.

reld-stress drives them end to end — generate, compile, link, run, and
check the exit code. The exit-code oracle is the point: a linker that
mis-resolves a symbol produces a binary that links cleanly and then
behaves wrong, which a crash-only test never sees. Failures report a
single seed that reproduces the whole input set, and the failing tree is
deliberately left on disk.

Verified locally: 10 seeds with the default linker and 40 with lld, all
green, on x86_64-pc-windows-msvc via clang.

Sanitizer CI (ASAN/LSAN, UBSAN, Miri) is wired now while it is nearly
vacuous on safe Rust, so it is already in place when the unsafe object
parsing lands — that code is the defect-dense part of any linker and
retrofitting sanitizers onto it later rarely happens.

clang is the harness default rather than cc/gcc: it exists on all three
target platforms and drives lld natively.

Co-Authored-By: Claude <[email protected]>
reld-bench times only the link step across every available linker,
compiling objects once up front. A benchmark that measures compile+link
buries the thing being measured.

Linkers absent from the runner are reported as n/a rather than skipped,
so a missing competitor is visible in the published chart instead of
quietly improving our numbers. The reld column is published empty for
the same reason.

ci/benchmark_stats.py scrapes the markdown tables, renders a dark-theme
chart with PIL at 4x supersampling, and emits latest.json, history.jsonl,
and index.html. benchmark-stats.yml force-pushes them to an orphan branch
that the README embeds, mirroring zccache pipeline.

Two bugs found and fixed while testing against real output: a UTF-8 BOM
made heading detection miss and parse the whole log to zero rows, and
history.jsonl was appended before rendering, so a run that produced no
chart still corrupted the series.

Verified end to end: reld-bench against lld on three workload sizes,
piped through the renderer to a real chart. 9 parser/renderer tests pass.

Note: raw.githubusercontent.com only serves public repos, so the README
image 404s until reld is made public.

Co-Authored-By: Claude <[email protected]>
Fixes found by actually running the tooling rather than assuming:

- clippy failed on an unused `dir` parameter in reld-bench link_once,
  and an empty leftover SCENARIOS const was dead code. Both removed;
  cargo fmt applied across the workspace.

- reld-bench would have reported wild as n/a forever. `-fuse-ld=wild`
  makes clang search for `ld.wild`, but `cargo install wild-linker`
  produces a binary named `wild`. The benchmark workflow now symlinks
  ld.wild, and fails loudly if ld.lld or ld.mold are missing instead of
  silently charting n/a — a pipeline that quietly drops competitors
  looks identical to one that works.

- Verified on crates.io that the crate is wild-linker 0.9.0 and that it
  installs a binary called wild. That was previously a guess.

Adds ci.yml (fmt, clippy, test on Linux/Windows/macOS; harness smoke
test; python tests) and pyproject.toml declaring pillow/pytest, which
nothing previously installed.

CI asserts that `reld` exits non-zero, so a future accidental exit(0)
from an unimplemented linker cannot pass silently.

Verified locally: fmt/clippy/test all clean, 9 python tests pass, all 4
workflow YAMLs parse, bench->render pipeline produces a real chart, and
100 stress seeds pass against lld with zero failures.

Co-Authored-By: Claude <[email protected]>
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