Skip to content

Limits#134

Merged
djc merged 12 commits into
mainfrom
limits
Jul 2, 2026
Merged

Limits#134
djc merged 12 commits into
mainfrom
limits

Conversation

@djc

@djc djc commented Jul 2, 2026

Copy link
Copy Markdown
Owner

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces configurable safety limits to the XML deserialization pipeline and refactors the public from_str convenience API to use the Deserializer directly, alongside a patch version bump.

Changes:

  • Add Limits (max attributes / nesting depth / namespace declarations) enforced during tokenization in de::Context.
  • Introduce Deserializer::new(input) and Deserializer::with_limits(...), and move root-type matching + accumulator driving into Deserializer::deserialize.
  • Bump crate version to 0.7.6.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
instant-xml/src/lib.rs Refactors from_str to construct a Deserializer and call the new deserialize entry point.
instant-xml/src/de.rs Implements deserialization limits, adds Limits + builder API, and reworks deserializer/context ownership to support root construction from input.
instant-xml/Cargo.toml Bumps patch version for the new behavior/API additions.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread instant-xml/src/lib.rs
Comment thread instant-xml/src/de.rs Outdated
Comment thread instant-xml/src/de.rs
@djc djc merged commit 35ef9ed into main Jul 2, 2026
7 of 8 checks passed
@djc djc deleted the limits branch July 2, 2026 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants