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:
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:
For the detailed installation and usage guide, visit the respective page of our documentation.
# 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
For details on the compilation pipeline and components, see the architecture documentation.
For details on running unit tests, integration tests, and project tests, see the testing documentation.
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.
solx-llvm is licensed under the terms of Apache License, Version 2.0 with LLVM Exceptions, (LICENSE or https://llvm.org/LICENSE.txt)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.
solx originated at Matter Labs, where its first pipeline and LLVM backend were built.
Email us at alex@nomic.foundation or join our Telegram group.
Solidity
59.9%
Rust
30.9%
LLVM
6.5%
Yul
2.4%
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:
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:
For the detailed installation and usage guide, visit the respective page of our documentation.
# 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
For details on the compilation pipeline and components, see the architecture documentation.
For details on running unit tests, integration tests, and project tests, see the testing documentation.
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.
solx-llvm is licensed under the terms of Apache License, Version 2.0 with LLVM Exceptions, (LICENSE or https://llvm.org/LICENSE.txt)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.
solx originated at Matter Labs, where its first pipeline and LLVM backend were built.
Email us at alex@nomic.foundation or join our Telegram group.
Solidity
59.9%
Rust
30.9%
LLVM
6.5%
Yul
2.4%