use new integers path

This commit is contained in:
collin 2020-06-04 13:35:12 -07:00
parent 110bca2463
commit ab6ed9cfe6
19 changed files with 151 additions and 20 deletions

102
Cargo.lock generated
View File

@ -260,6 +260,36 @@ dependencies = [
"subtle",
]
[[package]]
name = "curl"
version = "0.4.29"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "762e34611d2d5233a506a79072be944fddd057db2f18e04c0d6fa79e3fd466fd"
dependencies = [
"curl-sys",
"libc",
"openssl-probe",
"openssl-sys",
"schannel",
"socket2",
"winapi",
]
[[package]]
name = "curl-sys"
version = "0.4.31+curl-7.70.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dcd62757cc4f5ab9404bc6ca9f0ae447e729a1403948ce5106bd588ceac6a3b0"
dependencies = [
"cc",
"libc",
"libz-sys",
"openssl-sys",
"pkg-config",
"vcpkg",
"winapi",
]
[[package]]
name = "derivative"
version = "2.1.1"
@ -517,6 +547,18 @@ dependencies = [
"libc",
]
[[package]]
name = "libz-sys"
version = "1.0.25"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2eb5e43362e38e2bca2fd5f5134c4d4564a23a5c28e9b95411652021a8675ebe"
dependencies = [
"cc",
"libc",
"pkg-config",
"vcpkg",
]
[[package]]
name = "log"
version = "0.4.8"
@ -579,6 +621,25 @@ version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c"
[[package]]
name = "openssl-probe"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de"
[[package]]
name = "openssl-sys"
version = "0.9.57"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7410fef80af8ac071d4f63755c0ab89ac3df0fd1ea91f1d1f37cf5cec4395990"
dependencies = [
"autocfg",
"cc",
"libc",
"pkg-config",
"vcpkg",
]
[[package]]
name = "peeking_take_while"
version = "0.1.2"
@ -641,6 +702,12 @@ dependencies = [
"sha-1",
]
[[package]]
name = "pkg-config"
version = "0.3.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "05da548ad6865900e60eaba7f589cc0783590a92e940c26953ff81ddbab2d677"
[[package]]
name = "ppv-lite86"
version = "0.2.6"
@ -789,6 +856,12 @@ dependencies = [
"num_cpus",
]
[[package]]
name = "redox_syscall"
version = "0.1.56"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2439c63f3f6139d1b57529d16bc3b8bb855230c8efcc5d3a896c8bea7c3b1e84"
[[package]]
name = "regex"
version = "1.3.4"
@ -835,6 +908,16 @@ version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bfa8506c1de11c9c4e4c38863ccbe02a305c8188e85a05a784c9e11e1c3910c8"
[[package]]
name = "schannel"
version = "0.1.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8f05ba609c234e60bee0d547fe94a4c7e9da733d1c962cf6e59efa4cd9c8bc75"
dependencies = [
"lazy_static",
"winapi",
]
[[package]]
name = "scopeguard"
version = "1.1.0"
@ -951,6 +1034,7 @@ name = "snarkos-errors"
version = "0.8.0"
dependencies = [
"bincode",
"curl",
"hex",
"jsonrpc-core",
"rocksdb",
@ -993,6 +1077,18 @@ dependencies = [
"rand",
]
[[package]]
name = "socket2"
version = "0.3.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "03088793f677dce356f3ccc2edb1b314ad191ab702a5de3faf49304f7e104918"
dependencies = [
"cfg-if",
"libc",
"redox_syscall",
"winapi",
]
[[package]]
name = "strsim"
version = "0.8.0"
@ -1166,6 +1262,12 @@ version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c"
[[package]]
name = "vcpkg"
version = "0.2.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "55d1e41d56121e07f1e223db0a4def204e45c85425f6a16d462fd07c8d10d74c"
[[package]]
name = "vec_map"
version = "0.8.1"

3
Leo.toml Normal file
View File

@ -0,0 +1,3 @@
[package]
name = "language"
version = "0.1.0"

View File

@ -13,8 +13,9 @@ use snarkos_models::{
gadgets::{
r1cs::ConstraintSystem,
utilities::{
boolean::Boolean, select::CondSelectGadget, uint128::UInt128, uint16::UInt16,
uint32::UInt32, uint64::UInt64, uint8::UInt8,
boolean::Boolean,
select::CondSelectGadget,
uint::{UInt128, UInt16, UInt32, UInt64, UInt8},
},
},
};

View File

@ -12,7 +12,11 @@ use snarkos_models::{
curves::{Field, PrimeField},
gadgets::{
r1cs::ConstraintSystem,
utilities::{alloc::AllocGadget, eq::EqGadget, uint128::UInt128},
utilities::{
alloc::AllocGadget,
eq::EqGadget,
uint::{UInt, UInt128},
},
},
};

View File

@ -12,7 +12,11 @@ use snarkos_models::{
curves::{Field, PrimeField},
gadgets::{
r1cs::ConstraintSystem,
utilities::{alloc::AllocGadget, eq::EqGadget, uint16::UInt16},
utilities::{
alloc::AllocGadget,
eq::EqGadget,
uint::{UInt, UInt16},
},
},
};

View File

@ -12,7 +12,11 @@ use snarkos_models::{
curves::{Field, PrimeField},
gadgets::{
r1cs::ConstraintSystem,
utilities::{alloc::AllocGadget, eq::EqGadget, uint32::UInt32},
utilities::{
alloc::AllocGadget,
eq::EqGadget,
uint::{UInt, UInt32},
},
},
};

View File

@ -12,7 +12,11 @@ use snarkos_models::{
curves::{Field, PrimeField},
gadgets::{
r1cs::ConstraintSystem,
utilities::{alloc::AllocGadget, eq::EqGadget, uint64::UInt64},
utilities::{
alloc::AllocGadget,
eq::EqGadget,
uint::{UInt, UInt64},
},
},
};

View File

@ -12,7 +12,11 @@ use snarkos_models::{
curves::{Field, PrimeField},
gadgets::{
r1cs::ConstraintSystem,
utilities::{alloc::AllocGadget, eq::EqGadget, uint8::UInt8},
utilities::{
alloc::AllocGadget,
eq::EqGadget,
uint::{UInt, UInt8},
},
},
};

View File

@ -15,7 +15,7 @@ use snarkos_models::{
curves::{Field, PrimeField},
gadgets::{
r1cs::ConstraintSystem,
utilities::{boolean::Boolean, eq::EqGadget, uint32::UInt32},
utilities::{boolean::Boolean, eq::EqGadget, uint::UInt32},
},
};

View File

@ -9,8 +9,8 @@ use crate::{
use snarkos_models::{
curves::{Field, PrimeField},
gadgets::utilities::{
boolean::Boolean, uint128::UInt128, uint16::UInt16, uint32::UInt32, uint64::UInt64,
uint8::UInt8,
boolean::Boolean,
uint::{UInt128, UInt16, UInt32, UInt64, UInt8},
},
};
use std::fmt;

View File

@ -14,7 +14,7 @@ use snarkos_models::{
boolean::Boolean,
eq::{ConditionalEqGadget, EqGadget},
select::CondSelectGadget,
uint8::UInt8,
uint::UInt8,
ToBitsGadget, ToBytesGadget,
},
},

View File

@ -16,7 +16,7 @@ use snarkos_models::{
boolean::Boolean,
eq::{ConditionalEqGadget, EqGadget},
select::CondSelectGadget,
uint8::UInt8,
uint::UInt8,
ToBitsGadget, ToBytesGadget,
},
},

