Skip to main content

Build the binaries

Three separate repositories produce the node, wallet and miner binaries.

BinaryRepositoryYou need it for
epicEpicCash/epicValidating and relaying the chain. Everything needs one
epic-walletEpicCash/epic-walletKeys, balances and building transfers
epic-minerEpicCash/epic-minerProducing blocks. Only for a local chain or actual mining

If you would rather not build, downloads lists the release archives.

One prerequisite

Install rustup. Both Rust repositories pin their toolchain version in the repository, so rustup selects the right one on its own. Do not pass a +toolchain or install a specific version yourself.

That is the whole list on Linux and macOS. Both projects build on stock ubuntu-latest and macos-latest CI runners with no additional system packages.

Windows needs two more things

LLVM, for libclang.dll. The randomx and progpow crates run bindgen, which loads libclang at build time. The LLVM component in the Visual Studio "Desktop development with C++" workload ships only clang-format.exe and clang-tidy.exe. Install LLVM separately and point LIBCLANG_PATH at its bin directory.

# Only needed when libclang is not in a default location.
export LIBCLANG_PATH=/path/to/llvm/lib

Windows SDK 10.0.20348 or later. croaring-sys compiles with -std:c11, and MSVC's C11 mode needs the UCRT <stdalign.h> that arrived in that SDK. With only an older SDK present the build stops with fatal error C1083: Cannot open include file: 'stdalign.h'.

The node and wallet need neither openssl nor strawberryperl on Windows. TLS goes through SChannel there, so openssl-sys is never compiled. The miner needs both.

Node

git clone https://github.com/EpicCash/epic.git
cd epic
cargo build --release

The binary lands at target/release/epic, or target\release\epic.exe on Windows.

Docker is an alternative if you want the node and nothing else:

docker build -t epic-mainnet -f etc/Dockerfile .
docker run -d --name epic-mainnet -p 127.0.0.1:3413:3413 -p 3414:3414 epic-mainnet

Publishing 3413 to loopback only matches the binding the node uses outside Docker. Node and wallet setup has the full port table.

docker compose up -d also works. docker-compose.yml maps chain data under ./target/, so a later cargo clean deletes a synced chain.

Wallet

git clone https://github.com/EpicCash/epic-wallet.git
cd epic-wallet
cargo build --release

The binary lands at target/release/epic-wallet, or target\release\epic-wallet.exe on Windows.

Miner

On Linux and macOS, build the miner the same way as the others:

git clone --recursive https://github.com/EpicCash/epic-miner.git
cd epic-miner
cargo build --release

--recursive matters, because the RandomX and ProgPow implementations are submodules. The binary lands at target/release/epic-miner.

Windows: build from the patched fork

Windows builds come from blacktyger/epic-miner, which is upstream plus the fixes needed for a current MSVC toolchain.

git clone --recursive https://github.com/blacktyger/epic-miner.git
cd epic-miner
cargo build --release

The binary lands at target\release\epic-miner.exe, built for x86_64-pc-windows-msvc.

Clone that fork rather than adding it as a remote to an upstream checkout. .gitmodules uses relative submodule URLs, so the RandomX and ProgPow submodules resolve against whichever repository you cloned, and a clone of upstream pulls upstream's submodules.

You also need Strawberry Perl on PATH. The miner depends on openssl with the vendored feature, so it compiles OpenSSL from source, and OpenSSL's Configure rejects the msys perl that ships with Git for Windows.

A stock Windows build mines RandomX only. No cuckoo plugins are built there, and ProgPow needs the opencl or cuda feature.

Confirm you have three binaries

Put all three binaries somewhere on your PATH, or note where they are. Both the node and the wallet resolve configuration from the current working directory before falling back to ~/.epic/<network>, so where you run them from matters more than where the binary lives. That is what lets one wallet binary drive several wallets.

With them on PATH:

epic --version
epic-wallet --version
epic-miner --version

Build and test everything in a repository

Either repository builds and tests as a workspace:

cargo build --workspace --all-targets
cargo test --workspace -- --nocapture --test-threads=1

--test-threads=1 matters because several tests use a shared data directory. The node's integration tests are behind a feature flag:

cargo test --features cucumber-tests

Next