benhoyt/inih

Simple .INI file parser in C, good for embedded systems

View on GitHub ↗Jump to charts ↓Open shareable report →

benhoyt/inih has 3k+ stars and 550+ forks on GitHub, is written in C++, and was last pushed on Sep 27, 2026. Data as of . Signed-in members get hourly updates — create a free account.

Summary Information

Updated 2 hours ago
Added to GitGenius on September 22nd, 2026
Created on March 12th, 2015
Open Issues & Pull Requests: 10 (+0)
GitHub issues: Enabled
Number of forks: 579
Total Stargazers: 3,052 (+0)
Total Subscribers: 93 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 7.1 hours
Mean response time: 15.9 days
90th percentile: 18.5 days
Tracked items: 15

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 4
New in 7 days: 0
Closed in 7 days: 0
Avg open age: 511 days
Stale 30+ days: 4
Stale 90+ days: 4

Recent activity

Opened in 7 days: 0
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

No label distribution available yet.

Most active issues this week

Sign in to see which issues are moving.
Sign in

Detailed Description

inih is a simple .INI file parser written in C, designed for embedded systems and low-memory environments.

The tool solves the problem of parsing configuration files in resource-constrained settings where a full-featured parser would be excessive. It uses a callback-based, SAX-style approach where the parser invokes a handler function for each name-value pair it encounters, rather than building an in-memory representation of the entire file. This design keeps memory usage minimal and the implementation compact. The parser supports Python ConfigParser-compatible syntax, including RFC 822-style multi-line entries and colon-separated values, and can read from files, strings, or custom I/O streams via different entry points.

Projects with tight memory budgets or simple configuration needs should consider this tool. It suits embedded systems, firmware, and applications where dependencies must be kept minimal. The implementation is intentionally small and straightforward, making it easy to audit and integrate directly into a codebase. Developers who need more sophisticated configuration handling or prefer building data structures in memory may find the callback model less convenient than alternatives, but for systems where every kilobyte matters, the trade-off favors simplicity.

The project maintains a focused scope with compile-time options to customize behavior without runtime overhead. Options control syntax features like multi-line entries, UTF-8 BOM handling, inline and start-of-line comments, and whether to allow valueless names. Parsing behavior can be tuned to stop on first error, report line numbers to handlers, or trigger callbacks when new sections are encountered. Memory usage remains predictable since no dynamic allocation occurs during parsing.