etoon 0.3.0

Fast TOON (Token-Oriented Object Notation) encoder. 8x faster than toons, 2.7x faster than the official TS SDK.
Documentation
name: CI

on:
  push:
    branches: [main]
  pull_request:

permissions: read-all

jobs:
  test:
    name: Test (Linux x86_64)
    runs-on: ubuntu-latest
    permissions:
      contents: read
    steps:
      - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
      - uses: dtolnay/rust-toolchain@stable
      - uses: Swatinem/rust-cache@23869a5bd66c73db3c0ac40331f3206eb23791dc # v2.9.1
      - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
        with:
          python-version: "3.13"
      - name: Create virtualenv + install
        run: |
          python -m venv .venv
          . .venv/bin/activate
          pip install maturin pytest
          maturin develop --release
      - name: Run 111 TOON spec fixtures
        run: |
          . .venv/bin/activate
          python -m pytest tests/test_spec_fixtures.py -q
      - name: Build CLI binary
        run: cargo build --release --bin etoon --no-default-features
      - name: Smoke-test CLI
        run: |
          echo '{"a":[1,2,3],"b":"hi"}' | ./target/release/etoon
          ./target/release/etoon --help

  rustfmt:
    name: rustfmt
    runs-on: ubuntu-latest
    permissions:
      contents: read
    steps:
      - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
      - uses: dtolnay/rust-toolchain@stable
        with:
          components: rustfmt
      - run: cargo fmt --all -- --check

  clippy:
    name: clippy
    runs-on: ubuntu-latest
    permissions:
      contents: read
    steps:
      - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
      - uses: dtolnay/rust-toolchain@stable
        with:
          components: clippy
      - uses: Swatinem/rust-cache@23869a5bd66c73db3c0ac40331f3206eb23791dc # v2.9.1
      - run: cargo clippy --no-default-features --all-targets -- -D warnings