fix format issues, needs precommit hook

This commit is contained in:
geoffsee
2025-08-31 13:24:51 -04:00
parent 0580dc8c5e
commit 7bc9479a11
3 changed files with 35 additions and 34 deletions

16
Cargo.lock generated
View File

@@ -898,7 +898,7 @@ checksum = "b94f61472cee1439c0b966b47e3aca9ae07e45d070759512cd390ea2bebc6675"
[[package]] [[package]]
name = "cli" name = "cli"
version = "0.1.1" version = "0.1.2"
[[package]] [[package]]
name = "codee" name = "codee"
@@ -1476,7 +1476,7 @@ dependencies = [
[[package]] [[package]]
name = "embeddings-engine" name = "embeddings-engine"
version = "0.1.1" version = "0.1.2"
dependencies = [ dependencies = [
"async-openai", "async-openai",
"axum", "axum",
@@ -2098,7 +2098,7 @@ dependencies = [
[[package]] [[package]]
name = "gemma-runner" name = "gemma-runner"
version = "0.1.1" version = "0.1.2"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"candle-core 0.9.1 (git+https://github.com/huggingface/candle.git)", "candle-core 0.9.1 (git+https://github.com/huggingface/candle.git)",
@@ -2279,7 +2279,7 @@ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
[[package]] [[package]]
name = "helm-chart-tool" name = "helm-chart-tool"
version = "0.1.1" version = "0.1.2"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"clap", "clap",
@@ -2689,7 +2689,7 @@ dependencies = [
[[package]] [[package]]
name = "inference-engine" name = "inference-engine"
version = "0.1.1" version = "0.1.2"
dependencies = [ dependencies = [
"ab_glyph", "ab_glyph",
"anyhow", "anyhow",
@@ -2941,7 +2941,7 @@ dependencies = [
[[package]] [[package]]
name = "leptos-app" name = "leptos-app"
version = "0.1.1" version = "0.1.2"
dependencies = [ dependencies = [
"async-openai-wasm", "async-openai-wasm",
"axum", "axum",
@@ -3204,7 +3204,7 @@ checksum = "241eaef5fd12c88705a01fc1066c48c4b36e0dd4377dcdc7ec3942cea7a69956"
[[package]] [[package]]
name = "llama-runner" name = "llama-runner"
version = "0.1.1" version = "0.1.2"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"candle-core 0.9.1 (git+https://github.com/huggingface/candle.git)", "candle-core 0.9.1 (git+https://github.com/huggingface/candle.git)",
@@ -4083,7 +4083,7 @@ dependencies = [
[[package]] [[package]]
name = "predict-otron-9000" name = "predict-otron-9000"
version = "0.1.1" version = "0.1.2"
dependencies = [ dependencies = [
"axum", "axum",
"embeddings-engine", "embeddings-engine",

View File

@@ -17,10 +17,6 @@ fn main() {
} }
} }
fn run_build() -> io::Result<()> { fn run_build() -> io::Result<()> {
let manifest_dir = let manifest_dir =
PathBuf::from(env::var("CARGO_MANIFEST_DIR").expect("CARGO_MANIFEST_DIR not set")); PathBuf::from(env::var("CARGO_MANIFEST_DIR").expect("CARGO_MANIFEST_DIR not set"));
@@ -33,7 +29,9 @@ fn run_build() -> io::Result<()> {
// Optional: warn if using a Bun target thats marked unsupported in your chart // Optional: warn if using a Bun target thats marked unsupported in your chart
if matches!(bun_tgt, BunTarget::WindowsArm64) { if matches!(bun_tgt, BunTarget::WindowsArm64) {
println!("cargo:warning=bun-windows-arm64 is marked unsupported in the compatibility chart"); println!(
"cargo:warning=bun-windows-arm64 is marked unsupported in the compatibility chart"
);
} }
warn(&format!("Building CLI into: {}", output_path.display())); warn(&format!("Building CLI into: {}", output_path.display()));
@@ -64,9 +62,6 @@ fn run_build() -> io::Result<()> {
let target = env::var("TARGET").unwrap(); let target = env::var("TARGET").unwrap();
// --- bun build (in ./package), emit to OUT_DIR, keep temps inside OUT_DIR --- // --- bun build (in ./package), emit to OUT_DIR, keep temps inside OUT_DIR ---
let mut build = Command::new("bun") let mut build = Command::new("bun")
.current_dir(&package_dir) .current_dir(&package_dir)

View File

@@ -27,10 +27,11 @@ impl BunTarget {
} }
} }
pub const fn rust_triples(self) -> &'static [&'static str] { pub const fn rust_triples(self) -> &'static [&'static str] {
match self { match self {
BunTarget::LinuxX64Glibc => &["x86_64-unknown-linux-gnu", "x86_64-unknown-linux-gnu.2.17"], BunTarget::LinuxX64Glibc => {
&["x86_64-unknown-linux-gnu", "x86_64-unknown-linux-gnu.2.17"]
}
BunTarget::LinuxArm64Glibc => &["aarch64-unknown-linux-gnu"], BunTarget::LinuxArm64Glibc => &["aarch64-unknown-linux-gnu"],
BunTarget::LinuxX64Musl => &["x86_64-unknown-linux-musl"], BunTarget::LinuxX64Musl => &["x86_64-unknown-linux-musl"],
BunTarget::LinuxArm64Musl => &["aarch64-unknown-linux-musl"], BunTarget::LinuxArm64Musl => &["aarch64-unknown-linux-musl"],
@@ -86,7 +87,6 @@ impl BunTarget {
None None
} }
pub fn from_cargo_env() -> Result<Self, BunTargetError> { pub fn from_cargo_env() -> Result<Self, BunTargetError> {
if let Ok(triple) = env::var("TARGET") { if let Ok(triple) = env::var("TARGET") {
if let Some(bt) = Self::from_rust_target(&triple) { if let Some(bt) = Self::from_rust_target(&triple) {
@@ -100,7 +100,13 @@ impl BunTarget {
let envv = env::var("CARGO_CFG_TARGET_ENV").unwrap_or_default(); let envv = env::var("CARGO_CFG_TARGET_ENV").unwrap_or_default();
let vendor = env::var("CARGO_CFG_TARGET_VENDOR").unwrap_or_else(|_| "unknown".into()); let vendor = env::var("CARGO_CFG_TARGET_VENDOR").unwrap_or_else(|_| "unknown".into());
let triple = format!("{}-{}-{}-{}", arch, vendor, os, if envv.is_empty() { "gnu" } else { &envv }); let triple = format!(
"{}-{}-{}-{}",
arch,
vendor,
os,
if envv.is_empty() { "gnu" } else { &envv }
);
if let Some(bt) = Self::from_rust_target(&triple) { if let Some(bt) = Self::from_rust_target(&triple) {
Ok(bt) Ok(bt)
} else { } else {