Skip to content

Replace x.py build automation with Meson while retaining Cargo - #1055

Merged
LunaStev merged 3 commits into
wavefnd:masterfrom
LunaStev:build/meson-transition
Oct 28, 2026
Merged

LunaStev merged 3 commits into
wavefnd:masterfrom
LunaStev:build/meson-transition

Conversation

@LunaStev

@LunaStev LunaStev commented Oct 27, 2026 •

Copy link
Copy Markdown
Member

Summary

Replace the root x.py command dispatcher with Meson build definitions while retaining Cargo as the Rust build and dependency authority. The normal source build becomes meson setup build followed by meson compile -C build; release packaging depends on the compiler build in the Meson graph.

Meson now defines compiler-host/profile/LLVM-feature options, tests, distribution tasks, staged installation, Rust target provisioning and explicit cleanup. Platform-specific LLVM/CRT/runtime handling remains in focused Python helpers. CI compiler builds, cross packages and the FreeBSD guest use Meson, with pinned Meson/Ninja provisioning after each Python setup and updated cache inputs, including both named Windows Python setup steps.

Motivation

Fixes #1054.

This removes the custom automation entry point and its import-time target detection, while keeping Cargo's incremental dependency graph and existing platform acceptance policies. The former Tk selector is replaced by Meson's setup/configure options. CONTRIBUTING.md includes the basic replacement commands. The root docs/ directory is excluded from Git and retained locally; published documentation is maintained in wavefnd/wave-platform. Tracked references to local-only guides have been removed or replaced.

Target and compatibility impact

  • Preserve the 15 existing automation compiler-host choices and Wave's existing emitted target/ABI matrix. Each Meson build directory selects one compiler host and feature set; experimental host choices do not imply native validation.
  • Keep native Cargo output under target/<profile>/ and explicit host output under target/<triple>/<profile>/. Preserve Rust 1.89.0, locked dependencies, two Cargo jobs, Windows feature/CRT selections and LLVM runtime path handling.
  • Preserve archive names, adjacent compiler/std/LLVM/CRT payloads, committed std membership, checksums and source/std metadata. Meson installation supports prefix/DESTDIR and installs the adjacent payload under bindir; website installers and the legacy std lookup path are unchanged.
  • Preserve all 31 CI plans and 228 stages, job identities, matrices, timeouts, evidence outputs and release/Nightly eligibility and publication policies. Independent contributor changes to command validation, package rollback and std scanning are outside this PR.
  • Compiler version, Cargo manifests/lockfile, Rust/Wave source, LLVM-default behavior and the existing --whale CLI remain unchanged.

Validation

Local Linux amd64 validation with Rust 1.89.0 and LLVM 21.1.8:

  • Actual Meson setup/compile, including a build with pinned Meson 1.8.5 and Ninja 1.13.0.
  • meson test -C <build> --suite rust --print-errorlogs: workspace/all-target Rust regressions passed.
  • meson test -C <build> --suite tooling --print-errorlogs: full tooling run completed 408 tests, with 380 passes and 28 conditional platform/capability skips. Subsequent focused runs cover the final changes, including the additional unknown-task regression.
  • python3 -m unittest tools.test_meson tools.test_build_clean tools.test_freebsd_cache tools.test_msvc_package_tools tools.test_package_inputs: 24 tests passed.
  • python3 -m unittest tools.test_meson.BuildEnvironmentTests tools.test_ci tools.test_freebsd_cache: 56 tests passed.
  • python3 -m unittest tools.test_meson tools.test_ci: 58 tests passed after fixing the two Windows bootstrap omissions. The added workflow regression failed for both omissions before the fix and passes across CI/release/Nightly after it.
  • Replayed the bootstrap in a fresh Python environment without Meson: pinned requirements installation, Meson setup and actual case-matrix execution all passed.
  • meson test -C <build> --suite policy --print-errorlogs, Python compile checks, focused Ruff lint/format checks and git diff --check passed.
  • Actual native package creation, archive/sidecar integrity checks, DESTDIR install/reinstall and dry-run checks passed. Extracted and installed distributions resolved bundled std, linked and ran a program with an empty HOME and no Wave/LLVM/library-path overrides.
  • Compared workflow job/matrix/timeout/gate/evidence/publication contracts and all original CI arguments against the base; the CI plan file is unchanged.
  • Documentation location follow-up: all four local guide files retained byte-for-byte and ignored, no docs/ files remain in the Git index, generated std API check and four documentation-generator unit tests passed, and git diff --check passed. The 50-job CI result below applies to the preceding CI repair commit.

Initial CI 40467229910 passed 48/50 jobs, including native packages for all nine targets. Both Windows build jobs stopped before compilation because their named Python setup steps lacked the Meson/Ninja installation step; this PR now includes that repair. CI 40628253453 completed successfully at commit edf90cef968adf1f5d64e638a2c324f02d4a09a9: all 50 jobs succeeded, including both repaired Windows native build/test lanes and every package target. No release or Nightly publication was performed.

Checklist

  • Commits include a DCO Signed-off-by line.
  • Tests cover new behavior or the PR explains why no test is needed.
  • User-facing changes include documentation or diagnostics updates.
  • The change preserves the license boundary between the compiler and std/.

@LunaStev
LunaStev merged commit 3507646 into wavefnd:master Oct 28, 2026
50 checks passed
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.

Replace x.py build automation with Meson while retaining Cargo

1 participant