Skip to content

Install from source

Enrico Rubboli edited this page Oct 9, 2023 · 13 revisions

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.

Prerequisites

  • Ensure you have git installed on your system.
  • Ensure you have Rust and Cargo installed. If not, you can install them via Rustup.

Steps for Linux/Osx

  1. 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-essentials 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:

    9ecfeff0101bb37410d01f709107a08e4c32db93 refs/tags/v0.1.0
    f7c7d310d3d3b7f8ab33cc062ba56f76b05d81c0 refs/tags/v0.1.1   
    

    To switch to the latest one, use:

    git checkout tags/v0.1.3
    
  2. Compile the Source

    Use Cargo to compile the source files:

    cargo build --release

    NOTE: By using the --release flag, you are building the binaries optimized for production release. Alternatively, you can omit this flag for a faster build.

  3. Run Mintlayer Node

    After successful compilation, you can run Mintlayer:

    ./target/release/node-daemon
  4. Open a new terminal and run the Wallet

     cd mintlayer-core
    ./target/release/wallet-cli

NOTES: The node-daemon is not particularly verbose. If you wish to see more detailed logs of what the node is doing, you can increase the log level. Use the RUST_LOG=info environment variable for this purpose.

NOTES: When building from sources, the most recent version on Git requires Rust 1.72. If you installed Rust via rustup, running rustup update is sufficient to address this.

Conclusion

You've now successfully installed Mintlayer from source. For more configurations and advanced usage, refer to the official Mintlayer documentation.

Clone this wiki locally