Skip to main content

YAMLStar RapidYAML Parser

An optional RapidYAML parser for YAMLStar and go-yaml. The shared library is implemented entirely in C++ and embeds no Go runtime. The plugin implements ABI v2 transforms returning EDN parser events. It contains no Glojure runtime. The Go adapter uses purego to load its C ABI without cgo. Versions through 0.1.2 embedded Go and could crash when loaded by Go hosts on Intel macOS; use 0.1.3 or newer. It requires a YAMLStar host with the parser=rapidyaml ABI v2 registration. Release 0.1.0 used ABI v1 and cannot be loaded by the new host.

yaml --plugin=parser=rapidyaml

The implementation name is rapidyaml and the plugin API is parser. The repository and Python distribution are yamlstar-plugin-parser-rapidyaml. Libraries use libyamlstar-plugin-parser-rapidyaml.so on Linux and .dylib on macOS. The native parser accepts no parser-specific options. The Go adapter also accepts the installation option described below.

Build and test

make build
make test
make test-conformance
make fuzz
make benchmark

Makes installs project tools into .cache. Building the native library requires a C++11 compiler, using GCC on Linux or Clang on macOS. Go is needed for the adapter and test suite, including the cgo test oracle. Run project-dependent commands with make shell CMD='...'. The build pins rapidyaml v0.16.0 at f8ac8dd50f4f7916579d55a05ebf9c6488e52670. This checkout includes the c4core v0.6.0 source snapshot; it has no submodules. The C++ wrapper converts RapidYAML integer events directly to ABI v2 EDN. The previous Go/YEBP v1 conversion is retained as a differential test oracle. Tests compare native event bytes and error classifications against that oracle for the pinned YAML test suite without changing its expected results. Adapter and archive tests reject libraries containing a Go runtime.

go-yaml integration

The goyaml package exports New(options ...Option) and Register() error for go-yaml. The adapter loads this plugin's ABI v2 shared library at runtime and requires no cgo in the consuming Go executable. Linux, FreeBSD, and macOS hosts can load manually installed libraries. Automatic installation supports the four Linux and macOS release platforms.

import (
    "github.com/yamlstar/yamlstar-plugin-parser-rapidyaml/goyaml"
    "go.yaml.in/yaml/v4"
)

var value any
err := yaml.Load([]byte("answer: 42"), &value,
    yaml.WithPlugin(goyaml.New()))

Call goyaml.Register() during startup before parsing named configuration. It registers yaml-parser=rapidyaml at goyaml.Version, preserving the native Go parser as the default. Registration and --help do not load or download a library. The library is resolved on the first parse with RapidYAML. The compiled-in go-yaml parser requires no parser shared library.

The adapter requires the native library version matching its release. If missing, it downloads that exact release's archive and SHA256SUMS from GitHub, verifies them, and installs the library atomically. This requires no YAMLStar executable or external download/archive commands. Existing incompatible libraries produce an error and are preserved. Unknown configuration options, duplicate registration, and mismatched requested versions also return errors.

Use goyaml.New(goyaml.WithInstall(false)) to disable downloads in Go code. For named configuration, use:

plugin:
  yaml-parser:
    name: rapidyaml
    install: false

YAMLSTAR_LIBRARY_PATH specifies library search directories. When unset, the adapter searches beside the executable, its ../lib directory, $HOME/.local/lib, /usr/local/lib, and /usr/lib. An explicitly configured path replaces those defaults, including an empty path. Missing libraries are installed into the first writable search directory. Select another directory with YAMLSTAR_LIBRARY_PATH when an incompatible library already exists.

After publishing the native 0.1.3 release assets and Go module tag v0.1.3, build a go-yaml CLI once:

make cli \
  PLUGIN-PACKAGE=github.com/yamlstar/yamlstar-plugin-parser-rapidyaml/goyaml@v0.1.3
./go-yaml --plugin=yaml-parser=rapidyaml -j < input.yaml
./go-yaml --plugin=yaml-parser=go-yaml -j < input.yaml

PLUGIN-PACKAGE links the adapter; runtime --plugin selects it. The packages-only build retains native defaults. To select RapidYAML as the build default, add PLUGIN=yaml-parser=rapidyaml. No parser switch requires another build. The Go module tag and native release tag refer to the same commit. Archives retain unprefixed versions in their names and download URLs.

