Merged
Conversation
Introduces the rustapi-toon crate for TOON (Token-Oriented Object Notation) support, enabling LLM-optimized data serialization and extraction. Updates workspace and rustapi-rs to support a new 'toon' feature, adds content negotiation, LLM response wrappers, and OpenAPI integration for TOON. Also includes a new example (toon-api) and benchmarking setup (toon_bench).
The cookie extraction test now verifies that only the last value for duplicate cookie names is kept, matching expected behavior. The test counts unique cookie names and ensures the extractor returns the correct values and count.
Introduces a full benchmarking suite under the benches/ directory, including micro-benchmarks (routing, JSON, TOON format), HTTP load test servers for RustAPI and Actix-web, and a PowerShell script for automated performance comparison. Updates .gitignore to allow benches/ tracking. These additions enable performance profiling and framework comparison for RustAPI development.
Updated Cargo.toml and Cargo.lock to set the workspace and all member packages to version 0.1.3.
Applied minor refactoring and formatting improvements to test code in extract.rs, layer.rs, metrics.rs, and mod.rs. Updated CHANGELOG.md for new TOON format support and related features. Improved code readability in toon-api example.
Replaced manual token estimation rounding with div_ceil for improved clarity and accuracy in benches and llm_response. Added #[allow(dead_code)] to test-only code to suppress warnings. Minor formatting improvements in imports and test code for readability.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat: Add TOON format support with rustapi-toon crate
Summary
This PR introduces TOON (Text Object-Oriented Notation) format support
through the new
rustapi-tooncrate, enabling AI/LLM-friendly responseserialization alongside JSON.
Changes
rustapi-tooncrate with:rustapi-rsto re-export toon moduletoon-apiexample demonstrating usageType of Change
Testing