justjosias / zig-toml

A TOML parser written in Zig

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

zig-toml

A TOML parser written in Zig targeting TOML v0.5.0. The end goal is for the program to be robust, with no crashing given any situation. Though, in its current state this program is probably far from that goal.

There is currently a lack of documentation but the tests contained should give enough of an idea on how to use this.

Quickstart Guide

Features

  • Tables
  • Keys (all kinds)
  • Single-line strings
  • Integers
  • Booleans
  • Arrays
  • Comments
  • Floats
  • Hexadecimal, octal, and binary numbers
  • Multi-line strings
  • String escapes
  • Inline tables
  • Array of tables
  • Time and date

Building and Usage

This library is self-contained and requires no dependencies.

To build simply run zig build and that will output a file called libtoml.a that you can link with your program.

If you want to run the tests then use the zig build test command.

About

A TOML parser written in Zig

License:MIT License


Languages

Language:Zig 100.0%