Skip to content

Conversation

mpwarres
Copy link

@mpwarres mpwarres commented Oct 9, 2025

Document the de-facto serialization format used by the various proxy-wasm SDKs (C++, Rust, Go) to serialize path_data arguments for the proxy_get_property and proxy_set_property hostcalls.

Copy link
Member

@PiotrSikora PiotrSikora left a comment

Choose a reason for hiding this comment

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

and then concatenated in sequence to form the `path_data` argument.

e.g. the path segments `["foo", "bar"]` would be serialized as:
- `0x66`, `0x6f`, `0x6f`, `0x00`, `0x62`, `0x61`, `0x72`, `0x00`
Copy link
Member

Choose a reason for hiding this comment

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

That's not entirely correct. There is no NULL character at the end.

#### Property path names

Path data for the [proxy_get_property] and [property_set_property] hostcalls
consists of a sequence of path segments. The path segments are null-terminated
Copy link
Member

Choose a reason for hiding this comment

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

Segments are separated by a NULL (0x00) character, not terminated by it.

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