Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(tracking issue) Most important Zig issues affecting Mach #999

Open
slimsag opened this issue Sep 13, 2023 · 2 comments
Open

(tracking issue) Most important Zig issues affecting Mach #999

slimsag opened this issue Sep 13, 2023 · 2 comments
Milestone

Comments

@slimsag
Copy link
Member

slimsag commented Sep 13, 2023

Major issues affecting Mach

  • Linux/Windows->macOS cross compilation broken: Cross-compiling to macos or building inside nix sandbox fails to find headers from -isystem path ziglang/zig#18571
  • Optional & target-specific dependencies: ability to fetch only needed dependencies ziglang/zig#14597
    • Right now we have handfuls of packages in build.zig.zon that feel strange to download/fetch. You're building for Windows, and it's downloading a big xcode-frameworks package for example.
    • We also have some prebuilt binary dependencies; that we cannot fetch using build.zig.zon because it is the difference between a 10MB download vs. over 2GB (10MB for every OS+arch+build mode.)
    • This is harming our ability to ship our pure-Zig GPU backend, because it complicates how much we need to do in build.zig ourselves to get optional dependencies. Not totally blocked, but it would be very very nice to have optional dependencies!

Minor annoyances / things we have workarounds for

Past issues

Resolved issues

  1. IterableDir does not iterate over all contents created after opening (Linux BTRFS) ziglang/zig#17095)
    • Why: Right now we have one contributor who can't develop Mach due to mismatched package hashes. Instead they are pushing commits to a pull request rapidly to have CI run tests for them (lol.)
  2. package manager: transitive dependencies must be listed in the top-level build.zig.zon is painful ziglang/zig#17135
    • Why: This harms the first-time user experience of someone trying Mach, it's very hard to communicate this to people and we get 1-3 people per week asking about this saying they can't get a Mach project working.
  3. package manager: no dependency named 'X' in 'build.zig.zon'; but it is ziglang/zig#16354
    • Why: We have a lot of hacks in place to workaround this issue. Specifically, no pub fn build can call b.dependency if we want to use our packages transitively. In practice this means most of our projects CI pipelines are disabled right now because we have to comment out zig build test entirely.
@slimsag slimsag pinned this issue Sep 13, 2023
@slimsag slimsag added this to the Mach 0.3 milestone Sep 16, 2023
@slimsag slimsag unpinned this issue Sep 24, 2023
@slimsag slimsag modified the milestones: Mach 0.3, Mach 0.4 Nov 6, 2023
@kubkon
Copy link
Contributor

kubkon commented Jan 25, 2024

Potential fix for ziglang/zig#17130 incoming in ziglang/zig#18677.

EDIT: confirmed locally, it fixes the issue.

@kchilton
Copy link

Another item here is the inclusion of libX11 when compiling core on darwin. Newer macos installs do not include X11 libraries or includes by default, so building is not the standalone you-only-need-zig that it wants to be. Just like Mac uses metal instead of the standards, it also has CoreGraphics (aka Quartz) to implement the 2D framework and provide the Aqua window. This might be a better route forward for mach on Apple products that includes the Mac, iPad, and iPhone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants