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. By default this requires `protoc` on the `PATH`; enable the
17//! `protox` feature to compile with a pure-Rust compiler instead, or the
18//! `protoc` feature to build and vendor `protoc` from source.
19
20/// Generated types for the protobuf `substrait.extensions` package.
21pub mod extensions {
22    include!(concat!(env!("OUT_DIR"), "/substrait.extensions.rs"));
23
24    #[cfg(feature = "serde")]
25    include!(concat!(env!("OUT_DIR"), "/substrait.extensions.serde.rs"));
26}
27
28include!(concat!(env!("OUT_DIR"), "/substrait.rs"));
29
30#[cfg(feature = "serde")]
31include!(concat!(env!("OUT_DIR"), "/substrait.serde.rs"));
32
33/// The encoded file descriptor set for the Substrait protobuf definitions.
34///
35/// This can be used for protobuf reflection.
36#[cfg(feature = "embed-descriptor")]
37pub const FILE_DESCRIPTOR_SET: &[u8] =
38    include_bytes!(concat!(env!("OUT_DIR"), "/proto_descriptor.bin"));