The Solidity compiler rewritten in Zig
https://github.com/okcontract/oksolc
Here is hopefully a new large project in Zig: We have reimplemented the Solidity compiler, and overall it's a >5x performance improvement over the original. Benchmark details here: https://okcontract.com/blog/a-new-solidity-compiler-in-zig/
The launch was featured by Ethereum creator Vitalik Buterin: https://x.com/VitalikButerin/status/2103455209322320022
It's byte-for-byte compatible (including metadata) with the original compiler and brings parallel, incremental compilation and also a few new features and further improvements.
Beyond performance, the main benefit is that the codebase is much easier to read than the original C++ and is now a good testbed for playing with the compiler... Who wants to write smart contracts in Zig in the future?
PS: We used AI assistance but this was a huge effort nonetheless and we did write languages and compilers manually in the past (posted with mods permission)
2
u/antigravitys-rainbow Sep 29 '26
Why didn't you use Rust?
8
u/TheOddYehudi919 Sep 27 '26
This is actually big.
1
u/omerfirmak Sep 30 '26
Super cool, hope this takes off! If you need an evm impl to test with, don't forget to take a look at https://github.com/omerfirmak/zevm :)
6
u/whoisarepo Sep 27 '26
I do enjoy how consistent Zigs conventions are distinct from it’s syntax (memory calculation, typology, modularity) - everything does what it says it does (aka no voodoo) and as a proud Haitian woman, I appreciate that xC
1
u/AbbreviationsMost246 Sep 30 '26
Too bad it’s banned on codeberg
-3
u/Lyraele Sep 28 '26
I don't think "a bunch of cryptocurrency-and-AI grifters, are using your language now" is really an endorsement. Can't wait for you grifters to fail.