Derek Benson
0f4bfc4eac
Migrate upb/rust to gtest
...
PiperOrigin-RevId: 672974055
3 months ago
Derek Benson
a0f79ebc57
Add linkage assertions to all extern upb functions. This makes it a compiler error if you try to run the tests and are missing an extern fn. Will be used to ensure that the Cargo build's amalgamated upb has everything that's needed.
...
PiperOrigin-RevId: 672653265
3 months ago
Protobuf Team Bot
b35d4bad3c
Change `upb` crate source to not use std or alloc
...
PiperOrigin-RevId: 671865731
3 months ago
Protobuf Team Bot
07b325e5d7
Move map accessors off of upb c accessor codegen.
...
PiperOrigin-RevId: 668472287
4 months ago
Protobuf Team Bot
36a969296d
Move oneof accessors off of upb c accessor codegen.
...
PiperOrigin-RevId: 668464692
4 months ago
Protobuf Team Bot
807ecfd0fa
Move repeated fields and singular cords off of upb C accessor codegen.
...
PiperOrigin-RevId: 668158513
4 months ago
Protobuf Team Bot
98309afade
Move singular strings off of upb c accessor codegen.
...
PiperOrigin-RevId: 668108247
4 months ago
Protobuf Team Bot
e9b04b1f8f
Stop using upb C accessor codegen for submsg accessors.
...
PiperOrigin-RevId: 668009483
4 months ago
Protobuf Team Bot
9f4f302f9c
Change upb singular scalar accessors to not use upb C accessor codegen.
...
PiperOrigin-RevId: 666879420
4 months ago
Protobuf Team Bot
0fbba32b3e
Add Message::Clear() and MessageMut::Clear() (behind the Clear trait)
...
Distinct from any clear_submsg(), this clears the message contents and doesn't affect presence on parent (and also allows for clearing owned messages which don't exist as a field to be cleared).
PiperOrigin-RevId: 656453234
5 months ago
Protobuf Team Bot
607b4b1b6c
Change rust/upb to only ever do `use super::` rather than `use crate::`
...
This makes it more 'relocatable' as a module into a monolithic runtime crate.
PiperOrigin-RevId: 655215778
5 months ago
Protobuf Team Bot
219e8ead2f
Add license headers
...
PiperOrigin-RevId: 647649755
6 months ago
Derek Benson
290df684f9
expose upb_Message_MergeFrom in rust upb bindings
...
PiperOrigin-RevId: 646471315
6 months ago
Protobuf Team Bot
8ef32176e3
Expose upb_Message_IsEqual to Rust upb.
...
PiperOrigin-RevId: 643044309
6 months ago
Jakob Buchgraber
b6e0a48b02
Implement `IntoProxied` for repeated field setters
...
We modify set_<repeated_field> to accept the IntoProxied type as the value and move the value (avoid copying) whenever possible.
For UPB:
- We fuse the arena of Repeated<T> with the parent message arena.
- We use upb_Message_SetBaseField to set the upb_Array contained in the Repeated<T>.
For C++:
- We generate an additional setter thunk that moves the value.
- The move assignment operator of RepeatedField/RepeatedPtrField is specialized. In order to adhere to the layering check we need to add '#include' statements for all .proto imports to the generated thunks.pb.cc.
PiperOrigin-RevId: 631010333
7 months ago
Protobuf Team Bot
734729afc2
Create the concept of 'owned data' in upb/rust as a generalization of the upb.rs SerializedData (which is a arena + data for arbitrary types, both thin and wide ref types), use that for the wire parse/serialize path.
...
PiperOrigin-RevId: 627814154
8 months ago
Protobuf Team Bot
d44ba9090c
Refactor upb/rust directory to introduce separate files for each concept instead of a single blob.
...
PiperOrigin-RevId: 625333833
8 months ago