Cargo Features

lnpbp_services has no features set by default.

[dependencies]
lnpbp_services = { version = "0.3.0-alpha.1", features = ["server", "client", "embedded", "cli", "shell", "node", "serde"] }

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
server = node, shell

Server is a standalone application that runs daemon

client cli? embedded? = env_logger, log, zmq

Feature is required for any applications that talks to daemon processes TODO: Consider converting this list of feature into non-optional dependecies

Affects rpc::client, lnpbp_services::esb, lnpbp_services::rpc

embedded = client, node

Embedded is an app that contains ndoe in itself and that talks to it through integration layer

cli = client, serde, shell

Command-line application feature

Affects lnpbp_services::format

shell cli? server? = clap, dotenv, env_logger, log, serde, settings

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 ^2.4

LNP/BP libraries

Affects lnpbp_services::shell, error::ConfigInitError, error::BootstrapError

node embedded? server? = env_logger, log, serde, tokio, zmq

Besides 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 CLI

Enables keygen of lnpbp

Affects error::RuntimeError, lnpbp_services::node, lnpbp_services::peer, rpc::server, error::ConfigInitError, error::BootstrapError, lnpbp_services::esb, lnpbp_services::rpc

serde cli? node? shell? = serde_crate, serde_with, toml

Enables serde of amplify ^2.4 and lnpbp

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.5.1

toml serde?

Enables toml ~0.5.7

settings shell?

Enables config ~0.10.1

Congig

dotenv shell?
clap shell?

Enables clap =3.0.0-beta.2

log client? node? shell?
env_logger client? node? shell?

Enables env_logger ~0.7.1

tokio node?

Enables tokio ~0.3.5

Networking

zmq client? node?

Enables zmq ~0.9.2