This commit is contained in:
Remco Bloemen
2022-04-04 16:05:44 -07:00
parent b554e592c6
commit c37ae9b865
2 changed files with 8 additions and 6 deletions

View File

@@ -21,7 +21,7 @@ fn absolute(path: &str) -> Result<PathBuf> {
Component::ParentDir => {
absolute.pop();
}
component @ _ => absolute.push(component.as_os_str()),
component => absolute.push(component.as_os_str()),
}
}
Ok(absolute)
@@ -64,12 +64,11 @@ fn build_circuit() -> Result<()> {
#[cfg(feature = "dylib")]
fn build_dylib() -> Result<()> {
use enumset::enum_set;
use std::{env, str::FromStr};
use wasmer::{Module, Store, Target, Triple};
use wasmer_compiler_cranelift::Cranelift;
use wasmer_engine_dylib::Dylib;
use enumset::enum_set;
use std::env;
use std::str::FromStr;
let wasm_file = absolute(WASM_FILE)?;
assert!(wasm_file.exists());
@@ -77,7 +76,10 @@ fn build_dylib() -> Result<()> {
let out_dir = env::var("OUT_DIR")?;
let out_dir = Path::new(&out_dir).to_path_buf();
let dylib_file = out_dir.join("semaphore.dylib");
println!("cargo:rustc-env=CIRCUIT_WASM_DYLIB={}", dylib_file.display());
println!(
"cargo:rustc-env=CIRCUIT_WASM_DYLIB={}",
dylib_file.display()
);
if dylib_file.exists() {
return Ok(());

View File

@@ -61,7 +61,7 @@ pub fn witness_calculator() -> &'static Mutex<WitnessCalculator> {
build with the `cdylib` feature. You can initialize by calling `initialize` or \
seting the `CIRCUIT_WASM_DYLIB` environment variable.",
);
from_dylib(&Path::new(&path))
from_dylib(Path::new(&path))
})
}