From 6f3e3ec0f217cab2e4e11bc93e30eb75f6fd783e Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Sat, 15 Feb 2025 17:53:48 +0000 Subject: [PATCH 1/2] Bump version to 0.1.96 [skip ci] --- Cargo.lock | 8 ++++---- examples/embeddings/Cargo.toml | 2 +- examples/simple/Cargo.toml | 2 +- llama-cpp-2/Cargo.toml | 2 +- llama-cpp-sys-2/Cargo.toml | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 46c6c844..84452ae3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -277,7 +277,7 @@ checksum = "3dca9240753cf90908d7e4aac30f630662b02aebaa1b58a3cadabdb23385b58b" [[package]] name = "embeddings" -version = "0.1.95" +version = "0.1.96" dependencies = [ "anyhow", "clap", @@ -653,7 +653,7 @@ checksum = "643cb0b8d4fcc284004d5fd0d67ccf61dfffadb7f75e1e71bc420f4688a3a704" [[package]] name = "llama-cpp-2" -version = "0.1.95" +version = "0.1.96" dependencies = [ "encoding_rs", "enumflags2", @@ -665,7 +665,7 @@ dependencies = [ [[package]] name = "llama-cpp-sys-2" -version = "0.1.95" +version = "0.1.96" dependencies = [ "bindgen", "cc", @@ -1105,7 +1105,7 @@ checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" [[package]] name = "simple" -version = "0.1.95" +version = "0.1.96" dependencies = [ "anyhow", "clap", diff --git a/examples/embeddings/Cargo.toml b/examples/embeddings/Cargo.toml index 75a68d28..b4959c43 100644 --- a/examples/embeddings/Cargo.toml +++ b/examples/embeddings/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "embeddings" -version = "0.1.95" +version = "0.1.96" edition = "2021" [dependencies] diff --git a/examples/simple/Cargo.toml b/examples/simple/Cargo.toml index 9d0e4964..70ceaf49 100644 --- a/examples/simple/Cargo.toml +++ b/examples/simple/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "simple" -version = "0.1.95" +version = "0.1.96" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/llama-cpp-2/Cargo.toml b/llama-cpp-2/Cargo.toml index 34aeadd5..efca6570 100644 --- a/llama-cpp-2/Cargo.toml +++ b/llama-cpp-2/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "llama-cpp-2" description = "llama.cpp bindings for Rust" -version = "0.1.95" +version = "0.1.96" edition = "2021" license = "MIT OR Apache-2.0" repository = "https://github.com/utilityai/llama-cpp-rs" diff --git a/llama-cpp-sys-2/Cargo.toml b/llama-cpp-sys-2/Cargo.toml index dc66bb0b..bff5ca8e 100644 --- a/llama-cpp-sys-2/Cargo.toml +++ b/llama-cpp-sys-2/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "llama-cpp-sys-2" description = "Low Level Bindings to llama.cpp" -version = "0.1.95" +version = "0.1.96" edition = "2021" license = "MIT OR Apache-2.0" repository = "https://github.com/utilityai/llama-cpp-rs" From c9555830184a825a69f89ce2460bd84aedec1316 Mon Sep 17 00:00:00 2001 From: Vitali Lovich Date: Sat, 15 Feb 2025 15:02:24 -0800 Subject: [PATCH 2/2] Fix Android build Android's triple is linux-android. Move the detection of Android above Linux as otherwise Android builds are detected as plain vanilla Linux & break because they try to leverage OpenMP. --- llama-cpp-sys-2/build.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/llama-cpp-sys-2/build.rs b/llama-cpp-sys-2/build.rs index e227a951..ec4ac7ce 100644 --- a/llama-cpp-sys-2/build.rs +++ b/llama-cpp-sys-2/build.rs @@ -39,8 +39,6 @@ fn parse_target_os() -> Result<(TargetOs, String), String> { } else { Ok((TargetOs::Windows(WindowsVariant::Other), target)) } - } else if target.contains("linux") { - Ok((TargetOs::Linux, target)) } else if target.contains("apple") { if target.ends_with("-apple-darwin") { Ok((TargetOs::Apple(AppleVariant::MacOS), target)) @@ -49,6 +47,8 @@ fn parse_target_os() -> Result<(TargetOs, String), String> { } } else if target.contains("android") { Ok((TargetOs::Android, target)) + } else if target.contains("linux") { + Ok((TargetOs::Linux, target)) } else { Err(target) }