• Stars
    star
    101
  • Rank 336,261 (Top 7 %)
  • Language
    Rust
  • License
    MIT License
  • Created over 2 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Yul language tools

crates.io docs.rs MIT License dependency status codecov CI

Parsing

The parser uses Logos for tokenization and Rowan for a parsing. The tokens (aka lexer) are defined in the token.rs and the syntax (aka grammar) is defined in syntax.rs.

The architecture is based on that of rust-analyzer. In fact, rowan is part of the rust-analyzer project. I recommend reading their write-up to understand rowan. Another great introduction is this tutorial by Luna Razzaghipour.

Specifically the architecture is for lossless parsing with good error recovery. This means that the original source file can always be perfectly reconstructed from the parse tree, even if it has errors. Comments, whitespace and parse errors are explicitly included in the parse tree.

Building and testing

Format, lint, build and test everything (I recommend creating a shell alias for this):

cargo fmt &&\
cargo clippy --all-features --all-targets &&\
cargo test --workspace --all-features --doc -- --nocapture &&\
cargo test --workspace --all-features --all-targets -- --nocapture &&\
cargo doc --workspace --all-features --no-deps

Run benchmarks with the provided .cargo/config.toml alias

cargo criterion

Check documentation coverage

RUSTDOCFLAGS="-Z unstable-options --show-coverage"  cargo doc --workspace --all-features --no-deps

To do

Goals:

  • Yul to EVM compiler
  • Yul optimizer
  • Yul language server

Maybe:

  • EVM to yul compiler
  • Yul LLVM compiler
  • Static analysis tools like SMT checker
  • Link in solc frontend for Solidity compatibility.

lines of code GitHub contributors GitHub issues GitHub pull requests GitHub Repo stars crates.io

More Repositories

1

uint

Rust Uint crate using const-generics
Rust
169
star
2

PostgrestSkeleton

Skeleton web stack using Docker Compose, PostgreSQL, PostgREST, Nginx and Auth0.
JavaScript
109
star
3

cria

Tiny inference-only implementation of LLaMA
Python
91
star
4

experiment-solexp

Fixed point solidity exponentiation.
Jupyter Notebook
74
star
5

goldilocks

A library for fast NTTs over the Goldilocks prime field
Rust
71
star
6

pc-bench

Benchmarking Polynomial Commitments
Jupyter Notebook
47
star
7

rust-service-template

Rust
22
star
8

cli-batteries

Batteries included command line interfaces.
Rust
21
star
9

evm-groth16

Groth16 verifier in EVM
Solidity
19
star
10

binius

Fork of binius
Rust
19
star
11

kzg-ceremony-coordinator

Moved to https://github.com/ethereum/kzg-ceremony-sequencer
Rust
17
star
12

XCompile

Specify compose key sequences in a simple language.
Python
9
star
13

zkp-u256

Rust 256-bit unsigned integers.
Rust
9
star
14

rust-static-build

Rust build image to create statically compiled binaries.
Dockerfile
8
star
15

proto-ecdsa-plonky2

Rust
8
star
16

mpc-iris-code

Rust
7
star
17

delegated-spartan

Mobile delegated R1CS proving using SpartanNIZK
Rust
6
star
18

proto-goldilocks-webgpu

Prototype WebGPU compute implementation of Goldilocks
Rust
5
star
19

dancing-cells

Rust
4
star
20

fhe-iris-code

Rust
4
star
21

Codecup-2014-Poly-Y

My entry for the 2014 Codecup Poly-Y competition. See http://www.codecup.nl/intro.php.
C++
3
star
22

EntropyCoder

Library for optimal compression using entropy/arithmetic/range coding.
C++
3
star
23

Codecup-2013-Symple

My entry for the 2013 Codecup competition. See http://archive.codecup.nl/2013/.
C++
2
star
24

shardtoken

Ethereum token contract for a post-state-rent, post-sharding world.
JavaScript
2
star
25

BitGovPrototype

BitGov prototype interface
CSS
1
star
26

remgo

Computer Go player using MCTS and HashLife inspired information sharing
C++
1
star
27

Codecup-2015-Ayu

C++
1
star
28

Principia

Futuristic programming, reasoning and proof language
C++
1
star
29

cotracker

Tool to fetch Aranet4 data
Rust
1
star
30

khinchin

Computes Khinchin's constant
Rust
1
star
31

extended-postgresql

Docker image of PostgreSQL with popular extensions
Makefile
1
star
32

pookie-bouncer

ESP32+TMC2209+NEMA17 motor controller for bouncing pookies.
C++
1
star