Repository navigation
Serialize host-await FFI arguments as compact JSON - #884
Open
Mark Birger (kusha) wants to merge 1 commit into
Open
Mark Birger (kusha) wants to merge 1 commit into
Mark Birger (kusha) wants to merge 1 commit into
Conversation
Use compact serde_json serialization only for the host-await argument accessor and cover exact output for strings and nested objects. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Anand Krishnamoorthi (anakrish)
approved these changes
Oct 30, 2026
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.
Summary
Use
serde_json::to_stringinregorus_rvm_get_host_await_argumentto avoid pretty-printing overhead at the Rust-to-C# boundary. The change is local to this accessor: publicValue::to_json_str(), unrelated FFI accessors, error propagation, and memory-budget/unwind guards remain unchanged.Add an exported-FFI regression checking exact compact output for a single string (
["abc"]), escaped characters including NUL, meaningful whitespace inside strings, and a nested object containing an array, numbers, a boolean, null, and an escaped string. Deserialize the actual output to verify argument-array shape and value preservation.Validation
cargo test --manifest-path bindings/ffi/Cargo.toml --no-default-features --features std,rvm,regorus/arc,contention_checks,allocator-memory-limits rvm:: -- --test-threads=1.deprecated_in_futureerrors forcore::char::from_digitin Azure Policy code.