Skip to content
Open
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
208 changes: 69 additions & 139 deletions Cargo.lock

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

17 changes: 10 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@ members = [
"msm",
"mvpoly",
"o1vm",
"plonk-neon",
"plonk-napi",
"plonk-wasm",
"kimchi-napi",
"kimchi-wasm",
"poly-commitment",
"poseidon",
"poseidon/export_test_vectors",
Expand Down Expand Up @@ -62,8 +61,12 @@ libflate = "2"
log = "0.4.20"
num-bigint = { version = "0.4.4", features = ["rand", "serde"] }
num-integer = "0.1.45"
napi = { git = "https://github.com/o1-labs/napi-rs.git", rev = "023d1d4f31bd75e8ab55c95b5077a319b5208cdf", version = "3.3.0", default-features = false, features = ["napi7"] }
napi-derive = { git="https://github.com/o1-labs/napi-rs.git", rev = "023d1d4f31bd75e8ab55c95b5077a319b5208cdf", version = "3.3.0", features = ["type-def"] }
napi = { git = "https://github.com/o1-labs/napi-rs.git", rev = "023d1d4f31bd75e8ab55c95b5077a319b5208cdf", version = "3.3.0", default-features = false, features = [
"napi7",
] }
napi-derive = { git = "https://github.com/o1-labs/napi-rs.git", rev = "023d1d4f31bd75e8ab55c95b5077a319b5208cdf", version = "3.3.0", features = [
"type-def",
] }
napi-build = "2.1.0"
ocaml = { version = "0.22.2" }
ocaml-gen = { version = "1.0.0" }
Expand Down Expand Up @@ -111,7 +114,7 @@ mvpoly = { path = "./mvpoly", version = "0.1.0" }
o1-utils = { path = "./utils", version = "0.1.0" }
o1vm = { path = "./o1vm", version = "0.1.0" }
optimism = { path = "./optimism", version = "0.1.0" }
plonk_wasm = { path = "./plonk-wasm", version = "0.1.0" }
kimchi_wasm = { path = "./kimchi-wasm", version = "0.1.0" }
poly-commitment = { path = "./poly-commitment", version = "0.1.0" }
saffron = { path = "./saffron", version = "0.1.0" }
signer = { path = "./signer", version = "0.1.0" }
Expand All @@ -124,5 +127,5 @@ lto = true
panic = 'abort'
# codegen-units = 1

[profile.release.package.plonk_wasm]
[profile.release.package.kimchi_wasm]
debug = true
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ O1VM_MIPS_BIN_FILES = $(patsubst ${O1VM_MIPS_SOURCE_DIR}/%.asm,${O1VM_MIPS_BIN_D
# In addition to that, the version in the CI (see file
# .github/workflows/wasm.yml) should be changed accordingly.
NIGHTLY_RUST_VERSION = "nightly-2024-09-05"
PLONK_WASM_NODEJS_OUTDIR ?= target/nodejs
PLONK_WASM_WEB_OUTDIR ?= target/web
KIMCHI_WASM_NODEJS_OUTDIR ?= target/nodejs
KIMCHI_WASM_WEB_OUTDIR ?= target/web

# Default target
all: release
Expand Down Expand Up @@ -88,11 +88,11 @@ clean: ## Clean the project


build: ## Build the project
cargo build --all-targets --all-features --workspace --exclude plonk_wasm --exclude xtask
cargo build --all-targets --all-features --workspace --exclude kimchi_wasm --exclude xtask


release: ## Build the project in release mode
cargo build --release --all-targets --all-features --workspace --exclude plonk_wasm --exclude xtask
cargo build --release --all-targets --all-features --workspace --exclude kimchi_wasm --exclude xtask


test-doc: ## Test the project's docs comments
Expand Down Expand Up @@ -237,14 +237,14 @@ fclean: clean ## Clean the tooling artefacts in addition to running clean
build-nodejs: ## Compile the Kimchi library into WebAssembly to be used in NodeJS
cargo +nightly run --package xtask -- build-wasm \
--target nodejs \
--out-dir ${PLONK_WASM_NODEJS_OUTDIR} \
--out-dir ${KIMCHI_WASM_NODEJS_OUTDIR} \
--rust-version ${NIGHTLY_RUST_VERSION}

.PHONY: build-web
build-web: ## Compile the Kimchi library into WebAssembly to be used in the browser
cargo +nightly run --package xtask -- build-wasm \
--target web \
--out-dir ${PLONK_WASM_WEB_OUTDIR} \
--out-dir ${KIMCHI_WASM_WEB_OUTDIR} \
--rust-version ${NIGHTLY_RUST_VERSION}

.PHONY: all setup install-test-deps clean build release test-doc test-doc-with-coverage test test-with-coverage test-heavy test-heavy-with-coverage test-all test-all-with-coverage nextest nextest-with-coverage nextest-heavy nextest-heavy-with-coverage nextest-all nextest-all-with-coverage format lint generate-test-coverage-report generate-doc setup-riscv32-toolchain help fclean build-riscv32-programs build-mips-programs check-format
6 changes: 3 additions & 3 deletions plonk-napi/Cargo.toml → kimchi-napi/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "plonk-napi"
name = "kimchi-napi"
version = "0.1.0"
authors = ["[email protected]"]
description = "Node-API bindings for plonk proof systems"
Expand All @@ -8,7 +8,7 @@ license = "MIT/Apache-2.0"
edition = "2021"

[lib]
name = "plonk_napi"
name = "kimchi_napi"
crate-type = ["cdylib"] # to generate a dynamic library that is loadable by Node

[dependencies]
Expand All @@ -26,7 +26,7 @@ arkworks.workspace = true
mina-curves = { path = "../curves" }
mina-poseidon = { path = "../poseidon" }
o1-utils = { path = "../utils" }
plonk_wasm.workspace = true
kimchi_wasm.workspace = true
poly-commitment = { path = "../poly-commitment" }

base64.workspace = true
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@ pub fn get_native_calls() -> u64 {
NATIVE_CALLS.load(Ordering::Relaxed)
}

pub(crate) fn report_native_call() {
pub(crate) fn _report_native_call() {
NATIVE_CALLS.fetch_add(1, Ordering::Relaxed);
}
File renamed without changes.
File renamed without changes.
5 changes: 2 additions & 3 deletions plonk-napi/src/lib.rs → kimchi-napi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,8 @@ pub use proof::{
};
pub use srs::{
caml_fp_srs_from_bytes, caml_fp_srs_from_bytes_external, caml_fp_srs_to_bytes,
caml_fp_srs_to_bytes_external, caml_fq_srs_from_bytes, caml_fq_srs_from_bytes_external,
caml_fq_srs_to_bytes, caml_fq_srs_to_bytes_external, fp::NapiFpSrs as WasmFpSrs,
fq::NapiFqSrs as WasmFqSrs, *,
caml_fq_srs_from_bytes, caml_fq_srs_from_bytes_external, caml_fq_srs_to_bytes,
fp::NapiFpSrs as WasmFpSrs, fq::NapiFqSrs as WasmFqSrs, *,
};
pub use tables::{JsLookupTableFp, JsLookupTableFq, JsRuntimeTableCfgFp, JsRuntimeTableCfgFq};
pub use vector::{
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading
Loading