Derek Benson
4c38e117ac
Use crate:: for assert_linked instead of super::super::
...
PiperOrigin-RevId: 673847235
3 months ago
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
Derek Benson
41f12a239c
Add missing #![deny(unsafe_op_in_unsafe_fn)] to upb/rust/lib.rs and fix violating functions
...
PiperOrigin-RevId: 655226304
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
Adam Cozzette
ccbed29c67
Rust protobuf: make `serialize()` method return `Vec<u8>`
...
`Vec<u8>` is a more idiomatic Rust type to return for serialization.
For the C++ kernel, we are able to return this type with no extra copying. We
still use `SerializedData` type for FFI, but convert the result into a
`Vec<u8>` using a new `into_vec` method.
The upb kernel serializes onto an arena, so for upb we do need to copy the data
to get it into a `Vec<u8>`.
PiperOrigin-RevId: 644444571
6 months ago
Protobuf Team Bot
44c80977b0
Silence warning on upb/rust/wire.rs DecodeOption
...
PiperOrigin-RevId: 644144635
6 months ago
Protobuf Team Bot
d471c874e3
Turn on 'CheckRequired' option on upb decode
...
PiperOrigin-RevId: 643028693
6 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