Rename program to compiler

This commit is contained in:
howardwu 2020-04-26 22:34:15 -07:00
parent 85eb6cf6a8
commit 026b59a67a
23 changed files with 10 additions and 16 deletions

6
Cargo.lock generated
View File

@ -616,7 +616,7 @@ dependencies = [
"env_logger",
"failure",
"from-pest",
"leo-program",
"leo-compiler",
"log",
"rand 0.7.3",
"rand_core 0.5.1",
@ -636,7 +636,7 @@ name = "leo-benchmark"
version = "0.1.0"
dependencies = [
"from-pest",
"leo-program",
"leo-compiler",
"rand 0.7.3",
"snarkos-algorithms",
"snarkos-curves",
@ -646,7 +646,7 @@ dependencies = [
]
[[package]]
name = "leo-program"
name = "leo-compiler"
version = "0.1.0"
dependencies = [
"from-pest",

View File

@ -13,10 +13,10 @@ name = "leo"
path = "leo/main.rs"
[workspace]
members = [ "benchmark", "program" ]
members = [ "benchmark", "compiler" ]
[dependencies]
leo-program = { path = "./program", version = "0.1.0" }
leo-compiler = { path = "compiler", version = "0.1.0" }
snarkos-algorithms = { path = "../snarkOS/algorithms", version = "0.8.0" }
snarkos-curves = { path = "../snarkOS/curves", version = "0.8.0" }

View File

@ -5,7 +5,7 @@ authors = ["The Aleo Team <hello@aleo.org>"]
edition = "2018"
[dependencies]
leo-program = { path = "../program", version = "0.1.0" }
leo-compiler = { path = "../compiler", version = "0.1.0" }
snarkos-algorithms = { path = "../../snarkOS/algorithms", version = "0.8.0" }
snarkos-curves = { path = "../../snarkOS/curves", version = "0.8.0" }

View File

@ -1,5 +1,5 @@
[package]
name = "leo-program"
name = "leo-compiler"
version = "0.1.0"
authors = ["The Aleo Team <hello@aleo.org>"]
edition = "2018"

View File

@ -1,6 +0,0 @@
[package]
name = "hello_world"
version = "0.1.0"
authors = "Satoshi Nakamoto"
license = "Apache/MIT"

View File

@ -1,4 +1,4 @@
use leo_program::{self, ast};
use leo_compiler::{self, ast};
use snarkos_errors::gadgets::SynthesisError;
use snarkos_models::{
@ -40,11 +40,11 @@ impl<F: Field + PrimeField> ConstraintSynthesizer<F> for Compiler<F> {
let syntax_tree = ast::File::from_pest(&mut file).expect("infallible");
log::debug!("{:#?}", syntax_tree);
let program = leo_program::Program::<'_, F>::from(syntax_tree);
let program = leo_compiler::Program::<'_, F>::from(syntax_tree);
log::info!(" compiled: {:#?}", program);
let program = program.name("simple".into());
leo_program::ResolvedProgram::generate_constraints(cs, program);
leo_compiler::ResolvedProgram::generate_constraints(cs, program);
Ok(())
}