Cargo Features
[dependencies]
microservices = { version = "0.9.0", default-features = false, features = ["all", "server", "cli", "embedded", "node", "client", "shell", "serde", "peer", "zmq", "tor"] }
Recommended set of features:
- Standalone node:
server
(=node
+shell
)- Cli to remote node:
cli
(auto includesshell
andintegration
)- Mobile app talking to a server:
client
- Mobile app with embedded node:
embedded
(auto includesclient
+node
)- Simple cli utility app:
shell
- default = client, tor
-
These default features are set whenever
microservices
is added without
somewhere in the dependency tree.default-features = false - all = cli, peer, serde, server, tor
- server all? = node, shell
-
Server is a standalone application that runs daemon
- cli all? = client, colored, serde, shell
-
Command-line application feature
Affects
microservices::cli
… - embedded = client, node
-
Embedded is an app that contains embedded node and that talks to it through integration layer
- node embedded? peer? server? = _config, _rpc, serde
-
Server node can be run as a part of mobile app and other types of clients; thus
server
!=node
. This feature results in building with features not required for command-lineAffects
error::RuntimeError
,microservices::node
,rpc::server
… - client default cli? embedded? = _rpc
-
Feature is required for any applications that talks to daemon processes
Affects
rpc::client
… - shell cli? server? = _config, serde, settings, shellexpand
-
Required for all apps that can be launched from command-line shell as binaries (i.e. both servers and cli)
Enables parse_arg of amplify ^3.13.0
LNP/BP libraries
Affects
microservices::shell
… - _config node? shell?
-
Internally used features for convenience
Affects
error::ConfigInitError
,error::BootstrapError
… - serde all? cli? node? shell? = serde_crate, serde_with, toml
-
Enables serde of amplify ^3.13.0 and internet2
- peer all? = node
-
Affects
microservices::peer
… - zmq _rpc? = zmq2
-
Affects
microservices::ZMQ_CONTEXT
… - tor default all?
-
internet2:
Networking
---------- - _rpc client node? = zmq
-
Affects
microservices::esb
,microservices::rpc
…
Features from optional dependencies
In crates that don't use the dep:
syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.
- serde_crate serde?
-
Enables serde
Serialization & parsing
- serde_with serde?
-
Enables serde_with ^1.14
- toml serde?
-
Enables toml ^0.5
- settings shell?
-
Enables config ^0.10
Congig
- shellexpand shell?
-
Enables shellexpand ^2.1
- colored cli?
- zmq2 zmq?
-
Enables zmq2
Networking