Skip to content

Commit

Permalink
Document feature flags (#558)
Browse files Browse the repository at this point in the history
* Document feature flags

* Fix taplo issue

* Mention examples in the feature flag documentation.
  • Loading branch information
Niederb committed May 2, 2023
1 parent 88c0873 commit 9625c87
Showing 1 changed file with 19 additions and 8 deletions.
27 changes: 19 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,25 @@ disable_target_static_assertions = [
]
# If this is active all the code compiles in synchronous mode. Otherwise `async` is supported.
sync-api = ["ac-compose-macros/sync-api", "maybe-async/is_sync"]
# Use the `jsonrpsee` crate for websocket communication. Does provide sync and async support but needs a tokio runtime.
# Provides convenience functions such as subscription callbacks.
# Most examples use the `jsonrpsee` feature and can be used for reference.
jsonrpsee-client = ["std", "jsonrpsee", "futures"]
# Use the `tungstenite` crate for websocket communication. No async support but has some reconnection capabilities.
# See the example `transfer_with_tungstenite_client` on how to use it.
tungstenite-client = ["std", "tungstenite"]
# Use the `ws` crate for websocket communication. No async support.
# Establishes a new connection for each request and therefore is limited in terms of performance.
# See the example `transfer_with_ws_client` on how to use it.
ws-client = ["std", "ws"]
# Enables functionality that helps to create extrinsics for `pallet-staking`.
# See the `StakingExtrinsics` trait and the `staking_batch_payout` example to get an understanding
# of the functionality this feature provides
staking-xt = ["std", "ac-primitives/staking-xt"]
# Enables functionality that helps to create extrinsics for `pallet-contracts`.
# See the `ContractsExtrinsics` trait and the `contract_instantiate_with_code` example to get an understanding
# of the functionality this feature provides.
contracts-xt = ["std", "ac-primitives/contracts-xt"]
std = [
# crates.io no_std
"codec/std",
Expand All @@ -91,11 +110,3 @@ std = [
"ac-node-api/std",
"ac-primitives/std",
]
# Use the `jsonrpsee` crate for websocket communication. Does provide sync and async support.
jsonrpsee-client = ["std", "jsonrpsee", "futures"]
# Use the `tungstenite` crate for websocket communication. No async support.
tungstenite-client = ["std", "tungstenite"]
# Use the `ws` crate for websocket communication. No async support.
ws-client = ["std", "ws"]
staking-xt = ["std", "ac-primitives/staking-xt"]
contracts-xt = ["std", "ac-primitives/contracts-xt"]

0 comments on commit 9625c87

Please sign in to comment.