//! gin-tonic wrapepr for code generation (models and service)
#[cfg(feature = "tonic")]
mod codec;

#[cfg(feature = "generator")]
mod codegen;

#[cfg(feature = "tonic")]
pub use codec::GinCodec;

#[cfg(feature = "generator")]
pub use codegen::{CompileConfig, CompilerError};

#[cfg(all(feature = "generator", feature = "internals"))]
pub use codegen::Generator;

#[cfg(all(feature = "generator", feature = "internals"))]
pub use protox;

pub use gin_tonic_core;

pub use gin_tonic_core::{
    Decode, Encode, Map, Message, PackableMarker, Packed, ProtoError, RawMessageView, Scalar, Tag,
    Unpacked, WIRE_TYPE_I32, WIRE_TYPE_I64, WIRE_TYPE_LENGTH_ENCODED, WIRE_TYPE_VARINT, decoder,
    encoder, scalars,
};

#[cfg(feature = "derive")]
pub use gin_tonic_derive;

#[cfg(feature = "derive")]
pub use gin_tonic_derive::{Enumeration, Message, OneOf};

// Re-export the alloc crate for use within derived code.
#[doc(hidden)]
pub extern crate alloc;

#[cfg(test)]
mod test;
