You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 26, 2025. It is now read-only.
Repository navigation
This repository was archived by the owner on Nov 26, 2025. It is now read-only.
I have zap defined in build.zig & build.zig.zon, zig build succeeds.
But when I try to zig-runfrom Emacs it fails with:
main.zig:2:21: error: no package named 'zap' available within package 'root'
I probably know why it happens (sorry I am relatively new to Zig), because zig run does not play well with build.zig. But doesn't this make zig run and zig-run Emacs function useless for larger (and practical) projects?
How do you run your code from within Emacs while making projects with Zig?
zig-run will not use a build.zig even if one is present. For larger projects, you're right, it's very unlikely to be used, but for small single-file "scratchpads" it can be useful.
#99 is a proposal to add zig build run as a new function. I'll close this issue in favor of that one. If you think this topic deserves a separate issue, we can reopen this again.
Activity
joachimschmidt557 commentedon Mar 25, 2024
zig-runwill not use abuild.zigeven if one is present. For larger projects, you're right, it's very unlikely to be used, but for small single-file "scratchpads" it can be useful.zig-mode/zig-mode.el
Line 107 in b6f5375
#99 is a proposal to add
zig build runas a new function. I'll close this issue in favor of that one. If you think this topic deserves a separate issue, we can reopen this again.