github Stranger6667/jsonschema rust-v0.34.0
[Rust] Release 0.34.0

latest releases: ruby-v0.46.2, python-v0.46.2, rust-v0.46.2...
5 months ago

Changed

  • BREAKING: BasicOutput and Annotations no longer have lifetime parameters. Update type annotations from BasicOutput<'a> to BasicOutput and Annotations<'a> to Annotations.
  • referencing: URI caching now avoids hash collisions and reduces lock contention.
  • Update fluent-uri to 0.4.1.
  • Bump MSRV to 1.83.0.
  • Drop the Send + Sync bounds from Retrieve/AsyncRetrieve on wasm32.
  • Use the new draftX::meta::validator() helper so meta-schema validators lazy-init on wasm32 while native targets keep borrowing the cached jsonschema::meta::MetaValidator.

Fixed

  • Hostname and IDN hostname formats now decode xn-- labels, reject leading combining marks/uppercase prefixes, and enforce the latest JSON Schema punycode context rules.
  • Restore wasm32-unknown-unknown support. #785

Performance

  • apply now reuses cached schema locations, URI fragments, and buffers for up to ~2.5x faster validation.
  • Recursive and regular $ref compilation deduplicates validator nodes, which decreases the memory usage and improves performance.
  • Validator compilation restores the regex cache for faster builds on regex-heavy schemas and precomputes absolute schema locations, trading a bit of compile time for faster apply on location-heavy workloads.
  • Large schema compilation is significantly faster. #755
  • unevaluatedProperties validation is 25-35% faster through optimized property marking and early-exit paths.
  • unevaluatedProperties memory usage drastically reduced by eliminating redundant registry clones during compilation.
  • unevaluatedItems validation is ~10% faster through early-exit optimizations and eliminating redundant validations in combinators.

Removed

  • BREAKING: Validator::config to reduce the memory footprint.
  • BREAKING: Public DRAFT4_META_VALIDATOR, DRAFT6_META_VALIDATOR, DRAFT7_META_VALIDATOR, DRAFT201909_META_VALIDATOR, and DRAFT202012_META_VALIDATOR statics. Use draftX::meta::validator() helper functions instead (e.g., draft7::meta::validator()).

Don't miss a new jsonschema release

NewReleases is sending notifications on new releases.