Skip to content

Build with zig - #431

Merged
gchatelet merged 5 commits into
google:mainfrom
zig-o11y:build-zig
Oct 14, 2025
Merged

gchatelet merged 5 commits into
google:mainfrom
zig-o11y:build-zig

Conversation

@inge4pres

@inge4pres inge4pres commented Oct 8, 2025 •

Copy link
Copy Markdown
Contributor

Reason for this PR

Relates to:

Details

  • add build.zig and build.zig.zon
  • add a zig.yml workflow to build on Github actions

Additional context

The build scripts is derived from what CMake does; it compiles a static library and an executable that links to it for testing.

The Github workflow simply ensure compilation via build.zig succeeds and runs the executable on 4 Linux targets.

Further work

build.zig could also be extended to include a test step that runs the c++ tests in the test folder.

Add the necessary files to build a static library with Zig.
The build also includes producing execuable that can be cross-compiled

Signed-off-by: inge4pres <[email protected]>
@inge4pres
inge4pres marked this pull request as ready for review October 9, 2025 20:37

@gchatelet gchatelet left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@Mizux can you have a look as well?

Comment thread build.zig.zon Resolved
Comment thread .github/workflows/zig.yml Resolved
Comment thread .github/workflows/zig.yml Resolved
Comment thread .github/workflows/zig.yml Resolved
Comment thread .github/workflows/zig.yml Resolved
@inge4pres
inge4pres requested a review from Mizux October 13, 2025 14:41

@Mizux Mizux left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@Mizux Mizux added enhancement New feature or request zig labels Oct 13, 2025
@Mizux Mizux added this to the v0.11 milestone Oct 13, 2025

@Mizux Mizux left a comment •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM
note: Macos ci failure were flacky (and fixed by d868036)

@gchatelet
gchatelet merged commit 2182eb5 into google:main Oct 14, 2025
social4hyq pushed a commit to social4hyq/homebrew-core that referenced this pull request Sep 20, 2026
cpu_features 0.11.0

Created-by: HarmonybrewBot
Commit-by: HarmonybrewBot
Merged-by: HarmonybrewBot
Description: Created by `brew bump`

---

Created with `brew bump-formula-pr`.<details>
  <summary>release notes</summary>
  <pre>## What's Changed
* Add support for AMD Zen 5, Intel Arrow Lake and Intel Lunar Lake microarchitectures by @fiban123 in google/cpu_features#451
* Build with zig by @inge4pres in google/cpu_features#431,  google/cpu_features#435, google/cpu_features#436, google/cpu_features#445, google/cpu_features#448
* Update AArch64 features to Linux 6.12. by @petertarjan in google/cpu_features#404
* [Windows][AArch64] Use base introspection table implementation by @amitin in google/cpu_features#442
* Fix broken `CPU_FEATURES_OS_MACOS` and `CPU_FEATURES_OS_IPHONE` detection by @gchatelet in google/cpu_features#403

* cmake: Fix googletest build by @Mizux in google/cpu_features#432
* Update bazel by @gchatelet in google/cpu_features#443
* [ci] Bump QEMU version by @gchatelet in google/cpu_features#454
* [ci] use macos-15-intel runners by @Mizux in google/cpu_features#437

## New Contributors
* @vorburger made their first contribution in google/cpu_features#389
* @petertarjan made their first contribution in google/cpu_features#404
* @inge4pres made their first contribution in google/cpu_features#431
* @synqa made their first contribution in google/cpu_features#445
* @fiban123 made their first contribution in google/cpu_features#451

**Full Changelog**: https://github.com/google/cpu_features/compare/v0.10.1...v0.11.0</pre>
  <p>View the full release notes at <a href="https://github.com/google/cpu_features/releases/tag/v0.11.0">https://github.com/google/cpu_features/releases/tag/v0.11.0</a>.</p>
</details>
<hr>

See merge request: Harmonybrew/homebrew-core!9955
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request zig

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants