A library for privelege-escalation written in Zig.
0.12.0
or newer)First, add the dependency to your build.zig.zon
using zig fetch
:
zig fetch --save git+https://github.com/weskoerber/escalator#main
Then, import escalator
into your build.zig
:
const std = @import("std");
pub fn build(b: *std.Build) void {
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});
const escalator = b.dependency("escalator", .{
.target = target,
.optimize = optimize,
}).module("escalator");
const my_exe = b.addExecutable(.{
.name = "my_exe",
.root_source_file = b.path("src/main.zig"),
.target = target,
.optimize = optimize,
});
my_exe.root_module.addImport(escalator);
}
Documentation can be found at https://weskoerber.github.io/escalator. The docs are generated by Zig's autodoc feature and deployed via Github Actions.
Also see the examples
directory for example usage. Example executables can be
built by setting the examples
option to true
:
const mac_address = b.dependency("escalator", .{
.target = target,
.optimize = optimize,
.examples = true,
}).module("escalator");