From 800f2fa65d92c53c6d98944d891209d8f5608c79 Mon Sep 17 00:00:00 2001 From: Casper Meijn Date: Fri, 15 Mar 2024 15:38:55 +0100 Subject: [PATCH] WIP: docs: Document feature flags Open question: - What is the function of `prost-derive` feature? --- README.md | 4 ++++ prost-build/src/lib.rs | 4 ++++ prost-types/src/lib.rs | 3 +++ 3 files changed, 11 insertions(+) diff --git a/README.md b/README.md index 6307ed632..59d4070bc 100644 --- a/README.md +++ b/README.md @@ -463,6 +463,10 @@ The prost project maintains flakes support for local development. Once you have nix and nix flakes setup you can just run `nix develop` to get a shell configured with the required dependencies to compile the whole project. +## Feature Flags +- `std`: Enable integration with standard library. Disable this feature for `no_std` support. This feature is enabled by default. +- `prost-derive`: TODO: That does this do? This feature is enabled by default. +- `no-recursion-limit`: Disable the recursion limit. The recursion limit is 100 and cannot be customized. ## FAQ diff --git a/prost-build/src/lib.rs b/prost-build/src/lib.rs index 992efd4c8..f004f835c 100644 --- a/prost-build/src/lib.rs +++ b/prost-build/src/lib.rs @@ -124,6 +124,10 @@ //! //! // Now compile your proto files via prost-build //! ``` +//! +//! ## Feature Flags +//! - `format`: Format the generated output. This feature is enabled by default. +//! - `cleanup-markdown`: Clean up Markdown in protobuf docs. //! //! [`protobuf-src`]: https://docs.rs/protobuf-src diff --git a/prost-types/src/lib.rs b/prost-types/src/lib.rs index 81fcd9670..a2a502e90 100644 --- a/prost-types/src/lib.rs +++ b/prost-types/src/lib.rs @@ -6,6 +6,9 @@ //! definitions, so code examples are not in Rust. //! //! See the [Protobuf reference][1] for more information about well-known types. +//! +//! ## Feature Flags +//! - `std`: Enable integration with standard library. Disable this feature for `no_std` support. This feature is enabled by default. //! //! [1]: https://developers.google.com/protocol-buffers/docs/reference/google.protobuf