Skip to content

Commit

Permalink
feat: build pgvecto.rs from source (v0.1.14-beta)
Browse files Browse the repository at this point in the history
  • Loading branch information
diogotcorreia committed Jan 15, 2024
1 parent 378ec37 commit 3ba112b
Show file tree
Hide file tree
Showing 5 changed files with 3,727 additions and 46 deletions.
46 changes: 0 additions & 46 deletions packages/pgvecto-rs.nix

This file was deleted.

17 changes: 17 additions & 0 deletions packages/pgvecto-rs/0001-read-clang-flags-from-environment.diff
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 packages/pgvecto-rs/0002-enable-feature-result-option-inspect.diff
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;
Loading

0 comments on commit 3ba112b

Please sign in to comment.