On this page
article
Build Script
Calling violet build starts the compilation process. The build.vi file is
read, which provides build instructions.
const build = import("std/build");
fn main(b: *build.Builder) {
var opts = b.options();
var mode = opts.enum("mode", build.BuildMode, .Debug);
var exe = b.addExecutable(.{
.name = "myapp",
.root = "src/main.vi",
.mode = mode,
});
exe.linkSystemLib("z");
exe.libc(.musl);
exe.addIncludePath("vendor/mylib/include");
b.install(exe);
}