Installing Mintlayer from source allows you to access the latest features and updates directly from the repository. Follow the steps below to compile and install Mintlayer from source.
git installed on your system.Rust and Cargo installed. If not, you can install them via Rustup.Setup the Repository
First, clone the Mintlayer repository to your local machine:
git clone https://github.com/mintlayer/mintlayer-core.git
Navigate to the Directory
Change your current directory to the cloned repository:
cd mintlayer-core
Prepare your system (for ubuntu/debian)
Ensure some required packages are properly installed in your system:
sudo apt install build-essential libglib2.0-dev libatk1.0-dev
Checkout the latest tag (optional)
We use tags to mark stable releases. If you prefer to encounter fewer issues, consider checking out the most recent tag.
To view the list of tags, use:
git show-ref --tags
This command will display all the tags, for example:
9ecfeff0b3741...07a08e4c32db93 refs/tags/vX.Y.0
f7c7d310d3d3a...a56f76b05d81c0 refs/tags/vX.Y.1
To switch to the latest one, use:
git checkout tags/x.y.z
make sure you replace
x.y.zwith the version number you intend to build
Compile the Source
Use Cargo to compile the source files, specify the node-daemon and the wallet-cli binaries:
cargo build --bin node-daemon --bin wallet-cli
In order to optimize the process for production release you can add the
--releaseoption.
Run Mintlayer Node
After successful compilation, you can run Mintlayer:
./target/release/node-daemon
Open a new terminal and run the Wallet
cd mintlayer-core
./target/release/wallet-cli
The
node-daemonis not particularly verbose. If you wish to see more detailed logs of what the node is doing, you can increase the log level. Use theRUST_LOG=infoenvironment variable for this purpose.
When building from sources, the most recent version on Git requires Rust 1.72. If you installed Rust via rustup, running
rustup updateis sufficient to address this.
You've now successfully installed Mintlayer from source. For more configurations and advanced usage, refer to the official Mintlayer documentation.