Skip to main content

gin_tonic/
lib.rs

1//! gin-tonic wrapepr for code generation (models and service)
2#[cfg(feature = "tonic")]
3mod codec;
4
5#[cfg(feature = "generator")]
6mod codegen;
7
8#[cfg(feature = "tonic")]
9pub use codec::GinCodec;
10#[cfg(all(feature = "generator", feature = "internals"))]
11pub use codegen::Generator;
12#[cfg(feature = "generator")]
13pub use codegen::{CompileConfig, CompilerError};
14pub use gin_tonic_core;
15pub use gin_tonic_core::{
16    Decode, Encode, Map, Message, PackableMarker, Packed, ProtoError, Scalar, Tag, Unpacked,
17    WIRE_TYPE_I32, WIRE_TYPE_I64, WIRE_TYPE_LENGTH_ENCODED, WIRE_TYPE_VARINT, decoder, encoder,
18    fxhash, scalars, types,
19};
20#[cfg(feature = "derive")]
21pub use gin_tonic_derive;
22#[cfg(feature = "derive")]
23pub use gin_tonic_derive::{Enumeration, Message, OneOf};
24#[cfg(all(feature = "generator", feature = "internals"))]
25pub use protox;
26
27// Re-export the alloc crate for use within derived code.
28#[doc(hidden)]
29pub extern crate alloc;
30
31#[cfg(test)]
32mod test;