1 // 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 7 #![deny(unsafe_op_in_unsafe_fn)] 8 #![cfg_attr(not(bzl), allow(unused_imports))] 9 10 mod arena; 11 12 pub use arena::{upb_Arena, Arena, RawArena}; 13 14 mod array; 15 pub use array::{ 16 upb_Array, upb_Array_Append, upb_Array_DataPtr, upb_Array_Get, upb_Array_GetMutable, 17 upb_Array_MutableDataPtr, upb_Array_New, upb_Array_Reserve, upb_Array_Resize, upb_Array_Set, 18 upb_Array_Size, RawArray, 19 }; 20 21 mod associated_mini_table; 22 pub use associated_mini_table::AssociatedMiniTable; 23 24 mod ctype; 25 pub use ctype::CType; 26 27 mod extension_registry; 28 pub use extension_registry::{upb_ExtensionRegistry, RawExtensionRegistry}; 29 30 mod map; 31 pub use map::{ 32 upb_Map, upb_Map_Clear, upb_Map_Delete, upb_Map_Get, upb_Map_Insert, upb_Map_New, upb_Map_Next, 33 upb_Map_Size, MapInsertStatus, RawMap, UPB_MAP_BEGIN, 34 }; 35 36 mod message; 37 pub use message::*; 38 39 mod message_value; 40 pub use message_value::{upb_MessageValue, upb_MutableMessageValue}; 41 42 mod mini_table; 43 pub use mini_table::{ 44 upb_MiniTable, upb_MiniTableField, upb_MiniTable_FindFieldByNumber, 45 upb_MiniTable_GetFieldByIndex, upb_MiniTable_SubMessage, RawMiniTable, RawMiniTableField, 46 }; 47 48 mod opaque_pointee; 49 50 mod owned_arena_box; 51 pub use owned_arena_box::OwnedArenaBox; 52 53 mod string_view; 54 pub use string_view::StringView; 55 56 mod text; 57 pub use text::debug_string; 58 59 pub mod wire; 60 pub use wire::{upb_Decode, DecodeStatus, EncodeStatus}; 61 62 #[cfg(test)] 63 mod 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 } 72