Closed corpix closed 6 months ago
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.
https://github.com/ziglang/zig-mode/blob/b6f5375efeb97026410190f352f1044214fa0289/zig-mode.el#L107
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.
Let's say I have
src/main.zig
with following:I have
zap
defined inbuild.zig
&build.zig.zon
,zig build
succeeds. But when I try tozig-run
from Emacs it fails with:I probably know why it happens (sorry I am relatively new to Zig), because
zig run
does not play well withbuild.zig
. But doesn't this makezig run
andzig-run
Emacs function useless for larger (and practical) projects?How do you run your code from within Emacs while making projects with Zig?