Skip to content

zig-run for files with external dependencies #96

Closed as not planned
Closed as not planned
@corpix

Description

@corpix

Let's say I have src/main.zig with following:

const std = @import("std");
const zap = @import("zap");

...

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions