Commit graph

5 commits

Author SHA1 Message Date
Joshua Haberman
db20f5ffc9 Shorten our license headers into an abbreviated form that references LICENSE instead of including it in full.
PiperOrigin-RevId: 564013990
2023-09-09 09:01:30 -07:00
Protobuf Team Bot
49d3bca39f Improve overall unsafe hygiene
This adds `#![deny(unsafe_op_in_unsafe_fn)]` which removes the
implicit `unsafe` block that `unsafe fn` does.

It also adds many more `SAFETY` docs, corrects some incomplete
ones, and catches a null pointer returned by `upb_Arena_New`.

PiperOrigin-RevId: 549067106
2023-07-18 11:53:09 -07:00
Hong Shin
4f20efbb78 Internal Change
PiperOrigin-RevId: 546867607
2023-07-10 07:37:00 -07:00
Marcel Hlopko
0a05e2f334 Implement bytes field accessors for v0 Rust API
PiperOrigin-RevId: 524089369
2023-04-13 13:40:09 -07:00
Marcel Hlopko
5814f6c977 Generate C++ thunks for Rust protos
In this CL I'd like to call existing C++ Protobuf API from the V0 Rust API. Since parts of the C++ API are defined inline and using (obviously) C++ name mangling, we need to create a "thunks.cc" file that:

1) Generates code for C++ API function we use from Rust
2) Exposes these functions without any name mangling (meaning using `extern "C"`)

In this CL we add Bazel logic to generate "thunks" file, compile it, and propagate its object to linking. We also add logic to protoc to generate this "thunks" file.

The protoc logic is rather rudimentary still. I hope to focus on protoc code quality in my followup work on V0 Rust API using C++ kernel.

PiperOrigin-RevId: 523479839
2023-04-11 12:58:34 -07:00