#build - accessing imports

1 messages · Page 1 of 1 (latest)

ivory portal
#

hey, i have the following part of code in my build file

const OpenAPI = @import("openapi.zig");

const build_options = b.addOptions();
    const openapi_option = b.option(bool, "openapi", "Generate OpenAPI documentation") orelse false;
    build_options.addOption(bool, "openapi", openapi_option);

    if (openapi_option) {
        OpenAPI.generate();
    }

however this runs into the following issue
root source file struct 'build' has no member named Pool (import from pg.zig)/ Method (import from http.zig)

my goal is for the openapi.zig file to compile a list of comptime available endpoints (from within each route file) and work with it. that means i have to import the route files in question

is there any way i can resolve this?

#

im not too good with the build system so im not sure how i should approach this in the first place, so any suggestions welcome

tough otter
ivory portal
#

ohh i see