NomicFoundation/solx

LLVM-based Solidity compiler.

Solidity

186

613 commits

updated Sep 23, 2026

See the code

README

solx logo

Optimizing Solidity Compiler

solx is an optimizing Solidity compiler for EVM by Nomic Foundation. Slang parses and binds the Solidity, the frontend lowers it to MLIR, and an LLVM backend with an EVM target produces the bytecode.

[!WARNING]
The project is in development and is not ready for production use.

The tester runs solx against:

Planned:

Documentation

solx documentation is powered by GitHub Pages and provided as an mdBook, while its Markdown sources can be found in this directory. To build the book, follow these instructions. The design rules of the Slang frontend and the conventions for working on this repository with an agent are in CLAUDE.md.

See also:

Installation

For the detailed installation and usage guide, visit the respective page of our documentation.

Quick Start

# Compile a Solidity file
solx Contract.sol --bin --abi

# Compile with optimizations
solx Contract.sol --bin --abi -O3

# Output to a directory
solx Contract.sol --bin --abi -o ./build

Architecture

For details on the compilation pipeline and components, see the architecture documentation.

Testing

For details on running unit tests, integration tests, and project tests, see the testing documentation.

Troubleshooting

If you are building solx from source and you have multiple LLVM builds in your system, ensure that you choose the correct one to build the compiler. The environment variable LLVM_SYS_211_PREFIX sets the path to the directory with LLVM build artifacts, which typically ends with target-llvm/target-final. For example:

export LLVM_SYS_211_PREFIX="${HOME}/src/solx/target-llvm/target-final"

If you suspect that the compiler is not using the correct LLVM build, check by running set | grep LLVM, and reset all LLVM-related environment variables.

For reference, see llvm-sys and Local LLVM Configuration Guide.

License

Additionally, this repository vendors tests and test projects that preserve their original licenses:

These projects are modified for the purposes of testing our compiler toolchain and are not used outside of this repository.

Visit the project directories to discover the terms of each license in detail. These and other projects are licensed in either per-file or per-project manner.

Credits

solx originated at Matter Labs, where its first pipeline and LLVM backend were built.

Contact Us

Email us at alex@nomic.foundation or join our Telegram group.

team-compiler

Contributors

hedgar2017

293 commits

renovate[bot]

112 commits

nebasuke

83 commits

dependabot[bot]

66 commits

NomicFoundation/solx

LLVM-based Solidity compiler.

Solidity

186

613 commits

updated Sep 23, 2026

See the code

README

solx logo

Optimizing Solidity Compiler

solx is an optimizing Solidity compiler for EVM by Nomic Foundation. Slang parses and binds the Solidity, the frontend lowers it to MLIR, and an LLVM backend with an EVM target produces the bytecode.

[!WARNING]
The project is in development and is not ready for production use.

The tester runs solx against:

Planned:

Documentation

solx documentation is powered by GitHub Pages and provided as an mdBook, while its Markdown sources can be found in this directory. To build the book, follow these instructions. The design rules of the Slang frontend and the conventions for working on this repository with an agent are in CLAUDE.md.

See also:

Installation

For the detailed installation and usage guide, visit the respective page of our documentation.

Quick Start

# Compile a Solidity file
solx Contract.sol --bin --abi

# Compile with optimizations
solx Contract.sol --bin --abi -O3

# Output to a directory
solx Contract.sol --bin --abi -o ./build

Architecture

For details on the compilation pipeline and components, see the architecture documentation.

Testing

For details on running unit tests, integration tests, and project tests, see the testing documentation.

Troubleshooting

If you are building solx from source and you have multiple LLVM builds in your system, ensure that you choose the correct one to build the compiler. The environment variable LLVM_SYS_211_PREFIX sets the path to the directory with LLVM build artifacts, which typically ends with target-llvm/target-final. For example:

export LLVM_SYS_211_PREFIX="${HOME}/src/solx/target-llvm/target-final"

If you suspect that the compiler is not using the correct LLVM build, check by running set | grep LLVM, and reset all LLVM-related environment variables.

For reference, see llvm-sys and Local LLVM Configuration Guide.

License

Additionally, this repository vendors tests and test projects that preserve their original licenses:

These projects are modified for the purposes of testing our compiler toolchain and are not used outside of this repository.

Visit the project directories to discover the terms of each license in detail. These and other projects are licensed in either per-file or per-project manner.

Credits

solx originated at Matter Labs, where its first pipeline and LLVM backend were built.

Contact Us

Email us at alex@nomic.foundation or join our Telegram group.

team-compiler

Contributors

hedgar2017

293 commits

renovate[bot]

112 commits

nebasuke

83 commits

dependabot[bot]

66 commits

Languages

Solidity

59.9%

Rust

30.9%

LLVM

6.5%

Yul

2.4%