mirror of
https://gitlab.com/veilid/veilid.git
synced 2024-10-01 01:26:08 -04:00
build fixes
This commit is contained in:
parent
3a4c211e85
commit
ad47e400ed
@ -54,7 +54,7 @@ flexi_logger = { version = "^0", features = ["use_chrono_for_offset"] }
|
||||
thiserror = "^1"
|
||||
crossbeam-channel = "^0"
|
||||
hex = "^0"
|
||||
veilid-tools = { version = "0.2.0", path = "../veilid-tools" }
|
||||
veilid-tools = { version = "0.2.1", path = "../veilid-tools" }
|
||||
|
||||
json = "^0"
|
||||
stop-token = { version = "^0", default-features = false }
|
||||
|
@ -59,7 +59,7 @@ network-result-extra = ["veilid-tools/network-result-extra"]
|
||||
[dependencies]
|
||||
|
||||
# Tools
|
||||
veilid-tools = { version = "0.2.0", path = "../veilid-tools", features = [
|
||||
veilid-tools = { version = "0.2.1", path = "../veilid-tools", features = [
|
||||
"tracing",
|
||||
], default-features = false }
|
||||
paste = "1.0.14"
|
||||
@ -182,7 +182,7 @@ socket2 = { version = "0.5.3", features = ["all"] }
|
||||
# Dependencies for WASM builds only
|
||||
[target.'cfg(target_arch = "wasm32")'.dependencies]
|
||||
|
||||
veilid-tools = { version = "0.2.0", path = "../veilid-tools", default-features = false, features = [
|
||||
veilid-tools = { version = "0.2.1", path = "../veilid-tools", default-features = false, features = [
|
||||
"rt-wasm-bindgen",
|
||||
] }
|
||||
|
||||
|
@ -1,15 +1,27 @@
|
||||
use std::path::PathBuf;
|
||||
use std::process::{Command, Stdio};
|
||||
|
||||
fn get_workspace_dir() -> PathBuf {
|
||||
PathBuf::from(env!("CARGO_MANIFEST_DIR"))
|
||||
.join("..")
|
||||
.canonicalize()
|
||||
.expect("want workspace dir")
|
||||
fn search_file<T: AsRef<str>, P: AsRef<str>>(start: T, name: P) -> Option<PathBuf> {
|
||||
let start_path = PathBuf::from(start.as_ref()).canonicalize().ok();
|
||||
let mut path = start_path.as_ref().map(|x| x.as_path());
|
||||
while let Some(some_path) = path {
|
||||
let file_path = some_path.join(name.as_ref());
|
||||
if file_path.exists() {
|
||||
return Some(file_path.to_owned());
|
||||
}
|
||||
path = some_path.parent();
|
||||
}
|
||||
None
|
||||
}
|
||||
|
||||
fn get_desired_capnp_version_string() -> String {
|
||||
std::fs::read_to_string(get_workspace_dir().join(".capnp_version"))
|
||||
.expect("should find .capnp_version file")
|
||||
let capnp_path = search_file(env!("CARGO_MANIFEST_DIR"), ".capnp_version")
|
||||
.expect("should find .capnp_version file");
|
||||
std::fs::read_to_string(&capnp_path)
|
||||
.expect(&format!(
|
||||
"can't read .capnp_version file here: {:?}",
|
||||
capnp_path
|
||||
))
|
||||
.trim()
|
||||
.to_owned()
|
||||
}
|
||||
@ -32,8 +44,13 @@ fn get_capnp_version_string() -> String {
|
||||
}
|
||||
|
||||
fn get_desired_protoc_version_string() -> String {
|
||||
std::fs::read_to_string(get_workspace_dir().join(".protoc_version"))
|
||||
.expect("should find .protoc_version file")
|
||||
let protoc_path = search_file(env!("CARGO_MANIFEST_DIR"), ".protoc_version")
|
||||
.expect("should find .protoc_version file");
|
||||
std::fs::read_to_string(&protoc_path)
|
||||
.expect(&format!(
|
||||
"can't read .protoc_version file here: {:?}",
|
||||
protoc_path
|
||||
))
|
||||
.trim()
|
||||
.to_owned()
|
||||
}
|
||||
|
@ -15,7 +15,7 @@ default = ["veilid-core/default-wasm"]
|
||||
crypto-test = ["veilid-core/crypto-test"]
|
||||
|
||||
[dependencies]
|
||||
veilid-core = { version = "0.2.0", path = "../veilid-core", default-features = false }
|
||||
veilid-core = { version = "0.2.1", path = "../veilid-core", default-features = false }
|
||||
|
||||
tracing = { version = "^0", features = ["log", "attributes"] }
|
||||
tracing-wasm = "^0"
|
||||
|
Loading…
Reference in New Issue
Block a user