Skip to content

Commit 70d6515

Browse files
committed
v0.3.1-alpha.0
1 parent 33d572b commit 70d6515

File tree

14 files changed

+42
-36
lines changed

14 files changed

+42
-36
lines changed

Cargo.lock

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cli/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "mopro-cli"
3-
version = "0.3.0"
3+
version = "0.3.1-alpha.0"
44
edition = "2021"
55
description = "A CLI tool for creating a mobile native app with Mopro FFI"
66
license = "MIT OR Apache-2.0"
@@ -14,7 +14,7 @@ name = "mopro"
1414
path = "src/main.rs"
1515

1616
[dependencies]
17-
mopro-ffi = { version = "0.3.0", features = [
17+
mopro-ffi = { version = "0.3.1-alpha.0", features = [
1818
"build",
1919
], default-features = false }
2020

cli/src/bindgen.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,8 @@ pub fn bindgen(
164164
let cargo_toml_str = cargo_toml_path.to_str().unwrap();
165165
replace_string_in_file(
166166
cargo_toml_str,
167-
"mopro-ffi = { git = \"https://github.com/zkmopro/mopro.git\", features = [\"uniffi\"] }",
168-
"mopro-ffi = { git = \"https://github.com/zkmopro/mopro.git\", features = [\"uniffi\", \"witnesscalc\"] }",
167+
"mopro-ffi = { version = \"0.3.1-alpha.0\", features = [\"uniffi\"] }",
168+
"mopro-ffi = { version = \"0.3.1-alpha.0\", features = [\"uniffi\", \"witnesscalc\"] }",
169169
)?;
170170
replace_string_in_file(cargo_toml_str, "rust-witness = \"0.1\"\n", "")?;
171171
replace_string_in_file(

cli/src/build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ mopro-wasm = { git = \"https://github.com/zkmopro/mopro.git\", features = [
231231
\"gemini\",
232232
\"hyperplonk\",
233233
\"plonk\",
234-
] }
234+
], branch = \"v0.2.x\" }
235235
236236
[target.wasm32-unknown-unknown.dependencies]
237237
console_error_panic_hook = \"0.1.7\"

cli/src/create/flutter.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,14 @@ impl Create for Flutter {
3131
)));
3232
}
3333

34+
let version = "0.2.0";
3435
download_and_extract_template(
35-
"https://github.com/zkmopro/flutter-app/archive/refs/heads/main.zip",
36+
&format!("https://github.com/zkmopro/flutter-app/archive/refs/tags/v{version}.zip"),
3637
&project_dir,
3738
Self::NAME,
3839
)?;
3940

40-
let flutter_dir = project_dir.join("flutter-app-main");
41+
let flutter_dir = project_dir.join(format!("flutter-app-{version}"));
4142
fs::rename(flutter_dir, &target_dir)?;
4243

4344
let mopro_flutter_plugin_dir = target_dir.join("mopro_flutter_plugin");

cli/src/create/react_native.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,16 @@ impl Create for ReactNative {
2626
target_dir.display()
2727
)));
2828
}
29+
let version = "0.2.0";
2930
download_and_extract_template(
30-
"https://codeload.github.com/zkmopro/react-native-app/zip/refs/heads/main",
31+
&format!(
32+
"https://codeload.github.com/zkmopro/react-native-app/zip/refs/tags/v{version}"
33+
),
3134
&project_dir,
3235
Self::NAME,
3336
)?;
3437

35-
let react_native_dir = project_dir.join("react-native-app-main");
38+
let react_native_dir = project_dir.join(format!("react-native-app-{version}"));
3639
fs::rename(react_native_dir, &target_dir)?;
3740

3841
let mopro_module_dir = target_dir.join("modules/mopro");

cli/src/create/write_toml.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ mopro-wasm = { git = "https://github.com/zkmopro/mopro",features = [
1313
"gemini",
1414
"hyperplonk",
1515
"plonk",
16-
]}
16+
], branch = "v0.2.x"}
1717
1818
[target.wasm32-unknown-unknown.dependencies]
1919
console_error_panic_hook = "0.1.7"

cli/src/init/circom.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ impl ProvingSystem for Circom {
1111
const ADAPTER: Adapter = Adapter::Circom;
1212

1313
const DEPENDENCIES: &'static str = r#"
14-
circom-prover = { git = "https://github.com/zkmopro/mopro.git" }
14+
circom-prover = "0.1"
1515
rust-witness = "0.1"
1616
num-bigint = "0.4.0"
1717
"#;

cli/src/init/write_toml.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ crate-type = ["lib", "cdylib", "staticlib"]
1313
default = []
1414
1515
[dependencies]
16-
mopro-wasm = { git = "https://github.com/zkmopro/mopro.git" }
17-
mopro-ffi = { git = "https://github.com/zkmopro/mopro.git", features = ["uniffi"] }
16+
mopro-wasm = { git = "https://github.com/zkmopro/mopro.git", branch = "v0.2.x" }
17+
mopro-ffi = { version = "0.3.1-alpha.0", features = ["uniffi"] }
1818
thiserror = "2.0.12"
1919
anyhow = "1.0.99"
2020
@@ -28,7 +28,7 @@ anyhow = "1.0.99"
2828
# NOIR_BUILD_DEPENDENCIES
2929
3030
[dev-dependencies]
31-
mopro-ffi = { git = "https://github.com/zkmopro/mopro.git", features = ["uniffi-tests"] }
31+
mopro-ffi = { version = "0.3.1-alpha.0", features = ["uniffi-tests"] }
3232
3333
# CIRCOM_DEV_DEPENDENCIES
3434
# HALO2_DEV_DEPENDENCIES

cli/src/template/init/src/error.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// This should be declared into this macro due to Uniffi's limitation
2+
// Please refer this issue: https://github.com/mozilla/uniffi-rs/issues/2257
3+
#[derive(Debug, thiserror::Error, uniffi::Error)]
4+
pub enum MoproError {
5+
#[error("CircomError: {0}")]
6+
CircomError(String),
7+
#[error("Halo2Error: {0}")]
8+
Halo2Error(String),
9+
#[error("NoirError: {0}")]
10+
NoirError(String),
11+
}

0 commit comments

Comments
 (0)