Skip to content

Commit

Permalink
add whir as a crate in ceno via git subtree (#841)
Browse files Browse the repository at this point in the history
re-open of #840 due to the base branch change
 
integrate whir as git subtree.

### why subtree
- This enable us to plug `whir` as a crate in ceno, thus it can share
most of libraries with ceno
- review everything just in one ceno PR
- retain approach sync back to upstream via command `git subtree push
--prefix=whir https://github.com/scroll-tech/whir <feature branch>`. The
timing to do that is decouple with our development in Ceno. We only need
that when going to sync back to upstream

With this PR, we can start to do refactor on whir, e.g. 
- migrate field to plonky3
- unify transcript
- share MLE + sumcheck from Ceno
- ...

---------

Co-authored-by: Yuncong Zhang <[email protected]>
  • Loading branch information
hero78119 and yczhangsjtu authored Feb 26, 2025
1 parent 59e74dc commit 6d764ca
Show file tree
Hide file tree
Showing 62 changed files with 13,272 additions and 2 deletions.
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ members = [
"poseidon",
"sumcheck",
"transcript",
"whir",
]
resolver = "2"

Expand Down
2 changes: 1 addition & 1 deletion mpcs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ rand_chacha.workspace = true
rayon = { workspace = true, optional = true }
serde.workspace = true
transcript = { path = "../transcript" }
whir = { git = "https://github.com/scroll-tech/whir", branch = "feat/ceno-binding-batch", features = ["ceno"] }
whir = { path = "../whir", features = ["ceno"] }
zeroize = "1.8"

[dev-dependencies]
Expand Down
24 changes: 24 additions & 0 deletions whir/.github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Rust

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

env:
CARGO_TERM_COLOR: always

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Switch toolchain
run: rustup update nightly && rustup default nightly
- name: Build
run: cargo build --release --verbose
- name: Run tests
run: cargo test --release --verbose
12 changes: 12 additions & 0 deletions whir/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/target
scripts/temp/
bench_utils/target
*_proof
artifacts
outputs/temp/
*.pdf
scripts/__pycache__/
.DS_Store
outputs/
.idea
.vscode
Loading

0 comments on commit 6d764ca

Please sign in to comment.