⚠️ solx is in pre-alpha state and not suitable for production use yet.
solx Cube

{ solx }

A gas-efficient Solidity compiler for Ethereum

Powered by LLVM, the most mature compiler infrastructure in the world.

Brought to the Ethereum community by the ZKsync team.

Terminal
$

Features

Gas Optimization

Advanced bytecode optimization techniques reduce gas costs compared to solc generated bytecode, with the same exact functionality.

Drop-in Ready

Compatible with existing solc flags and configurations. Works with Foundry, Hardhat, and other development tools out of the box.

LLVM Framework

Built on LLVM's world-class compiler infrastructure, enabling robust optimizations and reliable code generation.

Use solx with your favorite tools

1

Download the solx binary

Get the latest version of solx from the GitHub releases page.

2

Create a solx profile in your foundry.toml

foundry.toml
[profile.solx]
solc_version = "/path/to/solx"
3

Build your project with solx

Use the solx profile to compile your project with enhanced optimizations.

Terminal
$FOUNDRY_PROFILE=solx forge build

💡 Pro tip: You can also use the solx profile for testing and getting gas reports.

Get involved

Help us build the future of Solidity compilation

Learn

Take some time to explore our documentation to help you better understand how solx works.

READ THE DOCS

Try

The solx team has compiled demos and examples to help you get started with the compiler quickly.

TRY THE DEMO

Contribute

solx is truly a community effort, and we welcome contribution from hobbyists and production users alike!

CONTRIBUTION GUIDE

solx vs solc

Want to see how solx performs compared to solc? Check out our demo project to benchmark and test.

Gas Consumption Across Different Contracts

Gas Usage (%)
ERC20.balanceOf
-10%
ERC1155.batchData
-18%
ERC721.isApprovedForAll
-40%
Quick Sort
-58%
solc
solx

* Based on gas reports produced by Foundry and solx dedicated test suite.