Building Splinter

The splinter repository is available at github.com/splintercommunity/splinter.

Splinter is built using latest stable rust, which you should install via rustup.

To install the remaining dependencies using a package manager, run one of the following commands.

Homebrew (OS X):

brew install openssl zeromq pkg-config protobuf postgresql

APT (Ubuntu):

apt install libssl-dev libzmq3-dev pkg-config libprotobuf-dev postgresql

Once you have the prerequisites installed, build Splinter by running cargo build from the root directory. This command builds all of the Splinter components, including libsplinter (the main library), splinterd (the splinter daemon), the CLI, the client, and all examples in the examples directory.

To build individual components, run cargo build in the component directories. For example, to build only the splinter library, navigate to libsplinter, then run cargo build.

To build Splinter using Docker, run docker-compose -f docker-compose-installed.yaml build from the root directory. This command builds Docker images for all of the Splinter components, including libsplinter (the main library), splinterd (the splinter daemon), the CLI, the client, and all examples in the examples directory.

To build individual components using Docker, run docker-compose -f docker-compose-installed.yaml build <component> from the root directory. For example, to build only the splinter daemon, run docker-compose -f docker-compose-installed.yaml build splinterd.

To use Docker to build Splinter with experimental features enabled, set an environment variable in your shell before running the build commands (for example: export 'CARGO_ARGS= --features experimental'). To go back to building with default features, unset the environment variable (unset CARGO_ARGS).