Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
`mojo-toml` enables native TOML parsing in Mojo without Python dependencies. Parse configuration files, project settings, and structured data with a clean, type-safe API.

**Key features:**

- ✅ **TOML 1.0 compliant** - full specification support
- ✅ **Array of tables** - `[[section]]` syntax for repeated table arrays
- ✅ **Alternative number bases** - hex (`0xDEAD`), octal (`0o755`), binary (`0b1101`)
Expand Down Expand Up @@ -200,10 +201,12 @@ pixi add mojo-toml
### 🔮 TOML 1.1 (Partial Support)

TOML 1.1 features implemented:

- ✅ `\\xHH` escape sequences for codepoints 0-255 (e.g., `\\x00`, `\\x61`)
- ✅ `\\e` escape for escape character (U+001B)

TOML 1.1 features not yet implemented:

- Multiline inline tables with trailing commas
- Optional seconds in datetime/time values

Expand Down Expand Up @@ -264,6 +267,7 @@ pixi run benchmark-python
```

Both benchmarks generate markdown reports in `benchmarks/reports/` with:

- System specifications (OS, CPU, GPU, RAM, Mojo/Python versions)
- Performance tables with throughput and latency
- Timestamp and machine configuration
Expand Down Expand Up @@ -292,15 +296,18 @@ See [ROADMAP.md](docs/planning/ROADMAP.md) for areas where contributions would b
## Related Projects

**Other Mojo Config Libraries:**

- **[mojo-ini](https://github.com/databooth/mojo-ini)** - INI file parser with Python configparser compatibility
- **[mojo-dotenv](https://github.com/databooth/mojo-dotenv)** - Load environment variables from .env files

**Other TOML Parsers in Mojo:**

- **[decimojo/tomlmojo](https://github.com/forfudan/decimojo/tree/main/src/tomlmojo)** - Lightweight TOML parser (~900 LOC, parser-only) embedded in the decimojo library. Good choice if you only need basic config reading for tests and don't need a standalone package or TOML 1.0 features.

## Acknowledgements

Special thanks to:

- **[DataBooth](https://www.databooth.com.au/posts/mojo)** - Project sponsor, building high-performance data and AI services with Mojo
- **[Python tomli](https://github.com/hukkin/tomli)** - Reference implementation for validation
- **[TOML Specification](https://toml.io/en/v1.0.0)** - Tom Preston-Werner's excellent config format
Expand Down
21 changes: 21 additions & 0 deletions llms-full.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# mojo-toml
> Native TOML 1.0 parser and writer for Mojo with zero Python runtime dependencies.
## Project Summary
mojo-toml provides parsing and writing support for TOML configuration files in Mojo.
The library targets TOML 1.0 compliance and includes partial TOML 1.1 support.
## Core Features
- TOML 1.0 parser support, including nested tables, dotted keys, arrays, and inline tables.
- TOML writer support with semantic round-trip fidelity.
- Validation for duplicates and malformed structures with line and column error context.
- Support for additional numeric bases (`0x`, `0o`, `0b`) and selected TOML 1.1 escapes.
## Primary Docs
- Home: https://databooth.github.io/mojo-toml/
- Changelog: https://databooth.github.io/mojo-toml/changelog.html
- Performance: https://databooth.github.io/mojo-toml/user-guide/PERFORMANCE.html
- Platform builds: https://databooth.github.io/mojo-toml/user-guide/PLATFORM_BUILDS.html
- Roadmap: https://databooth.github.io/mojo-toml/roadmap.html
## Install Guidance
- Recommended packaging and release consumption is documented in the home page and user guide pages.
- For source-based consumption, use the repository and include `src` in Mojo include paths.
## Repository
- GitHub: https://github.com/DataBooth/mojo-toml
11 changes: 11 additions & 0 deletions llms.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# mojo-toml
> Native TOML 1.0 parser and writer for Mojo with zero Python runtime dependencies.
## Documentation
- [Home](https://databooth.github.io/mojo-toml/): Project overview, quickstart, installation, and usage.
- [Changelog](https://databooth.github.io/mojo-toml/changelog.html): Release history and version notes.
- [Performance](https://databooth.github.io/mojo-toml/user-guide/PERFORMANCE.html): Benchmark methodology and results.
- [Platform Builds](https://databooth.github.io/mojo-toml/user-guide/PLATFORM_BUILDS.html): Packaging and platform build considerations.
- [Roadmap](https://databooth.github.io/mojo-toml/roadmap.html): Planned improvements and future work.
- [Blog Findings](https://databooth.github.io/mojo-toml/blog/2026-06-20-great-docs-mojo-findings.html): Great Docs rollout findings for this repository.
## Source
- [Repository](https://github.com/DataBooth/mojo-toml)
Loading