Skip to content

Conversation

@Mjboothaus
Copy link
Contributor

@Mjboothaus Mjboothaus commented Jan 27, 2026

Adds mojo-yaml v0.1.2 - YAML Lite parser for Mojo covering ~80% of common YAML patterns.

Version update: v0.1.1 → v0.1.2 includes pre-commit whitespace fixes.

First submission following the modular-community standards guide.

Package features:

  • Native YAML configuration file parsing with zero Python dependencies
  • Nested mappings and sequences (any depth)
  • Inline list-mappings pattern (- name: value\n key2: value2)
  • All scalar types (int, float, bool, null, string)
  • Comments anywhere in files
  • Mixed structures (lists in dicts, dicts in lists)
  • Type-safe value access (as_string(), as_int(), as_bool())
  • 91/91 tests passing (100% test coverage)
  • Works with real configuration files (pre-commit configs, custom YAMLs)
  • Performance: 9-21x faster than Python's pyyaml
  • Comprehensive benchmarks comparing to Python baseline

Limitations:

  • Multi-word strings require quotes ("Hello world" not Hello world)
  • Flow-style syntax not supported (use block style instead)
  • Reader-only in v0.1.x (YAML writer planned for future releases)

Use case: Perfect for configuration files, CI/CD pipelines, build systems, and any Mojo application needing YAML configuration support. Covers ~80% of common YAML usage patterns.

Compliance checklist:

  • ✅ Package image (157KB PNG) for builds.modular.com
  • ✅ CodeQL scanning enabled
  • ✅ CodeQL badge in README
  • ✅ Apache-2.0 license
  • ✅ Git tag v0.1.2 exists
  • ✅ recipe.yaml with proper structure
  • ✅ test_package.mojo validates core functionality
  • ✅ Comprehensive README and documentation
  • ✅ Performance benchmarks included

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

Mjboothaus and others added 3 commits January 27, 2026 17:31
First submission following modular-community standards:
- Package image included for builds.modular.com
- CodeQL scanning enabled in repository
- Recipe with proper structure and metadata
- Test package validates core functionality

mojo-yaml provides YAML Lite parsing covering ~80% of common patterns,
with 91/91 tests passing and 9-21x better performance than Python's pyyaml.
Remove trailing spaces from blank lines to pass pre-commit checks.

Co-Authored-By: Warp <agent@warp.dev>
Version bump includes whitespace fixes from pre-commit.

Co-Authored-By: Warp <agent@warp.dev>
@Mjboothaus Mjboothaus changed the title Add mojo-yaml v0.1.1 Add mojo-yaml v0.1.2 Jan 28, 2026
Mjboothaus and others added 4 commits January 29, 2026 13:44
- 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'

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

Mjboothaus commented Feb 2, 2026

Update:

  • migrated mojo-yaml to Mojo 0.26.1.
  • In the mojo-yaml repo, MAX is now pinned to '>=26.1.0,<27', the YAML lexer was updated to use a cached List[String] buffer plus codepoint_slices() instead of direct String indexing, and all 15 test suites pass under Mojo 0.26.1 (with expected fixture failures documented).
  • The local mojo-yaml recipe.yaml now uses context.mojo_version = '=0.26.1' and the same pin has been applied here in recipes/mojo-yaml/recipe.yaml.
  • As with the other mojo-* packages, the pixi.toml uses [project] at the top level so that the modular-community CI (pixi 0.37) can parse it, while newer pixi emits only a deprecation warning.

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.

3 participants