Closed ParkMyCar closed 4 years ago
Also made a number of changes by adding some READMEs to the individual crates, and adding to the repo's README
looks good!
I think it may be good to rename pb::blob::Blob to something else so that we can disambiguate from the proprietary blob::Blob - though it doesn't feel super critical. Maybe something like PbBuffer
and PbBufferReader
In any case - feel free to merge!
Thanks for the review @nipunn1313! I made the rename from Blob
to PbBuffer
, that pr is #25
This change introduces zero copy de-serialization powered by
bytes::Bytes
instead of our proprietaryblob::Blob
. I added a new Rust proto extension,[(rust.zero_copy)]
forbytes
fields, and updated the codegen so in Rust these fields are::pb::Lazy<::bytes::Blob>
.I also added a benchmark to test the zero copy de-serialization, versus copying into a
Vec<u8>
. As such I updated thepb-test
crate to usepb-gen
. Running the benchmarks on my 2013 MacBook Pro, give me the following results: