zigzap / zap

blazingly fast backends in zig
MIT License
1.98k stars 71 forks source link

Cannot build Zap #112

Open Fyphen1223 opened 2 weeks ago

Fyphen1223 commented 2 weeks ago

This is the log:

/workspaces/ZigStream/build.zig:44:8: error: no field or member function named 'addModule' in 'Build.Step.Compile'
    exe.addModule("zap", zap.module("zap"));
    ~~~^~~~~~~~~~
/home/codespace/.vscode-remote/data/User/globalStorage/ziglang.vscode-zig/zig_install/lib/std/Build/Step/Compile.zig:1:1: note: struct declared here
const builtin = @import("builtin");
^~~~~
referenced by:
    runBuild__anon_8818: /home/codespace/.vscode-remote/data/User/globalStorage/ziglang.vscode-zig/zig_install/lib/std/Build.zig:2116:27
    main: /home/codespace/.vscode-remote/data/User/globalStorage/ziglang.vscode-zig/zig_install/lib/compiler/build_runner.zig:301:29
    remaining reference traces hidden; use '-freference-trace' to see all reference traces
/home/codespace/.cache/zig/p/12203126ff24e8018655eb7444c91f0d527d1213af16fcf2a578281abc994d01cc46/build.zig:24:33: error: no field named 'path' in union 'Build.LazyPath'
        .root_source_file = .{ .path = "src/zap.zig" },
                                ^~~~
/home/codespace/.vscode-remote/data/User/globalStorage/ziglang.vscode-zig/zig_install/lib/std/Build.zig:2171:22: note: union declared here
pub const LazyPath = union(enum) {
                     ^~~~~

This is my build.zig.zon:

.{
    // This is the default name used by packages depending on this one. For
    // example, when a user runs `zig fetch --save <url>`, this field is used
    // as the key in the `dependencies` table. Although the user can choose a
    // different name, most users will stick with this provided value.
    //
    // It is redundant to include "zig" in this name because it is already
    // within the Zig package namespace.
    .name = "ZigStream",

    // This is a [Semantic Version](https://semver.org/).
    // In a future version of Zig it will be used for package deduplication.
    .version = "0.0.1",

    // This field is optional.
    // This is currently advisory only; Zig does not yet do anything
    // with this value.
    //.minimum_zig_version = "0.11.0",

    // This field is optional.
    // Each dependency must either provide a `url` and `hash`, or a `path`.
    // `zig build --fetch` can be used to fetch all dependencies of a package, recursively.
    // Once all dependencies are fetched, `zig build` no longer requires
    // internet connectivity.
    .dependencies = .{
        .zap = .{
            .url = "https://github.com/zigzap/zap/archive/3f9c7d0f6b19a2ae32ba5e1a58681512c6ffc86d.tar.gz",
            .hash = "12203126ff24e8018655eb7444c91f0d527d1213af16fcf2a578281abc994d01cc46",
        },
    },
    .paths = .{
        "",
    },
}