jsonrpsee/lib.rs
1// Copyright 2019-2021 Parity Technologies (UK) Ltd.
2//
3// Permission is hereby granted, free of charge, to any
4// person obtaining a copy of this software and associated
5// documentation files (the "Software"), to deal in the
6// Software without restriction, including without
7// limitation the rights to use, copy, modify, merge,
8// publish, distribute, sublicense, and/or sell copies of
9// the Software, and to permit persons to whom the Software
10// is furnished to do so, subject to the following
11// conditions:
12//
13// The above copyright notice and this permission notice
14// shall be included in all copies or substantial portions
15// of the Software.
16//
17// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
18// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
19// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
20// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
21// SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
22// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
23// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
24// IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
25// DEALINGS IN THE SOFTWARE.
26
27//! jsonrpsee wrapper crate.
28//!
29//! <br>
30//!
31//! # Optional features
32//!
33//! The `jsonrpsee` crate composes JSON-RPC functionality behind optional feature
34//! flags to provide for server communication over specific protocols.
35//! There are no default features, all functionality must be opted in to accordingly.
36//! The following features are available.
37//!
38//! - **`macros`** - JSON-RPC API generation convenience by derive macros.
39//! - **`server-core`** - Enables minimal server features to generate the RPC API without
40//! transports.
41//! - **`server`** - Enables all server features including transports.
42//! - **`full`** - Enables all features.
43//!
44//! Vendored from [jsonrpsee](https://github.com/paritytech/jsonrpsee), Copyright (c) 2019-2021
45//! Parity Technologies (UK) Ltd., licensed under the MIT License (see
46//! `crates/rpc/jsonrpsee/LICENSE`).
47
48#![cfg_attr(not(test), warn(unused_crate_dependencies))]
49#![cfg_attr(docsrs, feature(doc_cfg))]
50
51#[cfg(feature = "server")]
52pub use jsonrpsee_server as server;
53#[cfg(feature = "server")]
54pub use tokio;
55
56#[cfg(feature = "server-core")]
57pub use jsonrpsee_core::server::*;
58
59#[cfg(feature = "jsonrpsee-proc-macros")]
60pub use jsonrpsee_proc_macros as proc_macros;
61#[cfg(feature = "jsonrpsee-proc-macros")]
62pub use tracing;
63
64#[cfg(feature = "jsonrpsee-types")]
65pub use jsonrpsee_types as types;
66
67#[cfg(feature = "server-core")]
68pub use jsonrpsee_core as core;