Skip to content

Commit bec150f

Browse files
committed
whirlaway: cp compiler crate
1 parent 52a0d00 commit bec150f

File tree

13 files changed

+4475
-0
lines changed

13 files changed

+4475
-0
lines changed

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ members = [
1818
"crates/lookup",
1919
"crates/xmss",
2020
"crates/vm",
21+
"crates/compiler",
2122
]
2223
resolver = "3"
2324

@@ -56,6 +57,7 @@ pcs = { path = "crates/pcs" }
5657
lookup = { path = "crates/lookup" }
5758
xmss = { path = "crates/xmss" }
5859
vm = { path = "crates/vm" }
60+
compiler = { path = "crates/compiler" }
5961

6062
rand = "0.9.2"
6163
sha3 = "0.10.8"

crates/compiler/Cargo.toml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
[package]
2+
name = "compiler"
3+
version.workspace = true
4+
edition.workspace = true
5+
rust-version.workspace = true
6+
license.workspace = true
7+
8+
[lints]
9+
workspace = true
10+
11+
[dependencies]
12+
pest.workspace = true
13+
pest_derive.workspace = true
14+
utils.workspace = true
15+
p3-field.workspace = true
16+
xmss.workspace = true
17+
rand.workspace = true
18+
p3-poseidon2.workspace = true
19+
p3-koala-bear.workspace = true
20+
p3-challenger.workspace = true
21+
p3-air.workspace = true
22+
p3-matrix.workspace = true
23+
p3-symmetric.workspace = true
24+
p3-util.workspace = true
25+
whir-p3.workspace = true
26+
rayon.workspace = true
27+
tracing.workspace = true
28+
air.workspace = true
29+
pcs.workspace = true
30+
p3-poseidon2-air.workspace = true
31+
lookup.workspace = true
32+
sumcheck.workspace = true
33+
vm.workspace = true
34+
35+
[dev-dependencies]
36+
hashsig.workspace = true

crates/compiler/TECHNICAL_NOTES.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
BYTECODE:
2+
3+
0: OPERAND_A
4+
1: OPERAND_B
5+
2: OPERAND_C
6+
3: FLAG_A
7+
4: FLAG_B
8+
5: FLAG_C
9+
6: ADD
10+
7: MUL
11+
8: DEREF
12+
9: JUZ
13+
10: AUX
14+
11: POSEIDON_16
15+
12: POSEIDON_24
16+
13: DOT_PRODUCT_EE
17+
14: DOT_PRODUCT_BE
18+
19+
EXECUTION TABLE:
20+
21+
0..10: Initial opcodes columns
22+
11: VALUE_A (virtual)
23+
12: VALUE_B (virtual)
24+
13: VALUE_C (virtual)
25+
14: PC
26+
15: FP
27+
16: ADDR_A
28+
17: ADDR_B
29+
18: ADDR_C

crates/compiler/TODO.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# TODO
2+
3+
- continue
4+
- return inside loops
5+
- avoid memory fragmentation (runner)
6+
- infinite loops: "for i in 0.. {}"

0 commit comments

Comments
 (0)