Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Streamline build setup #3

Open
ajkachnic opened this issue Aug 7, 2022 · 0 comments
Open

Streamline build setup #3

ajkachnic opened this issue Aug 7, 2022 · 0 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@ajkachnic
Copy link
Owner

ajkachnic commented Aug 7, 2022

Currently setting up the build system is a chore. Adding nectar as a package looks like this:

pub fn build(b: *std.build.Builder) void {
    const mode = b.standardReleaseOptions();

    const nectar = std.build.Pkg{
        .name = "nectar",
        .path = .{ .path = "libs/nectar/src/main.zig" },
        .dependencies = &.{
            .{ .name = "nectar:core", .path = .{ .path = "libs/nectar/core/src/main.zig" } },
            .{ .name = "nectar:midi", .path = .{ .path = "libs/nectar/midi/src/main.zig" } },
            .{ .name = "nectar:vst2", .path = .{ .path = "libs/nectar/vst2/src/main.zig" } },
        },
    };

    // snip
}

And as we add more packages, it will only get more complex. It would be nice to simplify this package import to something like

const nectarBuild = @import("libs/nectar/build.zig");

pub fn build(b: *std.build.Builder) void {
  const nectar = nectarBuild.generatePackage("libs/nectar/");
}
@ajkachnic ajkachnic added this to the 0.1.0 milestone Aug 7, 2022
@ajkachnic ajkachnic added the enhancement New feature or request label Aug 7, 2022
@ajkachnic ajkachnic self-assigned this Aug 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant