Skip to main content

Microsoft.Extensions.Configuration provider for INI-style config files using Zini.

Total Downloads
151
151
Published
Apr 5, 2026
6mo ago

Get Started

dotnet add package Zini.Configuration --version 1.0.0
ProductVersions
.NET
net10.0

README

Zini

A high-performance, zero-allocation INI-style configuration file parser for .NET 10 with Microsoft.Extensions.Configuration integration.

Features

  • Zero-allocation hot path — uses SearchValues<char> for SIMD-accelerated parsing
  • Immutable output — returns FrozenDictionary instances
  • Case-insensitive sections and keys with OrdinalIgnoreCase comparison
  • Section merging — duplicate sections merge automatically (last-write-wins for keys)
  • Quoted values — preserves whitespace and comment characters inside "..."
  • Inline comments — # and ; stripped from unquoted values
  • Global keys — keys before any section header are supported
  • Configuration integration — drop-in IConfigurationBuilder.AddConfigFile() extension

Installation

https://www.nuget.org/packages/Zini.Configuration

dotnet add package Zini.Configuration  # IConfigurationBuilder support

Quick Start

Direct Parsing

using Zini;

var config = ConfigParser.Parse("""
    # Application settings
    app_name = MyApp

    [Server]
    host = localhost
    port = 8080

    [Database]
    connection = "Server=db;Port=5432;User=""admin"""
    """);

// Access values
var host = config["Server"]["host"];       // "localhost"
var appName = config[""]["app_name"];       // "MyApp" (global section)

With Microsoft.Extensions.Configuration

using Microsoft.Extensions.Configuration;
using Zini.Configuration;

var configuration = new ConfigurationBuilder()
    .AddConfigFile("appsettings.ini", optional: false, reloadOnChange: true)
    .Build();

var host = configuration["Server:host"];   // "localhost"
var appName = configuration["app_name"];   // "MyApp" (global keys have no prefix)

Format Specification

See docs/config-format-spec.md for the full format specification including quoting rules, merging behavior, and error handling.

Building

dotnet build Zini.slnx
dotnet test Zini.slnx

License

MIT

Downloads by Version

Not enough data for chart

Similar & Alternative Packages

Hand-picked matching NuGet libraries based on tags & ecosystem

Depended On By

Find packages that declare this package as a dependency. NuGet does not provide a reverse-dependency endpoint, so candidates are checked on demand.

Adoption Assessment

Assess this package against its supported frameworks, license, maintenance signals and dependency graph before making it a project standard.

Compatibility metadata lists 1 target framework; confirm the exact target used by your application.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.