inez
inez

weskoerber/inez

MIT

Inez - A fast INI parser

0 0 0 0
3
build.zig.zon  build.zig 
View on Github  
Updated: 2:16:10 AM Sat Nov 23 2024 Size: 10KB Created: 12:28:40 AM Sat Nov 23 2024
Dependencies:
No known dependencies
zig  fetch  --save  git+https://github.com/weskoerber/inez

Inez - A fast INI parser

Quickstart

  1. Fetch inez using Zig's package manager

    zig fetch --save git+https://github.com/weskoerber/inez#main
    
  2. Add inez to your artifacts in build.zig

    const std = @import("std");
    
    pub fn build(b: *std.Build) void {
        const target = b.standardTargetOptions(.{});
        const optimize = b.standardOptimizeOption(.{});
    
        const inez = b.dependency("inez", .{
                .target = target,
                .optimize = optimize,
        }).module("inez");
    
        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(inez);
    }
    

Usage

To use inez, there are 4 main steps:

  1. Initialize inez
  2. Load a document
  3. Parse the document
  4. Use parsed document

See the examples/ directory for some examples. You can run them by using the example step (where name is the name of the example):

zig build example -Dexample=<name>