From cd44326941f1c53a9965c43c18391e9baf27f50f Mon Sep 17 00:00:00 2001 From: schaeff Date: Tue, 17 Sep 2019 18:12:15 +0200 Subject: [PATCH 01/11] add abi module with json parsing, reducing and type checking --- t.code | 16 -- u.code | 4 - zokrates_core/src/abi/mod.rs | 298 +++++++++++++++++++++++++++++++++++ zokrates_core/src/lib.rs | 1 + 4 files changed, 299 insertions(+), 20 deletions(-) delete mode 100644 t.code delete mode 100644 u.code create mode 100644 zokrates_core/src/abi/mod.rs diff --git a/t.code b/t.code deleted file mode 100644 index a38f522b..00000000 --- a/t.code +++ /dev/null @@ -1,16 +0,0 @@ -from "./u.code" import Fooo - -struct Bar { - a: field, - a: field, - c: field, -} - -struct Baz { - a: Bar -} - -def main(Bar a, Bar b, bool c) -> (Bar): - Bar bar = Bar { a: 1, b: 1, c: 1 } - return if false then a else bar fi - diff --git a/u.code b/u.code deleted file mode 100644 index f420f0f2..00000000 --- a/u.code +++ /dev/null @@ -1,4 +0,0 @@ -struct Foo { - a: field, - b: field[2], -} \ No newline at end of file diff --git a/zokrates_core/src/abi/mod.rs b/zokrates_core/src/abi/mod.rs new file mode 100644 index 00000000..2b608af5 --- /dev/null +++ b/zokrates_core/src/abi/mod.rs @@ -0,0 +1,298 @@ +use std::collections::BTreeMap; +use std::convert::TryFrom; +use std::fmt; +use typed_absy::types::Type; + +use zokrates_field::field::Field; + +type Map = BTreeMap; + +#[derive(Debug, PartialEq)] +enum Error { + Json(String), + Conversion(String), + Type(String), +} + +#[derive(PartialEq, Debug)] +enum Value { + Field(T), + Boolean(bool), + Array(Vec>), + Struct(Map>), +} + +impl fmt::Display for Value { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + match self { + Value::Field(v) => write!(f, "{}", v), + Value::Boolean(v) => write!(f, "{}", v), + Value::Array(v) => write!( + f, + "[{}]", + v.iter() + .map(|v| format!("{}", v)) + .collect::>() + .join(", ") + ), + Value::Struct(v) => write!( + f, + "{{{}}}", + v.iter() + .map(|(k, v)| format!("{}: {}", k, v)) + .collect::>() + .join(", ") + ), + } + } +} + +impl Value { + fn check(&self, ty: &Type) -> Result<(), String> { + match (&self, ty) { + (Value::Field(_), Type::FieldElement) => Ok(()), + (Value::Boolean(_), Type::Boolean) => Ok(()), + (Value::Array(v), Type::Array(inner_ty, size)) => { + if v.len() != *size { + Err(format!( + "Expected array of size {}, found array of size {}", + size, + v.len() + )) + } else { + v.iter() + .map(|val| val.check(inner_ty)) + .collect::, _>>()?; + Ok(()) + } + } + (Value::Struct(v), Type::Struct(members)) => { + if v.len() != members.len() { + Err(format!( + "Expected {} member(s), found {}", + members.len(), + v.len() + )) + } else { + members + .iter() + .map(|(id, ty)| { + v.get(id) + .ok_or_else(|| format!("Member with id `{}` not found", id)) + .map(|v| v.check(&ty)) + }) + .collect::, _>>()? + .into_iter() + .collect::>()?; + Ok(()) + } + } + (v, t) => Err(format!("Value `{}` doesn't match expected type `{}", v, t)), + } + } +} + +#[derive(PartialEq, Debug)] +struct Values(Vec>); + +impl TryFrom for Values { + type Error = String; + + fn try_from(v: serde_json::Value) -> Result, Self::Error> { + match v { + serde_json::Value::Array(a) => a + .into_iter() + .map(|v| Value::try_from(v)) + .collect::>() + .map(|v| Values(v)), + v => Err(format!("Expected an array of values, found `{}`", v)), + } + } +} + +impl TryFrom for Value { + type Error = String; + fn try_from(v: serde_json::Value) -> Result, Self::Error> { + match v { + serde_json::Value::String(s) => T::try_from_dec_str(&s) + .map(|v| Value::Field(v)) + .map_err(|_| format!("Could not parse `{}` as field element", s)), + serde_json::Value::Bool(b) => Ok(Value::Boolean(b)), + serde_json::Value::Number(n) => Err(format!( + "Value `{}` isn't allowed, did you mean `\"{}\"`?", + n, n + )), + serde_json::Value::Array(a) => a + .into_iter() + .map(|v| Value::try_from(v)) + .collect::>() + .map(|v| Value::Array(v)), + serde_json::Value::Object(o) => o + .into_iter() + .map(|(k, v)| Value::try_from(v).map(|v| (k, v))) + .collect::, _>>() + .map(|v| Value::Struct(v)), + v => Err(format!("Value `{}` isn't allowed", v)), + } + } +} + +fn parse(s: &str) -> Result, Error> { + let json_values: serde_json::Value = + serde_json::from_str(s).map_err(|e| Error::Json(e.to_string()))?; + Values::try_from(json_values).map_err(|e| Error::Conversion(e)) +} + +fn parse_strict(s: &str, types: &Vec) -> Result, Error> { + let parsed = parse(s)?; + parsed + .0 + .iter() + .zip(types.iter()) + .map(|(v, ty)| v.check(ty)) + .collect::>() + .map_err(|e| Error::Type(e))?; + Ok(parsed) +} + +#[cfg(test)] +mod tests { + use super::*; + use zokrates_field::field::FieldPrime; + + #[test] + fn numbers() { + let s = "[1, 2]"; + assert_eq!( + parse::(s).unwrap_err(), + Error::Conversion(String::from( + "Value `1` isn't allowed, did you mean `\"1\"`?" + )) + ); + } + + #[test] + fn fields() { + let s = r#"["1", "2"]"#; + assert_eq!( + parse::(s).unwrap(), + Values(vec![Value::Field(1.into()), Value::Field(2.into())]) + ); + } + + #[test] + fn bools() { + let s = "[true, false]"; + assert_eq!( + parse::(s).unwrap(), + Values(vec![Value::Boolean(true), Value::Boolean(false)]) + ); + } + + #[test] + fn array() { + let s = "[[true, false]]"; + assert_eq!( + parse::(s).unwrap(), + Values(vec![Value::Array(vec![ + Value::Boolean(true), + Value::Boolean(false) + ])]) + ); + } + + #[test] + fn struc() { + let s = r#"[{"a": "42"}]"#; + assert_eq!( + parse::(s).unwrap(), + Values(vec![Value::Struct( + vec![("a".to_string(), Value::Field(42.into()))] + .into_iter() + .collect() + )]) + ); + } + + mod strict { + use super::*; + + #[test] + fn fields() { + let s = r#"["1", "2"]"#; + assert_eq!( + parse_strict::(s, &vec![Type::FieldElement, Type::FieldElement]) + .unwrap(), + Values(vec![Value::Field(1.into()), Value::Field(2.into())]) + ); + } + + #[test] + fn bools() { + let s = "[true, false]"; + assert_eq!( + parse_strict::(s, &vec![Type::Boolean, Type::Boolean]).unwrap(), + Values(vec![Value::Boolean(true), Value::Boolean(false)]) + ); + } + + #[test] + fn array() { + let s = "[[true, false]]"; + assert_eq!( + parse_strict::(s, &vec![Type::array(Type::Boolean, 2)]).unwrap(), + Values(vec![Value::Array(vec![ + Value::Boolean(true), + Value::Boolean(false) + ])]) + ); + } + + #[test] + fn struc() { + let s = r#"[{"a": "42"}]"#; + assert_eq!( + parse_strict::( + s, + &vec![Type::Struct(vec![("a".into(), Type::FieldElement)])] + ) + .unwrap(), + Values(vec![Value::Struct( + vec![("a".to_string(), Value::Field(42.into()))] + .into_iter() + .collect() + )]) + ); + + let s = r#"[{"b": "42"}]"#; + assert_eq!( + parse_strict::( + s, + &vec![Type::Struct(vec![("a".into(), Type::FieldElement)])] + ) + .unwrap_err(), + Error::Type("Member with id `a` not found".into()) + ); + + let s = r#"[{}]"#; + assert_eq!( + parse_strict::( + s, + &vec![Type::Struct(vec![("a".into(), Type::FieldElement)])] + ) + .unwrap_err(), + Error::Type("Expected 1 member(s), found 0".into()) + ); + + let s = r#"[{"a": false}]"#; + assert_eq!( + parse_strict::( + s, + &vec![Type::Struct(vec![("a".into(), Type::FieldElement)])] + ) + .unwrap_err(), + Error::Type("Value `false` doesn't match expected type `field`".into()) + ); + } + } +} diff --git a/zokrates_core/src/lib.rs b/zokrates_core/src/lib.rs index b9c46e9b..ee1aaaa1 100644 --- a/zokrates_core/src/lib.rs +++ b/zokrates_core/src/lib.rs @@ -26,6 +26,7 @@ extern crate zokrates_embed; extern crate zokrates_field; extern crate zokrates_pest_ast; +mod abi; mod embed; mod flatten; mod helpers; From 0c7bee35ce7cae6927a22798be1fb787be5fdaf9 Mon Sep 17 00:00:00 2001 From: schaeff Date: Wed, 18 Sep 2019 15:11:10 +0200 Subject: [PATCH 02/11] implement encoding and decoding for abi, integrate with cli --- zokrates_cli/src/bin.rs | 24 ++- zokrates_core/src/abi/mod.rs | 257 +++++++++++++++++++++++++----- zokrates_core/src/ir/folder.rs | 2 +- zokrates_core/src/ir/from_flat.rs | 9 +- zokrates_core/src/ir/mod.rs | 2 + zokrates_core/src/lib.rs | 2 +- 6 files changed, 245 insertions(+), 51 deletions(-) diff --git a/zokrates_cli/src/bin.rs b/zokrates_cli/src/bin.rs index 6e62adf5..6a5f44b0 100644 --- a/zokrates_cli/src/bin.rs +++ b/zokrates_cli/src/bin.rs @@ -340,6 +340,8 @@ fn cli() -> Result<(), String> { let expected_cli_args_count = program_ast.public_arguments_count() + program_ast.private_arguments_count(); + let signature = program_ast.signature.clone(); + // get arguments let arguments: Vec<_> = match sub_matches.values_of("arguments") { // take inline arguments @@ -353,13 +355,11 @@ fn cli() -> Result<(), String> { let mut input = String::new(); match stdin.read_to_string(&mut input) { Ok(_) => { - input.retain(|x| x != '\n'); - input - .split(" ") - .map(|x| { - FieldPrime::try_from_dec_str(x).map_err(|_| x.to_string()) - }) - .collect() + use zokrates_core::abi::{parse_strict, Encode}; + + let parsed = parse_strict(&input, signature.inputs) + .map_err(|why| why.to_string())?; + Ok(parsed.encode()) } Err(_) => Err(String::from("???")), } @@ -382,7 +382,15 @@ fn cli() -> Result<(), String> { .execute(&arguments) .map_err(|e| format!("Execution failed: {}", e))?; - println!("\nWitness: \n\n{}", witness.format_outputs()); + use zokrates_core::abi::Decode; + + let results_json_value: serde_json::Value = zokrates_core::abi::CheckedValues::decode( + witness.return_values(), + signature.outputs, + ) + .into(); + + println!("\nWitness: \n\n{}", results_json_value.to_string()); // write witness to file let output_path = Path::new(sub_matches.value_of("output").unwrap()); diff --git a/zokrates_core/src/abi/mod.rs b/zokrates_core/src/abi/mod.rs index 2b608af5..717cefb5 100644 --- a/zokrates_core/src/abi/mod.rs +++ b/zokrates_core/src/abi/mod.rs @@ -8,12 +8,22 @@ use zokrates_field::field::Field; type Map = BTreeMap; #[derive(Debug, PartialEq)] -enum Error { +pub enum Error { Json(String), Conversion(String), Type(String), } +impl fmt::Display for Error { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + match self { + Error::Json(e) => write!(f, "Invalid JSON: {}", e), + Error::Conversion(e) => write!(f, "Invalid ZoKrates values: {}", e), + Error::Type(e) => write!(f, "Type error: {}", e), + } + } +} + #[derive(PartialEq, Debug)] enum Value { Field(T), @@ -22,6 +32,17 @@ enum Value { Struct(Map>), } +#[derive(PartialEq, Debug)] +enum CheckedValue { + Field(T), + Boolean(bool), + Array(Vec>), + Struct(Vec<(String, CheckedValue)>), +} + +#[derive(PartialEq, Debug)] +pub struct CheckedValues(Vec>); + impl fmt::Display for Value { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match self { @@ -48,50 +69,134 @@ impl fmt::Display for Value { } impl Value { - fn check(&self, ty: &Type) -> Result<(), String> { - match (&self, ty) { - (Value::Field(_), Type::FieldElement) => Ok(()), - (Value::Boolean(_), Type::Boolean) => Ok(()), - (Value::Array(v), Type::Array(inner_ty, size)) => { - if v.len() != *size { + fn check(self, ty: Type) -> Result, String> { + match (self, ty) { + (Value::Field(f), Type::FieldElement) => Ok(CheckedValue::Field(f)), + (Value::Boolean(b), Type::Boolean) => Ok(CheckedValue::Boolean(b)), + (Value::Array(a), Type::Array(box inner_ty, size)) => { + if a.len() != size { Err(format!( "Expected array of size {}, found array of size {}", size, - v.len() + a.len() )) } else { - v.iter() - .map(|val| val.check(inner_ty)) + let a = a + .into_iter() + .map(|val| val.check(inner_ty.clone())) .collect::, _>>()?; - Ok(()) + Ok(CheckedValue::Array(a)) } } - (Value::Struct(v), Type::Struct(members)) => { - if v.len() != members.len() { + (Value::Struct(mut s), Type::Struct(members)) => { + if s.len() != members.len() { Err(format!( "Expected {} member(s), found {}", members.len(), - v.len() + s.len() )) } else { - members - .iter() + let s = members + .into_iter() .map(|(id, ty)| { - v.get(id) + s.remove(&id) .ok_or_else(|| format!("Member with id `{}` not found", id)) - .map(|v| v.check(&ty)) + .map(|v| v.check(ty).map(|v| (id, v))) }) .collect::, _>>()? .into_iter() .collect::>()?; - Ok(()) + Ok(CheckedValue::Struct(s)) } } - (v, t) => Err(format!("Value `{}` doesn't match expected type `{}", v, t)), + (v, t) => Err(format!("Value `{}` doesn't match expected type `{}`", v, t)), } } } +pub trait Encode { + fn encode(self) -> Vec; +} + +pub trait Decode { + type Expected; + + fn decode(raw: Vec, expected: Self::Expected) -> Self; +} + +impl> Encode for CheckedValue { + fn encode(self) -> Vec { + match self { + CheckedValue::Field(t) => vec![t], + CheckedValue::Boolean(b) => vec![if b { 1.into() } else { 0.into() }], + CheckedValue::Array(a) => a.into_iter().flat_map(|v| v.encode()).collect(), + CheckedValue::Struct(s) => s.into_iter().flat_map(|(_, v)| v.encode()).collect(), + } + } +} + +impl + PartialEq> Decode for CheckedValues { + type Expected = Vec; + + fn decode(raw: Vec, expected: Self::Expected) -> Self { + CheckedValues( + expected + .into_iter() + .scan(0, |state, e| { + let new_state = *state + e.get_primitive_count(); + let res = CheckedValue::decode(raw[*state..new_state].to_vec(), e); + *state = new_state; + Some(res) + }) + .collect(), + ) + } +} + +impl + PartialEq + Clone> Decode for CheckedValue { + type Expected = Type; + + fn decode(raw: Vec, expected: Self::Expected) -> Self { + let mut raw = raw; + + match expected { + Type::FieldElement => CheckedValue::Field(raw.pop().unwrap()), + Type::Boolean => { + let v = raw.pop().unwrap(); + CheckedValue::Boolean(if v == 0.into() { + false + } else if v == 1.into() { + true + } else { + unreachable!() + }) + } + Type::Array(box inner_ty, size) => CheckedValue::Array( + raw.chunks(inner_ty.get_primitive_count()) + .map(|c| CheckedValue::decode(c.to_vec(), inner_ty.clone())) + .collect(), + ), + Type::Struct(members) => CheckedValue::Struct( + members + .into_iter() + .scan(0, |state, (id, ty)| { + let new_state = *state + ty.get_primitive_count(); + let res = CheckedValue::decode(raw[*state..new_state].to_vec(), ty); + *state = new_state; + Some((id, res)) + }) + .collect(), + ), + } + } +} + +impl> Encode for CheckedValues { + fn encode(self) -> Vec { + self.0.into_iter().flat_map(|v| v.encode()).collect() + } +} + #[derive(PartialEq, Debug)] struct Values(Vec>); @@ -137,22 +242,50 @@ impl TryFrom for Value { } } +impl Into for CheckedValue { + fn into(self) -> serde_json::Value { + match self { + CheckedValue::Field(f) => serde_json::Value::String(f.to_dec_string()), + CheckedValue::Boolean(b) => serde_json::Value::Bool(b), + CheckedValue::Array(a) => { + serde_json::Value::Array(a.into_iter().map(|e| e.into()).collect()) + } + CheckedValue::Struct(s) => { + serde_json::Value::Object(s.into_iter().map(|(k, v)| (k, v.into())).collect()) + } + } + } +} + +impl Into for CheckedValues { + fn into(self) -> serde_json::Value { + serde_json::Value::Array(self.0.into_iter().map(|e| e.into()).collect()) + } +} + fn parse(s: &str) -> Result, Error> { let json_values: serde_json::Value = serde_json::from_str(s).map_err(|e| Error::Json(e.to_string()))?; Values::try_from(json_values).map_err(|e| Error::Conversion(e)) } -fn parse_strict(s: &str, types: &Vec) -> Result, Error> { +pub fn parse_strict(s: &str, types: Vec) -> Result, Error> { let parsed = parse(s)?; - parsed + if parsed.0.len() != types.len() { + return Err(Error::Type(format!( + "Expected {} inputs, found {}", + types.len(), + parsed.0.len() + ))); + } + let checked = parsed .0 - .iter() - .zip(types.iter()) + .into_iter() + .zip(types.into_iter()) .map(|(v, ty)| v.check(ty)) - .collect::>() + .collect::, _>>() .map_err(|e| Error::Type(e))?; - Ok(parsed) + Ok(CheckedValues(checked)) } #[cfg(test)] @@ -221,9 +354,12 @@ mod tests { fn fields() { let s = r#"["1", "2"]"#; assert_eq!( - parse_strict::(s, &vec![Type::FieldElement, Type::FieldElement]) + parse_strict::(s, vec![Type::FieldElement, Type::FieldElement]) .unwrap(), - Values(vec![Value::Field(1.into()), Value::Field(2.into())]) + CheckedValues(vec![ + CheckedValue::Field(1.into()), + CheckedValue::Field(2.into()) + ]) ); } @@ -231,8 +367,11 @@ mod tests { fn bools() { let s = "[true, false]"; assert_eq!( - parse_strict::(s, &vec![Type::Boolean, Type::Boolean]).unwrap(), - Values(vec![Value::Boolean(true), Value::Boolean(false)]) + parse_strict::(s, vec![Type::Boolean, Type::Boolean]).unwrap(), + CheckedValues(vec![ + CheckedValue::Boolean(true), + CheckedValue::Boolean(false) + ]) ); } @@ -240,10 +379,10 @@ mod tests { fn array() { let s = "[[true, false]]"; assert_eq!( - parse_strict::(s, &vec![Type::array(Type::Boolean, 2)]).unwrap(), - Values(vec![Value::Array(vec![ - Value::Boolean(true), - Value::Boolean(false) + parse_strict::(s, vec![Type::array(Type::Boolean, 2)]).unwrap(), + CheckedValues(vec![CheckedValue::Array(vec![ + CheckedValue::Boolean(true), + CheckedValue::Boolean(false) ])]) ); } @@ -254,11 +393,11 @@ mod tests { assert_eq!( parse_strict::( s, - &vec![Type::Struct(vec![("a".into(), Type::FieldElement)])] + vec![Type::Struct(vec![("a".into(), Type::FieldElement)])] ) .unwrap(), - Values(vec![Value::Struct( - vec![("a".to_string(), Value::Field(42.into()))] + CheckedValues(vec![CheckedValue::Struct( + vec![("a".to_string(), CheckedValue::Field(42.into()))] .into_iter() .collect() )]) @@ -268,7 +407,7 @@ mod tests { assert_eq!( parse_strict::( s, - &vec![Type::Struct(vec![("a".into(), Type::FieldElement)])] + vec![Type::Struct(vec![("a".into(), Type::FieldElement)])] ) .unwrap_err(), Error::Type("Member with id `a` not found".into()) @@ -278,7 +417,7 @@ mod tests { assert_eq!( parse_strict::( s, - &vec![Type::Struct(vec![("a".into(), Type::FieldElement)])] + vec![Type::Struct(vec![("a".into(), Type::FieldElement)])] ) .unwrap_err(), Error::Type("Expected 1 member(s), found 0".into()) @@ -288,11 +427,49 @@ mod tests { assert_eq!( parse_strict::( s, - &vec![Type::Struct(vec![("a".into(), Type::FieldElement)])] + vec![Type::Struct(vec![("a".into(), Type::FieldElement)])] ) .unwrap_err(), Error::Type("Value `false` doesn't match expected type `field`".into()) ); } } + + mod encode { + use super::*; + + #[test] + fn fields() { + let v = CheckedValues(vec![CheckedValue::Field(1), CheckedValue::Field(2)]); + assert_eq!(v.encode(), vec![1, 2]); + } + + #[test] + fn bools() { + let v: CheckedValues = CheckedValues(vec![ + CheckedValue::Boolean(true), + CheckedValue::Boolean(false), + ]); + assert_eq!(v.encode(), vec![1, 0]); + } + + #[test] + fn array() { + let v: CheckedValues = CheckedValues(vec![CheckedValue::Array(vec![ + CheckedValue::Boolean(true), + CheckedValue::Boolean(false), + ])]); + assert_eq!(v.encode(), vec![1, 0]); + } + + #[test] + fn struc() { + let v: CheckedValues = CheckedValues(vec![CheckedValue::Struct( + vec![("a".to_string(), CheckedValue::Field(42))] + .into_iter() + .collect(), + )]); + assert_eq!(v.encode(), vec![42]); + } + } } diff --git a/zokrates_core/src/ir/folder.rs b/zokrates_core/src/ir/folder.rs index fea45ab3..38cfb620 100644 --- a/zokrates_core/src/ir/folder.rs +++ b/zokrates_core/src/ir/folder.rs @@ -41,7 +41,7 @@ pub trait Folder: Sized { pub fn fold_module>(f: &mut F, p: Prog) -> Prog { Prog { main: f.fold_function(p.main), - private: p.private, + ..p } } diff --git a/zokrates_core/src/ir/from_flat.rs b/zokrates_core/src/ir/from_flat.rs index b4865b7a..13268a02 100644 --- a/zokrates_core/src/ir/from_flat.rs +++ b/zokrates_core/src/ir/from_flat.rs @@ -66,12 +66,19 @@ impl From> for Prog { // get the main function let main = flat_prog.main; + // get the signature to keep high level information in the low level representation + let signature = main.signature.clone(); + // get the interface of the program, ie which inputs are private and public let private = main.arguments.iter().map(|p| p.private).collect(); let main = main.into(); - Prog { private, main } + Prog { + private, + main, + signature, + } } } diff --git a/zokrates_core/src/ir/mod.rs b/zokrates_core/src/ir/mod.rs index ed78e6de..37141a1a 100644 --- a/zokrates_core/src/ir/mod.rs +++ b/zokrates_core/src/ir/mod.rs @@ -2,6 +2,7 @@ use crate::flat_absy::flat_parameter::FlatParameter; use crate::flat_absy::FlatVariable; use crate::helpers::Helper; use std::fmt; +use typed_absy::types::signature::Signature; use zokrates_field::field::Field; mod expression; @@ -104,6 +105,7 @@ impl fmt::Display for Function { #[derive(Serialize, Deserialize, Debug, Clone, PartialEq)] pub struct Prog { + pub signature: Signature, pub main: Function, pub private: Vec, } diff --git a/zokrates_core/src/lib.rs b/zokrates_core/src/lib.rs index ee1aaaa1..b0c06170 100644 --- a/zokrates_core/src/lib.rs +++ b/zokrates_core/src/lib.rs @@ -26,7 +26,6 @@ extern crate zokrates_embed; extern crate zokrates_field; extern crate zokrates_pest_ast; -mod abi; mod embed; mod flatten; mod helpers; @@ -37,6 +36,7 @@ mod semantics; mod static_analysis; mod typed_absy; +pub mod abi; pub mod absy; pub mod compile; pub mod flat_absy; From 997d2c386230ba7e38a828b0048337af143501cf Mon Sep 17 00:00:00 2001 From: Thibaut Date: Fri, 27 Sep 2019 19:23:16 +0200 Subject: [PATCH 03/11] extract abi to crate, accept raw and abi, add cli flags --- Cargo.lock | 524 +++++++------- Cargo.toml | 1 + zokrates_abi/Cargo.toml | 14 + .../src/abi/mod.rs => zokrates_abi/src/lib.rs | 21 +- zokrates_cli/Cargo.lock | 670 ------------------ zokrates_cli/Cargo.toml | 1 + zokrates_cli/src/bin.rs | 109 ++- zokrates_core/src/ir/interpreter.rs | 2 +- zokrates_core/src/ir/mod.rs | 8 +- zokrates_core/src/lib.rs | 3 +- zokrates_core/src/typed_absy/mod.rs | 3 +- 11 files changed, 381 insertions(+), 975 deletions(-) create mode 100644 zokrates_abi/Cargo.toml rename zokrates_core/src/abi/mod.rs => zokrates_abi/src/lib.rs (97%) delete mode 100644 zokrates_cli/Cargo.lock diff --git a/Cargo.lock b/Cargo.lock index fa04b8bc..62b602d1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,7 +2,7 @@ # It is not intended for manual editing. [[package]] name = "adler32" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -26,7 +26,7 @@ name = "ansi_term" version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -61,7 +61,7 @@ version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -71,11 +71,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "backtrace" -version = "0.3.35" +version = "0.3.38" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "backtrace-sys 0.1.31 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-demangle 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -85,7 +85,7 @@ name = "backtrace-sys" version = "0.1.31" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -104,9 +104,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bit-vec 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", "crossbeam 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", "futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)", "pairing_ce 0.18.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -120,7 +120,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.99 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -130,7 +130,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "bitflags" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -164,13 +164,13 @@ dependencies = [ [[package]] name = "bstr" -version = "0.2.7" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "regex-automata 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.99 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -194,7 +194,7 @@ version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "either 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)", "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -214,22 +214,23 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "error-chain 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)", "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.99 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.99 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "cc" -version = "1.0.40" +version = "1.0.45" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "rayon 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "jobserver 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "cfg-if" -version = "0.1.9" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -249,7 +250,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", "atty 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", - "bitflags 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "strsim 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "textwrap 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-width 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -261,15 +262,15 @@ name = "cloudabi" version = "0.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bitflags 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "cmake" -version = "0.1.41" +version = "0.1.42" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -304,8 +305,8 @@ dependencies = [ "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "publicsuffix 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.99 (registry+https://github.com/rust-lang/crates.io-index)", + "publicsuffix 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", "try_from 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -331,7 +332,7 @@ name = "crc32fast" version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -339,7 +340,7 @@ name = "crossbeam" version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", "crossbeam-channel 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "crossbeam-deque 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "crossbeam-epoch 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -355,15 +356,6 @@ dependencies = [ "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "crossbeam-deque" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "crossbeam-epoch 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "crossbeam-deque" version = "0.7.1" @@ -379,7 +371,7 @@ version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "arrayvec 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "memoffset 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -399,7 +391,7 @@ name = "crossbeam-utils" version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -413,11 +405,11 @@ name = "csv" version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bstr 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", + "bstr 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", "csv-core 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", "ryu 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.99 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -430,16 +422,16 @@ dependencies = [ [[package]] name = "curl-sys" -version = "0.4.20" +version = "0.4.21" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", "libz-sys 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)", "openssl-sys 0.9.49 (registry+https://github.com/rust-lang/crates.io-index)", - "pkg-config 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", + "pkg-config 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", "vcpkg 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -475,15 +467,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "either" -version = "1.5.2" +version = "1.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "encoding_rs" -version = "0.8.17" +version = "0.8.20" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -496,7 +488,7 @@ name = "error-chain" version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "backtrace 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", + "backtrace 0.3.38 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -504,7 +496,7 @@ name = "error-chain" version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "backtrace 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", + "backtrace 0.3.38 (registry+https://github.com/rust-lang/crates.io-index)", "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -513,7 +505,7 @@ name = "failure" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "backtrace 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)", + "backtrace 0.3.38 (registry+https://github.com/rust-lang/crates.io-index)", "failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -549,7 +541,7 @@ name = "ff_derive_ce" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "num-bigint 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "num-bigint 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "num-integer 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", @@ -590,7 +582,7 @@ name = "from-pest" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "pest 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "pest 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -609,7 +601,7 @@ name = "fuchsia-zircon" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bitflags 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -620,7 +612,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "futures" -version = "0.1.28" +version = "0.1.29" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -628,7 +620,7 @@ name = "futures-cpupool" version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -642,7 +634,7 @@ name = "generic-array" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "typenum 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "typenum 1.11.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -650,17 +642,17 @@ name = "generic-array" version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "typenum 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "typenum 1.11.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "getrandom" -version = "0.1.10" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "wasi 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "wasi 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -668,7 +660,7 @@ name = "git2" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bitflags 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", "libgit2-sys 0.7.11 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", @@ -695,9 +687,9 @@ dependencies = [ "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", "http 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", - "indexmap 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "indexmap 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "string 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -725,7 +717,7 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", "http 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-buf 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -737,11 +729,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "hyper" -version = "0.12.33" +version = "0.12.35" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", "futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "h2 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", "http 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", @@ -770,8 +762,8 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper 0.12.33 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper 0.12.35 (registry+https://github.com/rust-lang/crates.io-index)", "native-tls 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -786,9 +778,19 @@ dependencies = [ "unicode-normalization 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "idna" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-normalization 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "indexmap" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -805,7 +807,7 @@ name = "itertools" version = "0.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "either 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -813,6 +815,16 @@ name = "itoa" version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "jobserver" +version = "0.1.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "getrandom 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "kernel32-sys" version = "0.2.2" @@ -837,25 +849,25 @@ name = "libgit2-sys" version = "0.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)", - "curl-sys 0.4.20 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)", + "curl-sys 0.4.21 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "libssh2-sys 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "libssh2-sys 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)", "libz-sys 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)", "openssl-sys 0.9.49 (registry+https://github.com/rust-lang/crates.io-index)", - "pkg-config 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", + "pkg-config 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "libssh2-sys" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", "libz-sys 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)", "openssl-sys 0.9.49 (registry+https://github.com/rust-lang/crates.io-index)", - "pkg-config 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", + "pkg-config 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", "vcpkg 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -864,9 +876,9 @@ name = "libz-sys" version = "1.0.25" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "pkg-config 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", + "pkg-config 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", "vcpkg 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -884,12 +896,12 @@ name = "log" version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "maplit" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -920,19 +932,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "mime" -version = "0.3.13" +version = "0.3.14" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "unicase 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", -] [[package]] name = "mime_guess" version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "mime 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)", - "unicase 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "mime 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", + "unicase 2.5.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -940,7 +949,7 @@ name = "miniz_oxide" version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "adler32 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "adler32 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -982,7 +991,7 @@ dependencies = [ "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -997,7 +1006,7 @@ dependencies = [ "openssl 0.10.24 (registry+https://github.com/rust-lang/crates.io-index)", "openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "openssl-sys 0.9.49 (registry+https://github.com/rust-lang/crates.io-index)", - "schannel 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", + "schannel 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", "security-framework 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "security-framework-sys 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1008,9 +1017,9 @@ name = "net2" version = "0.2.33" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1039,12 +1048,13 @@ dependencies = [ [[package]] name = "num-bigint" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ + "autocfg 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "num-integer 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.99 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1100,8 +1110,8 @@ name = "openssl" version = "0.10.24" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bitflags 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", "foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1119,9 +1129,9 @@ version = "0.9.49" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "autocfg 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "cc 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "pkg-config 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", + "pkg-config 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", "vcpkg 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1177,7 +1187,7 @@ dependencies = [ "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1185,9 +1195,14 @@ name = "percent-encoding" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "percent-encoding" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "pest" -version = "2.1.1" +version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "ucd-trie 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1210,35 +1225,35 @@ name = "pest_derive" version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "pest 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "pest_generator 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "pest 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "pest_generator 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "pest_generator" -version = "2.1.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "pest 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "pest_meta 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)", + "pest 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "pest_meta 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "pest_meta" -version = "2.1.1" +version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "maplit 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "pest 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "maplit 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "pest 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "sha-1 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "pkg-config" -version = "0.3.15" +version = "0.3.16" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -1256,7 +1271,7 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.1" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1264,14 +1279,14 @@ dependencies = [ [[package]] name = "publicsuffix" -version = "1.5.2" +version = "1.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "error-chain 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)", - "idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "idna 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "url 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1279,7 +1294,7 @@ name = "pulldown-cmark" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bitflags 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1295,7 +1310,7 @@ name = "quote" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1316,7 +1331,7 @@ dependencies = [ "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1328,7 +1343,7 @@ dependencies = [ "fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1346,18 +1361,18 @@ dependencies = [ "rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "rand_pcg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rand" -version = "0.7.0" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "getrandom 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "getrandom 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", "rand_chacha 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand_hc 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1376,7 +1391,7 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "c2-chacha 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1394,10 +1409,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "rand_core" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "getrandom 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "getrandom 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1413,7 +1428,7 @@ name = "rand_hc" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "rand_core 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1431,7 +1446,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1444,7 +1459,7 @@ dependencies = [ "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1464,28 +1479,6 @@ dependencies = [ "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "rayon" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "crossbeam-deque 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", - "either 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rayon-core 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rayon-core" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "crossbeam-deque 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-queue 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "rdrand" version = "0.4.0" @@ -1518,12 +1511,12 @@ dependencies = [ [[package]] name = "regex" -version = "1.2.1" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "aho-corasick 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)", "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "regex-syntax 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", + "regex-syntax 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", "thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1545,7 +1538,7 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.6.11" +version = "0.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -1553,7 +1546,7 @@ name = "remove_dir_all" version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1565,17 +1558,17 @@ dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "cookie 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", "cookie_store 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "encoding_rs 0.8.17 (registry+https://github.com/rust-lang/crates.io-index)", + "encoding_rs 0.8.20 (registry+https://github.com/rust-lang/crates.io-index)", "flate2 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", "http 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper 0.12.33 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper 0.12.35 (registry+https://github.com/rust-lang/crates.io-index)", "hyper-tls 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "mime 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)", + "mime 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", "mime_guess 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "native-tls 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.99 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)", "serde_urlencoded 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1653,18 +1646,18 @@ dependencies = [ "digest 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "rust-crypto 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.99 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.99 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", "tiny-keccak 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "schannel" -version = "0.1.15" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1702,7 +1695,7 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.99 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1712,10 +1705,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "serde" -version = "1.0.99" +version = "1.0.101" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde_derive 1.0.99 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1723,17 +1716,17 @@ name = "serde_bytes" version = "0.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde 1.0.99 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "serde_derive" -version = "1.0.99" +version = "1.0.101" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1743,7 +1736,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", "ryu 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.99 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1753,7 +1746,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "dtoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", "itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.99 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1841,10 +1834,10 @@ dependencies = [ [[package]] name = "syn" -version = "1.0.3" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1874,12 +1867,12 @@ name = "tempfile" version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", "remove_dir_all 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1905,7 +1898,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1922,7 +1915,7 @@ version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-current-thread 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1940,8 +1933,8 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "either 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", + "either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1949,7 +1942,7 @@ name = "tokio-current-thread" version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-executor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1959,7 +1952,7 @@ version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1968,7 +1961,7 @@ version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1978,7 +1971,7 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1996,7 +1989,7 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2005,7 +1998,7 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2020,7 +2013,7 @@ dependencies = [ "crossbeam-deque 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "crossbeam-queue 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2034,7 +2027,7 @@ version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-executor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2049,17 +2042,17 @@ name = "try_from" version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "typed-arena" -version = "1.4.1" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "typenum" -version = "1.10.0" +version = "1.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -2074,7 +2067,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "unicase" -version = "2.4.0" +version = "2.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2121,6 +2114,16 @@ dependencies = [ "percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "url" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "idna 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "utf8-ranges" version = "1.0.4" @@ -2160,7 +2163,7 @@ version = "2.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "same-file 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", "winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2169,14 +2172,14 @@ name = "want" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "try-lock 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "wasi" -version = "0.5.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -2204,7 +2207,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "winapi" -version = "0.3.7" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2226,7 +2229,7 @@ name = "winapi-util" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2242,7 +2245,7 @@ dependencies = [ "cgmath 0.16.1 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "rgb 0.8.14 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2250,7 +2253,7 @@ name = "winreg" version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2262,6 +2265,17 @@ dependencies = [ "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "zokrates_abi" +version = "0.1.0" +dependencies = [ + "serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)", + "zokrates_core 0.3.14", + "zokrates_field 0.3.3", +] + [[package]] name = "zokrates_cli" version = "0.4.11" @@ -2274,6 +2288,7 @@ dependencies = [ "regex 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)", "tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "zokrates_abi 0.1.0", "zokrates_core 0.3.14", "zokrates_field 0.3.3", "zokrates_fs_resolver 0.4.1", @@ -2287,8 +2302,8 @@ dependencies = [ "assert_cli 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", "bellman_ce 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "bincode 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "cc 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)", - "cmake 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)", + "cmake 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", "csv 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "ff_ce 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "git2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2303,11 +2318,11 @@ dependencies = [ "reduce 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "regex 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-hex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.99 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", "serde_bytes 0.10.5 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.99 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)", - "typed-arena 1.4.1 (registry+https://github.com/rust-lang/crates.io-index)", + "typed-arena 1.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "wasmi 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "zokrates_embed 0.1.0", "zokrates_field 0.3.3", @@ -2329,13 +2344,13 @@ dependencies = [ "bincode 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "ff_ce 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "num-bigint 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "num-bigint 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "num-integer 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", "pairing_ce 0.18.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.99 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.99 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2360,7 +2375,7 @@ name = "zokrates_parser" version = "0.1.2" dependencies = [ "glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "pest 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "pest 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "pest_derive 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2371,7 +2386,7 @@ dependencies = [ "from-pest 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "pest 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "pest 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "pest-ast 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "zokrates_field 0.3.3", "zokrates_parser 0.1.2", @@ -2383,8 +2398,8 @@ version = "0.1.3" dependencies = [ "fs_extra 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "glob 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.99 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.99 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)", "zokrates_core 0.3.14", "zokrates_field 0.3.3", @@ -2392,7 +2407,7 @@ dependencies = [ ] [metadata] -"checksum adler32 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7e522997b529f05601e05166c07ed17789691f562762c7f3b987263d2dedee5c" +"checksum adler32 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "5d2e7343e7fc9de883d1b0341e0b13970f764c14101234857d2ddafa1cb1cac2" "checksum aho-corasick 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "81ce3d38065e618af2d7b77e10c5ad9a069859b4be3c2250f674af3840d9c8a5" "checksum aho-corasick 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)" = "58fb5e95d83b38284460a5fda7d6470aa0b8844d283a0b614b8535e880800d2d" "checksum ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" @@ -2401,29 +2416,29 @@ dependencies = [ "checksum assert_cli 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)" = "72342c21057a3cb5f7c2d849bf7999a83795434dd36d74fa8c24680581bd1930" "checksum atty 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)" = "1803c647a3ec87095e7ae7acfca019e98de5ec9a7d01343f611cf3152ed71a90" "checksum autocfg 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "b671c8fb71b457dd4ae18c4ba1e59aa81793daacc361d82fcd410cef0d491875" -"checksum backtrace 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)" = "1371048253fa3bac6704bfd6bbfc922ee9bdcee8881330d40f308b81cc5adc55" +"checksum backtrace 0.3.38 (registry+https://github.com/rust-lang/crates.io-index)" = "690a62be8920ccf773ee00ef0968649b0e724cda8bd5b12286302b4ae955fdf5" "checksum backtrace-sys 0.1.31 (registry+https://github.com/rust-lang/crates.io-index)" = "82a830b4ef2d1124a711c71d263c5abdc710ef8e907bd508c88be475cebc422b" "checksum base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0b25d992356d2eb0ed82172f5248873db5560c4721f564b13cb5193bda5e668e" "checksum bellman_ce 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "938ec0feff00f9dfda0e7cbfe8db8b717966a84f6a12e63ed0943c4a90d6a5de" "checksum bincode 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e103c8b299b28a9c6990458b7013dc4a8356a9b854c51b9883241f5866fac36e" "checksum bit-vec 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "02b4ff8b16e6076c3e14220b39fbc1fabb6737522281a388998046859400895f" -"checksum bitflags 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3d155346769a6855b86399e9bc3814ab343cd3d62c7e985113d46a0ec3c281fd" +"checksum bitflags 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8a606a02debe2813760609f57a64a2ffd27d9fdf5b2f133eaca0b248dd92cdd2" "checksum blake2-rfc_bellman_edition 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "fdc60350286c7c3db13b98e91dbe5c8b6830a6821bc20af5b0c310ce94d74915" "checksum block-buffer 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" "checksum block-padding 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "6d4dc3af3ee2e12f3e5d224e5e1e3d73668abbeb69e566d361f7d5563a4fdf09" -"checksum bstr 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "94cdf78eb7e94c566c1f5dbe2abf8fc70a548fc902942a48c4b3a98b48ca9ade" +"checksum bstr 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "8d6c2c5b58ab920a4f5aeaaca34b4488074e8cc7596af94e6f8c6ff247c60245" "checksum byte-tools 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" "checksum bytecount 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b92204551573580e078dc80017f36a213eb77a0450e4ddd8cfa0f3f2d1f0178f" "checksum byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a7c3dd8985a7111efc5c80b44e23ecdd8c007de8ade3b96595387e812b957cf5" "checksum bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "206fdffcfa2df7cbe15601ef46c813fce0965eb3286db6b56c583b814b51c81c" "checksum c2-chacha 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7d64d04786e0f528460fc884753cf8dddcc466be308f6026f8e355c41a0e4101" "checksum cargo_metadata 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "e5d1b4d380e1bab994591a24c2bdd1b054f64b60bef483a8c598c7c345bc3bbe" -"checksum cc 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)" = "b548a4ee81fccb95919d4e22cfea83c7693ebfd78f0495493178db20b3139da7" -"checksum cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "b486ce3ccf7ffd79fdeb678eac06a9e6c09fc88d33836340becb8fffe87c5e33" +"checksum cc 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)" = "4fc9a35e1f4290eb9e5fc54ba6cf40671ed2a2514c3eeb2b2a908dda2ea5a1be" +"checksum cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" "checksum cgmath 0.16.1 (registry+https://github.com/rust-lang/crates.io-index)" = "64a4b57c8f4e3a2e9ac07e0f6abc9c24b6fc9e1b54c3478cfb598f3d0023e51c" "checksum clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5067f5bb2d80ef5d68b4c87db81601f0b75bca627bc2ef76b141d7b846a3c6d9" "checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" -"checksum cmake 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)" = "3c84c596dcf125d6781f58e3f4254677ec2a6d8aa56e8501ac277100990b3229" +"checksum cmake 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "81fb25b677f8bf1eb325017cb6bb8452f87969db0fedb4f757b297bee78a7c62" "checksum colored 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6cdb90b60f2927f8d76139c72dbde7e10c3a2bc47c8594c9c7a66529f2687c03" "checksum constant_time_eq 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "995a44c877f9212528ccc74b21a232f66ad69001e40ede5bcee2ac9ef2657120" "checksum cookie 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "888604f00b3db336d2af898ec3c1d5d0ddf5e6d462220f2ededc33a87ac4bbd5" @@ -2433,7 +2448,6 @@ dependencies = [ "checksum crc32fast 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ba125de2af0df55319f41944744ad91c71113bf74a4646efff39afe1f6842db1" "checksum crossbeam 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2d818a4990769aac0c7ff1360e233ef3a41adcb009ebb2036bf6915eb0f6b23c" "checksum crossbeam-channel 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "c8ec7fcd21571dc78f96cc96243cab8d8f035247c3efd16c687be154c3fa9efa" -"checksum crossbeam-deque 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "05e44b8cf3e1a625844d1750e1f7820da46044ff6d28f4d43e455ba3e5bb2c13" "checksum crossbeam-deque 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b18cd2e169ad86297e6bc0ad9aa679aee9daa4f19e8163860faf7c164e4f5a71" "checksum crossbeam-epoch 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "fedcd6772e37f3da2a9af9bf12ebe046c0dfe657992377b4df982a2b54cd37a9" "checksum crossbeam-queue 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7c979cd6cfe72335896575c6b5688da489e420d36a27a0b9eb0c73db574b4a4b" @@ -2441,14 +2455,14 @@ dependencies = [ "checksum crunchy 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" "checksum csv 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "37519ccdfd73a75821cac9319d4fce15a81b9fcf75f951df5b9988aa3a0af87d" "checksum csv-core 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "9b5cadb6b25c77aeff80ba701712494213f4a8418fcda2ee11b6560c3ad0bf4c" -"checksum curl-sys 0.4.20 (registry+https://github.com/rust-lang/crates.io-index)" = "5e90ae10f635645cba9cad1023535f54915a95c58c44751c6ed70dbaeb17a408" +"checksum curl-sys 0.4.21 (registry+https://github.com/rust-lang/crates.io-index)" = "520594da9914c1dc77ce3be450fc1c74fde67c82966d80f8e93c6d460eb0e9ae" "checksum difference 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b3304d19798a8e067e48d8e69b2c37f0b5e9b4e462504ad9e27e9f3fce02bba8" "checksum difference 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "524cbf6897b527295dff137cec09ecf3a05f4fddffd7dfcd1585403449e74198" "checksum digest 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)" = "03b072242a8cbaf9c145665af9d250c59af3b958f83ed6824e13533cf76d5b90" "checksum digest 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" "checksum dtoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "ea57b42383d091c85abcc2706240b94ab2a8fa1fc81c10ff23c4de06e2a90b5e" -"checksum either 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "5527cfe0d098f36e3f8839852688e63c8fff1c90b2b405aef730615f9a7bcf7b" -"checksum encoding_rs 0.8.17 (registry+https://github.com/rust-lang/crates.io-index)" = "4155785c79f2f6701f185eb2e6b4caf0555ec03477cb4c70db67b465311620ed" +"checksum either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "bb1f6b1ce1c140482ea30ddd3335fc0024ac7ee112895426e0a629a6c20adfe3" +"checksum encoding_rs 0.8.20 (registry+https://github.com/rust-lang/crates.io-index)" = "87240518927716f79692c2ed85bfe6e98196d18c6401ec75355760233a7e12e9" "checksum environment 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1f4b14e20978669064c33b4c1e0fb4083412e40fe56cbea2eae80fd7591503ee" "checksum error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ff511d5dc435d703f4971bc399647c9bc38e20cb41452e3b9feb4765419ed3f3" "checksum error-chain 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3ab49e9dcb602294bc42f9a7dfc9bc6e936fca4418ea300dbfb84fe16de0b7d9" @@ -2466,12 +2480,12 @@ dependencies = [ "checksum fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" "checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" "checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" -"checksum futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)" = "45dc39533a6cae6da2b56da48edae506bb767ec07370f86f70fc062e9d435869" +"checksum futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)" = "1b980f2816d6ee8673b6517b52cb0e808a180efc92e5c19d02cdda79066703ef" "checksum futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "ab90cde24b3319636588d0c35fe03b1333857621051837ed769faefb4c2162e4" "checksum gcc 0.3.55 (registry+https://github.com/rust-lang/crates.io-index)" = "8f5f3913fa0bfe7ee1fd8248b6b9f42a5af4b9d65ec2dd2c3c26132b950ecfc2" "checksum generic-array 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c68f0274ae0e023facc3c97b2e00f076be70e254bc851d972503b328db79b2ec" "checksum generic-array 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ef25c5683767570c2bbd7deba372926a55eaae9982d7726ee2a1050239d45b9d" -"checksum getrandom 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "6171a6cc63fbabbe27c2b5ee268e8b7fe5dc1eb0dd2dfad537c1dfed6f69117e" +"checksum getrandom 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "473a1265acc8ff1e808cd0a1af8cee3c2ee5200916058a2ca113c29f2d903571" "checksum git2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c7339329bfa14a00223244311560d11f8f489b453fb90092af97f267a6090ab0" "checksum glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "8be18de09a56b60ed0edf84bc9df007e30040691af7acd1c41874faac5895bfb" "checksum glob 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" @@ -2480,27 +2494,29 @@ dependencies = [ "checksum http 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)" = "372bcb56f939e449117fb0869c2e8fd8753a8223d92a172c6e808cf123a5b6e4" "checksum http-body 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6741c859c1b2463a423a1dbce98d418e6c3c3fc720fb0d45528657320920292d" "checksum httparse 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "cd179ae861f0c2e53da70d892f5f3029f9594be0c41dc5269cd371691b1dc2f9" -"checksum hyper 0.12.33 (registry+https://github.com/rust-lang/crates.io-index)" = "7cb44cbce9d8ee4fb36e4c0ad7b794ac44ebaad924b9c8291a63215bb44c2c8f" +"checksum hyper 0.12.35 (registry+https://github.com/rust-lang/crates.io-index)" = "9dbe6ed1438e1f8ad955a4701e9a944938e9519f6888d12d8558b645e247d5f6" "checksum hyper-tls 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "3a800d6aa50af4b5850b2b0f659625ce9504df908e9733b635720483be26174f" "checksum idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e" -"checksum indexmap 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a4d6d89e0948bf10c08b9ecc8ac5b83f07f857ebe2c0cbe38de15b4e4f510356" +"checksum idna 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "02e2673c30ee86b5b96a9cb52ad15718aa1f966f5ab9ad54a8b95d5ca33120a9" +"checksum indexmap 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a61202fbe46c4a951e9404a720a0180bcf3212c750d735cb5c4ba4dc551299f3" "checksum iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dbe6e417e7d0975db6512b90796e8ce223145ac4e33c377e4a42882a0e88bb08" "checksum itertools 0.7.11 (registry+https://github.com/rust-lang/crates.io-index)" = "0d47946d458e94a1b7bcabbf6521ea7c037062c81f534615abcad76e84d4970d" "checksum itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "501266b7edd0174f8530248f87f99c88fbe60ca4ef3dd486835b8d8d53136f7f" +"checksum jobserver 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)" = "f2b1d42ef453b30b7387e113da1c83ab1605d90c5b4e0eb8e96d016ed3b8c160" "checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" "checksum lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" "checksum libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)" = "34fcd2c08d2f832f376f4173a231990fa5aef4e99fb569867318a227ef4c06ba" "checksum libgit2-sys 0.7.11 (registry+https://github.com/rust-lang/crates.io-index)" = "48441cb35dc255da8ae72825689a95368bf510659ae1ad55dc4aa88cb1789bf1" -"checksum libssh2-sys 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "126a1f4078368b163bfdee65fbab072af08a1b374a5551b21e87ade27b1fbf9d" +"checksum libssh2-sys 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)" = "8914d10b159fc288f2b6f253c94bd0c15a777fd5a297691141d89674b87e66fd" "checksum libz-sys 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)" = "2eb5e43362e38e2bca2fd5f5134c4d4564a23a5c28e9b95411652021a8675ebe" "checksum lock_api 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "62ebf1391f6acad60e5c8b43706dde4582df75c06698ab44511d15016bc2442c" "checksum log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7" -"checksum maplit 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "08cbb6b4fef96b6d77bfc40ec491b1690c779e77b05cd9f07f787ed376fd4c43" +"checksum maplit 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d" "checksum matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" "checksum memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "88579771288728879b57485cc7d6b07d648c9f0141eb955f8ab7f9d45394468e" "checksum memoffset 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ce6075db033bbbb7ee5a0bbd3a3186bbae616f57fb001c485c7ff77955f8177f" "checksum memory_units 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "71d96e3f3c0b6325d8ccd83c33b28acb183edcb6c67938ba104ec546854b0882" -"checksum mime 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)" = "3e27ca21f40a310bd06d9031785f4801710d566c184a6e15bad4f1d9b65f9425" +"checksum mime 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)" = "dd1d63acd1b78403cc0c325605908475dd9b9a3acbf65ed8bcab97e27014afcf" "checksum mime_guess 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1a0ed03949aef72dbdf3116a383d7b38b4768e6f960528cd6a6044aa9ed68599" "checksum miniz_oxide 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7108aff85b876d06f22503dcce091e29f76733b2bfdd91eebce81f5e68203a10" "checksum mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)" = "83f51996a3ed004ef184e16818edc51fadffe8e7ca68be67f9dee67d84d0ff23" @@ -2511,7 +2527,7 @@ dependencies = [ "checksum nodrop 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "2f9667ddcc6cc8a43afc9b7917599d7216aa09c463919ea32c59ed6cac8bc945" "checksum num 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "4703ad64153382334aa8db57c637364c322d3372e097840c72000dabdcf6156e" "checksum num-bigint 0.1.44 (registry+https://github.com/rust-lang/crates.io-index)" = "e63899ad0da84ce718c14936262a41cee2c79c981fc0a0e7c7beb47d5a07e8c1" -"checksum num-bigint 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "57450397855d951f1a41305e54851b1a7b8f5d2e349543a02a2effe25459f718" +"checksum num-bigint 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "f9c3f34cdd24f334cb265d9bf8bfa8a241920d026916785747a92f0e55541a1a" "checksum num-integer 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)" = "b85e541ef8255f6cf42bbfe4ef361305c6c135d10919ecc26126c4e5ae94bc09" "checksum num-iter 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)" = "76bd5272412d173d6bf9afdf98db8612bbabc9a7a830b7bfc9c188911716132e" "checksum num-traits 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)" = "92e5113e9fd4cc14ded8e499429f396a20f98c772a47cc8622a736e1ec843c31" @@ -2528,16 +2544,17 @@ dependencies = [ "checksum parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ab41b4aed082705d1056416ae4468b6ea99d52599ecf3169b00088d43113e337" "checksum parking_lot_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "94c8c7923936b28d546dfd14d4472eaf34c99b14e1c973a32b3e6d4eb04298c9" "checksum percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" -"checksum pest 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "933085deae3f32071f135d799d75667b63c8dc1f4537159756e3d4ceab41868c" +"checksum percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" +"checksum pest 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7e4fb201c5c22a55d8b24fef95f78be52738e5e1361129be1b5e862ecdb6894a" "checksum pest-ast 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3fbf404899169771dd6a32c84248b83cd67a26cc7cc957aac87661490e1227e4" "checksum pest_derive 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "833d1ae558dc601e9a60366421196a8d94bc0ac980476d0b67e1d0988d72b2d0" -"checksum pest_generator 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "63120576c4efd69615b5537d3d052257328a4ca82876771d6944424ccfd9f646" -"checksum pest_meta 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f249ea6de7c7b7aba92b4ff4376a994c6dbd98fd2166c89d5c4947397ecb574d" -"checksum pkg-config 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)" = "a7c1d2cfa5a714db3b5f24f0915e74fcdf91d09d496ba61329705dda7774d2af" +"checksum pest_generator 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7b9fcf299b5712d06ee128a556c94709aaa04512c4dffb8ead07c5c998447fc0" +"checksum pest_meta 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "df43fd99896fd72c485fe47542c7b500e4ac1e8700bf995544d1317a60ded547" +"checksum pkg-config 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)" = "72d5370d90f49f70bd033c3d75e87fc529fbfff9d6f7cccef07d6170079d91ea" "checksum ppv-lite86 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e3cbf9f658cdb5000fcf6f362b8ea2ba154b9f146a61c7a20d647034c6b6561b" "checksum proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)" = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" -"checksum proc-macro2 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4c5c2380ae88876faae57698be9e9775e3544decad214599c3a6266cca6ac802" -"checksum publicsuffix 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "5afecba86dcf1e4fd610246f89899d1924fe12e1e89f555eb7c7f710f3c5ad1d" +"checksum proc-macro2 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "afdc77cc74ec70ed262262942ebb7dac3d479e9e5cfa2da1841c0806f6cdabcc" +"checksum publicsuffix 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "9bf259a81de2b2eb9850ec990ec78e6a25319715584fd7652b9b26f96fcb1510" "checksum pulldown-cmark 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "eef52fac62d0ea7b9b4dc7da092aa64ea7ec3d90af6679422d3d7e0e14b6ee15" "checksum quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)" = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1" "checksum quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "053a8c8bcc71fcce321828dc897a98ab9760bef03a4fc36693c231e5b3216cfe" @@ -2545,12 +2562,12 @@ dependencies = [ "checksum rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "552840b97013b1a26992c11eac34bdd778e464601a4c2054b5f0bff7c6761293" "checksum rand 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c618c47cd3ebd209790115ab837de41425723956ad3ce2e6a7f09890947cacb9" "checksum rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "6d71dacdc3c88c1fde3885a3be3fbab9f35724e6ce99467f7d9c5026132184ca" -"checksum rand 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d47eab0e83d9693d40f825f86948aa16eff6750ead4bdffc4ab95b8b3a7f052c" +"checksum rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "3ae1b169243eaf61759b8475a998f0a385e42042370f3a7dbaf35246eacc8412" "checksum rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "556d3a1ca6600bfcbab7c7c91ccb085ac7fbbcd70e008a98742e7847f4f7bcef" "checksum rand_chacha 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "03a2a90da8c7523f554344f921aa97283eadf6ac484a6d2a7d0212fa7f8d6853" "checksum rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b" "checksum rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc" -"checksum rand_core 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "615e683324e75af5d43d8f7a39ffe3ee4a9dc42c5c701167a71dc59c3a493aca" +"checksum rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" "checksum rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7b40677c7be09ae76218dc623efbf7b18e34bced3f38883af07bb75630a21bc4" "checksum rand_hc 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" "checksum rand_isaac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ded997c9d5f13925be2a6fd7e66bf1872597f759fd9dd93513dd7e92e5a5ee08" @@ -2558,16 +2575,14 @@ dependencies = [ "checksum rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7b75f676a1e053fc562eafbb47838d67c84801e38fc1ba459e8f180deabd5071" "checksum rand_pcg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "abf9b09b01790cfe0364f52bf32995ea3c39f4d2dd011eac241d2914146d0b44" "checksum rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c" -"checksum rayon 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a4b0186e22767d5b9738a05eab7c6ac90b15db17e5b5f9bd87976dd7d89a10a4" -"checksum rayon-core 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ebbe0df8435ac0c397d467b6cad6d25543d06e8a019ef3f6af3c384597515bd2" "checksum rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" "checksum redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)" = "2439c63f3f6139d1b57529d16bc3b8bb855230c8efcc5d3a896c8bea7c3b1e84" "checksum reduce 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "75b1fa5668b02f2a69746bba558f8f98cc087b123a587fd959122872ad9a3f3c" "checksum regex 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "9329abc99e39129fcceabd24cf5d85b4671ef7c29c50e972bc5afe32438ec384" -"checksum regex 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "88c3d9193984285d544df4a30c23a4e62ead42edf70a4452ceb76dac1ce05c26" +"checksum regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dc220bd33bdce8f093101afe22a037b8eb0e5af33592e6a9caafff0d4cb81cbd" "checksum regex-automata 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "92b73c2a1770c255c240eaa4ee600df1704a38dc3feaa6e949e7fcd4f8dc09f9" "checksum regex-syntax 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)" = "7d707a4fa2637f2dca2ef9fd02225ec7661fe01a53623c1e6515b6916511f7a7" -"checksum regex-syntax 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)" = "b143cceb2ca5e56d5671988ef8b15615733e7ee16cd348e064333b251b89343f" +"checksum regex-syntax 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)" = "11a7e20d1cce64ef2fed88b66d347f88bd9babb82845b2b858f3edbf59a4f716" "checksum remove_dir_all 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4a83fa3702a688b9359eccba92d153ac33fd2e8462f9e0e3fdf155239ea7792e" "checksum reqwest 0.9.20 (registry+https://github.com/rust-lang/crates.io-index)" = "0f6d896143a583047512e59ac54a215cb203c29cc941917343edea3be8df9c78" "checksum rgb 0.8.14 (registry+https://github.com/rust-lang/crates.io-index)" = "2089e4031214d129e201f8c3c8c2fe97cd7322478a0d1cdf78e7029b0042efdb" @@ -2579,16 +2594,16 @@ dependencies = [ "checksum ryu 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c92464b447c0ee8c4fb3824ecc8383b81717b9f1e74ba2e72540aef7b9f82997" "checksum same-file 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "585e8ddcedc187886a30fa705c47985c3fa88d06624095856b36ca0b82ff4421" "checksum sapling-crypto_ce 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d385cebab4241e694ca5979b0cbf9b353ba12fe6a17d66643a958b397362d56d" -"checksum schannel 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)" = "f2f6abf258d99c3c1c5c2131d99d064e94b7b3dd5f416483057f308fea253339" +"checksum schannel 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "87f550b06b6cba9c8b8be3ee73f391990116bf527450d2556e9b9ce263b9a021" "checksum scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27" "checksum scopeguard 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b42e15e59b18a828bbf5c58ea01debb36b9b096346de35d941dcb89009f24a0d" "checksum security-framework 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "eee63d0f4a9ec776eeb30e220f0bc1e092c3ad744b2a379e3993070364d3adc2" "checksum security-framework-sys 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9636f8989cbf61385ae4824b98c1aaa54c994d7d8b41f11c601ed799f0549a56" "checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" "checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" -"checksum serde 1.0.99 (registry+https://github.com/rust-lang/crates.io-index)" = "fec2851eb56d010dc9a21b89ca53ee75e6528bab60c11e89d38390904982da9f" +"checksum serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)" = "9796c9b7ba2ffe7a9ce53c2287dfc48080f4b2b362fcc245a259b3a7201119dd" "checksum serde_bytes 0.10.5 (registry+https://github.com/rust-lang/crates.io-index)" = "defbb8a83d7f34cc8380751eeb892b825944222888aff18996ea7901f24aec88" -"checksum serde_derive 1.0.99 (registry+https://github.com/rust-lang/crates.io-index)" = "cb4dc18c61206b08dc98216c98faa0232f4337e1e1b8574551d5bad29ea1b425" +"checksum serde_derive 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)" = "4b133a43a1ecd55d4086bd5b4dc6c1751c68b1bfbeba7a5040442022c7e7c02e" "checksum serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)" = "051c49229f282f7c6f3813f8286cc1e3323e8051823fce42c7ea80fe13521704" "checksum serde_urlencoded 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)" = "642dd69105886af2efd227f75a520ec9b44a820d65bc133a9131f7d229fd165a" "checksum sha-1 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "23962131a91661d643c98940b20fcaffe62d776a823247be80a48fcb8b6fce68" @@ -2601,7 +2616,7 @@ dependencies = [ "checksum strsim 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" "checksum syn 0.14.9 (registry+https://github.com/rust-lang/crates.io-index)" = "261ae9ecaa397c42b960649561949d69311f08eeaea86a65696e6e46517cf741" "checksum syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)" = "9ca4b3b69a77cbe1ffc9e198781b7acb0c7365a883670e8f1c1bc66fba79a5c5" -"checksum syn 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "158521e6f544e7e3dcfc370ac180794aa38cb34a1b1e07609376d4adcf429b93" +"checksum syn 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "66850e97125af79138385e9b88339cbcd037e3f28ceab8c5ad98e64f0f1f80bf" "checksum synstructure 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "02353edf96d6e4dc81aea2d8490a7e9db177bf8acb0e951c24940bf866cb313f" "checksum tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "15f2b5fb00ccdf689e0149d1b1b3c03fead81c2b37735d812fa8bddbbf41b6d8" "checksum tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9" @@ -2621,17 +2636,18 @@ dependencies = [ "checksum tokio-timer 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "f2106812d500ed25a4f38235b9cae8f78a09edf43203e16e59c3b769a342a60e" "checksum try-lock 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e604eb7b43c06650e854be16a2a03155743d3752dd1c943f6829e26b7a36e382" "checksum try_from 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "283d3b89e1368717881a9d51dad843cc435380d8109c9e47d38780a324698d8b" -"checksum typed-arena 1.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c6c06a92aef38bb4dc5b0df00d68496fc31307c5344c867bb61678c6e1671ec5" -"checksum typenum 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "612d636f949607bdf9b123b4a6f6d966dedf3ff669f7f045890d3a4a73948169" +"checksum typed-arena 1.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9c0704a799d314795d3d847d519b284bae681ef9b1f3da99f7ebc7b47ba2e607" +"checksum typenum 1.11.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6d2783fe2d6b8c1101136184eb41be8b1ad379e4657050b8aaff0c79ee7575f9" "checksum ucd-trie 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "8f00ed7be0c1ff1e24f46c3d2af4859f7e863672ba3a6e92e7cff702bf9f06c2" "checksum ucd-util 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "fa9b3b49edd3468c0e6565d85783f51af95212b6fa3986a5500954f00b460874" -"checksum unicase 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a84e5511b2a947f3ae965dcb29b13b7b1691b6e7332cf5dbc1744138d5acb7f6" +"checksum unicase 2.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2e2e6bd1e59e56598518beb94fd6db628ded570326f0a98c679a304bd9f00150" "checksum unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" "checksum unicode-normalization 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "141339a08b982d942be2ca06ff8b076563cbe223d1befd5450716790d44e2426" "checksum unicode-width 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "7007dbd421b92cc6e28410fe7362e2e0a2503394908f417b68ec8d1c364c4e20" "checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" "checksum unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c" "checksum url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dd4e7c0d531266369519a4aa4f399d748bd37043b00bde1e4ff1f60a120b355a" +"checksum url 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "75b414f6c464c879d7f9babf951f23bc3743fb7313c081b2e6ca719067ea9d61" "checksum utf8-ranges 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "b4ae116fef2b7fea257ed6440d3cfcff7f190865f170cdad00bb6465bf18ecba" "checksum uuid 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)" = "90dbc611eb48397705a6b0f6e917da23ae517e4d127123d2cf7674206627d32a" "checksum vcpkg 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "33dd455d0f96e90a75803cfeb7f948768c08d70a6de9a8d2362461935698bf95" @@ -2640,11 +2656,11 @@ dependencies = [ "checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" "checksum walkdir 2.2.9 (registry+https://github.com/rust-lang/crates.io-index)" = "9658c94fa8b940eab2250bd5a457f9c48b748420d71293b165c8cdbe2f55f71e" "checksum want 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b6395efa4784b027708f7451087e647ec73cc74f5d9bc2e418404248d679a230" -"checksum wasi 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fd5442abcac6525a045cc8c795aedb60da7a2e5e89c7bf18a0d5357849bb23c7" +"checksum wasi 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b89c3ce4ce14bdc6fb6beaf9ec7928ca331de5df7e5ea278375642a2f478570d" "checksum wasmi 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "aebbaef470840d157a5c47c8c49f024da7b1b80e90ff729ca982b2b80447e78b" "checksum wasmi-validation 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ab380192444b3e8522ae79c0a1976e42a82920916ccdfbce3def89f456ea33f3" "checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" -"checksum winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "f10e386af2b13e47c89e7236a7a14a086791a2b88ebad6df9bf42040195cf770" +"checksum winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "8093091eeb260906a183e6ae1abdba2ef5ef2257a21801128899c3fc699229c6" "checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" "checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" "checksum winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7168bab6e1daee33b4557efd0e95d5ca70a03706d39fa5f3fe7a236f584b03c9" diff --git a/Cargo.toml b/Cargo.toml index eaa81f0e..49c93846 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,4 +7,5 @@ members = [ "zokrates_github_resolver", "zokrates_stdlib", "zokrates_embed", + "zokrates_abi", ] \ No newline at end of file diff --git a/zokrates_abi/Cargo.toml b/zokrates_abi/Cargo.toml new file mode 100644 index 00000000..b6557284 --- /dev/null +++ b/zokrates_abi/Cargo.toml @@ -0,0 +1,14 @@ +[package] +name = "zokrates_abi" +version = "0.1.0" +authors = ["thibaut"] +edition = "2018" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +zokrates_field = { version = "0.3", path = "../zokrates_field" } +zokrates_core = { version = "0.3", path = "../zokrates_core" } +serde = "1.0" +serde_derive = "1.0" +serde_json = "1.0" diff --git a/zokrates_core/src/abi/mod.rs b/zokrates_abi/src/lib.rs similarity index 97% rename from zokrates_core/src/abi/mod.rs rename to zokrates_abi/src/lib.rs index 717cefb5..81189e7a 100644 --- a/zokrates_core/src/abi/mod.rs +++ b/zokrates_abi/src/lib.rs @@ -1,7 +1,24 @@ +#![feature(box_patterns, box_syntax)] + +pub enum Inputs { + Raw(Vec), + Abi(CheckedValues), +} + +impl> Encode for Inputs { + fn encode(self) -> Vec { + match self { + Inputs::Raw(v) => v, + Inputs::Abi(v) => v.encode(), + } + } +} + use std::collections::BTreeMap; use std::convert::TryFrom; use std::fmt; -use typed_absy::types::Type; +use zokrates_core::ir::Prog; +use zokrates_core::typed_absy::Type; use zokrates_field::field::Field; @@ -171,7 +188,7 @@ impl + PartialEq + Clone> Decode for CheckedValue { unreachable!() }) } - Type::Array(box inner_ty, size) => CheckedValue::Array( + Type::Array(box inner_ty, _) => CheckedValue::Array( raw.chunks(inner_ty.get_primitive_count()) .map(|c| CheckedValue::decode(c.to_vec(), inner_ty.clone())) .collect(), diff --git a/zokrates_cli/Cargo.lock b/zokrates_cli/Cargo.lock deleted file mode 100644 index 8e9c95ed..00000000 --- a/zokrates_cli/Cargo.lock +++ /dev/null @@ -1,670 +0,0 @@ -[[package]] -name = "aho-corasick" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "memchr 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "ansi_term" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "assert_cli" -version = "0.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "colored 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "difference 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "environment 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)", - "skeptic 0.13.3 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "atty" -version = "0.2.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)", - "termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "backtrace" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "backtrace-sys 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-demangle 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "backtrace-sys" -version = "0.1.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "cc 1.0.17 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "bincode" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "byteorder 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.68 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "bitflags" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "bitflags" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "bytecount" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "byteorder" -version = "1.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "cargo_metadata" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.68 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.68 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "cc" -version = "1.0.17" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "cfg-if" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "clap" -version = "2.32.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "atty 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", - "bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "strsim 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "textwrap 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "vec_map 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "cmake" -version = "0.1.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "cc 1.0.17 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "colored" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "difference" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "dtoa" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "environment" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "error-chain" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "backtrace 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "fuchsia-zircon" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "fuchsia-zircon-sys" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "gcc" -version = "0.3.54" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "glob" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "itoa" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "lazy_static" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "lazy_static" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "lazy_static" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "libc" -version = "0.2.42" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "memchr" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "num" -version = "0.1.42" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "num-bigint 0.1.44 (registry+https://github.com/rust-lang/crates.io-index)", - "num-complex 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)", - "num-integer 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", - "num-iter 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", - "num-rational 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "num-bigint" -version = "0.1.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "num-integer 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "num-complex" -version = "0.1.43" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "num-traits 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "num-integer" -version = "0.1.39" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "num-traits 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "num-iter" -version = "0.1.37" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "num-integer 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "num-rational" -version = "0.1.42" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "num-bigint 0.1.44 (registry+https://github.com/rust-lang/crates.io-index)", - "num-integer 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "num-traits" -version = "0.1.43" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "num-traits 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "num-traits" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "proc-macro2" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "pulldown-cmark" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "quote" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "proc-macro2 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rand" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "redox_syscall" -version = "0.1.40" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "redox_termios" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "reduce" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "regex" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "aho-corasick 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "regex-syntax 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", - "thread_local 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", - "utf8-ranges 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "regex-syntax" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "ucd-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "remove_dir_all" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rustc-demangle" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "rustc-serialize" -version = "0.3.24" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "same-file" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "semver" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.68 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "semver-parser" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "serde" -version = "1.0.68" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "serde_derive" -version = "1.0.68" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "proc-macro2 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.14.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "serde_json" -version = "1.0.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "dtoa 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "itoa 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.68 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "skeptic" -version = "0.13.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "bytecount 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "cargo_metadata 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", - "error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "pulldown-cmark 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)", - "tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", - "walkdir 2.1.4 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "strsim" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "syn" -version = "0.14.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "proc-macro2 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "tempdir" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "remove_dir_all 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "termion" -version = "1.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "textwrap" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "thread_local" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "lazy_static 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "ucd-util" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "unicode-width" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "unicode-xid" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "unreachable" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "utf8-ranges" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "vec_map" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "void" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "walkdir" -version = "2.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "same-file 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "winapi" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "zokrates" -version = "0.1.0" -dependencies = [ - "bincode 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "cmake 0.1.31 (registry+https://github.com/rust-lang/crates.io-index)", - "gcc 0.3.54 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)", - "num 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", - "reduce 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.68 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.68 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "zokrates-cli" -version = "0.1.0" -dependencies = [ - "assert_cli 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", - "bincode 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)", - "glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "zokrates 0.1.0", -] - -[metadata] -"checksum aho-corasick 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "f0ba20154ea1f47ce2793322f049c5646cc6d0fa9759d5f333f286e507bf8080" -"checksum ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" -"checksum assert_cli 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)" = "72342c21057a3cb5f7c2d849bf7999a83795434dd36d74fa8c24680581bd1930" -"checksum atty 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)" = "2fc4a1aa4c24c0718a250f0681885c1af91419d242f29eb8f2ab28502d80dbd1" -"checksum backtrace 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "89a47830402e9981c5c41223151efcced65a0510c13097c769cede7efb34782a" -"checksum backtrace-sys 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)" = "bff67d0c06556c0b8e6b5f090f0eac52d950d9dfd1d35ba04e4ca3543eaf6a7e" -"checksum bincode 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e103c8b299b28a9c6990458b7013dc4a8356a9b854c51b9883241f5866fac36e" -"checksum bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4efd02e230a02e18f92fc2735f44597385ed02ad8f831e7c1c1156ee5e1ab3a5" -"checksum bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "d0c54bb8f454c567f21197eefcdbf5679d0bd99f2ddbe52e84c77061952e6789" -"checksum bytecount 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "882585cd7ec84e902472df34a5e01891202db3bf62614e1f0afe459c1afcf744" -"checksum byteorder 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "74c0b906e9446b0a2e4f760cdb3fa4b2c48cdc6db8766a845c54b6ff063fd2e9" -"checksum cargo_metadata 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)" = "682476b87b3e22cd3820d86b26cd8603cd84ab76dce7547b2631858347aa8967" -"checksum cc 1.0.17 (registry+https://github.com/rust-lang/crates.io-index)" = "49ec142f5768efb5b7622aebc3fdbdbb8950a4b9ba996393cb76ef7466e8747d" -"checksum cfg-if 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "efe5c877e17a9c717a0bf3613b2709f723202c4e4675cc8f12926ded29bcb17e" -"checksum clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b957d88f4b6a63b9d70d5f454ac8011819c6efa7727858f458ab71c756ce2d3e" -"checksum cmake 0.1.31 (registry+https://github.com/rust-lang/crates.io-index)" = "95470235c31c726d72bf2e1f421adc1e65b9d561bf5529612cbe1a72da1467b3" -"checksum colored 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b0aa3473e85a3161b59845d6096b289bb577874cafeaf75ea1b1beaa6572c7fc" -"checksum difference 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b3304d19798a8e067e48d8e69b2c37f0b5e9b4e462504ad9e27e9f3fce02bba8" -"checksum dtoa 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "09c3753c3db574d215cba4ea76018483895d7bff25a31b49ba45db21c48e50ab" -"checksum environment 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1f4b14e20978669064c33b4c1e0fb4083412e40fe56cbea2eae80fd7591503ee" -"checksum error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ff511d5dc435d703f4971bc399647c9bc38e20cb41452e3b9feb4765419ed3f3" -"checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" -"checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" -"checksum gcc 0.3.54 (registry+https://github.com/rust-lang/crates.io-index)" = "5e33ec290da0d127825013597dbdfc28bee4964690c7ce1166cbc2a7bd08b1bb" -"checksum glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "8be18de09a56b60ed0edf84bc9df007e30040691af7acd1c41874faac5895bfb" -"checksum itoa 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c069bbec61e1ca5a596166e55dfe4773ff745c3d16b700013bcaff9a6df2c682" -"checksum lazy_static 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "cf186d1a8aa5f5bee5fd662bc9c1b949e0259e1bcc379d1f006847b0080c7417" -"checksum lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "76f033c7ad61445c5b347c7382dd1237847eb1bce590fe50365dcb33d546be73" -"checksum lazy_static 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e6412c5e2ad9584b0b8e979393122026cdd6d2a80b933f890dcd694ddbe73739" -"checksum libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)" = "b685088df2b950fccadf07a7187c8ef846a959c142338a48f9dc0b94517eb5f1" -"checksum memchr 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "796fba70e76612589ed2ce7f45282f5af869e0fdd7cc6199fa1aa1f1d591ba9d" -"checksum num 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "4703ad64153382334aa8db57c637364c322d3372e097840c72000dabdcf6156e" -"checksum num-bigint 0.1.44 (registry+https://github.com/rust-lang/crates.io-index)" = "e63899ad0da84ce718c14936262a41cee2c79c981fc0a0e7c7beb47d5a07e8c1" -"checksum num-complex 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)" = "b288631d7878aaf59442cffd36910ea604ecd7745c36054328595114001c9656" -"checksum num-integer 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)" = "e83d528d2677f0518c570baf2b7abdcf0cd2d248860b68507bdcb3e91d4c0cea" -"checksum num-iter 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)" = "af3fdbbc3291a5464dc57b03860ec37ca6bf915ed6ee385e7c6c052c422b2124" -"checksum num-rational 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "ee314c74bd753fc86b4780aa9475da469155f3848473a261d2d18e35245a784e" -"checksum num-traits 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)" = "92e5113e9fd4cc14ded8e499429f396a20f98c772a47cc8622a736e1ec843c31" -"checksum num-traits 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "630de1ef5cc79d0cdd78b7e33b81f083cbfe90de0f4b2b2f07f905867c70e9fe" -"checksum proc-macro2 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "effdb53b25cdad54f8f48843d67398f7ef2e14f12c1b4cb4effc549a6462a4d6" -"checksum pulldown-cmark 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d6fdf85cda6cadfae5428a54661d431330b312bc767ddbc57adbedc24da66e32" -"checksum quote 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e44651a0dc4cdd99f71c83b561e221f714912d11af1a4dff0631f923d53af035" -"checksum rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "eba5f8cb59cc50ed56be8880a5c7b496bfd9bd26394e176bc67884094145c2c5" -"checksum redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)" = "c214e91d3ecf43e9a4e41e578973adeb14b474f2bee858742d127af75a0112b1" -"checksum redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7e891cfe48e9100a70a3b6eb652fef28920c117d366339687bd5576160db0f76" -"checksum reduce 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5f77b717415291f4d7929a111402316b272c566ae9d4b75a61507dba88ecbd89" -"checksum regex 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "9329abc99e39129fcceabd24cf5d85b4671ef7c29c50e972bc5afe32438ec384" -"checksum regex-syntax 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)" = "7d707a4fa2637f2dca2ef9fd02225ec7661fe01a53623c1e6515b6916511f7a7" -"checksum remove_dir_all 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3488ba1b9a2084d38645c4c08276a1752dcbf2c7130d74f1569681ad5d2799c5" -"checksum rustc-demangle 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "76d7ba1feafada44f2d38eed812bd2489a03c0f5abb975799251518b68848649" -"checksum rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)" = "dcf128d1287d2ea9d80910b5f1120d0b8eede3fbf1abe91c40d39ea7d51e6fda" -"checksum same-file 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "cfb6eded0b06a0b512c8ddbcf04089138c9b4362c2f696f3c3d76039d68f3637" -"checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" -"checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" -"checksum serde 1.0.68 (registry+https://github.com/rust-lang/crates.io-index)" = "429fcc4efa8a11341b5422c2ace724daba276c1748467e869478f53c0ba4562e" -"checksum serde_derive 1.0.68 (registry+https://github.com/rust-lang/crates.io-index)" = "6a25ad0bf818ed2d180c89addbe29198d1de6c89ed08a48aa6a4d3d16a63cbfe" -"checksum serde_json 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)" = "84b8035cabe9b35878adec8ac5fe03d5f6bc97ff6edd7ccb96b44c1276ba390e" -"checksum skeptic 0.13.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c4474d6da9593171bcb086890fc344a3a12783cb24e5b141f8a5d0e43561f4b6" -"checksum strsim 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bb4f380125926a99e52bc279241539c018323fab05ad6368b56f93d9369ff550" -"checksum syn 0.14.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c67da57e61ebc7b7b6fff56bb34440ca3a83db037320b0507af4c10368deda7d" -"checksum tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "15f2b5fb00ccdf689e0149d1b1b3c03fead81c2b37735d812fa8bddbbf41b6d8" -"checksum termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "689a3bdfaab439fd92bc87df5c4c78417d3cbe537487274e9b0b2dce76e92096" -"checksum textwrap 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "307686869c93e71f94da64286f9a9524c0f308a9e1c87a583de8e9c9039ad3f6" -"checksum thread_local 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "279ef31c19ededf577bfd12dfae728040a21f635b06a24cd670ff510edd38963" -"checksum ucd-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "fd2be2d6639d0f8fe6cdda291ad456e23629558d466e2789d2c3e9892bda285d" -"checksum unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "882386231c45df4700b275c7ff55b6f3698780a650026380e72dabe76fa46526" -"checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" -"checksum unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "382810877fe448991dfc7f0dd6e3ae5d58088fd0ea5e35189655f84e6814fa56" -"checksum utf8-ranges 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "662fab6525a98beff2921d7f61a39e7d59e0b425ebc7d0d9e66d316e55124122" -"checksum vec_map 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "05c78687fb1a80548ae3250346c3db86a80a7cdd77bda190189f2d0a0987c81a" -"checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" -"checksum walkdir 2.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "63636bd0eb3d00ccb8b9036381b526efac53caf112b7783b730ab3f8e44da369" -"checksum winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "773ef9dcc5f24b7d850d0ff101e542ff24c3b090a9768e03ff889fdef41f00fd" -"checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" -"checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" diff --git a/zokrates_cli/Cargo.toml b/zokrates_cli/Cargo.toml index 0e5bbdb0..03701014 100644 --- a/zokrates_cli/Cargo.toml +++ b/zokrates_cli/Cargo.toml @@ -16,6 +16,7 @@ clap = "2.26.2" bincode = "0.8.0" regex = "0.2" zokrates_field = { version = "0.3", path = "../zokrates_field" } +zokrates_abi = { version = "0.1", path = "../zokrates_abi" } zokrates_core = { version = "0.3", path = "../zokrates_core" } zokrates_fs_resolver = { version = "0.4", path = "../zokrates_fs_resolver"} zokrates_github_resolver = { version = "0.1", path = "../zokrates_github_resolver", optional = true} diff --git a/zokrates_cli/src/bin.rs b/zokrates_cli/src/bin.rs index 6a5f44b0..41af65a1 100644 --- a/zokrates_cli/src/bin.rs +++ b/zokrates_cli/src/bin.rs @@ -12,6 +12,7 @@ use std::io::{stdin, BufReader, BufWriter, Read, Write}; use std::path::{Path, PathBuf}; use std::string::String; use std::{env, io}; +use zokrates_abi::Encode; use zokrates_core::compile::compile; use zokrates_core::ir; use zokrates_core::proof_system::*; @@ -176,10 +177,19 @@ fn cli() -> Result<(), String> { ).arg(Arg::with_name("arguments") .short("a") .long("arguments") - .help("Arguments for the program's main method as a space separated list") + .help("Arguments for the program's main function") .takes_value(true) .multiple(true) // allows multiple values .required(false) + ).arg(Arg::with_name("abi") + .long("abi") + .help("Use the ABI") + .required(false) + ).arg(Arg::with_name("stdin") + .long("stdin") + .help("Read arguments from stdin") + .conflicts_with("arguments") + .required(false) ).arg(Arg::with_name("light") .long("light") .help("Skip logs and human readable output") @@ -337,58 +347,79 @@ fn cli() -> Result<(), String> { println!("{}", program_ast); } - let expected_cli_args_count = - program_ast.public_arguments_count() + program_ast.private_arguments_count(); - let signature = program_ast.signature.clone(); - // get arguments - let arguments: Vec<_> = match sub_matches.values_of("arguments") { - // take inline arguments - Some(p) => p - .map(|x| FieldPrime::try_from_dec_str(x).map_err(|_| x.to_string())) - .collect(), - // take stdin arguments - None => { - if expected_cli_args_count > 0 { - let mut stdin = stdin(); - let mut input = String::new(); - match stdin.read_to_string(&mut input) { - Ok(_) => { - use zokrates_core::abi::{parse_strict, Encode}; + let is_stdin = sub_matches.is_present("stdin"); + let is_abi = sub_matches.is_present("abi"); - let parsed = parse_strict(&input, signature.inputs) - .map_err(|why| why.to_string())?; - Ok(parsed.encode()) + if !is_stdin && is_abi { + return Err( + "ABI input as inline argument is not supported. Please use `--stdin`.".into(), + ); + } + + use zokrates_abi::Inputs; + + // get arguments + let arguments = match is_stdin { + // take inline arguments + false => { + let arguments = sub_matches.values_of("arguments"); + arguments + .map(|a| { + a.map(|x| FieldPrime::try_from_dec_str(x).map_err(|_| x.to_string())) + .collect::, _>>() + }) + .unwrap_or(Ok(vec![])) + .map(|v| Inputs::Raw(v)) + } + // take stdin arguments + true => { + let mut stdin = stdin(); + let mut input = String::new(); + + match is_abi { + true => match stdin.read_to_string(&mut input) { + Ok(_) => { + use zokrates_abi::parse_strict; + + parse_strict(&input, signature.inputs) + .map(|parsed| Inputs::Abi(parsed)) + .map_err(|why| why.to_string()) } Err(_) => Err(String::from("???")), - } - } else { - Ok(vec![]) + }, + false => match program_ast.arguments_count() { + 0 => Ok(Inputs::Raw(vec![])), + _ => match stdin.read_to_string(&mut input) { + Ok(_) => { + input.retain(|x| x != '\n'); + input + .split(" ") + .map(|x| { + FieldPrime::try_from_dec_str(x) + .map_err(|_| x.to_string()) + }) + .collect::, _>>() + .map(|v| Inputs::Raw(v)) + } + Err(_) => Err(String::from("???")), + }, + }, } } } .map_err(|e| format!("Could not parse argument: {}", e))?; - if arguments.len() != expected_cli_args_count { - Err(format!( - "Wrong number of arguments. Given: {}, Required: {}.", - arguments.len(), - expected_cli_args_count - ))? - } - let witness = program_ast - .execute(&arguments) + .execute(arguments.encode()) .map_err(|e| format!("Execution failed: {}", e))?; - use zokrates_core::abi::Decode; + use zokrates_abi::Decode; - let results_json_value: serde_json::Value = zokrates_core::abi::CheckedValues::decode( - witness.return_values(), - signature.outputs, - ) - .into(); + let results_json_value: serde_json::Value = + zokrates_abi::CheckedValues::decode(witness.return_values(), signature.outputs) + .into(); println!("\nWitness: \n\n{}", results_json_value.to_string()); diff --git a/zokrates_core/src/ir/interpreter.rs b/zokrates_core/src/ir/interpreter.rs index 2546ec0e..b396a5b6 100644 --- a/zokrates_core/src/ir/interpreter.rs +++ b/zokrates_core/src/ir/interpreter.rs @@ -8,7 +8,7 @@ use zokrates_field::field::Field; pub type ExecutionResult = Result, Error>; impl Prog { - pub fn execute + Clone>(&self, inputs: &Vec) -> ExecutionResult { + pub fn execute(&self, inputs: Vec) -> ExecutionResult { let main = &self.main; self.check_inputs(&inputs)?; let mut witness = BTreeMap::new(); diff --git a/zokrates_core/src/ir/mod.rs b/zokrates_core/src/ir/mod.rs index 37141a1a..c483c646 100644 --- a/zokrates_core/src/ir/mod.rs +++ b/zokrates_core/src/ir/mod.rs @@ -122,12 +122,8 @@ impl Prog { .count() } - pub fn public_arguments_count(&self) -> usize { - self.private.iter().filter(|b| !**b).count() - } - - pub fn private_arguments_count(&self) -> usize { - self.private.iter().filter(|b| **b).count() + pub fn arguments_count(&self) -> usize { + self.private.len() } pub fn parameters(&self) -> Vec { diff --git a/zokrates_core/src/lib.rs b/zokrates_core/src/lib.rs index b0c06170..3b5463dc 100644 --- a/zokrates_core/src/lib.rs +++ b/zokrates_core/src/lib.rs @@ -34,11 +34,10 @@ mod optimizer; mod parser; mod semantics; mod static_analysis; -mod typed_absy; -pub mod abi; pub mod absy; pub mod compile; pub mod flat_absy; pub mod ir; pub mod proof_system; +pub mod typed_absy; diff --git a/zokrates_core/src/typed_absy/mod.rs b/zokrates_core/src/typed_absy/mod.rs index 7b6c3195..80814f27 100644 --- a/zokrates_core/src/typed_absy/mod.rs +++ b/zokrates_core/src/typed_absy/mod.rs @@ -11,9 +11,10 @@ pub mod types; mod variable; pub use crate::typed_absy::parameter::Parameter; +pub use crate::typed_absy::types::Type; pub use crate::typed_absy::variable::Variable; -use crate::typed_absy::types::{FunctionKey, MemberId, Signature, Type}; +use crate::typed_absy::types::{FunctionKey, MemberId, Signature}; use embed::FlatEmbed; use std::collections::HashMap; use std::convert::TryFrom; From b84b963e9769d1cc2f31c041740628ad04ee431b Mon Sep 17 00:00:00 2001 From: Thibaut Date: Sat, 28 Sep 2019 18:20:35 +0200 Subject: [PATCH 04/11] fix author --- zokrates_abi/Cargo.toml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/zokrates_abi/Cargo.toml b/zokrates_abi/Cargo.toml index b6557284..d4710737 100644 --- a/zokrates_abi/Cargo.toml +++ b/zokrates_abi/Cargo.toml @@ -1,11 +1,9 @@ [package] name = "zokrates_abi" version = "0.1.0" -authors = ["thibaut"] +authors = ["Thibaut Schaeffer "] edition = "2018" -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - [dependencies] zokrates_field = { version = "0.3", path = "../zokrates_field" } zokrates_core = { version = "0.3", path = "../zokrates_core" } From 4beb24a45715ef91d54dd4602d53c6daecc9099e Mon Sep 17 00:00:00 2001 From: Thibaut Date: Mon, 30 Sep 2019 15:02:32 +0200 Subject: [PATCH 05/11] adjust tests --- zokrates_core/src/embed.rs | 10 ++++- zokrates_core/src/optimizer/duplicate.rs | 4 ++ zokrates_core/src/proof_system/bn128/g16.rs | 9 ++-- .../src/proof_system/bn128/utils/bellman.rs | 41 +++++++++++-------- 4 files changed, 42 insertions(+), 22 deletions(-) diff --git a/zokrates_core/src/embed.rs b/zokrates_core/src/embed.rs index 6bcbdc12..2e59a4bb 100644 --- a/zokrates_core/src/embed.rs +++ b/zokrates_core/src/embed.rs @@ -419,11 +419,17 @@ mod tests { let prog = crate::ir::Prog { main: f, private: vec![true; 768], + signature: Signature::new() + .inputs(vec![Type::FieldElement; 768]) + .outputs(vec![Type::FieldElement; 256]), }; - let input = (0..512).map(|_| 0).chain((0..256).map(|_| 1)).collect(); + let input = (0..512) + .map(|_| FieldPrime::from(0)) + .chain((0..256).map(|_| FieldPrime::from(1))) + .collect(); - prog.execute(&input).unwrap(); + prog.execute(input).unwrap(); } } } diff --git a/zokrates_core/src/optimizer/duplicate.rs b/zokrates_core/src/optimizer/duplicate.rs index 0b7e9a26..c8203a30 100644 --- a/zokrates_core/src/optimizer/duplicate.rs +++ b/zokrates_core/src/optimizer/duplicate.rs @@ -49,6 +49,7 @@ impl Folder for DuplicateOptimizer { mod tests { use super::*; use flat_absy::FlatVariable; + use typed_absy::types::Signature; use zokrates_field::field::FieldPrime; #[test] @@ -78,6 +79,7 @@ mod tests { returns: vec![], arguments: vec![], }, + signature: Signature::new(), }; let expected = p.clone(); @@ -117,6 +119,7 @@ mod tests { returns: vec![], arguments: vec![], }, + signature: Signature::new(), }; let expected = Prog { @@ -136,6 +139,7 @@ mod tests { returns: vec![], arguments: vec![], }, + signature: Signature::new(), }; assert_eq!(DuplicateOptimizer::optimize(p), expected); diff --git a/zokrates_core/src/proof_system/bn128/g16.rs b/zokrates_core/src/proof_system/bn128/g16.rs index a5f26020..3fe67fb3 100644 --- a/zokrates_core/src/proof_system/bn128/g16.rs +++ b/zokrates_core/src/proof_system/bn128/g16.rs @@ -338,6 +338,7 @@ mod tests { use crate::flat_absy::FlatVariable; use crate::ir::*; use crate::proof_system::bn128::g16::serialize::serialize_proof; + use typed_absy::types::{Signature, Type}; #[allow(dead_code)] #[derive(Deserialize)] @@ -367,12 +368,12 @@ mod tests { )], }, private: vec![false], + signature: Signature::new() + .inputs(vec![Type::FieldElement]) + .outputs(vec![Type::FieldElement]), }; - let witness = program - .clone() - .execute::(&vec![FieldPrime::from(42)]) - .unwrap(); + let witness = program.clone().execute(vec![FieldPrime::from(42)]).unwrap(); let computation = Computation::with_witness(program, witness); let public_inputs_values = computation.public_inputs_values(); diff --git a/zokrates_core/src/proof_system/bn128/utils/bellman.rs b/zokrates_core/src/proof_system/bn128/utils/bellman.rs index c9fec557..b7a37de9 100644 --- a/zokrates_core/src/proof_system/bn128/utils/bellman.rs +++ b/zokrates_core/src/proof_system/bn128/utils/bellman.rs @@ -294,6 +294,7 @@ mod parse { mod tests { use super::*; use crate::ir::{Function, LinComb}; + use typed_absy::types::{Signature, Type}; use zokrates_field::field::FieldPrime; mod prove { @@ -309,9 +310,10 @@ mod tests { statements: vec![], }, private: vec![], + signature: Signature::new(), }; - let witness = program.clone().execute::(&vec![]).unwrap(); + let witness = program.clone().execute(vec![]).unwrap(); let computation = Computation::with_witness(program, witness); let params = computation.clone().setup(); @@ -331,12 +333,12 @@ mod tests { )], }, private: vec![true], + signature: Signature::new() + .inputs(vec![Type::FieldElement]) + .outputs(vec![Type::FieldElement]), }; - let witness = program - .clone() - .execute::(&vec![FieldPrime::from(0)]) - .unwrap(); + let witness = program.clone().execute(vec![FieldPrime::from(0)]).unwrap(); let computation = Computation::with_witness(program, witness); let params = computation.clone().setup(); @@ -356,12 +358,12 @@ mod tests { )], }, private: vec![false], + signature: Signature::new() + .inputs(vec![Type::FieldElement]) + .outputs(vec![Type::FieldElement]), }; - let witness = program - .clone() - .execute::(&vec![FieldPrime::from(0)]) - .unwrap(); + let witness = program.clone().execute(vec![FieldPrime::from(0)]).unwrap(); let computation = Computation::with_witness(program, witness); let params = computation.clone().setup(); @@ -381,9 +383,10 @@ mod tests { )], }, private: vec![], + signature: Signature::new().outputs(vec![Type::FieldElement]), }; - let witness = program.clone().execute::(&vec![]).unwrap(); + let witness = program.clone().execute(vec![]).unwrap(); let computation = Computation::with_witness(program, witness); let params = computation.clone().setup(); @@ -415,11 +418,14 @@ mod tests { ], }, private: vec![true, false], + signature: Signature::new() + .inputs(vec![Type::FieldElement, Type::FieldElement]) + .outputs(vec![Type::FieldElement, Type::FieldElement]), }; let witness = program .clone() - .execute::(&vec![FieldPrime::from(3), FieldPrime::from(4)]) + .execute(vec![FieldPrime::from(3), FieldPrime::from(4)]) .unwrap(); let computation = Computation::with_witness(program, witness); @@ -440,12 +446,12 @@ mod tests { )], }, private: vec![false], + signature: Signature::new() + .inputs(vec![Type::FieldElement]) + .outputs(vec![Type::FieldElement]), }; - let witness = program - .clone() - .execute::(&vec![FieldPrime::from(3)]) - .unwrap(); + let witness = program.clone().execute(vec![FieldPrime::from(3)]).unwrap(); let computation = Computation::with_witness(program, witness); let params = computation.clone().setup(); @@ -467,11 +473,14 @@ mod tests { )], }, private: vec![true, false], + signature: Signature::new() + .inputs(vec![Type::FieldElement, Type::FieldElement]) + .outputs(vec![Type::FieldElement]), }; let witness = program .clone() - .execute::(&vec![FieldPrime::from(3), FieldPrime::from(4)]) + .execute(vec![FieldPrime::from(3), FieldPrime::from(4)]) .unwrap(); let computation = Computation::with_witness(program, witness); From 6b0f8c788649266034b8cd7d49ba97adc7d4b1ad Mon Sep 17 00:00:00 2001 From: Thibaut Date: Mon, 30 Sep 2019 15:09:48 +0200 Subject: [PATCH 06/11] fix warning --- zokrates_abi/src/lib.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/zokrates_abi/src/lib.rs b/zokrates_abi/src/lib.rs index 81189e7a..9020a543 100644 --- a/zokrates_abi/src/lib.rs +++ b/zokrates_abi/src/lib.rs @@ -17,7 +17,6 @@ impl> Encode for Inputs { use std::collections::BTreeMap; use std::convert::TryFrom; use std::fmt; -use zokrates_core::ir::Prog; use zokrates_core::typed_absy::Type; use zokrates_field::field::Field; From 8f81dd0f0e9e7a646e1414e8154ac2295a3defac Mon Sep 17 00:00:00 2001 From: Thibaut Date: Mon, 30 Sep 2019 15:49:55 +0200 Subject: [PATCH 07/11] revert execute change --- zokrates_cli/src/bin.rs | 2 +- zokrates_core/src/embed.rs | 2 +- zokrates_core/src/ir/interpreter.rs | 2 +- zokrates_core/src/proof_system/bn128/g16.rs | 5 ++++- .../src/proof_system/bn128/utils/bellman.rs | 14 +++++++------- zokrates_test/src/lib.rs | 2 +- 6 files changed, 15 insertions(+), 12 deletions(-) diff --git a/zokrates_cli/src/bin.rs b/zokrates_cli/src/bin.rs index 4bc5afcb..7a68331c 100644 --- a/zokrates_cli/src/bin.rs +++ b/zokrates_cli/src/bin.rs @@ -412,7 +412,7 @@ fn cli() -> Result<(), String> { .map_err(|e| format!("Could not parse argument: {}", e))?; let witness = program_ast - .execute(arguments.encode()) + .execute(&arguments.encode()) .map_err(|e| format!("Execution failed: {}", e))?; use zokrates_abi::Decode; diff --git a/zokrates_core/src/embed.rs b/zokrates_core/src/embed.rs index 2e59a4bb..6ced72be 100644 --- a/zokrates_core/src/embed.rs +++ b/zokrates_core/src/embed.rs @@ -429,7 +429,7 @@ mod tests { .chain((0..256).map(|_| FieldPrime::from(1))) .collect(); - prog.execute(input).unwrap(); + prog.execute(&input).unwrap(); } } } diff --git a/zokrates_core/src/ir/interpreter.rs b/zokrates_core/src/ir/interpreter.rs index b396a5b6..65495aea 100644 --- a/zokrates_core/src/ir/interpreter.rs +++ b/zokrates_core/src/ir/interpreter.rs @@ -8,7 +8,7 @@ use zokrates_field::field::Field; pub type ExecutionResult = Result, Error>; impl Prog { - pub fn execute(&self, inputs: Vec) -> ExecutionResult { + pub fn execute(&self, inputs: &Vec) -> ExecutionResult { let main = &self.main; self.check_inputs(&inputs)?; let mut witness = BTreeMap::new(); diff --git a/zokrates_core/src/proof_system/bn128/g16.rs b/zokrates_core/src/proof_system/bn128/g16.rs index 3fe67fb3..ab692636 100644 --- a/zokrates_core/src/proof_system/bn128/g16.rs +++ b/zokrates_core/src/proof_system/bn128/g16.rs @@ -373,7 +373,10 @@ mod tests { .outputs(vec![Type::FieldElement]), }; - let witness = program.clone().execute(vec![FieldPrime::from(42)]).unwrap(); + let witness = program + .clone() + .execute(&vec![FieldPrime::from(42)]) + .unwrap(); let computation = Computation::with_witness(program, witness); let public_inputs_values = computation.public_inputs_values(); diff --git a/zokrates_core/src/proof_system/bn128/utils/bellman.rs b/zokrates_core/src/proof_system/bn128/utils/bellman.rs index b7a37de9..4d06afae 100644 --- a/zokrates_core/src/proof_system/bn128/utils/bellman.rs +++ b/zokrates_core/src/proof_system/bn128/utils/bellman.rs @@ -313,7 +313,7 @@ mod tests { signature: Signature::new(), }; - let witness = program.clone().execute(vec![]).unwrap(); + let witness = program.clone().execute(&vec![]).unwrap(); let computation = Computation::with_witness(program, witness); let params = computation.clone().setup(); @@ -338,7 +338,7 @@ mod tests { .outputs(vec![Type::FieldElement]), }; - let witness = program.clone().execute(vec![FieldPrime::from(0)]).unwrap(); + let witness = program.clone().execute(&vec![FieldPrime::from(0)]).unwrap(); let computation = Computation::with_witness(program, witness); let params = computation.clone().setup(); @@ -363,7 +363,7 @@ mod tests { .outputs(vec![Type::FieldElement]), }; - let witness = program.clone().execute(vec![FieldPrime::from(0)]).unwrap(); + let witness = program.clone().execute(&vec![FieldPrime::from(0)]).unwrap(); let computation = Computation::with_witness(program, witness); let params = computation.clone().setup(); @@ -386,7 +386,7 @@ mod tests { signature: Signature::new().outputs(vec![Type::FieldElement]), }; - let witness = program.clone().execute(vec![]).unwrap(); + let witness = program.clone().execute(&vec![]).unwrap(); let computation = Computation::with_witness(program, witness); let params = computation.clone().setup(); @@ -425,7 +425,7 @@ mod tests { let witness = program .clone() - .execute(vec![FieldPrime::from(3), FieldPrime::from(4)]) + .execute(&vec![FieldPrime::from(3), FieldPrime::from(4)]) .unwrap(); let computation = Computation::with_witness(program, witness); @@ -451,7 +451,7 @@ mod tests { .outputs(vec![Type::FieldElement]), }; - let witness = program.clone().execute(vec![FieldPrime::from(3)]).unwrap(); + let witness = program.clone().execute(&vec![FieldPrime::from(3)]).unwrap(); let computation = Computation::with_witness(program, witness); let params = computation.clone().setup(); @@ -480,7 +480,7 @@ mod tests { let witness = program .clone() - .execute(vec![FieldPrime::from(3), FieldPrime::from(4)]) + .execute(&vec![FieldPrime::from(3), FieldPrime::from(4)]) .unwrap(); let computation = Computation::with_witness(program, witness); diff --git a/zokrates_test/src/lib.rs b/zokrates_test/src/lib.rs index e3ee2632..f6376522 100644 --- a/zokrates_test/src/lib.rs +++ b/zokrates_test/src/lib.rs @@ -94,7 +94,7 @@ pub fn test_inner(test_path: &str) { for test in t.tests.into_iter() { let input = &test.input.values; let output = bin.execute( - input + &input .iter() .map(|v| FieldPrime::try_from_dec_str(&v.clone()).unwrap()) .collect(), From aa4e3cfe4c9f77edf2e4dfe0275039f6d157160f Mon Sep 17 00:00:00 2001 From: Thibaut Date: Mon, 30 Sep 2019 17:51:40 +0200 Subject: [PATCH 08/11] add stdin flag --- zokrates_cli/tests/integration.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/zokrates_cli/tests/integration.rs b/zokrates_cli/tests/integration.rs index 972685ad..7ff809bd 100644 --- a/zokrates_cli/tests/integration.rs +++ b/zokrates_cli/tests/integration.rs @@ -133,6 +133,7 @@ mod integration { flattened_path.to_str().unwrap(), "-o", witness_path.to_str().unwrap(), + "--stdin", ]; assert_cli::Assert::command(&compute) From a20e19a043f064e3084870c200201afd5126de59 Mon Sep 17 00:00:00 2001 From: JacobEberhardt Date: Mon, 7 Oct 2019 18:04:41 +0900 Subject: [PATCH 09/11] refactoring for clarity --- zokrates_cli/src/bin.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/zokrates_cli/src/bin.rs b/zokrates_cli/src/bin.rs index 7a68331c..9def3e13 100644 --- a/zokrates_cli/src/bin.rs +++ b/zokrates_cli/src/bin.rs @@ -339,15 +339,15 @@ fn cli() -> Result<(), String> { let mut reader = BufReader::new(file); - let program_ast: ir::Prog = + let ir_prog: ir::Prog = deserialize_from(&mut reader, Infinite).map_err(|why| why.to_string())?; // print deserialized flattened program if !sub_matches.is_present("light") { - println!("{}", program_ast); + println!("{}", ir_prog); } - let signature = program_ast.signature.clone(); + let signature = ir_prog.signature.clone(); let is_stdin = sub_matches.is_present("stdin"); let is_abi = sub_matches.is_present("abi"); @@ -389,7 +389,7 @@ fn cli() -> Result<(), String> { } Err(_) => Err(String::from("???")), }, - false => match program_ast.arguments_count() { + false => match ir_prog.arguments_count() { 0 => Ok(Inputs::Raw(vec![])), _ => match stdin.read_to_string(&mut input) { Ok(_) => { @@ -411,7 +411,7 @@ fn cli() -> Result<(), String> { } .map_err(|e| format!("Could not parse argument: {}", e))?; - let witness = program_ast + let witness = ir_prog .execute(&arguments.encode()) .map_err(|e| format!("Execution failed: {}", e))?; From 123208ccf4a7e73301cd8b390e8e2ea5cae77fa2 Mon Sep 17 00:00:00 2001 From: JacobEberhardt Date: Tue, 8 Oct 2019 13:10:29 +0900 Subject: [PATCH 10/11] Updated cli tests to use json-abi and raw inputs. --- .../tests/code/arithmetics.arguments.json | 4 +- .../tests/code/if_else_false.arguments.json | 4 +- .../tests/code/if_else_true.arguments.json | 4 +- .../tests/code/multidim_update.arguments.json | 8 +- .../tests/code/n_choose_k.arguments.json | 5 +- .../tests/code/no_return.arguments.json | 4 +- .../tests/code/return_array.arguments.json | 11 +- .../tests/code/sha_round.arguments.json | 259 +++++++++++++++++- .../tests/code/simple_add.arguments.json | 5 +- .../tests/code/simple_mul.arguments.json | 6 +- .../tests/code/taxation.arguments.json | 5 +- zokrates_cli/tests/integration.rs | 95 ++++--- 12 files changed, 355 insertions(+), 55 deletions(-) diff --git a/zokrates_cli/tests/code/arithmetics.arguments.json b/zokrates_cli/tests/code/arithmetics.arguments.json index c57d705b..70faac20 100644 --- a/zokrates_cli/tests/code/arithmetics.arguments.json +++ b/zokrates_cli/tests/code/arithmetics.arguments.json @@ -1,4 +1,4 @@ [ - 1, - 2 + "1", + "2" ] \ No newline at end of file diff --git a/zokrates_cli/tests/code/if_else_false.arguments.json b/zokrates_cli/tests/code/if_else_false.arguments.json index 6e7ea636..45abfef6 100644 --- a/zokrates_cli/tests/code/if_else_false.arguments.json +++ b/zokrates_cli/tests/code/if_else_false.arguments.json @@ -1 +1,3 @@ -[0] \ No newline at end of file +[ + "0" +] \ No newline at end of file diff --git a/zokrates_cli/tests/code/if_else_true.arguments.json b/zokrates_cli/tests/code/if_else_true.arguments.json index bace2a0b..51ba4f97 100644 --- a/zokrates_cli/tests/code/if_else_true.arguments.json +++ b/zokrates_cli/tests/code/if_else_true.arguments.json @@ -1 +1,3 @@ -[1] \ No newline at end of file +[ + "1" +] \ No newline at end of file diff --git a/zokrates_cli/tests/code/multidim_update.arguments.json b/zokrates_cli/tests/code/multidim_update.arguments.json index 2f4b5615..4e70cf89 100644 --- a/zokrates_cli/tests/code/multidim_update.arguments.json +++ b/zokrates_cli/tests/code/multidim_update.arguments.json @@ -1,6 +1,6 @@ [ - 0, - 0, - 0, - 0 + "0", + "0", + "0", + "0" ] \ No newline at end of file diff --git a/zokrates_cli/tests/code/n_choose_k.arguments.json b/zokrates_cli/tests/code/n_choose_k.arguments.json index 93317aa2..2ef9360d 100644 --- a/zokrates_cli/tests/code/n_choose_k.arguments.json +++ b/zokrates_cli/tests/code/n_choose_k.arguments.json @@ -1 +1,4 @@ -[5, 1] \ No newline at end of file +[ + "5", + "1" +] \ No newline at end of file diff --git a/zokrates_cli/tests/code/no_return.arguments.json b/zokrates_cli/tests/code/no_return.arguments.json index 9b3abfd7..6d113a65 100644 --- a/zokrates_cli/tests/code/no_return.arguments.json +++ b/zokrates_cli/tests/code/no_return.arguments.json @@ -1,4 +1,4 @@ [ - 1, - 1 + "1", + "1" ] \ No newline at end of file diff --git a/zokrates_cli/tests/code/return_array.arguments.json b/zokrates_cli/tests/code/return_array.arguments.json index d0360628..ba79f117 100644 --- a/zokrates_cli/tests/code/return_array.arguments.json +++ b/zokrates_cli/tests/code/return_array.arguments.json @@ -1 +1,10 @@ -[1, 1, 1, 2, 3, 3, 3, 3] \ No newline at end of file +[ + "1", + "1", + "1", + "2", + "3", + "3", + "3", + "3" +] \ No newline at end of file diff --git a/zokrates_cli/tests/code/sha_round.arguments.json b/zokrates_cli/tests/code/sha_round.arguments.json index 5e2441a0..18486392 100644 --- a/zokrates_cli/tests/code/sha_round.arguments.json +++ b/zokrates_cli/tests/code/sha_round.arguments.json @@ -1 +1,258 @@ -[0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1] \ No newline at end of file +[ + "0", + "0", + "0", + "1", + "1", + "1", + "1", + "1", + "0", + "0", + "1", + "1", + "1", + "0", + "1", + "1", + "1", + "0", + "0", + "0", + "1", + "0", + "1", + "1", + "1", + "0", + "0", + "1", + "1", + "0", + "0", + "0", + "1", + "1", + "0", + "0", + "0", + "0", + "1", + "0", + "0", + "0", + "0", + "1", + "1", + "1", + "1", + "0", + "1", + "0", + "1", + "1", + "1", + "0", + "0", + "0", + "1", + "0", + "0", + "1", + "0", + "1", + "0", + "0", + "0", + "0", + "1", + "1", + "1", + "1", + "0", + "0", + "1", + "0", + "0", + "0", + "1", + "1", + "1", + "0", + "1", + "1", + "1", + "0", + "0", + "0", + "1", + "1", + "0", + "0", + "1", + "1", + "0", + "0", + "1", + "0", + "0", + "0", + "1", + "0", + "1", + "1", + "0", + "0", + "0", + "0", + "0", + "1", + "0", + "1", + "0", + "0", + "0", + "0", + "0", + "1", + "0", + "1", + "0", + "0", + "1", + "0", + "1", + "1", + "0", + "1", + "1", + "0", + "0", + "0", + "0", + "1", + "0", + "0", + "0", + "0", + "0", + "1", + "0", + "1", + "0", + "1", + "0", + "1", + "0", + "1", + "1", + "0", + "0", + "0", + "1", + "0", + "0", + "1", + "1", + "0", + "0", + "0", + "0", + "1", + "0", + "1", + "0", + "0", + "1", + "1", + "1", + "0", + "0", + "1", + "1", + "1", + "0", + "0", + "1", + "1", + "1", + "0", + "0", + "0", + "1", + "1", + "1", + "1", + "0", + "0", + "1", + "1", + "0", + "1", + "0", + "1", + "1", + "1", + "1", + "0", + "1", + "1", + "1", + "1", + "0", + "0", + "0", + "1", + "0", + "0", + "1", + "1", + "1", + "0", + "1", + "0", + "0", + "0", + "0", + "0", + "0", + "1", + "1", + "1", + "1", + "0", + "1", + "1", + "1", + "1", + "1", + "0", + "1", + "0", + "1", + "0", + "1", + "1", + "0", + "0", + "1", + "1", + "0", + "0", + "0", + "0", + "1", + "1", + "1", + "1", + "0", + "1", + "0", + "0", + "1", + "0", + "1", + "1", + "0", + "1" +] \ No newline at end of file diff --git a/zokrates_cli/tests/code/simple_add.arguments.json b/zokrates_cli/tests/code/simple_add.arguments.json index fd8ef095..70faac20 100644 --- a/zokrates_cli/tests/code/simple_add.arguments.json +++ b/zokrates_cli/tests/code/simple_add.arguments.json @@ -1 +1,4 @@ -[1, 2] \ No newline at end of file +[ + "1", + "2" +] \ No newline at end of file diff --git a/zokrates_cli/tests/code/simple_mul.arguments.json b/zokrates_cli/tests/code/simple_mul.arguments.json index f26b6970..f9ca65e0 100644 --- a/zokrates_cli/tests/code/simple_mul.arguments.json +++ b/zokrates_cli/tests/code/simple_mul.arguments.json @@ -1 +1,5 @@ -[2, 3, 4] \ No newline at end of file +[ + "2", + "3", + "4" +] \ No newline at end of file diff --git a/zokrates_cli/tests/code/taxation.arguments.json b/zokrates_cli/tests/code/taxation.arguments.json index ecb0a5bd..030cb431 100644 --- a/zokrates_cli/tests/code/taxation.arguments.json +++ b/zokrates_cli/tests/code/taxation.arguments.json @@ -1 +1,4 @@ -[15, 12] \ No newline at end of file +[ + "15", + "12" +] \ No newline at end of file diff --git a/zokrates_cli/tests/integration.rs b/zokrates_cli/tests/integration.rs index 7ff809bd..63d70a52 100644 --- a/zokrates_cli/tests/integration.rs +++ b/zokrates_cli/tests/integration.rs @@ -4,14 +4,16 @@ extern crate serde_json; #[cfg(test)] mod integration { use assert_cli; - use serde_json; - use serde_json::Value; + use bincode::{deserialize_from, Infinite}; use std::fs; use std::fs::File; - use std::io::prelude::*; + use std::io::{BufReader, Read}; use std::panic; use std::path::Path; use tempdir::TempDir; + use zokrates_abi::{parse_strict, Encode}; + use zokrates_core::ir; + use zokrates_field::field::FieldPrime; #[test] #[ignore] @@ -29,8 +31,13 @@ mod integration { Path::new(Path::new(path.file_stem().unwrap()).file_stem().unwrap()); let prog = dir.join(program_name).with_extension("zok"); let witness = dir.join(program_name).with_extension("expected.witness"); - let args = dir.join(program_name).with_extension("arguments.json"); - test_compile_and_witness(program_name.to_str().unwrap(), &prog, &args, &witness); + let json_input = dir.join(program_name).with_extension("arguments.json"); + test_compile_and_witness( + program_name.to_str().unwrap(), + &prog, + &json_input, + &witness, + ); } } } @@ -47,7 +54,7 @@ mod integration { fn test_compile_and_witness( program_name: &str, program_path: &Path, - arguments_path: &Path, + inputs_path: &Path, expected_witness_path: &Path, ) { let tmp_dir = TempDir::new(".tmp").unwrap(); @@ -88,24 +95,51 @@ mod integration { assert_cli::Assert::command(&compile).succeeds().unwrap(); // COMPUTE_WITNESS - let arguments: Value = - serde_json::from_reader(File::open(arguments_path).unwrap()).unwrap(); - let arguments_str_list: Vec = arguments - .as_array() - .unwrap() - .iter() - .map(|i| match *i { - Value::Number(ref n) => n.to_string(), - _ => panic!(format!( - "Cannot read arguments. Check {}", - arguments_path.to_str().unwrap() - )), - }) + // derive program signature from IR program representation + let file = File::open(&flattened_path) + .map_err(|why| format!("couldn't open {}: {}", flattened_path.display(), why)) + .unwrap(); + + let mut reader = BufReader::new(file); + + let ir_prog: ir::Prog = deserialize_from(&mut reader, Infinite) + .map_err(|why| why.to_string()) + .unwrap(); + + let signature = ir_prog.signature.clone(); + + // run witness-computation for ABI-encoded inputs through stdin + let json_input_str = fs::read_to_string(inputs_path).unwrap(); + + let compute = vec![ + "../target/release/zokrates", + "compute-witness", + "-i", + flattened_path.to_str().unwrap(), + "-o", + witness_path.to_str().unwrap(), + "--stdin", + "--abi", + ]; + + assert_cli::Assert::command(&compute) + .stdin(&json_input_str) + .succeeds() + .unwrap(); + + // run witness-computation for raw-encoded inputs (converted) with `-a ` + let inputs_abi: zokrates_abi::Inputs = + parse_strict(&json_input_str, signature.inputs) + .map(|parsed| zokrates_abi::Inputs::Abi(parsed)) + .map_err(|why| why.to_string()) + .unwrap(); + let inputs_raw: Vec<_> = inputs_abi + .encode() + .into_iter() + .map(|v| v.to_string()) .collect(); - // WITH `-a ` - let mut compute_inline = vec![ "../target/release/zokrates", "compute-witness", @@ -116,7 +150,7 @@ mod integration { "-a", ]; - for arg in arguments_str_list.iter() { + for arg in &inputs_raw { compute_inline.push(arg); } @@ -124,23 +158,6 @@ mod integration { .succeeds() .unwrap(); - // WITH stdin ARGUMENTS - - let compute = vec![ - "../target/release/zokrates", - "compute-witness", - "-i", - flattened_path.to_str().unwrap(), - "-o", - witness_path.to_str().unwrap(), - "--stdin", - ]; - - assert_cli::Assert::command(&compute) - .stdin(&arguments_str_list.join(" ")) - .succeeds() - .unwrap(); - // load the expected witness let mut expected_witness_file = File::open(&expected_witness_path).unwrap(); let mut expected_witness = String::new(); From f0af57c3af16def84678d2bdcb0dab4a68fe1546 Mon Sep 17 00:00:00 2001 From: JacobEberhardt Date: Tue, 8 Oct 2019 13:27:48 +0900 Subject: [PATCH 11/11] Adjust json inputs to account for arrays. --- .../tests/code/multidim_update.arguments.json | 14 +- .../tests/code/return_array.arguments.json | 18 +- .../tests/code/sha_round.arguments.json | 514 +++++++++--------- 3 files changed, 279 insertions(+), 267 deletions(-) diff --git a/zokrates_cli/tests/code/multidim_update.arguments.json b/zokrates_cli/tests/code/multidim_update.arguments.json index 4e70cf89..607a017d 100644 --- a/zokrates_cli/tests/code/multidim_update.arguments.json +++ b/zokrates_cli/tests/code/multidim_update.arguments.json @@ -1,6 +1,12 @@ [ - "0", - "0", - "0", - "0" + [ + [ + "0", + "0" + ], + [ + "0", + "0" + ] + ] ] \ No newline at end of file diff --git a/zokrates_cli/tests/code/return_array.arguments.json b/zokrates_cli/tests/code/return_array.arguments.json index ba79f117..70ac3a6c 100644 --- a/zokrates_cli/tests/code/return_array.arguments.json +++ b/zokrates_cli/tests/code/return_array.arguments.json @@ -1,10 +1,14 @@ [ - "1", - "1", - "1", + [ + "1", + "1", + "1" + ], "2", - "3", - "3", - "3", - "3" + [ + "3", + "3", + "3", + "3" + ] ] \ No newline at end of file diff --git a/zokrates_cli/tests/code/sha_round.arguments.json b/zokrates_cli/tests/code/sha_round.arguments.json index 18486392..b0eb4bb3 100644 --- a/zokrates_cli/tests/code/sha_round.arguments.json +++ b/zokrates_cli/tests/code/sha_round.arguments.json @@ -1,258 +1,260 @@ [ - "0", - "0", - "0", - "1", - "1", - "1", - "1", - "1", - "0", - "0", - "1", - "1", - "1", - "0", - "1", - "1", - "1", - "0", - "0", - "0", - "1", - "0", - "1", - "1", - "1", - "0", - "0", - "1", - "1", - "0", - "0", - "0", - "1", - "1", - "0", - "0", - "0", - "0", - "1", - "0", - "0", - "0", - "0", - "1", - "1", - "1", - "1", - "0", - "1", - "0", - "1", - "1", - "1", - "0", - "0", - "0", - "1", - "0", - "0", - "1", - "0", - "1", - "0", - "0", - "0", - "0", - "1", - "1", - "1", - "1", - "0", - "0", - "1", - "0", - "0", - "0", - "1", - "1", - "1", - "0", - "1", - "1", - "1", - "0", - "0", - "0", - "1", - "1", - "0", - "0", - "1", - "1", - "0", - "0", - "1", - "0", - "0", - "0", - "1", - "0", - "1", - "1", - "0", - "0", - "0", - "0", - "0", - "1", - "0", - "1", - "0", - "0", - "0", - "0", - "0", - "1", - "0", - "1", - "0", - "0", - "1", - "0", - "1", - "1", - "0", - "1", - "1", - "0", - "0", - "0", - "0", - "1", - "0", - "0", - "0", - "0", - "0", - "1", - "0", - "1", - "0", - "1", - "0", - "1", - "0", - "1", - "1", - "0", - "0", - "0", - "1", - "0", - "0", - "1", - "1", - "0", - "0", - "0", - "0", - "1", - "0", - "1", - "0", - "0", - "1", - "1", - "1", - "0", - "0", - "1", - "1", - "1", - "0", - "0", - "1", - "1", - "1", - "0", - "0", - "0", - "1", - "1", - "1", - "1", - "0", - "0", - "1", - "1", - "0", - "1", - "0", - "1", - "1", - "1", - "1", - "0", - "1", - "1", - "1", - "1", - "0", - "0", - "0", - "1", - "0", - "0", - "1", - "1", - "1", - "0", - "1", - "0", - "0", - "0", - "0", - "0", - "0", - "1", - "1", - "1", - "1", - "0", - "1", - "1", - "1", - "1", - "1", - "0", - "1", - "0", - "1", - "0", - "1", - "1", - "0", - "0", - "1", - "1", - "0", - "0", - "0", - "0", - "1", - "1", - "1", - "1", - "0", - "1", - "0", - "0", - "1", - "0", - "1", - "1", - "0", - "1" + [ + "0", + "0", + "0", + "1", + "1", + "1", + "1", + "1", + "0", + "0", + "1", + "1", + "1", + "0", + "1", + "1", + "1", + "0", + "0", + "0", + "1", + "0", + "1", + "1", + "1", + "0", + "0", + "1", + "1", + "0", + "0", + "0", + "1", + "1", + "0", + "0", + "0", + "0", + "1", + "0", + "0", + "0", + "0", + "1", + "1", + "1", + "1", + "0", + "1", + "0", + "1", + "1", + "1", + "0", + "0", + "0", + "1", + "0", + "0", + "1", + "0", + "1", + "0", + "0", + "0", + "0", + "1", + "1", + "1", + "1", + "0", + "0", + "1", + "0", + "0", + "0", + "1", + "1", + "1", + "0", + "1", + "1", + "1", + "0", + "0", + "0", + "1", + "1", + "0", + "0", + "1", + "1", + "0", + "0", + "1", + "0", + "0", + "0", + "1", + "0", + "1", + "1", + "0", + "0", + "0", + "0", + "0", + "1", + "0", + "1", + "0", + "0", + "0", + "0", + "0", + "1", + "0", + "1", + "0", + "0", + "1", + "0", + "1", + "1", + "0", + "1", + "1", + "0", + "0", + "0", + "0", + "1", + "0", + "0", + "0", + "0", + "0", + "1", + "0", + "1", + "0", + "1", + "0", + "1", + "0", + "1", + "1", + "0", + "0", + "0", + "1", + "0", + "0", + "1", + "1", + "0", + "0", + "0", + "0", + "1", + "0", + "1", + "0", + "0", + "1", + "1", + "1", + "0", + "0", + "1", + "1", + "1", + "0", + "0", + "1", + "1", + "1", + "0", + "0", + "0", + "1", + "1", + "1", + "1", + "0", + "0", + "1", + "1", + "0", + "1", + "0", + "1", + "1", + "1", + "1", + "0", + "1", + "1", + "1", + "1", + "0", + "0", + "0", + "1", + "0", + "0", + "1", + "1", + "1", + "0", + "1", + "0", + "0", + "0", + "0", + "0", + "0", + "1", + "1", + "1", + "1", + "0", + "1", + "1", + "1", + "1", + "1", + "0", + "1", + "0", + "1", + "0", + "1", + "1", + "0", + "0", + "1", + "1", + "0", + "0", + "0", + "0", + "1", + "1", + "1", + "1", + "0", + "1", + "0", + "0", + "1", + "0", + "1", + "1", + "0", + "1" + ] ] \ No newline at end of file