From 780d101dc9a3ea4982b9c1d02a779686bb758367 Mon Sep 17 00:00:00 2001 From: Raphael Sourty Date: Wed, 18 Mar 2026 12:25:44 +0000 Subject: [PATCH 1/3] Graceful CUDA fallback: catch panics from stub/broken CUDA libraries On systems with stub CUDA libraries (e.g., incomplete driver installs), cudarc panics with missing symbol errors instead of returning errors. This causes colgrep and other tools to crash on startup. Changes: - Upgrade cudarc from 0.12 to 0.19.3 with dynamic-loading (dlopen) - Wrap all CUDA initialization paths in catch_unwind to trap panics - Add CUDA_BROKEN flag with clear_cuda_broken() to allow retrying after the user repairs their CUDA environment - Replace OnceLock> with OnceLock>> so the cached context can be reset when clearing the broken flag - Protect ONNX Runtime CUDA provider init with catch_unwind - Use kmeans_double_chunked directly for CPU fallback in k-means to avoid FastKMeans::train() which re-enters CUDA when the feature is on - Add build.rs to detect CUDA toolkit at build time Co-Authored-By: Claude Opus 4.6 (1M context) --- next-plaid-onnx/src/lib.rs | 69 +++-- next-plaid/Cargo.toml | 5 +- next-plaid/build.rs | 34 +++ next-plaid/src/codec.rs | 2 +- next-plaid/src/cuda.rs | 545 ++++++++++++++++++------------------- next-plaid/src/index.rs | 2 +- next-plaid/src/kmeans.rs | 123 ++++++--- next-plaid/src/lib.rs | 2 +- 8 files changed, 430 insertions(+), 352 deletions(-) create mode 100644 next-plaid/build.rs diff --git a/next-plaid-onnx/src/lib.rs b/next-plaid-onnx/src/lib.rs index 804e8592..5e019949 100644 --- a/next-plaid-onnx/src/lib.rs +++ b/next-plaid-onnx/src/lib.rs @@ -244,10 +244,17 @@ pub fn is_cuda_available() -> bool { } // If CUDA_VISIBLE_DEVICES is not set, GPUs are visible by default - // Only now check if CUDA EP is compiled in (may trigger CUDA driver init) - CUDAExecutionProvider::default() - .is_available() - .unwrap_or(false) + // Try to check if CUDA EP is available, catching any panics from CUDA driver loading + // This can panic if CUDA libraries are present but corrupted/incomplete (stub libraries) + std::panic::catch_unwind(|| { + CUDAExecutionProvider::default() + .is_available() + .unwrap_or(false) + }) + .unwrap_or_else(|_| { + eprintln!("[next-plaid-onnx] CUDA driver check failed (invalid/stub library?), using CPU"); + false + }) } /// Check if CUDA execution provider is available. @@ -270,15 +277,22 @@ fn configure_auto_provider(builder: SessionBuilder) -> Result { #[cfg(feature = "cuda")] if !force_cpu { - let device_id = get_cuda_device_id(); - if let Ok(b) = builder - .clone() - .with_execution_providers([CUDAExecutionProvider::default() - .with_device_id(device_id) - .with_tf32(true) - .build()]) - { - return Ok(b); + // Wrap CUDA initialization in catch_unwind to handle panics from stub libraries + let cuda_result = std::panic::catch_unwind(std::panic::AssertUnwindSafe(|| { + let device_id = get_cuda_device_id(); + builder + .clone() + .with_execution_providers([CUDAExecutionProvider::default() + .with_device_id(device_id) + .with_tf32(true) + .build()]) + })); + match cuda_result { + Ok(Ok(b)) => return Ok(b), + Ok(Err(_)) => { /* CUDA failed normally, try next provider */ } + Err(_) => { + eprintln!("[next-plaid-onnx] CUDA init panicked (invalid/stub library?), falling back to CPU"); + } } } @@ -332,15 +346,26 @@ fn configure_cuda(builder: SessionBuilder) -> Result { return Ok(builder); } - let device_id = get_cuda_device_id(); - builder - .with_execution_providers([ - CUDAExecutionProvider::default() - .with_device_id(device_id) - .with_tf32(true) - .build() - ]) - .context("Failed to configure CUDA execution provider. Ensure CUDA toolkit and cuDNN are installed.") + // Wrap CUDA initialization in catch_unwind to handle panics from stub/invalid libraries + let cuda_result = std::panic::catch_unwind(std::panic::AssertUnwindSafe(|| { + let device_id = get_cuda_device_id(); + builder + .clone() + .with_execution_providers([ + CUDAExecutionProvider::default() + .with_device_id(device_id) + .with_tf32(true) + .build() + ]) + })); + + match cuda_result { + Ok(result) => result.context("Failed to configure CUDA execution provider. Ensure CUDA toolkit and cuDNN are installed."), + Err(_) => { + eprintln!("[next-plaid-onnx] CUDA init panicked (invalid/stub library?), falling back to CPU"); + Ok(builder) + } + } } #[cfg(not(feature = "cuda"))] diff --git a/next-plaid/Cargo.toml b/next-plaid/Cargo.toml index 2e0faa6f..21b26113 100644 --- a/next-plaid/Cargo.toml +++ b/next-plaid/Cargo.toml @@ -37,10 +37,11 @@ half = "2.4" byteorder = "1.5" rusqlite = { version = "0.38", features = ["bundled", "functions"] } regex = "1.11" -cudarc = { version = "0.12", features = [ +cudarc = { version = "0.19.3", default-features = false, features = [ "cuda-version-from-build-system", "cublas", - "dynamic-linking", + "dynamic-loading", + "nvrtc", ], optional = true } [dev-dependencies] diff --git a/next-plaid/build.rs b/next-plaid/build.rs new file mode 100644 index 00000000..d4e82730 --- /dev/null +++ b/next-plaid/build.rs @@ -0,0 +1,34 @@ +fn main() { + // Only run this when the cuda feature is enabled + #[cfg(feature = "cuda")] + { + // Common CUDA library search paths + let cuda_paths = [ + "/usr/local/cuda/lib64/stubs", + "/usr/local/cuda/targets/x86_64-linux/lib/stubs", + "/usr/local/cuda-12/lib64/stubs", + "/usr/local/cuda-12.9/lib64/stubs", + "/usr/local/cuda-12.9/targets/x86_64-linux/lib/stubs", + "/usr/lib/x86_64-linux-gnu", + "/usr/lib64", + ]; + + for path in cuda_paths { + if std::path::Path::new(path).exists() { + println!("cargo:rustc-link-search=native={}", path); + } + } + + // Also check CUDA_PATH environment variable + if let Ok(cuda_path) = std::env::var("CUDA_PATH") { + let stubs_path = format!("{}/lib64/stubs", cuda_path); + if std::path::Path::new(&stubs_path).exists() { + println!("cargo:rustc-link-search=native={}", stubs_path); + } + let targets_stubs = format!("{}/targets/x86_64-linux/lib/stubs", cuda_path); + if std::path::Path::new(&targets_stubs).exists() { + println!("cargo:rustc-link-search=native={}", targets_stubs); + } + } + } +} diff --git a/next-plaid/src/codec.rs b/next-plaid/src/codec.rs index 713738e5..89043fd4 100644 --- a/next-plaid/src/codec.rs +++ b/next-plaid/src/codec.rs @@ -244,7 +244,7 @@ impl ResidualCodec { if let Some(ctx) = crate::cuda::get_global_context() { let centroids = self.centroids_view(); match crate::cuda::compress_into_codes_cuda_batched( - ctx, + &ctx, &embeddings.view(), ¢roids, None, diff --git a/next-plaid/src/cuda.rs b/next-plaid/src/cuda.rs index 1dbe4fa5..5f11ca68 100644 --- a/next-plaid/src/cuda.rs +++ b/next-plaid/src/cuda.rs @@ -14,23 +14,37 @@ //! sudo nvidia-smi -pm 1 //! ``` +use cudarc::cublas::sys::cublasOperation_t; use cudarc::cublas::{CudaBlas, Gemm, GemmConfig}; -use cudarc::driver::{CudaDevice, CudaSlice, LaunchAsync, LaunchConfig}; +use cudarc::driver::{ + CudaContext as CudarcContext, CudaFunction, CudaSlice, CudaStream, LaunchConfig, PushKernelArg, +}; +use cudarc::nvrtc::compile_ptx; use ndarray::{Array1, ArrayView2}; -use std::sync::{Arc, OnceLock}; +use std::sync::atomic::{AtomicBool, Ordering}; +use std::sync::{Arc, Mutex, OnceLock}; use crate::error::{Error, Result}; /// Default maximum GPU memory to use (4GB) const DEFAULT_MAX_GPU_MEMORY: usize = 4 * 1024 * 1024 * 1024; +/// Global flag to track if CUDA has been determined to be broken/unavailable. +/// Can be cleared with `clear_cuda_broken()` to retry initialization after +/// the user has repaired their CUDA environment. +static CUDA_BROKEN: AtomicBool = AtomicBool::new(false); + /// Global CUDA context, lazily initialized on first use. -static GLOBAL_CUDA_CONTEXT: OnceLock> = OnceLock::new(); +/// Protected by a Mutex so it can be reset when `clear_cuda_broken()` is called. +static GLOBAL_CUDA_CONTEXT: OnceLock>>> = OnceLock::new(); -/// CUDA context holding device and cuBLAS handle. +/// CUDA context holding device, stream, cuBLAS handle, and kernel functions. pub struct CudaContext { - pub device: Arc, + pub device: Arc, + pub stream: Arc, pub blas: CudaBlas, + argmax_func: CudaFunction, + gather_subtract_func: CudaFunction, } impl CudaContext { @@ -41,204 +55,179 @@ impl CudaContext { /// initialization when persistence mode is disabled. Enable it with: /// `sudo nvidia-smi -pm 1` pub fn new(device_id: usize) -> Result { - let device = CudaDevice::new(device_id) - .map_err(|e| Error::Codec(format!("Failed to initialize CUDA device: {}", e)))?; + let device = CudarcContext::new(device_id) + .map_err(|e| Error::Codec(format!("Failed to initialize CUDA device: {:?}", e)))?; - let blas = CudaBlas::new(device.clone()) - .map_err(|e| Error::Codec(format!("Failed to initialize cuBLAS: {}", e)))?; + let stream = device.default_stream(); - // Preload PTX kernels during context creation - load_kernels(&device)?; + let blas = CudaBlas::new(stream.clone()) + .map_err(|e| Error::Codec(format!("Failed to initialize cuBLAS: {:?}", e)))?; - Ok(Self { device, blas }) + // Preload PTX kernels during context creation + let (argmax_func, gather_subtract_func) = load_kernels(&device)?; + + Ok(Self { + device, + stream, + blas, + argmax_func, + gather_subtract_func, + }) } } /// Get the global CUDA context, initializing it if necessary. /// Returns `None` if CUDA initialization fails (allows graceful fallback to CPU). -pub fn get_global_context() -> Option<&'static CudaContext> { - GLOBAL_CUDA_CONTEXT - .get_or_init(|| match CudaContext::new(0) { - Ok(ctx) => Some(ctx), - Err(e) => { - eprintln!("[next-plaid] CUDA init failed: {}, using CPU", e); - None - } - }) - .as_ref() +/// +/// If CUDA was previously marked as broken, returns `None` immediately. +/// Call `clear_cuda_broken()` to reset the flag and allow re-initialization +/// (e.g., after the user has repaired their CUDA environment). +pub fn get_global_context() -> Option> { + // Fast path: if CUDA has been determined to be broken, skip entirely + if CUDA_BROKEN.load(Ordering::Relaxed) { + return None; + } + + let mutex = GLOBAL_CUDA_CONTEXT.get_or_init(|| Mutex::new(None)); + let mut guard = mutex.lock().unwrap(); + + // If already initialized, return a clone of the Arc + if let Some(ref ctx) = *guard { + return Some(Arc::clone(ctx)); + } + + // Try to initialize CUDA + // Wrap in catch_unwind to handle panics from invalid/stub CUDA libraries + match std::panic::catch_unwind(|| CudaContext::new(0)) { + Ok(Ok(ctx)) => { + let ctx = Arc::new(ctx); + *guard = Some(Arc::clone(&ctx)); + Some(ctx) + } + Ok(Err(e)) => { + CUDA_BROKEN.store(true, Ordering::Relaxed); + eprintln!("[next-plaid] CUDA init failed: {}, using CPU", e); + None + } + Err(_) => { + CUDA_BROKEN.store(true, Ordering::Relaxed); + eprintln!("[next-plaid] CUDA init panicked (invalid/stub library?), using CPU"); + None + } + } } /// Check if CUDA context is already initialized (non-blocking). pub fn is_initialized() -> bool { - GLOBAL_CUDA_CONTEXT.get().is_some() + GLOBAL_CUDA_CONTEXT + .get() + .and_then(|m| m.lock().ok()) + .map_or(false, |guard| guard.is_some()) } -/// Argmax kernel - finds index of maximum value per row. -const ARGMAX_KERNEL: &str = r#" -.version 7.0 -.target sm_70 -.address_size 64 - -.visible .entry argmax_kernel( - .param .u64 scores_ptr, - .param .u64 codes_ptr, - .param .u32 num_rows, - .param .u32 num_cols -) -{ - .reg .u32 %r<20>; - .reg .u64 %rd<10>; - .reg .f32 %f<5>; - .reg .pred %p<3>; - - mov.u32 %r0, %ctaid.x; - mov.u32 %r1, %ntid.x; - mov.u32 %r2, %tid.x; - mad.lo.u32 %r3, %r0, %r1, %r2; - - ld.param.u64 %rd0, [scores_ptr]; - ld.param.u64 %rd1, [codes_ptr]; - ld.param.u32 %r4, [num_rows]; - ld.param.u32 %r5, [num_cols]; - - setp.ge.u32 %p0, %r3, %r4; - @%p0 bra END; - - mul.wide.u32 %rd2, %r3, %r5; - shl.b64 %rd2, %rd2, 2; - add.u64 %rd3, %rd0, %rd2; - - ld.global.f32 %f0, [%rd3]; - mov.u32 %r6, 0; - mov.u32 %r7, 1; - -LOOP: - setp.ge.u32 %p1, %r7, %r5; - @%p1 bra STORE; - - mul.wide.u32 %rd4, %r7, 4; - add.u64 %rd5, %rd3, %rd4; - ld.global.f32 %f1, [%rd5]; - - setp.gt.f32 %p2, %f1, %f0; - @%p2 mov.f32 %f0, %f1; - @%p2 mov.u32 %r6, %r7; - - add.u32 %r7, %r7, 1; - bra LOOP; - -STORE: - mul.wide.u32 %rd6, %r3, 4; - add.u64 %rd7, %rd1, %rd6; - st.global.u32 [%rd7], %r6; - -END: - ret; +/// Check if CUDA has been determined to be broken/unavailable. +/// Once CUDA initialization fails (panic or error), this returns true +/// and all subsequent CUDA operations should fall back to CPU. +/// Call `clear_cuda_broken()` to reset and allow retrying. +pub fn is_cuda_broken() -> bool { + CUDA_BROKEN.load(Ordering::Relaxed) +} + +/// Mark CUDA as broken. This should be called when CUDA initialization +/// panics or fails in any part of the codebase to prevent subsequent +/// calls from retrying. +pub fn mark_cuda_broken() { + CUDA_BROKEN.store(true, Ordering::Relaxed); +} + +/// Clear the CUDA broken flag and reset the cached context, allowing +/// re-initialization on the next call to `get_global_context()`. +/// +/// Call this after the user has repaired their CUDA environment +/// (e.g., installed proper drivers) to retry GPU acceleration. +pub fn clear_cuda_broken() { + CUDA_BROKEN.store(false, Ordering::Relaxed); + // Clear the cached context so the next call re-attempts initialization + if let Some(mutex) = GLOBAL_CUDA_CONTEXT.get() { + if let Ok(mut guard) = mutex.lock() { + *guard = None; + } + } } -"#; -/// Gather-subtract kernel - computes residuals = embeddings - centroids[codes]. -/// 2D parallelization: blockIdx.x = row, threadIdx.x = dimension offset. -/// Each thread handles multiple dimensions with stride. -const GATHER_SUBTRACT_KERNEL: &str = r#" -.version 7.0 -.target sm_70 -.address_size 64 - -.visible .entry gather_subtract_kernel( - .param .u64 embeddings_ptr, - .param .u64 centroids_ptr, - .param .u64 codes_ptr, - .param .u64 residuals_ptr, - .param .u32 num_rows, - .param .u32 dim -) -{ - .reg .u32 %r<20>; - .reg .u64 %rd<20>; - .reg .f32 %f<5>; - .reg .pred %p<3>; - - // row = blockIdx.x (one block per row) - mov.u32 %r0, %ctaid.x; - // d_start = threadIdx.x (starting dimension for this thread) - mov.u32 %r1, %tid.x; - // stride = blockDim.x - mov.u32 %r2, %ntid.x; - - // Load parameters - ld.param.u64 %rd0, [embeddings_ptr]; - ld.param.u64 %rd1, [centroids_ptr]; - ld.param.u64 %rd2, [codes_ptr]; - ld.param.u64 %rd3, [residuals_ptr]; - ld.param.u32 %r4, [num_rows]; - ld.param.u32 %r5, [dim]; - - // Bounds check on row - setp.ge.u32 %p0, %r0, %r4; - @%p0 bra END; - - // Load code for this row: code = codes[row] - mul.wide.u32 %rd4, %r0, 4; - add.u64 %rd5, %rd2, %rd4; - ld.global.u32 %r6, [%rd5]; - - // Calculate base pointers for this row - mul.wide.u32 %rd6, %r0, %r5; // row * dim - shl.b64 %rd6, %rd6, 2; // * 4 bytes - add.u64 %rd7, %rd0, %rd6; // emb_base = embeddings + row * dim * 4 - - mul.wide.u32 %rd8, %r6, %r5; // code * dim - shl.b64 %rd8, %rd8, 2; - add.u64 %rd9, %rd1, %rd8; // cent_base = centroids + code * dim * 4 - - add.u64 %rd10, %rd3, %rd6; // res_base = residuals + row * dim * 4 - - // Loop: d = threadIdx.x, d += blockDim.x while d < dim - mov.u32 %r7, %r1; // d = d_start - -DIM_LOOP: - setp.ge.u32 %p1, %r7, %r5; - @%p1 bra END; - - // Compute addresses for dimension d - mul.wide.u32 %rd11, %r7, 4; - add.u64 %rd12, %rd7, %rd11; // &emb[d] - add.u64 %rd13, %rd9, %rd11; // ¢[d] - add.u64 %rd14, %rd10, %rd11; // &res[d] - - ld.global.f32 %f0, [%rd12]; - ld.global.f32 %f1, [%rd13]; - sub.f32 %f2, %f0, %f1; - st.global.f32 [%rd14], %f2; - - add.u32 %r7, %r7, %r2; // d += stride - bra DIM_LOOP; - -END: - ret; +/// CUDA kernels for next-plaid operations +const CUDA_KERNELS: &str = r#" +// Argmax kernel - finds index of maximum value per row. +extern "C" __global__ void argmax_kernel( + const float* scores, + unsigned int* codes, + int num_rows, + int num_cols +) { + int idx = blockIdx.x * blockDim.x + threadIdx.x; + if (idx >= num_rows) return; + + const float* row = scores + (long long)idx * num_cols; + float best_val = row[0]; + unsigned int best_idx = 0; + + for (int j = 1; j < num_cols; j++) { + float val = row[j]; + if (val > best_val) { + best_val = val; + best_idx = j; + } + } + + codes[idx] = best_idx; +} + +// Gather-subtract kernel - computes residuals = embeddings - centroids[codes]. +// 2D parallelization: blockIdx.x = row, threadIdx.x = dimension offset. +// Each thread handles multiple dimensions with stride. +extern "C" __global__ void gather_subtract_kernel( + const float* embeddings, + const float* centroids, + const unsigned int* codes, + float* residuals, + int num_rows, + int dim +) { + int row = blockIdx.x; + int d_start = threadIdx.x; + int stride = blockDim.x; + + if (row >= num_rows) return; + + unsigned int code = codes[row]; + const float* emb_row = embeddings + (long long)row * dim; + const float* cent_row = centroids + (long long)code * dim; + float* res_row = residuals + (long long)row * dim; + + for (int d = d_start; d < dim; d += stride) { + res_row[d] = emb_row[d] - cent_row[d]; + } } "#; -/// Load PTX kernels into the device. -fn load_kernels(device: &Arc) -> Result<()> { - device - .load_ptx( - cudarc::nvrtc::Ptx::from_src(ARGMAX_KERNEL), - "argmax", - &["argmax_kernel"], - ) - .map_err(|e| Error::Codec(format!("Failed to load argmax kernel: {}", e)))?; - - device - .load_ptx( - cudarc::nvrtc::Ptx::from_src(GATHER_SUBTRACT_KERNEL), - "gather_subtract", - &["gather_subtract_kernel"], - ) - .map_err(|e| Error::Codec(format!("Failed to load gather_subtract kernel: {}", e)))?; - - Ok(()) +/// Compile and load CUDA kernels, returning the kernel functions. +fn load_kernels(device: &Arc) -> Result<(CudaFunction, CudaFunction)> { + let ptx = compile_ptx(CUDA_KERNELS) + .map_err(|e| Error::Codec(format!("Failed to compile CUDA kernels: {:?}", e)))?; + + let module = device + .load_module(ptx) + .map_err(|e| Error::Codec(format!("Failed to load CUDA module: {:?}", e)))?; + + let argmax_func = module + .load_function("argmax_kernel") + .map_err(|e| Error::Codec(format!("Failed to load argmax_kernel: {:?}", e)))?; + + let gather_subtract_func = module + .load_function("gather_subtract_kernel") + .map_err(|e| Error::Codec(format!("Failed to load gather_subtract_kernel: {:?}", e)))?; + + Ok((argmax_func, gather_subtract_func)) } /// Compute optimal batch size to stay within GPU memory budget. @@ -277,10 +266,10 @@ pub fn compress_into_codes_cuda_batched( }; // Upload centroids once (reused across batches) - let centroids_gpu = ctx - .device - .htod_sync_copy(centroids_cont.as_slice().unwrap()) - .map_err(|e| Error::Codec(format!("Failed to copy centroids to GPU: {}", e)))?; + let centroids_gpu: CudaSlice = ctx + .stream + .clone_htod(centroids_cont.as_slice().unwrap()) + .map_err(|e| Error::Codec(format!("Failed to copy centroids to GPU: {:?}", e)))?; // Kernels are preloaded in CudaContext::new() @@ -297,20 +286,20 @@ pub fn compress_into_codes_cuda_batched( batch.as_standard_layout().to_owned() }; - let batch_gpu = ctx - .device - .htod_sync_copy(batch_cont.as_slice().unwrap()) - .map_err(|e| Error::Codec(format!("Failed to copy batch to GPU: {}", e)))?; + let batch_gpu: CudaSlice = ctx + .stream + .clone_htod(batch_cont.as_slice().unwrap()) + .map_err(|e| Error::Codec(format!("Failed to copy batch to GPU: {:?}", e)))?; let mut scores_gpu: CudaSlice = ctx - .device + .stream .alloc_zeros(batch_n * k) - .map_err(|e| Error::Codec(format!("Failed to allocate scores: {}", e)))?; + .map_err(|e| Error::Codec(format!("Failed to allocate scores: {:?}", e)))?; // GEMM: scores = batch @ centroids.T let cfg = GemmConfig { - transa: cudarc::cublas::sys::cublasOperation_t::CUBLAS_OP_T, - transb: cudarc::cublas::sys::cublasOperation_t::CUBLAS_OP_N, + transa: cublasOperation_t::CUBLAS_OP_T, + transb: cublasOperation_t::CUBLAS_OP_N, m: k as i32, n: batch_n as i32, k: dim as i32, @@ -324,38 +313,39 @@ pub fn compress_into_codes_cuda_batched( unsafe { ctx.blas .gemm(cfg, ¢roids_gpu, &batch_gpu, &mut scores_gpu) - .map_err(|e| Error::Codec(format!("cuBLAS GEMM failed: {}", e)))?; + .map_err(|e| Error::Codec(format!("cuBLAS GEMM failed: {:?}", e)))?; } let mut codes_gpu: CudaSlice = ctx - .device + .stream .alloc_zeros(batch_n) - .map_err(|e| Error::Codec(format!("Failed to allocate codes: {}", e)))?; - - let func = ctx - .device - .get_func("argmax", "argmax_kernel") - .ok_or_else(|| Error::Codec("Failed to get argmax function".into()))?; + .map_err(|e| Error::Codec(format!("Failed to allocate codes: {:?}", e)))?; let block_size = 256; let grid_size = batch_n.div_ceil(block_size); + let launch_cfg = LaunchConfig { + block_dim: (block_size as u32, 1, 1), + grid_dim: (grid_size as u32, 1, 1), + shared_mem_bytes: 0, + }; + let batch_n_i32 = batch_n as i32; + let k_i32 = k as i32; unsafe { - func.launch( - LaunchConfig { - block_dim: (block_size as u32, 1, 1), - grid_dim: (grid_size as u32, 1, 1), - shared_mem_bytes: 0, - }, - (&scores_gpu, &mut codes_gpu, batch_n as u32, k as u32), - ) - .map_err(|e| Error::Codec(format!("Argmax kernel failed: {}", e)))?; + ctx.stream + .launch_builder(&ctx.argmax_func) + .arg(&scores_gpu) + .arg(&mut codes_gpu) + .arg(&batch_n_i32) + .arg(&k_i32) + .launch(launch_cfg) + .map_err(|e| Error::Codec(format!("Argmax kernel failed: {:?}", e)))?; } - let codes_host = ctx - .device - .dtoh_sync_copy(&codes_gpu) - .map_err(|e| Error::Codec(format!("Failed to copy codes: {}", e)))?; + let codes_host: Vec = ctx + .stream + .clone_dtoh(&codes_gpu) + .map_err(|e| Error::Codec(format!("Failed to copy codes: {:?}", e)))?; all_codes.extend(codes_host.into_iter().map(|x| x as usize)); } @@ -419,10 +409,10 @@ pub fn compress_and_residuals_cuda_batched( }; // Upload centroids once (reused across batches) - let centroids_gpu = ctx - .device - .htod_sync_copy(centroids_cont.as_slice().unwrap()) - .map_err(|e| Error::Codec(format!("Failed to copy centroids to GPU: {}", e)))?; + let centroids_gpu: CudaSlice = ctx + .stream + .clone_htod(centroids_cont.as_slice().unwrap()) + .map_err(|e| Error::Codec(format!("Failed to copy centroids to GPU: {:?}", e)))?; // Kernels are preloaded in CudaContext::new() @@ -440,21 +430,21 @@ pub fn compress_and_residuals_cuda_batched( batch.as_standard_layout().to_owned() }; - let batch_gpu = ctx - .device - .htod_sync_copy(batch_cont.as_slice().unwrap()) - .map_err(|e| Error::Codec(format!("Failed to copy batch to GPU: {}", e)))?; + let batch_gpu: CudaSlice = ctx + .stream + .clone_htod(batch_cont.as_slice().unwrap()) + .map_err(|e| Error::Codec(format!("Failed to copy batch to GPU: {:?}", e)))?; // Allocate GPU memory for scores and codes let mut scores_gpu: CudaSlice = ctx - .device + .stream .alloc_zeros(batch_n * k) - .map_err(|e| Error::Codec(format!("Failed to allocate scores: {}", e)))?; + .map_err(|e| Error::Codec(format!("Failed to allocate scores: {:?}", e)))?; // GEMM: scores = batch @ centroids.T let cfg = GemmConfig { - transa: cudarc::cublas::sys::cublasOperation_t::CUBLAS_OP_T, - transb: cudarc::cublas::sys::cublasOperation_t::CUBLAS_OP_N, + transa: cublasOperation_t::CUBLAS_OP_T, + transb: cublasOperation_t::CUBLAS_OP_N, m: k as i32, n: batch_n as i32, k: dim as i32, @@ -468,34 +458,34 @@ pub fn compress_and_residuals_cuda_batched( unsafe { ctx.blas .gemm(cfg, ¢roids_gpu, &batch_gpu, &mut scores_gpu) - .map_err(|e| Error::Codec(format!("cuBLAS GEMM failed: {}", e)))?; + .map_err(|e| Error::Codec(format!("cuBLAS GEMM failed: {:?}", e)))?; } // Argmax to get codes let mut codes_gpu: CudaSlice = ctx - .device + .stream .alloc_zeros(batch_n) - .map_err(|e| Error::Codec(format!("Failed to allocate codes: {}", e)))?; - - let argmax_func = ctx - .device - .get_func("argmax", "argmax_kernel") - .ok_or_else(|| Error::Codec("Failed to get argmax function".into()))?; + .map_err(|e| Error::Codec(format!("Failed to allocate codes: {:?}", e)))?; let block_size = 256; let grid_size = batch_n.div_ceil(block_size); + let argmax_cfg = LaunchConfig { + block_dim: (block_size as u32, 1, 1), + grid_dim: (grid_size as u32, 1, 1), + shared_mem_bytes: 0, + }; + let batch_n_i32 = batch_n as i32; + let k_i32 = k as i32; unsafe { - argmax_func - .launch( - LaunchConfig { - block_dim: (block_size as u32, 1, 1), - grid_dim: (grid_size as u32, 1, 1), - shared_mem_bytes: 0, - }, - (&scores_gpu, &mut codes_gpu, batch_n as u32, k as u32), - ) - .map_err(|e| Error::Codec(format!("Argmax kernel failed: {}", e)))?; + ctx.stream + .launch_builder(&ctx.argmax_func) + .arg(&scores_gpu) + .arg(&mut codes_gpu) + .arg(&batch_n_i32) + .arg(&k_i32) + .launch(argmax_cfg) + .map_err(|e| Error::Codec(format!("Argmax kernel failed: {:?}", e)))?; } // Free scores memory - no longer needed @@ -503,47 +493,42 @@ pub fn compress_and_residuals_cuda_batched( // Compute residuals: residuals = embeddings - centroids[codes] let mut residuals_gpu: CudaSlice = ctx - .device + .stream .alloc_zeros(batch_n * dim) - .map_err(|e| Error::Codec(format!("Failed to allocate residuals: {}", e)))?; - - let gather_func = ctx - .device - .get_func("gather_subtract", "gather_subtract_kernel") - .ok_or_else(|| Error::Codec("Failed to get gather_subtract function".into()))?; + .map_err(|e| Error::Codec(format!("Failed to allocate residuals: {:?}", e)))?; // For gather_subtract: one block per row, threads parallelize over dimensions let threads_per_row = dim.min(256); + let gather_cfg = LaunchConfig { + block_dim: (threads_per_row as u32, 1, 1), + grid_dim: (batch_n as u32, 1, 1), + shared_mem_bytes: 0, + }; + let dim_i32 = dim as i32; + unsafe { - gather_func - .launch( - LaunchConfig { - block_dim: (threads_per_row as u32, 1, 1), - grid_dim: (batch_n as u32, 1, 1), - shared_mem_bytes: 0, - }, - ( - &batch_gpu, - ¢roids_gpu, - &codes_gpu, - &mut residuals_gpu, - batch_n as u32, - dim as u32, - ), - ) - .map_err(|e| Error::Codec(format!("Gather-subtract kernel failed: {}", e)))?; + ctx.stream + .launch_builder(&ctx.gather_subtract_func) + .arg(&batch_gpu) + .arg(¢roids_gpu) + .arg(&codes_gpu) + .arg(&mut residuals_gpu) + .arg(&batch_n_i32) + .arg(&dim_i32) + .launch(gather_cfg) + .map_err(|e| Error::Codec(format!("Gather-subtract kernel failed: {:?}", e)))?; } // Copy results back to host - let codes_host = ctx - .device - .dtoh_sync_copy(&codes_gpu) - .map_err(|e| Error::Codec(format!("Failed to copy codes: {}", e)))?; - - let residuals_host = ctx - .device - .dtoh_sync_copy(&residuals_gpu) - .map_err(|e| Error::Codec(format!("Failed to copy residuals: {}", e)))?; + let codes_host: Vec = ctx + .stream + .clone_dtoh(&codes_gpu) + .map_err(|e| Error::Codec(format!("Failed to copy codes: {:?}", e)))?; + + let residuals_host: Vec = ctx + .stream + .clone_dtoh(&residuals_gpu) + .map_err(|e| Error::Codec(format!("Failed to copy residuals: {:?}", e)))?; all_codes.extend(codes_host.into_iter().map(|x| x as usize)); diff --git a/next-plaid/src/index.rs b/next-plaid/src/index.rs index 0868aa61..c2ca4f80 100644 --- a/next-plaid/src/index.rs +++ b/next-plaid/src/index.rs @@ -361,7 +361,7 @@ pub fn create_index_files( if !config.force_cpu { if let Some(ctx) = crate::cuda::get_global_context() { match crate::cuda::compress_and_residuals_cuda_batched( - ctx, + &ctx, &batch_embeddings.view(), &codec.centroids_view(), None, diff --git a/next-plaid/src/kmeans.rs b/next-plaid/src/kmeans.rs index 6873fe88..759d99c8 100644 --- a/next-plaid/src/kmeans.rs +++ b/next-plaid/src/kmeans.rs @@ -14,7 +14,7 @@ use rand_chacha::ChaCha8Rng; use crate::error::{Error, Result}; use crate::maxsim; -pub use fastkmeans_rs::{FastKMeans, KMeansConfig, KMeansError}; +pub use fastkmeans_rs::{kmeans_double_chunked, FastKMeans, KMeansConfig, KMeansError}; #[cfg(feature = "cuda")] pub use fastkmeans_rs::FastKMeansCuda; @@ -71,20 +71,15 @@ pub fn default_config(num_centroids: usize) -> KMeansConfig { } /// Compute centroids from a set of embeddings (CPU implementation). +/// Uses kmeans_double_chunked directly to avoid FastKMeans::train() which +/// tries CUDA when the cuda feature is enabled. fn compute_centroids_cpu( embeddings: &ArrayView2, config: KMeansConfig, ) -> Result> { - let mut kmeans = FastKMeans::with_config(config); - - kmeans - .train(embeddings) + let result = kmeans_double_chunked(embeddings, &config) .map_err(|e| Error::IndexCreation(format!("K-means training failed: {}", e)))?; - - kmeans - .centroids() - .ok_or_else(|| Error::IndexCreation("K-means did not produce centroids".into())) - .map(|c| c.to_owned()) + Ok(result.centroids) } /// Compute centroids from a set of embeddings. @@ -110,7 +105,7 @@ pub fn compute_centroids( compute_centroids_cpu(embeddings, config) } -/// Compute centroids from a set of embeddings using CUDA (or CPU if force_cpu is true). +/// Compute centroids from a set of embeddings using CUDA (or CPU if force_cpu is true or CUDA fails). #[cfg(feature = "cuda")] pub fn compute_centroids( embeddings: &ArrayView2, @@ -120,21 +115,42 @@ pub fn compute_centroids( ) -> Result> { let config = config.unwrap_or_else(|| default_config(num_centroids)); - if force_cpu { - return compute_centroids_cpu(embeddings, config); + // Skip CUDA if force_cpu is set or CUDA has been determined to be broken + if force_cpu || crate::cuda::is_cuda_broken() { + return compute_centroids_cpu(embeddings, config.clone()); } - let mut kmeans = FastKMeansCuda::with_config(config) - .map_err(|e| Error::IndexCreation(format!("CUDA K-means initialization failed: {}", e)))?; - - kmeans - .train(embeddings) - .map_err(|e| Error::IndexCreation(format!("CUDA K-means training failed: {}", e)))?; - - kmeans - .centroids() - .ok_or_else(|| Error::IndexCreation("CUDA K-means did not produce centroids".into())) - .map(|c| c.to_owned()) + // Try CUDA first, catching panics from invalid/stub CUDA libraries + let cuda_result = std::panic::catch_unwind(std::panic::AssertUnwindSafe(|| { + match FastKMeansCuda::with_config(config.clone()) { + Ok(mut kmeans) => { + match kmeans.train(embeddings) { + Ok(()) => { + kmeans + .centroids() + .map(|c| c.to_owned()) + .ok_or_else(|| "CUDA K-means did not produce centroids".to_string()) + } + Err(e) => Err(format!("CUDA K-means training failed: {}", e)), + } + } + Err(e) => Err(format!("CUDA K-means init failed: {}", e)), + } + })); + + match cuda_result { + Ok(Ok(centroids)) => Ok(centroids), + Ok(Err(e)) => { + crate::cuda::mark_cuda_broken(); + eprintln!("[next-plaid] {}, falling back to CPU", e); + compute_centroids_cpu(embeddings, config) + } + Err(_) => { + crate::cuda::mark_cuda_broken(); + eprintln!("[next-plaid] CUDA K-means panicked (invalid/stub library?), falling back to CPU"); + compute_centroids_cpu(embeddings, config) + } + } } /// Compute centroids from a set of embeddings using Metal GPU (or CPU if force_cpu is true). @@ -323,30 +339,47 @@ pub fn compute_kmeans( .to_owned() }; - // Run k-means (CUDA with CPU fallback when force_cpu is true) + // Run k-means (CUDA with automatic CPU fallback, catching panics) #[cfg(feature = "cuda")] - let centroids = if config.force_cpu { - let mut kmeans = FastKMeans::with_config(kmeans_config); - kmeans - .train(&samples_tensor.view()) + let centroids = if config.force_cpu || crate::cuda::is_cuda_broken() { + // Use CPU if force_cpu is set or CUDA has been determined to be broken + // Use kmeans_double_chunked directly to avoid FastKMeans::train() which + // tries CUDA when the cuda feature is enabled + let result = kmeans_double_chunked(&samples_tensor.view(), &kmeans_config) .map_err(|e| Error::IndexCreation(format!("K-means training failed: {}", e)))?; - - kmeans - .centroids() - .ok_or_else(|| Error::IndexCreation("K-means did not produce centroids".into()))? - .to_owned() + result.centroids } else { - let mut kmeans = FastKMeansCuda::with_config(kmeans_config).map_err(|e| { - Error::IndexCreation(format!("CUDA K-means initialization failed: {}", e)) - })?; - kmeans - .train(&samples_tensor.view()) - .map_err(|e| Error::IndexCreation(format!("CUDA K-means training failed: {}", e)))?; - - kmeans - .centroids() - .ok_or_else(|| Error::IndexCreation("CUDA K-means did not produce centroids".into()))? - .to_owned() + // Try CUDA, catching panics from invalid/stub CUDA libraries + let samples_view = samples_tensor.view(); + let cuda_result = std::panic::catch_unwind(std::panic::AssertUnwindSafe(|| { + match FastKMeansCuda::with_config(kmeans_config.clone()) { + Ok(mut kmeans) => { + match kmeans.train(&samples_view) { + Ok(()) => kmeans.centroids().map(|c| c.to_owned()), + Err(_) => None, + } + } + Err(_) => None, + } + })); + + match cuda_result { + Ok(Some(c)) => c, + Ok(None) | Err(_) => { + // Mark CUDA as broken to prevent subsequent attempts + crate::cuda::mark_cuda_broken(); + if cuda_result.is_err() { + eprintln!("[next-plaid] CUDA K-means panicked (invalid/stub library?), falling back to CPU"); + } else { + eprintln!("[next-plaid] CUDA K-means failed, falling back to CPU"); + } + // Use kmeans_double_chunked directly to avoid FastKMeans::train() which + // tries CUDA when the cuda feature is enabled + let result = kmeans_double_chunked(&samples_tensor.view(), &kmeans_config) + .map_err(|e| Error::IndexCreation(format!("K-means training failed: {}", e)))?; + result.centroids + } + } }; // Run k-means (Metal GPU with CPU fallback when force_cpu is true) diff --git a/next-plaid/src/lib.rs b/next-plaid/src/lib.rs index 5a391d4c..1fa24817 100644 --- a/next-plaid/src/lib.rs +++ b/next-plaid/src/lib.rs @@ -38,4 +38,4 @@ pub use search::{QueryResult, SearchParameters}; pub use update::UpdateConfig; #[cfg(feature = "cuda")] -pub use cuda::CudaContext; +pub use cuda::{clear_cuda_broken, is_cuda_broken, mark_cuda_broken, CudaContext}; From 1deb3b975b1a3325c3b8423452db88507fc2478c Mon Sep 17 00:00:00 2001 From: Raphael Sourty Date: Wed, 18 Mar 2026 15:36:58 +0000 Subject: [PATCH 2/3] Bump fastkmeans-rs to 1.0.2 Co-Authored-By: Claude Opus 4.6 (1M context) --- Cargo.lock | 905 +++++++++++++++++++++++++----------------- next-plaid/Cargo.toml | 2 +- 2 files changed, 551 insertions(+), 356 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index efcf09e2..27c9ba86 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -80,9 +80,9 @@ checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299" [[package]] name = "anstream" -version = "0.6.21" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43d5b281e737544384e969a5ccad3f1cdd24b48086a0fc1b2a5262a26b8f4f4a" +checksum = "824a212faf96e9acacdbd09febd34438f8f711fb84e09a8916013cd7815ca28d" dependencies = [ "anstyle", "anstyle-parse", @@ -95,15 +95,15 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.13" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5192cca8006f1fd4f7237516f40fa183bb07f8fbdfedaa0036de5ea9b0b45e78" +checksum = "940b3a0ca603d1eade50a4846a2afffd5ef57a9feac2c0e2ec2e14f9ead76000" [[package]] name = "anstyle-parse" -version = "0.2.7" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2" +checksum = "52ce7f38b242319f7cabaa6813055467063ecdc9d355bbb4ce0c68908cd8130e" dependencies = [ "utf8parse", ] @@ -130,9 +130,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.100" +version = "1.0.102" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a23eb6b1614318a8071c9b2521f36b424b2c83db5eb3a0fead4a6c0809af6e61" +checksum = "7f202df86484c868dbad7eaa557ef785d5c66295e41b460ef922eca0723b842c" [[package]] name = "approx" @@ -154,9 +154,9 @@ dependencies = [ [[package]] name = "arc-swap" -version = "1.8.0" +version = "1.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51d03449bb8ca2cc2ef70869af31463d1ae5ccc8fa3e334b307203fbf815207e" +checksum = "f9f3647c145568cec02c42054e07bdf9a5a698e15b466fb2341bfc393cd24aa5" dependencies = [ "rustversion", ] @@ -197,9 +197,9 @@ checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" [[package]] name = "aws-lc-rs" -version = "1.15.2" +version = "1.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a88aab2464f1f25453baa7a07c84c5b7684e274054ba06817f382357f77a288" +checksum = "94bffc006df10ac2a68c83692d734a465f8ee6c5b384d8545a636f81d858f4bf" dependencies = [ "aws-lc-sys", "zeroize", @@ -207,9 +207,9 @@ dependencies = [ [[package]] name = "aws-lc-sys" -version = "0.35.0" +version = "0.38.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b45afffdee1e7c9126814751f88dddc747f41d91da16c9551a0f1e8a11e788a1" +checksum = "4321e568ed89bb5a7d291a7f37997c2c0df89809d7b6d12062c81ddb54aa782e" dependencies = [ "cc", "cmake", @@ -301,9 +301,9 @@ checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" [[package]] name = "base64ct" -version = "1.8.2" +version = "1.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d809780667f4410e7c41b07f52439b94d2bdf8528eeedc287fa38d3b7f95d82" +checksum = "2af50177e190e07a26ab74f8b1efbfe2ef87da2116221318cb1c2e82baf7de06" [[package]] name = "bincode" @@ -322,9 +322,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.10.0" +version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3" +checksum = "843867be96c8daad0d758b57df9392b6d8d271134fce549de6ce169ff98a92af" [[package]] name = "blas-src" @@ -374,9 +374,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.19.1" +version = "3.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dd9dc738b7a8311c7ade152424974d8115f2cdad61e8dab8dac9f2362298510" +checksum = "5d20789868f4b01b2f2caec9f5c4e0213b41e3e5702a50157d699ae31ced2fcb" [[package]] name = "byteorder" @@ -386,9 +386,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.11.0" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b35204fbdc0b3f4446b89fc1ac2cf84a8a68971995d0bf2e925ec7cd960f9cb3" +checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33" [[package]] name = "bzip2" @@ -435,9 +435,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.52" +version = "1.2.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd4932aefd12402b36c60956a4fe0035421f544799057659ff86f923657aada3" +checksum = "7a0dd1ca384932ff3641c8718a02769f1698e7563dc6974ffd03346116310423" dependencies = [ "find-msvc-tools", "jobserver", @@ -515,9 +515,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.54" +version = "4.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6e6ff9dcd79cff5cd969a17a545d79e84ab086e444102a591e288a8aa3ce394" +checksum = "b193af5b67834b676abd72466a96c1024e6a6ad978a1f484bd90b85c94041351" dependencies = [ "clap_builder", "clap_derive", @@ -525,9 +525,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.54" +version = "4.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa42cf4d2b7a41bc8f663a7cab4031ebafa1bf3875705bfaf8466dc60ab52c00" +checksum = "714a53001bf66416adb0e2ef5ac857140e7dc3a0c48fb28b2f10762fc4b5069f" dependencies = [ "anstream", "anstyle", @@ -537,9 +537,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.49" +version = "4.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a0b5487afeab2deb2ff4e03a807ad1a03ac532ff5a2cee5d86884440c7f7671" +checksum = "1110bd8a634a1ab8cb04345d8d878267d57c3cf1b38d91b71af6686408bbca6a" dependencies = [ "heck", "proc-macro2", @@ -549,9 +549,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.7.6" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1d728cc89cf3aee9ff92b05e62b19ee65a02b5702cff7d5a377e32c6ae29d8d" +checksum = "c8d4a3bb8b1e0c1050499d1815f5ab16d04f0959b233085fb31653fbfc9d98f9" [[package]] name = "cmake" @@ -623,9 +623,9 @@ dependencies = [ [[package]] name = "colorchoice" -version = "1.0.4" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75" +checksum = "1d07550c9036bf2ae0c684c4297d503f838287c83c53686d05370d0e139ae570" [[package]] name = "colored" @@ -753,9 +753,9 @@ dependencies = [ [[package]] name = "criterion" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d883447757bb0ee46f233e9dc22eb84d93a9508c9b868687b274fc431d886bf" +checksum = "950046b2aa2492f9a536f5f4f9a3de7b9e2476e575e05bd6c333371add4d98f3" dependencies = [ "alloca", "anes", @@ -778,9 +778,9 @@ dependencies = [ [[package]] name = "criterion-plot" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed943f81ea2faa8dcecbbfa50164acf95d555afec96a27871663b300e387b2e4" +checksum = "d8d80a2f4f5b554395e47b5d8305bc3d27813bacb73493eb1001e8f76dae29ea" dependencies = [ "cast", "itertools 0.13.0", @@ -829,31 +829,22 @@ dependencies = [ [[package]] name = "ctrlc" -version = "3.5.1" +version = "3.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73736a89c4aff73035ba2ed2e565061954da00d4970fc9ac25dcc85a2a20d790" +checksum = "e0b1fab2ae45819af2d0731d60f2afe17227ebb1a1538a236da84c93e9a60162" dependencies = [ "dispatch2", "nix", "windows-sys 0.61.2", ] -[[package]] -name = "cudarc" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38cd60a9a42ec83a2ed7effb0b1f073270264ea99da7acfc44f7e8d74dee0384" -dependencies = [ - "libloading 0.8.9", -] - [[package]] name = "cudarc" version = "0.19.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6468cb7fa330840f3ebcd8df51edc0e7bf5c18df524792ce6004c6821851cdf3" dependencies = [ - "libloading 0.9.0", + "libloading", ] [[package]] @@ -916,9 +907,9 @@ dependencies = [ [[package]] name = "deflate64" -version = "0.1.9" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da692b8d1080ea3045efaab14434d40468c3d8657e42abddfffca87b428f4c1b" +checksum = "807800ff3288b621186fe0a8f3392c4652068257302709c24efd918c3dffcdc2" [[package]] name = "der" @@ -932,9 +923,9 @@ dependencies = [ [[package]] name = "deranged" -version = "0.5.5" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ececcb659e7ba858fb4f10388c250a7252eb0a27373f1a72b8748afdd248e587" +checksum = "7cd812cc2bc1d69d4764bd80df88b4317eaef9e773c75226407d9bc0876b211c" dependencies = [ "powerfmt", ] @@ -1045,11 +1036,11 @@ dependencies = [ [[package]] name = "dispatch2" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89a09f22a6c6069a18470eb92d2298acf25463f14256d24778e1230d789a2aec" +checksum = "1e0e367e4e7da84520dedcac1901e4da967309406d1e51017ae1abfb97adbd38" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.0", "block2", "libc", "objc2", @@ -1160,13 +1151,13 @@ checksum = "7360491ce676a36bf9bb3c56c1aa791658183a54d2744120f27285738d90465a" [[package]] name = "fastkmeans-rs" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "860015e326fe88f5ba1f0788ff2990b9ec3ea0b8afce0108bd33d0ed02ad8530" +checksum = "ac7703036693ff6cf99b784b0da849f93462dc6d91fb2f7203ddabab658eb1e4" dependencies = [ "accelerate-src", "blas-src 0.10.0", - "cudarc 0.19.3", + "cudarc", "intel-mkl-src", "metal", "ndarray 0.16.1", @@ -1177,7 +1168,7 @@ dependencies = [ "rand 0.8.5", "rand_chacha 0.3.1", "rayon", - "thiserror 2.0.17", + "thiserror 2.0.18", ] [[package]] @@ -1188,31 +1179,30 @@ checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" [[package]] name = "filetime" -version = "0.2.26" +version = "0.2.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc0505cd1b6fa6580283f6bdf70a73fcf4aba1184038c90902b92b3dd0df63ed" +checksum = "f98844151eee8917efc50bd9e8318cb963ae8b297431495d3f758616ea5c57db" dependencies = [ "cfg-if", "libc", "libredox", - "windows-sys 0.60.2", ] [[package]] name = "find-msvc-tools" -version = "0.1.7" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f449e6c6c08c865631d4890cfacf252b3d396c9bcc83adb6623cdb02a8336c41" +checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582" [[package]] name = "flate2" -version = "1.1.5" +version = "1.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfe33edd8e85a12a67454e37f8c75e730830d83e313556ab9ebf9ee7fbeb3bfb" +checksum = "843fba2746e448b37e26a819579957415c8cef339bf08564fe8b7ddbd959573c" dependencies = [ "crc32fast", - "libz-rs-sys", "miniz_oxide", + "zlib-rs", ] [[package]] @@ -1221,6 +1211,12 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +[[package]] +name = "foldhash" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" + [[package]] name = "foldhash" version = "0.2.0" @@ -1306,9 +1302,9 @@ checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" [[package]] name = "futures" -version = "0.3.31" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" +checksum = "8b147ee9d1f6d097cef9ce628cd2ee62288d963e16fb287bd9286455b241382d" dependencies = [ "futures-channel", "futures-core", @@ -1321,9 +1317,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.31" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" +checksum = "07bbe89c50d7a535e539b8c17bc0b49bdb77747034daa8087407d655f3f7cc1d" dependencies = [ "futures-core", "futures-sink", @@ -1331,15 +1327,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.31" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" +checksum = "7e3450815272ef58cec6d564423f6e755e25379b217b0bc688e295ba24df6b1d" [[package]] name = "futures-executor" -version = "0.3.31" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" +checksum = "baf29c38818342a3b26b5b923639e7b1f4a61fc5e76102d4b1981c6dc7a7579d" dependencies = [ "futures-core", "futures-task", @@ -1348,15 +1344,15 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.31" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" +checksum = "cecba35d7ad927e23624b22ad55235f2239cfa44fd10428eecbeba6d6a717718" [[package]] name = "futures-macro" -version = "0.3.31" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" +checksum = "e835b70203e41293343137df5c0664546da5745f82ec9b84d40be8336958447b" dependencies = [ "proc-macro2", "quote", @@ -1365,15 +1361,15 @@ dependencies = [ [[package]] name = "futures-sink" -version = "0.3.31" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" +checksum = "c39754e157331b013978ec91992bde1ac089843443c49cbc7f46150b0fad0893" [[package]] name = "futures-task" -version = "0.3.31" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" +checksum = "037711b3d59c33004d3856fbdc83b99d4ff37a24768fa1be9ce3538a1cde4393" [[package]] name = "futures-timer" @@ -1383,9 +1379,9 @@ checksum = "f288b0a4f20f9a56b5d1da57e2227c661b7b16168e2f72365f57b63326e29b24" [[package]] name = "futures-util" -version = "0.3.31" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" +checksum = "389ca41296e6190b48053de0321d02a77f32f8a5d2461dd38762c0593805c6d6" dependencies = [ "futures-channel", "futures-core", @@ -1395,7 +1391,6 @@ dependencies = [ "futures-task", "memchr", "pin-project-lite", - "pin-utils", "slab", ] @@ -1411,9 +1406,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.16" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" +checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0" dependencies = [ "cfg-if", "js-sys", @@ -1431,11 +1426,24 @@ dependencies = [ "cfg-if", "js-sys", "libc", - "r-efi", + "r-efi 5.3.0", "wasip2", "wasm-bindgen", ] +[[package]] +name = "getrandom" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0de51e6874e94e7bf76d726fc5d13ba782deca734ff60d5bb2fb2607c7406555" +dependencies = [ + "cfg-if", + "libc", + "r-efi 6.0.0", + "wasip2", + "wasip3", +] + [[package]] name = "getset" version = "0.1.6" @@ -1526,6 +1534,15 @@ version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +[[package]] +name = "hashbrown" +version = "0.15.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" +dependencies = [ + "foldhash 0.1.5", +] + [[package]] name = "hashbrown" version = "0.16.1" @@ -1534,7 +1551,7 @@ checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" dependencies = [ "allocator-api2", "equivalent", - "foldhash", + "foldhash 0.2.0", ] [[package]] @@ -1585,7 +1602,7 @@ dependencies = [ "reqwest 0.12.28", "serde", "serde_json", - "thiserror 2.0.17", + "thiserror 2.0.18", "tokio", "ureq 2.12.1", "windows-sys 0.60.2", @@ -1602,9 +1619,9 @@ dependencies = [ [[package]] name = "hmac-sha256" -version = "1.1.12" +version = "1.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad6880c8d4a9ebf39c6e8b77007ce223f646a4d21ce29d99f70cb16420545425" +checksum = "ec9d92d097f4749b64e8cc33d924d9f40a2d4eb91402b458014b781f5733d60f" [[package]] name = "http" @@ -1721,14 +1738,13 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.19" +version = "0.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "727805d60e7938b76b826a6ef209eb70eaa1812794f9424d4a4e2d740662df5f" +checksum = "96547c2556ec9d12fb1578c4eaf448b04993e7fb79cbaad930a656880a6bdfa0" dependencies = [ "base64 0.22.1", "bytes", "futures-channel", - "futures-core", "futures-util", "http", "http-body", @@ -1757,7 +1773,7 @@ dependencies = [ "js-sys", "log", "wasm-bindgen", - "windows-core", + "windows-core 0.62.2", ] [[package]] @@ -1850,6 +1866,12 @@ dependencies = [ "zerovec", ] +[[package]] +name = "id-arena" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d3067d79b975e8844ca9eb072e16b31c3c1c36928edf9c6789548c524d0d954" + [[package]] name = "ident_case" version = "1.0.1" @@ -1960,9 +1982,9 @@ dependencies = [ [[package]] name = "ipnet" -version = "2.11.0" +version = "2.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130" +checksum = "d98f6fed1fde3f8c21bc40a1abb88dd75e67924f9cffc3ef95607bad8017f8e2" [[package]] name = "iri-string" @@ -2038,9 +2060,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.83" +version = "0.3.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "464a3709c7f55f1f721e5389aa6ea4e3bc6aba669353300af094b29ffbdde1d8" +checksum = "b49715b7073f385ba4bc528e5747d02e66cb39c6146efb66b781f131f0fb399c" dependencies = [ "once_cell", "wasm-bindgen", @@ -2053,20 +2075,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] -name = "libc" -version = "0.2.180" +name = "leb128fmt" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcc35a38544a891a5f7c865aca548a982ccb3b8650a5b06d0fd33a10283c56fc" +checksum = "09edd9e8b54e49e587e4f6295a7d29c3ea94d469cb40ab8ca70b288248a81db2" [[package]] -name = "libloading" -version = "0.8.9" +name = "libc" +version = "0.2.183" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7c4b02199fee7c5d21a5ae7d8cfa79a6ef5bb2fc834d6e9058e89c825efdc55" -dependencies = [ - "cfg-if", - "windows-link", -] +checksum = "b5b646652bf6661599e1da8901b3b9522896f01e736bad5f723fe7a3a27f899d" [[package]] name = "libloading" @@ -2080,19 +2098,20 @@ dependencies = [ [[package]] name = "libm" -version = "0.2.15" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9fbbcab51052fe104eb5e5d351cf728d30a5be1fe14d9be8a3b097481fb97de" +checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981" [[package]] name = "libredox" -version = "0.1.12" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d0b95e02c851351f877147b7deea7b1afb1df71b63aa5f8270716e0c5720616" +checksum = "1744e39d1d6a9948f4f388969627434e31128196de472883b39f148769bfe30a" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.0", "libc", - "redox_syscall 0.7.0", + "plain", + "redox_syscall 0.7.3", ] [[package]] @@ -2106,15 +2125,6 @@ dependencies = [ "vcpkg", ] -[[package]] -name = "libz-rs-sys" -version = "0.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c10501e7805cee23da17c7790e59df2870c0d4043ec6d03f67d31e2b53e77415" -dependencies = [ - "zlib-rs", -] - [[package]] name = "linked-hash-map" version = "0.5.6" @@ -2123,9 +2133,9 @@ checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" [[package]] name = "linux-raw-sys" -version = "0.11.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df1d3c3b53da64cf5760482273a98e575c651a67eec7f77df96b5b642de8f039" +checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53" [[package]] name = "litemap" @@ -2166,9 +2176,9 @@ dependencies = [ [[package]] name = "lzma-rust2" -version = "0.15.6" +version = "0.15.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17f7337d278fec032975dc884152491580dd23750ee957047856735fe0e61ede" +checksum = "1670343e58806300d87950e3401e820b519b9384281bbabfb15e3636689ffd69" [[package]] name = "lzma-sys" @@ -2233,15 +2243,15 @@ dependencies = [ [[package]] name = "memchr" -version = "2.7.6" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273" +checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79" [[package]] name = "memmap2" -version = "0.9.9" +version = "0.9.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "744133e4a0e0a658e1374cf3bf8e415c4052a15a111acd372764c55b4177d490" +checksum = "714098028fe011992e1c3962653c96b2d578c4b4bce9036e15ff220319b1e0e3" dependencies = [ "libc", ] @@ -2261,7 +2271,7 @@ version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f569fb946490b5743ad69813cb19629130ce9374034abe31614a36402d18f99e" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.0", "block", "core-graphics-types", "foreign-types 0.5.0", @@ -2337,17 +2347,17 @@ dependencies = [ [[package]] name = "native-tls" -version = "0.2.14" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87de3442987e9dbec73158d5c715e7ad9072fda936bb03d19d7fa10e00520f0e" +checksum = "465500e14ea162429d264d44189adc38b199b62b1c21eea9f69e4b73cb03bbf2" dependencies = [ "libc", "log", "openssl", - "openssl-probe 0.1.6", + "openssl-probe", "openssl-sys", "schannel", - "security-framework 2.11.1", + "security-framework", "security-framework-sys", "tempfile", ] @@ -2420,7 +2430,7 @@ dependencies = [ "blas-src 0.14.0", "byteorder", "criterion", - "cudarc 0.12.1", + "cudarc", "fastkmeans-rs", "fs2", "half", @@ -2439,7 +2449,7 @@ dependencies = [ "serde", "serde_json", "tempfile", - "thiserror 2.0.17", + "thiserror 2.0.18", ] [[package]] @@ -2456,12 +2466,12 @@ dependencies = [ "next-plaid-onnx", "parking_lot", "rand 0.8.5", - "reqwest 0.13.1", + "reqwest 0.13.2", "serde", "serde_json", "sysinfo", "tempfile", - "thiserror 2.0.17", + "thiserror 2.0.18", "tokio", "tower", "tower-http", @@ -2491,11 +2501,11 @@ dependencies = [ [[package]] name = "nix" -version = "0.30.1" +version = "0.31.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74523f3a35e05aba87a1d978330aef40f67b0304ac79c1c00b294c9830543db6" +checksum = "5d6d0705320c1e6ba1d912b5e37cf18071b6c2e9b7fa8215a1e8a7651966f5d3" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.0", "cfg-if", "cfg_aliases", "libc", @@ -2525,9 +2535,9 @@ checksum = "38bf9645c8b145698bb0b18a4637dcacbc421ea49bef2317e4fd8065a387cf21" [[package]] name = "ntapi" -version = "0.4.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c70f219e21142367c70c0b30c6a9e3a14d55b4d12a204d897fbec83a0363f081" +checksum = "c3b335231dfd352ffb0f8017f3b6027a4917f7df785ea2143d8af2adc66980ae" dependencies = [ "winapi", ] @@ -2562,9 +2572,9 @@ dependencies = [ [[package]] name = "num-conv" -version = "0.1.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" +checksum = "cf97ec579c3c42f953ef76dbf8d55ac91fb219dde70e49aa4a6b7d74e9919050" [[package]] name = "num-integer" @@ -2627,9 +2637,9 @@ dependencies = [ [[package]] name = "objc2" -version = "0.6.3" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7c2599ce0ec54857b29ce62166b0ed9b4f6f1a70ccc9a71165b6154caca8c05" +checksum = "3a12a8ed07aefc768292f076dc3ac8c48f3781c8f2d5851dd3d98950e8c5a89f" dependencies = [ "objc2-encode", ] @@ -2684,9 +2694,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.21.3" +version = "1.21.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" +checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" [[package]] name = "once_cell_polyfill" @@ -2700,7 +2710,7 @@ version = "6.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "336b9c63443aceef14bea841b899035ae3abe89b7c486aaf4c5bd8aafedac3f0" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.0", "libc", "once_cell", "onig_sys", @@ -2724,23 +2734,23 @@ checksum = "d6790f58c7ff633d8771f42965289203411a5e5c68388703c06e14f24770b41e" [[package]] name = "openblas-build" -version = "0.10.13" +version = "0.10.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bc3f001b5b7e354f30da04b91978523092224e4f71d017a28fd0da9474449c6" +checksum = "20d370acc586f21e12b1922e462439f0e98412e617f7642eb5e63df7ea211066" dependencies = [ "anyhow", "cc", "flate2", "tar", - "thiserror 2.0.17", - "ureq 3.1.4", + "thiserror 2.0.18", + "ureq 3.2.0", ] [[package]] name = "openblas-src" -version = "0.10.13" +version = "0.10.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d348e7a5bfbc68f6068d6c46543a2abcd8121e2925715a69000013aba8f29e" +checksum = "7e1042a867cd2effa3a188ab302acd8851b7eac58a7ae06496456e1172a1b456" dependencies = [ "dirs 6.0.0", "openblas-build", @@ -2750,11 +2760,11 @@ dependencies = [ [[package]] name = "openssl" -version = "0.10.75" +version = "0.10.76" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08838db121398ad17ab8531ce9de97b244589089e290a384c900cb9ff7434328" +checksum = "951c002c75e16ea2c65b8c7e4d3d51d5530d8dfa7d060b4776828c88cfb18ecf" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.0", "cfg-if", "foreign-types 0.3.2", "libc", @@ -2776,21 +2786,15 @@ dependencies = [ [[package]] name = "openssl-probe" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" - -[[package]] -name = "openssl-probe" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f50d9b3dabb09ecd771ad0aa242ca6894994c130308ca3d7684634df8037391" +checksum = "7c87def4c32ab89d880effc9e097653c8da5d6ef28e6b539d313baaacfbafcbe" [[package]] name = "openssl-sys" -version = "0.9.111" +version = "0.9.112" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82cab2d520aa75e3c58898289429321eb788c3106963d0dc886ec7a5f4adc321" +checksum = "57d55af3b3e226502be1526dfdba67ab0e9c96fc293004e79576b2b9edb0dbdb" dependencies = [ "cc", "libc", @@ -2810,12 +2814,12 @@ version = "2.0.0-rc.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4a5df903c0d2c07b56950f1058104ab0c8557159f2741782223704de9be73c3c" dependencies = [ - "libloading 0.9.0", + "libloading", "ndarray 0.17.2", "ort-sys", "smallvec", "tracing", - "ureq 3.1.4", + "ureq 3.2.0", ] [[package]] @@ -2826,7 +2830,7 @@ checksum = "06503bb33f294c5f1ba484011e053bfa6ae227074bdb841e9863492dc5960d4b" dependencies = [ "hmac-sha256", "lzma-rust2", - "ureq 3.1.4", + "ureq 3.2.0", ] [[package]] @@ -2895,9 +2899,9 @@ checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" [[package]] name = "pest" -version = "2.8.5" +version = "2.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c9eb05c21a464ea704b53158d358a31e6425db2f63a1a7312268b05fe2b75f7" +checksum = "e0848c601009d37dfa3430c4666e147e49cdcf1b92ecd3e63657d8a5f19da662" dependencies = [ "memchr", "ucd-trie", @@ -2905,9 +2909,9 @@ dependencies = [ [[package]] name = "pest_derive" -version = "2.8.5" +version = "2.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68f9dbced329c441fa79d80472764b1a2c7e57123553b8519b36663a2fb234ed" +checksum = "11f486f1ea21e6c10ed15d5a7c77165d0ee443402f0780849d1768e7d9d6fe77" dependencies = [ "pest", "pest_generator", @@ -2915,9 +2919,9 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.8.5" +version = "2.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bb96d5051a78f44f43c8f712d8e810adb0ebf923fc9ed2655a7f66f63ba8ee5" +checksum = "8040c4647b13b210a963c1ed407c1ff4fdfa01c31d6d2a098218702e6664f94f" dependencies = [ "pest", "pest_meta", @@ -2928,9 +2932,9 @@ dependencies = [ [[package]] name = "pest_meta" -version = "2.8.5" +version = "2.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "602113b5b5e8621770cfd490cfd90b9f84ab29bd2b0e49ad83eb6d186cef2365" +checksum = "89815c69d36021a140146f26659a81d6c2afa33d216d736dd4be5381a7362220" dependencies = [ "pest", "sha2", @@ -2938,18 +2942,18 @@ dependencies = [ [[package]] name = "pin-project" -version = "1.1.10" +version = "1.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677f1add503faace112b9f1373e43e9e054bfdd22ff1a63c1bc485eaec6a6a8a" +checksum = "f1749c7ed4bcaf4c3d0a3efc28538844fb29bcdd7d2b67b2be7e20ba861ff517" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.10" +version = "1.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e918e4ff8c4549eb882f14b3a4bc8c8bc93de829416eacf579f1207a8fbf861" +checksum = "d9b20ed30f105399776b9c883e68e536ef602a16ae6f596d2c473591d6ad64c6" dependencies = [ "proc-macro2", "quote", @@ -2958,9 +2962,9 @@ dependencies = [ [[package]] name = "pin-project-lite" -version = "0.2.16" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" +checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" [[package]] name = "pin-utils" @@ -2974,6 +2978,12 @@ version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" +[[package]] +name = "plain" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6" + [[package]] name = "plist" version = "1.8.0" @@ -3017,15 +3027,15 @@ dependencies = [ [[package]] name = "portable-atomic" -version = "1.13.0" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f89776e4d69bb58bc6993e99ffa1d11f228b839984854c7daeb5d37f87cbe950" +checksum = "c33a9471896f1c69cecef8d20cbe2f7accd12527ce60845ff44c153bb2a21b49" [[package]] name = "portable-atomic-util" -version = "0.2.4" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8a2f0d8d040d7848a709caf78912debcc3f33ee4b3cac47d73d1e1069e83507" +checksum = "091397be61a01d4be58e7841595bd4bfedb15f1cd54977d79b8271e94ed799a3" dependencies = [ "portable-atomic", ] @@ -3054,6 +3064,16 @@ dependencies = [ "zerocopy", ] +[[package]] +name = "prettyplease" +version = "0.2.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" +dependencies = [ + "proc-macro2", + "syn", +] + [[package]] name = "proc-macro-error-attr2" version = "2.0.0" @@ -3078,9 +3098,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.105" +version = "1.0.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "535d180e0ecab6268a3e718bb9fd44db66bbbc256257165fc699dadf70d16fe7" +checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934" dependencies = [ "unicode-ident", ] @@ -3199,7 +3219,7 @@ dependencies = [ "rustc-hash", "rustls", "socket2", - "thiserror 2.0.17", + "thiserror 2.0.18", "tokio", "tracing", "web-time", @@ -3207,9 +3227,9 @@ dependencies = [ [[package]] name = "quinn-proto" -version = "0.11.13" +version = "0.11.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1906b49b0c3bc04b5fe5d86a77925ae6524a19b816ae38ce1e426255f1d8a31" +checksum = "434b42fec591c96ef50e21e886936e66d3cc3f737104fdb9b737c40ffb94c098" dependencies = [ "aws-lc-rs", "bytes", @@ -3221,7 +3241,7 @@ dependencies = [ "rustls", "rustls-pki-types", "slab", - "thiserror 2.0.17", + "thiserror 2.0.18", "tinyvec", "tracing", "web-time", @@ -3243,9 +3263,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.43" +version = "1.0.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc74d9a594b72ae6656596548f56f667211f8a97b3d4c3d467150794690dc40a" +checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924" dependencies = [ "proc-macro2", ] @@ -3256,6 +3276,12 @@ version = "5.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" +[[package]] +name = "r-efi" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" + [[package]] name = "rand" version = "0.8.5" @@ -3274,7 +3300,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" dependencies = [ "rand_chacha 0.9.0", - "rand_core 0.9.3", + "rand_core 0.9.5", ] [[package]] @@ -3294,7 +3320,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" dependencies = [ "ppv-lite86", - "rand_core 0.9.3", + "rand_core 0.9.5", ] [[package]] @@ -3303,14 +3329,14 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.16", + "getrandom 0.2.17", ] [[package]] name = "rand_core" -version = "0.9.3" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" +checksum = "76afc826de14238e6e8c374ddcc1fa19e374fd8dd986b0d2af0d02377261d83c" dependencies = [ "getrandom 0.3.4", ] @@ -3331,7 +3357,7 @@ version = "11.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "498cd0dc59d73224351ee52a95fee0f1a617a2eae0e7d9d720cc622c73a54186" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.0", ] [[package]] @@ -3377,16 +3403,16 @@ version = "0.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.0", ] [[package]] name = "redox_syscall" -version = "0.7.0" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f3fe0889e69e2ae9e41f4d6c4c0181701d00e4697b356fb1f74173a5e0ee27" +checksum = "6ce70a74e890531977d37e532c34d45e9055d2409ed08ddba14529471ed0be16" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.0", ] [[package]] @@ -3395,7 +3421,7 @@ version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" dependencies = [ - "getrandom 0.2.16", + "getrandom 0.2.17", "libredox", "thiserror 1.0.69", ] @@ -3406,16 +3432,16 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4e608c6638b9c18977b00b475ac1f28d14e84b27d8d42f70e0bf1e3dec127ac" dependencies = [ - "getrandom 0.2.16", + "getrandom 0.2.17", "libredox", - "thiserror 2.0.17", + "thiserror 2.0.18", ] [[package]] name = "regex" -version = "1.12.2" +version = "1.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "843bc0191f75f3e22651ae5f1e72939ab2f72a4bc30fa80a066bd66edefc24d4" +checksum = "e10754a14b9137dd7b1e3e5b0493cc9171fdd105e0ab477f51b72e7f3ac0e276" dependencies = [ "aho-corasick", "memchr", @@ -3425,9 +3451,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.13" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5276caf25ac86c8d810222b3dbb938e512c55c6831a10f3e6ed1c93b84041f1c" +checksum = "6e1dd4122fc1595e8162618945476892eefca7b88c52820e74af6262213cae8f" dependencies = [ "aho-corasick", "memchr", @@ -3436,9 +3462,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.8" +version = "0.8.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a2d987857b319362043e95f5353c0535c1f58eec5336fdfcf626430af7def58" +checksum = "dc897dd8d9e8bd1ed8cdad82b5966c3e0ecae09fb1907d58efaa013543185d0a" [[package]] name = "reqwest" @@ -3485,9 +3511,9 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.13.1" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04e9018c9d814e5f30cc16a0f03271aeab3571e609612d9fe78c1aa8d11c2f62" +checksum = "ab3f43e3283ab1488b624b44b0e988d0acea0b3214e694730a055cb6b2efa801" dependencies = [ "base64 0.22.1", "bytes", @@ -3531,19 +3557,29 @@ checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" dependencies = [ "cc", "cfg-if", - "getrandom 0.2.16", + "getrandom 0.2.17", "libc", "untrusted", "windows-sys 0.52.0", ] +[[package]] +name = "rsqlite-vfs" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8a1f2315036ef6b1fbacd1972e8ee7688030b0a2121edfc2a6550febd41574d" +dependencies = [ + "hashbrown 0.16.1", + "thiserror 2.0.18", +] + [[package]] name = "rusqlite" version = "0.38.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f1c93dd1c9683b438c392c492109cb702b8090b2bfc8fed6f6e4eb4523f17af3" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.0", "fallible-iterator", "fallible-streaming-iterator", "hashlink", @@ -3554,9 +3590,9 @@ dependencies = [ [[package]] name = "rust-embed" -version = "8.9.0" +version = "8.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "947d7f3fad52b283d261c4c99a084937e2fe492248cb9a68a8435a861b8798ca" +checksum = "04113cb9355a377d83f06ef1f0a45b8ab8cd7d8b1288160717d66df5c7988d27" dependencies = [ "rust-embed-impl", "rust-embed-utils", @@ -3565,9 +3601,9 @@ dependencies = [ [[package]] name = "rust-embed-impl" -version = "8.9.0" +version = "8.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fa2c8c9e8711e10f9c4fd2d64317ef13feaab820a4c51541f1a8c8e2e851ab2" +checksum = "da0902e4c7c8e997159ab384e6d0fc91c221375f6894346ae107f47dd0f3ccaa" dependencies = [ "proc-macro2", "quote", @@ -3578,9 +3614,9 @@ dependencies = [ [[package]] name = "rust-embed-utils" -version = "8.9.0" +version = "8.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60b161f275cb337fe0a44d924a5f4df0ed69c2c39519858f931ce61c779d3475" +checksum = "5bcdef0be6fe7f6fa333b1073c949729274b05f123a0ad7efcb8efd878e5c3b1" dependencies = [ "sha2", "walkdir", @@ -3594,11 +3630,11 @@ checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" [[package]] name = "rustix" -version = "1.1.3" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "146c9e247ccc180c1f61615433868c99f3de3ae256a30a43b49f67c2d9171f34" +checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.0", "errno 0.3.14", "libc", "linux-raw-sys", @@ -3607,9 +3643,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.36" +version = "0.23.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c665f33d38cea657d9614f766881e4d510e0eda4239891eea56b4cadcf01801b" +checksum = "758025cb5fccfd3bc2fd74708fd4682be41d99e5dff73c377c0646c6012c73a4" dependencies = [ "aws-lc-rs", "log", @@ -3627,17 +3663,17 @@ version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "612460d5f7bea540c490b2b6395d8e34a953e52b491accd6c86c8164c5932a63" dependencies = [ - "openssl-probe 0.2.0", + "openssl-probe", "rustls-pki-types", "schannel", - "security-framework 3.5.1", + "security-framework", ] [[package]] name = "rustls-pki-types" -version = "1.13.2" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21e6f2ab2928ca4291b86736a8bd920a277a399bba1589409d72154ff87c1282" +checksum = "be040f8b0a225e40375822a563fa9524378b9d63112f53e19ffff34df5d33fdd" dependencies = [ "web-time", "zeroize", @@ -3658,7 +3694,7 @@ dependencies = [ "rustls-native-certs", "rustls-platform-verifier-android", "rustls-webpki", - "security-framework 3.5.1", + "security-framework", "security-framework-sys", "webpki-root-certs", "windows-sys 0.61.2", @@ -3672,9 +3708,9 @@ checksum = "f87165f0995f63a9fbeea62b64d10b4d9d8e78ec6d7d51fb2125fda7bb36788f" [[package]] name = "rustls-webpki" -version = "0.103.8" +version = "0.103.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ffdfa2f5286e2247234e03f680868ac2815974dc39e00ea15adc445d0aafe52" +checksum = "d7df23109aa6c1567d1c575b9952556388da57401e4ace1d15f79eedad0d8f53" dependencies = [ "aws-lc-rs", "ring", @@ -3690,9 +3726,9 @@ checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" [[package]] name = "ryu" -version = "1.0.22" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a50f4cf475b65d88e057964e0e9bb1f0aa9bbb2036dc65c64596b42932536984" +checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f" [[package]] name = "same-file" @@ -3705,9 +3741,9 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.28" +version = "0.1.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "891d81b926048e76efe18581bf793546b4c0eaf8448d72be8de2bbee5fd166e1" +checksum = "91c1b7e4904c873ef0710c1f407dde2e6287de2bebc1bbbf7d430bb7cbffd939" dependencies = [ "windows-sys 0.61.2", ] @@ -3720,39 +3756,32 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "security-framework" -version = "2.11.1" +version = "3.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" +checksum = "b7f4bc775c73d9a02cde8bf7b2ec4c9d12743edf609006c7facc23998404cd1d" dependencies = [ - "bitflags 2.10.0", - "core-foundation 0.9.4", + "bitflags 2.11.0", + "core-foundation 0.10.1", "core-foundation-sys", "libc", "security-framework-sys", ] [[package]] -name = "security-framework" -version = "3.5.1" +name = "security-framework-sys" +version = "2.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3297343eaf830f66ede390ea39da1d462b6b0c1b000f420d0a83f898bbbe6ef" +checksum = "6ce2691df843ecc5d231c0b14ece2acc3efb62c0a398c7e1d875f3983ce020e3" dependencies = [ - "bitflags 2.10.0", - "core-foundation 0.10.1", "core-foundation-sys", "libc", - "security-framework-sys", ] [[package]] -name = "security-framework-sys" -version = "2.15.0" +name = "semver" +version = "1.0.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc1f0cbffaac4852523ce30d8bd3c5cdc873501d96ff467ca09b6767bb8cd5c0" -dependencies = [ - "core-foundation-sys", - "libc", -] +checksum = "d767eb0aabc880b29956c35734170f26ed551a859dbd361d140cdbeca61ab1e2" [[package]] name = "serde" @@ -3885,9 +3914,9 @@ checksum = "e320a6c5ad31d271ad523dcf3ad13e2767ad8b1cb8f047f75a8aeaf8da139da2" [[package]] name = "slab" -version = "0.4.11" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a2ae44ef20feb57a68b23d846850f861394c2e02dc425a50098ae8c90267589" +checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" [[package]] name = "smallvec" @@ -3897,12 +3926,12 @@ checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" [[package]] name = "socket2" -version = "0.6.1" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17129e116933cf371d018bb80ae557e889637989d8638274fb25622827b03881" +checksum = "3a766e1110788c36f4fa1c2b71b387a7815aa65f88ce0229841826633d93723e" dependencies = [ "libc", - "windows-sys 0.60.2", + "windows-sys 0.61.2", ] [[package]] @@ -3939,14 +3968,13 @@ dependencies = [ [[package]] name = "sqlite-wasm-rs" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05e98301bf8b0540c7de45ecd760539b9c62f5772aed172f08efba597c11cd5d" +checksum = "2f4206ed3a67690b9c29b77d728f6acc3ce78f16bf846d83c94f76400320181b" dependencies = [ "cc", - "hashbrown 0.16.1", "js-sys", - "thiserror 2.0.17", + "rsqlite-vfs", "wasm-bindgen", ] @@ -4001,9 +4029,9 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "syn" -version = "2.0.114" +version = "2.0.117" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4d107df263a3013ef9b1879b0df87d706ff80f65a86ea879bd9c31f9b307c2a" +checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99" dependencies = [ "proc-macro2", "quote", @@ -4046,7 +4074,7 @@ dependencies = [ "serde", "serde_derive", "serde_json", - "thiserror 2.0.17", + "thiserror 2.0.18", "walkdir", "yaml-rust", ] @@ -4067,11 +4095,11 @@ dependencies = [ [[package]] name = "system-configuration" -version = "0.6.1" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" +checksum = "a13f3d0daba03132c0aa9767f98351b3488edc2c100cda2d2ec2b04f3d8d3c8b" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.0", "core-foundation 0.9.4", "system-configuration-sys", ] @@ -4105,12 +4133,12 @@ checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" [[package]] name = "tempfile" -version = "3.24.0" +version = "3.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "655da9c7eb6305c55742045d5a8d2037996d61d8de95806335c7c86ce0f82e9c" +checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd" dependencies = [ "fastrand", - "getrandom 0.3.4", + "getrandom 0.4.2", "once_cell", "rustix", "windows-sys 0.61.2", @@ -4127,11 +4155,11 @@ dependencies = [ [[package]] name = "thiserror" -version = "2.0.17" +version = "2.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f63587ca0f12b72a0600bcba1d40081f830876000bb46dd2337a3051618f4fc8" +checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4" dependencies = [ - "thiserror-impl 2.0.17", + "thiserror-impl 2.0.18", ] [[package]] @@ -4147,9 +4175,9 @@ dependencies = [ [[package]] name = "thiserror-impl" -version = "2.0.17" +version = "2.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ff15c8ecd7de3849db632e14d18d2571fa09dfc5ed93479bc4485c7a517c913" +checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5" dependencies = [ "proc-macro2", "quote", @@ -4167,9 +4195,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.45" +version = "0.3.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9e442fc33d7fdb45aa9bfeb312c095964abdf596f7567261062b2a7107aaabd" +checksum = "743bd48c283afc0388f9b8827b976905fb217ad9e647fae3a379a9283c4def2c" dependencies = [ "deranged", "itoa", @@ -4182,15 +4210,15 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.7" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b36ee98fd31ec7426d599183e8fe26932a8dc1fb76ddb6214d05493377d34ca" +checksum = "7694e1cfe791f8d31026952abf09c69ca6f6fa4e1a1229e18988f06a04a12dca" [[package]] name = "time-macros" -version = "0.2.25" +version = "0.2.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71e552d1249bf61ac2a52db88179fd0673def1e1ad8243a00d9ec9ed71fee3dd" +checksum = "2e70e4c5a0e0a8a4823ad65dfe1a6930e4f4d756dcd9dd7939022b5e8c501215" dependencies = [ "num-conv", "time-core", @@ -4218,9 +4246,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.10.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa5fdc3bce6191a1dbc8c02d5c8bffcf557bafa17c124c5264a458f1b0613fa" +checksum = "3e61e67053d25a4e82c844e8424039d9745781b3fc4f32b8d55ed50f5f667ef3" dependencies = [ "tinyvec_macros", ] @@ -4258,7 +4286,7 @@ dependencies = [ "serde", "serde_json", "spm_precompiled", - "thiserror 2.0.17", + "thiserror 2.0.18", "unicode-normalization-alignments", "unicode-segmentation", "unicode_categories", @@ -4266,9 +4294,9 @@ dependencies = [ [[package]] name = "tokio" -version = "1.49.0" +version = "1.50.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72a2903cd7736441aac9df9d7688bd0ce48edccaadf181c3b90be801e81d3d86" +checksum = "27ad5e34374e03cfffefc301becb44e9dc3c17584f414349ebe29ed26661822d" dependencies = [ "bytes", "libc", @@ -4283,9 +4311,9 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "2.6.0" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af407857209536a95c8e56f8231ef2c2e2aff839b22e07a1ffcbc617e9db9fa5" +checksum = "5c55a2eff8b69ce66c84f85e1da1c233edc36ceb85a2058d11b0d6a3c7e7569c" dependencies = [ "proc-macro2", "quote", @@ -4379,9 +4407,9 @@ checksum = "5d99f8c9a7727884afe522e9bd5edbfc91a3312b36a77b5fb8926e4c31a41801" [[package]] name = "tonic" -version = "0.14.2" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb7613188ce9f7df5bfe185db26c5814347d110db17920415cf2fbcad85e7203" +checksum = "fec7c61a0695dc1887c1b53952990f3ad2e3a31453e1f49f10e75424943a93ec" dependencies = [ "async-trait", "axum", @@ -4408,9 +4436,9 @@ dependencies = [ [[package]] name = "tower" -version = "0.5.2" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9" +checksum = "ebe5ef63511595f1344e2d5cfa636d973292adc0eec1f0ad45fae9f0851ab1d4" dependencies = [ "futures-core", "futures-util", @@ -4431,7 +4459,7 @@ version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d4e6559d53cc268e5031cd8429d05415bc4cb4aefc4aa5d6cc35fbf5b924a1f8" dependencies = [ - "bitflags 2.10.0", + "bitflags 2.11.0", "bytes", "futures-util", "http", @@ -4468,7 +4496,7 @@ dependencies = [ "governor", "http", "pin-project", - "thiserror 2.0.17", + "thiserror 2.0.18", "tonic", "tower", "tracing", @@ -4520,9 +4548,9 @@ dependencies = [ [[package]] name = "tracing-subscriber" -version = "0.3.22" +version = "0.3.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f30143827ddab0d256fd843b7a66d164e9f271cfa0dde49142c5ca0ca291f1e" +checksum = "cb7f578e5945fb242538965c2d0b04418d38ec25c79d160cd279bf0731c8d319" dependencies = [ "matchers", "nu-ansi-term", @@ -4582,9 +4610,9 @@ dependencies = [ [[package]] name = "tree-sitter-elixir" -version = "0.3.4" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e45d444647b4fd53d8fd32474c1b8bedc1baa22669ce3a78d083e365fa9a2d3f" +checksum = "66dd064a762ed95bfc29857fa3cb7403bb1e5cb88112de0f6341b7e47284ba40" dependencies = [ "cc", "tree-sitter-language", @@ -4662,9 +4690,9 @@ dependencies = [ [[package]] name = "tree-sitter-language" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ae62f7eae5eb549c71b76658648b72cc6111f2d87d24a1e31fa907f4943e3ce" +checksum = "009994f150cc0cd50ff54917d5bc8bffe8cad10ca10d81c34da2ec421ae61782" [[package]] name = "tree-sitter-lua" @@ -4812,9 +4840,9 @@ checksum = "dbc4bc3a9f746d862c45cb89d705aa10f187bb96c76001afab07a0d35ce60142" [[package]] name = "unicode-ident" -version = "1.0.22" +version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5" +checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" [[package]] name = "unicode-normalization-alignments" @@ -4837,6 +4865,12 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254" +[[package]] +name = "unicode-xid" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" + [[package]] name = "unicode_categories" version = "0.1.1" @@ -4877,9 +4911,9 @@ dependencies = [ [[package]] name = "ureq" -version = "3.1.4" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d39cb1dbab692d82a977c0392ffac19e188bd9186a9f32806f0aaa859d75585a" +checksum = "fdc97a28575b85cfedf2a7e7d3cc64b3e11bd8ac766666318003abbacc7a21fc" dependencies = [ "base64 0.22.1", "der", @@ -4979,11 +5013,11 @@ dependencies = [ [[package]] name = "uuid" -version = "1.19.0" +version = "1.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2e054861b4bd027cd373e18e8d8d8e6548085000e41290d95ce0c373a654b4a" +checksum = "a68d3c8f01c0cfa54a75291d83601161799e4a89a39e0929f4b0354d88757a37" dependencies = [ - "getrandom 0.3.4", + "getrandom 0.4.2", "js-sys", "serde_core", "wasm-bindgen", @@ -5034,18 +5068,27 @@ checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" [[package]] name = "wasip2" -version = "1.0.1+wasi-0.2.4" +version = "1.0.2+wasi-0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0562428422c63773dad2c345a1882263bbf4d65cf3f42e90921f787ef5ad58e7" +checksum = "9517f9239f02c069db75e65f174b3da828fe5f5b945c4dd26bd25d89c03ebcf5" +dependencies = [ + "wit-bindgen", +] + +[[package]] +name = "wasip3" +version = "0.4.0+wasi-0.3.0-rc-2026-01-06" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5428f8bf88ea5ddc08faddef2ac4a67e390b88186c703ce6dbd955e1c145aca5" dependencies = [ "wit-bindgen", ] [[package]] name = "wasm-bindgen" -version = "0.2.106" +version = "0.2.114" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d759f433fa64a2d763d1340820e46e111a7a5ab75f993d1852d70b03dbb80fd" +checksum = "6532f9a5c1ece3798cb1c2cfdba640b9b3ba884f5db45973a6f442510a87d38e" dependencies = [ "cfg-if", "once_cell", @@ -5056,11 +5099,12 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.56" +version = "0.4.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "836d9622d604feee9e5de25ac10e3ea5f2d65b41eac0d9ce72eb5deae707ce7c" +checksum = "e9c5522b3a28661442748e09d40924dfb9ca614b21c00d3fd135720e48b67db8" dependencies = [ "cfg-if", + "futures-util", "js-sys", "once_cell", "wasm-bindgen", @@ -5069,9 +5113,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.106" +version = "0.2.114" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48cb0d2638f8baedbc542ed444afc0644a29166f1595371af4fecf8ce1e7eeb3" +checksum = "18a2d50fcf105fb33bb15f00e7a77b772945a2ee45dcf454961fd843e74c18e6" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -5079,9 +5123,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.106" +version = "0.2.114" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cefb59d5cd5f92d9dcf80e4683949f15ca4b511f4ac0a6e14d4e1ac60c6ecd40" +checksum = "03ce4caeaac547cdf713d280eda22a730824dd11e6b8c3ca9e42247b25c631e3" dependencies = [ "bumpalo", "proc-macro2", @@ -5092,13 +5136,35 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.106" +version = "0.2.114" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbc538057e648b67f72a982e708d485b2efa771e1ac05fec311f9f63e5800db4" +checksum = "75a326b8c223ee17883a4251907455a2431acc2791c98c26279376490c378c16" dependencies = [ "unicode-ident", ] +[[package]] +name = "wasm-encoder" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "990065f2fe63003fe337b932cfb5e3b80e0b4d0f5ff650e6985b1048f62c8319" +dependencies = [ + "leb128fmt", + "wasmparser", +] + +[[package]] +name = "wasm-metadata" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb0e353e6a2fbdc176932bbaab493762eb1255a7900fe0fea1a2f96c296cc909" +dependencies = [ + "anyhow", + "indexmap", + "wasm-encoder", + "wasmparser", +] + [[package]] name = "wasm-streams" version = "0.4.2" @@ -5112,11 +5178,23 @@ dependencies = [ "web-sys", ] +[[package]] +name = "wasmparser" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47b807c72e1bac69382b3a6fb3dbe8ea4c0ed87ff5629b8685ae6b9a611028fe" +dependencies = [ + "bitflags 2.11.0", + "hashbrown 0.15.5", + "indexmap", + "semver", +] + [[package]] name = "web-sys" -version = "0.3.83" +version = "0.3.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b32828d774c412041098d182a8b38b16ea816958e07cf40eec2bc080ae137ac" +checksum = "854ba17bb104abfb26ba36da9729addc7ce7f06f5c0f90f3c391f8461cca21f9" dependencies = [ "js-sys", "wasm-bindgen", @@ -5134,9 +5212,9 @@ dependencies = [ [[package]] name = "webpki-root-certs" -version = "1.0.5" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36a29fc0408b113f68cf32637857ab740edfafdf460c326cd2afaa2d84cc05dc" +checksum = "804f18a4ac2676ffb4e8b5b5fa9ae38af06df08162314f96a68d2a363e21a8ca" dependencies = [ "rustls-pki-types", ] @@ -5147,14 +5225,14 @@ version = "0.26.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "521bc38abb08001b01866da9f51eb7c5d647a19260e00054a8c7fd5f9e57f7a9" dependencies = [ - "webpki-roots 1.0.5", + "webpki-roots 1.0.6", ] [[package]] name = "webpki-roots" -version = "1.0.5" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12bed680863276c63889429bfd6cab3b99943659923822de1c8a39c49e4d722c" +checksum = "22cfaf3c063993ff62e73cb4311efde4db1efb31ab78a3e5c457939ad5cc0bed" dependencies = [ "rustls-pki-types", ] @@ -5196,7 +5274,7 @@ version = "0.57.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "12342cb4d8e3b046f3d80effd474a7a02447231330ef77d71daa6fbc40681143" dependencies = [ - "windows-core", + "windows-core 0.57.0", "windows-targets 0.52.6", ] @@ -5206,12 +5284,25 @@ version = "0.57.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2ed2439a290666cd67ecce2b0ffaad89c2a56b976b736e6ece670297897832d" dependencies = [ - "windows-implement", - "windows-interface", + "windows-implement 0.57.0", + "windows-interface 0.57.0", "windows-result 0.1.2", "windows-targets 0.52.6", ] +[[package]] +name = "windows-core" +version = "0.62.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb" +dependencies = [ + "windows-implement 0.60.2", + "windows-interface 0.59.3", + "windows-link", + "windows-result 0.4.1", + "windows-strings", +] + [[package]] name = "windows-implement" version = "0.57.0" @@ -5223,6 +5314,17 @@ dependencies = [ "syn", ] +[[package]] +name = "windows-implement" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "windows-interface" version = "0.57.0" @@ -5234,6 +5336,17 @@ dependencies = [ "syn", ] +[[package]] +name = "windows-interface" +version = "0.59.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "windows-link" version = "0.2.1" @@ -5586,9 +5699,91 @@ dependencies = [ [[package]] name = "wit-bindgen" -version = "0.46.0" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5" +dependencies = [ + "wit-bindgen-rust-macro", +] + +[[package]] +name = "wit-bindgen-core" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea61de684c3ea68cb082b7a88508a8b27fcc8b797d738bfc99a82facf1d752dc" +dependencies = [ + "anyhow", + "heck", + "wit-parser", +] + +[[package]] +name = "wit-bindgen-rust" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7c566e0f4b284dd6561c786d9cb0142da491f46a9fbed79ea69cdad5db17f21" +dependencies = [ + "anyhow", + "heck", + "indexmap", + "prettyplease", + "syn", + "wasm-metadata", + "wit-bindgen-core", + "wit-component", +] + +[[package]] +name = "wit-bindgen-rust-macro" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c0f9bfd77e6a48eccf51359e3ae77140a7f50b1e2ebfe62422d8afdaffab17a" +dependencies = [ + "anyhow", + "prettyplease", + "proc-macro2", + "quote", + "syn", + "wit-bindgen-core", + "wit-bindgen-rust", +] + +[[package]] +name = "wit-component" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d66ea20e9553b30172b5e831994e35fbde2d165325bec84fc43dbf6f4eb9cb2" +dependencies = [ + "anyhow", + "bitflags 2.11.0", + "indexmap", + "log", + "serde", + "serde_derive", + "serde_json", + "wasm-encoder", + "wasm-metadata", + "wasmparser", + "wit-parser", +] + +[[package]] +name = "wit-parser" +version = "0.244.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f17a85883d4e6d00e8a97c586de764dabcc06133f7f1d55dce5cdc070ad7fe59" +checksum = "ecc8ac4bc1dc3381b7f59c34f00b67e18f910c2c0f50015669dde7def656a736" +dependencies = [ + "anyhow", + "id-arena", + "indexmap", + "log", + "semver", + "serde", + "serde_derive", + "serde_json", + "unicode-xid", + "wasmparser", +] [[package]] name = "writeable" @@ -5655,18 +5850,18 @@ dependencies = [ [[package]] name = "zerocopy" -version = "0.8.33" +version = "0.8.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "668f5168d10b9ee831de31933dc111a459c97ec93225beb307aed970d1372dfd" +checksum = "f2578b716f8a7a858b7f02d5bd870c14bf4ddbbcf3a4c05414ba6503640505e3" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.8.33" +version = "0.8.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c7962b26b0a8685668b671ee4b54d007a67d4eaf05fda79ac0ecf41e32270f1" +checksum = "7e6cc098ea4d3bd6246687de65af3f920c430e236bee1e3bf2e441463f08a02f" dependencies = [ "proc-macro2", "quote", @@ -5769,7 +5964,7 @@ dependencies = [ "memchr", "pbkdf2", "sha1", - "thiserror 2.0.17", + "thiserror 2.0.18", "time", "xz2", "zeroize", @@ -5793,15 +5988,15 @@ dependencies = [ [[package]] name = "zlib-rs" -version = "0.5.5" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40990edd51aae2c2b6907af74ffb635029d5788228222c4bb811e9351c0caad3" +checksum = "3be3d40e40a133f9c916ee3f9f4fa2d9d63435b5fbe1bfc6d9dae0aa0ada1513" [[package]] name = "zmij" -version = "1.0.12" +version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fc5a66a20078bf1251bde995aa2fdcc4b800c70b5d92dd2c62abc5c60f679f8" +checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa" [[package]] name = "zopfli" diff --git a/next-plaid/Cargo.toml b/next-plaid/Cargo.toml index 21b26113..8b7e993d 100644 --- a/next-plaid/Cargo.toml +++ b/next-plaid/Cargo.toml @@ -30,7 +30,7 @@ thiserror = { workspace = true } serde = { workspace = true } serde_json = { workspace = true } ndarray-npy = "0.9.1" -fastkmeans-rs = "1.0.1" +fastkmeans-rs = "1.0.2" memmap2 = "0.9" fs2 = "0.4" half = "2.4" From 388e4cb8304682117cdb58e895445551dfe915df Mon Sep 17 00:00:00 2001 From: Raphael Sourty Date: Wed, 18 Mar 2026 15:57:36 +0000 Subject: [PATCH 3/3] Run cargo fmt Co-Authored-By: Claude Opus 4.6 (1M context) --- next-plaid-onnx/src/lib.rs | 10 ++++------ next-plaid/src/cuda.rs | 16 +++++++-------- next-plaid/src/kmeans.rs | 41 ++++++++++++++++++-------------------- 3 files changed, 31 insertions(+), 36 deletions(-) diff --git a/next-plaid-onnx/src/lib.rs b/next-plaid-onnx/src/lib.rs index 5e019949..966eda19 100644 --- a/next-plaid-onnx/src/lib.rs +++ b/next-plaid-onnx/src/lib.rs @@ -351,12 +351,10 @@ fn configure_cuda(builder: SessionBuilder) -> Result { let device_id = get_cuda_device_id(); builder .clone() - .with_execution_providers([ - CUDAExecutionProvider::default() - .with_device_id(device_id) - .with_tf32(true) - .build() - ]) + .with_execution_providers([CUDAExecutionProvider::default() + .with_device_id(device_id) + .with_tf32(true) + .build()]) })); match cuda_result { diff --git a/next-plaid/src/cuda.rs b/next-plaid/src/cuda.rs index 5f11ca68..161aa15d 100644 --- a/next-plaid/src/cuda.rs +++ b/next-plaid/src/cuda.rs @@ -266,10 +266,10 @@ pub fn compress_into_codes_cuda_batched( }; // Upload centroids once (reused across batches) - let centroids_gpu: CudaSlice = ctx - .stream - .clone_htod(centroids_cont.as_slice().unwrap()) - .map_err(|e| Error::Codec(format!("Failed to copy centroids to GPU: {:?}", e)))?; + let centroids_gpu: CudaSlice = + ctx.stream + .clone_htod(centroids_cont.as_slice().unwrap()) + .map_err(|e| Error::Codec(format!("Failed to copy centroids to GPU: {:?}", e)))?; // Kernels are preloaded in CudaContext::new() @@ -409,10 +409,10 @@ pub fn compress_and_residuals_cuda_batched( }; // Upload centroids once (reused across batches) - let centroids_gpu: CudaSlice = ctx - .stream - .clone_htod(centroids_cont.as_slice().unwrap()) - .map_err(|e| Error::Codec(format!("Failed to copy centroids to GPU: {:?}", e)))?; + let centroids_gpu: CudaSlice = + ctx.stream + .clone_htod(centroids_cont.as_slice().unwrap()) + .map_err(|e| Error::Codec(format!("Failed to copy centroids to GPU: {:?}", e)))?; // Kernels are preloaded in CudaContext::new() diff --git a/next-plaid/src/kmeans.rs b/next-plaid/src/kmeans.rs index 759d99c8..fe734a96 100644 --- a/next-plaid/src/kmeans.rs +++ b/next-plaid/src/kmeans.rs @@ -121,22 +121,19 @@ pub fn compute_centroids( } // Try CUDA first, catching panics from invalid/stub CUDA libraries - let cuda_result = std::panic::catch_unwind(std::panic::AssertUnwindSafe(|| { - match FastKMeansCuda::with_config(config.clone()) { - Ok(mut kmeans) => { - match kmeans.train(embeddings) { - Ok(()) => { - kmeans - .centroids() - .map(|c| c.to_owned()) - .ok_or_else(|| "CUDA K-means did not produce centroids".to_string()) - } + let cuda_result = + std::panic::catch_unwind(std::panic::AssertUnwindSafe( + || match FastKMeansCuda::with_config(config.clone()) { + Ok(mut kmeans) => match kmeans.train(embeddings) { + Ok(()) => kmeans + .centroids() + .map(|c| c.to_owned()) + .ok_or_else(|| "CUDA K-means did not produce centroids".to_string()), Err(e) => Err(format!("CUDA K-means training failed: {}", e)), - } - } - Err(e) => Err(format!("CUDA K-means init failed: {}", e)), - } - })); + }, + Err(e) => Err(format!("CUDA K-means init failed: {}", e)), + }, + )); match cuda_result { Ok(Ok(centroids)) => Ok(centroids), @@ -147,7 +144,9 @@ pub fn compute_centroids( } Err(_) => { crate::cuda::mark_cuda_broken(); - eprintln!("[next-plaid] CUDA K-means panicked (invalid/stub library?), falling back to CPU"); + eprintln!( + "[next-plaid] CUDA K-means panicked (invalid/stub library?), falling back to CPU" + ); compute_centroids_cpu(embeddings, config) } } @@ -353,12 +352,10 @@ pub fn compute_kmeans( let samples_view = samples_tensor.view(); let cuda_result = std::panic::catch_unwind(std::panic::AssertUnwindSafe(|| { match FastKMeansCuda::with_config(kmeans_config.clone()) { - Ok(mut kmeans) => { - match kmeans.train(&samples_view) { - Ok(()) => kmeans.centroids().map(|c| c.to_owned()), - Err(_) => None, - } - } + Ok(mut kmeans) => match kmeans.train(&samples_view) { + Ok(()) => kmeans.centroids().map(|c| c.to_owned()), + Err(_) => None, + }, Err(_) => None, } }));