Announcing slang-solx: a Solidity compiler that's up to 5× faster

Announcing slang-solx: a Solidity compiler that's up to 5× faster

Ethereum development needs to be faster. Today we're releasing hardhat-slang-solx, a Hardhat plugin that swaps in Nomic Foundation’s new Solidity compiler backend: slang-solx. Across our benchmark suite it compiles roughly 1.7x faster than solc in legacy mode and roughly 5x faster than solc in via-IR mode — and it doesn't result in "stack too deep" errors in 99.85% of test cases.

Install the hardhat-slang-solx plugin to get this performance boost:

npm add --save-dev @nomicfoundation/hardhat-slang-solx

Enable it in your config:

 import { defineConfig } from "hardhat/config";
+import hardhatSlangSolx from "@nomicfoundation/hardhat-slang-solx";

 export default defineConfig({
   plugins: [
     // ...other plugins...
+    hardhatSlangSolx,
   ],
   // ...other config fields...
 });

And check out the documentation for other details involved.

slang-solx was originally developed for several years at Matter Labs under the name “solx.” In 2025, the project and its compiler team moved to Nomic Foundation, where it was renamed slang-solx and continued evolving into its current form. This release is the first end-user compiler shipped by Nomic Foundation and introduces a new LLVM-based backend that enables parallel multithreaded compilation, significantly reducing build times compared to solc.

For a large number of real-world Solidity projects, especially those that compile using —-via-ir, this compiler plugin makes development using Hardhat meaningfully faster than foundry.

While this release still uses solc as its frontend, the next step is to replace that remaining dependency with slang-frontend, our Solidity compiler frontend, which has been in production across the ecosystem since 2024 and is itself being extended with multithreading support, which will deliver further performance improvements. By combining slang-frontend with slang-solx, we are now very close to delivering a new end-to-end Solidity compiler that is fully independent of solc.

Learn more about our compiler engineering journey later on in this post!

What the numbers mean

To measure performance we tracked wall-clock time across five runs of the cold compile of complete repositories.

slang-solx vs solc —via-ir compilation

Building all nine repos one after another takes solc 749s in total, and it takes slang-solx 151s. A 5x overall improvement.

Measurements table
Repo Hardhat solc Hardhat slang-solx Improvement vs Hardhat solc forge solc Improvement vs forge solc
graph-horizon 285s 27s 10.6x 274.8 10.3x
Solady 152s 25s 6.2x 140.0 5.7x
Uniswap v4 77s 13s 6.0x 71.5 5.5x
openzeppelin-contracts (entire repo) 150s 29s 5.1x incompatible incompatible
openzeppelin-contracts (forge-compatible subset) 49s 13s 3.8x 42.5 3.3x
lido-vaults 17s 5s 3.5x 14.0 3.0x
Aave v4 14s 4s 3.2x 9.1 2.1x
1inch-aqua 9s 4s 2.1x 6.7 1.6x
ens-verifiable-factory 6s 3.8s 1.6x 3.6 parity
lido-core 40s 40s parity 38.0 0.9x

slang-solx vs solc in legacy mode (without —via-ir) compilation

Building all seven repos takes solc 174s in total and slang-solx 104s. A 1.7x overall improvement.

Measurements table
Repo Hardhat solc Hardhat slang-solx Improvement vs Hardhat solc forge solc Improvement vs forge solc
openzeppelin-contracts (entire repo) 59s 28s 2.1x - -
openzeppelin-contracts (forge-compatible subset) 20s 12s 1.6x 13.8 1.1x
graph-horizon 47s 27s 1.7x 35.3 1.3x
Uniswap v4 20s 13s 1.5x 13.7 parity
Solady 36s 24s 1.5x 24.1 parity
Aave v4 4.7s 3.4s 1.4x 3.0 0.9x
1inch-aqua 4s 4s parity 1.9 0.4x
ens-verifiable-factory 3.6s 3.6s parity 1.3s 0.4x

slang-solx vs solc —via-ir including Solidity tests

Wall-clock time of cold compile plus running the Solidity tests, end-to-end.

Currently, when working with Solidity tests, modifying a single file generally triggers a meaningful re-compilation, which makes a cold compile a good proxy for comparing compiler impact on Solidity tests UX.

