Skip to content

Installing the Solidity Compiler

Versioning

Neo DevPack for Solidity versions follow semantic versioning. We recommend always using the latest release to ensure you have the most up-to-date EVM-to-NeoVM mappings, intrinsic library support, and security hardening patches.

npm / Node.js

Use npm for a convenient and portable way to install neo-devpack-solidity locally into your JavaScript/TypeScript project. This is highly recommended if you are using Hardhat or other Node.js-based tooling.

bash
npm install --save-dev @neo-devpack-solidity/hardhat-solc-neo

The Hardhat plugin will automatically manage the underlying compiler binary for your system.

Docker

If you prefer to run the compiler inside a containerized environment to avoid installing Rust and other dependencies locally, build the checked-in Dockerfile from the source repository.

bash
git clone https://github.com/r3e-network/neo-devpack-solidity.git
cd neo-devpack-solidity
docker build -t neo-solc:local .
docker run --rm -v "$(pwd)":/sources neo-solc:local -o /sources/build /sources/MyContract.sol

Static Binaries (Linux, macOS, Windows)

We provide pre-built static binaries for major operating systems via our GitHub Releases page.

  1. Navigate to Neo DevPack for Solidity Releases.
  2. Download the binary archive for your platform.
  3. Extract the archive.
  4. Move the neo-solc executable to a directory in your system $PATH (e.g., /usr/local/bin).
bash
chmod +x neo-solc
sudo mv neo-solc /usr/local/bin/

Building from Source

If you want the absolute latest features or are contributing to the compiler, building from source is the best option.

Prerequisites

RequirementMinimum VersionPurpose
Rust toolchain1.88+ (stable)The core compiler is written in Rust
Git2.xTo clone the repository
Node.js20.19+ or 22.12+(Optional) For TypeScript tooling and VitePress docs

If Rust is not installed, install it via rustup:

bash
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source "$HOME/.cargo/env"

Clone and Build

bash
git clone https://github.com/r3e-network/neo-devpack-solidity.git
cd neo-devpack-solidity

# Build the release binary
cargo build --release

The compiled binary will be located at target/release/neo-solc.

Install System-Wide via Cargo

You can easily install the compiler system-wide directly through Cargo without needing to manually move the binary:

bash
cargo install --path .

Ensure your ~/.cargo/bin directory is in your system's $PATH.

The Version String in Detail

The Neo DevPack for Solidity version string contains the primary version number, along with build metadata if compiled from a non-release branch.

bash
neo-solc --version

Output format: neo-solc <major>.<minor>.<patch> (e.g., neo-solc 0.18.0).

When debugging or reporting issues on GitHub, please always include the exact version string produced by this command.

Optional: Local TestNet Environment (Neo-Express)

To effectively test compiled .nef files locally, we recommend installing Neo-Express, a local private blockchain for Neo N3.

bash
# Requires .NET 8.0+ SDK
dotnet tool install -g Neo.Express

Once installed, you can use neoxp to create a local node, deploy the compiler's output, and run transactions locally. See Deploying Contracts for more details.

MIT Licensed