Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial Halo2 Plugin #53

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## [Unreleased]
### Added
- [\#53](https://github.com/openzklib/openzl/pull/53) Add Initial Halo2 Plugin
- [\#37](https://github.com/openzklib/openzl/pull/37) Add BitDecomposition in eclair
- [\#47](https://github.com/openzklib/openzl/pull/47) Migrate docs to main OpenZL repo
- [\#36](https://github.com/openzklib/openzl/pull/36) Finish OpenZL migration feature requirements
- [\#34](https://github.com/openzklib/openzl/pull/34) Migrate Poseidon from the Manta-Network codebase
- [\#4](https://github.com/openzklib/openzl/pull/4) Add CI and Relevant Contribution Files
- [\#3](https://github.com/openzklib/openzl/pull/3) Migrate some of OpenZL from the Manta-Network codebase
- [\#4](https://github.com/openzklib/openzl/pull/4) Add CI and Relevant Contribution Files
- [\#34](https://github.com/openzklib/openzl/pull/34) Migrate Poseidon from the Manta-Network codebase

### Changed

Expand Down
37 changes: 37 additions & 0 deletions plugins/halo2/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
[package]
name = "openzl-plugin-halo2"
version = "0.0.0"
edition = "2021"
readme = "README.md"
license = "MIT OR Apache-2.0"
repository = "https://github.com/openzklib/openzl"
homepage = "https://openzl.org"
documentation = "https://docs.rs/openzl-plugin-halo2"
categories = [""]
keywords = [""]
description = "Open ZL Halo2 Plugin"

[package.metadata.docs.rs]
# To build locally:
# RUSTDOCFLAGS="--cfg doc_cfg" cargo +nightly doc --all-features --open
all-features = true
rustdoc-args = ["--cfg", "doc_cfg"]

[badges]
is-it-maintained-issue-resolution = { repository = "openzklib/openzl" }
is-it-maintained-open-issues = { repository = "openzklib/openzl" }
maintenance = { status = "actively-developed" }

[features]
# Standard Library
std = [
"openzl-crypto/std",
"openzl-util/std",
]

[dependencies]
eclair = { path = "../../eclair", default-features = false }
halo2_gadgets = { git = "https://github.com/openzklib/halo2", default-features = false }
halo2_proofs = { git = "https://github.com/openzklib/halo2", default-features = false }
openzl-crypto = { path = "../../openzl-crypto", default-features = false }
openzl-util = { path = "../../openzl-util", default-features = false }
1 change: 1 addition & 0 deletions plugins/halo2/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

22 changes: 22 additions & 0 deletions plugins/halo2/src/compiler.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
//! Compiler

use crate::proofs::{arithmetic::Field, plonk::ConstraintSystem};

/// Compiler
pub struct Compiler<F>
where
F: Field,
{
/// Constraint System
cs: ConstraintSystem<F>,
}

/*

///
pub struct FieldVar<F>;

///
pub struct Bool;

*/
16 changes: 16 additions & 0 deletions plugins/halo2/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
//! Halo2 OpenZL Plugin

#![cfg_attr(not(any(feature = "std", test)), no_std)]
#![cfg_attr(doc_cfg, feature(doc_cfg))]
#![forbid(rustdoc::broken_intra_doc_links)]
#![forbid(missing_docs)]

extern crate alloc;

#[doc(inline)]
pub use halo2_gadgets as gadgets;

#[doc(inline)]
pub use halo2_proofs as proofs;

pub mod compiler;