-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: build pgvecto.rs from source (v0.1.14-beta)
Relates to NixOS/nixpkgs#274509
- Loading branch information
1 parent
378ec37
commit 3ba112b
Showing
5 changed files
with
3,727 additions
and
46 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
17 changes: 17 additions & 0 deletions
17
packages/pgvecto-rs/0001-read-clang-flags-from-environment.diff
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
diff --git a/crates/c/build.rs b/crates/c/build.rs | ||
index 8d822e5..8b7e371 100644 | ||
--- a/crates/c/build.rs | ||
+++ b/crates/c/build.rs | ||
@@ -1,9 +1,12 @@ | ||
fn main() { | ||
println!("cargo:rerun-if-changed=src/c.h"); | ||
println!("cargo:rerun-if-changed=src/c.c"); | ||
+ println!("cargo:rerun-if-env-changed=BINDGEN_EXTRA_CLANG_ARGS"); | ||
cc::Build::new() | ||
.compiler("clang-16") | ||
.file("./src/c.c") | ||
+ .try_flags_from_environment("BINDGEN_EXTRA_CLANG_ARGS") | ||
+ .expect("the BINDGEN_EXTRA_CLANG_ARGS environment variable must be specified and UTF-8") | ||
.opt_level(3) | ||
.debug(true) | ||
.compile("pgvectorsc"); |
13 changes: 13 additions & 0 deletions
13
packages/pgvecto-rs/0002-enable-feature-result-option-inspect.diff
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff --git a/src/lib.rs b/src/lib.rs | ||
index fc99a94..efcaa19 100644 | ||
--- a/src/lib.rs | ||
+++ b/src/lib.rs | ||
@@ -3,6 +3,8 @@ | ||
//! Provides an easy-to-use extension for vector similarity search. | ||
#![feature(never_type)] | ||
#![feature(alloc_error_hook)] | ||
+#![feature(result_option_inspect)] | ||
+#![feature(const_maybe_uninit_zeroed)] | ||
|
||
mod bgworker; | ||
mod datatype; |
Oops, something went wrong.