Skip to content

Commit

Permalink
chore: update dependencies (#151)
Browse files Browse the repository at this point in the history
Signed-off-by: usamoi <usamoi@outlook.com>
  • Loading branch information
usamoi authored Dec 25, 2024
1 parent c049dbb commit 3f72eb2
Show file tree
Hide file tree
Showing 9 changed files with 92 additions and 112 deletions.
177 changes: 75 additions & 102 deletions Cargo.lock

Large diffs are not rendered by default.

11 changes: 8 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ pg16 = ["pgrx/pg16", "pgrx-catalog/pg16"]
pg17 = ["pgrx/pg17", "pgrx-catalog/pg17"]

[dependencies]
base = { git = "https://github.com/tensorchord/pgvecto.rs.git", rev = "0374439c8593ead1f61fc2477a4b79a49fcdceb8" }
base = { git = "https://github.com/tensorchord/pgvecto.rs.git", rev = "9d87afd75ca3dd6819da2a0a38d9fefdfb5b1c74" }

# lock algebra version forever so that the QR decomposition never changes for same input
nalgebra = "=0.33.0"
Expand All @@ -31,20 +31,25 @@ rkyv = { version = "=0.7.45", features = ["validation"] }
half = { version = "2.4.1", features = ["rkyv"] }
log = "0.4.22"
paste = "1"
pgrx = { version = "=0.12.8", default-features = false, features = ["cshim"] }
pgrx = { version = "=0.12.9", default-features = false, features = ["cshim"] }
pgrx-catalog = "0.1.0"
rand = "0.8.5"
rand_chacha = "0.3.1"
rand_distr = "0.4.3"
rayon = "1.10.0"
serde = "1"
toml = "0.8.19"
validator = { version = "0.18.1", features = ["derive"] }
validator = { version = "0.19.0", features = ["derive"] }

[patch.crates-io]
half = { git = "https://github.com/tensorchord/half-rs.git" }

[lints]
rust.fuzzy_provenance_casts = "deny"
rust.unexpected_cfgs = { level = "warn", check-cfg = [
'cfg(feature, values("pg12"))',
'cfg(pgrx_embed)',
] }
rust.unsafe_op_in_unsafe_fn = "deny"
rust.unused_lifetimes = "warn"
rust.unused_qualifications = "warn"
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "nightly-2024-11-19"
channel = "nightly-2024-12-25"
1 change: 1 addition & 0 deletions src/bin/pgrx_embed.rs
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
#![feature(strict_provenance_lints)]
::pgrx::pgrx_embed!();
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#![allow(clippy::int_plus_one)]
#![allow(clippy::unused_unit)]
#![allow(clippy::infallible_destructuring_match)]
#![feature(strict_provenance_lints)]

mod datatype;
mod postgres;
Expand Down
4 changes: 2 additions & 2 deletions src/upgrade/symbols.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
macro_rules! symbol {
($t:ident) => {
paste::paste! {
#[no_mangle]
#[unsafe(no_mangle)]
#[doc(hidden)]
#[pgrx::pg_guard]
extern "C" fn [<$t _wrapper>](_fcinfo: pgrx::pg_sys::FunctionCallInfo) -> pgrx::pg_sys::Datum {
Expand All @@ -17,7 +17,7 @@ macro_rules! symbol {
stringify!($t),
);
}
#[no_mangle]
#[unsafe(no_mangle)]
#[doc(hidden)]
pub extern "C" fn [<pg_finfo_ $t _wrapper>]() -> &'static ::pgrx::pg_sys::Pg_finfo_record {
const V1_API: ::pgrx::pg_sys::Pg_finfo_record = ::pgrx::pg_sys::Pg_finfo_record {
Expand Down
4 changes: 2 additions & 2 deletions src/utils/k_means.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ fn rabitq_index<P: Parallelism>(
parallelism
.into_par_iter(0..n)
.map(|i| {
fn gen(mut qvector: Vec<u8>) -> Vec<u8> {
fn generate(mut qvector: Vec<u8>) -> Vec<u8> {
let dims = qvector.len() as u32;
let t = dims.div_ceil(4);
qvector.resize(qvector.len().next_multiple_of(4), 0);
Expand Down Expand Up @@ -222,7 +222,7 @@ fn rabitq_index<P: Parallelism>(
} else {
u8::reduce_sum_of_x_as_u32(&qvector) as f32
};
(dis_v_2, b, k, qvector_sum, gen(qvector))
(dis_v_2, b, k, qvector_sum, generate(qvector))
};

let mut result = (Distance::INFINITY, 0);
Expand Down
2 changes: 1 addition & 1 deletion src/vchordrq/index/am.rs
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ impl Drop for VchordrqLeader {
}

#[pgrx::pg_guard]
#[no_mangle]
#[unsafe(no_mangle)]
pub unsafe extern "C" fn vchordrq_parallel_build_main(
_seg: *mut pgrx::pg_sys::dsm_segment,
toc: *mut pgrx::pg_sys::shm_toc,
Expand Down
2 changes: 1 addition & 1 deletion src/vchordrqfscan/index/am.rs
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ impl Drop for VchordrqfscanLeader {
}

#[pgrx::pg_guard]
#[no_mangle]
#[unsafe(no_mangle)]
pub unsafe extern "C" fn vchordrqfscan_parallel_build_main(
_seg: *mut pgrx::pg_sys::dsm_segment,
toc: *mut pgrx::pg_sys::shm_toc,
Expand Down

0 comments on commit 3f72eb2

Please sign in to comment.