weskoerber / escalator

A library for privelege-escalation written in Zig.
https://weskoerber.github.io/escalator/
MIT License
1 stars 0 forks source link
zig zig-package

Escalator

A library for privelege-escalation written in Zig.

Requirements

Install

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);
}

Usage

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");

Acknowlegments