Zini 1.0.0

dotnet add package Zini --version 1.0.0
                    
NuGet\Install-Package Zini -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Zini" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Zini" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Zini" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Zini --version 1.0.0
                    
#r "nuget: Zini, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Zini@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Zini&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Zini&version=1.0.0
                    
Install as a Cake Tool

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

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.0

    • No dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Zini:

Package Downloads
Zini.Configuration

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

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 67 4/5/2026