Use portable USearch on macOS.
This commit is contained in:
@@ -45,9 +45,14 @@ url = { workspace = true }
|
||||
base64 = { workspace = true }
|
||||
dirs = { workspace = true }
|
||||
fastembed = { workspace = true }
|
||||
usearch = { workspace = true }
|
||||
ort = { workspace = true }
|
||||
|
||||
[target.'cfg(target_os = "macos")'.dependencies]
|
||||
usearch = { workspace = true }
|
||||
|
||||
[target.'cfg(not(target_os = "macos"))'.dependencies]
|
||||
usearch = { workspace = true, features = ["numkong"] }
|
||||
|
||||
[dev-dependencies]
|
||||
tempfile = "3"
|
||||
|
||||
|
||||
@@ -167,6 +167,19 @@ fn tagged_releases_are_built_and_packaged_with_rust_tools() {
|
||||
);
|
||||
}
|
||||
|
||||
let workspace_manifest = fs::read_to_string(workspace.join("Cargo.toml")).unwrap();
|
||||
let core_manifest = fs::read_to_string(workspace.join("crates/bds-core/Cargo.toml")).unwrap();
|
||||
assert!(
|
||||
workspace_manifest.contains("usearch = { version = \"2.26\", default-features = false }"),
|
||||
"USearch SIMD backends must be selected explicitly per target"
|
||||
);
|
||||
assert!(
|
||||
core_manifest.contains("[target.'cfg(target_os = \"macos\")'.dependencies]")
|
||||
&& core_manifest.contains("[target.'cfg(not(target_os = \"macos\"))'.dependencies]")
|
||||
&& core_manifest.contains("usearch = { workspace = true, features = [\"numkong\"] }"),
|
||||
"macOS must use portable USearch while native targets keep NumKong SIMD"
|
||||
);
|
||||
|
||||
let release_source =
|
||||
fs::read_to_string(workspace.join("crates/bds-release/src/packaging.rs")).unwrap();
|
||||
assert!(release_source.contains("LC_ID_DYLIB"));
|
||||
|
||||
Reference in New Issue
Block a user