make test-goyaml tests the adapter with cgo disabled. make test-goyaml-race runs its concurrency and installation tests with the Go race detector. Set GO_YAML_CLI to an adapter-enabled executable to run CLI regressions too. Installer tests use local HTTP fixtures without contacting GitHub. make test-goyaml-cli uses GO_YAML_DIR (default ../go-yaml) to test the actual generic PLUGIN-PACKAGE build with a local adapter snapshot. It stages sources, a file module proxy, and its executable under .cache/integration, leaving the supplied checkout and executable unchanged.

To try a local build from this directory:

make build
YAMLSTAR_LIBRARY_PATH="$PWD/lib" yaml --plugin=parser=rapidyaml --no-install \
  --eval 'a: [1, 2, 3]'

YAMLStar and go-yaml can share that same library directory. For this coordinated workspace, build YAMLStar's CLI and shared host library from the workspace root with make cli build-libyamlstar, then build go-yaml with the wanted adapter packages once. Until the adapters are published, stage local module snapshots under .cache with an isolated file Go proxy and module cache, and supply their explicit versions through PLUGIN-PACKAGE. Keep local staging separate from public release commands.

Python

pip install yamlstar-plugin-parser-rapidyaml
import yamlstar

opts = yamlstar.Options().plugin(
    yamlstar.parser('rapidyaml'))
ys = yamlstar.YAMLStar(opts)
assert ys.load('a: [1, 2, 3]') == {'a': [1, 2, 3]}

Wheels expose the parser-rapidyaml entry point in yamlstar.plugins. They contain the ABI v2 shared library and manifest. Other bindings select the same parser through their existing options mapping. Integration tests exercise the Glojure CLI and Python binding.

Conformance

make test-conformance compares binary events against 402 fixtures in the YAML test suite at 6ad3d2c62885d82fc349026c136ef560838fdf3d. The baseline records nine upstream tab-separation differences: three valid inputs rejected, three invalid inputs accepted, and three event mismatches. See test/expected-events.txt for individual cases and explanations. New differences and unexpected improvements fail the test for review. The adapter does not fall back to another parser.

Tests cover scalar styles, tags, directives, explicit document markers, anchors, aliases, buffer growth, malformed input, ownership, and concurrent calls through the C ABI. Input buffers are limited to less than 512 MiB by the integer-event adapter. Output is owned by the plugin and released with yamlstar_plugin_v2_free. Status 0 returns an EDN event vector. Status 1 reports parse/configuration errors; status 2 reports ABI/internal errors. Manifests use EDN; failures return plain UTF-8 error messages.

Performance

The initial full CLI comparison is slower than built-in go-yaml on the three measured fixtures. See Performance.md for results and reproduction commands. Those historical measurements used ABI v1 binary transport. The current ABI v2 adapter converts the internal binary events to EDN. Assertions are disabled in all builds; parse-error handling remains enabled.

Release

See Releasing.md for PyPI trusted-publisher setup and recovery from a failed wheel publication.

make dist
make wheel
make test-wheel
make release v=0.1.3 d=1
make release v=0.1.3

Release archives use yamlstar-plugin-parser-rapidyaml-VERSION-PLATFORM.tar.xz. The release workflow builds Linux x64/aarch64 with a manylinux 2.28 baseline, and macOS x64/arm64, validates archives and wheels, and publishes checksums. The repository must exist under yamlstar/yamlstar-plugin-parser-rapidyaml. Configure PyPI trusted publishing for distribution yamlstar-plugin-parser-rapidyaml, workflow release.yaml, environment pypi. Release from main, or pass a=1 to release from another branch. The release helper creates both VERSION and vVERSION tags at the same commit, checks them for conflicts, and updates the adapter's version together with the native manifest and build metadata. GitHub assets remain attached to the bare native tag. The Go tag makes goyaml importable at a tagged module version. Retries preserve both tags; changes after tagging require a new version. Publish the matching native assets before advertising the adapter release. No release or publication happens during normal builds or tests.

The integration workflow uses the YAMLStar branch selected by the repository variable YAMLSTAR_REF, defaulting to a pinned main revision with ABI v2 RapidYAML support. The go-yaml CLI integration uses a pinned host with the canonical parser API.

Third-party notices are included in licenses/ and release artifacts.

Metadata

