Skip to main content

substrait_prost/
lib.rs

1// SPDX-License-Identifier: Apache-2.0
2
3#![allow(
4    clippy::doc_overindented_list_items,
5    clippy::large_enum_variant,
6    clippy::needless_borrow,
7    clippy::needless_borrows_for_generic_args,
8    clippy::needless_lifetimes,
9    rustdoc::invalid_html_tags
10)]
11
12//! Generated types for the protobuf `substrait` package.
13//!
14//! The Rust code in this crate is generated at build time with
15//! [`prost`](https://docs.rs/prost) from the vendored Substrait `.proto`
16//! definitions. Building this crate requires `protoc` to be available, or the
17//! `protoc` feature to be enabled (which builds and vendors it from source).
18
19/// Generated types for the protobuf `substrait.extensions` package.
20pub mod extensions {
21    include!(concat!(env!("OUT_DIR"), "/substrait.extensions.rs"));
22
23    #[cfg(feature = "serde")]
24    include!(concat!(env!("OUT_DIR"), "/substrait.extensions.serde.rs"));
25}
26
27include!(concat!(env!("OUT_DIR"), "/substrait.rs"));
28
29#[cfg(feature = "serde")]
30include!(concat!(env!("OUT_DIR"), "/substrait.serde.rs"));
31
32/// The encoded file descriptor set for the Substrait protobuf definitions.
33///
34/// This can be used for protobuf reflection.
35#[cfg(feature = "embed-descriptor")]
36pub const FILE_DESCRIPTOR_SET: &[u8] =
37    include_bytes!(concat!(env!("OUT_DIR"), "/proto_descriptor.bin"));