Repository navigation
yamlprims v0.3.0
Feature release of yamlprims implementing spec-v1.6: bounded byte-slice, reader, and writer ergonomics across Rust and Go, TypeScript parse / stringify plain-value helpers, Python single-pass native PyO3 safe_load / safe_load_all and buffered safe_dump / safe_dump_all, the YAML 1.1 to YAML 1.2.2 Core migration lint (lint_yaml11*, LintYAML11*, lintYaml11, and canonical yamlprims-lint/1), and the frozen yamlprims-cli command-line contract (migrating-from-libyaml.md).
What it ships
- Bounded stream, byte-slice, and plain-host ergonomics (
spec-v1.6 §9,§10.2,§11.2,§11.5):- Rust (
yamlprims):load_reader,load_reader_with,load_all_reader,load_all_reader_with,from_slice,from_slice_with,from_reader,from_reader_with,to_writer,to_writer_with,emit_writer,emit_writer_with,emit_all_writer, andemit_all_writer_with. Readers read at mostLimits::max_input_bytes + 1bytes before raw-input admission; writers buffer the complete emitted payload underEmitLimits::max_output_bytesbefore callingwriter.write_all, guaranteeing zero bytes written on any validation or limit refusal. - Go (
github.com/3leaps/yamlprims/yaml):LoadBytesWith,LoadAllBytesWith,LoadReader,LoadReaderWith,LoadAllReader,LoadAllReaderWith,EmitWriter,EmitWriterWith,EmitAllWriter,EmitAllWriterWith,MarshalWriter,MarshalWriterWith, and typedUnmarshal,UnmarshalWith,UnmarshalReader,UnmarshalReaderWith,UnmarshalNode, andUnmarshalNodeWith(withmath/big.Intsupport for fulli128::MIN..=u128::MAXintegers, default unknown-struct-field rejection, iterative finite pointer-chain unwrapping, and pointer-cycle rejection). - Python (
yamlprims): Single-pass nativePyO3safe_load,safe_load_all, and bufferedsafe_dump,safe_dump_allacceptingstr,bytes,bytearray,memoryview, or.read()/.write()streams, enforcing pre-copy chunk byte caps (max_input_bytes) and materializing plain Pythondict,list,str,int(up to 128-bit),float,bool, andNonewithout a JSON round-trip. - TypeScript (
@3leaps/yamlprims):parse,parseAll,stringify, andstringifyAllplain-value helpers (parse/parseAllreturnnumberfor integers within±(2^53 - 1)and raise atypeerror outside that range;stringify/stringifyAllalso acceptbigintinputs).
- Rust (
- YAML 1.1 → YAML 1.2.2 Core migration lint (
spec-v1.6 §10.3,§11.7):- Rust:
LintCode(Yaml11Boolean,Yaml11Number,Yaml11Sexagesimal,Yaml11MergeKey),LintDiagnostic,LintResult,lint_yaml11,lint_yaml11_with,lint_yaml11_bytes,lint_yaml11_reader,lint_yaml11_reader_with, andencode_lint(yamlprims-lint/1). - Go:
LintCode,LintDiagnostic,LintResult,LintYAML11,LintYAML11With,LintYAML11Bytes,LintYAML11Reader,LintYAML11ReaderWith,EncodeLint, andEncodeLintWith. - TypeScript:
LintCode,LintDiagnostic,LintResult,lintYaml11, andencodeLint. - Python:
LINT_CODES,LintDiagnostic,LintResult,lint_yaml11, andencode_lint. - Enforces
Limits::max_warnings(1,000default) truncation prior to diagnostic string formatting, fixed-buffer streaming field/message bounds (1,024/4,096bytes), and pre-clone path/diagnosticmax_owned_bytesadmission with zero-clone error-path transfer on budget abort.
- Rust:
- Frozen
yamlprims-clicommand-line contract (spec-v1.6 §10.4):yamlprims [--merge=reject|apply|as_key] check [--lint-yaml11] [--format=text|json],yamlprims [--merge=...] dump [--plain|--ijson] [--max-output-bytes=N],yamlprims [--merge=...] emit [--from-wire|--from-plain] [--compat-quoting=yaml11-safe|core-only] [--max-output-bytes=N](--max-output-bytesalso applies tocheck --lint-yaml11 --format=json),--version,--help,-(stdin),--, whole-payload bufferedstdout, and exit codes0/1/2as specified inspec-v1.6 §10.4.
- Migration guide:
Conformance & differential parity
- Pinned
structcorpusload and emit round-trip qualification (conformance/pins/pin-b52fcd0.json): Both the Rust (crates/yamlprims/examples/structcorpus.rs) and pure-Go (cmd/structcorpus-driver) conformance drivers qualify all20profile rows ofstructcorpuscommitb52fcd090d6879a0bd58ec5a5496c6a4de90504e(61,366corpus cases /90,988expectations acrossspec-v1.0throughspec-v1.5, plus synthetic revision 1.4/1.5 boundary probes). - Four-language byte-for-byte parity (
188in-repo vectors):make crosscheck,make ts-check, andmake python-checkverify byte-for-byte agreement across Rust, Go, TypeScript, and Python on all188in-repo conformance vectors (conformance/vectors/cases.jsonl) coveringyamlprims-value/1wire output,decode_wireround-trip, plain JSON projection, deterministicemit_alloutput,encode_ijsonprojection, andyamlprims-lint/1encode_lintoutput.
Verification
The yamlprims CLI parses, lints, emits, and projects YAML; it verifies no cryptographic signatures and embeds no keys. To verify this release, verify the annotated OpenPGP-signed v0.3.0 tag and the dual-signed checksum manifests (SHA256SUMS and SHA512SUMS, signed with both Minisign and the OpenPGP release signing subkey) against the public pins committed in the tagged tree (docs/security/ and keys/expected-fingerprints.txt); see docs/security/README.md and RELEASE_CHECKLIST.md.