Measurements table
Repo (—via-ir) Hardhat solc Hardhat slang-solx Improvement vs Hardhat solc forge solc Improvement vs forge solc
graph-horizon 289.7s 30.9s 9.4x 291.3s 9.4x
Uniswap v4 83.6s 18.8s 4.5x 73.7s 3.9x
Solady 154s 26s 5.8x 140.9 5.3x
openzeppelin-contracts (entire repo) 185s 62s 3.0x - -
openzeppelin-contracts (forge-compatible subset) 84s 45s 1.9x 51.4 1.1x
Aave v4 tests do not compile 121s - tests do not compile -
1inch-aqua 9.8s 4.7s 2.1x 6.8s 1.4x
ens 6.6s 4.4s 1.5x 3.8 0.9x
lido-core 149x 108s 1.4x 156.4 1.4x

slang-solx vs solc in legacy mode (without —via-ir) including Solidity tests

Measurements table
Repo (legacy) Hardhat solc Hardhat slang-solx Improvement vs Hardhat solc forge solc Improvement vs forge solc
graph-horizon 51.8s 31.1s 1.7x 52.5s 1.7x
openzeppelin-contracts (entire repo) 97s 61s 1.6x - -
openzeppelin-contracts (forge-compatiblesubset) 57s 45s 1.3x 23.8 0.5x
Aave v4 267s 121s 2.2x 246.5 2.0x
Uniswap v4 26.4s 18.7s 1.4x 15.8 0.8x
Solady 37.7s 26s 1.5x 25.1s parity
1inch-aqua 5.0s 4.9s parity 2.1 0.4x
ens 4.2s 4.3s parity 1.4s 0.3x

Some observations

  • With very small codebases there isn't enough Solidity to compile for backend differences to make a noticeable difference, although it’s still faster. The slang-solx performance boost grows with project size, and it grows sharply when solc is in via-IR mode, which is where its optimizer slows down the compilation the most.
  • lido-core is at parity because this first release only supports Solidity 0.8.34, and nearly all of lido-core's compile time goes to older versions, which fall back to solc. Mixed-version projects will see the speedup only on the files slang-solx actually handles.

What we mean by "ready"

slang-solx is stable and can be used as part of your everyday development. It's tested against real projects, it's supported, and we'll respond to bugs.

In addition to the selected repositories mentioned before, we also tested against 112,587 contracts on Sourcify containing all 0.8.34 files with EVM target >= cancun, and 99.56% of them compile without issues.

But it is not safe for mainnet deployments. Before it compiles code that secures real value it needs a deep hardening effort that we haven’t started yet. For now, the benefits are in developer experience.

What shipped in hardhat-slang-solx

  • The slang-solx backend with the legacy solc frontend. The slang-frontend is not in this path yet.
  • Solidity 0.8.34 only, in this first release. Pragma statements on an older version with a caret also work. Other versions will need to fall back to solc, so a project pinning the Solidity version explicitly or spanning several pinned versions will see part of the benefit or none of it. Expect version coverage to meaningfully increase as we release the full compiler, slang.

New names shipping with this release

Since we’re in the process of merging a frontend and a backend that are useful independently into a single new compiler, we’re also unifying the naming and moving forward these will be the new names:

Component Name Was
The complete compiler (pending future release) slang
Frontend library for processing Solidity code slang-frontend slang
Backend slang-solx solx
Hardhat plugin (uses the legacy solc frontend in this first release) hardhat-slang-solx

That's the release and you should check it out. What follows next is a recap of how we got here, how serious and committed this effort has been, and where Nomic’s compiler journey is going.

How we got here: 2020 to 2026

In January 2022, shortly after starting Nomic Foundation as an Ethereum-dedicated nonprofit, we made our first compiler hires and kicked off Slang. That same month, Matter Labs released zksolc — a solc fork with an LLVM backend. Four years later these efforts joined under the Nomic home. Here's the journey that got us here.

The Nomic vision: why a new compiler (2020–2021)

In 2020, as we pushed ahead in our efforts to improve Ethereum developer experience, we identified the compiler layer as the ecosystem's biggest tooling bottleneck: the existing compiler had been designed only for producing bytecode. We proposed a different model to meaningfully uplevel developer experience through organic tooling ecosystem growth: a reusable compiler as a platform for tool development, with very intentional compiler↔tooling integration. We started Nomic Foundation and closed our donations round in 2022 to build out the vision of a cohesive and vertically integrated development stack, all built under a single roof.

Slang: research to alpha (2022–2023)

Slang kicked off in January 2022 with two compiler lead engineers, one from Microsoft's Roslyn team (.Net compiler). The first two years were research-heavy: understanding what a reusable compiler architecture looks like, what the ecosystem needed and was lacking the most, what the APIs should be, and converging on a Solidity frontend built for tooling, since analyizing Solidity code was really underserved as a need at the time**.** We knew this first-hand from building Hardhat.

The compiler needs for developer tools are very different than for a compiler meant production builds. Code is half written and requires recovery from errors, parsing incrementally, parsing whitespace and comments for code formatting, etc. Code that is being written is very different from code that is ready.

