Retour au cours

Comprendre Build.zig

Cours complet : Programmation Zig de Zéro à Héros

Le script de build

build.zig est un programme Zig standard qui décrit comment compiler votre projet. Il est beaucoup plus puissant qu'un Makefile.

zig pub fn build(b: *std.Build) void { const target = b.standardTargetOptions(.{}); const exe = b.addExecutable(.{ .name = "mon-projet", .root_source_file = .{ .path = "src/main.zig" }, .target = target, }); b.installArtifact(exe); }