add(zig-interface): dependency to check interface contracts at comptime
All checks were successful
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 53s
All checks were successful
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 53s
The described interfaces for `Widget` and `Layout` are now defined and correspondingly checked at comptime.
This commit is contained in:
10
build.zig
10
build.zig
@@ -15,13 +15,21 @@ pub fn build(b: *std.Build) void {
|
||||
// set a preferred release mode, allowing the user to decide how to optimize.
|
||||
const optimize = b.standardOptimizeOption(.{});
|
||||
|
||||
const zg = b.dependency("zg", .{});
|
||||
const zg = b.dependency("zg", .{
|
||||
.target = target,
|
||||
.optimize = optimize,
|
||||
});
|
||||
const interface = b.dependency("interface", .{
|
||||
.target = target,
|
||||
.optimize = optimize,
|
||||
});
|
||||
|
||||
const lib = b.addModule("zterm", .{
|
||||
.root_source_file = b.path("src/zterm.zig"),
|
||||
.target = target,
|
||||
.optimize = optimize,
|
||||
});
|
||||
lib.addImport("interface", interface.module("interface"));
|
||||
lib.addImport("code_point", zg.module("code_point"));
|
||||
|
||||
const exe = b.addExecutable(.{
|
||||
|
||||
Reference in New Issue
Block a user