mirror of
https://github.com/hinto-janai/cuprate.git
synced 2025-01-05 18:39:41 +00:00
rpc: add/doc feature flags
This commit is contained in:
parent
6ce177aeca
commit
161eeb7be9
3 changed files with 29 additions and 4 deletions
|
@ -9,14 +9,19 @@ repository = "https://github.com/Cuprate/cuprate/tree/main/rpc/types"
|
||||||
keywords = ["cuprate", "rpc", "types", "monero"]
|
keywords = ["cuprate", "rpc", "types", "monero"]
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = []
|
default = ["json", "bin", "other", "serde", "epee"]
|
||||||
|
json = []
|
||||||
|
bin = []
|
||||||
|
other = []
|
||||||
|
serde = ["dep:serde"]
|
||||||
|
epee = ["dep:cuprate-epee-encoding"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
cuprate-epee-encoding = { path = "../../net/epee-encoding" }
|
cuprate-epee-encoding = { path = "../../net/epee-encoding", optional = true }
|
||||||
|
|
||||||
monero-serai = { workspace = true }
|
monero-serai = { workspace = true }
|
||||||
paste = { workspace = true }
|
paste = { workspace = true }
|
||||||
serde = { workspace = true }
|
serde = { workspace = true, optional = true }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
serde_json = { workspace = true }
|
serde_json = { workspace = true }
|
||||||
|
|
|
@ -60,3 +60,16 @@ values inside JSON strings, for example:
|
||||||
`binary` here is (de)serialized as a normal [`String`]. In order to be clear on which fields contain binary data, the struct fields that have them will use [`crate::BinaryString`] instead of [`String`].
|
`binary` here is (de)serialized as a normal [`String`]. In order to be clear on which fields contain binary data, the struct fields that have them will use [`crate::BinaryString`] instead of [`String`].
|
||||||
|
|
||||||
TODO: list the specific types.
|
TODO: list the specific types.
|
||||||
|
|
||||||
|
# Feature flags
|
||||||
|
List of feature flags for `cuprate-rpc-types`.
|
||||||
|
|
||||||
|
All are enabled by default.
|
||||||
|
|
||||||
|
| Feature flag | Does what |
|
||||||
|
|--------------|-----------|
|
||||||
|
| `json` | Enables the [`crate::json`] module
|
||||||
|
| `bin` | Enables the [`crate::bin`] module
|
||||||
|
| `other` | Enables the [`crate::other`] module
|
||||||
|
| `serde` | Implements `serde` on all types
|
||||||
|
| `epee` | Implements `epee_encoding` on all types
|
|
@ -1,4 +1,5 @@
|
||||||
#![doc = include_str!("../README.md")]
|
#![doc = include_str!("../README.md")]
|
||||||
|
#![cfg_attr(docsrs, feature(doc_cfg))]
|
||||||
//---------------------------------------------------------------------------------------------------- Lints
|
//---------------------------------------------------------------------------------------------------- Lints
|
||||||
// Forbid lints.
|
// Forbid lints.
|
||||||
// Our code, and code generated (e.g macros) cannot overrule these.
|
// Our code, and code generated (e.g macros) cannot overrule these.
|
||||||
|
@ -111,6 +112,12 @@ pub use constants::{
|
||||||
pub use status::Status;
|
pub use status::Status;
|
||||||
|
|
||||||
pub mod base;
|
pub mod base;
|
||||||
|
#[cfg(feature = "bin")]
|
||||||
|
#[cfg_attr(docsrs, doc(cfg(feature = "bin")))]
|
||||||
pub mod bin;
|
pub mod bin;
|
||||||
|
#[cfg(feature = "json")]
|
||||||
|
#[cfg_attr(docsrs, doc(cfg(feature = "json")))]
|
||||||
pub mod json;
|
pub mod json;
|
||||||
|
#[cfg(feature = "other")]
|
||||||
|
#[cfg_attr(docsrs, doc(cfg(feature = "other")))]
|
||||||
pub mod other;
|
pub mod other;
|
||||||
|
|
Loading…
Reference in a new issue