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:

  1. Standalone node: server (=node+shell)
  2. Cli to remote node: cli (auto includes shell and integration)
  3. Mobile app talking to a server: client
  4. Mobile app with embedded node: embedded (auto includes client + node)
  5. Simple cli utility app: shell
default = client, tor

These default features are set whenever microservices is added without default-features = false somewhere in the dependency tree.

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-line

Affects 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

Enables keygen of internet2

Affects microservices::peer

zmq _rpc? = zmq2

Enables zmq of internet2

Affects microservices::ZMQ_CONTEXT

tor default all?

Enables tor of internet2

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