-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Closed
Labels
enhancementSolving this issue will likely involve adding new logic or components to the codebase.Solving this issue will likely involve adding new logic or components to the codebase.frontendTokenization, parsing, AstGen, Sema, and Liveness.Tokenization, parsing, AstGen, Sema, and Liveness.zig build systemstd.Build, the build runner, `zig build` subcommand, package managementstd.Build, the build runner, `zig build` subcommand, package management
Milestone
Description
Extracted from #14265.
Within a build.zig file, @import
should be allowed, and it should refer to the build.zig file of any dependencies listed in the manifest file.
Example:
build.zig.zon
.dependencies = .{
.@"android-sdk" = .{
.url = "...",
.hash = "...",
},
},
build.zig
const std = @import("std");
pub fn build(b: *std.build.Builder) void {
const exe = b.addExecutable("app", "src/main.zig");
@import("android-sdk").helperFunction(exe);
}
build.zig of android-sdk:
const std = @import("std");
pub fn build(b: *std.build.Builder) void {
// ...
}
pub fn helperFunction(artifact: *std.build.LibExeObjStep) void {
// ...
}
cc @MasterQ32
maxmilton, zenith391, gaetschwartz, michal-z, ekoeppen and 4 moreInKryption, ikskuh and tsokano
Metadata
Metadata
Assignees
Labels
enhancementSolving this issue will likely involve adding new logic or components to the codebase.Solving this issue will likely involve adding new logic or components to the codebase.frontendTokenization, parsing, AstGen, Sema, and Liveness.Tokenization, parsing, AstGen, Sema, and Liveness.zig build systemstd.Build, the build runner, `zig build` subcommand, package managementstd.Build, the build runner, `zig build` subcommand, package management
Type
Projects
Status
Urgent Enhancements