blob: 49cea15e5bf8e0b7a7db48235f6265ffa9c4cabd [file] [log] [blame]
Protobuf Team Bot219e8ea2024-06-28 05:51:01 -07001// Protocol Buffers - Google's data interchange format
2// Copyright 2024 Google LLC. All rights reserved.
3//
4// Use of this source code is governed by a BSD-style
5// license that can be found in the LICENSE file or at
6// https://developers.google.com/open-source/licenses/bsd
Derek Benson41f12a22024-07-23 10:56:09 -07007#![deny(unsafe_op_in_unsafe_fn)]
Derek Benson6f580852024-07-26 08:09:33 -07008#![cfg_attr(not(bzl), allow(unused_imports))]
Protobuf Team Bot219e8ea2024-06-28 05:51:01 -07009
Protobuf Team Bot5c7a9fd2024-04-16 07:03:22 -070010mod arena;
Derek Benson41f12a22024-07-23 10:56:09 -070011
Protobuf Team Bot5c7a9fd2024-04-16 07:03:22 -070012pub use arena::{upb_Arena, Arena, RawArena};
Protobuf Team Bot2678e102024-04-12 13:50:28 -070013
Protobuf Team Botd44ba902024-04-16 08:05:40 -070014mod array;
15pub use array::{
16 upb_Array, upb_Array_Append, upb_Array_DataPtr, upb_Array_Get, upb_Array_GetMutable,
Derek Bensonf2d8c2b2024-05-13 05:48:10 -070017 upb_Array_MutableDataPtr, upb_Array_New, upb_Array_Reserve, upb_Array_Resize, upb_Array_Set,
18 upb_Array_Size, RawArray,
Protobuf Team Botd44ba902024-04-16 08:05:40 -070019};
Protobuf Team Bot2678e102024-04-12 13:50:28 -070020
Protobuf Team Bot7ad56e72024-07-29 11:13:57 -070021mod associated_mini_table;
22pub use associated_mini_table::AssociatedMiniTable;
23
Protobuf Team Botd44ba902024-04-16 08:05:40 -070024mod ctype;
25pub use ctype::CType;
Protobuf Team Bot2678e102024-04-12 13:50:28 -070026
Protobuf Team Botd44ba902024-04-16 08:05:40 -070027mod extension_registry;
28pub use extension_registry::{upb_ExtensionRegistry, RawExtensionRegistry};
Protobuf Team Bot2678e102024-04-12 13:50:28 -070029
Protobuf Team Botd44ba902024-04-16 08:05:40 -070030mod map;
31pub use map::{
32 upb_Map, upb_Map_Clear, upb_Map_Delete, upb_Map_Get, upb_Map_Insert, upb_Map_New, upb_Map_Next,
Derek Benson1e1bf0d2024-07-26 11:07:22 -070033 upb_Map_Size, MapInsertStatus, RawMap, UPB_MAP_BEGIN,
Protobuf Team Botd44ba902024-04-16 08:05:40 -070034};
Protobuf Team Bot2678e102024-04-12 13:50:28 -070035
Protobuf Team Botd44ba902024-04-16 08:05:40 -070036mod message;
Protobuf Team Bot9f4f3022024-08-23 12:09:38 -070037pub use message::*;
Protobuf Team Bot2678e102024-04-12 13:50:28 -070038
Protobuf Team Botd44ba902024-04-16 08:05:40 -070039mod message_value;
40pub use message_value::{upb_MessageValue, upb_MutableMessageValue};
Protobuf Team Bot2678e102024-04-12 13:50:28 -070041
Protobuf Team Botd44ba902024-04-16 08:05:40 -070042mod mini_table;
Jakob Buchgraberb6e0a482024-05-06 05:16:05 -070043pub use mini_table::{
Derek Bensona0f79eb2024-09-09 13:27:05 -070044 upb_MiniTable, upb_MiniTableField, upb_MiniTable_FindFieldByNumber,
45 upb_MiniTable_GetFieldByIndex, upb_MiniTable_SubMessage, RawMiniTable, RawMiniTableField,
Jakob Buchgraberb6e0a482024-05-06 05:16:05 -070046};
Protobuf Team Bot2678e102024-04-12 13:50:28 -070047
Protobuf Team Botd44ba902024-04-16 08:05:40 -070048mod opaque_pointee;
Protobuf Team Bot2678e102024-04-12 13:50:28 -070049
Protobuf Team Bot734729a2024-04-24 12:25:37 -070050mod owned_arena_box;
51pub use owned_arena_box::OwnedArenaBox;
52
Protobuf Team Botd44ba902024-04-16 08:05:40 -070053mod string_view;
54pub use string_view::StringView;
Protobuf Team Bot2678e102024-04-12 13:50:28 -070055
Protobuf Team Botf9dd9ce2024-07-10 12:25:52 -070056mod text;
57pub use text::debug_string;
58
Protobuf Team Bot734729a2024-04-24 12:25:37 -070059pub mod wire;
60pub use wire::{upb_Decode, DecodeStatus, EncodeStatus};
Derek Bensona0f79eb2024-09-09 13:27:05 -070061
62#[cfg(test)]
63mod test {
64 #[macro_export]
65 /// Force a compiler error if the passed in function is not linked.
66 macro_rules! assert_linked {
67 ($($vals:tt)+) => {
68 let _ = std::hint::black_box($($vals)+ as *const ());
69 }
70 }
71}