Closed
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
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Urgent Enhancements