Skip to content

Conversation

@Mjboothaus
Copy link

Adds mojo-toml v0.5.1 - Native TOML 1.0 parser and writer for Mojo.

Changes from previous PR #193:

  • ✅ Added package image (recipes/mojo-toml/image.png) for builds.modular.com display per reviewer request
  • ✅ Enabled CodeQL scanning and added badge to repository README
  • ✅ Bumped to v0.5.1 to mark this enhanced release

Package features:

  • Complete TOML 1.0 specification support
  • Array of tables [[section]] syntax
  • Alternative number bases (hex, octal, binary)
  • TOML writer with round-trip fidelity
  • 168 comprehensive tests (100% passing)
  • Zero Python dependencies

Repository: https://github.com/DataBooth/mojo-toml
CodeQL: CodeQL

Supersedes #193

Mjboothaus and others added 5 commits January 8, 2026 10:33
Package: mojo-toml v0.3.0

A native TOML 1.0 parser for Mojo with zero Python dependencies.

Features:
- Complete TOML 1.0 syntax support
- 96 comprehensive tests ensuring reliability
- Nested tables, dotted keys, duplicate detection
- Clear error messages with line/column context
- Performance: 26μs for simple parses, 2ms for real files

Repository:
- GitHub: https://github.com/DataBooth/mojo-toml
- Release: https://github.com/DataBooth/mojo-toml/releases/tag/v0.3.0
- License: MIT

Testing:
Package includes test_package.mojo which validates:
- Simple key-value parsing
- Integer and array parsing
- Nested table structures
- Dotted key functionality

All 96 tests pass in the source repository.

Sponsored by DataBooth (https://www.databooth.com.au/posts/mojo)
Updates mojo-toml from v0.3.0 to v0.5.0 with full TOML 1.0 compliance
and partial TOML 1.1 support.

Major changes since v0.3.0:
- Complete TOML 1.0 specification (array-of-tables, alt number bases)
- Partial TOML 1.1 support (\xHH and \e escapes)
- 168 tests (up from 96)
- Comprehensive benchmarking system
- Pre-commit hooks fixed
- TOML writer with round-trip fidelity

Release: https://github.com/DataBooth/mojo-toml/releases/tag/v0.5.0

Co-Authored-By: Warp <agent@warp.dev>
@bgreni
Copy link
Collaborator

bgreni commented Jan 29, 2026

Looks like there is an error in your recipe, also I believe the mojo version you would be looking for is 0.25.7 (though 0.26.1 is coming soon)

@Mjboothaus
Copy link
Author

Mjboothaus commented Jan 29, 2026

Hi - thanks @bgreni - as a bit of an aside see also #195 - I think this might be a modular-community repo issue that causes some errors too?

Actually I think the macOS build failure was specifically because the CI couldn't find tag v0.5.0 when the package version declared 0.5.1 - this is now resolved.

Looking more closely - the main issue is that the recipe schema expects:
• tests (plural) instead of test
• documentation instead of doc_url
• repository instead of dev_url

Ok so version should be pinned to latest stable (25.7)? I am now doing the following with the version:

context:
  version: X.Y.Z
  mojo_version: "=0.25.7"

package:
  name: mojo-*
  version: ${{ version }}

requirements:
  build:
    - mojo-compiler ${{ mojo_version }}
  host:
    - mojo-compiler ${{ mojo_version }}
  run:
    - ${{ pin_compatible('mojo-compiler') }}

which is apparently what other packages do.


Furthermore made the following enhancements to improve my build reliability:

Fixed recipe schema compliance issues and standardised Mojo version management across all of my 5 mojo packages including mojo-toml (especially adding local validation):

• ✅ Schema fixes: Changed test: → tests:, doc_url → documentation, dev_url → repository per rattler-build requirements
• ✅ Version standardisation: All packages now use mojo_version: "=0.25.7" in context with pin_compatible() for runtime
• ✅ Pre-commit enforcement: Installed hooks in all repos, fixed trailing whitespace in 30+ files
• ✅ Local validation: Added rattler-build validation scripts to catch schema errors before submission

Mjboothaus and others added 3 commits January 29, 2026 13:11
- Update source tag from v0.5.0 to v0.5.1
- Update license from MIT to Apache-2.0 (matches upstream change)

Co-Authored-By: Warp <agent@warp.dev>
- Add context with version and mojo_version variables
- Change from 'mojo >=25.1' to 'mojo-compiler =0.25.7'
- Use pin_compatible() for runtime dependency

Co-Authored-By: Warp <agent@warp.dev>
- Change 'test:' to 'tests:' with script block
- Change 'doc_url' to 'documentation'
- Change 'dev_url' to 'repository'

Fixes recipe parser errors per modular-community schema.

Co-Authored-By: Warp <agent@warp.dev>
@Mjboothaus
Copy link
Author

Actually, still doing some further work to make it more bulletproof - will comment when ready for review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants