1
0
Fork 0
mirror of synced 2025-09-24 04:40:05 +00:00

revert zokrates_fs_resolver cargo.toml

This commit is contained in:
dark64 2020-03-03 14:11:54 +01:00
parent 010146ccdf
commit 8774cbcd6e
5 changed files with 12 additions and 9 deletions

2
Cargo.lock generated
View file

@ -1804,7 +1804,7 @@ dependencies = [
[[package]]
name = "zokrates_fs_resolver"
version = "0.1.0"
version = "0.5.0"
dependencies = [
"tempfile",
"zokrates_core",

View file

@ -16,7 +16,7 @@ regex = "0.2"
zokrates_field = { version = "0.3", path = "../zokrates_field" }
zokrates_abi = { version = "0.1", path = "../zokrates_abi" }
zokrates_core = { version = "0.4", path = "../zokrates_core" }
zokrates_fs_resolver = { version = "0.1", path = "../zokrates_fs_resolver"}
zokrates_fs_resolver = { version = "0.5", path = "../zokrates_fs_resolver"}
serde_json = "1.0"
[dev-dependencies]

View file

@ -129,6 +129,8 @@ impl fmt::Display for CompileErrorInner {
}
}
type FilePath = PathBuf;
pub trait Resolver<E: Into<imports::Error>> {
fn resolve(
&self,
@ -139,7 +141,7 @@ pub trait Resolver<E: Into<imports::Error>> {
pub fn compile<T: Field, E: Into<imports::Error>>(
source: String,
location: PathBuf,
location: FilePath,
resolver: Option<&dyn Resolver<E>>,
) -> Result<CompilationArtifacts<T>, CompileErrors> {
let arena = Arena::new();
@ -171,13 +173,13 @@ pub fn compile<T: Field, E: Into<imports::Error>>(
Ok(CompilationArtifacts {
prog: optimized_ir_prog,
abi: abi,
abi,
})
}
pub fn compile_program<'ast, T: Field, E: Into<imports::Error>>(
source: &'ast str,
location: PathBuf,
location: FilePath,
resolver: Option<&dyn Resolver<E>>,
arena: &'ast Arena<String>,
) -> Result<Program<'ast, T>, CompileErrors> {
@ -195,7 +197,7 @@ pub fn compile_program<'ast, T: Field, E: Into<imports::Error>>(
pub fn compile_module<'ast, T: Field, E: Into<imports::Error>>(
source: &'ast str,
location: PathBuf,
location: FilePath,
resolver: Option<&dyn Resolver<E>>,
modules: &mut HashMap<ModuleId, Module<'ast, T>>,
arena: &'ast Arena<String>,

View file

@ -1,7 +1,8 @@
[package]
name = "zokrates_fs_resolver"
version = "0.1.0"
authors = ["dark64 <darem966@gmail.com>"]
version = "0.5.0"
authors = ["Thibaut Schaeffer <thibaut@schaeff.fr>"]
repository = "https://github.com/JacobEberhardt/ZoKrates.git"
edition = "2018"
[dependencies]

View file

@ -7,7 +7,7 @@ edition = "2018"
[dependencies]
zokrates_field = { version = "0.3", path = "../zokrates_field" }
zokrates_core = { version = "0.4", path = "../zokrates_core" }
zokrates_fs_resolver = { version = "0.1", path = "../zokrates_fs_resolver" }
zokrates_fs_resolver = { version = "0.5", path = "../zokrates_fs_resolver" }
serde = "1.0"
serde_derive = "1.0"
serde_json = "1.0"