Release files for yamlstar-plugin-parser-rapidyaml 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for yamlstar-plugin-parser-rapidyaml 0.1.4
File Actions
yamlstar_plugin_parser_rapidyaml-0.1.4-py3-none-manylinux_2_28_x86_64.whl Python 3 none Linux glibc 2.28+ x86-64 Details for yamlstar_plugin_parser_rapidyaml-0.1.4-py3-none-manylinux_2_28_x86_64.whl
yamlstar_plugin_parser_rapidyaml-0.1.4-py3-none-manylinux_2_28_aarch64.whl Python 3 none Linux glibc 2.28+ ARM64 Details for yamlstar_plugin_parser_rapidyaml-0.1.4-py3-none-manylinux_2_28_aarch64.whl
yamlstar_plugin_parser_rapidyaml-0.1.4-py3-none-macosx_15_0_x86_64.whl Python 3 none macOS 15.0+ x86-64 Details for yamlstar_plugin_parser_rapidyaml-0.1.4-py3-none-macosx_15_0_x86_64.whl
yamlstar_plugin_parser_rapidyaml-0.1.4-py3-none-macosx_14_0_arm64.whl Python 3 none macOS 14.0+ ARM64 Details for yamlstar_plugin_parser_rapidyaml-0.1.4-py3-none-macosx_14_0_arm64.whl

Total release size: 419.3 kB

Release files / yamlstar_plugin_parser_rapidyaml-0.1.4-py3-none-manylinux_2_28_x86_64.whl

Download URL yamlstar_plugin_parser_rapidyaml-0.1.4-py3-none-manylinux_2_28_x86_64.whl
Size 108.8 kB
Tags Linux glibc 2.28+ x86-64 Python 3
SHA-256 checksum
How to use checksums
6abc08b42981b3a1fc48db0e7e4a453043c8dc10b1fad019f895498b2e8e6778
BLAKE2b-256 checksum
How to use checksums
3af76ddc226ffa29f07d7c3011d7c7b398b1e6e958e81e2738046d4d565999cb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.

Transparency log

Release files / yamlstar_plugin_parser_rapidyaml-0.1.4-py3-none-manylinux_2_28_aarch64.whl

Download URL yamlstar_plugin_parser_rapidyaml-0.1.4-py3-none-manylinux_2_28_aarch64.whl
Size 110.2 kB
Tags Linux glibc 2.28+ ARM64 Python 3
SHA-256 checksum
How to use checksums
217a2816dac845f2e23bf1adb463a430a9e70f854cd67edfe7f934d3aceeb02d
BLAKE2b-256 checksum
How to use checksums
c22e93132fc4b9ae18cc701f908c8ca57221d312304cdf439d1660819301bf11
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.

Transparency log

Release files / yamlstar_plugin_parser_rapidyaml-0.1.4-py3-none-macosx_15_0_x86_64.whl

Download URL yamlstar_plugin_parser_rapidyaml-0.1.4-py3-none-macosx_15_0_x86_64.whl
Size 101.1 kB
Tags Python 3 macOS 15.0+ x86-64
SHA-256 checksum
How to use checksums
11b25e39328abafbf9cc606aaffadfbdddb8725312bb51743525dcbdcf280d82
BLAKE2b-256 checksum
How to use checksums
07464e6f8464a6964600559af6826c09d1a52e05c53505e59362cff65376b120
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.

Transparency log

Release files / yamlstar_plugin_parser_rapidyaml-0.1.4-py3-none-macosx_14_0_arm64.whl

Download URL yamlstar_plugin_parser_rapidyaml-0.1.4-py3-none-macosx_14_0_arm64.whl
Size 99.2 kB
Tags Python 3 macOS 14.0+ ARM64
SHA-256 checksum
How to use checksums
a7e57f2248125bde19d3fe7831af836fcba6cbac147042ded0a1d05d32521ab5
BLAKE2b-256 checksum
How to use checksums
cca972abb05dc1ee6959cb7cb669420c395df92a9bcb95d6ce4c5da7b989fb99
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.

Transparency log

Security for yamlstar-plugin-parser-rapidyaml 0.1.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 4 files in this release have been uploaded with provenance metadata.

Select from 4 files

Attestation for yamlstar_plugin_parser_rapidyaml-0.1.4-py3-none-manylinux_2_28_x86_64.whl

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.4 This release

4 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page