Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace badly supported u128 TraceId with byte array #344

Merged
merged 1 commit into from
Mar 30, 2021

Conversation

Kouzukii
Copy link
Contributor

Binary serde codecs such as CBOR do not support Rusts u128/i128 datatypes (pyfisch/cbor#140).
In order to be able to use these with tarpc, the u128 TraceId could be made serializable using a 16 byte array as the internal representation.

@tikue
Copy link
Collaborator

tikue commented Mar 25, 2021

Thanks for the pr! What about keeping the u128 but having custom (de)serialize fns using the #[serde(with)] annotation? https://serde.rs/field-attrs.html

@Kouzukii Kouzukii force-pushed the replace_u128_traceid branch from b51126c to a3057cf Compare March 30, 2021 00:30
tarpc/src/trace.rs Outdated Show resolved Hide resolved
tarpc/src/trace.rs Outdated Show resolved Hide resolved
@Kouzukii Kouzukii force-pushed the replace_u128_traceid branch from a3057cf to d5e6f30 Compare March 30, 2021 11:36
@tikue tikue merged commit db0c778 into google:master Mar 30, 2021
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