We shipped a public alpha with error recovery at the end of 2023, first used in limited paths of our own Solidity VSCode extension.

Shipping and adoption (2024)

2024 was a deliberate shift from research to shipping. We completed the frontend — semantic analysis, queries, binding analysis, import resolution, Solidity builtins, editor APIs, WASM — and then went looking for users, on the view that adoption is the only real hardening process.

By September 2024 Slang was rolled out for two use cases in our own VSCode extension. Outside Nomic it was picked up by OpenZeppelin Upgrades for NatSpec analysis, by prettier-solidity for its v2 rewrite, and by smaller tools including lintspec, sspec, and sclass.

That adoption did exactly what we hoped: it surfaced bugs, filled gaps, and made it unambiguous that our performance was not good enough.

Slang v1, and the performance pivot (2025)

Slang v1 landed in March 2025 as the first production-ready Solidity code analysis product — correctness, error recovery, omni-version support, 4x faster than the JavaScript parser it replaced, five ecosystem tools depending on it, ~45k weekly npm downloads.

We shipped it knowing the performance story was still unaddressed. We were parsing 4x faster than the jsparser that the ecosystem was relying on at the time, but this is not the bar for a compiler. So from April 2025 performance became the team's primary objective: low-hanging fruit first, then ground-up redesigns of the lexer, parser, and binding analysis. The redesigns are 60–100x faster than v1, and they're the key deliverables of the forthcoming slang-frontend v2 — along with a Rust-only AST built for parallelism and for lowering into a backend.

In parallel we ran a quality campaign at ecosystem scale: 100% parsing and over 99.9% binding accuracy across Sourcify — 2.7 million contracts, 15 million files.

And in September 2025, Remix adopted Slang through prettier, after we shipped WASM-based browser support to make it possible.

Finding solx at Matter Labs (2025–2026)

By mid-2025 the frontend was complete enough, and the backend was next. Building a backend from scratch is years of work — IR design, optimization passes, EVM codegen, and the correctness infrastructure.

So in May 2025 we went looking for an existing backend instead, and found solx. Its history at Matter Labs ran in parallel to ours: zksolc started in 2021 and shipped in January 2022, an EVM-targeting LLVM backend explored and built from 2023 through 2025, solx 0.1 released as an alpha in July 2025 that resolved stack-too-deep errors, optimized gas cost and enabled significantly faster compilation times with LLVM. What it didn't have was a distribution vehicle, which we had in Hardhat.

By that time, Matter Labs was looking for a new home for its compiler project. We began taking over solx development in late 2025, restructured the compiler group in January 2026 around slang, solx, and LLVM as connected squads, and finalized the takeover in July 2026, with the remaining Matter Labs engineers joining Nomic.

This release is largely the product of their years of work, plus Nomic's integration and performance work after they joined.

What's next for Slang

The goal is a complete compiler that’s fully independent from solc that people can use both to build high quality dev tools with, and to write Solidity code and build production artifacts to deploy to mainnet.

We’re not far. This means Ethereum is about to have a state-of-the-art, LLVM-backed Solidity compiler, built by a team of engineers who previously worked on compilers or low level infrastructure at Facebook, Microsoft, Intel, AMD, Huawei, and Google.

The remaining work to reach the end-to-end compiler independent from solc:

  • We’re currently adding diagnostics (code validation) as the last component for which we still rely on solc.
  • Internally, we already have the new slang compiler that produces bytecode and debug symbols with zero dependencies on solc, and we are working on productizing it (integrating the CLI, the in-progress code validation, running correctness and performance tests). We are targeting an initial release by the end of this year.

To be transparent, once the initial scope is complete, hardening for mainnet safety will still take meaningful time.

What's next for Ethereum tooling

We're close to the v1 of the vision we pitched in 2021: a reusable runtime, a reusable compiler, and an end-user tooling stack on top of both.

What's still missing is productizing the reusability — making these components something the ecosystem can build on directly, not just something Nomic builds on. We deferred that scope because developer infrastructure is very expensive to build and our resources are finite. It's still the goal, and the architecture is in place. Hardhat’s Rust runtime (EDR) is architected as a library that you could actually use today for Ethereum simulation (if you don't mind diving into the repo), but ultimately we want it to become a polished product offering that's easy to use.

Meanwhile Hardhat 3 stable has shipped with native Solidity tests support, and has been moving toward agentic coding.

It took a long time, as reusable, long-term infrastructure tends to take. But Ethereum now has high-quality, state-of-the-art developer infrastructure with non-profit incentives driving it.

It's all in Hardhat 3. Check it out.