Skip to content

Add mojo-toml v0.5.1 - Native TOML parser & writer - #196

Merged
yetalit merged 10 commits into
modular:mainfrom
Mjboothaus:add-mojo-toml-v0.5.1
Feb 2, 2026
Merged

yetalit merged 10 commits into
modular:mainfrom
Mjboothaus:add-mojo-toml-v0.5.1

Conversation

@Mjboothaus

Copy link
Copy Markdown
Contributor

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 4 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

bgreni commented Jan 29, 2026

Copy link
Copy Markdown
Collaborator

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

Mjboothaus commented Jan 29, 2026 •

Copy link
Copy Markdown
Contributor Author

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

Copy link
Copy Markdown
Contributor Author

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

Mjboothaus and others added 4 commits January 30, 2026 15:08
- 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
Mjboothaus force-pushed the add-mojo-toml-v0.5.1 branch from 261a81b to ad33c9d Compare January 30, 2026 04:14
@Mjboothaus

Copy link
Copy Markdown
Contributor Author

@bgreni - While running pixi run build-alllocally I noticed pixi warns that the top-level project field is deprecated in favour of workspace. Not changed in this PR since it’s orthogonal to mojo-toml, but happy to open a follow-up PR to update the manifest if that’s helpful.

@Ahajha

Ahajha commented Jan 31, 2026

Copy link
Copy Markdown
Member

@Mjboothaus BTW I did some spring cleaning, rebasing should fix the CI being stuck as well as the Pixi warning. Also CI will be using the latest Pixi now.

@bgreni

bgreni commented Feb 1, 2026

Copy link
Copy Markdown
Collaborator

@Mjboothaus Looks like everything is fixed up now, thank you for your patience, ironically 26.1 was released this week so did you want to do one last upgrade before we start merging these in?

@Mjboothaus

Copy link
Copy Markdown
Contributor Author

@Mjboothaus Looks like everything is fixed up now, thank you for your patience, ironically 26.1 was released this week so did you want to do one last upgrade before we start merging these in?

Yes would seem to make sense for all of my packages to test against 26.1 - thanks also @Ahajha - I have continued to do some housework locally to make things more robust - so will try and work out how to submit all this.

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

Mjboothaus commented Feb 2, 2026 •

Copy link
Copy Markdown
Contributor Author

Update:

  • migrated mojo-toml recipe to Mojo 0.26.1.
  • context.mojo_version is now '=0.26.1' in recipes/mojo-toml/recipe.yaml.
  • The mojo-toml library has been migrated and tested on Mojo 0.26.1 (tests and benchmarks) in the mojo-toml repo.
  • Local 'pixi run build-all' on this branch shows mojo-toml building successfully; remaining errors are from other recipes / MAX channel availability, not this one.

@Mjboothaus

Mjboothaus commented Feb 2, 2026 •

Copy link
Copy Markdown
Contributor Author

@Mjboothaus BTW I did some spring cleaning, rebasing should fix the CI being stuck as well as the Pixi warning. Also CI will be using the latest Pixi now.

@Ahajha Pixi action seems to be using pixi v0.37 ?

@Ahajha

Ahajha commented Feb 2, 2026

Copy link
Copy Markdown
Member

Where are you seeing that? The action itself might need to be updated, but the Pixi version itself should be 0.63.2, see: https://github.com/modular/modular-community/actions/runs/21573472685/job/62159294743#step:3:3

@Mjboothaus

Mjboothaus commented Feb 2, 2026 via email

Copy link
Copy Markdown
Contributor Author

@Mjboothaus

Mjboothaus commented Feb 2, 2026 •

Copy link
Copy Markdown
Contributor Author
image

I noticed it in mojo-yaml - in the GH prefix-dev/setup-pixi@v0.9.3 action -- presumably it is common to all?

image

@Ahajha

Ahajha commented Feb 2, 2026

Copy link
Copy Markdown
Member

@Mjboothaus https://github.com/DataBooth/mojo-yaml/actions/runs/21574660967/job/62159669994 That's your repo, totally out of our control :) You'll want to make a similar change on your side

@yetalit
yetalit merged commit 3d71583 into modular:main Feb 2, 2026
4 checks passed
forfudan pushed a commit to forfudan/modular-community that referenced this pull request Sep 1, 2026
* Add mojo-toml v0.3.0 - Native TOML parser for Mojo

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)

* Update mojo-toml to v0.5.0

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>

* Add package image for builds.modular.com display per reviewer request

* Bump version to 0.5.1 with CodeQL and package image

* Fix mojo-toml recipe: update tag to v0.5.1 and license to Apache-2.0

- 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>

* Standardize mojo-toml to use mojo_version context with 0.25.7

- 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>

* Fix mojo-toml recipe schema errors

- 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>

* Update mojo-toml recipe to Mojo 0.26.1

Co-Authored-By: Warp <agent@warp.dev>

---------

Co-authored-by: Warp <agent@warp.dev>
Co-authored-by: Tiyagora <98420273+yetalit@users.noreply.github.com>
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.

4 participants