package

gitlab.com/renich/toyaml

0.1.0 / published Oct 2, 2026 / repository

\ High-performance data serialization CLI converter and Crystal shard streaming TOML to YAML.

Toyaml Banner

Lightning-fast, extensible CLI configuration converter and Crystal shard: streaming TOML, JSON, and other formats to canonical YAML.

Version 0.1.0 Crystal >= 1.21.0 GitLab CI Passing Specs Passing Ameba Clean Flaw Clean

Sphinx Documentation Crystal API Documentation License: AGPL-3.0-or-later Donate using Liberapay

GitLab Project Metadata:

  • Description: Lightning-fast, extensible CLI configuration converter and Crystal shard: streaming TOML, JSON, and other formats to canonical YAML.
  • Topics / Tags: crystal, crystal-lang, yaml, toml, json, converter, cli, serialization, podman, ameba, flaw, sphinx, agplv3

Overview

toyaml is a compiled, high-performance CLI utility and reusable Crystal shard engineered to convert structured configuration formats (starting with TOML and expanding to JSON, INI, and XML) directly into clean, canonical YAML. It features a pluggable format registry, direct streaming I/O into YAML::Builder, sub-millisecond cold starts, and zero runtime dependencies.

Key Highlights

  1. Direct YAML Streaming: Streams parsed tokens directly into YAML::Builder(IO) without constructing intermediate hash graphs or heap string buffers.
  2. Pluggable Architecture: Implements the Strategy and Registry patterns for format converters, making adding new formats frictionless.
  3. Automatic Format Sniffing: Infers input formats from file extensions and stream heuristics, with explicit CLI overrides.
  4. Sub-Millisecond Execution: Instantaneous cold starts (<5ms) and minimal resident memory footprint (<15 MB RSS).
  5. Zero-Defect Quality Gates: Enforces 100% spec coverage, Ameba static analysis, Flaw SAST security scanning, and cRSTLint verification.

Quickstart

Prerequisites

  • Crystal: >= 1.21.0
  • Shards: Bundled with Crystal
  • GNU Make & Git
  • Podman (optional, for container runs)
  • cRSTLint (for documentation linting)

Build and Run Locally

# 1. Clone repository
git clone https://gitlab.com/renich/toyaml.git
cd toyaml

# 2. Setup dependencies and pre-commit hooks
make setup

# 3. Build the binary
make build

# 4. Run application CLI
./bin/toyaml --help

Running with Podman

# Build container image with Podman
make containers-build

# Run containerized service
make containers-run

Build System Targets

The repository includes a comprehensive, standard GNUmakefile:

TargetDescription
make buildCompiles debug binary in bin/toyaml
make releaseBuilds stripped, statically optimized production binary
make testExecutes the complete spec test suite (crystal spec)
make lintRuns Ameba static analysis and Flaw SAST security scanner
make doc-checkLints all reStructuredText files using crstlint and rstcheck
make checkAggregates test, lint, and doc-check
make installInstalls binary to $(DESTDIR)$(bindir) (FHS compliant)
make install-localInstalls binary to ~/.local/bin/toyaml
make containers-buildBuilds rootless container image using Podman
make cleanCleans build artifacts in bin/
make distcleanRemoves dependencies, cache directories, and build outputs

Documentation

Full architectural blueprints, functional specifications, and operational playbooks are maintained under docs/:

GuideScope & HighlightsEntry Point
Business Context & StrategyStakeholder requirements, ROI objectives, and user personas.Business Specs
Functional SpecificationsRequirements [FUNC-001]–[FUNC-005] and behavioral contracts.Functional Specs
Technical ArchitectureProcess lifecycle, concurrency model, and threat modeling.Technical Specs
Release PlaybookSemVer, Keep a Changelog, and GPG-signed GitLab release steps.Release Procedure
Architecture Decisions (ADRs)Immutable logs of architectural decisions and trade-offs.ADR Index
Project RoadmapPhased milestone tracking and delivery roadmaps.Project Roadmap
Crystal API ReferenceCompiler-generated API reference.API Reference

Contributing & Code of Honor

All contributions must adhere to the Universal Code of Honor and Contributing Guidelines.


License

  • Software: GNU Affero General Public License v3.0 or later (LICENSE).
  • Documentation: GNU Free Documentation License v1.3 or later (LICENSE-DOCS).

Copyleft © 2026 Rénich Bon Ćirić <renich@evalinux.com>.


Support & Donations

If you find this project useful and wish to support its ongoing development, please consider donating:

Donate using Liberapay

API