View File

@ -4,8 +4,8 @@
use crate::Import;
use snarkos_models::gadgets::utilities::{
boolean::Boolean, uint128::UInt128, uint16::UInt16, uint32::UInt32, uint64::UInt64,
uint8::UInt8,
boolean::Boolean,
uint::{UInt128, UInt16, UInt32, UInt64, UInt8},
};
use std::collections::HashMap;

View File

@ -3,8 +3,8 @@
use crate::{ast, types, Import, ImportSymbol};
use snarkos_models::gadgets::utilities::{
boolean::Boolean, uint128::UInt128, uint16::UInt16, uint32::UInt32, uint64::UInt64,
uint8::UInt8,
boolean::Boolean,
uint::{UInt128, UInt16, UInt32, UInt64, UInt8},
};
use std::collections::HashMap;

View File

@ -4,7 +4,7 @@ use leo_compiler::{
ConstrainedValue, InputValue, Integer,
};
use snarkos_models::gadgets::utilities::uint32::UInt32;
use snarkos_models::gadgets::utilities::uint::UInt32;
const DIRECTORY_NAME: &str = "tests/array/";

View File

@ -8,7 +8,7 @@ use leo_compiler::{
Statement, Type,
};
use snarkos_models::gadgets::utilities::uint32::UInt32;
use snarkos_models::gadgets::utilities::uint::UInt32;
const DIRECTORY_NAME: &str = "tests/circuit/";

View File

@ -5,7 +5,7 @@ use leo_compiler::{
ConstrainedValue, InputValue,
};
use snarkos_models::gadgets::utilities::uint32::UInt32;
use snarkos_models::gadgets::utilities::uint::UInt32;
const DIRECTORY_NAME: &str = "tests/integer/u32/";

View File

@ -6,7 +6,7 @@ use leo_compiler::{
};
use snarkos_curves::edwards_bls12::Fq;
use snarkos_models::gadgets::{r1cs::TestConstraintSystem, utilities::uint32::UInt32};
use snarkos_models::gadgets::{r1cs::TestConstraintSystem, utilities::uint::UInt32};
const DIRECTORY_NAME: &str = "tests/mutability/";

5
src/main.leo Normal file
View File

@ -0,0 +1,5 @@
// The 'language' main function.
function main() -> u32 {
let a: u32 = 1 + 1;
return a
}