Tag:
Branch:
Tree:
aa2583268f
21.x
21.x-20241125
22.x
22.x-202303072154
22.x-202304122338
23.0-rc2-patch
23.x
23.x-202305051714
23.x-202305081751
23.x-202305171614
24.x
25.x
25.x-202311012212
25.x-allow-compat-test
25.x-compat-tests
25.x-compat-upgrade
26.x
27.x
28.x
28.x-202408082011
28.x-202409182056
29.x
3.0.x
3.1.x
3.10.x
3.11.x
3.12.x
3.13.x
3.14.x
3.15.x
3.16.x
3.17.x
3.18.x
3.19.x
3.2.x
3.20.x
3.3.x
3.5.x
3.6.x
3.7.x
3.8.x
3.9.x
4.0.x
add-support-for-options-in-ruby
add_missing_headers
b7-all
bazel-rules
bazel-rules2
bazel7-deb11
bazel7-macos-cp
bcr
bootstrap_upb_fix
burndown_patches
bzlmod
cherrypickStatic
cherrypicks
cp-bzl
cp-java-feature-bootstrap
cp-java-generator
cp-segv
deannagarcia-patch-1
deannagarcia-patch-10
deannagarcia-patch-11
deannagarcia-patch-12
deannagarcia-patch-2
deannagarcia-patch-3
deannagarcia-patch-4
deannagarcia-patch-5
deannagarcia-patch-6
deannagarcia-patch-7
deannagarcia-patch-8
deannagarcia-patch-9
delete-internal-files
disable-upload-artifacts-action
dmaclach-mach_absolute_time
editions-27
ffi-fix
fix-25.x-staleness
fix_jruby_proto3_optional
gha
gha-actions
gha-migration
gha-migration2
gha-migration3
gha-test
ghaPassFail
java8
jruby_9.4.6.0
main
main-202302161846
main-202303072257
main-202304252156
main-202305082101
main-202310162054
main-202401251548
main-202404180211
main-202407112335
main-202409302244
main-tmp-1
main-tmp-2
main-tmp-3
main-tmp-test-branch
mavenTests
nucleus-upb
php-regen
pkgconfig2-22
pomTrial
reenable_cruby_ffi_tests
regen-upb
revert-12721-main-202305082101
revert-18339-bazel-rules2
rm-php-compat-code
ruby-ffi-freezing
ruby-json-pool-fix
ruby-rm-syntax
ruby_artifact_uploads
ruby_dep
set-ex-test
shaod2-patch-1
support_ruby_3.4.x
test_458711847
test_472529298
test_477475045
test_488676475
test_488736123
test_488863171
test_488996168
test_489037129
test_489075734
test_489259176
test_490412672
test_490480534
test_490544827
test_490775181
test_491410618
test_492007398
test_492047164
test_492051638
test_492365076
test_492380119
test_493086551
test_493088412
test_493584811
test_493743618
test_493886620
test_494027573
test_494043842
test_494271758
test_494398568
test_494723105
test_494824070
test_494835245
test_495003404
test_495019683
test_495043824
test_495125557
test_495293733
test_495294072
test_495352403
test_495412624
test_495507057
test_500390065
test_559560115
test_696212866
test_696648468
test_698517877
test_698524915
test_698886146
test_699145984
test_699223340
test_700079644
test_700103480
test_700455403
test_700826871
test_700867558
test_700867559
test_700914351
test_701963635
test_702046760
test_702066679
test_702108781
test_702141153
test_702141194
test_702270366
test_702282439
test_702802539
test_703141424
test_703207265
test_703213921
test_703264486
test_703303491
test_703489954
test_703498943
test_703515841
test_703601984
test_703645757
test_703680070
test_703847501
test_703939312
test_703944731
test_kfm
test_ruby
win2019-23.x
zhangskz-patch-1
3.15.0-rc1
conformance-build-tag
v16.2
v18.3
v19.5
v2.4.1
v2.5.0
v2.6.0
v2.6.1
v2.6.1rc1
v20.2
v21.0
v21.0-rc1
v21.0-rc2
v21.1
v21.10
v21.11
v21.12
v21.2
v21.3
v21.4
v21.5
v21.6
v21.7
v21.8
v21.9
v22.0
v22.0-rc1
v22.0-rc2
v22.0-rc3
v22.1
v22.2
v22.3
v22.4
v22.5
v23.0
v23.0-rc1
v23.0-rc2
v23.0-rc3
v23.1
v23.2
v23.3
v23.4
v24.0
v24.0-rc1
v24.0-rc2
v24.0-rc3
v24.1
v24.2
v24.3
v24.4
v25.0
v25.0-rc1
v25.0-rc2
v25.1
v25.2
v25.3
v25.4
v25.5
v26-dev
v26.0
v26.0-rc1
v26.0-rc2
v26.0-rc3
v26.1
v27-dev
v27.0
v27.0-rc1
v27.0-rc2
v27.0-rc3
v27.1
v27.2
v27.3
v27.4
v27.5
v28-dev
v28.0
v28.0-rc1
v28.0-rc2
v28.0-rc3
v28.1
v28.2
v28.3
v29-dev
v29.0
v29.0-rc1
v29.0-rc2
v29.0-rc3
v29.1
v3.0.0
v3.0.0-alpha-1
v3.0.0-alpha-2
v3.0.0-alpha-3
v3.0.0-alpha-3.1
v3.0.0-alpha-4
v3.0.0-alpha-4.1
v3.0.0-beta-1
v3.0.0-beta-1-bzl-fix
v3.0.0-beta-1.1
v3.0.0-beta-2
v3.0.0-beta-3
v3.0.0-beta-3-pre-1
v3.0.0-beta-3.1
v3.0.0-beta-3.2
v3.0.0-beta-3.3
v3.0.0-beta-4
v3.0.0-javalite
v3.0.1-javalite
v3.0.2
v3.1.0
v3.1.0-alpha-1
v3.10.0
v3.10.0-rc1
v3.10.1
v3.11.0
v3.11.0-rc1
v3.11.0-rc2
v3.11.1
v3.11.2
v3.11.3
v3.11.4
v3.12.0
v3.12.0-rc1
v3.12.0-rc2
v3.12.1
v3.12.2
v3.12.3
v3.12.4
v3.13.0
v3.13.0-rc3
v3.13.0.1
v3.14.0
v3.14.0-rc1
v3.14.0-rc2
v3.14.0-rc3
v3.15.0
v3.15.0-rc1
v3.15.0-rc2
v3.15.1
v3.15.2
v3.15.3
v3.15.4
v3.15.5
v3.15.6
v3.15.7
v3.15.8
v3.16.0
v3.16.0-rc1
v3.16.0-rc2
v3.16.1
v3.16.2
v3.16.3
v3.17.0
v3.17.0-rc1
v3.17.0-rc2
v3.17.1
v3.17.2
v3.17.3
v3.18.0
v3.18.0-rc1
v3.18.0-rc2
v3.18.1
v3.18.2
v3.18.3
v3.19.0
v3.19.0-rc1
v3.19.0-rc2
v3.19.1
v3.19.2
v3.19.3
v3.19.4
v3.19.5
v3.19.6
v3.2.0
v3.2.0-alpha-1
v3.2.0-rc.1
v3.2.0rc2
v3.2.1
v3.20.0
v3.20.0-rc1
v3.20.0-rc2
v3.20.0-rc3
v3.20.1
v3.20.1-rc1
v3.20.2
v3.20.3
v3.21.0
v3.21.0-rc2
v3.21.1
v3.21.10
v3.21.11
v3.21.12
v3.21.2
v3.21.3
v3.21.4
v3.21.5
v3.21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
v4.24.4
v4.25.0
v4.25.0-rc1
v4.25.0-rc2
v4.25.1
v4.25.2
v4.25.3
v4.25.4
v4.25.5
v5.26.0
v5.26.0-rc1
v5.26.0-rc2
v5.26.0-rc3
v5.26.1
v5.27.0
v5.27.0-rc1
v5.27.0-rc2
v5.27.0-rc3
v5.27.1
v5.27.2
v5.27.3
v5.27.4
v5.27.5
v5.28.0
v5.28.0-rc1
v5.28.0-rc2
v5.28.0-rc3
v5.28.1
v5.28.2
v5.28.3
v5.29.0
v5.29.0-rc1
v5.29.0-rc2
v5.29.0-rc3
v5.29.1
${ noResults }
9 Commits (aa2583268f83a3192b43299d49a07cfb1bfc5123)
Author | SHA1 | Message | Date |
---|---|---|---|
Adam Cozzette | cbb3edd86d |
Rust C++: get all map fields onto a common implementation of ProxiedInMapValue
This CL migrates messages, enums, and primitive types all onto the same blanket implementation of the `ProxiedInMapValue` trait. This gets us to the point where messages and enums no longer need to generate any significant amount of extra code just in case they might be used as a map value. There are a few big pieces to this: - I generalized the message-specific FFI endpoints in `rust/cpp_kernel/map.cc` to be able to additionally handle enums and primitive types as values. This mostly consisted of replacing `MessageLite*` parameters with a new `MapValue` tagged union. - On the Rust side, I added a new blanket implementation of `ProxiedInMapValue` in rust/cpp.rs. It relies on its value type to implement a new `CppMapTypeConversions` trait so that it can convert to and from the `MapValue` tagged union used for FFI. - In the Rust generated code, I deleted the generated `ProxiedInMapValue` implementations for messages and enums and replaced them with implementations of the `CppMapTypeConversions` trait. PiperOrigin-RevId: 687355817 |
2 months ago |
Adam Cozzette | d900d6114c |
Rust: remove use of `MapNodeSizeInfoT` from generated code
We generate these constants to enable map operations, but this is no longer necessary now that we can get the relevant size and alignment information for each message through its vtable. PiperOrigin-RevId: 680712939 |
2 months ago |
Adam Cozzette | 5c3d1e8c30 |
Rust protobuf: remove the need for a generated `placement_new` thunk
We have been relying on a per-message generated `placement_new` function for implementing map insertion, but this CL simplifies things by removing that. Instead, we do a reflective swap if possible, or else fall back on a copy. This will probably make insertions a bit slower, but I think it may be worth it because it should make it much simpler to have a blanket implementation for ProxedInMapValue that works for all map types. It looks like it should be possible to make this faster in the future by implementing a bitwise move that will work for any message. PiperOrigin-RevId: 676495920 |
3 months ago |
Mike Kruskal | 5695a882bd |
Move -Werror to our test/dev bazelrc files.
Putting it into BUILD files unintentionally forces it on all our downstream users. Instead, we just want to enable this during testing and let them choose for themselves in their builds. Note, that this expands the scope of -Werror to our entire repo for CI, so a bunch of fixes and opt-outs had to be applied to get this change passing. Closed #14714 PiperOrigin-RevId: 666903224 |
4 months ago |
Adam Cozzette | 6ab302d3a3 |
Rust: cut down on the amount of generated C++ code needed for maps
With the C++ kernel for Rust, we currently need to generate quite a few C++ thunks for operations on map fields. For each message we generate, we generate these thunks for all possible map types that could have that message as a value. These operations are for things such as insertion, removal, clearing, iterating, etc. The reason we do this is that templated types don't play well with FFI, so we effectively need separate FFI endpoints for every possible combination of key and value types used (or even potentially used) as a map field. This CL fixes the problem by replacing the generated thunks with functions in the runtime that can operate on `proto2::MessageLite*` without needing to care about the specific message type. The way it works is that we implement the operations using either `UntypedMapBase` (the base class of all map types, which knows nothing about the key and value types) or `KeyMapBase`, which knows the key type but not the value type. I roughly followed the example of the table-driven parser, which has a similar problem of needing to operate generically on maps without having access to the concrete types. I removed 54 thunks per message (that's 6 key types times 9 operations per key), but had to add two new thunks per message: - The `size_info` thunk looks up the `MapNodeSizeInfoT`, which is stored in a small constant table. The important thing here is an offset indicating where to look for the value in each map entry. This offset can be different for every pair of key and value types, but we can safely assume that the result does not depend on the signedness of the key. As a result we only need to store four entries per message: one each for i32, i64, bool, and string. - The `placement_new` thunk move-constructs a message in place. We need this to be able to efficiently implement map insertion. There are two big things that this CL does not address yet but which I plan to follow up on: - Enums still generate many map-related C++ thunks that could be replaced with a common implementation. This should actually be much easier to handle than messages, because every enum has the same representation as an i32. - We still generate six `ProxiedInMapValue` implementations for every message, but it should be possible to replace these with a blanket implementation that works for all message types. PiperOrigin-RevId: 657681421 |
4 months ago |
Jakob Buchgraber | 0d6e9794d1 |
Migrate Repeated::{push, set} and Map::insert to use the IntoProxied trait.
* The public Repeated::{push, set} and Map::insert methods now accept any value that implements IntoProxied<T>, allowing us to move owned values instead of copying them. * This change also updates the FFI layer for strings/bytes in the repeated and maps thunks to accept a std::string* that can be moved rather than a PtrAndLen type that needs to be copied. * Tests are updated to no longer .as_view() when setting a message / string on a repeated / map field. The IntoProxied trait makes calling .as_view() obsolete. PiperOrigin-RevId: 650580788 |
5 months ago |
Protobuf Team Bot | c07de7c9df |
Change to proto2_rust C prefix and proto2::rust C++ namespace
PiperOrigin-RevId: 648791688 |
5 months ago |
Protobuf Team Bot | a9bc366522 |
Stop using double underscores for our C function names and standardize on the 'rust_proto_' prefix.
Besides unnecessary inconsistency on our C symbols, double underscores anywhere in the name are reserved for stdlib use. In practice its unlikely these symbols would ever hit a collision problem (maybe the prior name 'utf8_debug_string' with no prefix as having some risk), but safer to just standardize on this and have no concerns going forward. PiperOrigin-RevId: 648709299 |
5 months ago |
Protobuf Team Bot | 419760f873 |
Split up cpp_api.h/.cc into smaller units.
PiperOrigin-RevId: 647663342 |
6 months ago |