Skip to content

Releases: DataBooth/mojo-toml

v0.5.0: TOML 1.0 Complete + Partial TOML 1.1

11 Jan 10:53

Choose a tag to compare

Package Files

toml.mojopkg - Compiled with Mojo 0.26.1.0.dev2026010605 (9f204ce1)

⚠️ Compatibility Note: This .mojopkg file is compiled with the Mojo version shown above. It may not work with different Mojo versions. For maximum compatibility, use source installation (git submodule or direct copy).

v0.4.0 - TOML Writer Release 🔥

11 Jan 07:28

Choose a tag to compare

Package Files

toml.mojopkg - Compiled with Mojo 0.26.1.0.dev2026010605 (9f204ce1)

⚠️ Compatibility Note: This .mojopkg file is compiled with the Mojo version shown above. It may not work with different Mojo versions. For maximum compatibility, use source installation (git submodule or direct copy).

v0.3.0 - Quality and Performance

07 Jan 17:26

Choose a tag to compare

🎉 Quality and Performance Release

mojo-toml v0.3.0 brings critical bug fixes, comprehensive testing improvements, performance documentation, and enhanced examples. All 96 tests passing!


🚀 Key Highlights

Critical Bug Fixes

  • Proper dotted key support - a.b.c = "value" now creates nested structures correctly
  • Duplicate key detection - Raises errors when duplicate keys are found
  • Enhanced error messages - All errors now include line and column context
  • Named type constants - Replaced magic numbers with TomlValueType struct using comptime

Parser Improvements

  • 🔄 Parser.reset() method for parser instance reusability
  • 🛠️ Helper methods - Extracted copy_path() to eliminate code duplication
  • 📝 Better documentation - Enhanced comments explaining Mojo's ownership model

Performance & Benchmarking

  • Comprehensive benchmarks - New benchmark suite in benchmarks/benchmark_parser.mojo
  • 📊 Performance documentation - docs/PERFORMANCE.md with detailed analysis
  • 🔢 Measured performance:
    • Simple parse: 26μs (37,000 parses/sec)
    • Real pixi.toml: 2ms (446 parses/sec)
    • Table access: 10μs overhead (negligible)

Testing Improvements

  • 📁 Reorganized tests - 10 logical test files (was 7)
  • 🏷️ Better naming - test_basic.mojotest_lexer.mojo
  • More tests - 96 tests total (up from 79)
  • 📚 Documentation - New docs/TEST_ORGANIZATION.md guide

Test Files:

  1. test_lexer.mojo (25) - Lexer/tokenization
  2. test_parser.mojo (10) - Parser core
  3. test_real_world.mojo (4) - Real files
  4. test_fixtures.mojo (5) - Complex examples
  5. test_arrays.mojo (14) - Array parsing
  6. test_inline.mojo (13) - Inline tables
  7. test_tables.mojo (8) - Table headers
  8. test_dotted_keys.mojo (7) - Dotted keys [NEW]
  9. test_validation.mojo (7) - Error detection [NEW]
  10. test_parser_reset.mojo (3) - Parser API [NEW]

Enhanced Examples

  • 🎨 Quickstart example - examples/quickstart.mojo mirrors README
  • 📊 Enhanced parse_pixi.mojo - Comprehensive configuration reporting
  • 🧪 Test examples - examples/test_quickstart.mojo demonstrates testing

Project Organization

  • 📂 Organized docs - Moved documentation to docs/ directory
  • 🚫 Proper .gitignore - Excludes build artifacts and binaries
  • 🧹 Clean repository - Removed accidentally committed binaries

📝 Technical Details

Dotted Key Implementation

# Now properly creates nested structure:
a.b.c = "value"  
# Results in: {a: {b: {c: "value"}}}

Duplicate Key Detection

key = "value1"
key = "value2"  # Error: "Duplicate key: key"

Error Context

Error: Unexpected token at line 5, column 12

🔄 Migration

No breaking changes! All enhancements are backward compatible.


📦 Installation

# Git submodule (recommended)
git submodule add https://github.com/databooth/mojo-toml vendor/mojo-toml

# Direct copy
git clone https://github.com/databooth/mojo-toml
cp -r mojo-toml/src/toml your-project/lib/toml

# Coming soon: modular-community channel
pixi add mojo-toml

🙏 Acknowledgements


See CHANGELOG.md for complete details.

v0.2.0: Nested Table Implementation 🔥

07 Jan 12:37
c002d57

Choose a tag to compare

Package Files

toml.mojopkg - Compiled with Mojo 0.26.1.0.dev2026010605 (9f204ce1)

⚠️ Compatibility Note: This .mojopkg file is compiled with the Mojo version shown above. It may not work with different Mojo versions. For maximum compatibility, use source installation (git submodule or direct copy).