diff --git a/.github/workflows/proximity-required.yml b/.github/workflows/proximity-required.yml new file mode 100644 index 00000000..dd17212f --- /dev/null +++ b/.github/workflows/proximity-required.yml @@ -0,0 +1,65 @@ +name: Proximity required + +on: + pull_request: + paths: + - "Cargo.toml" + - "Cargo.lock" + - "src/prolly/proximity/**" + - "tests/proximity*" + - "benches/prolly_proximity_bench.rs" + - "conformance/proximity-fixtures.json" + - "fuzz/**" + - "scripts/*turboquant*" + - "docs/proximity*" + - ".github/workflows/proximity-required.yml" + push: + branches: [main] + +permissions: + contents: read + +jobs: + core: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + with: + components: rustfmt, clippy + - uses: Swatinem/rust-cache@v2 + - run: cargo fmt --all -- --check + # Rust 1.98 promoted this MSRV-incompatible migration to warn-by-default. + # Keep the repository's reviewed chunks_exact parsing until it is + # migrated independently of the proximity release. + - run: >- + cargo clippy --all-targets --all-features -- + -D warnings -A clippy::chunks-exact-to-as-chunks + - run: cargo test --all-features --test proximity_api --test proximity_metrics + - run: >- + cargo test --all-features + --test proximity_wire + --test proximity_search + --test proximity_async + --test proximity_composite + --test proximity_content_graph + --test proximity_proofs + --test proximity_turboquant + + turboquant-fuzz-smoke: + runs-on: ubuntu-latest + timeout-minutes: 20 + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@nightly + with: + components: rustfmt + - uses: Swatinem/rust-cache@v2 + - run: cargo install cargo-fuzz --version 0.13.2 --locked + - run: cargo fmt --manifest-path fuzz/Cargo.toml -- --check + - run: >- + cargo fuzz run proximity_turboquant_decode -- + -runs=2048 -max_len=4096 -timeout=5 + - run: >- + cargo fuzz run proximity_turboquant_lifecycle -- + -runs=256 -max_len=1024 -timeout=5 diff --git a/.gitignore b/.gitignore index 869ce014..396798e9 100644 --- a/.gitignore +++ b/.gitignore @@ -230,6 +230,7 @@ bindings/swift/Package.resolved !bindings/uniffi/Cargo.lock stores/prolly-store-*/Cargo.lock !stores/prolly-store-dynamodb/Cargo.lock +!stores/prolly-store-slatedb/Cargo.lock # These are backup files generated by rustfmt **/*.rs.bk diff --git a/CHANGELOG.md b/CHANGELOG.md index 5f415e0b..ade1bd4c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ ## Unreleased +- Add a native, source-bound TurboQuant-MSE proximity accelerator with + deterministic structured rotation, fixed two/three/four-bit Lloyd-Max + codebooks, authoritative reranking, SIMD scoring, async/catalog/composite/ + proof/content-graph integration, and maintained binding APIs. TurboQuant is + explicit-only until its checked-in recall and comparative performance gates + pass; it has no Turbovec dependency or wire compatibility. + ## 0.7.2 — 2026-08-21 - Add native `AsyncProlly::indexed_map(...).await` support with asynchronous diff --git a/benches/prolly_proximity_bench.rs b/benches/prolly_proximity_bench.rs index 091c1c65..f0a61667 100644 --- a/benches/prolly_proximity_bench.rs +++ b/benches/prolly_proximity_bench.rs @@ -1,37 +1,157 @@ use prolly::{ - copy_content_graph, plan_content_gc, AcceleratorSet, AdaptiveQuality, BuildParallelism, + copy_content_graph, plan_content_gc, AcceleratorSet, AdaptiveQuality, BuildParallelism, Cid, CompositeAccelerator, CompositeAcceleratorConfig, CompositeBase, CompositeBuildLimits, - CompositeBuildOutcome, ContentGraphLimits, DistanceMetric, HnswConfig, HnswIndex, MemStore, - ProductQuantizationConfig, ProductQuantizer, ProximityConfig, ProximityFilter, ProximityMap, - ProximityMutation, ProximityRecord, QueryKernel, ScalarQuantizationConfig, SearchBackend, - SearchIo, SearchPolicy, SearchRequest, SearchRuntime, TypedContentRoot, + CompositeBuildOutcome, ContentGraphLimits, ContentObjectKind, DistanceMetric, FileNodeStore, + HnswConfig, HnswIndex, MemStore, ProductQuantizationConfig, ProductQuantizer, ProximityConfig, + ProximityFilter, ProximityMap, ProximityMutation, ProximityRecord, QueryKernel, + ScalarQuantizationConfig, SearchBackend, SearchCompletion, SearchIo, SearchPolicy, + SearchRequest, SearchRuntime, TurboQuantizationConfig, TurboQuantizer, TypedContentRoot, }; #[cfg(feature = "async-store")] -use prolly::{AsyncProximityMap, AsyncSearchControl, SyncStoreAsAsync}; +use prolly::{ + AsyncAcceleratorBuildOptions, AsyncAcceleratorCatalog, AsyncAcceleratorSet, + AsyncProductQuantizer, AsyncProductQuantizerBuild, AsyncProximityMap, AsyncSearchControl, + AsyncTurboQuantizer, AsyncTurboQuantizerBuild, SyncStoreAsAsync, +}; use std::collections::HashSet; #[cfg(feature = "async-store")] use std::future::Future; use std::hint::black_box; +use std::path::{Path, PathBuf}; +use std::process::Command; use std::sync::Arc; #[cfg(feature = "async-store")] use std::task::{Context, Poll}; -use std::time::{Duration, Instant}; +use std::time::{Duration, Instant, SystemTime, UNIX_EPOCH}; + +const BENCHMARK_DATASET_ID: &str = "linear-mod-2000003-v2"; +const BENCHMARK_VECTOR_PERIOD: u64 = 2_000_003; fn main() { let records = env_usize("PROLLY_PROXIMITY_BENCH_RECORDS").unwrap_or(1_000); + assert!(records > 0, "benchmark record count must be positive"); + assert!( + u64::try_from(records).is_ok_and(|records| records <= BENCHMARK_VECTOR_PERIOD), + "benchmark record count exceeds the deterministic dataset's unique-vector period" + ); let dimensions = env_list("PROLLY_PROXIMITY_BENCH_DIMENSIONS").unwrap_or_else(|| vec![8, 128, 768, 1_536]); + assert!( + dimensions.iter().all(|dimension| *dimension > 0), + "benchmark dimensions must be positive" + ); let threads = env_list("PROLLY_PROXIMITY_BENCH_THREADS").unwrap_or_else(|| vec![1, 2, 4]); let scale_only = env_bool("PROLLY_PROXIMITY_BENCH_SCALE_ONLY"); - let search_repeats = env_usize("PROLLY_PROXIMITY_BENCH_SEARCH_REPEATS") - .unwrap_or(1) - .max(1); + let quantizers_only = env_bool("PROLLY_PROXIMITY_BENCH_QUANTIZERS_ONLY"); + let store_kind = BenchStoreKind::from_env(); + let durable_root = match store_kind { + BenchStoreKind::Memory => { + assert!( + std::env::var_os("PROLLY_PROXIMITY_BENCH_STORE_PATH").is_none(), + "store path is only valid for the file benchmark store" + ); + None + } + BenchStoreKind::File => Some(DurableRunRoot::create( + std::env::var_os("PROLLY_PROXIMITY_BENCH_STORE_PATH") + .map(PathBuf::from) + .expect("file benchmark store requires PROLLY_PROXIMITY_BENCH_STORE_PATH"), + )), + }; + assert!( + !(scale_only && quantizers_only), + "scale-only and quantizers-only benchmark profiles are mutually exclusive" + ); + assert_unique_positive_workers(&threads); + let search_repeats = env_usize("PROLLY_PROXIMITY_BENCH_SEARCH_REPEATS").unwrap_or(1); + assert!( + search_repeats > 0, + "benchmark search repetitions must be positive" + ); let reset_search_cache = env_bool("PROLLY_PROXIMITY_BENCH_RESET_SEARCH_CACHE"); + let async_quantizers = env_bool("PROLLY_PROXIMITY_BENCH_ASYNC_QUANTIZERS"); + #[cfg(not(feature = "async-store"))] + assert!( + !async_quantizers, + "async quantizer benchmarks require the async-store feature" + ); let simd_first = env_bool("PROLLY_PROXIMITY_BENCH_SIMD_FIRST"); + let metric = env_metric("PROLLY_PROXIMITY_BENCH_METRIC").unwrap_or(DistanceMetric::L2Squared); + let k = env_usize("PROLLY_PROXIMITY_BENCH_K").unwrap_or(10); + assert!(k > 0, "benchmark k must be positive"); + let eligibility_ppm = env_usize("PROLLY_PROXIMITY_BENCH_ELIGIBILITY_PPM").unwrap_or(1_000_000); + assert!( + (1..=1_000_000).contains(&eligibility_ppm), + "benchmark eligibility PPM must be between 1 and 1000000" + ); + let turboquant_config = TurboQuantizationConfig { + bit_width: env_usize("PROLLY_PROXIMITY_BENCH_TURBOQUANT_BITS") + .map(|value| { + u8::try_from(value).expect("TurboQuant benchmark bit width must fit in u8") + }) + .unwrap_or(4), + rerank_multiplier: env_usize("PROLLY_PROXIMITY_BENCH_RERANK_MULTIPLIER") + .map(|value| { + u32::try_from(value) + .expect("TurboQuant benchmark rerank multiplier must fit in u32") + }) + .unwrap_or(8), + seed: 0, + }; + if quantizers_only { + assert!( + records >= 16, + "quantizers-only benchmark requires at least 16 records" + ); + assert!( + dimensions + .iter() + .all(|dimension| *dimension >= 8 && dimension.is_multiple_of(8)), + "quantizers-only benchmark requires supported TurboQuant dimensions" + ); + } println!("prolly proximity benchmark"); + println!("schema_version=4"); + println!("dataset={BENCHMARK_DATASET_ID}"); + println!("revision={}", command_output("git", &["rev-parse", "HEAD"])); + println!( + "compiler={}", + command_output("rustc", &["--version", "--verbose"]) + ); + println!("target_arch={}", std::env::consts::ARCH); + println!("target_os={}", std::env::consts::OS); + println!("machine={}", command_output("hostname", &[])); + println!("store={}", store_kind.label()); + if let Some(root) = &durable_root { + println!("store_path={}", root.path().display()); + } + println!("seed={}", turboquant_config.seed); println!("records={records}"); - println!("profile={}", if scale_only { "scale" } else { "complete" }); + println!( + "profile={}", + if quantizers_only { + "quantizers" + } else if scale_only { + "scale" + } else { + "complete" + } + ); println!("search_repeats={search_repeats}"); + println!("metric={metric:?}"); + println!("k={k}"); + println!("eligibility_ppm={eligibility_ppm}"); + println!( + "effective_k={}", + k.min( + records + .saturating_mul(eligibility_ppm) + .div_ceil(1_000_000) + .max(1) + ) + ); + println!("turboquant_bits={}", turboquant_config.bit_width); + println!("rerank_multiplier={}", turboquant_config.rerank_multiplier); println!( "search_cache={}", if reset_search_cache { "reset" } else { "warm" } @@ -44,55 +164,234 @@ fn main() { "scalar-first" } ); + println!("async_quantizers={async_quantizers}"); println!("operation,dimensions,threads,micros,metric_a,metric_b"); - for dimension in dimensions { - bench_case( - records, - dimension, - &threads, - scale_only, - search_repeats, - reset_search_cache, - simd_first, + let settings = BenchSettings { + threads: &threads, + scale_only, + quantizers_only, + search_repeats, + reset_search_cache, + async_quantizers, + simd_first, + metric, + requested_k: k, + eligibility_ppm, + turboquant_config: &turboquant_config, + }; + match durable_root { + None => { + let mut make_store = || Arc::new(MemStore::new()); + for dimension in dimensions { + bench_case(records, dimension, &settings, &mut make_store); + } + } + Some(root) => { + let mut store_id = 0usize; + let mut make_store = || { + store_id += 1; + Arc::new( + FileNodeStore::open(root.path().join(format!("store-{store_id:06}"))).unwrap(), + ) + }; + for dimension in dimensions { + bench_case(records, dimension, &settings, &mut make_store); + } + } + } +} + +#[derive(Clone, Copy)] +enum BenchStoreKind { + Memory, + File, +} + +impl BenchStoreKind { + fn from_env() -> Self { + match std::env::var("PROLLY_PROXIMITY_BENCH_STORE") + .unwrap_or_else(|_| "memory".to_owned()) + .trim() + .to_ascii_lowercase() + .as_str() + { + "memory" => Self::Memory, + "file" => Self::File, + _ => panic!("PROLLY_PROXIMITY_BENCH_STORE must be memory or file"), + } + } + + const fn label(self) -> &'static str { + match self { + Self::Memory => "memory", + Self::File => "file", + } + } +} + +struct DurableRunRoot { + path: PathBuf, +} + +impl DurableRunRoot { + fn create(parent: PathBuf) -> Self { + assert!( + parent.is_dir(), + "file benchmark store path must be an existing directory" ); + let parent = parent + .canonicalize() + .expect("file benchmark store path must be canonicalizable"); + let nonce = SystemTime::now() + .duration_since(UNIX_EPOCH) + .expect("system clock must be after the Unix epoch") + .as_nanos(); + let path = parent.join(format!("prolly-turboquant-{}-{nonce}", std::process::id())); + std::fs::create_dir(&path).expect("create unique file benchmark run directory"); + Self { path } + } + + fn path(&self) -> &Path { + &self.path } } -fn bench_case( - count: usize, - dimensions: usize, - threads: &[usize], +impl Drop for DurableRunRoot { + fn drop(&mut self) { + if let Err(error) = std::fs::remove_dir_all(&self.path) { + eprintln!( + "warning: failed to remove benchmark run directory {}: {error}", + self.path.display() + ); + } + } +} + +#[derive(Clone, Copy)] +struct BenchSettings<'a> { + threads: &'a [usize], scale_only: bool, + quantizers_only: bool, search_repeats: usize, reset_search_cache: bool, + async_quantizers: bool, simd_first: bool, -) { + metric: DistanceMetric, + requested_k: usize, + eligibility_ppm: usize, + turboquant_config: &'a TurboQuantizationConfig, +} + +fn bench_case( + count: usize, + dimensions: usize, + settings: &BenchSettings<'_>, + make_store: &mut F, +) where + S: prolly::Store + Clone + Send + Sync, + S::Error: Send + Sync, + F: FnMut() -> S, +{ + let BenchSettings { + threads, + scale_only, + quantizers_only, + search_repeats, + reset_search_cache, + async_quantizers, + simd_first, + metric, + requested_k, + eligibility_ppm, + turboquant_config, + } = *settings; let records = make_records(count, dimensions); - for &workers in threads { - let store = Arc::new(MemStore::new()); - let config = config(dimensions); - let started = Instant::now(); - let (_, stats) = ProximityMap::build_with_parallelism( - store, - config, - black_box(records.clone()), - BuildParallelism::new(workers).unwrap(), - ) - .unwrap(); - row( - "build", - dimensions, - workers, - started.elapsed(), - stats.distance_evaluations, - stats.proximity_objects_written, - ); + if !quantizers_only { + for &workers in threads { + let store = make_store(); + let config = config(dimensions, metric); + let started = Instant::now(); + let (_, stats) = ProximityMap::build_with_parallelism( + store, + config, + black_box(records.clone()), + BuildParallelism::new(workers).unwrap(), + ) + .unwrap(); + row( + "build", + dimensions, + workers, + started.elapsed(), + stats.distance_evaluations, + stats.proximity_objects_written, + ); + } } - let store = Arc::new(MemStore::new()); - let map = ProximityMap::build(store.clone(), config(dimensions), records.clone()).unwrap(); + let store = make_store(); + let started = Instant::now(); + let map = + ProximityMap::build(store.clone(), config(dimensions, metric), records.clone()).unwrap(); + if quantizers_only { + row("source_build", dimensions, 0, started.elapsed(), count, 0); + } + let source_walk = prolly::walk_content_graph( + &store, + &[TypedContentRoot::proximity_descriptor( + map.tree().descriptor.clone(), + )], + &ContentGraphLimits::default(), + ) + .unwrap(); + row( + "source_closure_bytes", + dimensions, + 0, + Duration::ZERO, + source_walk.total_bytes, + source_walk.objects.len(), + ); let query = make_vector(count / 3, dimensions); - let k = 10.min(count.max(1)); + let eligible_count = count + .saturating_mul(eligibility_ppm) + .div_ceil(1_000_000) + .max(1) + .min(count.max(1)); + let eligible_keys: Vec<_> = records + .iter() + .take(eligible_count) + .map(|record| record.key.clone()) + .collect(); + let k = requested_k.min(eligible_count); + let exact_oracle = (!scale_only) + .then(|| authoritative_exact_oracle(&map, &query, k, &eligible_keys, eligibility_ppm)); + + if quantizers_only { + bench_accelerators( + &map, + store, + AcceleratorBenchCase { + query: &query, + exact_oracle: exact_oracle + .as_ref() + .expect("quantizer benchmark requires an exact oracle"), + k, + dimensions, + workers: threads, + turboquant_config, + }, + SearchBenchOptions { + repeats: search_repeats, + reset_cache: reset_search_cache, + async_quantizers, + eligible_keys: &eligible_keys, + eligibility_ppm, + }, + false, + ); + return; + } let search_specs = if simd_first { [ @@ -135,7 +434,7 @@ fn bench_case( let mut request = SearchRequest::exact(&query, k); request.policy = policy; request.kernel = kernel; - request.filter = ProximityFilter::Prefix(b"record-"); + request.filter = benchmark_filter(&eligible_keys, eligibility_ppm); let started = Instant::now(); let mut result = None; for _ in 0..search_repeats { @@ -154,7 +453,13 @@ fn bench_case( result.stats.distance_evaluations + result.stats.quantized_distance_evaluations, ); if name == "search_exact_scalar" && !scale_only { - let recall = recall_at_k(&records, &query, &result, k); + let recall = recall_at_k( + exact_oracle + .as_ref() + .expect("complete benchmark requires an exact oracle"), + &result, + k, + ); println!("recall_exact,{dimensions},0,0,{:.6},0", recall); } } @@ -182,7 +487,7 @@ fn bench_case( let limits = ContentGraphLimits::default(); let root = TypedContentRoot::proximity_descriptor(map.tree().descriptor.clone()); - let replica = MemStore::new(); + let replica = make_store(); let started = Instant::now(); let copied = copy_content_graph(&store, &replica, root.clone(), &limits).unwrap(); row( @@ -234,58 +539,470 @@ fn bench_case( verified.result.neighbors.len(), ); - if dimensions <= 128 && count >= 16 { - bench_accelerators(&map, store.clone(), &query, k, dimensions); + if count >= 16 { + bench_accelerators( + &map, + store.clone(), + AcceleratorBenchCase { + query: &query, + exact_oracle: exact_oracle + .as_ref() + .expect("complete benchmark requires an exact oracle"), + k, + dimensions, + workers: threads, + turboquant_config, + }, + SearchBenchOptions { + repeats: search_repeats, + reset_cache: reset_search_cache, + async_quantizers, + eligible_keys: &eligible_keys, + eligibility_ppm, + }, + true, + ); } #[cfg(feature = "async-store")] bench_async(&map, store, &query, k, dimensions); } +#[derive(Clone, Copy)] +struct AcceleratorBenchCase<'a> { + query: &'a [f32], + exact_oracle: &'a prolly::SearchResult, + k: usize, + dimensions: usize, + workers: &'a [usize], + turboquant_config: &'a TurboQuantizationConfig, +} + +#[derive(Clone, Copy)] +struct SearchBenchOptions<'a> { + repeats: usize, + reset_cache: bool, + async_quantizers: bool, + eligible_keys: &'a [Vec], + eligibility_ppm: usize, +} + fn bench_accelerators( map: &ProximityMap, store: S, - query: &[f32], - k: usize, - dimensions: usize, + case: AcceleratorBenchCase<'_>, + options: SearchBenchOptions<'_>, + include_non_quantized: bool, ) where S: prolly::Store + Clone + Send + Sync, S::Error: Send + Sync, { - let started = Instant::now(); - let (pq, stats) = ProductQuantizer::build( - map, - ProductQuantizationConfig { - subquantizers: (dimensions as u32).min(8), - centroids_per_subquantizer: 16, - training_iterations: 4, - rerank_multiplier: 8, - seed: 17, - max_training_vectors: 65_536, - }, - BuildParallelism::new(2).unwrap(), - ) - .unwrap(); + #[cfg(not(feature = "async-store"))] + let _ = options.async_quantizers; + let AcceleratorBenchCase { + query, + exact_oracle, + k, + dimensions, + workers, + turboquant_config, + } = case; + if dimensions >= 8 && dimensions.is_multiple_of(8) { + let mut selected = None; + let mut canonical = None; + for &worker_count in workers { + let started = Instant::now(); + let (candidate, stats) = TurboQuantizer::build( + map, + turboquant_config.clone(), + BuildParallelism::new(worker_count).unwrap(), + ) + .unwrap(); + row( + "turboquant_build", + dimensions, + worker_count, + started.elapsed(), + stats.transformed_components, + stats.encoded_output_bytes, + ); + row( + "turboquant_build_resources", + dimensions, + worker_count, + Duration::ZERO, + stats.peak_temporary_bytes, + stats.butterfly_operations, + ); + if let Some((manifest, canonical_stats)) = &canonical { + assert_eq!( + candidate.manifest_cid(), + manifest, + "TurboQuant manifest changed with worker count" + ); + assert_eq!( + &stats, canonical_stats, + "TurboQuant logical build statistics changed with worker count" + ); + } else { + canonical = Some((candidate.manifest_cid().clone(), stats.clone())); + selected = Some(candidate); + } + } + let (turboquant, stats) = selected + .zip(canonical.map(|(_, stats)| stats)) + .expect("validated worker list is non-empty"); + #[cfg(feature = "async-store")] + let turboquant_manifest = turboquant.manifest_cid().clone(); + #[cfg(feature = "async-store")] + if options.async_quantizers { + bench_async_turboquant_builds( + map, + store.clone(), + workers, + turboquant_config, + &turboquant_manifest, + &stats, + dimensions, + ); + } + let sidecar = derived_closure_size( + &store, + map.tree().descriptor.clone(), + TypedContentRoot::new( + ContentObjectKind::TurboQuantization, + turboquant.manifest_cid().clone(), + ), + ); + row( + "turboquant_sidecar_bytes", + dimensions, + 0, + Duration::ZERO, + sidecar.total_bytes, + stats.encoded_output_bytes, + ); + row( + "turboquant_manifest_code_bytes", + dimensions, + 0, + Duration::ZERO, + sidecar.manifest_bytes, + sidecar.code_tree_bytes, + ); + let quality = turboquant.quality(); + let accelerators = AcceleratorSet::empty() + .with_turboquant(map.tree(), turboquant) + .unwrap(); + let mut scalar_result = None; + for (name, kernel) in [ + ("turboquant_search_scalar", QueryKernel::ScalarDeterministic), + ("turboquant_search_simd", QueryKernel::SimdDeterministic), + ("turboquant_search_auto", QueryKernel::AutoDeterministic), + ] { + let mut request = SearchRequest::exact(query, k); + request.policy = SearchPolicy::FixedBudget; + request.kernel = kernel; + request.options.backend = SearchBackend::TurboQuantized; + request.filter = benchmark_filter(options.eligible_keys, options.eligibility_ppm); + let mut result = None; + let mut samples = Vec::with_capacity(options.repeats); + let mut physical_reads = 0; + let warm_io = SearchIo::new(store.clone(), Arc::new(SearchRuntime::default())); + if !options.reset_cache { + map.search_with(&accelerators, &warm_io, request.clone()) + .unwrap(); + } + for _ in 0..options.repeats { + let cold_io = if options.reset_cache { + map.clear_content_cache().unwrap(); + Some(SearchIo::new( + store.clone(), + Arc::new(SearchRuntime::default()), + )) + } else { + None + }; + let io = cold_io.as_ref().unwrap_or(&warm_io); + let reads_before = io.physical_reads(); + let started = Instant::now(); + result = Some(map.search_with(&accelerators, io, request.clone()).unwrap()); + samples.push(started.elapsed()); + physical_reads = io.physical_reads().saturating_sub(reads_before); + } + let result = result.expect("search repeats is positive"); + let latency = LatencySummary::from_samples(samples); + row( + name, + dimensions, + 0, + latency.median, + result.stats.quantized_distance_evaluations, + result.stats.distance_evaluations, + ); + row( + &format!("{name}_p95"), + dimensions, + 0, + latency.p95, + result.stats.bytes_read, + result.stats.physical_bytes_read, + ); + row( + &format!("{name}_p99"), + dimensions, + 0, + latency.p99, + result.stats.candidate_handles_peak, + result.stats.candidate_retained_bytes_peak, + ); + row( + &format!("{name}_work"), + dimensions, + 0, + Duration::ZERO, + result.stats.frontier_peak, + completion_id(result.completion), + ); + row( + &format!("{name}_io"), + dimensions, + 0, + Duration::ZERO, + result.stats.nodes_read, + physical_reads, + ); + row( + &format!("{name}_rerank"), + dimensions, + 0, + Duration::ZERO, + result.stats.reranked_candidates, + result.stats.committed_bytes, + ); + if let Some(expected) = &scalar_result { + assert_search_logical_parity(expected, &result, name); + } else { + assert_eq!( + kernel, + QueryKernel::ScalarDeterministic, + "TurboQuant scalar result must establish the parity baseline" + ); + scalar_result = Some(result.clone()); + } + if kernel == QueryKernel::ScalarDeterministic { + println!( + "turboquant_recall,{dimensions},0,0,{:.6},{}", + recall_at_k(exact_oracle, &result, k), + quality.mean_squared_error, + ); + } + } + #[cfg(feature = "async-store")] + if options.async_quantizers { + bench_async_turboquant( + map, + store.clone(), + turboquant_manifest, + AsyncQuantizerBenchCase { + query, + exact_oracle, + k, + dimensions, + options, + expected: scalar_result + .as_ref() + .expect("TurboQuant scalar result establishes parity"), + }, + ); + } + } + + let pq_config = ProductQuantizationConfig { + subquantizers: (dimensions as u32).min(8), + centroids_per_subquantizer: 16, + training_iterations: 4, + rerank_multiplier: turboquant_config.rerank_multiplier, + seed: 17, + max_training_vectors: 65_536, + }; + let mut selected = None; + let mut canonical = None; + for &worker_count in workers { + let started = Instant::now(); + let (candidate, stats) = ProductQuantizer::build( + map, + pq_config.clone(), + BuildParallelism::new(worker_count).unwrap(), + ) + .unwrap(); + row( + "pq_build", + dimensions, + worker_count, + started.elapsed(), + stats.training_distance_evaluations, + stats.encoded_vectors, + ); + if let Some((manifest, canonical_stats)) = &canonical { + assert_eq!( + candidate.manifest_cid(), + manifest, + "PQ manifest changed with worker count" + ); + assert_eq!( + &stats, canonical_stats, + "PQ logical build statistics changed with worker count" + ); + } else { + canonical = Some((candidate.manifest_cid().clone(), stats.clone())); + selected = Some(candidate); + } + } + let (pq, stats) = selected + .zip(canonical.map(|(_, stats)| stats)) + .expect("validated worker list is non-empty"); + #[cfg(feature = "async-store")] + let pq_manifest = pq.manifest_cid().clone(); + #[cfg(feature = "async-store")] + if options.async_quantizers { + bench_async_pq_builds( + map, + store.clone(), + workers, + &pq_config, + &pq_manifest, + &stats, + dimensions, + ); + } + let sidecar = derived_closure_size( + &store, + map.tree().descriptor.clone(), + TypedContentRoot::new( + ContentObjectKind::ProductQuantization, + pq.manifest_cid().clone(), + ), + ); row( - "pq_build", + "pq_sidecar_bytes", dimensions, - 2, - started.elapsed(), - stats.training_distance_evaluations, + 0, + Duration::ZERO, + sidecar.total_bytes, stats.encoded_vectors, ); + row( + "pq_manifest_code_bytes", + dimensions, + 0, + Duration::ZERO, + sidecar.manifest_bytes, + sidecar.code_tree_bytes, + ); + let accelerators = AcceleratorSet::empty().with_pq(map.tree(), pq).unwrap(); let mut request = SearchRequest::exact(query, k); request.policy = SearchPolicy::FixedBudget; request.options.backend = SearchBackend::ProductQuantized; - let started = Instant::now(); - let result = pq.search(map, request).unwrap(); + request.filter = benchmark_filter(options.eligible_keys, options.eligibility_ppm); + let mut result = None; + let mut samples = Vec::with_capacity(options.repeats); + let mut physical_reads = 0; + let warm_io = SearchIo::new(store.clone(), Arc::new(SearchRuntime::default())); + if !options.reset_cache { + map.search_with(&accelerators, &warm_io, request.clone()) + .unwrap(); + } + for _ in 0..options.repeats { + let cold_io = if options.reset_cache { + map.clear_content_cache().unwrap(); + Some(SearchIo::new( + store.clone(), + Arc::new(SearchRuntime::default()), + )) + } else { + None + }; + let io = cold_io.as_ref().unwrap_or(&warm_io); + let reads_before = io.physical_reads(); + let started = Instant::now(); + result = Some(map.search_with(&accelerators, io, request.clone()).unwrap()); + samples.push(started.elapsed()); + physical_reads = io.physical_reads().saturating_sub(reads_before); + } + let result = result.expect("search repeats is positive"); + let latency = LatencySummary::from_samples(samples); row( "pq_search", dimensions, 0, - started.elapsed(), + latency.median, + result.stats.quantized_distance_evaluations, result.stats.distance_evaluations, + ); + row( + "pq_search_p95", + dimensions, + 0, + latency.p95, + result.stats.bytes_read, + result.stats.physical_bytes_read, + ); + row( + "pq_search_p99", + dimensions, + 0, + latency.p99, + result.stats.candidate_handles_peak, + result.stats.candidate_retained_bytes_peak, + ); + row( + "pq_search_work", + dimensions, + 0, + Duration::ZERO, + result.stats.frontier_peak, + completion_id(result.completion), + ); + row( + "pq_search_io", + dimensions, + 0, + Duration::ZERO, + result.stats.nodes_read, + physical_reads, + ); + row( + "pq_search_rerank", + dimensions, + 0, + Duration::ZERO, result.stats.reranked_candidates, + result.stats.committed_bytes, ); + println!( + "pq_recall,{dimensions},0,0,{:.6},0", + recall_at_k(exact_oracle, &result, k), + ); + #[cfg(feature = "async-store")] + if options.async_quantizers { + bench_async_pq( + map, + store.clone(), + pq_manifest, + AsyncQuantizerBenchCase { + query, + exact_oracle, + k, + dimensions, + options, + expected: &result, + }, + ); + } + + if !include_non_quantized { + return; + } let started = Instant::now(); let (hnsw, stats) = HnswIndex::build(map, HnswConfig::default()).unwrap(); @@ -366,13 +1083,528 @@ fn bench_accelerators( } #[cfg(feature = "async-store")] -fn bench_async( - map: &ProximityMap>, - store: Arc, - query: &[f32], +#[derive(Clone, Copy)] +struct AsyncQuantizerBenchCase<'a> { + query: &'a [f32], + exact_oracle: &'a prolly::SearchResult, k: usize, dimensions: usize, + options: SearchBenchOptions<'a>, + expected: &'a prolly::SearchResult, +} + +#[cfg(feature = "async-store")] +fn bench_async_turboquant_builds( + map: &ProximityMap, + store: S, + workers: &[usize], + config: &TurboQuantizationConfig, + expected_manifest: &Cid, + expected_stats: &prolly::TurboQuantizationBuildStats, + dimensions: usize, +) where + S: prolly::Store + Clone + Send + Sync, + S::Error: Send + Sync, +{ + let async_store = SyncStoreAsAsync::new(store); + let async_map = block_on(AsyncProximityMap::load( + async_store, + map.tree().descriptor.clone(), + )) + .unwrap(); + for &worker_count in workers { + let started = Instant::now(); + let (catalog, build_stats) = block_on(AsyncAcceleratorCatalog::build( + &async_map, + AsyncAcceleratorBuildOptions { + turboquant: Some(AsyncTurboQuantizerBuild { + config: config.clone(), + parallelism: BuildParallelism::new(worker_count).unwrap(), + limits: Default::default(), + }), + ..Default::default() + }, + )) + .unwrap(); + let duration = started.elapsed(); + let stats = build_stats + .turboquant + .expect("async TurboQuant build must return logical statistics"); + assert_eq!( + &stats, expected_stats, + "async TurboQuant logical build statistics differ from sync" + ); + assert_eq!( + catalog.entries().len(), + 1, + "single-accelerator async build returned an unexpected catalog" + ); + assert_eq!( + &catalog.entries()[0].manifest, + expected_manifest, + "async TurboQuant manifest differs from sync" + ); + row( + "turboquant_build_async", + dimensions, + worker_count, + duration, + stats.transformed_components, + stats.encoded_output_bytes, + ); + row( + "turboquant_build_async_resources", + dimensions, + worker_count, + Duration::ZERO, + stats.peak_temporary_bytes, + stats.butterfly_operations, + ); + row( + "turboquant_build_async_publication", + dimensions, + worker_count, + Duration::ZERO, + build_stats.objects_published, + build_stats.bytes_published, + ); + } +} + +#[cfg(feature = "async-store")] +fn bench_async_pq_builds( + map: &ProximityMap, + store: S, + workers: &[usize], + config: &ProductQuantizationConfig, + expected_manifest: &Cid, + expected_stats: &prolly::ProductQuantizationBuildStats, + dimensions: usize, +) where + S: prolly::Store + Clone + Send + Sync, + S::Error: Send + Sync, +{ + let async_store = SyncStoreAsAsync::new(store); + let async_map = block_on(AsyncProximityMap::load( + async_store, + map.tree().descriptor.clone(), + )) + .unwrap(); + for &worker_count in workers { + let started = Instant::now(); + let (catalog, build_stats) = block_on(AsyncAcceleratorCatalog::build( + &async_map, + AsyncAcceleratorBuildOptions { + product_quantizer: Some(AsyncProductQuantizerBuild { + config: config.clone(), + parallelism: BuildParallelism::new(worker_count).unwrap(), + limits: Default::default(), + }), + ..Default::default() + }, + )) + .unwrap(); + let duration = started.elapsed(); + let stats = build_stats + .product_quantizer + .expect("async PQ build must return logical statistics"); + assert_eq!( + &stats, expected_stats, + "async PQ logical build statistics differ from sync" + ); + assert_eq!( + catalog.entries().len(), + 1, + "single-accelerator async build returned an unexpected catalog" + ); + assert_eq!( + &catalog.entries()[0].manifest, + expected_manifest, + "async PQ manifest differs from sync" + ); + row( + "pq_build_async", + dimensions, + worker_count, + duration, + stats.training_distance_evaluations, + stats.encoded_vectors, + ); + row( + "pq_build_async_publication", + dimensions, + worker_count, + Duration::ZERO, + build_stats.objects_published, + build_stats.bytes_published, + ); + } +} + +#[cfg(feature = "async-store")] +fn bench_async_turboquant( + map: &ProximityMap, + store: S, + manifest: Cid, + case: AsyncQuantizerBenchCase<'_>, +) where + S: prolly::Store + Clone + Send + Sync, + S::Error: Send + Sync, +{ + let AsyncQuantizerBenchCase { + query, + exact_oracle, + k, + dimensions, + options, + expected, + } = case; + let mut request = SearchRequest::exact(query, k); + request.policy = SearchPolicy::FixedBudget; + request.kernel = QueryKernel::ScalarDeterministic; + request.options.backend = SearchBackend::TurboQuantized; + request.filter = benchmark_filter(options.eligible_keys, options.eligibility_ppm); + let descriptor = map.tree().descriptor.clone(); + + let (result, latency, physical_reads) = if options.reset_cache { + let mut result = None; + let mut samples = Vec::with_capacity(options.repeats); + let mut physical_reads = 0; + for _ in 0..options.repeats { + map.clear_content_cache().unwrap(); + let io = SearchIo::new( + SyncStoreAsAsync::new(store.clone()), + Arc::new(SearchRuntime::default()), + ); + let before = io.physical_bytes_read(); + let reads_before = io.physical_reads(); + let started = Instant::now(); + let (async_map, turboquant) = block_on(async { + let async_map = + AsyncProximityMap::load_with_search_io(io.clone(), descriptor.clone()).await?; + let turboquant = AsyncTurboQuantizer::load(&io, manifest.clone()).await?; + Ok::<_, prolly::Error>((async_map, turboquant)) + }) + .unwrap(); + let accelerators = AsyncAcceleratorSet::empty() + .with_turboquant(async_map.tree(), turboquant) + .unwrap(); + let mut sample = block_on(async_map.search_with_accelerators( + &accelerators, + request.clone(), + AsyncSearchControl::default(), + )) + .unwrap(); + sample.stats.physical_bytes_read = io.physical_bytes_read().saturating_sub(before); + physical_reads = io.physical_reads().saturating_sub(reads_before); + samples.push(started.elapsed()); + result = Some(sample); + } + ( + result.expect("search repeats is positive"), + LatencySummary::from_samples(samples), + physical_reads, + ) + } else { + let io = SearchIo::new( + SyncStoreAsAsync::new(store), + Arc::new(SearchRuntime::default()), + ); + let (async_map, turboquant) = block_on(async { + let async_map = + AsyncProximityMap::load_with_search_io(io.clone(), descriptor.clone()).await?; + let turboquant = AsyncTurboQuantizer::load(&io, manifest).await?; + Ok::<_, prolly::Error>((async_map, turboquant)) + }) + .unwrap(); + let accelerators = AsyncAcceleratorSet::empty() + .with_turboquant(async_map.tree(), turboquant) + .unwrap(); + block_on(async_map.search_with_accelerators( + &accelerators, + request.clone(), + AsyncSearchControl::default(), + )) + .unwrap(); + let mut result = None; + let mut samples = Vec::with_capacity(options.repeats); + let mut physical_reads = 0; + for _ in 0..options.repeats { + let reads_before = io.physical_reads(); + let started = Instant::now(); + result = Some( + block_on(async_map.search_with_accelerators( + &accelerators, + request.clone(), + AsyncSearchControl::default(), + )) + .unwrap(), + ); + samples.push(started.elapsed()); + physical_reads = io.physical_reads().saturating_sub(reads_before); + } + ( + result.expect("search repeats is positive"), + LatencySummary::from_samples(samples), + physical_reads, + ) + }; + + assert_search_logical_parity(expected, &result, "turboquant_search_async"); + + emit_quantized_search_rows( + "turboquant_search_async", + dimensions, + &result, + latency, + physical_reads, + ); + println!( + "turboquant_recall_async,{dimensions},0,0,{:.6},0", + recall_at_k(exact_oracle, &result, k), + ); +} + +#[cfg(feature = "async-store")] +fn bench_async_pq( + map: &ProximityMap, + store: S, + manifest: Cid, + case: AsyncQuantizerBenchCase<'_>, +) where + S: prolly::Store + Clone + Send + Sync, + S::Error: Send + Sync, +{ + let AsyncQuantizerBenchCase { + query, + exact_oracle, + k, + dimensions, + options, + expected, + } = case; + let mut request = SearchRequest::exact(query, k); + request.policy = SearchPolicy::FixedBudget; + request.options.backend = SearchBackend::ProductQuantized; + request.filter = benchmark_filter(options.eligible_keys, options.eligibility_ppm); + let descriptor = map.tree().descriptor.clone(); + + let (result, latency, physical_reads) = if options.reset_cache { + let mut result = None; + let mut samples = Vec::with_capacity(options.repeats); + let mut physical_reads = 0; + for _ in 0..options.repeats { + map.clear_content_cache().unwrap(); + let io = SearchIo::new( + SyncStoreAsAsync::new(store.clone()), + Arc::new(SearchRuntime::default()), + ); + let before = io.physical_bytes_read(); + let reads_before = io.physical_reads(); + let started = Instant::now(); + let (async_map, pq) = block_on(async { + let async_map = + AsyncProximityMap::load_with_search_io(io.clone(), descriptor.clone()).await?; + let pq = AsyncProductQuantizer::load(&io, manifest.clone()).await?; + Ok::<_, prolly::Error>((async_map, pq)) + }) + .unwrap(); + let accelerators = AsyncAcceleratorSet::empty() + .with_pq(async_map.tree(), pq) + .unwrap(); + let mut sample = block_on(async_map.search_with_accelerators( + &accelerators, + request.clone(), + AsyncSearchControl::default(), + )) + .unwrap(); + sample.stats.physical_bytes_read = io.physical_bytes_read().saturating_sub(before); + physical_reads = io.physical_reads().saturating_sub(reads_before); + samples.push(started.elapsed()); + result = Some(sample); + } + ( + result.expect("search repeats is positive"), + LatencySummary::from_samples(samples), + physical_reads, + ) + } else { + let io = SearchIo::new( + SyncStoreAsAsync::new(store), + Arc::new(SearchRuntime::default()), + ); + let (async_map, pq) = block_on(async { + let async_map = + AsyncProximityMap::load_with_search_io(io.clone(), descriptor.clone()).await?; + let pq = AsyncProductQuantizer::load(&io, manifest).await?; + Ok::<_, prolly::Error>((async_map, pq)) + }) + .unwrap(); + let accelerators = AsyncAcceleratorSet::empty() + .with_pq(async_map.tree(), pq) + .unwrap(); + block_on(async_map.search_with_accelerators( + &accelerators, + request.clone(), + AsyncSearchControl::default(), + )) + .unwrap(); + let mut result = None; + let mut samples = Vec::with_capacity(options.repeats); + let mut physical_reads = 0; + for _ in 0..options.repeats { + let reads_before = io.physical_reads(); + let started = Instant::now(); + result = Some( + block_on(async_map.search_with_accelerators( + &accelerators, + request.clone(), + AsyncSearchControl::default(), + )) + .unwrap(), + ); + samples.push(started.elapsed()); + physical_reads = io.physical_reads().saturating_sub(reads_before); + } + ( + result.expect("search repeats is positive"), + LatencySummary::from_samples(samples), + physical_reads, + ) + }; + + assert_search_logical_parity(expected, &result, "pq_search_async"); + + emit_quantized_search_rows( + "pq_search_async", + dimensions, + &result, + latency, + physical_reads, + ); + println!( + "pq_recall_async,{dimensions},0,0,{:.6},0", + recall_at_k(exact_oracle, &result, k), + ); +} + +fn assert_search_logical_parity( + expected: &prolly::SearchResult, + actual: &prolly::SearchResult, + context: &str, +) { + assert_eq!(actual.neighbors, expected.neighbors, "{context} neighbors"); + assert_eq!(actual.plan, expected.plan, "{context} plan"); + assert_eq!( + actual.completion, expected.completion, + "{context} completion" + ); + assert_eq!( + actual.stats.levels_visited, expected.stats.levels_visited, + "{context} levels visited" + ); + assert_eq!( + actual.stats.nodes_read, expected.stats.nodes_read, + "{context} logical nodes" + ); + assert_eq!( + actual.stats.bytes_read, expected.stats.bytes_read, + "{context} logical bytes" + ); + assert_eq!( + actual.stats.committed_bytes, expected.stats.committed_bytes, + "{context} committed bytes" + ); + assert_eq!( + actual.stats.distance_evaluations, expected.stats.distance_evaluations, + "{context} exact evaluations" + ); + assert_eq!( + actual.stats.quantized_distance_evaluations, expected.stats.quantized_distance_evaluations, + "{context} quantized evaluations" + ); + assert_eq!( + actual.stats.reranked_candidates, expected.stats.reranked_candidates, + "{context} reranked candidates" + ); + assert_eq!( + actual.stats.frontier_peak, expected.stats.frontier_peak, + "{context} frontier peak" + ); + assert_eq!( + actual.stats.candidate_handles_peak, expected.stats.candidate_handles_peak, + "{context} candidate handles" + ); + assert_eq!( + actual.stats.candidate_retained_bytes_peak, expected.stats.candidate_retained_bytes_peak, + "{context} retained candidate bytes" + ); +} + +#[cfg(feature = "async-store")] +fn emit_quantized_search_rows( + name: &str, + dimensions: usize, + result: &prolly::SearchResult, + latency: LatencySummary, + physical_reads: usize, ) { + row( + name, + dimensions, + 0, + latency.median, + result.stats.quantized_distance_evaluations, + result.stats.distance_evaluations, + ); + row( + &format!("{name}_p95"), + dimensions, + 0, + latency.p95, + result.stats.bytes_read, + result.stats.physical_bytes_read, + ); + row( + &format!("{name}_p99"), + dimensions, + 0, + latency.p99, + result.stats.candidate_handles_peak, + result.stats.candidate_retained_bytes_peak, + ); + row( + &format!("{name}_work"), + dimensions, + 0, + Duration::ZERO, + result.stats.frontier_peak, + completion_id(result.completion), + ); + row( + &format!("{name}_io"), + dimensions, + 0, + Duration::ZERO, + result.stats.nodes_read, + physical_reads, + ); + row( + &format!("{name}_rerank"), + dimensions, + 0, + Duration::ZERO, + result.stats.reranked_candidates, + result.stats.committed_bytes, + ); +} + +#[cfg(feature = "async-store")] +fn bench_async(map: &ProximityMap, store: S, query: &[f32], k: usize, dimensions: usize) +where + S: prolly::Store + Clone + Send + Sync, + S::Error: Send + Sync, +{ let async_map = block_on(AsyncProximityMap::load( SyncStoreAsAsync::new(store), map.tree().descriptor.clone(), @@ -407,9 +1639,9 @@ fn block_on(future: F) -> F::Output { } } -fn config(dimensions: usize) -> ProximityConfig { +fn config(dimensions: usize, metric: DistanceMetric) -> ProximityConfig { let mut config = ProximityConfig::new(dimensions as u32); - config.metric = DistanceMetric::L2Squared; + config.metric = metric; config.hierarchy.level_hash_seed = 42; config.overflow.min_page_bytes = 4 * 1024; config.overflow.target_page_bytes = 16 * 1024; @@ -421,6 +1653,84 @@ fn config(dimensions: usize) -> ProximityConfig { config } +#[derive(Clone, Copy)] +struct LatencySummary { + median: Duration, + p95: Duration, + p99: Duration, +} + +impl LatencySummary { + fn from_samples(mut samples: Vec) -> Self { + assert!(!samples.is_empty(), "latency samples must not be empty"); + samples.sort_unstable(); + Self { + median: nearest_rank(&samples, 50), + p95: nearest_rank(&samples, 95), + p99: nearest_rank(&samples, 99), + } + } +} + +struct DerivedClosureSize { + total_bytes: usize, + manifest_bytes: usize, + code_tree_bytes: usize, +} + +fn derived_closure_size( + store: &S, + source_descriptor: Cid, + root: TypedContentRoot, +) -> DerivedClosureSize +where + S: prolly::Store, +{ + let limits = ContentGraphLimits::default(); + let source = prolly::walk_content_graph( + store, + &[TypedContentRoot::proximity_descriptor(source_descriptor)], + &limits, + ) + .unwrap(); + let source_cids: HashSet<_> = source + .objects + .into_iter() + .map(|object| object.root.cid) + .collect(); + let manifest_cid = root.cid.clone(); + let closure = prolly::walk_content_graph(store, &[root], &limits).unwrap(); + let mut total_bytes = 0usize; + let mut manifest_bytes = 0usize; + for object in closure.objects { + if source_cids.contains(&object.root.cid) { + continue; + } + total_bytes = total_bytes.saturating_add(object.bytes.len()); + if object.root.cid == manifest_cid { + manifest_bytes = object.bytes.len(); + } + } + assert!( + manifest_bytes > 0, + "derived manifest must be in its closure" + ); + DerivedClosureSize { + total_bytes, + manifest_bytes, + code_tree_bytes: total_bytes.saturating_sub(manifest_bytes), + } +} + +fn nearest_rank(samples: &[Duration], percentile: usize) -> Duration { + let rank = samples + .len() + .saturating_mul(percentile) + .div_ceil(100) + .max(1); + samples[rank - 1] +} + fn row( operation: &str, dimensions: usize, @@ -435,6 +1745,31 @@ fn row( ); } +fn command_output(program: &str, arguments: &[&str]) -> String { + Command::new(program) + .args(arguments) + .output() + .ok() + .filter(|output| output.status.success()) + .map(|output| { + String::from_utf8_lossy(&output.stdout) + .trim() + .replace('\n', " | ") + }) + .filter(|output| !output.is_empty()) + .unwrap_or_else(|| "unavailable".to_owned()) +} + +fn completion_id(completion: SearchCompletion) -> usize { + match completion { + SearchCompletion::Exact => 0, + SearchCompletion::ApproximatePolicySatisfied => 1, + SearchCompletion::BudgetExhausted => 2, + SearchCompletion::Cancelled => 3, + SearchCompletion::DeadlineExceeded => 4, + } +} + fn make_records(count: usize, dimensions: usize) -> Vec { (0..count) .map(|index| ProximityRecord { @@ -446,43 +1781,59 @@ fn make_records(count: usize, dimensions: usize) -> Vec { } fn make_vector(index: usize, dimensions: usize) -> Vec { + let index = u64::try_from(index).expect("benchmark vector index must fit in u64"); (0..dimensions) .map(|component| { + let component = + u64::try_from(component).expect("benchmark vector component index must fit in u64"); + // The multiplier is coprime to BENCHMARK_VECTOR_PERIOD, so the + // first 2,000,003 component-zero values are distinct. Using u64 + // rather than usize also freezes identical datasets on 32-bit + // WASM and 64-bit native targets. The previous modulus (20,003) + // repeated the complete vector about five times in a 100K cell. let mixed = index .wrapping_mul(1_000_003) .wrapping_add(component.wrapping_mul(97_409)); - ((mixed % 20_003) as f32 - 10_001.0) / 1_000.0 + ((mixed % BENCHMARK_VECTOR_PERIOD) as f64 - 1_000_001.0) as f32 / 100_000.0 }) .collect() } -fn recall_at_k( - records: &[ProximityRecord], +fn authoritative_exact_oracle( + map: &ProximityMap, query: &[f32], - result: &prolly::SearchResult, k: usize, -) -> f64 { - let mut scored: Vec<_> = records + eligible_keys: &[Vec], + eligibility_ppm: usize, +) -> prolly::SearchResult +where + S: prolly::Store + Clone, +{ + let mut request = SearchRequest::exact(query, k); + request.kernel = QueryKernel::ScalarDeterministic; + request.filter = benchmark_filter(eligible_keys, eligibility_ppm); + let result = map.search(request).unwrap(); + assert_eq!( + result.completion, + SearchCompletion::Exact, + "qualification oracle must complete an authoritative exact search" + ); + assert_eq!( + result.neighbors.len(), + k, + "qualification oracle must return the effective k" + ); + result +} + +fn recall_at_k(exact: &prolly::SearchResult, result: &prolly::SearchResult, k: usize) -> f64 { + let exact: HashSet<_> = exact + .neighbors .iter() - .map(|record| { - let distance = record - .vector - .iter() - .zip(query) - .map(|(&left, &right)| { - let delta = f64::from(left) - f64::from(right); - delta * delta - }) - .sum::(); - (distance, record.key.clone()) - }) + .take(k) + .map(|neighbor| neighbor.key.clone()) .collect(); - scored.sort_by(|left, right| { - left.0 - .total_cmp(&right.0) - .then_with(|| left.1.cmp(&right.1)) - }); - let exact: HashSet<_> = scored.into_iter().take(k).map(|(_, key)| key).collect(); + assert_eq!(exact.len(), k, "qualification oracle keys must be unique"); result .neighbors .iter() @@ -491,8 +1842,31 @@ fn recall_at_k( / k.max(1) as f64 } +fn benchmark_filter<'a>(keys: &'a [Vec], eligibility_ppm: usize) -> ProximityFilter<'a> { + if eligibility_ppm == 1_000_000 { + ProximityFilter::Prefix(b"record-") + } else { + ProximityFilter::EligibleKeys(keys) + } +} + +fn env_metric(name: &str) -> Option { + let value = std::env::var(name).ok()?; + Some(match value.trim().to_ascii_lowercase().as_str() { + "l2" | "l2_squared" => DistanceMetric::L2Squared, + "cosine" => DistanceMetric::Cosine, + "inner_product" | "ip" => DistanceMetric::InnerProduct, + _ => panic!("{name} has an unsupported metric value"), + }) +} + fn env_usize(name: &str) -> Option { - std::env::var(name).ok()?.parse().ok() + let value = std::env::var(name).ok()?; + Some( + value + .parse() + .unwrap_or_else(|_| panic!("{name} must be an unsigned integer")), + ) } fn env_bool(name: &str) -> bool { @@ -506,9 +1880,29 @@ fn env_bool(name: &str) -> bool { fn env_list(name: &str) -> Option> { let value = std::env::var(name).ok()?; - let values: Vec<_> = value - .split(',') - .filter_map(|item| item.trim().parse().ok()) - .collect(); - (!values.is_empty()).then_some(values) + Some( + value + .split(',') + .map(|item| { + item.trim() + .parse() + .unwrap_or_else(|_| panic!("{name} must be a comma-separated integer list")) + }) + .collect(), + ) +} + +fn assert_unique_positive_workers(workers: &[usize]) { + assert!( + !workers.is_empty(), + "benchmark worker list must not be empty" + ); + let mut unique = HashSet::with_capacity(workers.len()); + for worker in workers { + assert!(*worker > 0, "benchmark worker counts must be positive"); + assert!( + unique.insert(*worker), + "benchmark worker counts must be unique" + ); + } } diff --git a/benchmarks/dynamodb-client/Cargo.lock b/benchmarks/dynamodb-client/Cargo.lock index e6d758d2..4557a3a8 100644 --- a/benchmarks/dynamodb-client/Cargo.lock +++ b/benchmarks/dynamodb-client/Cargo.lock @@ -1180,7 +1180,7 @@ dependencies = [ [[package]] name = "prolly-map" -version = "0.7.0" +version = "0.7.2" dependencies = [ "futures-util", "js-sys", @@ -1196,7 +1196,7 @@ dependencies = [ [[package]] name = "prolly-store-dynamodb" -version = "0.6.0" +version = "0.6.1" dependencies = [ "aws-credential-types", "aws-lc-rs", diff --git a/benchmarks/dynamodb-client/src/main.rs b/benchmarks/dynamodb-client/src/main.rs index 28e4a059..c8fbdfe6 100644 --- a/benchmarks/dynamodb-client/src/main.rs +++ b/benchmarks/dynamodb-client/src/main.rs @@ -2124,11 +2124,14 @@ async fn run_large_write_workload( true, 1, async { - let mut session = client.table(&table).write_session().options(LargeWriteOptions { - max_items: args.records, - max_logical_bytes: logical_bytes.max(1), - ..LargeWriteOptions::default() - }); + let mut session = client + .table(&table) + .write_session() + .options(LargeWriteOptions { + max_items: args.records, + max_logical_bytes: logical_bytes.max(1), + ..LargeWriteOptions::default() + }); for index in 0..args.records { session .put(HashMap::from([ @@ -2156,7 +2159,9 @@ async fn run_large_write_workload( .len() != 2 { - return Err("large write did not create exactly one version after table creation".into()); + return Err( + "large write did not create exactly one version after table creation".into(), + ); } } writer.flush().map_err(error)?; diff --git a/bindings/VERIFICATION.md b/bindings/VERIFICATION.md index b40b4595..68989dbd 100644 --- a/bindings/VERIFICATION.md +++ b/bindings/VERIFICATION.md @@ -66,8 +66,8 @@ tree behavior. | Kotlin/JVM | `bindings/kotlin/src/test/kotlin/build/crab/prolly/*.kt` | `mvn -f bindings/kotlin/pom.xml test` | | Java | `bindings/java/src/test/java/build/crab/prolly/*.java` | `mvn -f bindings/pom.xml -pl java -am test` | | JVM aggregate | Kotlin and Java modules together | `mvn -f bindings/pom.xml test` | -| Ruby | `bindings/ruby/test/prolly_smoke_test.rb` | `PROLLY_BINDINGS_LIBRARY="$PWD/target/debug/libprolly_bindings.dylib" BUNDLE_GEMFILE=bindings/ruby/Gemfile BUNDLE_PATH=/tmp/prolly-ruby-bundle bundle exec ruby -Ibindings/ruby/lib bindings/ruby/test/prolly_smoke_test.rb` | -| Swift | `bindings/swift/Examples/FixtureCheck`, cookbook executable targets | `DYLD_LIBRARY_PATH="$PWD/target/debug" swift run --package-path bindings/swift prolly-fixture-check` | +| Ruby | `bindings/ruby/test/{prolly_smoke_test,portable_parity_test}.rb` | `PROLLY_BINDINGS_LIBRARY="$PWD/target/debug/libprolly_bindings.dylib" BUNDLE_GEMFILE=bindings/ruby/Gemfile BUNDLE_PATH=/tmp/prolly-ruby-bundle bundle exec ruby -Ibindings/ruby/lib bindings/ruby/test/all_tests.rb` | +| Swift | `bindings/swift/Tests/ProllyTests/PortableParityTests.swift`, `bindings/swift/Examples/FixtureCheck`, cookbook executable targets | `DYLD_LIBRARY_PATH="$PWD/target/debug" swift test --package-path bindings/swift && DYLD_LIBRARY_PATH="$PWD/target/debug" swift run --package-path bindings/swift prolly-fixture-check` | ## Async Store Provider Gate diff --git a/bindings/api/classification-audit.json b/bindings/api/classification-audit.json index 201fca04..6d869f0b 100644 --- a/bindings/api/classification-audit.json +++ b/bindings/api/classification-audit.json @@ -5,66 +5,70 @@ "async-store" ], "summary": { - "release_complete": 343, + "release_complete": 420, "reviewed_incomplete": 395, - "unreviewed_runtime_candidate": 746, - "unreviewed_data_model": 1546, - "unreviewed_rust_abstraction": 9 + "unreviewed_runtime_candidate": 955, + "unreviewed_data_model": 1630, + "unreviewed_rust_abstraction": 18 }, "family_counts": { - "core": 1636, - "indexed-map": 278, - "maintenance": 314, + "core": 1698, + "indexed-map": 403, + "maintenance": 334, "proof": 171, - "proximity-map": 389, - "session": 106, - "versioned-map": 145 + "proximity-map": 525, + "session": 107, + "versioned-map": 180 }, "owner_counts": { - "prolly::Prolly": 146, - "prolly::ProllyEngine": 125, + "prolly::Prolly": 148, + "prolly::ProllyEngine": 137, "prolly::VersionedMap": 77, - "prolly::Error": 52, + "prolly::Error": 53, "prolly::MapSnapshot": 46, + "prolly::AsyncIndexedMap": 39, "prolly::TreeStats": 39, "prolly::IndexedMap": 37, + "prolly::AsyncVersionedMap": 34, + "prolly::AsyncSecondaryIndexSnapshot": 33, "prolly::SecondaryIndexSnapshot": 32, + "prolly::RemoteStoreBackend": 27, + "prolly::AsyncProximityMap": 25, "prolly::Node": 25, "prolly::StatsDiff": 25, "prolly::StatsPercentageChange": 25, - "prolly::RemoteStoreBackend": 24, + "prolly::AsyncStore": 24, "prolly::ReadSession": 23, - "prolly::AsyncReadSession": 21, - "prolly::AsyncStore": 21, + "prolly::AsyncReadSession": 22, + "prolly::Store": 22, "prolly::ProximityMap": 21, "prolly::IndexedSnapshotBundle": 20, - "prolly::Store": 20, "prolly::MergePolicyRegistry": 19, "prolly::BatchApplyStats": 18, + "prolly::AsyncProllyTransaction": 17, "prolly::WriteStats": 17, - "prolly::AsyncVersionedMap": 16, + "prolly::AsyncMapSnapshot": 16, + "prolly::IndexedCollectionState": 16, "prolly::SecondaryIndexLimits": 16, "prolly::IndexErrorCode": 15, + "prolly::OwnedAsyncProllyTransaction": 15, "prolly::RootManifest": 15, "prolly::VersionedValue": 15, "prolly::WriteSession": 15, - "prolly::AsyncMapSnapshot": 14, "prolly::ConfigBuilder": 14, + "prolly::ContentObjectKind": 14, "prolly::DiffPageProofVerification": 14, "prolly::IndexDescriptor": 14, - "prolly::IndexedCollectionState": 14, "prolly::KeyBuilder": 14, "prolly::NamedRootRetention": 14, "prolly::NodeBuilder": 14, "prolly::ProllyMetricsSnapshot": 14, + "prolly::ProllyTransaction": 14, "prolly::ProofBundleSummary": 14, "prolly::ProximityMutationStats": 14, - "prolly::AsyncProllyTransaction": 13, "prolly::AuthenticatedProofEnvelopeVerification": 13, "prolly::CompositeAccelerator": 13, - "prolly::ContentObjectKind": 13, - "prolly::OwnedAsyncProllyTransaction": 13, - "prolly::ProllyTransaction": 13, + "prolly::OwnedProllyTransaction": 13, "prolly::ProximitySearchProof": 13, "prolly::SnapshotBundle": 13, "prolly::AuthenticatedProofEnvelope": 12, @@ -73,16 +77,22 @@ "prolly::IndexedMapMetricsSnapshot": 12, "prolly::MapComparison": 12, "prolly::MapMerge": 12, - "prolly::OwnedProllyTransaction": 12, "prolly::ProximitySearchStats": 12, "prolly::SearchPlanSummary": 12, "prolly::SnapshotManager": 12, "prolly::SnapshotNamespace": 12, "prolly::Tombstone": 12, + "prolly::AsyncCompositeAccelerator": 11, + "prolly::AsyncProximityHead": 11, + "prolly::AsyncTurboQuantizer": 11, "prolly::CompositeBuildStats": 11, "prolly::MaintenanceBudget": 11, "prolly::ProximityVerification": 11, + "prolly::TurboQuantizer": 11, "prolly::AcceleratorCatalog": 10, + "prolly::AsyncAcceleratorCatalog": 10, + "prolly::AsyncCompositeBuildOptions": 10, + "prolly::AsyncVersionedMapsTransaction": 10, "prolly::DiffPageProof": 10, "prolly::IndexVerification": 10, "prolly::MutationBuffer": 10, @@ -99,6 +109,7 @@ "prolly::CrdtConfig": 9, "prolly::GcPlan": 9, "prolly::GcReachability": 9, + "prolly::IndexedSnapshotManifest": 9, "prolly::KeyProof": 9, "prolly::MergeTraceEvent": 9, "prolly::MultiKeyProof": 9, @@ -115,8 +126,9 @@ "prolly::TreeDebugComparison": 9, "prolly::TreeDebugComparisonLevel": 9, "prolly::TypedVersionedMap": 9, - "prolly::AsyncAcceleratorCatalog": 8, - "prolly::AsyncCompositeAccelerator": 8, + "prolly::VersionedMapsTransaction": 9, + "prolly::AsyncIndexedSnapshot": 8, + "prolly::AsyncSecondaryIndexQuery": 8, "prolly::ContentGcPlan": 8, "prolly::HnswConfig": 8, "prolly::IndexBuildResult": 8, @@ -126,12 +138,18 @@ "prolly::IndexedSnapshotBundleSummary": 8, "prolly::MissingNodePlan": 8, "prolly::ProximitySearchRequest": 8, + "prolly::SearchPlan": 8, + "prolly::SearchRuntimePolicy": 8, "prolly::SecondaryIndexQuery": 8, "prolly::SecondaryIndexRegistry": 8, "prolly::TransferBudget": 8, "prolly::TreeFormat": 8, - "prolly::VersionedMapsTransaction": 8, + "prolly::TurboQuantizationBuildStats": 8, + "prolly::AcceleratorSet": 7, "prolly::AsyncBlobStore": 7, + "prolly::AsyncManifestStore": 7, + "prolly::AsyncPreparedIndexedMutation": 7, + "prolly::AsyncProximityReadSession": 7, "prolly::ContentGraphCopy": 7, "prolly::ContentRootManifest": 7, "prolly::DiffTraversalStats": 7, @@ -155,29 +173,33 @@ "prolly::RangePageProofVerification": 7, "prolly::RangeProofVerification": 7, "prolly::Resolution": 7, - "prolly::SearchPlan": 7, - "prolly::SearchRuntimePolicy": 7, + "prolly::SearchBackend": 7, "prolly::SecondaryIndexCursor": 7, "prolly::SnapshotBundleSummary": 7, "prolly::SnapshotBundleVerification": 7, "prolly::StructuralDiffCursor": 7, "prolly::TimestampedValue": 7, + "prolly::TurboQuantizationBuildLimits": 7, "prolly::TypedContentRoot": 7, "prolly::ValueRef": 7, "prolly::VersionedMapBackup": 7, "prolly::VersionedMapEditor": 7, "prolly::VersionedMapUpdate": 7, - "prolly::AcceleratorSet": 6, "prolly::ActiveIndexHealth": 6, + "prolly::AsyncAcceleratorBuildOptions": 6, + "prolly::AsyncAcceleratorBuildStats": 6, + "prolly::AsyncAcceleratorSet": 6, "prolly::AsyncHnswIndex": 6, - "prolly::AsyncManifestStore": 6, "prolly::AsyncProductQuantizer": 6, - "prolly::AsyncProximityMap": 6, "prolly::AsyncRangeIter": 6, "prolly::BatchWriter": 6, + "prolly::BlobReachabilityLimits": 6, "prolly::ChangedSpan": 6, "prolly::CollectionIndexPolicy": 6, "prolly::CompositeAcceleratorConfig": 6, + "prolly::CompositeBase": 6, + "prolly::CompositeBuildOrRebuildOutcome": 6, + "prolly::CompositeRebuildOptions": 6, "prolly::ConflictRef": 6, "prolly::CursorWindow": 6, "prolly::DiffRef": 6, @@ -196,19 +218,19 @@ "prolly::ProximityFilter": 6, "prolly::ProximityProofFilter": 6, "prolly::ProximityTree": 6, - "prolly::SearchBackend": 6, + "prolly::RemoteProllyStore": 6, "prolly::SearchBudget": 6, "prolly::SearchCompletion": 6, + "prolly::SearchOptions": 6, "prolly::SnapshotRoot": 6, "prolly::StatsComparison": 6, "prolly::TransactionUpdate": 6, - "prolly::AsyncAcceleratorSet": 5, + "prolly::AsyncProximityBuildOptions": 5, "prolly::AuthenticatedProofBundleVerification": 5, "prolly::BlobRef": 5, "prolly::BlobStore": 5, - "prolly::CompositeBase": 5, + "prolly::CatalogAcceleratorKind": 5, "prolly::CompositeBuildLimits": 5, - "prolly::CompositeBuildOrRebuildOutcome": 5, "prolly::Conflict": 5, "prolly::ContentGraphLimits": 5, "prolly::ContentGraphWalk": 5, @@ -218,6 +240,7 @@ "prolly::FileBlobStore": 5, "prolly::FullRebuildReason": 5, "prolly::IndexSnapshotRef": 5, + "prolly::IndexedVersion": 5, "prolly::MapCatalogVerification": 5, "prolly::MapVersion": 5, "prolly::MapVersionId": 5, @@ -228,15 +251,14 @@ "prolly::OverflowConfig": 5, "prolly::ParallelConfig": 5, "prolly::PlannerPolicy": 5, + "prolly::ProllyCacheUsage": 5, "prolly::ProximityStructuralProof": 5, "prolly::RangeCursor": 5, "prolly::RemoteAdapterError": 5, - "prolly::RemoteProllyStore": 5, "prolly::RemoteTransactionConflict": 5, "prolly::RetryAdvice": 5, "prolly::ReverseCursor": 5, "prolly::RootWrite": 5, - "prolly::SearchOptions": 5, "prolly::SearchResult": 5, "prolly::SecondaryIndexBuilder": 5, "prolly::SecondaryIndexMatchRef": 5, @@ -246,30 +268,34 @@ "prolly::VersionPruneResult": 5, "prolly::AcceleratorCatalogEntry": 4, "prolly::AdaptiveQuality": 4, + "prolly::ApproximatePreference": 4, "prolly::AsyncBatchBuilder": 4, "prolly::AsyncConflictIter": 4, "prolly::AsyncDiffIter": 4, "prolly::AsyncIoConfig": 4, + "prolly::AsyncPreparedIndexedUpdate": 4, + "prolly::AsyncProductQuantizerBuild": 4, + "prolly::AsyncProximitySnapshot": 4, "prolly::AsyncSearchControl": 4, "prolly::AsyncSortedBatchBuilder": 4, + "prolly::AsyncTurboQuantizerBuild": 4, "prolly::BatchBuilder": 4, "prolly::BlobGcSweep": 4, "prolly::BoundaryDetector": 4, "prolly::BoundaryRule": 4, "prolly::BuildParallelism": 4, - "prolly::CatalogAcceleratorKind": 4, "prolly::ChangedSpanHint": 4, "prolly::ChunkMeasure": 4, "prolly::Cid": 4, - "prolly::CompositeRebuildOptions": 4, + "prolly::CompositeBaseKind": 4, "prolly::ContentGcSweep": 4, "prolly::DistanceMetric": 4, "prolly::EntryRef": 4, "prolly::FileBlobStoreError": 4, "prolly::GcSweep": 4, + "prolly::GcTraversalLimits": 4, "prolly::IndexProjection": 4, "prolly::IndexedSnapshotBundleVerification": 4, - "prolly::IndexedVersion": 4, "prolly::LargeValueConfig": 4, "prolly::LogicalPatch": 4, "prolly::MapBackupVersion": 4, @@ -297,25 +323,31 @@ "prolly::SearchPolicy": 4, "prolly::SecondaryIndexEntry": 4, "prolly::SecondaryIndexMatch": 4, + "prolly::SnapshotExportLimits": 4, "prolly::SortedBatchBuilder": 4, "prolly::StructuralDiffMarker": 4, "prolly::StructuralDiffPage": 4, "prolly::SyncBlobStoreAsAsync": 4, "prolly::SyncStoreAsAsync": 4, "prolly::TreeDebugNodeStatus": 4, + "prolly::TurboQuantizationConfig": 4, + "prolly::TurboQuantizationVerification": 4, "prolly::TypedContentObject": 4, "prolly::TypedMigrationResult": 4, "prolly::ValueRefView": 4, "prolly::VersionedCborCodec": 4, "prolly::VersionedJsonCodec": 4, - "prolly::ApproximatePreference": 3, + "prolly::AsyncCompositeBuildOutcome": 3, + "prolly::AsyncHnswBuild": 3, + "prolly::AsyncIndexedSourceView": 3, + "prolly::AsyncManifestStoreScan": 3, "prolly::AsyncMapChangeSubscription": 3, + "prolly::AsyncProximityHeadCommit": 3, "prolly::AsyncTransactionalStore": 3, "prolly::BatchApplyResult": 3, "prolly::BatchOp": 3, "prolly::BoundaryInput": 3, "prolly::CancellationToken": 3, - "prolly::CompositeBaseKind": 3, "prolly::CompositeBuildOutcome": 3, "prolly::ContentManifestUpdate": 3, "prolly::ContentRootPublication": 3, @@ -328,9 +360,13 @@ "prolly::IndexedSnapshotId": 3, "prolly::KeyCodec": 3, "prolly::KeyDecodeError": 3, + "prolly::ManifestStoreScan": 3, "prolly::MapChangeSubscription": 3, + "prolly::MapVersionCursor": 3, + "prolly::MapVersionPage": 3, "prolly::MergePolicyRule": 3, "prolly::MergeTraceStage": 3, + "prolly::NamedRootManifestPage": 3, "prolly::NodeStoreScan": 3, "prolly::OwnedRangeScanSession": 3, "prolly::OwnedValueLease": 3, @@ -343,6 +379,7 @@ "prolly::RangePage": 3, "prolly::RemoteBatchOp": 3, "prolly::RemoteManifestUpdate": 3, + "prolly::RemoteNamedRootPage": 3, "prolly::RemoteRootWrite": 3, "prolly::RemoteTransactionUpdate": 3, "prolly::ReversePage": 3, @@ -363,9 +400,10 @@ "prolly::TreeDebugComparedNode": 3, "prolly::TreeDebugLevel": 3, "prolly::TreeDebugView": 3, + "prolly::TurboQuantizationQuality": 3, "prolly::ValueCodec": 3, "prolly::VersionedMapBatchResult": 3, - "prolly::AsyncManifestStoreScan": 2, + "prolly::AsyncIndexedStore": 2, "prolly::BlobStoreScan": 2, "prolly::BorrowedMergeResolver": 2, "prolly::ConflictFreeMerger": 2, @@ -374,7 +412,6 @@ "prolly::HnswRoutingVectorEncoding": 2, "prolly::HnswSearchOptions": 2, "prolly::IndexedStore": 2, - "prolly::ManifestStoreScan": 2, "prolly::MemStore": 2, "prolly::MergeTrace": 2, "prolly::PqSearchOptions": 2, @@ -384,6 +421,7 @@ "prolly::SecondaryIndexExtractor": 2, "prolly::SnapshotPin": 2, "prolly::StreamingSecondaryIndexExtractor": 2, + "prolly::TurboQuantSearchOptions": 2, "prolly::VectorStorageConfig": 2, "prolly::AsyncProlly": 1, "prolly::AsyncRangePage": 1, @@ -401,6 +439,7 @@ "prolly::ExactProximityRecord": 1, "prolly::INDEXED_COLLECTION_FORMAT": 1, "prolly::INDEXED_SNAPSHOT_BUNDLE_FORMAT_VERSION": 1, + "prolly::INDEXED_SNAPSHOT_MANIFEST_FORMAT": 1, "prolly::INDEX_PHYSICAL_LAYOUT_VERSION": 1, "prolly::INIT_LEVEL": 1, "prolly::IndexedSourceRecord": 1, @@ -431,8 +470,11 @@ "prolly::chunking::logical_bytes_key_weibull": 1, "prolly::chunking::logical_bytes_rolling_hash": 1, "prolly::compare_and_swap_named_content_root": 1, + "prolly::compare_and_swap_named_content_root_async": 1, "prolly::compare_and_swap_named_content_root_with_limits": 1, + "prolly::compare_and_swap_named_content_root_with_limits_async": 1, "prolly::content_references": 1, + "prolly::content_references_async": 1, "prolly::copy_and_publish_content_graph": 1, "prolly::copy_content_graph": 1, "prolly::debug_key": 1, @@ -448,17 +490,23 @@ "prolly::i128_key": 1, "prolly::i64_key": 1, "prolly::indexed_collection_root_name": 1, + "prolly::indexed_collection_source_map_id": 1, "prolly::inspect_proof_bundle": 1, "prolly::is_tombstone_value": 1, "prolly::load_named_content_root": 1, + "prolly::load_named_content_root_async": 1, "prolly::load_named_content_root_with_limits": 1, + "prolly::load_named_content_root_with_limits_async": 1, "prolly::physical_index_key": 1, "prolly::plan_content_gc": 1, "prolly::prefix_end": 1, "prolly::prefix_range": 1, "prolly::put_named_content_root": 1, + "prolly::put_named_content_root_async": 1, "prolly::put_named_content_root_with_limits": 1, + "prolly::put_named_content_root_with_limits_async": 1, "prolly::remote_conformance": 1, + "prolly::remote_conformance::assert_remote_backend_async_indexed_map_contract": 1, "prolly::remote_conformance::assert_remote_backend_contract": 1, "prolly::remote_conformance::assert_remote_backend_transaction_contract": 1, "prolly::resolver": 1, @@ -488,7 +536,8 @@ "prolly::verify_proof_bundle": 1, "prolly::verify_range_page_proof": 1, "prolly::verify_range_proof": 1, - "prolly::walk_content_graph": 1 + "prolly::walk_content_graph": 1, + "prolly::walk_content_graph_async": 1 }, "rows": [ { @@ -691,6 +740,16 @@ "status": "planned", "bucket": "reviewed_incomplete" }, + { + "rust": "prolly::AcceleratorSet::with_turboquant", + "kind": "function", + "owner": "prolly::AcceleratorSet", + "member_kind": "inherent-item", + "family": "proximity-map", + "classification": "portable", + "status": "implemented", + "bucket": "release_complete" + }, { "rust": "prolly::ActiveIndexHealth", "kind": "struct", @@ -821,6 +880,136 @@ "status": "planned", "bucket": "unreviewed_data_model" }, + { + "rust": "prolly::ApproximatePreference::TurboQuantizedFirst", + "kind": "variant", + "owner": "prolly::ApproximatePreference", + "member_kind": "variant", + "family": "proximity-map", + "classification": "portable", + "status": "implemented", + "bucket": "release_complete" + }, + { + "rust": "prolly::AsyncAcceleratorBuildOptions", + "kind": "struct", + "owner": null, + "member_kind": null, + "family": "proximity-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, + { + "rust": "prolly::AsyncAcceleratorBuildOptions::graph_limits", + "kind": "struct_field", + "owner": "prolly::AsyncAcceleratorBuildOptions", + "member_kind": "field", + "family": "proximity-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, + { + "rust": "prolly::AsyncAcceleratorBuildOptions::hnsw", + "kind": "struct_field", + "owner": "prolly::AsyncAcceleratorBuildOptions", + "member_kind": "field", + "family": "proximity-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, + { + "rust": "prolly::AsyncAcceleratorBuildOptions::product_quantizer", + "kind": "struct_field", + "owner": "prolly::AsyncAcceleratorBuildOptions", + "member_kind": "field", + "family": "proximity-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, + { + "rust": "prolly::AsyncAcceleratorBuildOptions::publication_batch_items", + "kind": "struct_field", + "owner": "prolly::AsyncAcceleratorBuildOptions", + "member_kind": "field", + "family": "proximity-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, + { + "rust": "prolly::AsyncAcceleratorBuildOptions::turboquant", + "kind": "struct_field", + "owner": "prolly::AsyncAcceleratorBuildOptions", + "member_kind": "field", + "family": "proximity-map", + "classification": "portable", + "status": "implemented", + "bucket": "release_complete" + }, + { + "rust": "prolly::AsyncAcceleratorBuildStats", + "kind": "struct", + "owner": null, + "member_kind": null, + "family": "proximity-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, + { + "rust": "prolly::AsyncAcceleratorBuildStats::bytes_published", + "kind": "struct_field", + "owner": "prolly::AsyncAcceleratorBuildStats", + "member_kind": "field", + "family": "proximity-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, + { + "rust": "prolly::AsyncAcceleratorBuildStats::hnsw", + "kind": "struct_field", + "owner": "prolly::AsyncAcceleratorBuildStats", + "member_kind": "field", + "family": "proximity-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, + { + "rust": "prolly::AsyncAcceleratorBuildStats::objects_published", + "kind": "struct_field", + "owner": "prolly::AsyncAcceleratorBuildStats", + "member_kind": "field", + "family": "proximity-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, + { + "rust": "prolly::AsyncAcceleratorBuildStats::product_quantizer", + "kind": "struct_field", + "owner": "prolly::AsyncAcceleratorBuildStats", + "member_kind": "field", + "family": "proximity-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, + { + "rust": "prolly::AsyncAcceleratorBuildStats::turboquant", + "kind": "struct_field", + "owner": "prolly::AsyncAcceleratorBuildStats", + "member_kind": "field", + "family": "proximity-map", + "classification": "portable", + "status": "implemented", + "bucket": "release_complete" + }, { "rust": "prolly::AsyncAcceleratorCatalog", "kind": "struct", @@ -841,6 +1030,16 @@ "status": "planned", "bucket": "reviewed_incomplete" }, + { + "rust": "prolly::AsyncAcceleratorCatalog::build", + "kind": "function", + "owner": "prolly::AsyncAcceleratorCatalog", + "member_kind": "inherent-item", + "family": "proximity-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, { "rust": "prolly::AsyncAcceleratorCatalog::entries", "kind": "function", @@ -881,6 +1080,16 @@ "status": "planned", "bucket": "reviewed_incomplete" }, + { + "rust": "prolly::AsyncAcceleratorCatalog::publish", + "kind": "function", + "owner": "prolly::AsyncAcceleratorCatalog", + "member_kind": "inherent-item", + "family": "proximity-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, { "rust": "prolly::AsyncAcceleratorCatalog::source_descriptor", "kind": "function", @@ -951,6 +1160,16 @@ "status": "planned", "bucket": "reviewed_incomplete" }, + { + "rust": "prolly::AsyncAcceleratorSet::with_turboquant", + "kind": "function", + "owner": "prolly::AsyncAcceleratorSet", + "member_kind": "inherent-item", + "family": "proximity-map", + "classification": "portable", + "status": "implemented", + "bucket": "release_complete" + }, { "rust": "prolly::AsyncBatchBuilder", "kind": "struct", @@ -1081,6 +1300,36 @@ "status": "planned", "bucket": "reviewed_incomplete" }, + { + "rust": "prolly::AsyncCompositeAccelerator::build_from_hnsw", + "kind": "function", + "owner": "prolly::AsyncCompositeAccelerator", + "member_kind": "inherent-item", + "family": "proximity-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncCompositeAccelerator::build_from_product_quantizer", + "kind": "function", + "owner": "prolly::AsyncCompositeAccelerator", + "member_kind": "inherent-item", + "family": "proximity-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncCompositeAccelerator::build_from_turboquant", + "kind": "function", + "owner": "prolly::AsyncCompositeAccelerator", + "member_kind": "inherent-item", + "family": "proximity-map", + "classification": "portable", + "status": "implemented", + "bucket": "release_complete" + }, { "rust": "prolly::AsyncCompositeAccelerator::config", "kind": "function", @@ -1142,7 +1391,7 @@ "bucket": "reviewed_incomplete" }, { - "rust": "prolly::AsyncConflictIter", + "rust": "prolly::AsyncCompositeBuildOptions", "kind": "struct", "owner": null, "member_kind": null, @@ -1152,137 +1401,167 @@ "bucket": "unreviewed_data_model" }, { - "rust": "prolly::AsyncConflictIter::collect", - "kind": "function", - "owner": "prolly::AsyncConflictIter", - "member_kind": "inherent-item", + "rust": "prolly::AsyncCompositeBuildOptions::config", + "kind": "struct_field", + "owner": "prolly::AsyncCompositeBuildOptions", + "member_kind": "field", "family": "core", "classification": "portable", "status": "planned", - "bucket": "unreviewed_runtime_candidate" + "bucket": "unreviewed_data_model" }, { - "rust": "prolly::AsyncConflictIter::into_stream", - "kind": "function", - "owner": "prolly::AsyncConflictIter", - "member_kind": "inherent-item", + "rust": "prolly::AsyncCompositeBuildOptions::graph_limits", + "kind": "struct_field", + "owner": "prolly::AsyncCompositeBuildOptions", + "member_kind": "field", "family": "core", "classification": "portable", "status": "planned", - "bucket": "unreviewed_runtime_candidate" + "bucket": "unreviewed_data_model" }, { - "rust": "prolly::AsyncConflictIter::next", - "kind": "function", - "owner": "prolly::AsyncConflictIter", - "member_kind": "inherent-item", - "family": "core", + "rust": "prolly::AsyncCompositeBuildOptions::hnsw_limits", + "kind": "struct_field", + "owner": "prolly::AsyncCompositeBuildOptions", + "member_kind": "field", + "family": "proximity-map", "classification": "portable", "status": "planned", - "bucket": "unreviewed_runtime_candidate" + "bucket": "unreviewed_data_model" }, { - "rust": "prolly::AsyncDiffIter", - "kind": "struct", - "owner": null, - "member_kind": null, + "rust": "prolly::AsyncCompositeBuildOptions::limits", + "kind": "struct_field", + "owner": "prolly::AsyncCompositeBuildOptions", + "member_kind": "field", "family": "core", "classification": "portable", "status": "planned", "bucket": "unreviewed_data_model" }, { - "rust": "prolly::AsyncDiffIter::collect", - "kind": "function", - "owner": "prolly::AsyncDiffIter", - "member_kind": "inherent-item", + "rust": "prolly::AsyncCompositeBuildOptions::pq_limits", + "kind": "struct_field", + "owner": "prolly::AsyncCompositeBuildOptions", + "member_kind": "field", "family": "core", "classification": "portable", "status": "planned", - "bucket": "unreviewed_runtime_candidate" + "bucket": "unreviewed_data_model" }, { - "rust": "prolly::AsyncDiffIter::into_stream", - "kind": "function", - "owner": "prolly::AsyncDiffIter", - "member_kind": "inherent-item", + "rust": "prolly::AsyncCompositeBuildOptions::pq_parallelism", + "kind": "struct_field", + "owner": "prolly::AsyncCompositeBuildOptions", + "member_kind": "field", "family": "core", "classification": "portable", "status": "planned", - "bucket": "unreviewed_runtime_candidate" + "bucket": "unreviewed_data_model" }, { - "rust": "prolly::AsyncDiffIter::next", - "kind": "function", - "owner": "prolly::AsyncDiffIter", - "member_kind": "inherent-item", + "rust": "prolly::AsyncCompositeBuildOptions::publication_batch_items", + "kind": "struct_field", + "owner": "prolly::AsyncCompositeBuildOptions", + "member_kind": "field", "family": "core", "classification": "portable", "status": "planned", - "bucket": "unreviewed_runtime_candidate" + "bucket": "unreviewed_data_model" }, { - "rust": "prolly::AsyncHnswIndex", - "kind": "struct", + "rust": "prolly::AsyncCompositeBuildOptions::turboquant_limits", + "kind": "struct_field", + "owner": "prolly::AsyncCompositeBuildOptions", + "member_kind": "field", + "family": "core", + "classification": "portable", + "status": "implemented", + "bucket": "release_complete" + }, + { + "rust": "prolly::AsyncCompositeBuildOptions::turboquant_parallelism", + "kind": "struct_field", + "owner": "prolly::AsyncCompositeBuildOptions", + "member_kind": "field", + "family": "core", + "classification": "portable", + "status": "implemented", + "bucket": "release_complete" + }, + { + "rust": "prolly::AsyncCompositeBuildOutcome", + "kind": "enum", "owner": null, "member_kind": null, - "family": "proximity-map", + "family": "core", "classification": "portable", "status": "planned", "bucket": "unreviewed_data_model" }, { - "rust": "prolly::AsyncHnswIndex::config", - "kind": "function", - "owner": "prolly::AsyncHnswIndex", - "member_kind": "inherent-item", - "family": "proximity-map", + "rust": "prolly::AsyncCompositeBuildOutcome::Composite", + "kind": "variant", + "owner": "prolly::AsyncCompositeBuildOutcome", + "member_kind": "variant", + "family": "core", "classification": "portable", "status": "planned", - "bucket": "reviewed_incomplete" + "bucket": "unreviewed_data_model" }, { - "rust": "prolly::AsyncHnswIndex::is_canonical", - "kind": "function", - "owner": "prolly::AsyncHnswIndex", - "member_kind": "inherent-item", - "family": "proximity-map", + "rust": "prolly::AsyncCompositeBuildOutcome::FullRebuildRequired", + "kind": "variant", + "owner": "prolly::AsyncCompositeBuildOutcome", + "member_kind": "variant", + "family": "core", "classification": "portable", "status": "planned", - "bucket": "reviewed_incomplete" + "bucket": "unreviewed_data_model" }, { - "rust": "prolly::AsyncHnswIndex::load", + "rust": "prolly::AsyncConflictIter", + "kind": "struct", + "owner": null, + "member_kind": null, + "family": "core", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, + { + "rust": "prolly::AsyncConflictIter::collect", "kind": "function", - "owner": "prolly::AsyncHnswIndex", + "owner": "prolly::AsyncConflictIter", "member_kind": "inherent-item", - "family": "proximity-map", + "family": "core", "classification": "portable", "status": "planned", - "bucket": "reviewed_incomplete" + "bucket": "unreviewed_runtime_candidate" }, { - "rust": "prolly::AsyncHnswIndex::manifest_cid", + "rust": "prolly::AsyncConflictIter::into_stream", "kind": "function", - "owner": "prolly::AsyncHnswIndex", + "owner": "prolly::AsyncConflictIter", "member_kind": "inherent-item", - "family": "proximity-map", + "family": "core", "classification": "portable", "status": "planned", - "bucket": "reviewed_incomplete" + "bucket": "unreviewed_runtime_candidate" }, { - "rust": "prolly::AsyncHnswIndex::source_descriptor", + "rust": "prolly::AsyncConflictIter::next", "kind": "function", - "owner": "prolly::AsyncHnswIndex", + "owner": "prolly::AsyncConflictIter", "member_kind": "inherent-item", - "family": "proximity-map", + "family": "core", "classification": "portable", "status": "planned", - "bucket": "reviewed_incomplete" + "bucket": "unreviewed_runtime_candidate" }, { - "rust": "prolly::AsyncIoConfig", + "rust": "prolly::AsyncDiffIter", "kind": "struct", "owner": null, "member_kind": null, @@ -1292,837 +1571,647 @@ "bucket": "unreviewed_data_model" }, { - "rust": "prolly::AsyncIoConfig::max_buffered_bytes", - "kind": "struct_field", - "owner": "prolly::AsyncIoConfig", - "member_kind": "field", + "rust": "prolly::AsyncDiffIter::collect", + "kind": "function", + "owner": "prolly::AsyncDiffIter", + "member_kind": "inherent-item", "family": "core", "classification": "portable", "status": "planned", - "bucket": "unreviewed_data_model" + "bucket": "unreviewed_runtime_candidate" }, { - "rust": "prolly::AsyncIoConfig::max_in_flight_reads", - "kind": "struct_field", - "owner": "prolly::AsyncIoConfig", - "member_kind": "field", + "rust": "prolly::AsyncDiffIter::into_stream", + "kind": "function", + "owner": "prolly::AsyncDiffIter", + "member_kind": "inherent-item", "family": "core", "classification": "portable", "status": "planned", - "bucket": "unreviewed_data_model" + "bucket": "unreviewed_runtime_candidate" }, { - "rust": "prolly::AsyncIoConfig::prefetch_window", - "kind": "struct_field", - "owner": "prolly::AsyncIoConfig", - "member_kind": "field", + "rust": "prolly::AsyncDiffIter::next", + "kind": "function", + "owner": "prolly::AsyncDiffIter", + "member_kind": "inherent-item", "family": "core", "classification": "portable", "status": "planned", - "bucket": "unreviewed_data_model" - }, - { - "rust": "prolly::AsyncManifestStore", - "kind": "trait", - "owner": null, - "member_kind": null, - "family": "core", - "classification": "idiomatic", - "status": "implemented", - "bucket": "release_complete" - }, - { - "rust": "prolly::AsyncManifestStore::Error", - "kind": "assoc_type", - "owner": "prolly::AsyncManifestStore", - "member_kind": "trait-item", - "family": "core", - "classification": "rust-language-only", - "status": "implemented", - "bucket": "release_complete" - }, - { - "rust": "prolly::AsyncManifestStore::compare_and_swap_root", - "kind": "function", - "owner": "prolly::AsyncManifestStore", - "member_kind": "trait-item", - "family": "core", - "classification": "idiomatic", - "status": "implemented", - "bucket": "release_complete" - }, - { - "rust": "prolly::AsyncManifestStore::delete_root", - "kind": "function", - "owner": "prolly::AsyncManifestStore", - "member_kind": "trait-item", - "family": "core", - "classification": "idiomatic", - "status": "implemented", - "bucket": "release_complete" - }, - { - "rust": "prolly::AsyncManifestStore::get_root", - "kind": "function", - "owner": "prolly::AsyncManifestStore", - "member_kind": "trait-item", - "family": "core", - "classification": "idiomatic", - "status": "implemented", - "bucket": "release_complete" - }, - { - "rust": "prolly::AsyncManifestStore::put_root", - "kind": "function", - "owner": "prolly::AsyncManifestStore", - "member_kind": "trait-item", - "family": "core", - "classification": "idiomatic", - "status": "implemented", - "bucket": "release_complete" - }, - { - "rust": "prolly::AsyncManifestStoreScan", - "kind": "trait", - "owner": null, - "member_kind": null, - "family": "core", - "classification": "idiomatic", - "status": "implemented", - "bucket": "release_complete" - }, - { - "rust": "prolly::AsyncManifestStoreScan::list_roots", - "kind": "function", - "owner": "prolly::AsyncManifestStoreScan", - "member_kind": "trait-item", - "family": "core", - "classification": "idiomatic", - "status": "implemented", - "bucket": "release_complete" + "bucket": "unreviewed_runtime_candidate" }, { - "rust": "prolly::AsyncMapChangeSubscription", + "rust": "prolly::AsyncHnswBuild", "kind": "struct", "owner": null, "member_kind": null, - "family": "core", + "family": "proximity-map", "classification": "portable", "status": "planned", "bucket": "unreviewed_data_model" }, { - "rust": "prolly::AsyncMapChangeSubscription::last_seen", - "kind": "function", - "owner": "prolly::AsyncMapChangeSubscription", - "member_kind": "inherent-item", - "family": "core", + "rust": "prolly::AsyncHnswBuild::config", + "kind": "struct_field", + "owner": "prolly::AsyncHnswBuild", + "member_kind": "field", + "family": "proximity-map", "classification": "portable", "status": "planned", - "bucket": "unreviewed_runtime_candidate" + "bucket": "unreviewed_data_model" }, { - "rust": "prolly::AsyncMapChangeSubscription::poll", - "kind": "function", - "owner": "prolly::AsyncMapChangeSubscription", - "member_kind": "inherent-item", - "family": "core", + "rust": "prolly::AsyncHnswBuild::limits", + "kind": "struct_field", + "owner": "prolly::AsyncHnswBuild", + "member_kind": "field", + "family": "proximity-map", "classification": "portable", "status": "planned", - "bucket": "unreviewed_runtime_candidate" + "bucket": "unreviewed_data_model" }, { - "rust": "prolly::AsyncMapSnapshot", + "rust": "prolly::AsyncHnswIndex", "kind": "struct", "owner": null, "member_kind": null, - "family": "maintenance", + "family": "proximity-map", "classification": "portable", "status": "planned", "bucket": "unreviewed_data_model" }, { - "rust": "prolly::AsyncMapSnapshot::get", + "rust": "prolly::AsyncHnswIndex::config", "kind": "function", - "owner": "prolly::AsyncMapSnapshot", + "owner": "prolly::AsyncHnswIndex", "member_kind": "inherent-item", - "family": "maintenance", + "family": "proximity-map", "classification": "portable", "status": "planned", "bucket": "reviewed_incomplete" }, { - "rust": "prolly::AsyncMapSnapshot::get_many", + "rust": "prolly::AsyncHnswIndex::is_canonical", "kind": "function", - "owner": "prolly::AsyncMapSnapshot", + "owner": "prolly::AsyncHnswIndex", "member_kind": "inherent-item", - "family": "maintenance", + "family": "proximity-map", "classification": "portable", "status": "planned", "bucket": "reviewed_incomplete" }, { - "rust": "prolly::AsyncMapSnapshot::prefix", + "rust": "prolly::AsyncHnswIndex::load", "kind": "function", - "owner": "prolly::AsyncMapSnapshot", + "owner": "prolly::AsyncHnswIndex", "member_kind": "inherent-item", - "family": "maintenance", + "family": "proximity-map", "classification": "portable", "status": "planned", "bucket": "reviewed_incomplete" }, { - "rust": "prolly::AsyncMapSnapshot::prefix_page", + "rust": "prolly::AsyncHnswIndex::manifest_cid", "kind": "function", - "owner": "prolly::AsyncMapSnapshot", + "owner": "prolly::AsyncHnswIndex", "member_kind": "inherent-item", - "family": "maintenance", + "family": "proximity-map", "classification": "portable", "status": "planned", "bucket": "reviewed_incomplete" }, { - "rust": "prolly::AsyncMapSnapshot::prove_key", + "rust": "prolly::AsyncHnswIndex::source_descriptor", "kind": "function", - "owner": "prolly::AsyncMapSnapshot", + "owner": "prolly::AsyncHnswIndex", "member_kind": "inherent-item", - "family": "maintenance", + "family": "proximity-map", "classification": "portable", "status": "planned", "bucket": "reviewed_incomplete" }, { - "rust": "prolly::AsyncMapSnapshot::prove_keys", - "kind": "function", - "owner": "prolly::AsyncMapSnapshot", - "member_kind": "inherent-item", - "family": "maintenance", + "rust": "prolly::AsyncIndexedMap", + "kind": "struct", + "owner": null, + "member_kind": null, + "family": "indexed-map", "classification": "portable", "status": "planned", - "bucket": "reviewed_incomplete" + "bucket": "unreviewed_data_model" }, { - "rust": "prolly::AsyncMapSnapshot::prove_prefix", + "rust": "prolly::AsyncIndexedMap::apply", "kind": "function", - "owner": "prolly::AsyncMapSnapshot", + "owner": "prolly::AsyncIndexedMap", "member_kind": "inherent-item", - "family": "maintenance", + "family": "indexed-map", "classification": "portable", "status": "planned", - "bucket": "reviewed_incomplete" + "bucket": "unreviewed_runtime_candidate" }, { - "rust": "prolly::AsyncMapSnapshot::prove_range", + "rust": "prolly::AsyncIndexedMap::apply_if", "kind": "function", - "owner": "prolly::AsyncMapSnapshot", + "owner": "prolly::AsyncIndexedMap", "member_kind": "inherent-item", - "family": "maintenance", + "family": "indexed-map", "classification": "portable", "status": "planned", - "bucket": "reviewed_incomplete" + "bucket": "unreviewed_runtime_candidate" }, { - "rust": "prolly::AsyncMapSnapshot::range", + "rust": "prolly::AsyncIndexedMap::apply_with_budget", "kind": "function", - "owner": "prolly::AsyncMapSnapshot", + "owner": "prolly::AsyncIndexedMap", "member_kind": "inherent-item", - "family": "maintenance", + "family": "indexed-map", "classification": "portable", "status": "planned", - "bucket": "reviewed_incomplete" + "bucket": "unreviewed_runtime_candidate" }, { - "rust": "prolly::AsyncMapSnapshot::range_page", + "rust": "prolly::AsyncIndexedMap::deactivate_index", "kind": "function", - "owner": "prolly::AsyncMapSnapshot", + "owner": "prolly::AsyncIndexedMap", "member_kind": "inherent-item", - "family": "maintenance", + "family": "indexed-map", "classification": "portable", "status": "planned", - "bucket": "reviewed_incomplete" + "bucket": "unreviewed_runtime_candidate" }, { - "rust": "prolly::AsyncMapSnapshot::stats", + "rust": "prolly::AsyncIndexedMap::delete", "kind": "function", - "owner": "prolly::AsyncMapSnapshot", + "owner": "prolly::AsyncIndexedMap", "member_kind": "inherent-item", - "family": "maintenance", + "family": "indexed-map", "classification": "portable", "status": "planned", - "bucket": "reviewed_incomplete" + "bucket": "unreviewed_runtime_candidate" }, { - "rust": "prolly::AsyncMapSnapshot::tree", + "rust": "prolly::AsyncIndexedMap::edit", "kind": "function", - "owner": "prolly::AsyncMapSnapshot", + "owner": "prolly::AsyncIndexedMap", "member_kind": "inherent-item", - "family": "maintenance", + "family": "indexed-map", "classification": "portable", "status": "planned", - "bucket": "reviewed_incomplete" + "bucket": "unreviewed_runtime_candidate" }, { - "rust": "prolly::AsyncMapSnapshot::version", + "rust": "prolly::AsyncIndexedMap::ensure_index", "kind": "function", - "owner": "prolly::AsyncMapSnapshot", + "owner": "prolly::AsyncIndexedMap", "member_kind": "inherent-item", - "family": "maintenance", - "classification": "portable", - "status": "planned", - "bucket": "reviewed_incomplete" - }, - { - "rust": "prolly::AsyncProductQuantizer", - "kind": "struct", - "owner": null, - "member_kind": null, - "family": "proximity-map", + "family": "indexed-map", "classification": "portable", "status": "planned", - "bucket": "unreviewed_data_model" + "bucket": "unreviewed_runtime_candidate" }, { - "rust": "prolly::AsyncProductQuantizer::config", + "rust": "prolly::AsyncIndexedMap::ensure_index_with_budget", "kind": "function", - "owner": "prolly::AsyncProductQuantizer", + "owner": "prolly::AsyncIndexedMap", "member_kind": "inherent-item", - "family": "proximity-map", + "family": "indexed-map", "classification": "portable", "status": "planned", - "bucket": "reviewed_incomplete" + "bucket": "unreviewed_runtime_candidate" }, { - "rust": "prolly::AsyncProductQuantizer::load", + "rust": "prolly::AsyncIndexedMap::get", "kind": "function", - "owner": "prolly::AsyncProductQuantizer", + "owner": "prolly::AsyncIndexedMap", "member_kind": "inherent-item", - "family": "proximity-map", + "family": "indexed-map", "classification": "portable", "status": "planned", - "bucket": "reviewed_incomplete" + "bucket": "unreviewed_runtime_candidate" }, { - "rust": "prolly::AsyncProductQuantizer::manifest_cid", + "rust": "prolly::AsyncIndexedMap::health", "kind": "function", - "owner": "prolly::AsyncProductQuantizer", + "owner": "prolly::AsyncIndexedMap", "member_kind": "inherent-item", - "family": "proximity-map", + "family": "indexed-map", "classification": "portable", "status": "planned", - "bucket": "reviewed_incomplete" + "bucket": "unreviewed_runtime_candidate" }, { - "rust": "prolly::AsyncProductQuantizer::quality", + "rust": "prolly::AsyncIndexedMap::id", "kind": "function", - "owner": "prolly::AsyncProductQuantizer", + "owner": "prolly::AsyncIndexedMap", "member_kind": "inherent-item", - "family": "proximity-map", + "family": "indexed-map", "classification": "portable", "status": "planned", - "bucket": "reviewed_incomplete" + "bucket": "unreviewed_runtime_candidate" }, { - "rust": "prolly::AsyncProductQuantizer::source_descriptor", + "rust": "prolly::AsyncIndexedMap::keep_last", "kind": "function", - "owner": "prolly::AsyncProductQuantizer", + "owner": "prolly::AsyncIndexedMap", "member_kind": "inherent-item", - "family": "proximity-map", + "family": "indexed-map", "classification": "portable", "status": "planned", - "bucket": "reviewed_incomplete" + "bucket": "unreviewed_runtime_candidate" }, { - "rust": "prolly::AsyncProlly", - "kind": "type_alias", - "owner": null, - "member_kind": null, - "family": "core", + "rust": "prolly::AsyncIndexedMap::metrics", + "kind": "function", + "owner": "prolly::AsyncIndexedMap", + "member_kind": "inherent-item", + "family": "indexed-map", "classification": "portable", "status": "planned", - "bucket": "unreviewed_rust_abstraction" + "bucket": "unreviewed_runtime_candidate" }, { - "rust": "prolly::AsyncProllyTransaction", - "kind": "struct", - "owner": null, - "member_kind": null, - "family": "core", + "rust": "prolly::AsyncIndexedMap::prepare_apply_at_snapshot_with_budget", + "kind": "function", + "owner": "prolly::AsyncIndexedMap", + "member_kind": "inherent-item", + "family": "indexed-map", "classification": "portable", "status": "planned", - "bucket": "unreviewed_data_model" + "bucket": "unreviewed_runtime_candidate" }, { - "rust": "prolly::AsyncProllyTransaction::batch", + "rust": "prolly::AsyncIndexedMap::prepare_apply_with_budget", "kind": "function", - "owner": "prolly::AsyncProllyTransaction", + "owner": "prolly::AsyncIndexedMap", "member_kind": "inherent-item", - "family": "core", + "family": "indexed-map", "classification": "portable", "status": "planned", "bucket": "unreviewed_runtime_candidate" }, { - "rust": "prolly::AsyncProllyTransaction::commit", + "rust": "prolly::AsyncIndexedMap::prepare_rebuild_from_source", "kind": "function", - "owner": "prolly::AsyncProllyTransaction", + "owner": "prolly::AsyncIndexedMap", "member_kind": "inherent-item", - "family": "core", + "family": "indexed-map", "classification": "portable", "status": "planned", "bucket": "unreviewed_runtime_candidate" }, { - "rust": "prolly::AsyncProllyTransaction::compare_and_swap_named_root", + "rust": "prolly::AsyncIndexedMap::prepare_rebuild_from_source_at", "kind": "function", - "owner": "prolly::AsyncProllyTransaction", + "owner": "prolly::AsyncIndexedMap", "member_kind": "inherent-item", - "family": "core", + "family": "indexed-map", "classification": "portable", "status": "planned", "bucket": "unreviewed_runtime_candidate" }, { - "rust": "prolly::AsyncProllyTransaction::create", + "rust": "prolly::AsyncIndexedMap::prepare_remove_snapshot_ids", "kind": "function", - "owner": "prolly::AsyncProllyTransaction", + "owner": "prolly::AsyncIndexedMap", "member_kind": "inherent-item", - "family": "core", + "family": "indexed-map", "classification": "portable", "status": "planned", "bucket": "unreviewed_runtime_candidate" }, { - "rust": "prolly::AsyncProllyTransaction::delete", + "rust": "prolly::AsyncIndexedMap::prepare_remove_snapshots", "kind": "function", - "owner": "prolly::AsyncProllyTransaction", + "owner": "prolly::AsyncIndexedMap", "member_kind": "inherent-item", - "family": "core", + "family": "indexed-map", "classification": "portable", "status": "planned", "bucket": "unreviewed_runtime_candidate" }, { - "rust": "prolly::AsyncProllyTransaction::delete_named_root", + "rust": "prolly::AsyncIndexedMap::prepare_restore", "kind": "function", - "owner": "prolly::AsyncProllyTransaction", + "owner": "prolly::AsyncIndexedMap", "member_kind": "inherent-item", - "family": "core", + "family": "indexed-map", "classification": "portable", "status": "planned", "bucket": "unreviewed_runtime_candidate" }, { - "rust": "prolly::AsyncProllyTransaction::get", + "rust": "prolly::AsyncIndexedMap::prepare_restore_manifest", "kind": "function", - "owner": "prolly::AsyncProllyTransaction", + "owner": "prolly::AsyncIndexedMap", "member_kind": "inherent-item", - "family": "core", + "family": "indexed-map", "classification": "portable", "status": "planned", "bucket": "unreviewed_runtime_candidate" }, { - "rust": "prolly::AsyncProllyTransaction::load_named_root", + "rust": "prolly::AsyncIndexedMap::prepare_restore_snapshot", "kind": "function", - "owner": "prolly::AsyncProllyTransaction", + "owner": "prolly::AsyncIndexedMap", "member_kind": "inherent-item", - "family": "core", + "family": "indexed-map", "classification": "portable", "status": "planned", "bucket": "unreviewed_runtime_candidate" }, { - "rust": "prolly::AsyncProllyTransaction::publish_named_root", + "rust": "prolly::AsyncIndexedMap::put", "kind": "function", - "owner": "prolly::AsyncProllyTransaction", + "owner": "prolly::AsyncIndexedMap", "member_kind": "inherent-item", - "family": "core", + "family": "indexed-map", "classification": "portable", "status": "planned", "bucket": "unreviewed_runtime_candidate" }, { - "rust": "prolly::AsyncProllyTransaction::publish_named_root_at_millis", + "rust": "prolly::AsyncIndexedMap::registry", "kind": "function", - "owner": "prolly::AsyncProllyTransaction", + "owner": "prolly::AsyncIndexedMap", "member_kind": "inherent-item", - "family": "core", + "family": "indexed-map", "classification": "portable", "status": "planned", "bucket": "unreviewed_runtime_candidate" }, { - "rust": "prolly::AsyncProllyTransaction::put", + "rust": "prolly::AsyncIndexedMap::release_snapshot_pin", "kind": "function", - "owner": "prolly::AsyncProllyTransaction", + "owner": "prolly::AsyncIndexedMap", "member_kind": "inherent-item", - "family": "core", + "family": "indexed-map", "classification": "portable", "status": "planned", "bucket": "unreviewed_runtime_candidate" }, { - "rust": "prolly::AsyncProllyTransaction::rollback", + "rust": "prolly::AsyncIndexedMap::repair_index", "kind": "function", - "owner": "prolly::AsyncProllyTransaction", + "owner": "prolly::AsyncIndexedMap", "member_kind": "inherent-item", - "family": "core", + "family": "indexed-map", "classification": "portable", "status": "planned", "bucket": "unreviewed_runtime_candidate" }, { - "rust": "prolly::AsyncProximityMap", - "kind": "struct", - "owner": null, - "member_kind": null, - "family": "proximity-map", + "rust": "prolly::AsyncIndexedMap::repair_index_with_budget", + "kind": "function", + "owner": "prolly::AsyncIndexedMap", + "member_kind": "inherent-item", + "family": "indexed-map", "classification": "portable", "status": "planned", - "bucket": "unreviewed_data_model" + "bucket": "unreviewed_runtime_candidate" }, { - "rust": "prolly::AsyncProximityMap::load", + "rust": "prolly::AsyncIndexedMap::replace_index", "kind": "function", - "owner": "prolly::AsyncProximityMap", + "owner": "prolly::AsyncIndexedMap", "member_kind": "inherent-item", - "family": "proximity-map", + "family": "indexed-map", "classification": "portable", "status": "planned", - "bucket": "reviewed_incomplete" + "bucket": "unreviewed_runtime_candidate" }, { - "rust": "prolly::AsyncProximityMap::search", + "rust": "prolly::AsyncIndexedMap::retain_snapshot_pin", "kind": "function", - "owner": "prolly::AsyncProximityMap", + "owner": "prolly::AsyncIndexedMap", "member_kind": "inherent-item", - "family": "proximity-map", + "family": "indexed-map", "classification": "portable", "status": "planned", - "bucket": "reviewed_incomplete" + "bucket": "unreviewed_runtime_candidate" }, { - "rust": "prolly::AsyncProximityMap::search_with_accelerators", + "rust": "prolly::AsyncIndexedMap::snapshot", "kind": "function", - "owner": "prolly::AsyncProximityMap", + "owner": "prolly::AsyncIndexedMap", "member_kind": "inherent-item", - "family": "proximity-map", + "family": "indexed-map", "classification": "portable", "status": "planned", - "bucket": "reviewed_incomplete" + "bucket": "unreviewed_runtime_candidate" }, { - "rust": "prolly::AsyncProximityMap::search_with_runtime", + "rust": "prolly::AsyncIndexedMap::snapshot_at", "kind": "function", - "owner": "prolly::AsyncProximityMap", + "owner": "prolly::AsyncIndexedMap", "member_kind": "inherent-item", - "family": "proximity-map", + "family": "indexed-map", "classification": "portable", "status": "planned", - "bucket": "reviewed_incomplete" + "bucket": "unreviewed_runtime_candidate" }, { - "rust": "prolly::AsyncProximityMap::tree", + "rust": "prolly::AsyncIndexedMap::snapshot_by_id", "kind": "function", - "owner": "prolly::AsyncProximityMap", + "owner": "prolly::AsyncIndexedMap", "member_kind": "inherent-item", - "family": "proximity-map", + "family": "indexed-map", "classification": "portable", "status": "planned", - "bucket": "reviewed_incomplete" + "bucket": "unreviewed_runtime_candidate" }, { - "rust": "prolly::AsyncRangeIter", - "kind": "struct", - "owner": null, - "member_kind": null, - "family": "core", + "rust": "prolly::AsyncIndexedMap::snapshot_from_manifest", + "kind": "function", + "owner": "prolly::AsyncIndexedMap", + "member_kind": "inherent-item", + "family": "indexed-map", "classification": "portable", "status": "planned", - "bucket": "unreviewed_data_model" + "bucket": "unreviewed_runtime_candidate" }, { - "rust": "prolly::AsyncRangeIter::collect", + "rust": "prolly::AsyncIndexedMap::source", "kind": "function", - "owner": "prolly::AsyncRangeIter", + "owner": "prolly::AsyncIndexedMap", "member_kind": "inherent-item", - "family": "core", + "family": "indexed-map", "classification": "portable", "status": "planned", "bucket": "unreviewed_runtime_candidate" }, { - "rust": "prolly::AsyncRangeIter::into_stream", + "rust": "prolly::AsyncIndexedMap::verify_all", "kind": "function", - "owner": "prolly::AsyncRangeIter", + "owner": "prolly::AsyncIndexedMap", "member_kind": "inherent-item", - "family": "core", + "family": "indexed-map", "classification": "portable", "status": "planned", "bucket": "unreviewed_runtime_candidate" }, { - "rust": "prolly::AsyncRangeIter::next", + "rust": "prolly::AsyncIndexedMap::verify_all_with_budget", "kind": "function", - "owner": "prolly::AsyncRangeIter", + "owner": "prolly::AsyncIndexedMap", "member_kind": "inherent-item", - "family": "core", + "family": "indexed-map", "classification": "portable", "status": "planned", "bucket": "unreviewed_runtime_candidate" }, { - "rust": "prolly::AsyncRangeIter::next_with", + "rust": "prolly::AsyncIndexedMap::verify_index", "kind": "function", - "owner": "prolly::AsyncRangeIter", + "owner": "prolly::AsyncIndexedMap", "member_kind": "inherent-item", - "family": "core", + "family": "indexed-map", "classification": "portable", "status": "planned", "bucket": "unreviewed_runtime_candidate" }, { - "rust": "prolly::AsyncRangeIter::resume_cursor", + "rust": "prolly::AsyncIndexedMap::verify_index_with_budget", "kind": "function", - "owner": "prolly::AsyncRangeIter", + "owner": "prolly::AsyncIndexedMap", "member_kind": "inherent-item", - "family": "session", - "classification": "idiomatic", - "status": "implemented", - "bucket": "release_complete" - }, - { - "rust": "prolly::AsyncRangePage", - "kind": "type_alias", - "owner": null, - "member_kind": null, - "family": "core", - "classification": "idiomatic", - "status": "implemented", - "bucket": "release_complete" + "family": "indexed-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" }, { - "rust": "prolly::AsyncReadSession", + "rust": "prolly::AsyncIndexedSnapshot", "kind": "struct", "owner": null, "member_kind": null, - "family": "session", + "family": "indexed-map", "classification": "portable", "status": "planned", "bucket": "unreviewed_data_model" }, { - "rust": "prolly::AsyncReadSession::first_entry_with", + "rust": "prolly::AsyncIndexedSnapshot::id", "kind": "function", - "owner": "prolly::AsyncReadSession", + "owner": "prolly::AsyncIndexedSnapshot", "member_kind": "inherent-item", - "family": "session", + "family": "indexed-map", "classification": "portable", "status": "planned", "bucket": "unreviewed_runtime_candidate" }, { - "rust": "prolly::AsyncReadSession::get_many_with", + "rust": "prolly::AsyncIndexedSnapshot::index", "kind": "function", - "owner": "prolly::AsyncReadSession", + "owner": "prolly::AsyncIndexedSnapshot", "member_kind": "inherent-item", - "family": "session", + "family": "indexed-map", "classification": "portable", "status": "planned", - "bucket": "reviewed_incomplete" + "bucket": "unreviewed_runtime_candidate" }, { - "rust": "prolly::AsyncReadSession::get_value_ref_with", + "rust": "prolly::AsyncIndexedSnapshot::indexes", "kind": "function", - "owner": "prolly::AsyncReadSession", + "owner": "prolly::AsyncIndexedSnapshot", "member_kind": "inherent-item", - "family": "session", + "family": "indexed-map", "classification": "portable", "status": "planned", - "bucket": "reviewed_incomplete" + "bucket": "unreviewed_runtime_candidate" }, { - "rust": "prolly::AsyncReadSession::get_with", + "rust": "prolly::AsyncIndexedSnapshot::source_tree", "kind": "function", - "owner": "prolly::AsyncReadSession", + "owner": "prolly::AsyncIndexedSnapshot", "member_kind": "inherent-item", - "family": "session", + "family": "indexed-map", "classification": "portable", "status": "planned", - "bucket": "reviewed_incomplete" + "bucket": "unreviewed_runtime_candidate" }, { - "rust": "prolly::AsyncReadSession::is_empty", + "rust": "prolly::AsyncIndexedSnapshot::source_version", "kind": "function", - "owner": "prolly::AsyncReadSession", + "owner": "prolly::AsyncIndexedSnapshot", "member_kind": "inherent-item", - "family": "session", + "family": "indexed-map", "classification": "portable", "status": "planned", "bucket": "unreviewed_runtime_candidate" }, { - "rust": "prolly::AsyncReadSession::last_entry_with", + "rust": "prolly::AsyncIndexedSnapshot::state_tree", "kind": "function", - "owner": "prolly::AsyncReadSession", + "owner": "prolly::AsyncIndexedSnapshot", "member_kind": "inherent-item", - "family": "session", + "family": "indexed-map", "classification": "portable", "status": "planned", "bucket": "unreviewed_runtime_candidate" }, { - "rust": "prolly::AsyncReadSession::len", + "rust": "prolly::AsyncIndexedSnapshot::state_version", "kind": "function", - "owner": "prolly::AsyncReadSession", + "owner": "prolly::AsyncIndexedSnapshot", "member_kind": "inherent-item", - "family": "session", + "family": "indexed-map", "classification": "portable", "status": "planned", "bucket": "unreviewed_runtime_candidate" }, { - "rust": "prolly::AsyncReadSession::lower_bound_with", + "rust": "prolly::AsyncIndexedSourceView", + "kind": "struct", + "owner": null, + "member_kind": null, + "family": "indexed-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, + { + "rust": "prolly::AsyncIndexedSourceView::get", "kind": "function", - "owner": "prolly::AsyncReadSession", + "owner": "prolly::AsyncIndexedSourceView", "member_kind": "inherent-item", - "family": "session", + "family": "indexed-map", "classification": "portable", "status": "planned", "bucket": "unreviewed_runtime_candidate" }, { - "rust": "prolly::AsyncReadSession::rank", - "kind": "function", - "owner": "prolly::AsyncReadSession", - "member_kind": "inherent-item", - "family": "session", - "classification": "portable", - "status": "planned", - "bucket": "unreviewed_runtime_candidate" - }, - { - "rust": "prolly::AsyncReadSession::scan_prefix", - "kind": "function", - "owner": "prolly::AsyncReadSession", - "member_kind": "inherent-item", - "family": "session", - "classification": "portable", - "status": "planned", - "bucket": "reviewed_incomplete" - }, - { - "rust": "prolly::AsyncReadSession::scan_prefix_reverse", - "kind": "function", - "owner": "prolly::AsyncReadSession", - "member_kind": "inherent-item", - "family": "session", - "classification": "portable", - "status": "planned", - "bucket": "reviewed_incomplete" - }, - { - "rust": "prolly::AsyncReadSession::scan_prefix_reverse_until", - "kind": "function", - "owner": "prolly::AsyncReadSession", - "member_kind": "inherent-item", - "family": "session", - "classification": "portable", - "status": "planned", - "bucket": "reviewed_incomplete" - }, - { - "rust": "prolly::AsyncReadSession::scan_prefix_until", - "kind": "function", - "owner": "prolly::AsyncReadSession", - "member_kind": "inherent-item", - "family": "session", - "classification": "portable", - "status": "planned", - "bucket": "reviewed_incomplete" - }, - { - "rust": "prolly::AsyncReadSession::scan_range", - "kind": "function", - "owner": "prolly::AsyncReadSession", - "member_kind": "inherent-item", - "family": "session", - "classification": "portable", - "status": "planned", - "bucket": "reviewed_incomplete" - }, - { - "rust": "prolly::AsyncReadSession::scan_range_reverse", - "kind": "function", - "owner": "prolly::AsyncReadSession", - "member_kind": "inherent-item", - "family": "session", - "classification": "portable", - "status": "planned", - "bucket": "reviewed_incomplete" - }, - { - "rust": "prolly::AsyncReadSession::scan_range_reverse_until", - "kind": "function", - "owner": "prolly::AsyncReadSession", - "member_kind": "inherent-item", - "family": "session", - "classification": "portable", - "status": "planned", - "bucket": "reviewed_incomplete" - }, - { - "rust": "prolly::AsyncReadSession::scan_range_until", - "kind": "function", - "owner": "prolly::AsyncReadSession", - "member_kind": "inherent-item", - "family": "session", - "classification": "portable", - "status": "planned", - "bucket": "reviewed_incomplete" - }, - { - "rust": "prolly::AsyncReadSession::select_with", + "rust": "prolly::AsyncIndexedSourceView::head", "kind": "function", - "owner": "prolly::AsyncReadSession", + "owner": "prolly::AsyncIndexedSourceView", "member_kind": "inherent-item", - "family": "session", + "family": "indexed-map", "classification": "portable", "status": "planned", "bucket": "unreviewed_runtime_candidate" }, { - "rust": "prolly::AsyncReadSession::tree", - "kind": "function", - "owner": "prolly::AsyncReadSession", - "member_kind": "inherent-item", - "family": "session", + "rust": "prolly::AsyncIndexedStore", + "kind": "trait", + "owner": null, + "member_kind": null, + "family": "indexed-map", "classification": "portable", "status": "planned", - "bucket": "reviewed_incomplete" + "bucket": "unreviewed_rust_abstraction" }, { - "rust": "prolly::AsyncReadSession::upper_bound_with", + "rust": "prolly::AsyncIndexedStore::confirm_async_indexed_publication", "kind": "function", - "owner": "prolly::AsyncReadSession", - "member_kind": "inherent-item", - "family": "session", + "owner": "prolly::AsyncIndexedStore", + "member_kind": "trait-item", + "family": "indexed-map", "classification": "portable", "status": "planned", - "bucket": "unreviewed_runtime_candidate" - }, - { - "rust": "prolly::AsyncReversePage", - "kind": "type_alias", - "owner": null, - "member_kind": null, - "family": "core", - "classification": "idiomatic", - "status": "implemented", - "bucket": "release_complete" + "bucket": "unreviewed_rust_abstraction" }, { - "rust": "prolly::AsyncSearchControl", + "rust": "prolly::AsyncIoConfig", "kind": "struct", "owner": null, "member_kind": null, @@ -2132,9 +2221,9 @@ "bucket": "unreviewed_data_model" }, { - "rust": "prolly::AsyncSearchControl::cancellation", + "rust": "prolly::AsyncIoConfig::max_buffered_bytes", "kind": "struct_field", - "owner": "prolly::AsyncSearchControl", + "owner": "prolly::AsyncIoConfig", "member_kind": "field", "family": "core", "classification": "portable", @@ -2142,9 +2231,9 @@ "bucket": "unreviewed_data_model" }, { - "rust": "prolly::AsyncSearchControl::deadline", + "rust": "prolly::AsyncIoConfig::max_in_flight_reads", "kind": "struct_field", - "owner": "prolly::AsyncSearchControl", + "owner": "prolly::AsyncIoConfig", "member_kind": "field", "family": "core", "classification": "portable", @@ -2152,9 +2241,9 @@ "bucket": "unreviewed_data_model" }, { - "rust": "prolly::AsyncSearchControl::io", + "rust": "prolly::AsyncIoConfig::prefetch_window", "kind": "struct_field", - "owner": "prolly::AsyncSearchControl", + "owner": "prolly::AsyncIoConfig", "member_kind": "field", "family": "core", "classification": "portable", @@ -2162,47 +2251,7 @@ "bucket": "unreviewed_data_model" }, { - "rust": "prolly::AsyncSortedBatchBuilder", - "kind": "struct", - "owner": null, - "member_kind": null, - "family": "core", - "classification": "portable", - "status": "planned", - "bucket": "unreviewed_data_model" - }, - { - "rust": "prolly::AsyncSortedBatchBuilder::add", - "kind": "function", - "owner": "prolly::AsyncSortedBatchBuilder", - "member_kind": "inherent-item", - "family": "core", - "classification": "portable", - "status": "planned", - "bucket": "unreviewed_runtime_candidate" - }, - { - "rust": "prolly::AsyncSortedBatchBuilder::build", - "kind": "function", - "owner": "prolly::AsyncSortedBatchBuilder", - "member_kind": "inherent-item", - "family": "core", - "classification": "portable", - "status": "planned", - "bucket": "unreviewed_runtime_candidate" - }, - { - "rust": "prolly::AsyncSortedBatchBuilder::new", - "kind": "function", - "owner": "prolly::AsyncSortedBatchBuilder", - "member_kind": "inherent-item", - "family": "core", - "classification": "portable", - "status": "planned", - "bucket": "unreviewed_runtime_candidate" - }, - { - "rust": "prolly::AsyncStore", + "rust": "prolly::AsyncManifestStore", "kind": "trait", "owner": null, "member_kind": null, @@ -2212,9 +2261,9 @@ "bucket": "release_complete" }, { - "rust": "prolly::AsyncStore::Error", + "rust": "prolly::AsyncManifestStore::Error", "kind": "assoc_type", - "owner": "prolly::AsyncStore", + "owner": "prolly::AsyncManifestStore", "member_kind": "trait-item", "family": "core", "classification": "rust-language-only", @@ -2222,9 +2271,9 @@ "bucket": "release_complete" }, { - "rust": "prolly::AsyncStore::batch", + "rust": "prolly::AsyncManifestStore::compare_and_swap_root", "kind": "function", - "owner": "prolly::AsyncStore", + "owner": "prolly::AsyncManifestStore", "member_kind": "trait-item", "family": "core", "classification": "idiomatic", @@ -2232,9 +2281,9 @@ "bucket": "release_complete" }, { - "rust": "prolly::AsyncStore::batch_get", + "rust": "prolly::AsyncManifestStore::delete_root", "kind": "function", - "owner": "prolly::AsyncStore", + "owner": "prolly::AsyncManifestStore", "member_kind": "trait-item", "family": "core", "classification": "idiomatic", @@ -2242,9 +2291,9 @@ "bucket": "release_complete" }, { - "rust": "prolly::AsyncStore::batch_get_ordered", + "rust": "prolly::AsyncManifestStore::get_root", "kind": "function", - "owner": "prolly::AsyncStore", + "owner": "prolly::AsyncManifestStore", "member_kind": "trait-item", "family": "core", "classification": "idiomatic", @@ -2252,19 +2301,19 @@ "bucket": "release_complete" }, { - "rust": "prolly::AsyncStore::batch_get_ordered_unique", + "rust": "prolly::AsyncManifestStore::get_roots_ordered", "kind": "function", - "owner": "prolly::AsyncStore", + "owner": "prolly::AsyncManifestStore", "member_kind": "trait-item", "family": "core", - "classification": "idiomatic", - "status": "implemented", - "bucket": "release_complete" + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_rust_abstraction" }, { - "rust": "prolly::AsyncStore::batch_get_shared_ordered_unique", + "rust": "prolly::AsyncManifestStore::put_root", "kind": "function", - "owner": "prolly::AsyncStore", + "owner": "prolly::AsyncManifestStore", "member_kind": "trait-item", "family": "core", "classification": "idiomatic", @@ -2272,19 +2321,19 @@ "bucket": "release_complete" }, { - "rust": "prolly::AsyncStore::batch_put", - "kind": "function", - "owner": "prolly::AsyncStore", - "member_kind": "trait-item", + "rust": "prolly::AsyncManifestStoreScan", + "kind": "trait", + "owner": null, + "member_kind": null, "family": "core", "classification": "idiomatic", "status": "implemented", "bucket": "release_complete" }, { - "rust": "prolly::AsyncStore::batch_put_with_hint", + "rust": "prolly::AsyncManifestStoreScan::list_roots", "kind": "function", - "owner": "prolly::AsyncStore", + "owner": "prolly::AsyncManifestStoreScan", "member_kind": "trait-item", "family": "core", "classification": "idiomatic", @@ -2292,37 +2341,2137 @@ "bucket": "release_complete" }, { - "rust": "prolly::AsyncStore::delete", + "rust": "prolly::AsyncManifestStoreScan::list_roots_page", "kind": "function", - "owner": "prolly::AsyncStore", + "owner": "prolly::AsyncManifestStoreScan", "member_kind": "trait-item", "family": "core", - "classification": "idiomatic", - "status": "implemented", - "bucket": "release_complete" + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_rust_abstraction" }, { - "rust": "prolly::AsyncStore::get", - "kind": "function", - "owner": "prolly::AsyncStore", - "member_kind": "trait-item", + "rust": "prolly::AsyncMapChangeSubscription", + "kind": "struct", + "owner": null, + "member_kind": null, "family": "core", - "classification": "idiomatic", - "status": "implemented", - "bucket": "release_complete" + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" }, { - "rust": "prolly::AsyncStore::get_hint", + "rust": "prolly::AsyncMapChangeSubscription::last_seen", "kind": "function", - "owner": "prolly::AsyncStore", - "member_kind": "trait-item", + "owner": "prolly::AsyncMapChangeSubscription", + "member_kind": "inherent-item", "family": "core", - "classification": "idiomatic", - "status": "implemented", - "bucket": "release_complete" + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" }, { - "rust": "prolly::AsyncStore::get_shared", + "rust": "prolly::AsyncMapChangeSubscription::poll", + "kind": "function", + "owner": "prolly::AsyncMapChangeSubscription", + "member_kind": "inherent-item", + "family": "core", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncMapSnapshot", + "kind": "struct", + "owner": null, + "member_kind": null, + "family": "maintenance", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, + { + "rust": "prolly::AsyncMapSnapshot::get", + "kind": "function", + "owner": "prolly::AsyncMapSnapshot", + "member_kind": "inherent-item", + "family": "maintenance", + "classification": "portable", + "status": "planned", + "bucket": "reviewed_incomplete" + }, + { + "rust": "prolly::AsyncMapSnapshot::get_large_value", + "kind": "function", + "owner": "prolly::AsyncMapSnapshot", + "member_kind": "inherent-item", + "family": "maintenance", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncMapSnapshot::get_many", + "kind": "function", + "owner": "prolly::AsyncMapSnapshot", + "member_kind": "inherent-item", + "family": "maintenance", + "classification": "portable", + "status": "planned", + "bucket": "reviewed_incomplete" + }, + { + "rust": "prolly::AsyncMapSnapshot::prefix", + "kind": "function", + "owner": "prolly::AsyncMapSnapshot", + "member_kind": "inherent-item", + "family": "maintenance", + "classification": "portable", + "status": "planned", + "bucket": "reviewed_incomplete" + }, + { + "rust": "prolly::AsyncMapSnapshot::prefix_page", + "kind": "function", + "owner": "prolly::AsyncMapSnapshot", + "member_kind": "inherent-item", + "family": "maintenance", + "classification": "portable", + "status": "planned", + "bucket": "reviewed_incomplete" + }, + { + "rust": "prolly::AsyncMapSnapshot::prove_key", + "kind": "function", + "owner": "prolly::AsyncMapSnapshot", + "member_kind": "inherent-item", + "family": "maintenance", + "classification": "portable", + "status": "planned", + "bucket": "reviewed_incomplete" + }, + { + "rust": "prolly::AsyncMapSnapshot::prove_keys", + "kind": "function", + "owner": "prolly::AsyncMapSnapshot", + "member_kind": "inherent-item", + "family": "maintenance", + "classification": "portable", + "status": "planned", + "bucket": "reviewed_incomplete" + }, + { + "rust": "prolly::AsyncMapSnapshot::prove_prefix", + "kind": "function", + "owner": "prolly::AsyncMapSnapshot", + "member_kind": "inherent-item", + "family": "maintenance", + "classification": "portable", + "status": "planned", + "bucket": "reviewed_incomplete" + }, + { + "rust": "prolly::AsyncMapSnapshot::prove_range", + "kind": "function", + "owner": "prolly::AsyncMapSnapshot", + "member_kind": "inherent-item", + "family": "maintenance", + "classification": "portable", + "status": "planned", + "bucket": "reviewed_incomplete" + }, + { + "rust": "prolly::AsyncMapSnapshot::range", + "kind": "function", + "owner": "prolly::AsyncMapSnapshot", + "member_kind": "inherent-item", + "family": "maintenance", + "classification": "portable", + "status": "planned", + "bucket": "reviewed_incomplete" + }, + { + "rust": "prolly::AsyncMapSnapshot::range_page", + "kind": "function", + "owner": "prolly::AsyncMapSnapshot", + "member_kind": "inherent-item", + "family": "maintenance", + "classification": "portable", + "status": "planned", + "bucket": "reviewed_incomplete" + }, + { + "rust": "prolly::AsyncMapSnapshot::reverse_range_page", + "kind": "function", + "owner": "prolly::AsyncMapSnapshot", + "member_kind": "inherent-item", + "family": "maintenance", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncMapSnapshot::stats", + "kind": "function", + "owner": "prolly::AsyncMapSnapshot", + "member_kind": "inherent-item", + "family": "maintenance", + "classification": "portable", + "status": "planned", + "bucket": "reviewed_incomplete" + }, + { + "rust": "prolly::AsyncMapSnapshot::tree", + "kind": "function", + "owner": "prolly::AsyncMapSnapshot", + "member_kind": "inherent-item", + "family": "maintenance", + "classification": "portable", + "status": "planned", + "bucket": "reviewed_incomplete" + }, + { + "rust": "prolly::AsyncMapSnapshot::version", + "kind": "function", + "owner": "prolly::AsyncMapSnapshot", + "member_kind": "inherent-item", + "family": "maintenance", + "classification": "portable", + "status": "planned", + "bucket": "reviewed_incomplete" + }, + { + "rust": "prolly::AsyncPreparedIndexedMutation", + "kind": "struct", + "owner": null, + "member_kind": null, + "family": "indexed-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, + { + "rust": "prolly::AsyncPreparedIndexedMutation::candidate_state_tree", + "kind": "function", + "owner": "prolly::AsyncPreparedIndexedMutation", + "member_kind": "inherent-item", + "family": "indexed-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncPreparedIndexedMutation::current", + "kind": "function", + "owner": "prolly::AsyncPreparedIndexedMutation", + "member_kind": "inherent-item", + "family": "indexed-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncPreparedIndexedMutation::expected_state_tree", + "kind": "function", + "owner": "prolly::AsyncPreparedIndexedMutation", + "member_kind": "inherent-item", + "family": "indexed-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncPreparedIndexedMutation::manifest", + "kind": "function", + "owner": "prolly::AsyncPreparedIndexedMutation", + "member_kind": "inherent-item", + "family": "indexed-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncPreparedIndexedMutation::previous_source_version", + "kind": "function", + "owner": "prolly::AsyncPreparedIndexedMutation", + "member_kind": "inherent-item", + "family": "indexed-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncPreparedIndexedMutation::root_name", + "kind": "function", + "owner": "prolly::AsyncPreparedIndexedMutation", + "member_kind": "inherent-item", + "family": "indexed-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncPreparedIndexedUpdate", + "kind": "enum", + "owner": null, + "member_kind": null, + "family": "indexed-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, + { + "rust": "prolly::AsyncPreparedIndexedUpdate::Conflict", + "kind": "variant", + "owner": "prolly::AsyncPreparedIndexedUpdate", + "member_kind": "variant", + "family": "indexed-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, + { + "rust": "prolly::AsyncPreparedIndexedUpdate::Prepared", + "kind": "variant", + "owner": "prolly::AsyncPreparedIndexedUpdate", + "member_kind": "variant", + "family": "indexed-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, + { + "rust": "prolly::AsyncPreparedIndexedUpdate::Unchanged", + "kind": "variant", + "owner": "prolly::AsyncPreparedIndexedUpdate", + "member_kind": "variant", + "family": "indexed-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, + { + "rust": "prolly::AsyncProductQuantizer", + "kind": "struct", + "owner": null, + "member_kind": null, + "family": "proximity-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, + { + "rust": "prolly::AsyncProductQuantizer::config", + "kind": "function", + "owner": "prolly::AsyncProductQuantizer", + "member_kind": "inherent-item", + "family": "proximity-map", + "classification": "portable", + "status": "planned", + "bucket": "reviewed_incomplete" + }, + { + "rust": "prolly::AsyncProductQuantizer::load", + "kind": "function", + "owner": "prolly::AsyncProductQuantizer", + "member_kind": "inherent-item", + "family": "proximity-map", + "classification": "portable", + "status": "planned", + "bucket": "reviewed_incomplete" + }, + { + "rust": "prolly::AsyncProductQuantizer::manifest_cid", + "kind": "function", + "owner": "prolly::AsyncProductQuantizer", + "member_kind": "inherent-item", + "family": "proximity-map", + "classification": "portable", + "status": "planned", + "bucket": "reviewed_incomplete" + }, + { + "rust": "prolly::AsyncProductQuantizer::quality", + "kind": "function", + "owner": "prolly::AsyncProductQuantizer", + "member_kind": "inherent-item", + "family": "proximity-map", + "classification": "portable", + "status": "planned", + "bucket": "reviewed_incomplete" + }, + { + "rust": "prolly::AsyncProductQuantizer::source_descriptor", + "kind": "function", + "owner": "prolly::AsyncProductQuantizer", + "member_kind": "inherent-item", + "family": "proximity-map", + "classification": "portable", + "status": "planned", + "bucket": "reviewed_incomplete" + }, + { + "rust": "prolly::AsyncProductQuantizerBuild", + "kind": "struct", + "owner": null, + "member_kind": null, + "family": "proximity-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, + { + "rust": "prolly::AsyncProductQuantizerBuild::config", + "kind": "struct_field", + "owner": "prolly::AsyncProductQuantizerBuild", + "member_kind": "field", + "family": "proximity-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, + { + "rust": "prolly::AsyncProductQuantizerBuild::limits", + "kind": "struct_field", + "owner": "prolly::AsyncProductQuantizerBuild", + "member_kind": "field", + "family": "proximity-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, + { + "rust": "prolly::AsyncProductQuantizerBuild::parallelism", + "kind": "struct_field", + "owner": "prolly::AsyncProductQuantizerBuild", + "member_kind": "field", + "family": "proximity-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, + { + "rust": "prolly::AsyncProlly", + "kind": "type_alias", + "owner": null, + "member_kind": null, + "family": "core", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_rust_abstraction" + }, + { + "rust": "prolly::AsyncProllyTransaction", + "kind": "struct", + "owner": null, + "member_kind": null, + "family": "core", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, + { + "rust": "prolly::AsyncProllyTransaction::batch", + "kind": "function", + "owner": "prolly::AsyncProllyTransaction", + "member_kind": "inherent-item", + "family": "core", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncProllyTransaction::commit", + "kind": "function", + "owner": "prolly::AsyncProllyTransaction", + "member_kind": "inherent-item", + "family": "core", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncProllyTransaction::compare_and_swap_named_root", + "kind": "function", + "owner": "prolly::AsyncProllyTransaction", + "member_kind": "inherent-item", + "family": "core", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncProllyTransaction::compare_and_swap_named_root_at_millis", + "kind": "function", + "owner": "prolly::AsyncProllyTransaction", + "member_kind": "inherent-item", + "family": "core", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncProllyTransaction::create", + "kind": "function", + "owner": "prolly::AsyncProllyTransaction", + "member_kind": "inherent-item", + "family": "core", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncProllyTransaction::delete", + "kind": "function", + "owner": "prolly::AsyncProllyTransaction", + "member_kind": "inherent-item", + "family": "core", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncProllyTransaction::delete_named_root", + "kind": "function", + "owner": "prolly::AsyncProllyTransaction", + "member_kind": "inherent-item", + "family": "core", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncProllyTransaction::get", + "kind": "function", + "owner": "prolly::AsyncProllyTransaction", + "member_kind": "inherent-item", + "family": "core", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncProllyTransaction::load_named_root", + "kind": "function", + "owner": "prolly::AsyncProllyTransaction", + "member_kind": "inherent-item", + "family": "core", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncProllyTransaction::load_named_roots_ordered", + "kind": "function", + "owner": "prolly::AsyncProllyTransaction", + "member_kind": "inherent-item", + "family": "core", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncProllyTransaction::publish_named_root", + "kind": "function", + "owner": "prolly::AsyncProllyTransaction", + "member_kind": "inherent-item", + "family": "core", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncProllyTransaction::publish_named_root_at_millis", + "kind": "function", + "owner": "prolly::AsyncProllyTransaction", + "member_kind": "inherent-item", + "family": "core", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncProllyTransaction::put", + "kind": "function", + "owner": "prolly::AsyncProllyTransaction", + "member_kind": "inherent-item", + "family": "core", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncProllyTransaction::rollback", + "kind": "function", + "owner": "prolly::AsyncProllyTransaction", + "member_kind": "inherent-item", + "family": "core", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncProllyTransaction::versioned_maps", + "kind": "function", + "owner": "prolly::AsyncProllyTransaction", + "member_kind": "inherent-item", + "family": "core", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncProllyTransaction::versioned_maps_at_millis", + "kind": "function", + "owner": "prolly::AsyncProllyTransaction", + "member_kind": "inherent-item", + "family": "core", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncProximityBuildOptions", + "kind": "struct", + "owner": null, + "member_kind": null, + "family": "proximity-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, + { + "rust": "prolly::AsyncProximityBuildOptions::max_owned_bytes", + "kind": "struct_field", + "owner": "prolly::AsyncProximityBuildOptions", + "member_kind": "field", + "family": "proximity-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, + { + "rust": "prolly::AsyncProximityBuildOptions::max_records", + "kind": "struct_field", + "owner": "prolly::AsyncProximityBuildOptions", + "member_kind": "field", + "family": "proximity-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, + { + "rust": "prolly::AsyncProximityBuildOptions::parallelism", + "kind": "struct_field", + "owner": "prolly::AsyncProximityBuildOptions", + "member_kind": "field", + "family": "proximity-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, + { + "rust": "prolly::AsyncProximityBuildOptions::publication_batch_items", + "kind": "struct_field", + "owner": "prolly::AsyncProximityBuildOptions", + "member_kind": "field", + "family": "proximity-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, + { + "rust": "prolly::AsyncProximityHead", + "kind": "struct", + "owner": null, + "member_kind": null, + "family": "proximity-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, + { + "rust": "prolly::AsyncProximityHead::build_if_absent", + "kind": "function", + "owner": "prolly::AsyncProximityHead", + "member_kind": "inherent-item", + "family": "proximity-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncProximityHead::mutate_with_retry", + "kind": "function", + "owner": "prolly::AsyncProximityHead", + "member_kind": "inherent-item", + "family": "proximity-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncProximityHead::name", + "kind": "function", + "owner": "prolly::AsyncProximityHead", + "member_kind": "inherent-item", + "family": "proximity-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncProximityHead::new", + "kind": "function", + "owner": "prolly::AsyncProximityHead", + "member_kind": "inherent-item", + "family": "proximity-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncProximityHead::open", + "kind": "function", + "owner": "prolly::AsyncProximityHead", + "member_kind": "inherent-item", + "family": "proximity-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncProximityHead::publish_descriptor_if_absent", + "kind": "function", + "owner": "prolly::AsyncProximityHead", + "member_kind": "inherent-item", + "family": "proximity-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncProximityHead::runtime", + "kind": "function", + "owner": "prolly::AsyncProximityHead", + "member_kind": "inherent-item", + "family": "proximity-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncProximityHead::with_limits", + "kind": "function", + "owner": "prolly::AsyncProximityHead", + "member_kind": "inherent-item", + "family": "proximity-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncProximityHead::with_max_conflict_retries", + "kind": "function", + "owner": "prolly::AsyncProximityHead", + "member_kind": "inherent-item", + "family": "proximity-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncProximityHead::with_runtime", + "kind": "function", + "owner": "prolly::AsyncProximityHead", + "member_kind": "inherent-item", + "family": "proximity-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncProximityHeadCommit", + "kind": "enum", + "owner": null, + "member_kind": null, + "family": "proximity-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, + { + "rust": "prolly::AsyncProximityHeadCommit::Applied", + "kind": "variant", + "owner": "prolly::AsyncProximityHeadCommit", + "member_kind": "variant", + "family": "proximity-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, + { + "rust": "prolly::AsyncProximityHeadCommit::Conflict", + "kind": "variant", + "owner": "prolly::AsyncProximityHeadCommit", + "member_kind": "variant", + "family": "proximity-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, + { + "rust": "prolly::AsyncProximityMap", + "kind": "struct", + "owner": null, + "member_kind": null, + "family": "proximity-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, + { + "rust": "prolly::AsyncProximityMap::build", + "kind": "function", + "owner": "prolly::AsyncProximityMap", + "member_kind": "inherent-item", + "family": "proximity-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncProximityMap::build_with_options", + "kind": "function", + "owner": "prolly::AsyncProximityMap", + "member_kind": "inherent-item", + "family": "proximity-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncProximityMap::build_with_parallelism", + "kind": "function", + "owner": "prolly::AsyncProximityMap", + "member_kind": "inherent-item", + "family": "proximity-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncProximityMap::clear_content_cache", + "kind": "function", + "owner": "prolly::AsyncProximityMap", + "member_kind": "inherent-item", + "family": "proximity-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncProximityMap::contains_key", + "kind": "function", + "owner": "prolly::AsyncProximityMap", + "member_kind": "inherent-item", + "family": "proximity-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncProximityMap::get", + "kind": "function", + "owner": "prolly::AsyncProximityMap", + "member_kind": "inherent-item", + "family": "proximity-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncProximityMap::get_with", + "kind": "function", + "owner": "prolly::AsyncProximityMap", + "member_kind": "inherent-item", + "family": "proximity-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncProximityMap::load", + "kind": "function", + "owner": "prolly::AsyncProximityMap", + "member_kind": "inherent-item", + "family": "proximity-map", + "classification": "portable", + "status": "planned", + "bucket": "reviewed_incomplete" + }, + { + "rust": "prolly::AsyncProximityMap::load_with_runtime", + "kind": "function", + "owner": "prolly::AsyncProximityMap", + "member_kind": "inherent-item", + "family": "proximity-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncProximityMap::load_with_search_io", + "kind": "function", + "owner": "prolly::AsyncProximityMap", + "member_kind": "inherent-item", + "family": "proximity-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncProximityMap::mutate_batch", + "kind": "function", + "owner": "prolly::AsyncProximityMap", + "member_kind": "inherent-item", + "family": "proximity-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncProximityMap::prove_membership", + "kind": "function", + "owner": "prolly::AsyncProximityMap", + "member_kind": "inherent-item", + "family": "proximity-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncProximityMap::prove_search", + "kind": "function", + "owner": "prolly::AsyncProximityMap", + "member_kind": "inherent-item", + "family": "proximity-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncProximityMap::prove_structure", + "kind": "function", + "owner": "prolly::AsyncProximityMap", + "member_kind": "inherent-item", + "family": "proximity-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncProximityMap::read", + "kind": "function", + "owner": "prolly::AsyncProximityMap", + "member_kind": "inherent-item", + "family": "proximity-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncProximityMap::rebuild_batch", + "kind": "function", + "owner": "prolly::AsyncProximityMap", + "member_kind": "inherent-item", + "family": "proximity-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncProximityMap::scan_records", + "kind": "function", + "owner": "prolly::AsyncProximityMap", + "member_kind": "inherent-item", + "family": "proximity-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncProximityMap::scan_records_range_until", + "kind": "function", + "owner": "prolly::AsyncProximityMap", + "member_kind": "inherent-item", + "family": "proximity-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncProximityMap::scan_records_until", + "kind": "function", + "owner": "prolly::AsyncProximityMap", + "member_kind": "inherent-item", + "family": "proximity-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncProximityMap::search", + "kind": "function", + "owner": "prolly::AsyncProximityMap", + "member_kind": "inherent-item", + "family": "proximity-map", + "classification": "portable", + "status": "planned", + "bucket": "reviewed_incomplete" + }, + { + "rust": "prolly::AsyncProximityMap::search_with_accelerators", + "kind": "function", + "owner": "prolly::AsyncProximityMap", + "member_kind": "inherent-item", + "family": "proximity-map", + "classification": "portable", + "status": "planned", + "bucket": "reviewed_incomplete" + }, + { + "rust": "prolly::AsyncProximityMap::search_with_runtime", + "kind": "function", + "owner": "prolly::AsyncProximityMap", + "member_kind": "inherent-item", + "family": "proximity-map", + "classification": "portable", + "status": "planned", + "bucket": "reviewed_incomplete" + }, + { + "rust": "prolly::AsyncProximityMap::tree", + "kind": "function", + "owner": "prolly::AsyncProximityMap", + "member_kind": "inherent-item", + "family": "proximity-map", + "classification": "portable", + "status": "planned", + "bucket": "reviewed_incomplete" + }, + { + "rust": "prolly::AsyncProximityMap::verify", + "kind": "function", + "owner": "prolly::AsyncProximityMap", + "member_kind": "inherent-item", + "family": "proximity-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncProximityReadSession", + "kind": "struct", + "owner": null, + "member_kind": null, + "family": "proximity-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, + { + "rust": "prolly::AsyncProximityReadSession::contains_key", + "kind": "function", + "owner": "prolly::AsyncProximityReadSession", + "member_kind": "inherent-item", + "family": "proximity-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncProximityReadSession::get_lease", + "kind": "function", + "owner": "prolly::AsyncProximityReadSession", + "member_kind": "inherent-item", + "family": "proximity-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncProximityReadSession::get_with", + "kind": "function", + "owner": "prolly::AsyncProximityReadSession", + "member_kind": "inherent-item", + "family": "proximity-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncProximityReadSession::scan_records", + "kind": "function", + "owner": "prolly::AsyncProximityReadSession", + "member_kind": "inherent-item", + "family": "proximity-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncProximityReadSession::scan_records_range_until", + "kind": "function", + "owner": "prolly::AsyncProximityReadSession", + "member_kind": "inherent-item", + "family": "proximity-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncProximityReadSession::scan_records_until", + "kind": "function", + "owner": "prolly::AsyncProximityReadSession", + "member_kind": "inherent-item", + "family": "proximity-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncProximitySnapshot", + "kind": "struct", + "owner": null, + "member_kind": null, + "family": "proximity-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, + { + "rust": "prolly::AsyncProximitySnapshot::into_map", + "kind": "function", + "owner": "prolly::AsyncProximitySnapshot", + "member_kind": "inherent-item", + "family": "proximity-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncProximitySnapshot::map", + "kind": "function", + "owner": "prolly::AsyncProximitySnapshot", + "member_kind": "inherent-item", + "family": "proximity-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncProximitySnapshot::publication", + "kind": "function", + "owner": "prolly::AsyncProximitySnapshot", + "member_kind": "inherent-item", + "family": "proximity-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncRangeIter", + "kind": "struct", + "owner": null, + "member_kind": null, + "family": "core", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, + { + "rust": "prolly::AsyncRangeIter::collect", + "kind": "function", + "owner": "prolly::AsyncRangeIter", + "member_kind": "inherent-item", + "family": "core", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncRangeIter::into_stream", + "kind": "function", + "owner": "prolly::AsyncRangeIter", + "member_kind": "inherent-item", + "family": "core", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncRangeIter::next", + "kind": "function", + "owner": "prolly::AsyncRangeIter", + "member_kind": "inherent-item", + "family": "core", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncRangeIter::next_with", + "kind": "function", + "owner": "prolly::AsyncRangeIter", + "member_kind": "inherent-item", + "family": "core", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncRangeIter::resume_cursor", + "kind": "function", + "owner": "prolly::AsyncRangeIter", + "member_kind": "inherent-item", + "family": "session", + "classification": "idiomatic", + "status": "implemented", + "bucket": "release_complete" + }, + { + "rust": "prolly::AsyncRangePage", + "kind": "type_alias", + "owner": null, + "member_kind": null, + "family": "core", + "classification": "idiomatic", + "status": "implemented", + "bucket": "release_complete" + }, + { + "rust": "prolly::AsyncReadSession", + "kind": "struct", + "owner": null, + "member_kind": null, + "family": "session", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, + { + "rust": "prolly::AsyncReadSession::first_entry_with", + "kind": "function", + "owner": "prolly::AsyncReadSession", + "member_kind": "inherent-item", + "family": "session", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncReadSession::get_lease", + "kind": "function", + "owner": "prolly::AsyncReadSession", + "member_kind": "inherent-item", + "family": "session", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncReadSession::get_many_with", + "kind": "function", + "owner": "prolly::AsyncReadSession", + "member_kind": "inherent-item", + "family": "session", + "classification": "portable", + "status": "planned", + "bucket": "reviewed_incomplete" + }, + { + "rust": "prolly::AsyncReadSession::get_value_ref_with", + "kind": "function", + "owner": "prolly::AsyncReadSession", + "member_kind": "inherent-item", + "family": "session", + "classification": "portable", + "status": "planned", + "bucket": "reviewed_incomplete" + }, + { + "rust": "prolly::AsyncReadSession::get_with", + "kind": "function", + "owner": "prolly::AsyncReadSession", + "member_kind": "inherent-item", + "family": "session", + "classification": "portable", + "status": "planned", + "bucket": "reviewed_incomplete" + }, + { + "rust": "prolly::AsyncReadSession::is_empty", + "kind": "function", + "owner": "prolly::AsyncReadSession", + "member_kind": "inherent-item", + "family": "session", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncReadSession::last_entry_with", + "kind": "function", + "owner": "prolly::AsyncReadSession", + "member_kind": "inherent-item", + "family": "session", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncReadSession::len", + "kind": "function", + "owner": "prolly::AsyncReadSession", + "member_kind": "inherent-item", + "family": "session", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncReadSession::lower_bound_with", + "kind": "function", + "owner": "prolly::AsyncReadSession", + "member_kind": "inherent-item", + "family": "session", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncReadSession::rank", + "kind": "function", + "owner": "prolly::AsyncReadSession", + "member_kind": "inherent-item", + "family": "session", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncReadSession::scan_prefix", + "kind": "function", + "owner": "prolly::AsyncReadSession", + "member_kind": "inherent-item", + "family": "session", + "classification": "portable", + "status": "planned", + "bucket": "reviewed_incomplete" + }, + { + "rust": "prolly::AsyncReadSession::scan_prefix_reverse", + "kind": "function", + "owner": "prolly::AsyncReadSession", + "member_kind": "inherent-item", + "family": "session", + "classification": "portable", + "status": "planned", + "bucket": "reviewed_incomplete" + }, + { + "rust": "prolly::AsyncReadSession::scan_prefix_reverse_until", + "kind": "function", + "owner": "prolly::AsyncReadSession", + "member_kind": "inherent-item", + "family": "session", + "classification": "portable", + "status": "planned", + "bucket": "reviewed_incomplete" + }, + { + "rust": "prolly::AsyncReadSession::scan_prefix_until", + "kind": "function", + "owner": "prolly::AsyncReadSession", + "member_kind": "inherent-item", + "family": "session", + "classification": "portable", + "status": "planned", + "bucket": "reviewed_incomplete" + }, + { + "rust": "prolly::AsyncReadSession::scan_range", + "kind": "function", + "owner": "prolly::AsyncReadSession", + "member_kind": "inherent-item", + "family": "session", + "classification": "portable", + "status": "planned", + "bucket": "reviewed_incomplete" + }, + { + "rust": "prolly::AsyncReadSession::scan_range_reverse", + "kind": "function", + "owner": "prolly::AsyncReadSession", + "member_kind": "inherent-item", + "family": "session", + "classification": "portable", + "status": "planned", + "bucket": "reviewed_incomplete" + }, + { + "rust": "prolly::AsyncReadSession::scan_range_reverse_until", + "kind": "function", + "owner": "prolly::AsyncReadSession", + "member_kind": "inherent-item", + "family": "session", + "classification": "portable", + "status": "planned", + "bucket": "reviewed_incomplete" + }, + { + "rust": "prolly::AsyncReadSession::scan_range_until", + "kind": "function", + "owner": "prolly::AsyncReadSession", + "member_kind": "inherent-item", + "family": "session", + "classification": "portable", + "status": "planned", + "bucket": "reviewed_incomplete" + }, + { + "rust": "prolly::AsyncReadSession::select_with", + "kind": "function", + "owner": "prolly::AsyncReadSession", + "member_kind": "inherent-item", + "family": "session", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncReadSession::tree", + "kind": "function", + "owner": "prolly::AsyncReadSession", + "member_kind": "inherent-item", + "family": "session", + "classification": "portable", + "status": "planned", + "bucket": "reviewed_incomplete" + }, + { + "rust": "prolly::AsyncReadSession::upper_bound_with", + "kind": "function", + "owner": "prolly::AsyncReadSession", + "member_kind": "inherent-item", + "family": "session", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncReversePage", + "kind": "type_alias", + "owner": null, + "member_kind": null, + "family": "core", + "classification": "idiomatic", + "status": "implemented", + "bucket": "release_complete" + }, + { + "rust": "prolly::AsyncSearchControl", + "kind": "struct", + "owner": null, + "member_kind": null, + "family": "core", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, + { + "rust": "prolly::AsyncSearchControl::cancellation", + "kind": "struct_field", + "owner": "prolly::AsyncSearchControl", + "member_kind": "field", + "family": "core", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, + { + "rust": "prolly::AsyncSearchControl::deadline", + "kind": "struct_field", + "owner": "prolly::AsyncSearchControl", + "member_kind": "field", + "family": "core", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, + { + "rust": "prolly::AsyncSearchControl::io", + "kind": "struct_field", + "owner": "prolly::AsyncSearchControl", + "member_kind": "field", + "family": "core", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, + { + "rust": "prolly::AsyncSecondaryIndexQuery", + "kind": "struct", + "owner": null, + "member_kind": null, + "family": "indexed-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, + { + "rust": "prolly::AsyncSecondaryIndexQuery::exact_page", + "kind": "function", + "owner": "prolly::AsyncSecondaryIndexQuery", + "member_kind": "inherent-item", + "family": "indexed-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncSecondaryIndexQuery::exact_reverse_page", + "kind": "function", + "owner": "prolly::AsyncSecondaryIndexQuery", + "member_kind": "inherent-item", + "family": "indexed-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncSecondaryIndexQuery::prefix_page", + "kind": "function", + "owner": "prolly::AsyncSecondaryIndexQuery", + "member_kind": "inherent-item", + "family": "indexed-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncSecondaryIndexQuery::prefix_reverse_page", + "kind": "function", + "owner": "prolly::AsyncSecondaryIndexQuery", + "member_kind": "inherent-item", + "family": "indexed-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncSecondaryIndexQuery::range_page", + "kind": "function", + "owner": "prolly::AsyncSecondaryIndexQuery", + "member_kind": "inherent-item", + "family": "indexed-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncSecondaryIndexQuery::range_reverse_page", + "kind": "function", + "owner": "prolly::AsyncSecondaryIndexQuery", + "member_kind": "inherent-item", + "family": "indexed-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncSecondaryIndexQuery::records", + "kind": "function", + "owner": "prolly::AsyncSecondaryIndexQuery", + "member_kind": "inherent-item", + "family": "indexed-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncSecondaryIndexSnapshot", + "kind": "struct", + "owner": null, + "member_kind": null, + "family": "indexed-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, + { + "rust": "prolly::AsyncSecondaryIndexSnapshot::descriptor", + "kind": "function", + "owner": "prolly::AsyncSecondaryIndexSnapshot", + "member_kind": "inherent-item", + "family": "indexed-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncSecondaryIndexSnapshot::exact", + "kind": "function", + "owner": "prolly::AsyncSecondaryIndexSnapshot", + "member_kind": "inherent-item", + "family": "indexed-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncSecondaryIndexSnapshot::exact_cursor_after", + "kind": "function", + "owner": "prolly::AsyncSecondaryIndexSnapshot", + "member_kind": "inherent-item", + "family": "indexed-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncSecondaryIndexSnapshot::exact_page", + "kind": "function", + "owner": "prolly::AsyncSecondaryIndexSnapshot", + "member_kind": "inherent-item", + "family": "indexed-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncSecondaryIndexSnapshot::exact_reverse_page", + "kind": "function", + "owner": "prolly::AsyncSecondaryIndexSnapshot", + "member_kind": "inherent-item", + "family": "indexed-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncSecondaryIndexSnapshot::name", + "kind": "function", + "owner": "prolly::AsyncSecondaryIndexSnapshot", + "member_kind": "inherent-item", + "family": "indexed-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncSecondaryIndexSnapshot::prefix", + "kind": "function", + "owner": "prolly::AsyncSecondaryIndexSnapshot", + "member_kind": "inherent-item", + "family": "indexed-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncSecondaryIndexSnapshot::prefix_cursor_after", + "kind": "function", + "owner": "prolly::AsyncSecondaryIndexSnapshot", + "member_kind": "inherent-item", + "family": "indexed-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncSecondaryIndexSnapshot::prefix_page", + "kind": "function", + "owner": "prolly::AsyncSecondaryIndexSnapshot", + "member_kind": "inherent-item", + "family": "indexed-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncSecondaryIndexSnapshot::prefix_reverse_page", + "kind": "function", + "owner": "prolly::AsyncSecondaryIndexSnapshot", + "member_kind": "inherent-item", + "family": "indexed-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncSecondaryIndexSnapshot::primary_keys", + "kind": "function", + "owner": "prolly::AsyncSecondaryIndexSnapshot", + "member_kind": "inherent-item", + "family": "indexed-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncSecondaryIndexSnapshot::projected", + "kind": "function", + "owner": "prolly::AsyncSecondaryIndexSnapshot", + "member_kind": "inherent-item", + "family": "indexed-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncSecondaryIndexSnapshot::query", + "kind": "function", + "owner": "prolly::AsyncSecondaryIndexSnapshot", + "member_kind": "inherent-item", + "family": "indexed-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncSecondaryIndexSnapshot::range", + "kind": "function", + "owner": "prolly::AsyncSecondaryIndexSnapshot", + "member_kind": "inherent-item", + "family": "indexed-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncSecondaryIndexSnapshot::range_cursor_after", + "kind": "function", + "owner": "prolly::AsyncSecondaryIndexSnapshot", + "member_kind": "inherent-item", + "family": "indexed-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncSecondaryIndexSnapshot::range_page", + "kind": "function", + "owner": "prolly::AsyncSecondaryIndexSnapshot", + "member_kind": "inherent-item", + "family": "indexed-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncSecondaryIndexSnapshot::range_reverse_page", + "kind": "function", + "owner": "prolly::AsyncSecondaryIndexSnapshot", + "member_kind": "inherent-item", + "family": "indexed-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncSecondaryIndexSnapshot::records", + "kind": "function", + "owner": "prolly::AsyncSecondaryIndexSnapshot", + "member_kind": "inherent-item", + "family": "indexed-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncSecondaryIndexSnapshot::scan_exact", + "kind": "function", + "owner": "prolly::AsyncSecondaryIndexSnapshot", + "member_kind": "inherent-item", + "family": "indexed-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncSecondaryIndexSnapshot::scan_exact_reverse", + "kind": "function", + "owner": "prolly::AsyncSecondaryIndexSnapshot", + "member_kind": "inherent-item", + "family": "indexed-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncSecondaryIndexSnapshot::scan_exact_reverse_until", + "kind": "function", + "owner": "prolly::AsyncSecondaryIndexSnapshot", + "member_kind": "inherent-item", + "family": "indexed-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncSecondaryIndexSnapshot::scan_exact_until", + "kind": "function", + "owner": "prolly::AsyncSecondaryIndexSnapshot", + "member_kind": "inherent-item", + "family": "indexed-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncSecondaryIndexSnapshot::scan_prefix", + "kind": "function", + "owner": "prolly::AsyncSecondaryIndexSnapshot", + "member_kind": "inherent-item", + "family": "indexed-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncSecondaryIndexSnapshot::scan_prefix_reverse", + "kind": "function", + "owner": "prolly::AsyncSecondaryIndexSnapshot", + "member_kind": "inherent-item", + "family": "indexed-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncSecondaryIndexSnapshot::scan_prefix_reverse_until", + "kind": "function", + "owner": "prolly::AsyncSecondaryIndexSnapshot", + "member_kind": "inherent-item", + "family": "indexed-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncSecondaryIndexSnapshot::scan_prefix_until", + "kind": "function", + "owner": "prolly::AsyncSecondaryIndexSnapshot", + "member_kind": "inherent-item", + "family": "indexed-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncSecondaryIndexSnapshot::scan_range", + "kind": "function", + "owner": "prolly::AsyncSecondaryIndexSnapshot", + "member_kind": "inherent-item", + "family": "indexed-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncSecondaryIndexSnapshot::scan_range_reverse", + "kind": "function", + "owner": "prolly::AsyncSecondaryIndexSnapshot", + "member_kind": "inherent-item", + "family": "indexed-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncSecondaryIndexSnapshot::scan_range_reverse_until", + "kind": "function", + "owner": "prolly::AsyncSecondaryIndexSnapshot", + "member_kind": "inherent-item", + "family": "indexed-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncSecondaryIndexSnapshot::scan_range_until", + "kind": "function", + "owner": "prolly::AsyncSecondaryIndexSnapshot", + "member_kind": "inherent-item", + "family": "indexed-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncSecondaryIndexSnapshot::snapshot_ref", + "kind": "function", + "owner": "prolly::AsyncSecondaryIndexSnapshot", + "member_kind": "inherent-item", + "family": "indexed-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncSecondaryIndexSnapshot::tree", + "kind": "function", + "owner": "prolly::AsyncSecondaryIndexSnapshot", + "member_kind": "inherent-item", + "family": "indexed-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncSortedBatchBuilder", + "kind": "struct", + "owner": null, + "member_kind": null, + "family": "core", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, + { + "rust": "prolly::AsyncSortedBatchBuilder::add", + "kind": "function", + "owner": "prolly::AsyncSortedBatchBuilder", + "member_kind": "inherent-item", + "family": "core", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncSortedBatchBuilder::build", + "kind": "function", + "owner": "prolly::AsyncSortedBatchBuilder", + "member_kind": "inherent-item", + "family": "core", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncSortedBatchBuilder::new", + "kind": "function", + "owner": "prolly::AsyncSortedBatchBuilder", + "member_kind": "inherent-item", + "family": "core", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncStore", + "kind": "trait", + "owner": null, + "member_kind": null, + "family": "core", + "classification": "idiomatic", + "status": "implemented", + "bucket": "release_complete" + }, + { + "rust": "prolly::AsyncStore::Error", + "kind": "assoc_type", + "owner": "prolly::AsyncStore", + "member_kind": "trait-item", + "family": "core", + "classification": "rust-language-only", + "status": "implemented", + "bucket": "release_complete" + }, + { + "rust": "prolly::AsyncStore::batch", + "kind": "function", + "owner": "prolly::AsyncStore", + "member_kind": "trait-item", + "family": "core", + "classification": "idiomatic", + "status": "implemented", + "bucket": "release_complete" + }, + { + "rust": "prolly::AsyncStore::batch_get", + "kind": "function", + "owner": "prolly::AsyncStore", + "member_kind": "trait-item", + "family": "core", + "classification": "idiomatic", + "status": "implemented", + "bucket": "release_complete" + }, + { + "rust": "prolly::AsyncStore::batch_get_ordered", + "kind": "function", + "owner": "prolly::AsyncStore", + "member_kind": "trait-item", + "family": "core", + "classification": "idiomatic", + "status": "implemented", + "bucket": "release_complete" + }, + { + "rust": "prolly::AsyncStore::batch_get_ordered_unique", + "kind": "function", + "owner": "prolly::AsyncStore", + "member_kind": "trait-item", + "family": "core", + "classification": "idiomatic", + "status": "implemented", + "bucket": "release_complete" + }, + { + "rust": "prolly::AsyncStore::batch_get_shared_ordered_unique", + "kind": "function", + "owner": "prolly::AsyncStore", + "member_kind": "trait-item", + "family": "core", + "classification": "idiomatic", + "status": "implemented", + "bucket": "release_complete" + }, + { + "rust": "prolly::AsyncStore::batch_get_validated_shared_ordered_unique", + "kind": "function", + "owner": "prolly::AsyncStore", + "member_kind": "trait-item", + "family": "core", + "classification": "idiomatic", + "status": "implemented", + "bucket": "release_complete" + }, + { + "rust": "prolly::AsyncStore::batch_put", + "kind": "function", + "owner": "prolly::AsyncStore", + "member_kind": "trait-item", + "family": "core", + "classification": "idiomatic", + "status": "implemented", + "bucket": "release_complete" + }, + { + "rust": "prolly::AsyncStore::batch_put_with_hint", + "kind": "function", + "owner": "prolly::AsyncStore", + "member_kind": "trait-item", + "family": "core", + "classification": "idiomatic", + "status": "implemented", + "bucket": "release_complete" + }, + { + "rust": "prolly::AsyncStore::delete", + "kind": "function", + "owner": "prolly::AsyncStore", + "member_kind": "trait-item", + "family": "core", + "classification": "idiomatic", + "status": "implemented", + "bucket": "release_complete" + }, + { + "rust": "prolly::AsyncStore::get", + "kind": "function", + "owner": "prolly::AsyncStore", + "member_kind": "trait-item", + "family": "core", + "classification": "idiomatic", + "status": "implemented", + "bucket": "release_complete" + }, + { + "rust": "prolly::AsyncStore::get_hint", + "kind": "function", + "owner": "prolly::AsyncStore", + "member_kind": "trait-item", + "family": "core", + "classification": "idiomatic", + "status": "implemented", + "bucket": "release_complete" + }, + { + "rust": "prolly::AsyncStore::get_shared", + "kind": "function", + "owner": "prolly::AsyncStore", + "member_kind": "trait-item", + "family": "core", + "classification": "idiomatic", + "status": "implemented", + "bucket": "release_complete" + }, + { + "rust": "prolly::AsyncStore::get_validated_shared", + "kind": "function", + "owner": "prolly::AsyncStore", + "member_kind": "trait-item", + "family": "core", + "classification": "idiomatic", + "status": "implemented", + "bucket": "release_complete" + }, + { + "rust": "prolly::AsyncStore::guarantees_durable_publication", + "kind": "function", + "owner": "prolly::AsyncStore", + "member_kind": "trait-item", + "family": "core", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_rust_abstraction" + }, + { + "rust": "prolly::AsyncStore::has_native_shared_reads", + "kind": "function", + "owner": "prolly::AsyncStore", + "member_kind": "trait-item", + "family": "core", + "classification": "idiomatic", + "status": "implemented", + "bucket": "release_complete" + }, + { + "rust": "prolly::AsyncStore::prefers_batch_reads", + "kind": "function", + "owner": "prolly::AsyncStore", + "member_kind": "trait-item", + "family": "core", + "classification": "idiomatic", + "status": "implemented", + "bucket": "release_complete" + }, + { + "rust": "prolly::AsyncStore::prefers_rightmost_path_hints", + "kind": "function", + "owner": "prolly::AsyncStore", + "member_kind": "trait-item", + "family": "core", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_rust_abstraction" + }, + { + "rust": "prolly::AsyncStore::publish_nodes", + "kind": "function", + "owner": "prolly::AsyncStore", + "member_kind": "trait-item", + "family": "core", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_rust_abstraction" + }, + { + "rust": "prolly::AsyncStore::put", "kind": "function", "owner": "prolly::AsyncStore", "member_kind": "trait-item", @@ -2332,7 +4481,7 @@ "bucket": "release_complete" }, { - "rust": "prolly::AsyncStore::has_native_shared_reads", + "rust": "prolly::AsyncStore::put_hint", "kind": "function", "owner": "prolly::AsyncStore", "member_kind": "trait-item", @@ -2342,7 +4491,17 @@ "bucket": "release_complete" }, { - "rust": "prolly::AsyncStore::prefers_batch_reads", + "rust": "prolly::AsyncStore::read_parallelism", + "kind": "function", + "owner": "prolly::AsyncStore", + "member_kind": "trait-item", + "family": "core", + "classification": "idiomatic", + "status": "implemented", + "bucket": "release_complete" + }, + { + "rust": "prolly::AsyncStore::supports_hints", "kind": "function", "owner": "prolly::AsyncStore", "member_kind": "trait-item", @@ -2352,117 +4511,407 @@ "bucket": "release_complete" }, { - "rust": "prolly::AsyncStore::prefers_rightmost_path_hints", + "rust": "prolly::AsyncTransactionOverlayStore", + "kind": "struct", + "owner": null, + "member_kind": null, + "family": "core", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, + { + "rust": "prolly::AsyncTransactionalStore", + "kind": "trait", + "owner": null, + "member_kind": null, + "family": "core", + "classification": "idiomatic", + "status": "implemented", + "bucket": "release_complete" + }, + { + "rust": "prolly::AsyncTransactionalStore::commit_transaction", + "kind": "function", + "owner": "prolly::AsyncTransactionalStore", + "member_kind": "trait-item", + "family": "core", + "classification": "idiomatic", + "status": "implemented", + "bucket": "release_complete" + }, + { + "rust": "prolly::AsyncTransactionalStore::supports_transactions", + "kind": "function", + "owner": "prolly::AsyncTransactionalStore", + "member_kind": "trait-item", + "family": "core", + "classification": "idiomatic", + "status": "implemented", + "bucket": "release_complete" + }, + { + "rust": "prolly::AsyncTurboQuantizer", + "kind": "struct", + "owner": null, + "member_kind": null, + "family": "proximity-map", + "classification": "portable", + "status": "implemented", + "bucket": "release_complete" + }, + { + "rust": "prolly::AsyncTurboQuantizer::build", + "kind": "function", + "owner": "prolly::AsyncTurboQuantizer", + "member_kind": "inherent-item", + "family": "proximity-map", + "classification": "portable", + "status": "implemented", + "bucket": "release_complete" + }, + { + "rust": "prolly::AsyncTurboQuantizer::build_with_limits", + "kind": "function", + "owner": "prolly::AsyncTurboQuantizer", + "member_kind": "inherent-item", + "family": "proximity-map", + "classification": "portable", + "status": "implemented", + "bucket": "release_complete" + }, + { + "rust": "prolly::AsyncTurboQuantizer::config", + "kind": "function", + "owner": "prolly::AsyncTurboQuantizer", + "member_kind": "inherent-item", + "family": "proximity-map", + "classification": "portable", + "status": "implemented", + "bucket": "release_complete" + }, + { + "rust": "prolly::AsyncTurboQuantizer::load", + "kind": "function", + "owner": "prolly::AsyncTurboQuantizer", + "member_kind": "inherent-item", + "family": "proximity-map", + "classification": "portable", + "status": "implemented", + "bucket": "release_complete" + }, + { + "rust": "prolly::AsyncTurboQuantizer::manifest_cid", + "kind": "function", + "owner": "prolly::AsyncTurboQuantizer", + "member_kind": "inherent-item", + "family": "proximity-map", + "classification": "portable", + "status": "implemented", + "bucket": "release_complete" + }, + { + "rust": "prolly::AsyncTurboQuantizer::quality", + "kind": "function", + "owner": "prolly::AsyncTurboQuantizer", + "member_kind": "inherent-item", + "family": "proximity-map", + "classification": "portable", + "status": "implemented", + "bucket": "release_complete" + }, + { + "rust": "prolly::AsyncTurboQuantizer::search", + "kind": "function", + "owner": "prolly::AsyncTurboQuantizer", + "member_kind": "inherent-item", + "family": "proximity-map", + "classification": "portable", + "status": "implemented", + "bucket": "release_complete" + }, + { + "rust": "prolly::AsyncTurboQuantizer::source_descriptor", + "kind": "function", + "owner": "prolly::AsyncTurboQuantizer", + "member_kind": "inherent-item", + "family": "proximity-map", + "classification": "portable", + "status": "implemented", + "bucket": "release_complete" + }, + { + "rust": "prolly::AsyncTurboQuantizer::verify", + "kind": "function", + "owner": "prolly::AsyncTurboQuantizer", + "member_kind": "inherent-item", + "family": "proximity-map", + "classification": "portable", + "status": "implemented", + "bucket": "release_complete" + }, + { + "rust": "prolly::AsyncTurboQuantizer::zero_vectors", + "kind": "function", + "owner": "prolly::AsyncTurboQuantizer", + "member_kind": "inherent-item", + "family": "proximity-map", + "classification": "portable", + "status": "implemented", + "bucket": "release_complete" + }, + { + "rust": "prolly::AsyncTurboQuantizerBuild", + "kind": "struct", + "owner": null, + "member_kind": null, + "family": "proximity-map", + "classification": "portable", + "status": "implemented", + "bucket": "release_complete" + }, + { + "rust": "prolly::AsyncTurboQuantizerBuild::config", + "kind": "struct_field", + "owner": "prolly::AsyncTurboQuantizerBuild", + "member_kind": "field", + "family": "proximity-map", + "classification": "portable", + "status": "implemented", + "bucket": "release_complete" + }, + { + "rust": "prolly::AsyncTurboQuantizerBuild::limits", + "kind": "struct_field", + "owner": "prolly::AsyncTurboQuantizerBuild", + "member_kind": "field", + "family": "proximity-map", + "classification": "portable", + "status": "implemented", + "bucket": "release_complete" + }, + { + "rust": "prolly::AsyncTurboQuantizerBuild::parallelism", + "kind": "struct_field", + "owner": "prolly::AsyncTurboQuantizerBuild", + "member_kind": "field", + "family": "proximity-map", + "classification": "portable", + "status": "implemented", + "bucket": "release_complete" + }, + { + "rust": "prolly::AsyncVersionedMap", + "kind": "struct", + "owner": null, + "member_kind": null, + "family": "versioned-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, + { + "rust": "prolly::AsyncVersionedMap::apply", + "kind": "function", + "owner": "prolly::AsyncVersionedMap", + "member_kind": "inherent-item", + "family": "versioned-map", + "classification": "portable", + "status": "implemented", + "bucket": "release_complete" + }, + { + "rust": "prolly::AsyncVersionedMap::apply_at_millis", + "kind": "function", + "owner": "prolly::AsyncVersionedMap", + "member_kind": "inherent-item", + "family": "versioned-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncVersionedMap::apply_if", + "kind": "function", + "owner": "prolly::AsyncVersionedMap", + "member_kind": "inherent-item", + "family": "versioned-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncVersionedMap::apply_if_at_millis", + "kind": "function", + "owner": "prolly::AsyncVersionedMap", + "member_kind": "inherent-item", + "family": "versioned-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncVersionedMap::changes_since", + "kind": "function", + "owner": "prolly::AsyncVersionedMap", + "member_kind": "inherent-item", + "family": "versioned-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncVersionedMap::delete", + "kind": "function", + "owner": "prolly::AsyncVersionedMap", + "member_kind": "inherent-item", + "family": "versioned-map", + "classification": "portable", + "status": "implemented", + "bucket": "release_complete" + }, + { + "rust": "prolly::AsyncVersionedMap::diff", "kind": "function", - "owner": "prolly::AsyncStore", - "member_kind": "trait-item", - "family": "core", + "owner": "prolly::AsyncVersionedMap", + "member_kind": "inherent-item", + "family": "versioned-map", "classification": "portable", "status": "planned", - "bucket": "unreviewed_rust_abstraction" + "bucket": "unreviewed_runtime_candidate" }, { - "rust": "prolly::AsyncStore::publish_nodes", + "rust": "prolly::AsyncVersionedMap::diff_page", "kind": "function", - "owner": "prolly::AsyncStore", - "member_kind": "trait-item", - "family": "core", + "owner": "prolly::AsyncVersionedMap", + "member_kind": "inherent-item", + "family": "versioned-map", "classification": "portable", "status": "planned", - "bucket": "unreviewed_rust_abstraction" + "bucket": "unreviewed_runtime_candidate" }, { - "rust": "prolly::AsyncStore::put", + "rust": "prolly::AsyncVersionedMap::edit", "kind": "function", - "owner": "prolly::AsyncStore", - "member_kind": "trait-item", - "family": "core", - "classification": "idiomatic", + "owner": "prolly::AsyncVersionedMap", + "member_kind": "inherent-item", + "family": "versioned-map", + "classification": "portable", "status": "implemented", "bucket": "release_complete" }, { - "rust": "prolly::AsyncStore::put_hint", + "rust": "prolly::AsyncVersionedMap::get", "kind": "function", - "owner": "prolly::AsyncStore", - "member_kind": "trait-item", - "family": "core", - "classification": "idiomatic", + "owner": "prolly::AsyncVersionedMap", + "member_kind": "inherent-item", + "family": "versioned-map", + "classification": "portable", "status": "implemented", "bucket": "release_complete" }, { - "rust": "prolly::AsyncStore::read_parallelism", + "rust": "prolly::AsyncVersionedMap::get_large_value", "kind": "function", - "owner": "prolly::AsyncStore", - "member_kind": "trait-item", - "family": "core", - "classification": "idiomatic", - "status": "implemented", - "bucket": "release_complete" + "owner": "prolly::AsyncVersionedMap", + "member_kind": "inherent-item", + "family": "versioned-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" }, { - "rust": "prolly::AsyncStore::supports_hints", + "rust": "prolly::AsyncVersionedMap::head", "kind": "function", - "owner": "prolly::AsyncStore", - "member_kind": "trait-item", - "family": "core", - "classification": "idiomatic", + "owner": "prolly::AsyncVersionedMap", + "member_kind": "inherent-item", + "family": "versioned-map", + "classification": "portable", "status": "implemented", "bucket": "release_complete" }, { - "rust": "prolly::AsyncTransactionOverlayStore", - "kind": "struct", - "owner": null, - "member_kind": null, - "family": "core", + "rust": "prolly::AsyncVersionedMap::head_name", + "kind": "function", + "owner": "prolly::AsyncVersionedMap", + "member_kind": "inherent-item", + "family": "versioned-map", "classification": "portable", "status": "planned", - "bucket": "unreviewed_data_model" + "bucket": "unreviewed_runtime_candidate" }, { - "rust": "prolly::AsyncTransactionalStore", - "kind": "trait", - "owner": null, - "member_kind": null, - "family": "core", - "classification": "idiomatic", + "rust": "prolly::AsyncVersionedMap::id", + "kind": "function", + "owner": "prolly::AsyncVersionedMap", + "member_kind": "inherent-item", + "family": "versioned-map", + "classification": "portable", "status": "implemented", "bucket": "release_complete" }, { - "rust": "prolly::AsyncTransactionalStore::commit_transaction", + "rust": "prolly::AsyncVersionedMap::keep_for", "kind": "function", - "owner": "prolly::AsyncTransactionalStore", - "member_kind": "trait-item", - "family": "core", - "classification": "idiomatic", - "status": "implemented", - "bucket": "release_complete" + "owner": "prolly::AsyncVersionedMap", + "member_kind": "inherent-item", + "family": "versioned-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" }, { - "rust": "prolly::AsyncTransactionalStore::supports_transactions", + "rust": "prolly::AsyncVersionedMap::keep_for_at", "kind": "function", - "owner": "prolly::AsyncTransactionalStore", - "member_kind": "trait-item", - "family": "core", - "classification": "idiomatic", + "owner": "prolly::AsyncVersionedMap", + "member_kind": "inherent-item", + "family": "versioned-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncVersionedMap::keep_last", + "kind": "function", + "owner": "prolly::AsyncVersionedMap", + "member_kind": "inherent-item", + "family": "versioned-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncVersionedMap::keep_versions", + "kind": "function", + "owner": "prolly::AsyncVersionedMap", + "member_kind": "inherent-item", + "family": "versioned-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncVersionedMap::new", + "kind": "function", + "owner": "prolly::AsyncVersionedMap", + "member_kind": "inherent-item", + "family": "versioned-map", + "classification": "portable", "status": "implemented", "bucket": "release_complete" }, { - "rust": "prolly::AsyncVersionedMap", - "kind": "struct", - "owner": null, - "member_kind": null, + "rust": "prolly::AsyncVersionedMap::prune_versions", + "kind": "function", + "owner": "prolly::AsyncVersionedMap", + "member_kind": "inherent-item", "family": "versioned-map", "classification": "portable", "status": "planned", - "bucket": "unreviewed_data_model" + "bucket": "unreviewed_runtime_candidate" }, { - "rust": "prolly::AsyncVersionedMap::apply", + "rust": "prolly::AsyncVersionedMap::put", "kind": "function", "owner": "prolly::AsyncVersionedMap", "member_kind": "inherent-item", @@ -2472,7 +4921,7 @@ "bucket": "release_complete" }, { - "rust": "prolly::AsyncVersionedMap::apply_at_millis", + "rust": "prolly::AsyncVersionedMap::put_large_value", "kind": "function", "owner": "prolly::AsyncVersionedMap", "member_kind": "inherent-item", @@ -2482,7 +4931,7 @@ "bucket": "unreviewed_runtime_candidate" }, { - "rust": "prolly::AsyncVersionedMap::apply_if_at_millis", + "rust": "prolly::AsyncVersionedMap::restore_if", "kind": "function", "owner": "prolly::AsyncVersionedMap", "member_kind": "inherent-item", @@ -2492,7 +4941,7 @@ "bucket": "unreviewed_runtime_candidate" }, { - "rust": "prolly::AsyncVersionedMap::delete", + "rust": "prolly::AsyncVersionedMap::snapshot", "kind": "function", "owner": "prolly::AsyncVersionedMap", "member_kind": "inherent-item", @@ -2502,7 +4951,7 @@ "bucket": "release_complete" }, { - "rust": "prolly::AsyncVersionedMap::edit", + "rust": "prolly::AsyncVersionedMap::snapshot_at", "kind": "function", "owner": "prolly::AsyncVersionedMap", "member_kind": "inherent-item", @@ -2512,17 +4961,17 @@ "bucket": "release_complete" }, { - "rust": "prolly::AsyncVersionedMap::get", + "rust": "prolly::AsyncVersionedMap::structural_diff_page", "kind": "function", "owner": "prolly::AsyncVersionedMap", "member_kind": "inherent-item", "family": "versioned-map", "classification": "portable", - "status": "implemented", - "bucket": "release_complete" + "status": "planned", + "bucket": "unreviewed_runtime_candidate" }, { - "rust": "prolly::AsyncVersionedMap::head", + "rust": "prolly::AsyncVersionedMap::subscribe", "kind": "function", "owner": "prolly::AsyncVersionedMap", "member_kind": "inherent-item", @@ -2532,7 +4981,7 @@ "bucket": "release_complete" }, { - "rust": "prolly::AsyncVersionedMap::id", + "rust": "prolly::AsyncVersionedMap::subscribe_from", "kind": "function", "owner": "prolly::AsyncVersionedMap", "member_kind": "inherent-item", @@ -2542,7 +4991,7 @@ "bucket": "release_complete" }, { - "rust": "prolly::AsyncVersionedMap::new", + "rust": "prolly::AsyncVersionedMap::version", "kind": "function", "owner": "prolly::AsyncVersionedMap", "member_kind": "inherent-item", @@ -2552,64 +5001,144 @@ "bucket": "release_complete" }, { - "rust": "prolly::AsyncVersionedMap::put", + "rust": "prolly::AsyncVersionedMap::version_root_name", "kind": "function", "owner": "prolly::AsyncVersionedMap", "member_kind": "inherent-item", "family": "versioned-map", "classification": "portable", - "status": "implemented", - "bucket": "release_complete" + "status": "planned", + "bucket": "unreviewed_runtime_candidate" }, { - "rust": "prolly::AsyncVersionedMap::snapshot", + "rust": "prolly::AsyncVersionedMap::versions", "kind": "function", "owner": "prolly::AsyncVersionedMap", "member_kind": "inherent-item", "family": "versioned-map", "classification": "portable", - "status": "implemented", - "bucket": "release_complete" + "status": "planned", + "bucket": "unreviewed_runtime_candidate" }, { - "rust": "prolly::AsyncVersionedMap::snapshot_at", + "rust": "prolly::AsyncVersionedMap::versions_page", "kind": "function", "owner": "prolly::AsyncVersionedMap", "member_kind": "inherent-item", "family": "versioned-map", "classification": "portable", - "status": "implemented", - "bucket": "release_complete" + "status": "planned", + "bucket": "unreviewed_runtime_candidate" }, { - "rust": "prolly::AsyncVersionedMap::subscribe", + "rust": "prolly::AsyncVersionedMap::versions_prefix", "kind": "function", "owner": "prolly::AsyncVersionedMap", "member_kind": "inherent-item", "family": "versioned-map", "classification": "portable", - "status": "implemented", - "bucket": "release_complete" + "status": "planned", + "bucket": "unreviewed_runtime_candidate" }, { - "rust": "prolly::AsyncVersionedMap::subscribe_from", + "rust": "prolly::AsyncVersionedMapsTransaction", + "kind": "struct", + "owner": null, + "member_kind": null, + "family": "versioned-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, + { + "rust": "prolly::AsyncVersionedMapsTransaction::apply", "kind": "function", - "owner": "prolly::AsyncVersionedMap", + "owner": "prolly::AsyncVersionedMapsTransaction", "member_kind": "inherent-item", "family": "versioned-map", "classification": "portable", - "status": "implemented", - "bucket": "release_complete" + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncVersionedMapsTransaction::apply_if", + "kind": "function", + "owner": "prolly::AsyncVersionedMapsTransaction", + "member_kind": "inherent-item", + "family": "versioned-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncVersionedMapsTransaction::delete", + "kind": "function", + "owner": "prolly::AsyncVersionedMapsTransaction", + "member_kind": "inherent-item", + "family": "versioned-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncVersionedMapsTransaction::edit", + "kind": "function", + "owner": "prolly::AsyncVersionedMapsTransaction", + "member_kind": "inherent-item", + "family": "versioned-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncVersionedMapsTransaction::get", + "kind": "function", + "owner": "prolly::AsyncVersionedMapsTransaction", + "member_kind": "inherent-item", + "family": "versioned-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncVersionedMapsTransaction::head", + "kind": "function", + "owner": "prolly::AsyncVersionedMapsTransaction", + "member_kind": "inherent-item", + "family": "versioned-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncVersionedMapsTransaction::put", + "kind": "function", + "owner": "prolly::AsyncVersionedMapsTransaction", + "member_kind": "inherent-item", + "family": "versioned-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::AsyncVersionedMapsTransaction::restore_if", + "kind": "function", + "owner": "prolly::AsyncVersionedMapsTransaction", + "member_kind": "inherent-item", + "family": "versioned-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" }, { - "rust": "prolly::AsyncVersionedMap::version", + "rust": "prolly::AsyncVersionedMapsTransaction::timestamp_millis", "kind": "function", - "owner": "prolly::AsyncVersionedMap", + "owner": "prolly::AsyncVersionedMapsTransaction", "member_kind": "inherent-item", "family": "versioned-map", "classification": "portable", - "status": "implemented", - "bucket": "release_complete" + "status": "planned", + "bucket": "unreviewed_runtime_candidate" }, { "rust": "prolly::AuthenticatedProofBundleVerification", @@ -3471,6 +6000,66 @@ "status": "planned", "bucket": "unreviewed_data_model" }, + { + "rust": "prolly::BlobReachabilityLimits", + "kind": "struct", + "owner": null, + "member_kind": null, + "family": "maintenance", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, + { + "rust": "prolly::BlobReachabilityLimits::max_blob_bytes", + "kind": "struct_field", + "owner": "prolly::BlobReachabilityLimits", + "member_kind": "field", + "family": "maintenance", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, + { + "rust": "prolly::BlobReachabilityLimits::max_blobs", + "kind": "struct_field", + "owner": "prolly::BlobReachabilityLimits", + "member_kind": "field", + "family": "maintenance", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, + { + "rust": "prolly::BlobReachabilityLimits::max_nodes", + "kind": "struct_field", + "owner": "prolly::BlobReachabilityLimits", + "member_kind": "field", + "family": "maintenance", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, + { + "rust": "prolly::BlobReachabilityLimits::max_values", + "kind": "struct_field", + "owner": "prolly::BlobReachabilityLimits", + "member_kind": "field", + "family": "maintenance", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, + { + "rust": "prolly::BlobReachabilityLimits::new", + "kind": "function", + "owner": "prolly::BlobReachabilityLimits", + "member_kind": "inherent-item", + "family": "maintenance", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, { "rust": "prolly::BlobRef", "kind": "struct", @@ -3841,6 +6430,16 @@ "status": "planned", "bucket": "unreviewed_data_model" }, + { + "rust": "prolly::CatalogAcceleratorKind::TurboQuantized", + "kind": "variant", + "owner": "prolly::CatalogAcceleratorKind", + "member_kind": "variant", + "family": "proximity-map", + "classification": "portable", + "status": "implemented", + "bucket": "release_complete" + }, { "rust": "prolly::CborCodec", "kind": "struct", @@ -4431,6 +7030,16 @@ "status": "planned", "bucket": "unreviewed_data_model" }, + { + "rust": "prolly::CompositeBase::TurboQuantized", + "kind": "variant", + "owner": "prolly::CompositeBase", + "member_kind": "variant", + "family": "proximity-map", + "classification": "portable", + "status": "implemented", + "bucket": "release_complete" + }, { "rust": "prolly::CompositeBase::kind", "kind": "function", @@ -4481,6 +7090,16 @@ "status": "planned", "bucket": "unreviewed_data_model" }, + { + "rust": "prolly::CompositeBaseKind::TurboQuantized", + "kind": "variant", + "owner": "prolly::CompositeBaseKind", + "member_kind": "variant", + "family": "proximity-map", + "classification": "portable", + "status": "implemented", + "bucket": "release_complete" + }, { "rust": "prolly::CompositeBuildLimits", "kind": "struct", @@ -4581,6 +7200,16 @@ "status": "planned", "bucket": "unreviewed_data_model" }, + { + "rust": "prolly::CompositeBuildOrRebuildOutcome::TurboQuantizedRebuilt", + "kind": "variant", + "owner": "prolly::CompositeBuildOrRebuildOutcome", + "member_kind": "variant", + "family": "proximity-map", + "classification": "portable", + "status": "implemented", + "bucket": "release_complete" + }, { "rust": "prolly::CompositeBuildOutcome", "kind": "enum", @@ -4761,6 +7390,26 @@ "status": "planned", "bucket": "unreviewed_data_model" }, + { + "rust": "prolly::CompositeRebuildOptions::turboquant_limits", + "kind": "struct_field", + "owner": "prolly::CompositeRebuildOptions", + "member_kind": "field", + "family": "core", + "classification": "portable", + "status": "implemented", + "bucket": "release_complete" + }, + { + "rust": "prolly::CompositeRebuildOptions::turboquant_parallelism", + "kind": "struct_field", + "owner": "prolly::CompositeRebuildOptions", + "member_kind": "field", + "family": "core", + "classification": "portable", + "status": "implemented", + "bucket": "release_complete" + }, { "rust": "prolly::Config", "kind": "struct", @@ -5571,6 +8220,16 @@ "status": "planned", "bucket": "unreviewed_data_model" }, + { + "rust": "prolly::ContentObjectKind::TurboQuantization", + "kind": "variant", + "owner": "prolly::ContentObjectKind", + "member_kind": "variant", + "family": "proximity-map", + "classification": "portable", + "status": "implemented", + "bucket": "release_complete" + }, { "rust": "prolly::ContentRootManifest", "kind": "struct", @@ -7061,6 +9720,16 @@ "status": "planned", "bucket": "unreviewed_data_model" }, + { + "rust": "prolly::Error::SnapshotExportLimitExceeded", + "kind": "variant", + "owner": "prolly::Error", + "member_kind": "variant", + "family": "maintenance", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, { "rust": "prolly::Error::SpliceConfigMismatch", "kind": "variant", @@ -7721,6 +10390,46 @@ "status": "planned", "bucket": "unreviewed_data_model" }, + { + "rust": "prolly::GcTraversalLimits", + "kind": "struct", + "owner": null, + "member_kind": null, + "family": "maintenance", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, + { + "rust": "prolly::GcTraversalLimits::max_node_bytes", + "kind": "struct_field", + "owner": "prolly::GcTraversalLimits", + "member_kind": "field", + "family": "maintenance", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, + { + "rust": "prolly::GcTraversalLimits::max_nodes", + "kind": "struct_field", + "owner": "prolly::GcTraversalLimits", + "member_kind": "field", + "family": "maintenance", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, + { + "rust": "prolly::GcTraversalLimits::new", + "kind": "function", + "owner": "prolly::GcTraversalLimits", + "member_kind": "inherent-item", + "family": "maintenance", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, { "rust": "prolly::HashAlgorithm", "kind": "enum", @@ -8161,6 +10870,16 @@ "status": "planned", "bucket": "unreviewed_data_model" }, + { + "rust": "prolly::INDEXED_SNAPSHOT_MANIFEST_FORMAT", + "kind": "constant", + "owner": null, + "member_kind": null, + "family": "indexed-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, { "rust": "prolly::INDEX_PHYSICAL_LAYOUT_VERSION", "kind": "constant", @@ -8951,6 +11670,16 @@ "status": "planned", "bucket": "unreviewed_data_model" }, + { + "rust": "prolly::IndexedCollectionState::from_async_tree", + "kind": "function", + "owner": "prolly::IndexedCollectionState", + "member_kind": "inherent-item", + "family": "indexed-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, { "rust": "prolly::IndexedCollectionState::from_tree", "kind": "function", @@ -9041,6 +11770,16 @@ "status": "planned", "bucket": "unreviewed_data_model" }, + { + "rust": "prolly::IndexedCollectionState::to_async_tree", + "kind": "function", + "owner": "prolly::IndexedCollectionState", + "member_kind": "inherent-item", + "family": "indexed-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, { "rust": "prolly::IndexedCollectionState::to_tree", "kind": "function", @@ -10184,7 +12923,77 @@ { "rust": "prolly::IndexedSnapshotBundleSummary::index_count", "kind": "struct_field", - "owner": "prolly::IndexedSnapshotBundleSummary", + "owner": "prolly::IndexedSnapshotBundleSummary", + "member_kind": "field", + "family": "indexed-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, + { + "rust": "prolly::IndexedSnapshotBundleSummary::node_count", + "kind": "struct_field", + "owner": "prolly::IndexedSnapshotBundleSummary", + "member_kind": "field", + "family": "indexed-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, + { + "rust": "prolly::IndexedSnapshotBundleSummary::source_map_id", + "kind": "struct_field", + "owner": "prolly::IndexedSnapshotBundleSummary", + "member_kind": "field", + "family": "indexed-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, + { + "rust": "prolly::IndexedSnapshotBundleSummary::source_version", + "kind": "struct_field", + "owner": "prolly::IndexedSnapshotBundleSummary", + "member_kind": "field", + "family": "indexed-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, + { + "rust": "prolly::IndexedSnapshotBundleSummary::state_version", + "kind": "struct_field", + "owner": "prolly::IndexedSnapshotBundleSummary", + "member_kind": "field", + "family": "indexed-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, + { + "rust": "prolly::IndexedSnapshotBundleVerification", + "kind": "struct", + "owner": null, + "member_kind": null, + "family": "indexed-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, + { + "rust": "prolly::IndexedSnapshotBundleVerification::reachable_nodes", + "kind": "struct_field", + "owner": "prolly::IndexedSnapshotBundleVerification", + "member_kind": "field", + "family": "indexed-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, + { + "rust": "prolly::IndexedSnapshotBundleVerification::summary", + "kind": "struct_field", + "owner": "prolly::IndexedSnapshotBundleVerification", "member_kind": "field", "family": "indexed-map", "classification": "portable", @@ -10192,9 +13001,9 @@ "bucket": "unreviewed_data_model" }, { - "rust": "prolly::IndexedSnapshotBundleSummary::node_count", + "rust": "prolly::IndexedSnapshotBundleVerification::valid", "kind": "struct_field", - "owner": "prolly::IndexedSnapshotBundleSummary", + "owner": "prolly::IndexedSnapshotBundleVerification", "member_kind": "field", "family": "indexed-map", "classification": "portable", @@ -10202,19 +13011,19 @@ "bucket": "unreviewed_data_model" }, { - "rust": "prolly::IndexedSnapshotBundleSummary::source_map_id", - "kind": "struct_field", - "owner": "prolly::IndexedSnapshotBundleSummary", - "member_kind": "field", + "rust": "prolly::IndexedSnapshotId", + "kind": "struct", + "owner": null, + "member_kind": null, "family": "indexed-map", "classification": "portable", "status": "planned", "bucket": "unreviewed_data_model" }, { - "rust": "prolly::IndexedSnapshotBundleSummary::source_version", + "rust": "prolly::IndexedSnapshotId::0", "kind": "struct_field", - "owner": "prolly::IndexedSnapshotBundleSummary", + "owner": "prolly::IndexedSnapshotId", "member_kind": "field", "family": "indexed-map", "classification": "portable", @@ -10222,17 +13031,17 @@ "bucket": "unreviewed_data_model" }, { - "rust": "prolly::IndexedSnapshotBundleSummary::state_version", - "kind": "struct_field", - "owner": "prolly::IndexedSnapshotBundleSummary", - "member_kind": "field", + "rust": "prolly::IndexedSnapshotId::as_cid", + "kind": "function", + "owner": "prolly::IndexedSnapshotId", + "member_kind": "inherent-item", "family": "indexed-map", "classification": "portable", "status": "planned", - "bucket": "unreviewed_data_model" + "bucket": "unreviewed_runtime_candidate" }, { - "rust": "prolly::IndexedSnapshotBundleVerification", + "rust": "prolly::IndexedSnapshotManifest", "kind": "struct", "owner": null, "member_kind": null, @@ -10242,9 +13051,9 @@ "bucket": "unreviewed_data_model" }, { - "rust": "prolly::IndexedSnapshotBundleVerification::reachable_nodes", + "rust": "prolly::IndexedSnapshotManifest::descriptors", "kind": "struct_field", - "owner": "prolly::IndexedSnapshotBundleVerification", + "owner": "prolly::IndexedSnapshotManifest", "member_kind": "field", "family": "indexed-map", "classification": "portable", @@ -10252,9 +13061,9 @@ "bucket": "unreviewed_data_model" }, { - "rust": "prolly::IndexedSnapshotBundleVerification::summary", + "rust": "prolly::IndexedSnapshotManifest::format_version", "kind": "struct_field", - "owner": "prolly::IndexedSnapshotBundleVerification", + "owner": "prolly::IndexedSnapshotManifest", "member_kind": "field", "family": "indexed-map", "classification": "portable", @@ -10262,29 +13071,39 @@ "bucket": "unreviewed_data_model" }, { - "rust": "prolly::IndexedSnapshotBundleVerification::valid", - "kind": "struct_field", - "owner": "prolly::IndexedSnapshotBundleVerification", - "member_kind": "field", + "rust": "prolly::IndexedSnapshotManifest::from_bytes", + "kind": "function", + "owner": "prolly::IndexedSnapshotManifest", + "member_kind": "inherent-item", "family": "indexed-map", "classification": "portable", "status": "planned", - "bucket": "unreviewed_data_model" + "bucket": "unreviewed_runtime_candidate" }, { - "rust": "prolly::IndexedSnapshotId", - "kind": "struct", - "owner": null, - "member_kind": null, + "rust": "prolly::IndexedSnapshotManifest::from_state_head", + "kind": "function", + "owner": "prolly::IndexedSnapshotManifest", + "member_kind": "inherent-item", + "family": "indexed-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::IndexedSnapshotManifest::record", + "kind": "struct_field", + "owner": "prolly::IndexedSnapshotManifest", + "member_kind": "field", "family": "indexed-map", "classification": "portable", "status": "planned", "bucket": "unreviewed_data_model" }, { - "rust": "prolly::IndexedSnapshotId::0", + "rust": "prolly::IndexedSnapshotManifest::snapshot_id", "kind": "struct_field", - "owner": "prolly::IndexedSnapshotId", + "owner": "prolly::IndexedSnapshotManifest", "member_kind": "field", "family": "indexed-map", "classification": "portable", @@ -10292,9 +13111,19 @@ "bucket": "unreviewed_data_model" }, { - "rust": "prolly::IndexedSnapshotId::as_cid", + "rust": "prolly::IndexedSnapshotManifest::to_bytes", "kind": "function", - "owner": "prolly::IndexedSnapshotId", + "owner": "prolly::IndexedSnapshotManifest", + "member_kind": "inherent-item", + "family": "indexed-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::IndexedSnapshotManifest::validate", + "kind": "function", + "owner": "prolly::IndexedSnapshotManifest", "member_kind": "inherent-item", "family": "indexed-map", "classification": "portable", @@ -10481,6 +13310,16 @@ "status": "planned", "bucket": "unreviewed_data_model" }, + { + "rust": "prolly::IndexedVersion::snapshot_id", + "kind": "struct_field", + "owner": "prolly::IndexedVersion", + "member_kind": "field", + "family": "indexed-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, { "rust": "prolly::IndexedVersion::source", "kind": "struct_field", @@ -11151,6 +13990,16 @@ "status": "implemented", "bucket": "release_complete" }, + { + "rust": "prolly::ManifestStoreScan::list_roots_page", + "kind": "function", + "owner": "prolly::ManifestStoreScan", + "member_kind": "trait-item", + "family": "core", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_rust_abstraction" + }, { "rust": "prolly::ManifestUpdate", "kind": "enum", @@ -12131,6 +14980,36 @@ "status": "planned", "bucket": "unreviewed_data_model" }, + { + "rust": "prolly::MapVersionCursor", + "kind": "struct", + "owner": null, + "member_kind": null, + "family": "versioned-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, + { + "rust": "prolly::MapVersionCursor::scope", + "kind": "function", + "owner": "prolly::MapVersionCursor", + "member_kind": "inherent-item", + "family": "versioned-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::MapVersionCursor::version", + "kind": "function", + "owner": "prolly::MapVersionCursor", + "member_kind": "inherent-item", + "family": "versioned-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, { "rust": "prolly::MapVersionId", "kind": "struct", @@ -12181,6 +15060,36 @@ "status": "planned", "bucket": "reviewed_incomplete" }, + { + "rust": "prolly::MapVersionPage", + "kind": "struct", + "owner": null, + "member_kind": null, + "family": "versioned-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, + { + "rust": "prolly::MapVersionPage::next_cursor", + "kind": "struct_field", + "owner": "prolly::MapVersionPage", + "member_kind": "field", + "family": "versioned-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, + { + "rust": "prolly::MapVersionPage::versions", + "kind": "struct_field", + "owner": "prolly::MapVersionPage", + "member_kind": "field", + "family": "versioned-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, { "rust": "prolly::MemBlobStore", "kind": "struct", @@ -13731,6 +16640,36 @@ "status": "planned", "bucket": "unreviewed_runtime_candidate" }, + { + "rust": "prolly::NamedRootManifestPage", + "kind": "struct", + "owner": null, + "member_kind": null, + "family": "core", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, + { + "rust": "prolly::NamedRootManifestPage::next_after", + "kind": "struct_field", + "owner": "prolly::NamedRootManifestPage", + "member_kind": "field", + "family": "core", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, + { + "rust": "prolly::NamedRootManifestPage::roots", + "kind": "struct_field", + "owner": "prolly::NamedRootManifestPage", + "member_kind": "field", + "family": "core", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, { "rust": "prolly::NamedRootRetention", "kind": "enum", @@ -14711,6 +17650,16 @@ "status": "planned", "bucket": "unreviewed_runtime_candidate" }, + { + "rust": "prolly::OwnedAsyncProllyTransaction::compare_and_swap_named_root_at_millis", + "kind": "function", + "owner": "prolly::OwnedAsyncProllyTransaction", + "member_kind": "inherent-item", + "family": "core", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, { "rust": "prolly::OwnedAsyncProllyTransaction::create", "kind": "function", @@ -14761,6 +17710,16 @@ "status": "planned", "bucket": "unreviewed_runtime_candidate" }, + { + "rust": "prolly::OwnedAsyncProllyTransaction::load_named_roots_ordered", + "kind": "function", + "owner": "prolly::OwnedAsyncProllyTransaction", + "member_kind": "inherent-item", + "family": "core", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, { "rust": "prolly::OwnedAsyncProllyTransaction::publish_named_root", "kind": "function", @@ -14851,6 +17810,16 @@ "status": "planned", "bucket": "unreviewed_runtime_candidate" }, + { + "rust": "prolly::OwnedProllyTransaction::compare_and_swap_named_root_at_millis", + "kind": "function", + "owner": "prolly::OwnedProllyTransaction", + "member_kind": "inherent-item", + "family": "core", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, { "rust": "prolly::OwnedProllyTransaction::create", "kind": "function", @@ -15761,6 +18730,16 @@ "status": "planned", "bucket": "unreviewed_runtime_candidate" }, + { + "rust": "prolly::Prolly::cache_usage", + "kind": "function", + "owner": "prolly::Prolly", + "member_kind": "inherent-item", + "family": "core", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, { "rust": "prolly::Prolly::checkpoint_snapshots", "kind": "function", @@ -16001,6 +18980,16 @@ "status": "planned", "bucket": "reviewed_incomplete" }, + { + "rust": "prolly::Prolly::export_snapshot_with_limits", + "kind": "function", + "owner": "prolly::Prolly", + "member_kind": "inherent-item", + "family": "maintenance", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, { "rust": "prolly::Prolly::first_entry", "kind": "function", @@ -17051,6 +20040,56 @@ "status": "planned", "bucket": "unreviewed_runtime_candidate" }, + { + "rust": "prolly::ProllyCacheUsage", + "kind": "struct", + "owner": null, + "member_kind": null, + "family": "core", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, + { + "rust": "prolly::ProllyCacheUsage::entries", + "kind": "struct_field", + "owner": "prolly::ProllyCacheUsage", + "member_kind": "field", + "family": "core", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, + { + "rust": "prolly::ProllyCacheUsage::pinned_entries", + "kind": "struct_field", + "owner": "prolly::ProllyCacheUsage", + "member_kind": "field", + "family": "core", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, + { + "rust": "prolly::ProllyCacheUsage::pinned_serialized_bytes", + "kind": "struct_field", + "owner": "prolly::ProllyCacheUsage", + "member_kind": "field", + "family": "core", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, + { + "rust": "prolly::ProllyCacheUsage::serialized_bytes", + "kind": "struct_field", + "owner": "prolly::ProllyCacheUsage", + "member_kind": "field", + "family": "core", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, { "rust": "prolly::ProllyEngine", "kind": "struct", @@ -17132,7 +20171,17 @@ "bucket": "unreviewed_runtime_candidate" }, { - "rust": "prolly::ProllyEngine::cache_bytes_len", + "rust": "prolly::ProllyEngine::cache_bytes_len", + "kind": "function", + "owner": "prolly::ProllyEngine", + "member_kind": "inherent-item", + "family": "core", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::ProllyEngine::cache_len", "kind": "function", "owner": "prolly::ProllyEngine", "member_kind": "inherent-item", @@ -17142,7 +20191,7 @@ "bucket": "unreviewed_runtime_candidate" }, { - "rust": "prolly::ProllyEngine::cache_len", + "rust": "prolly::ProllyEngine::cache_pinned_bytes_len", "kind": "function", "owner": "prolly::ProllyEngine", "member_kind": "inherent-item", @@ -17152,7 +20201,7 @@ "bucket": "unreviewed_runtime_candidate" }, { - "rust": "prolly::ProllyEngine::cache_pinned_bytes_len", + "rust": "prolly::ProllyEngine::cache_pinned_len", "kind": "function", "owner": "prolly::ProllyEngine", "member_kind": "inherent-item", @@ -17162,7 +20211,7 @@ "bucket": "unreviewed_runtime_candidate" }, { - "rust": "prolly::ProllyEngine::cache_pinned_len", + "rust": "prolly::ProllyEngine::cache_usage", "kind": "function", "owner": "prolly::ProllyEngine", "member_kind": "inherent-item", @@ -17381,6 +20430,16 @@ "status": "planned", "bucket": "unreviewed_runtime_candidate" }, + { + "rust": "prolly::ProllyEngine::export_snapshot_with_limits", + "kind": "function", + "owner": "prolly::ProllyEngine", + "member_kind": "inherent-item", + "family": "maintenance", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, { "rust": "prolly::ProllyEngine::first_entry", "kind": "function", @@ -17491,6 +20550,26 @@ "status": "planned", "bucket": "unreviewed_runtime_candidate" }, + { + "rust": "prolly::ProllyEngine::indexed_map", + "kind": "function", + "owner": "prolly::ProllyEngine", + "member_kind": "inherent-item", + "family": "indexed-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::ProllyEngine::indexed_map_with_policy", + "kind": "function", + "owner": "prolly::ProllyEngine", + "member_kind": "inherent-item", + "family": "indexed-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, { "rust": "prolly::ProllyEngine::last_entry", "kind": "function", @@ -17531,6 +20610,16 @@ "status": "planned", "bucket": "unreviewed_runtime_candidate" }, + { + "rust": "prolly::ProllyEngine::list_named_root_manifests_page", + "kind": "function", + "owner": "prolly::ProllyEngine", + "member_kind": "inherent-item", + "family": "core", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, { "rust": "prolly::ProllyEngine::list_named_roots", "kind": "function", @@ -17571,6 +20660,16 @@ "status": "planned", "bucket": "unreviewed_runtime_candidate" }, + { + "rust": "prolly::ProllyEngine::load_named_roots_ordered", + "kind": "function", + "owner": "prolly::ProllyEngine", + "member_kind": "inherent-item", + "family": "core", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, { "rust": "prolly::ProllyEngine::load_retained_named_roots", "kind": "function", @@ -17621,6 +20720,26 @@ "status": "planned", "bucket": "reviewed_incomplete" }, + { + "rust": "prolly::ProllyEngine::mark_reachable_blobs_with_limits", + "kind": "function", + "owner": "prolly::ProllyEngine", + "member_kind": "inherent-item", + "family": "maintenance", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::ProllyEngine::mark_reachable_with_limits", + "kind": "function", + "owner": "prolly::ProllyEngine", + "member_kind": "inherent-item", + "family": "core", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, { "rust": "prolly::ProllyEngine::merge", "kind": "function", @@ -17791,6 +20910,46 @@ "status": "planned", "bucket": "unreviewed_runtime_candidate" }, + { + "rust": "prolly::ProllyEngine::prepare_indexed_map", + "kind": "function", + "owner": "prolly::ProllyEngine", + "member_kind": "inherent-item", + "family": "indexed-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::ProllyEngine::prepare_indexed_map_from_source", + "kind": "function", + "owner": "prolly::ProllyEngine", + "member_kind": "inherent-item", + "family": "indexed-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::ProllyEngine::prepare_indexed_map_from_source_with_policy", + "kind": "function", + "owner": "prolly::ProllyEngine", + "member_kind": "inherent-item", + "family": "indexed-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::ProllyEngine::prepare_indexed_map_with_policy", + "kind": "function", + "owner": "prolly::ProllyEngine", + "member_kind": "inherent-item", + "family": "indexed-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, { "rust": "prolly::ProllyEngine::prove_diff_page", "kind": "function", @@ -18481,6 +21640,16 @@ "status": "planned", "bucket": "unreviewed_runtime_candidate" }, + { + "rust": "prolly::ProllyTransaction::compare_and_swap_named_root_at_millis", + "kind": "function", + "owner": "prolly::ProllyTransaction", + "member_kind": "inherent-item", + "family": "core", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, { "rust": "prolly::ProllyTransaction::create", "kind": "function", @@ -21791,6 +24960,36 @@ "status": "planned", "bucket": "unreviewed_runtime_candidate" }, + { + "rust": "prolly::RemoteNamedRootPage", + "kind": "struct", + "owner": null, + "member_kind": null, + "family": "core", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, + { + "rust": "prolly::RemoteNamedRootPage::next_after", + "kind": "struct_field", + "owner": "prolly::RemoteNamedRootPage", + "member_kind": "field", + "family": "core", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, + { + "rust": "prolly::RemoteNamedRootPage::roots", + "kind": "struct_field", + "owner": "prolly::RemoteNamedRootPage", + "member_kind": "field", + "family": "core", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, { "rust": "prolly::RemoteProllyStore", "kind": "struct", @@ -21811,6 +25010,16 @@ "status": "planned", "bucket": "unreviewed_runtime_candidate" }, + { + "rust": "prolly::RemoteProllyStore::config", + "kind": "function", + "owner": "prolly::RemoteProllyStore", + "member_kind": "inherent-item", + "family": "core", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, { "rust": "prolly::RemoteProllyStore::into_backend", "kind": "function", @@ -22041,6 +25250,26 @@ "status": "implemented", "bucket": "release_complete" }, + { + "rust": "prolly::RemoteStoreBackend::get_root_manifests_ordered", + "kind": "function", + "owner": "prolly::RemoteStoreBackend", + "member_kind": "trait-item", + "family": "core", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_rust_abstraction" + }, + { + "rust": "prolly::RemoteStoreBackend::guarantees_durable_publication", + "kind": "function", + "owner": "prolly::RemoteStoreBackend", + "member_kind": "trait-item", + "family": "core", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_rust_abstraction" + }, { "rust": "prolly::RemoteStoreBackend::list_node_cids", "kind": "function", @@ -22061,6 +25290,16 @@ "status": "implemented", "bucket": "release_complete" }, + { + "rust": "prolly::RemoteStoreBackend::list_root_manifests_page", + "kind": "function", + "owner": "prolly::RemoteStoreBackend", + "member_kind": "trait-item", + "family": "core", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_rust_abstraction" + }, { "rust": "prolly::RemoteStoreBackend::prefers_batch_reads", "kind": "function", @@ -22911,6 +26150,16 @@ "status": "planned", "bucket": "unreviewed_data_model" }, + { + "rust": "prolly::SearchBackend::TurboQuantized", + "kind": "variant", + "owner": "prolly::SearchBackend", + "member_kind": "variant", + "family": "proximity-map", + "classification": "portable", + "status": "implemented", + "bucket": "release_complete" + }, { "rust": "prolly::SearchBudget", "kind": "struct", @@ -23171,6 +26420,16 @@ "status": "planned", "bucket": "unreviewed_data_model" }, + { + "rust": "prolly::SearchOptions::turboquant", + "kind": "struct_field", + "owner": "prolly::SearchOptions", + "member_kind": "field", + "family": "core", + "classification": "portable", + "status": "implemented", + "bucket": "release_complete" + }, { "rust": "prolly::SearchPlan", "kind": "enum", @@ -23231,6 +26490,16 @@ "status": "planned", "bucket": "unreviewed_data_model" }, + { + "rust": "prolly::SearchPlan::TurboQuantized", + "kind": "variant", + "owner": "prolly::SearchPlan", + "member_kind": "variant", + "family": "proximity-map", + "classification": "portable", + "status": "implemented", + "bucket": "release_complete" + }, { "rust": "prolly::SearchPlan::summary", "kind": "function", @@ -23631,6 +26900,16 @@ "status": "planned", "bucket": "unreviewed_data_model" }, + { + "rust": "prolly::SearchRuntimePolicy::turboquant_max_bytes", + "kind": "struct_field", + "owner": "prolly::SearchRuntimePolicy", + "member_kind": "field", + "family": "core", + "classification": "portable", + "status": "implemented", + "bucket": "release_complete" + }, { "rust": "prolly::SearchRuntimePolicy::validate", "kind": "function", @@ -25061,6 +28340,46 @@ "status": "planned", "bucket": "unreviewed_data_model" }, + { + "rust": "prolly::SnapshotExportLimits", + "kind": "struct", + "owner": null, + "member_kind": null, + "family": "maintenance", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, + { + "rust": "prolly::SnapshotExportLimits::max_bytes", + "kind": "struct_field", + "owner": "prolly::SnapshotExportLimits", + "member_kind": "field", + "family": "maintenance", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, + { + "rust": "prolly::SnapshotExportLimits::max_nodes", + "kind": "struct_field", + "owner": "prolly::SnapshotExportLimits", + "member_kind": "field", + "family": "maintenance", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, + { + "rust": "prolly::SnapshotExportLimits::new", + "kind": "function", + "owner": "prolly::SnapshotExportLimits", + "member_kind": "inherent-item", + "family": "maintenance", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, { "rust": "prolly::SnapshotManager", "kind": "struct", @@ -26192,7 +29511,17 @@ "bucket": "release_complete" }, { - "rust": "prolly::Store::batch_get", + "rust": "prolly::Store::batch_get", + "kind": "function", + "owner": "prolly::Store", + "member_kind": "trait-item", + "family": "core", + "classification": "idiomatic", + "status": "implemented", + "bucket": "release_complete" + }, + { + "rust": "prolly::Store::batch_get_ordered", "kind": "function", "owner": "prolly::Store", "member_kind": "trait-item", @@ -26202,7 +29531,7 @@ "bucket": "release_complete" }, { - "rust": "prolly::Store::batch_get_ordered", + "rust": "prolly::Store::batch_get_ordered_unique", "kind": "function", "owner": "prolly::Store", "member_kind": "trait-item", @@ -26212,7 +29541,7 @@ "bucket": "release_complete" }, { - "rust": "prolly::Store::batch_get_ordered_unique", + "rust": "prolly::Store::batch_get_shared_ordered_unique", "kind": "function", "owner": "prolly::Store", "member_kind": "trait-item", @@ -26222,7 +29551,7 @@ "bucket": "release_complete" }, { - "rust": "prolly::Store::batch_get_shared_ordered_unique", + "rust": "prolly::Store::batch_get_validated_shared_ordered_unique", "kind": "function", "owner": "prolly::Store", "member_kind": "trait-item", @@ -26291,6 +29620,16 @@ "status": "implemented", "bucket": "release_complete" }, + { + "rust": "prolly::Store::get_validated_shared", + "kind": "function", + "owner": "prolly::Store", + "member_kind": "trait-item", + "family": "core", + "classification": "idiomatic", + "status": "implemented", + "bucket": "release_complete" + }, { "rust": "prolly::Store::has_native_shared_reads", "kind": "function", @@ -27722,19 +31061,259 @@ "bucket": "unreviewed_data_model" }, { - "rust": "prolly::TreeFormat::validate", - "kind": "function", - "owner": "prolly::TreeFormat", - "member_kind": "inherent-item", + "rust": "prolly::TreeFormat::validate", + "kind": "function", + "owner": "prolly::TreeFormat", + "member_kind": "inherent-item", + "family": "core", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::TreeFormat::value_encoding", + "kind": "struct_field", + "owner": "prolly::TreeFormat", + "member_kind": "field", + "family": "core", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, + { + "rust": "prolly::TreeStats", + "kind": "struct", + "owner": null, + "member_kind": null, + "family": "core", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, + { + "rust": "prolly::TreeStats::accumulate", + "kind": "function", + "owner": "prolly::TreeStats", + "member_kind": "inherent-item", + "family": "core", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::TreeStats::add_node", + "kind": "function", + "owner": "prolly::TreeStats", + "member_kind": "inherent-item", + "family": "core", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::TreeStats::avg_entries_per_level", + "kind": "struct_field", + "owner": "prolly::TreeStats", + "member_kind": "field", + "family": "core", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, + { + "rust": "prolly::TreeStats::avg_entries_per_node", + "kind": "struct_field", + "owner": "prolly::TreeStats", + "member_kind": "field", + "family": "core", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, + { + "rust": "prolly::TreeStats::avg_fanout", + "kind": "struct_field", + "owner": "prolly::TreeStats", + "member_kind": "field", + "family": "core", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, + { + "rust": "prolly::TreeStats::avg_fill_factor", + "kind": "struct_field", + "owner": "prolly::TreeStats", + "member_kind": "field", + "family": "core", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, + { + "rust": "prolly::TreeStats::avg_internal_fill_factor", + "kind": "struct_field", + "owner": "prolly::TreeStats", + "member_kind": "field", + "family": "core", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, + { + "rust": "prolly::TreeStats::avg_key_size_bytes", + "kind": "struct_field", + "owner": "prolly::TreeStats", + "member_kind": "field", + "family": "core", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, + { + "rust": "prolly::TreeStats::avg_leaf_fill_factor", + "kind": "struct_field", + "owner": "prolly::TreeStats", + "member_kind": "field", + "family": "core", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, + { + "rust": "prolly::TreeStats::avg_node_size_bytes", + "kind": "struct_field", + "owner": "prolly::TreeStats", + "member_kind": "field", + "family": "core", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, + { + "rust": "prolly::TreeStats::avg_node_size_per_level", + "kind": "struct_field", + "owner": "prolly::TreeStats", + "member_kind": "field", + "family": "core", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, + { + "rust": "prolly::TreeStats::avg_value_size_bytes", + "kind": "struct_field", + "owner": "prolly::TreeStats", + "member_kind": "field", + "family": "core", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, + { + "rust": "prolly::TreeStats::diff", + "kind": "function", + "owner": "prolly::TreeStats", + "member_kind": "inherent-item", + "family": "core", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::TreeStats::finalize", + "kind": "function", + "owner": "prolly::TreeStats", + "member_kind": "inherent-item", + "family": "core", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::TreeStats::max_entries_per_level", + "kind": "struct_field", + "owner": "prolly::TreeStats", + "member_kind": "field", + "family": "core", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, + { + "rust": "prolly::TreeStats::max_fanout", + "kind": "struct_field", + "owner": "prolly::TreeStats", + "member_kind": "field", + "family": "core", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, + { + "rust": "prolly::TreeStats::max_key_size_bytes", + "kind": "struct_field", + "owner": "prolly::TreeStats", + "member_kind": "field", + "family": "core", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, + { + "rust": "prolly::TreeStats::max_node_size_bytes", + "kind": "struct_field", + "owner": "prolly::TreeStats", + "member_kind": "field", + "family": "core", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, + { + "rust": "prolly::TreeStats::max_value_size_bytes", + "kind": "struct_field", + "owner": "prolly::TreeStats", + "member_kind": "field", + "family": "core", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, + { + "rust": "prolly::TreeStats::min_entries_per_level", + "kind": "struct_field", + "owner": "prolly::TreeStats", + "member_kind": "field", + "family": "core", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, + { + "rust": "prolly::TreeStats::min_fanout", + "kind": "struct_field", + "owner": "prolly::TreeStats", + "member_kind": "field", + "family": "core", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_data_model" + }, + { + "rust": "prolly::TreeStats::min_key_size_bytes", + "kind": "struct_field", + "owner": "prolly::TreeStats", + "member_kind": "field", "family": "core", "classification": "portable", "status": "planned", - "bucket": "unreviewed_runtime_candidate" + "bucket": "unreviewed_data_model" }, { - "rust": "prolly::TreeFormat::value_encoding", + "rust": "prolly::TreeStats::min_node_size_bytes", "kind": "struct_field", - "owner": "prolly::TreeFormat", + "owner": "prolly::TreeStats", "member_kind": "field", "family": "core", "classification": "portable", @@ -27742,17 +31321,17 @@ "bucket": "unreviewed_data_model" }, { - "rust": "prolly::TreeStats", - "kind": "struct", - "owner": null, - "member_kind": null, + "rust": "prolly::TreeStats::min_value_size_bytes", + "kind": "struct_field", + "owner": "prolly::TreeStats", + "member_kind": "field", "family": "core", "classification": "portable", "status": "planned", "bucket": "unreviewed_data_model" }, { - "rust": "prolly::TreeStats::accumulate", + "rust": "prolly::TreeStats::new", "kind": "function", "owner": "prolly::TreeStats", "member_kind": "inherent-item", @@ -27762,17 +31341,17 @@ "bucket": "unreviewed_runtime_candidate" }, { - "rust": "prolly::TreeStats::add_node", - "kind": "function", + "rust": "prolly::TreeStats::nodes_per_level", + "kind": "struct_field", "owner": "prolly::TreeStats", - "member_kind": "inherent-item", + "member_kind": "field", "family": "core", "classification": "portable", "status": "planned", - "bucket": "unreviewed_runtime_candidate" + "bucket": "unreviewed_data_model" }, { - "rust": "prolly::TreeStats::avg_entries_per_level", + "rust": "prolly::TreeStats::num_internal_nodes", "kind": "struct_field", "owner": "prolly::TreeStats", "member_kind": "field", @@ -27782,7 +31361,7 @@ "bucket": "unreviewed_data_model" }, { - "rust": "prolly::TreeStats::avg_entries_per_node", + "rust": "prolly::TreeStats::num_leaves", "kind": "struct_field", "owner": "prolly::TreeStats", "member_kind": "field", @@ -27792,7 +31371,7 @@ "bucket": "unreviewed_data_model" }, { - "rust": "prolly::TreeStats::avg_fanout", + "rust": "prolly::TreeStats::num_nodes", "kind": "struct_field", "owner": "prolly::TreeStats", "member_kind": "field", @@ -27802,27 +31381,27 @@ "bucket": "unreviewed_data_model" }, { - "rust": "prolly::TreeStats::avg_fill_factor", - "kind": "struct_field", + "rust": "prolly::TreeStats::percentage_change", + "kind": "function", "owner": "prolly::TreeStats", - "member_kind": "field", + "member_kind": "inherent-item", "family": "core", "classification": "portable", "status": "planned", - "bucket": "unreviewed_data_model" + "bucket": "unreviewed_runtime_candidate" }, { - "rust": "prolly::TreeStats::avg_internal_fill_factor", - "kind": "struct_field", + "rust": "prolly::TreeStats::remove_node", + "kind": "function", "owner": "prolly::TreeStats", - "member_kind": "field", + "member_kind": "inherent-item", "family": "core", "classification": "portable", "status": "planned", - "bucket": "unreviewed_data_model" + "bucket": "unreviewed_runtime_candidate" }, { - "rust": "prolly::TreeStats::avg_key_size_bytes", + "rust": "prolly::TreeStats::total_key_value_pairs", "kind": "struct_field", "owner": "prolly::TreeStats", "member_kind": "field", @@ -27832,7 +31411,7 @@ "bucket": "unreviewed_data_model" }, { - "rust": "prolly::TreeStats::avg_leaf_fill_factor", + "rust": "prolly::TreeStats::total_keys_size_bytes", "kind": "struct_field", "owner": "prolly::TreeStats", "member_kind": "field", @@ -27842,7 +31421,7 @@ "bucket": "unreviewed_data_model" }, { - "rust": "prolly::TreeStats::avg_node_size_bytes", + "rust": "prolly::TreeStats::total_tree_size_bytes", "kind": "struct_field", "owner": "prolly::TreeStats", "member_kind": "field", @@ -27852,7 +31431,7 @@ "bucket": "unreviewed_data_model" }, { - "rust": "prolly::TreeStats::avg_node_size_per_level", + "rust": "prolly::TreeStats::total_values_size_bytes", "kind": "struct_field", "owner": "prolly::TreeStats", "member_kind": "field", @@ -27862,7 +31441,7 @@ "bucket": "unreviewed_data_model" }, { - "rust": "prolly::TreeStats::avg_value_size_bytes", + "rust": "prolly::TreeStats::tree_height", "kind": "struct_field", "owner": "prolly::TreeStats", "member_kind": "field", @@ -27872,7 +31451,7 @@ "bucket": "unreviewed_data_model" }, { - "rust": "prolly::TreeStats::diff", + "rust": "prolly::TreeStats::update_node", "kind": "function", "owner": "prolly::TreeStats", "member_kind": "inherent-item", @@ -27882,7 +31461,7 @@ "bucket": "unreviewed_runtime_candidate" }, { - "rust": "prolly::TreeStats::finalize", + "rust": "prolly::TreeStats::validate", "kind": "function", "owner": "prolly::TreeStats", "member_kind": "inherent-item", @@ -27892,244 +31471,394 @@ "bucket": "unreviewed_runtime_candidate" }, { - "rust": "prolly::TreeStats::max_entries_per_level", + "rust": "prolly::TurboQuantSearchOptions", + "kind": "struct", + "owner": null, + "member_kind": null, + "family": "core", + "classification": "portable", + "status": "implemented", + "bucket": "release_complete" + }, + { + "rust": "prolly::TurboQuantSearchOptions::rerank_multiplier", "kind": "struct_field", - "owner": "prolly::TreeStats", + "owner": "prolly::TurboQuantSearchOptions", "member_kind": "field", "family": "core", "classification": "portable", - "status": "planned", - "bucket": "unreviewed_data_model" + "status": "implemented", + "bucket": "release_complete" }, { - "rust": "prolly::TreeStats::max_fanout", + "rust": "prolly::TurboQuantizationBuildLimits", + "kind": "struct", + "owner": null, + "member_kind": null, + "family": "proximity-map", + "classification": "portable", + "status": "implemented", + "bucket": "release_complete" + }, + { + "rust": "prolly::TurboQuantizationBuildLimits::max_encoded_output_bytes", "kind": "struct_field", - "owner": "prolly::TreeStats", + "owner": "prolly::TurboQuantizationBuildLimits", "member_kind": "field", - "family": "core", + "family": "proximity-map", "classification": "portable", - "status": "planned", - "bucket": "unreviewed_data_model" + "status": "implemented", + "bucket": "release_complete" }, { - "rust": "prolly::TreeStats::max_key_size_bytes", + "rust": "prolly::TurboQuantizationBuildLimits::max_input_bytes", "kind": "struct_field", - "owner": "prolly::TreeStats", + "owner": "prolly::TurboQuantizationBuildLimits", "member_kind": "field", - "family": "core", + "family": "proximity-map", "classification": "portable", - "status": "planned", - "bucket": "unreviewed_data_model" + "status": "implemented", + "bucket": "release_complete" }, { - "rust": "prolly::TreeStats::max_node_size_bytes", + "rust": "prolly::TurboQuantizationBuildLimits::max_records", "kind": "struct_field", - "owner": "prolly::TreeStats", + "owner": "prolly::TurboQuantizationBuildLimits", "member_kind": "field", - "family": "core", + "family": "proximity-map", "classification": "portable", - "status": "planned", - "bucket": "unreviewed_data_model" + "status": "implemented", + "bucket": "release_complete" }, { - "rust": "prolly::TreeStats::max_value_size_bytes", + "rust": "prolly::TurboQuantizationBuildLimits::max_temporary_bytes", "kind": "struct_field", - "owner": "prolly::TreeStats", + "owner": "prolly::TurboQuantizationBuildLimits", "member_kind": "field", - "family": "core", + "family": "proximity-map", "classification": "portable", - "status": "planned", - "bucket": "unreviewed_data_model" + "status": "implemented", + "bucket": "release_complete" }, { - "rust": "prolly::TreeStats::min_entries_per_level", + "rust": "prolly::TurboQuantizationBuildLimits::max_transform_operations", "kind": "struct_field", - "owner": "prolly::TreeStats", + "owner": "prolly::TurboQuantizationBuildLimits", "member_kind": "field", - "family": "core", + "family": "proximity-map", "classification": "portable", - "status": "planned", - "bucket": "unreviewed_data_model" + "status": "implemented", + "bucket": "release_complete" }, { - "rust": "prolly::TreeStats::min_fanout", + "rust": "prolly::TurboQuantizationBuildLimits::max_worker_threads", "kind": "struct_field", - "owner": "prolly::TreeStats", + "owner": "prolly::TurboQuantizationBuildLimits", "member_kind": "field", - "family": "core", + "family": "proximity-map", "classification": "portable", - "status": "planned", - "bucket": "unreviewed_data_model" + "status": "implemented", + "bucket": "release_complete" }, { - "rust": "prolly::TreeStats::min_key_size_bytes", + "rust": "prolly::TurboQuantizationBuildStats", + "kind": "struct", + "owner": null, + "member_kind": null, + "family": "proximity-map", + "classification": "portable", + "status": "implemented", + "bucket": "release_complete" + }, + { + "rust": "prolly::TurboQuantizationBuildStats::butterfly_operations", "kind": "struct_field", - "owner": "prolly::TreeStats", + "owner": "prolly::TurboQuantizationBuildStats", "member_kind": "field", - "family": "core", + "family": "proximity-map", "classification": "portable", - "status": "planned", - "bucket": "unreviewed_data_model" + "status": "implemented", + "bucket": "release_complete" }, { - "rust": "prolly::TreeStats::min_node_size_bytes", + "rust": "prolly::TurboQuantizationBuildStats::encoded_output_bytes", "kind": "struct_field", - "owner": "prolly::TreeStats", + "owner": "prolly::TurboQuantizationBuildStats", "member_kind": "field", - "family": "core", + "family": "proximity-map", "classification": "portable", - "status": "planned", - "bucket": "unreviewed_data_model" + "status": "implemented", + "bucket": "release_complete" }, { - "rust": "prolly::TreeStats::min_value_size_bytes", + "rust": "prolly::TurboQuantizationBuildStats::encoded_vectors", + "kind": "struct_field", + "owner": "prolly::TurboQuantizationBuildStats", + "member_kind": "field", + "family": "proximity-map", + "classification": "portable", + "status": "implemented", + "bucket": "release_complete" + }, + { + "rust": "prolly::TurboQuantizationBuildStats::input_bytes", + "kind": "struct_field", + "owner": "prolly::TurboQuantizationBuildStats", + "member_kind": "field", + "family": "proximity-map", + "classification": "portable", + "status": "implemented", + "bucket": "release_complete" + }, + { + "rust": "prolly::TurboQuantizationBuildStats::peak_temporary_bytes", + "kind": "struct_field", + "owner": "prolly::TurboQuantizationBuildStats", + "member_kind": "field", + "family": "proximity-map", + "classification": "portable", + "status": "implemented", + "bucket": "release_complete" + }, + { + "rust": "prolly::TurboQuantizationBuildStats::transformed_components", + "kind": "struct_field", + "owner": "prolly::TurboQuantizationBuildStats", + "member_kind": "field", + "family": "proximity-map", + "classification": "portable", + "status": "implemented", + "bucket": "release_complete" + }, + { + "rust": "prolly::TurboQuantizationBuildStats::zero_vectors", + "kind": "struct_field", + "owner": "prolly::TurboQuantizationBuildStats", + "member_kind": "field", + "family": "proximity-map", + "classification": "portable", + "status": "implemented", + "bucket": "release_complete" + }, + { + "rust": "prolly::TurboQuantizationConfig", + "kind": "struct", + "owner": null, + "member_kind": null, + "family": "proximity-map", + "classification": "portable", + "status": "implemented", + "bucket": "release_complete" + }, + { + "rust": "prolly::TurboQuantizationConfig::bit_width", + "kind": "struct_field", + "owner": "prolly::TurboQuantizationConfig", + "member_kind": "field", + "family": "proximity-map", + "classification": "portable", + "status": "implemented", + "bucket": "release_complete" + }, + { + "rust": "prolly::TurboQuantizationConfig::rerank_multiplier", + "kind": "struct_field", + "owner": "prolly::TurboQuantizationConfig", + "member_kind": "field", + "family": "proximity-map", + "classification": "portable", + "status": "implemented", + "bucket": "release_complete" + }, + { + "rust": "prolly::TurboQuantizationConfig::seed", + "kind": "struct_field", + "owner": "prolly::TurboQuantizationConfig", + "member_kind": "field", + "family": "proximity-map", + "classification": "portable", + "status": "implemented", + "bucket": "release_complete" + }, + { + "rust": "prolly::TurboQuantizationQuality", + "kind": "struct", + "owner": null, + "member_kind": null, + "family": "proximity-map", + "classification": "portable", + "status": "implemented", + "bucket": "release_complete" + }, + { + "rust": "prolly::TurboQuantizationQuality::maximum_squared_error", + "kind": "struct_field", + "owner": "prolly::TurboQuantizationQuality", + "member_kind": "field", + "family": "proximity-map", + "classification": "portable", + "status": "implemented", + "bucket": "release_complete" + }, + { + "rust": "prolly::TurboQuantizationQuality::mean_squared_error", "kind": "struct_field", - "owner": "prolly::TreeStats", + "owner": "prolly::TurboQuantizationQuality", "member_kind": "field", - "family": "core", + "family": "proximity-map", "classification": "portable", - "status": "planned", - "bucket": "unreviewed_data_model" + "status": "implemented", + "bucket": "release_complete" }, { - "rust": "prolly::TreeStats::new", - "kind": "function", - "owner": "prolly::TreeStats", - "member_kind": "inherent-item", - "family": "core", + "rust": "prolly::TurboQuantizationVerification", + "kind": "struct", + "owner": null, + "member_kind": null, + "family": "proximity-map", "classification": "portable", - "status": "planned", - "bucket": "unreviewed_runtime_candidate" + "status": "implemented", + "bucket": "release_complete" }, { - "rust": "prolly::TreeStats::nodes_per_level", + "rust": "prolly::TurboQuantizationVerification::encoded_vectors", "kind": "struct_field", - "owner": "prolly::TreeStats", + "owner": "prolly::TurboQuantizationVerification", "member_kind": "field", - "family": "core", + "family": "proximity-map", "classification": "portable", - "status": "planned", - "bucket": "unreviewed_data_model" + "status": "implemented", + "bucket": "release_complete" }, { - "rust": "prolly::TreeStats::num_internal_nodes", + "rust": "prolly::TurboQuantizationVerification::quality", "kind": "struct_field", - "owner": "prolly::TreeStats", + "owner": "prolly::TurboQuantizationVerification", "member_kind": "field", - "family": "core", + "family": "proximity-map", "classification": "portable", - "status": "planned", - "bucket": "unreviewed_data_model" + "status": "implemented", + "bucket": "release_complete" }, { - "rust": "prolly::TreeStats::num_leaves", + "rust": "prolly::TurboQuantizationVerification::zero_vectors", "kind": "struct_field", - "owner": "prolly::TreeStats", + "owner": "prolly::TurboQuantizationVerification", "member_kind": "field", - "family": "core", + "family": "proximity-map", "classification": "portable", - "status": "planned", - "bucket": "unreviewed_data_model" + "status": "implemented", + "bucket": "release_complete" }, { - "rust": "prolly::TreeStats::num_nodes", - "kind": "struct_field", - "owner": "prolly::TreeStats", - "member_kind": "field", - "family": "core", + "rust": "prolly::TurboQuantizer", + "kind": "struct", + "owner": null, + "member_kind": null, + "family": "proximity-map", "classification": "portable", - "status": "planned", - "bucket": "unreviewed_data_model" + "status": "implemented", + "bucket": "release_complete" }, { - "rust": "prolly::TreeStats::percentage_change", + "rust": "prolly::TurboQuantizer::build", "kind": "function", - "owner": "prolly::TreeStats", + "owner": "prolly::TurboQuantizer", "member_kind": "inherent-item", - "family": "core", + "family": "proximity-map", "classification": "portable", - "status": "planned", - "bucket": "unreviewed_runtime_candidate" + "status": "implemented", + "bucket": "release_complete" }, { - "rust": "prolly::TreeStats::remove_node", + "rust": "prolly::TurboQuantizer::build_with_limits", "kind": "function", - "owner": "prolly::TreeStats", + "owner": "prolly::TurboQuantizer", "member_kind": "inherent-item", - "family": "core", + "family": "proximity-map", "classification": "portable", - "status": "planned", - "bucket": "unreviewed_runtime_candidate" + "status": "implemented", + "bucket": "release_complete" }, { - "rust": "prolly::TreeStats::total_key_value_pairs", - "kind": "struct_field", - "owner": "prolly::TreeStats", - "member_kind": "field", - "family": "core", + "rust": "prolly::TurboQuantizer::config", + "kind": "function", + "owner": "prolly::TurboQuantizer", + "member_kind": "inherent-item", + "family": "proximity-map", "classification": "portable", - "status": "planned", - "bucket": "unreviewed_data_model" + "status": "implemented", + "bucket": "release_complete" }, { - "rust": "prolly::TreeStats::total_keys_size_bytes", - "kind": "struct_field", - "owner": "prolly::TreeStats", - "member_kind": "field", - "family": "core", + "rust": "prolly::TurboQuantizer::load", + "kind": "function", + "owner": "prolly::TurboQuantizer", + "member_kind": "inherent-item", + "family": "proximity-map", "classification": "portable", - "status": "planned", - "bucket": "unreviewed_data_model" + "status": "implemented", + "bucket": "release_complete" }, { - "rust": "prolly::TreeStats::total_tree_size_bytes", - "kind": "struct_field", - "owner": "prolly::TreeStats", - "member_kind": "field", - "family": "core", + "rust": "prolly::TurboQuantizer::manifest_cid", + "kind": "function", + "owner": "prolly::TurboQuantizer", + "member_kind": "inherent-item", + "family": "proximity-map", "classification": "portable", - "status": "planned", - "bucket": "unreviewed_data_model" + "status": "implemented", + "bucket": "release_complete" }, { - "rust": "prolly::TreeStats::total_values_size_bytes", - "kind": "struct_field", - "owner": "prolly::TreeStats", - "member_kind": "field", - "family": "core", + "rust": "prolly::TurboQuantizer::prove_search", + "kind": "function", + "owner": "prolly::TurboQuantizer", + "member_kind": "inherent-item", + "family": "proximity-map", "classification": "portable", - "status": "planned", - "bucket": "unreviewed_data_model" + "status": "implemented", + "bucket": "release_complete" }, { - "rust": "prolly::TreeStats::tree_height", - "kind": "struct_field", - "owner": "prolly::TreeStats", - "member_kind": "field", - "family": "core", + "rust": "prolly::TurboQuantizer::quality", + "kind": "function", + "owner": "prolly::TurboQuantizer", + "member_kind": "inherent-item", + "family": "proximity-map", "classification": "portable", - "status": "planned", - "bucket": "unreviewed_data_model" + "status": "implemented", + "bucket": "release_complete" }, { - "rust": "prolly::TreeStats::update_node", + "rust": "prolly::TurboQuantizer::search", "kind": "function", - "owner": "prolly::TreeStats", + "owner": "prolly::TurboQuantizer", "member_kind": "inherent-item", - "family": "core", + "family": "proximity-map", "classification": "portable", - "status": "planned", - "bucket": "unreviewed_runtime_candidate" + "status": "implemented", + "bucket": "release_complete" }, { - "rust": "prolly::TreeStats::validate", + "rust": "prolly::TurboQuantizer::source_descriptor", "kind": "function", - "owner": "prolly::TreeStats", + "owner": "prolly::TurboQuantizer", "member_kind": "inherent-item", - "family": "core", + "family": "proximity-map", "classification": "portable", - "status": "planned", - "bucket": "unreviewed_runtime_candidate" + "status": "implemented", + "bucket": "release_complete" + }, + { + "rust": "prolly::TurboQuantizer::verify", + "kind": "function", + "owner": "prolly::TurboQuantizer", + "member_kind": "inherent-item", + "family": "proximity-map", + "classification": "portable", + "status": "implemented", + "bucket": "release_complete" }, { "rust": "prolly::TypedContentObject", @@ -29761,6 +33490,16 @@ "status": "implemented", "bucket": "release_complete" }, + { + "rust": "prolly::VersionedMapsTransaction::timestamp_millis", + "kind": "function", + "owner": "prolly::VersionedMapsTransaction", + "member_kind": "inherent-item", + "family": "versioned-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, { "rust": "prolly::VersionedValue", "kind": "struct", @@ -30301,6 +34040,16 @@ "status": "planned", "bucket": "unreviewed_runtime_candidate" }, + { + "rust": "prolly::compare_and_swap_named_content_root_async", + "kind": "function", + "owner": null, + "member_kind": null, + "family": "core", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, { "rust": "prolly::compare_and_swap_named_content_root_with_limits", "kind": "function", @@ -30311,6 +34060,16 @@ "status": "planned", "bucket": "unreviewed_runtime_candidate" }, + { + "rust": "prolly::compare_and_swap_named_content_root_with_limits_async", + "kind": "function", + "owner": null, + "member_kind": null, + "family": "core", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, { "rust": "prolly::content_references", "kind": "function", @@ -30321,6 +34080,16 @@ "status": "planned", "bucket": "unreviewed_runtime_candidate" }, + { + "rust": "prolly::content_references_async", + "kind": "function", + "owner": null, + "member_kind": null, + "family": "core", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, { "rust": "prolly::copy_and_publish_content_graph", "kind": "function", @@ -30471,6 +34240,16 @@ "status": "planned", "bucket": "unreviewed_runtime_candidate" }, + { + "rust": "prolly::indexed_collection_source_map_id", + "kind": "function", + "owner": null, + "member_kind": null, + "family": "indexed-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, { "rust": "prolly::inspect_proof_bundle", "kind": "function", @@ -30501,6 +34280,16 @@ "status": "planned", "bucket": "unreviewed_runtime_candidate" }, + { + "rust": "prolly::load_named_content_root_async", + "kind": "function", + "owner": null, + "member_kind": null, + "family": "core", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, { "rust": "prolly::load_named_content_root_with_limits", "kind": "function", @@ -30511,6 +34300,16 @@ "status": "planned", "bucket": "unreviewed_runtime_candidate" }, + { + "rust": "prolly::load_named_content_root_with_limits_async", + "kind": "function", + "owner": null, + "member_kind": null, + "family": "core", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, { "rust": "prolly::physical_index_key", "kind": "function", @@ -30561,6 +34360,16 @@ "status": "planned", "bucket": "unreviewed_runtime_candidate" }, + { + "rust": "prolly::put_named_content_root_async", + "kind": "function", + "owner": null, + "member_kind": null, + "family": "core", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, { "rust": "prolly::put_named_content_root_with_limits", "kind": "function", @@ -30571,6 +34380,16 @@ "status": "planned", "bucket": "unreviewed_runtime_candidate" }, + { + "rust": "prolly::put_named_content_root_with_limits_async", + "kind": "function", + "owner": null, + "member_kind": null, + "family": "core", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, { "rust": "prolly::remote_conformance", "kind": "module", @@ -30581,6 +34400,16 @@ "status": "implemented", "bucket": "release_complete" }, + { + "rust": "prolly::remote_conformance::assert_remote_backend_async_indexed_map_contract", + "kind": "function", + "owner": null, + "member_kind": null, + "family": "indexed-map", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" + }, { "rust": "prolly::remote_conformance::assert_remote_backend_contract", "kind": "function", @@ -30880,6 +34709,16 @@ "classification": "portable", "status": "planned", "bucket": "unreviewed_runtime_candidate" + }, + { + "rust": "prolly::walk_content_graph_async", + "kind": "function", + "owner": null, + "member_kind": null, + "family": "core", + "classification": "portable", + "status": "planned", + "bucket": "unreviewed_runtime_candidate" } ] } diff --git a/bindings/api/idiomatic-equivalents.json b/bindings/api/idiomatic-equivalents.json index 0f6b2b3e..44b3eaac 100644 --- a/bindings/api/idiomatic-equivalents.json +++ b/bindings/api/idiomatic-equivalents.json @@ -87,8 +87,8 @@ }, "store-trait": { "classification": "idiomatic", - "portable_semantics": "Rust storage traits become host callback or protocol interfaces with the same ordered batch, manifest, transaction, hint, and capability behavior.", - "performance_contract": "Inputs are owned for the callback duration, callback results become Rust-owned before return, ordered batch operations stay batched, and async adapters own handles across await.", + "portable_semantics": "Rust storage traits become host callback or protocol interfaces with the same ordered batch, manifest, transaction, hint, and capability behavior. Rust-owned default methods may attach internal read-validation provenance without adding a host callback or trusting a host-provided validation claim.", + "performance_contract": "Inputs are owned for the callback duration, callback results become Rust-owned before return, ordered batch operations stay batched, async adapters own handles across await, and validation provenance remains a zero-copy Rust-side optimization.", "language_patterns": { "python": "store protocol object with synchronous and async adapters", "go": "Store interface implemented by host callbacks", diff --git a/bindings/api/parity.json b/bindings/api/parity.json index 7cc24a65..37d198e4 100644 --- a/bindings/api/parity.json +++ b/bindings/api/parity.json @@ -1,6 +1,6 @@ { "schema_version": 2, - "generated_at": "2026-08-09T23:23:03+00:00", + "generated_at": "2026-09-12T16:20:53+00:00", "rustdoc_format_version": 57, "rust_features": [ "async-store" @@ -278,6 +278,47 @@ "audience_rationale": "prolly::AcceleratorSet::with_pq has runtime behavior in the requested proximity-map application domain and requires direct or idiomatic host evidence.", "reviewed": true }, + { + "rust": "prolly::AcceleratorSet::with_turboquant", + "classification": "portable", + "status": "implemented", + "family": "proximity-map", + "performance": "owned", + "languages": { + "python": "bindings/python/prolly/api.py#with_turboquant", + "go": "bindings/go/proximity_accelerator.go#with_turboquant", + "node": "bindings/node/src/proximity.ts#with_turboquant", + "kotlin": "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#with_turboquant", + "java": "bindings/java/src/main/java/build/crab/prolly/javaapi#with_turboquant", + "ruby": "bindings/ruby/lib/prolly/api.rb#with_turboquant", + "swift": "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#with_turboquant", + "wasm": "bindings/wasm/src/index.ts#with_turboquant" + }, + "exclusions": {}, + "tests": [ + "binding-proximity-turboquant-parity", + "proximity-turboquant-lifecycle" + ], + "docs": [ + "docs/proximity-map.md", + "docs/proximity-turboquant-qualification.md" + ], + "reconciliation": "bound-direct", + "reconciliation_evidence": [ + "bindings/uniffi/src/domain/proximity.rs#BindingTurboQuantizer", + "bindings/python/prolly/api.py#TurboQuantizer", + "bindings/go/proximity_accelerator.go#TurboQuantizer", + "bindings/node/src/proximity.ts#TurboQuantizer", + "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#TurboQuantizer", + "bindings/java/src/main/java/build/crab/prolly/javaapi/TurboQuantizer.java", + "bindings/ruby/lib/prolly/api.rb#TurboQuantizer", + "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#TurboQuantizer", + "bindings/wasm/src/index.ts#WasmTurboQuantizer" + ], + "reconciliation_rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators.", + "reviewed": true, + "rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators." + }, { "rust": "prolly::ActiveIndexHealth", "classification": "portable", @@ -421,6 +462,47 @@ "tests": [], "docs": [] }, + { + "rust": "prolly::ApproximatePreference::TurboQuantizedFirst", + "classification": "portable", + "status": "implemented", + "family": "proximity-map", + "performance": "owned", + "languages": { + "python": "bindings/python/prolly/api.py#TurboQuantizedFirst", + "go": "bindings/go/proximity_accelerator.go#TurboQuantizedFirst", + "node": "bindings/node/src/proximity.ts#TurboQuantizedFirst", + "kotlin": "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#TurboQuantizedFirst", + "java": "bindings/java/src/main/java/build/crab/prolly/javaapi#TurboQuantizedFirst", + "ruby": "bindings/ruby/lib/prolly/api.rb#TurboQuantizedFirst", + "swift": "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#TurboQuantizedFirst", + "wasm": "bindings/wasm/src/index.ts#TurboQuantizedFirst" + }, + "exclusions": {}, + "tests": [ + "binding-proximity-turboquant-parity", + "proximity-turboquant-lifecycle" + ], + "docs": [ + "docs/proximity-map.md", + "docs/proximity-turboquant-qualification.md" + ], + "reconciliation": "bound-direct", + "reconciliation_evidence": [ + "bindings/uniffi/src/domain/proximity.rs#BindingTurboQuantizer", + "bindings/python/prolly/api.py#TurboQuantizer", + "bindings/go/proximity_accelerator.go#TurboQuantizer", + "bindings/node/src/proximity.ts#TurboQuantizer", + "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#TurboQuantizer", + "bindings/java/src/main/java/build/crab/prolly/javaapi/TurboQuantizer.java", + "bindings/ruby/lib/prolly/api.rb#TurboQuantizer", + "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#TurboQuantizer", + "bindings/wasm/src/index.ts#WasmTurboQuantizer" + ], + "reconciliation_rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators.", + "reviewed": true, + "rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators." + }, { "rust": "prolly::AsyncAcceleratorBuildOptions", "classification": "portable", @@ -476,6 +558,47 @@ "tests": [], "docs": [] }, + { + "rust": "prolly::AsyncAcceleratorBuildOptions::turboquant", + "classification": "portable", + "status": "implemented", + "family": "proximity-map", + "performance": "owned", + "languages": { + "python": "bindings/python/prolly/api.py#turboquant", + "go": "bindings/go/proximity_accelerator.go#turboquant", + "node": "bindings/node/src/proximity.ts#turboquant", + "kotlin": "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#turboquant", + "java": "bindings/java/src/main/java/build/crab/prolly/javaapi#turboquant", + "ruby": "bindings/ruby/lib/prolly/api.rb#turboquant", + "swift": "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#turboquant", + "wasm": "bindings/wasm/src/index.ts#turboquant" + }, + "exclusions": {}, + "tests": [ + "binding-proximity-turboquant-parity", + "proximity-turboquant-lifecycle" + ], + "docs": [ + "docs/proximity-map.md", + "docs/proximity-turboquant-qualification.md" + ], + "reconciliation": "bound-direct", + "reconciliation_evidence": [ + "bindings/uniffi/src/domain/proximity.rs#BindingTurboQuantizer", + "bindings/python/prolly/api.py#TurboQuantizer", + "bindings/go/proximity_accelerator.go#TurboQuantizer", + "bindings/node/src/proximity.ts#TurboQuantizer", + "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#TurboQuantizer", + "bindings/java/src/main/java/build/crab/prolly/javaapi/TurboQuantizer.java", + "bindings/ruby/lib/prolly/api.rb#TurboQuantizer", + "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#TurboQuantizer", + "bindings/wasm/src/index.ts#WasmTurboQuantizer" + ], + "reconciliation_rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators.", + "reviewed": true, + "rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators." + }, { "rust": "prolly::AsyncAcceleratorBuildStats", "classification": "portable", @@ -531,6 +654,47 @@ "tests": [], "docs": [] }, + { + "rust": "prolly::AsyncAcceleratorBuildStats::turboquant", + "classification": "portable", + "status": "implemented", + "family": "proximity-map", + "performance": "owned", + "languages": { + "python": "bindings/python/prolly/api.py#turboquant", + "go": "bindings/go/proximity_accelerator.go#turboquant", + "node": "bindings/node/src/proximity.ts#turboquant", + "kotlin": "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#turboquant", + "java": "bindings/java/src/main/java/build/crab/prolly/javaapi#turboquant", + "ruby": "bindings/ruby/lib/prolly/api.rb#turboquant", + "swift": "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#turboquant", + "wasm": "bindings/wasm/src/index.ts#turboquant" + }, + "exclusions": {}, + "tests": [ + "binding-proximity-turboquant-parity", + "proximity-turboquant-lifecycle" + ], + "docs": [ + "docs/proximity-map.md", + "docs/proximity-turboquant-qualification.md" + ], + "reconciliation": "bound-direct", + "reconciliation_evidence": [ + "bindings/uniffi/src/domain/proximity.rs#BindingTurboQuantizer", + "bindings/python/prolly/api.py#TurboQuantizer", + "bindings/go/proximity_accelerator.go#TurboQuantizer", + "bindings/node/src/proximity.ts#TurboQuantizer", + "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#TurboQuantizer", + "bindings/java/src/main/java/build/crab/prolly/javaapi/TurboQuantizer.java", + "bindings/ruby/lib/prolly/api.rb#TurboQuantizer", + "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#TurboQuantizer", + "bindings/wasm/src/index.ts#WasmTurboQuantizer" + ], + "reconciliation_rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators.", + "reviewed": true, + "rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators." + }, { "rust": "prolly::AsyncAcceleratorCatalog", "classification": "portable", @@ -729,6 +893,47 @@ "audience_rationale": "prolly::AsyncAcceleratorSet::with_pq has runtime behavior in the requested proximity-map application domain and requires direct or idiomatic host evidence.", "reviewed": true }, + { + "rust": "prolly::AsyncAcceleratorSet::with_turboquant", + "classification": "portable", + "status": "implemented", + "family": "proximity-map", + "performance": "owned", + "languages": { + "python": "bindings/python/prolly/api.py#with_turboquant", + "go": "bindings/go/proximity_accelerator.go#with_turboquant", + "node": "bindings/node/src/proximity.ts#with_turboquant", + "kotlin": "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#with_turboquant", + "java": "bindings/java/src/main/java/build/crab/prolly/javaapi#with_turboquant", + "ruby": "bindings/ruby/lib/prolly/api.rb#with_turboquant", + "swift": "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#with_turboquant", + "wasm": "bindings/wasm/src/index.ts#with_turboquant" + }, + "exclusions": {}, + "tests": [ + "binding-proximity-turboquant-parity", + "proximity-turboquant-lifecycle" + ], + "docs": [ + "docs/proximity-map.md", + "docs/proximity-turboquant-qualification.md" + ], + "reconciliation": "bound-direct", + "reconciliation_evidence": [ + "bindings/uniffi/src/domain/proximity.rs#BindingTurboQuantizer", + "bindings/python/prolly/api.py#TurboQuantizer", + "bindings/go/proximity_accelerator.go#TurboQuantizer", + "bindings/node/src/proximity.ts#TurboQuantizer", + "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#TurboQuantizer", + "bindings/java/src/main/java/build/crab/prolly/javaapi/TurboQuantizer.java", + "bindings/ruby/lib/prolly/api.rb#TurboQuantizer", + "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#TurboQuantizer", + "bindings/wasm/src/index.ts#WasmTurboQuantizer" + ], + "reconciliation_rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators.", + "reviewed": true, + "rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators." + }, { "rust": "prolly::AsyncBatchBuilder", "classification": "portable", @@ -1058,6 +1263,47 @@ "tests": [], "docs": [] }, + { + "rust": "prolly::AsyncCompositeAccelerator::build_from_turboquant", + "classification": "portable", + "status": "implemented", + "family": "proximity-map", + "performance": "owned", + "languages": { + "python": "bindings/python/prolly/api.py#build_from_turboquant", + "go": "bindings/go/proximity_accelerator.go#build_from_turboquant", + "node": "bindings/node/src/proximity.ts#build_from_turboquant", + "kotlin": "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#build_from_turboquant", + "java": "bindings/java/src/main/java/build/crab/prolly/javaapi#build_from_turboquant", + "ruby": "bindings/ruby/lib/prolly/api.rb#build_from_turboquant", + "swift": "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#build_from_turboquant", + "wasm": "bindings/wasm/src/index.ts#build_from_turboquant" + }, + "exclusions": {}, + "tests": [ + "binding-proximity-turboquant-parity", + "proximity-turboquant-lifecycle" + ], + "docs": [ + "docs/proximity-map.md", + "docs/proximity-turboquant-qualification.md" + ], + "reconciliation": "bound-direct", + "reconciliation_evidence": [ + "bindings/uniffi/src/domain/proximity.rs#BindingTurboQuantizer", + "bindings/python/prolly/api.py#TurboQuantizer", + "bindings/go/proximity_accelerator.go#TurboQuantizer", + "bindings/node/src/proximity.ts#TurboQuantizer", + "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#TurboQuantizer", + "bindings/java/src/main/java/build/crab/prolly/javaapi/TurboQuantizer.java", + "bindings/ruby/lib/prolly/api.rb#TurboQuantizer", + "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#TurboQuantizer", + "bindings/wasm/src/index.ts#WasmTurboQuantizer" + ], + "reconciliation_rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators.", + "reviewed": true, + "rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators." + }, { "rust": "prolly::AsyncCompositeAccelerator::config", "classification": "portable", @@ -1230,6 +1476,88 @@ "tests": [], "docs": [] }, + { + "rust": "prolly::AsyncCompositeBuildOptions::turboquant_limits", + "classification": "portable", + "status": "implemented", + "family": "core", + "performance": "owned", + "languages": { + "python": "bindings/python/prolly/api.py#turboquant_limits", + "go": "bindings/go/proximity_accelerator.go#turboquant_limits", + "node": "bindings/node/src/proximity.ts#turboquant_limits", + "kotlin": "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#turboquant_limits", + "java": "bindings/java/src/main/java/build/crab/prolly/javaapi#turboquant_limits", + "ruby": "bindings/ruby/lib/prolly/api.rb#turboquant_limits", + "swift": "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#turboquant_limits", + "wasm": "bindings/wasm/src/index.ts#turboquant_limits" + }, + "exclusions": {}, + "tests": [ + "binding-proximity-turboquant-parity", + "proximity-turboquant-lifecycle" + ], + "docs": [ + "docs/proximity-map.md", + "docs/proximity-turboquant-qualification.md" + ], + "reconciliation": "bound-direct", + "reconciliation_evidence": [ + "bindings/uniffi/src/domain/proximity.rs#BindingTurboQuantizer", + "bindings/python/prolly/api.py#TurboQuantizer", + "bindings/go/proximity_accelerator.go#TurboQuantizer", + "bindings/node/src/proximity.ts#TurboQuantizer", + "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#TurboQuantizer", + "bindings/java/src/main/java/build/crab/prolly/javaapi/TurboQuantizer.java", + "bindings/ruby/lib/prolly/api.rb#TurboQuantizer", + "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#TurboQuantizer", + "bindings/wasm/src/index.ts#WasmTurboQuantizer" + ], + "reconciliation_rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators.", + "reviewed": true, + "rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators." + }, + { + "rust": "prolly::AsyncCompositeBuildOptions::turboquant_parallelism", + "classification": "portable", + "status": "implemented", + "family": "core", + "performance": "owned", + "languages": { + "python": "bindings/python/prolly/api.py#turboquant_parallelism", + "go": "bindings/go/proximity_accelerator.go#turboquant_parallelism", + "node": "bindings/node/src/proximity.ts#turboquant_parallelism", + "kotlin": "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#turboquant_parallelism", + "java": "bindings/java/src/main/java/build/crab/prolly/javaapi#turboquant_parallelism", + "ruby": "bindings/ruby/lib/prolly/api.rb#turboquant_parallelism", + "swift": "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#turboquant_parallelism", + "wasm": "bindings/wasm/src/index.ts#turboquant_parallelism" + }, + "exclusions": {}, + "tests": [ + "binding-proximity-turboquant-parity", + "proximity-turboquant-lifecycle" + ], + "docs": [ + "docs/proximity-map.md", + "docs/proximity-turboquant-qualification.md" + ], + "reconciliation": "bound-direct", + "reconciliation_evidence": [ + "bindings/uniffi/src/domain/proximity.rs#BindingTurboQuantizer", + "bindings/python/prolly/api.py#TurboQuantizer", + "bindings/go/proximity_accelerator.go#TurboQuantizer", + "bindings/node/src/proximity.ts#TurboQuantizer", + "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#TurboQuantizer", + "bindings/java/src/main/java/build/crab/prolly/javaapi/TurboQuantizer.java", + "bindings/ruby/lib/prolly/api.rb#TurboQuantizer", + "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#TurboQuantizer", + "bindings/wasm/src/index.ts#WasmTurboQuantizer" + ], + "reconciliation_rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators.", + "reviewed": true, + "rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators." + }, { "rust": "prolly::AsyncCompositeBuildOutcome", "classification": "portable", @@ -4899,6 +5227,40 @@ ], "reconciliation_rationale": "The reviewed store-trait contract defines concrete host symbols, portable semantics, performance behavior, and shared conformance evidence for this Rust abstraction." }, + { + "rust": "prolly::AsyncStore::batch_get_validated_shared_ordered_unique", + "classification": "idiomatic", + "status": "implemented", + "family": "core", + "performance": "owned", + "languages": { + "python": "HostStoreCallback/ForeignRemoteStore contract (prolly::AsyncStore::batch_get_validated_shared_ordered_unique)", + "go": "prolly.RemoteStore contract with Rust-owned defaults (prolly::AsyncStore::batch_get_validated_shared_ordered_unique)", + "node": "NativeHostStore/RemoteStore contract (prolly::AsyncStore::batch_get_validated_shared_ordered_unique)", + "kotlin": "HostStoreCallback/RemoteStore contract (prolly::AsyncStore::batch_get_validated_shared_ordered_unique)", + "java": "HostStoreAdapter/RemoteStore contract (prolly::AsyncStore::batch_get_validated_shared_ordered_unique)", + "ruby": "Prolly::HostStoreCallback/ForeignRemoteStore contract (prolly::AsyncStore::batch_get_validated_shared_ordered_unique)", + "swift": "HostStoreCallback/ForeignRemoteStore contract (prolly::AsyncStore::batch_get_validated_shared_ordered_unique)", + "wasm": "RemoteStore contract with Rust-owned defaults (prolly::AsyncStore::batch_get_validated_shared_ordered_unique)" + }, + "exclusions": {}, + "tests": [ + "portable-parity::custom-store-callbacks" + ], + "docs": [ + "bindings/api/idiomatic-equivalents.json#store-trait" + ], + "equivalence": "store-trait", + "rationale": "prolly::AsyncStore::batch_get_validated_shared_ordered_unique is represented by the reviewed store-trait host-language contract instead of a literal Rust declaration.", + "reviewed": true, + "audience": "rust-extension", + "audience_rationale": "prolly::AsyncStore::batch_get_validated_shared_ordered_unique supports the portable application API through the store-trait contract and is not a separately invoked application operation.", + "reconciliation": "bound-idiomatic", + "reconciliation_evidence": [ + "bindings/api/idiomatic-equivalents.json#store-trait" + ], + "reconciliation_rationale": "The reviewed store-trait contract defines concrete host symbols, portable semantics, performance behavior, and shared conformance evidence for this Rust abstraction." + }, { "rust": "prolly::AsyncStore::batch_put", "classification": "idiomatic", @@ -5103,6 +5465,40 @@ ], "reconciliation_rationale": "The reviewed store-trait contract defines concrete host symbols, portable semantics, performance behavior, and shared conformance evidence for this Rust abstraction." }, + { + "rust": "prolly::AsyncStore::get_validated_shared", + "classification": "idiomatic", + "status": "implemented", + "family": "core", + "performance": "owned", + "languages": { + "python": "HostStoreCallback/ForeignRemoteStore contract (prolly::AsyncStore::get_validated_shared)", + "go": "prolly.RemoteStore contract with Rust-owned defaults (prolly::AsyncStore::get_validated_shared)", + "node": "NativeHostStore/RemoteStore contract (prolly::AsyncStore::get_validated_shared)", + "kotlin": "HostStoreCallback/RemoteStore contract (prolly::AsyncStore::get_validated_shared)", + "java": "HostStoreAdapter/RemoteStore contract (prolly::AsyncStore::get_validated_shared)", + "ruby": "Prolly::HostStoreCallback/ForeignRemoteStore contract (prolly::AsyncStore::get_validated_shared)", + "swift": "HostStoreCallback/ForeignRemoteStore contract (prolly::AsyncStore::get_validated_shared)", + "wasm": "RemoteStore contract with Rust-owned defaults (prolly::AsyncStore::get_validated_shared)" + }, + "exclusions": {}, + "tests": [ + "portable-parity::custom-store-callbacks" + ], + "docs": [ + "bindings/api/idiomatic-equivalents.json#store-trait" + ], + "equivalence": "store-trait", + "rationale": "prolly::AsyncStore::get_validated_shared is represented by the reviewed store-trait host-language contract instead of a literal Rust declaration.", + "reviewed": true, + "audience": "rust-extension", + "audience_rationale": "prolly::AsyncStore::get_validated_shared supports the portable application API through the store-trait contract and is not a separately invoked application operation.", + "reconciliation": "bound-idiomatic", + "reconciliation_evidence": [ + "bindings/api/idiomatic-equivalents.json#store-trait" + ], + "reconciliation_rationale": "The reviewed store-trait contract defines concrete host symbols, portable semantics, performance behavior, and shared conformance evidence for this Rust abstraction." + }, { "rust": "prolly::AsyncStore::guarantees_durable_publication", "classification": "portable", @@ -5453,6 +5849,621 @@ ], "reconciliation_rationale": "The reviewed store-trait contract defines concrete host symbols, portable semantics, performance behavior, and shared conformance evidence for this Rust abstraction." }, + { + "rust": "prolly::AsyncTurboQuantizer", + "classification": "portable", + "status": "implemented", + "family": "proximity-map", + "performance": "owned", + "languages": { + "python": "bindings/python/prolly/api.py#AsyncTurboQuantizer", + "go": "bindings/go/proximity_accelerator.go#AsyncTurboQuantizer", + "node": "bindings/node/src/proximity.ts#AsyncTurboQuantizer", + "kotlin": "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#AsyncTurboQuantizer", + "java": "bindings/java/src/main/java/build/crab/prolly/javaapi#AsyncTurboQuantizer", + "ruby": "bindings/ruby/lib/prolly/api.rb#AsyncTurboQuantizer", + "swift": "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#AsyncTurboQuantizer", + "wasm": "bindings/wasm/src/index.ts#AsyncTurboQuantizer" + }, + "exclusions": {}, + "tests": [ + "binding-proximity-turboquant-parity", + "proximity-turboquant-lifecycle" + ], + "docs": [ + "docs/proximity-map.md", + "docs/proximity-turboquant-qualification.md" + ], + "reconciliation": "bound-direct", + "reconciliation_evidence": [ + "bindings/uniffi/src/domain/proximity.rs#BindingTurboQuantizer", + "bindings/python/prolly/api.py#TurboQuantizer", + "bindings/go/proximity_accelerator.go#TurboQuantizer", + "bindings/node/src/proximity.ts#TurboQuantizer", + "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#TurboQuantizer", + "bindings/java/src/main/java/build/crab/prolly/javaapi/TurboQuantizer.java", + "bindings/ruby/lib/prolly/api.rb#TurboQuantizer", + "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#TurboQuantizer", + "bindings/wasm/src/index.ts#WasmTurboQuantizer" + ], + "reconciliation_rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators.", + "reviewed": true, + "rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators." + }, + { + "rust": "prolly::AsyncTurboQuantizer::build", + "classification": "portable", + "status": "implemented", + "family": "proximity-map", + "performance": "owned", + "languages": { + "python": "bindings/python/prolly/api.py#build", + "go": "bindings/go/proximity_accelerator.go#build", + "node": "bindings/node/src/proximity.ts#build", + "kotlin": "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#build", + "java": "bindings/java/src/main/java/build/crab/prolly/javaapi#build", + "ruby": "bindings/ruby/lib/prolly/api.rb#build", + "swift": "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#build", + "wasm": "bindings/wasm/src/index.ts#build" + }, + "exclusions": {}, + "tests": [ + "binding-proximity-turboquant-parity", + "proximity-turboquant-lifecycle" + ], + "docs": [ + "docs/proximity-map.md", + "docs/proximity-turboquant-qualification.md" + ], + "reconciliation": "bound-direct", + "reconciliation_evidence": [ + "bindings/uniffi/src/domain/proximity.rs#BindingTurboQuantizer", + "bindings/python/prolly/api.py#TurboQuantizer", + "bindings/go/proximity_accelerator.go#TurboQuantizer", + "bindings/node/src/proximity.ts#TurboQuantizer", + "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#TurboQuantizer", + "bindings/java/src/main/java/build/crab/prolly/javaapi/TurboQuantizer.java", + "bindings/ruby/lib/prolly/api.rb#TurboQuantizer", + "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#TurboQuantizer", + "bindings/wasm/src/index.ts#WasmTurboQuantizer" + ], + "reconciliation_rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators.", + "reviewed": true, + "rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators." + }, + { + "rust": "prolly::AsyncTurboQuantizer::build_with_limits", + "classification": "portable", + "status": "implemented", + "family": "proximity-map", + "performance": "owned", + "languages": { + "python": "bindings/python/prolly/api.py#build_with_limits", + "go": "bindings/go/proximity_accelerator.go#build_with_limits", + "node": "bindings/node/src/proximity.ts#build_with_limits", + "kotlin": "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#build_with_limits", + "java": "bindings/java/src/main/java/build/crab/prolly/javaapi#build_with_limits", + "ruby": "bindings/ruby/lib/prolly/api.rb#build_with_limits", + "swift": "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#build_with_limits", + "wasm": "bindings/wasm/src/index.ts#build_with_limits" + }, + "exclusions": {}, + "tests": [ + "binding-proximity-turboquant-parity", + "proximity-turboquant-lifecycle" + ], + "docs": [ + "docs/proximity-map.md", + "docs/proximity-turboquant-qualification.md" + ], + "reconciliation": "bound-direct", + "reconciliation_evidence": [ + "bindings/uniffi/src/domain/proximity.rs#BindingTurboQuantizer", + "bindings/python/prolly/api.py#TurboQuantizer", + "bindings/go/proximity_accelerator.go#TurboQuantizer", + "bindings/node/src/proximity.ts#TurboQuantizer", + "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#TurboQuantizer", + "bindings/java/src/main/java/build/crab/prolly/javaapi/TurboQuantizer.java", + "bindings/ruby/lib/prolly/api.rb#TurboQuantizer", + "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#TurboQuantizer", + "bindings/wasm/src/index.ts#WasmTurboQuantizer" + ], + "reconciliation_rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators.", + "reviewed": true, + "rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators." + }, + { + "rust": "prolly::AsyncTurboQuantizer::config", + "classification": "portable", + "status": "implemented", + "family": "proximity-map", + "performance": "owned", + "languages": { + "python": "bindings/python/prolly/api.py#config", + "go": "bindings/go/proximity_accelerator.go#config", + "node": "bindings/node/src/proximity.ts#config", + "kotlin": "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#config", + "java": "bindings/java/src/main/java/build/crab/prolly/javaapi#config", + "ruby": "bindings/ruby/lib/prolly/api.rb#config", + "swift": "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#config", + "wasm": "bindings/wasm/src/index.ts#config" + }, + "exclusions": {}, + "tests": [ + "binding-proximity-turboquant-parity", + "proximity-turboquant-lifecycle" + ], + "docs": [ + "docs/proximity-map.md", + "docs/proximity-turboquant-qualification.md" + ], + "reconciliation": "bound-direct", + "reconciliation_evidence": [ + "bindings/uniffi/src/domain/proximity.rs#BindingTurboQuantizer", + "bindings/python/prolly/api.py#TurboQuantizer", + "bindings/go/proximity_accelerator.go#TurboQuantizer", + "bindings/node/src/proximity.ts#TurboQuantizer", + "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#TurboQuantizer", + "bindings/java/src/main/java/build/crab/prolly/javaapi/TurboQuantizer.java", + "bindings/ruby/lib/prolly/api.rb#TurboQuantizer", + "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#TurboQuantizer", + "bindings/wasm/src/index.ts#WasmTurboQuantizer" + ], + "reconciliation_rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators.", + "reviewed": true, + "rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators." + }, + { + "rust": "prolly::AsyncTurboQuantizer::load", + "classification": "portable", + "status": "implemented", + "family": "proximity-map", + "performance": "owned", + "languages": { + "python": "bindings/python/prolly/api.py#load", + "go": "bindings/go/proximity_accelerator.go#load", + "node": "bindings/node/src/proximity.ts#load", + "kotlin": "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#load", + "java": "bindings/java/src/main/java/build/crab/prolly/javaapi#load", + "ruby": "bindings/ruby/lib/prolly/api.rb#load", + "swift": "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#load", + "wasm": "bindings/wasm/src/index.ts#load" + }, + "exclusions": {}, + "tests": [ + "binding-proximity-turboquant-parity", + "proximity-turboquant-lifecycle" + ], + "docs": [ + "docs/proximity-map.md", + "docs/proximity-turboquant-qualification.md" + ], + "reconciliation": "bound-direct", + "reconciliation_evidence": [ + "bindings/uniffi/src/domain/proximity.rs#BindingTurboQuantizer", + "bindings/python/prolly/api.py#TurboQuantizer", + "bindings/go/proximity_accelerator.go#TurboQuantizer", + "bindings/node/src/proximity.ts#TurboQuantizer", + "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#TurboQuantizer", + "bindings/java/src/main/java/build/crab/prolly/javaapi/TurboQuantizer.java", + "bindings/ruby/lib/prolly/api.rb#TurboQuantizer", + "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#TurboQuantizer", + "bindings/wasm/src/index.ts#WasmTurboQuantizer" + ], + "reconciliation_rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators.", + "reviewed": true, + "rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators." + }, + { + "rust": "prolly::AsyncTurboQuantizer::manifest_cid", + "classification": "portable", + "status": "implemented", + "family": "proximity-map", + "performance": "owned", + "languages": { + "python": "bindings/python/prolly/api.py#manifest_cid", + "go": "bindings/go/proximity_accelerator.go#manifest_cid", + "node": "bindings/node/src/proximity.ts#manifest_cid", + "kotlin": "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#manifest_cid", + "java": "bindings/java/src/main/java/build/crab/prolly/javaapi#manifest_cid", + "ruby": "bindings/ruby/lib/prolly/api.rb#manifest_cid", + "swift": "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#manifest_cid", + "wasm": "bindings/wasm/src/index.ts#manifest_cid" + }, + "exclusions": {}, + "tests": [ + "binding-proximity-turboquant-parity", + "proximity-turboquant-lifecycle" + ], + "docs": [ + "docs/proximity-map.md", + "docs/proximity-turboquant-qualification.md" + ], + "reconciliation": "bound-direct", + "reconciliation_evidence": [ + "bindings/uniffi/src/domain/proximity.rs#BindingTurboQuantizer", + "bindings/python/prolly/api.py#TurboQuantizer", + "bindings/go/proximity_accelerator.go#TurboQuantizer", + "bindings/node/src/proximity.ts#TurboQuantizer", + "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#TurboQuantizer", + "bindings/java/src/main/java/build/crab/prolly/javaapi/TurboQuantizer.java", + "bindings/ruby/lib/prolly/api.rb#TurboQuantizer", + "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#TurboQuantizer", + "bindings/wasm/src/index.ts#WasmTurboQuantizer" + ], + "reconciliation_rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators.", + "reviewed": true, + "rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators." + }, + { + "rust": "prolly::AsyncTurboQuantizer::quality", + "classification": "portable", + "status": "implemented", + "family": "proximity-map", + "performance": "owned", + "languages": { + "python": "bindings/python/prolly/api.py#quality", + "go": "bindings/go/proximity_accelerator.go#quality", + "node": "bindings/node/src/proximity.ts#quality", + "kotlin": "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#quality", + "java": "bindings/java/src/main/java/build/crab/prolly/javaapi#quality", + "ruby": "bindings/ruby/lib/prolly/api.rb#quality", + "swift": "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#quality", + "wasm": "bindings/wasm/src/index.ts#quality" + }, + "exclusions": {}, + "tests": [ + "binding-proximity-turboquant-parity", + "proximity-turboquant-lifecycle" + ], + "docs": [ + "docs/proximity-map.md", + "docs/proximity-turboquant-qualification.md" + ], + "reconciliation": "bound-direct", + "reconciliation_evidence": [ + "bindings/uniffi/src/domain/proximity.rs#BindingTurboQuantizer", + "bindings/python/prolly/api.py#TurboQuantizer", + "bindings/go/proximity_accelerator.go#TurboQuantizer", + "bindings/node/src/proximity.ts#TurboQuantizer", + "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#TurboQuantizer", + "bindings/java/src/main/java/build/crab/prolly/javaapi/TurboQuantizer.java", + "bindings/ruby/lib/prolly/api.rb#TurboQuantizer", + "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#TurboQuantizer", + "bindings/wasm/src/index.ts#WasmTurboQuantizer" + ], + "reconciliation_rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators.", + "reviewed": true, + "rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators." + }, + { + "rust": "prolly::AsyncTurboQuantizer::search", + "classification": "portable", + "status": "implemented", + "family": "proximity-map", + "performance": "owned", + "languages": { + "python": "bindings/python/prolly/api.py#search", + "go": "bindings/go/proximity_accelerator.go#search", + "node": "bindings/node/src/proximity.ts#search", + "kotlin": "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#search", + "java": "bindings/java/src/main/java/build/crab/prolly/javaapi#search", + "ruby": "bindings/ruby/lib/prolly/api.rb#search", + "swift": "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#search", + "wasm": "bindings/wasm/src/index.ts#search" + }, + "exclusions": {}, + "tests": [ + "binding-proximity-turboquant-parity", + "proximity-turboquant-lifecycle" + ], + "docs": [ + "docs/proximity-map.md", + "docs/proximity-turboquant-qualification.md" + ], + "reconciliation": "bound-direct", + "reconciliation_evidence": [ + "bindings/uniffi/src/domain/proximity.rs#BindingTurboQuantizer", + "bindings/python/prolly/api.py#TurboQuantizer", + "bindings/go/proximity_accelerator.go#TurboQuantizer", + "bindings/node/src/proximity.ts#TurboQuantizer", + "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#TurboQuantizer", + "bindings/java/src/main/java/build/crab/prolly/javaapi/TurboQuantizer.java", + "bindings/ruby/lib/prolly/api.rb#TurboQuantizer", + "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#TurboQuantizer", + "bindings/wasm/src/index.ts#WasmTurboQuantizer" + ], + "reconciliation_rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators.", + "reviewed": true, + "rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators." + }, + { + "rust": "prolly::AsyncTurboQuantizer::source_descriptor", + "classification": "portable", + "status": "implemented", + "family": "proximity-map", + "performance": "owned", + "languages": { + "python": "bindings/python/prolly/api.py#source_descriptor", + "go": "bindings/go/proximity_accelerator.go#source_descriptor", + "node": "bindings/node/src/proximity.ts#source_descriptor", + "kotlin": "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#source_descriptor", + "java": "bindings/java/src/main/java/build/crab/prolly/javaapi#source_descriptor", + "ruby": "bindings/ruby/lib/prolly/api.rb#source_descriptor", + "swift": "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#source_descriptor", + "wasm": "bindings/wasm/src/index.ts#source_descriptor" + }, + "exclusions": {}, + "tests": [ + "binding-proximity-turboquant-parity", + "proximity-turboquant-lifecycle" + ], + "docs": [ + "docs/proximity-map.md", + "docs/proximity-turboquant-qualification.md" + ], + "reconciliation": "bound-direct", + "reconciliation_evidence": [ + "bindings/uniffi/src/domain/proximity.rs#BindingTurboQuantizer", + "bindings/python/prolly/api.py#TurboQuantizer", + "bindings/go/proximity_accelerator.go#TurboQuantizer", + "bindings/node/src/proximity.ts#TurboQuantizer", + "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#TurboQuantizer", + "bindings/java/src/main/java/build/crab/prolly/javaapi/TurboQuantizer.java", + "bindings/ruby/lib/prolly/api.rb#TurboQuantizer", + "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#TurboQuantizer", + "bindings/wasm/src/index.ts#WasmTurboQuantizer" + ], + "reconciliation_rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators.", + "reviewed": true, + "rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators." + }, + { + "rust": "prolly::AsyncTurboQuantizer::verify", + "classification": "portable", + "status": "implemented", + "family": "proximity-map", + "performance": "owned", + "languages": { + "python": "bindings/python/prolly/api.py#verify", + "go": "bindings/go/proximity_accelerator.go#verify", + "node": "bindings/node/src/proximity.ts#verify", + "kotlin": "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#verify", + "java": "bindings/java/src/main/java/build/crab/prolly/javaapi#verify", + "ruby": "bindings/ruby/lib/prolly/api.rb#verify", + "swift": "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#verify", + "wasm": "bindings/wasm/src/index.ts#verify" + }, + "exclusions": {}, + "tests": [ + "binding-proximity-turboquant-parity", + "proximity-turboquant-lifecycle" + ], + "docs": [ + "docs/proximity-map.md", + "docs/proximity-turboquant-qualification.md" + ], + "reconciliation": "bound-direct", + "reconciliation_evidence": [ + "bindings/uniffi/src/domain/proximity.rs#BindingTurboQuantizer", + "bindings/python/prolly/api.py#TurboQuantizer", + "bindings/go/proximity_accelerator.go#TurboQuantizer", + "bindings/node/src/proximity.ts#TurboQuantizer", + "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#TurboQuantizer", + "bindings/java/src/main/java/build/crab/prolly/javaapi/TurboQuantizer.java", + "bindings/ruby/lib/prolly/api.rb#TurboQuantizer", + "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#TurboQuantizer", + "bindings/wasm/src/index.ts#WasmTurboQuantizer" + ], + "reconciliation_rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators.", + "reviewed": true, + "rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators." + }, + { + "rust": "prolly::AsyncTurboQuantizer::zero_vectors", + "classification": "portable", + "status": "implemented", + "family": "proximity-map", + "performance": "owned", + "languages": { + "python": "bindings/python/prolly/api.py#zero_vectors", + "go": "bindings/go/proximity_accelerator.go#zero_vectors", + "node": "bindings/node/src/proximity.ts#zero_vectors", + "kotlin": "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#zero_vectors", + "java": "bindings/java/src/main/java/build/crab/prolly/javaapi#zero_vectors", + "ruby": "bindings/ruby/lib/prolly/api.rb#zero_vectors", + "swift": "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#zero_vectors", + "wasm": "bindings/wasm/src/index.ts#zero_vectors" + }, + "exclusions": {}, + "tests": [ + "binding-proximity-turboquant-parity", + "proximity-turboquant-lifecycle" + ], + "docs": [ + "docs/proximity-map.md", + "docs/proximity-turboquant-qualification.md" + ], + "reconciliation": "bound-direct", + "reconciliation_evidence": [ + "bindings/uniffi/src/domain/proximity.rs#BindingTurboQuantizer", + "bindings/python/prolly/api.py#TurboQuantizer", + "bindings/go/proximity_accelerator.go#TurboQuantizer", + "bindings/node/src/proximity.ts#TurboQuantizer", + "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#TurboQuantizer", + "bindings/java/src/main/java/build/crab/prolly/javaapi/TurboQuantizer.java", + "bindings/ruby/lib/prolly/api.rb#TurboQuantizer", + "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#TurboQuantizer", + "bindings/wasm/src/index.ts#WasmTurboQuantizer" + ], + "reconciliation_rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators.", + "reviewed": true, + "rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators." + }, + { + "rust": "prolly::AsyncTurboQuantizerBuild", + "classification": "portable", + "status": "implemented", + "family": "proximity-map", + "performance": "owned", + "languages": { + "python": "bindings/python/prolly/api.py#AsyncTurboQuantizerBuild", + "go": "bindings/go/proximity_accelerator.go#AsyncTurboQuantizerBuild", + "node": "bindings/node/src/proximity.ts#AsyncTurboQuantizerBuild", + "kotlin": "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#AsyncTurboQuantizerBuild", + "java": "bindings/java/src/main/java/build/crab/prolly/javaapi#AsyncTurboQuantizerBuild", + "ruby": "bindings/ruby/lib/prolly/api.rb#AsyncTurboQuantizerBuild", + "swift": "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#AsyncTurboQuantizerBuild", + "wasm": "bindings/wasm/src/index.ts#AsyncTurboQuantizerBuild" + }, + "exclusions": {}, + "tests": [ + "binding-proximity-turboquant-parity", + "proximity-turboquant-lifecycle" + ], + "docs": [ + "docs/proximity-map.md", + "docs/proximity-turboquant-qualification.md" + ], + "reconciliation": "bound-direct", + "reconciliation_evidence": [ + "bindings/uniffi/src/domain/proximity.rs#BindingTurboQuantizer", + "bindings/python/prolly/api.py#TurboQuantizer", + "bindings/go/proximity_accelerator.go#TurboQuantizer", + "bindings/node/src/proximity.ts#TurboQuantizer", + "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#TurboQuantizer", + "bindings/java/src/main/java/build/crab/prolly/javaapi/TurboQuantizer.java", + "bindings/ruby/lib/prolly/api.rb#TurboQuantizer", + "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#TurboQuantizer", + "bindings/wasm/src/index.ts#WasmTurboQuantizer" + ], + "reconciliation_rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators.", + "reviewed": true, + "rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators." + }, + { + "rust": "prolly::AsyncTurboQuantizerBuild::config", + "classification": "portable", + "status": "implemented", + "family": "proximity-map", + "performance": "owned", + "languages": { + "python": "bindings/python/prolly/api.py#config", + "go": "bindings/go/proximity_accelerator.go#config", + "node": "bindings/node/src/proximity.ts#config", + "kotlin": "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#config", + "java": "bindings/java/src/main/java/build/crab/prolly/javaapi#config", + "ruby": "bindings/ruby/lib/prolly/api.rb#config", + "swift": "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#config", + "wasm": "bindings/wasm/src/index.ts#config" + }, + "exclusions": {}, + "tests": [ + "binding-proximity-turboquant-parity", + "proximity-turboquant-lifecycle" + ], + "docs": [ + "docs/proximity-map.md", + "docs/proximity-turboquant-qualification.md" + ], + "reconciliation": "bound-direct", + "reconciliation_evidence": [ + "bindings/uniffi/src/domain/proximity.rs#BindingTurboQuantizer", + "bindings/python/prolly/api.py#TurboQuantizer", + "bindings/go/proximity_accelerator.go#TurboQuantizer", + "bindings/node/src/proximity.ts#TurboQuantizer", + "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#TurboQuantizer", + "bindings/java/src/main/java/build/crab/prolly/javaapi/TurboQuantizer.java", + "bindings/ruby/lib/prolly/api.rb#TurboQuantizer", + "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#TurboQuantizer", + "bindings/wasm/src/index.ts#WasmTurboQuantizer" + ], + "reconciliation_rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators.", + "reviewed": true, + "rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators." + }, + { + "rust": "prolly::AsyncTurboQuantizerBuild::limits", + "classification": "portable", + "status": "implemented", + "family": "proximity-map", + "performance": "owned", + "languages": { + "python": "bindings/python/prolly/api.py#limits", + "go": "bindings/go/proximity_accelerator.go#limits", + "node": "bindings/node/src/proximity.ts#limits", + "kotlin": "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#limits", + "java": "bindings/java/src/main/java/build/crab/prolly/javaapi#limits", + "ruby": "bindings/ruby/lib/prolly/api.rb#limits", + "swift": "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#limits", + "wasm": "bindings/wasm/src/index.ts#limits" + }, + "exclusions": {}, + "tests": [ + "binding-proximity-turboquant-parity", + "proximity-turboquant-lifecycle" + ], + "docs": [ + "docs/proximity-map.md", + "docs/proximity-turboquant-qualification.md" + ], + "reconciliation": "bound-direct", + "reconciliation_evidence": [ + "bindings/uniffi/src/domain/proximity.rs#BindingTurboQuantizer", + "bindings/python/prolly/api.py#TurboQuantizer", + "bindings/go/proximity_accelerator.go#TurboQuantizer", + "bindings/node/src/proximity.ts#TurboQuantizer", + "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#TurboQuantizer", + "bindings/java/src/main/java/build/crab/prolly/javaapi/TurboQuantizer.java", + "bindings/ruby/lib/prolly/api.rb#TurboQuantizer", + "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#TurboQuantizer", + "bindings/wasm/src/index.ts#WasmTurboQuantizer" + ], + "reconciliation_rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators.", + "reviewed": true, + "rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators." + }, + { + "rust": "prolly::AsyncTurboQuantizerBuild::parallelism", + "classification": "portable", + "status": "implemented", + "family": "proximity-map", + "performance": "owned", + "languages": { + "python": "bindings/python/prolly/api.py#parallelism", + "go": "bindings/go/proximity_accelerator.go#parallelism", + "node": "bindings/node/src/proximity.ts#parallelism", + "kotlin": "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#parallelism", + "java": "bindings/java/src/main/java/build/crab/prolly/javaapi#parallelism", + "ruby": "bindings/ruby/lib/prolly/api.rb#parallelism", + "swift": "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#parallelism", + "wasm": "bindings/wasm/src/index.ts#parallelism" + }, + "exclusions": {}, + "tests": [ + "binding-proximity-turboquant-parity", + "proximity-turboquant-lifecycle" + ], + "docs": [ + "docs/proximity-map.md", + "docs/proximity-turboquant-qualification.md" + ], + "reconciliation": "bound-direct", + "reconciliation_evidence": [ + "bindings/uniffi/src/domain/proximity.rs#BindingTurboQuantizer", + "bindings/python/prolly/api.py#TurboQuantizer", + "bindings/go/proximity_accelerator.go#TurboQuantizer", + "bindings/node/src/proximity.ts#TurboQuantizer", + "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#TurboQuantizer", + "bindings/java/src/main/java/build/crab/prolly/javaapi/TurboQuantizer.java", + "bindings/ruby/lib/prolly/api.rb#TurboQuantizer", + "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#TurboQuantizer", + "bindings/wasm/src/index.ts#WasmTurboQuantizer" + ], + "reconciliation_rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators.", + "reviewed": true, + "rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators." + }, { "rust": "prolly::AsyncVersionedMap", "classification": "portable", @@ -7978,6 +8989,47 @@ "tests": [], "docs": [] }, + { + "rust": "prolly::CatalogAcceleratorKind::TurboQuantized", + "classification": "portable", + "status": "implemented", + "family": "proximity-map", + "performance": "owned", + "languages": { + "python": "bindings/python/prolly/api.py#TurboQuantized", + "go": "bindings/go/proximity_accelerator.go#TurboQuantized", + "node": "bindings/node/src/proximity.ts#TurboQuantized", + "kotlin": "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#TurboQuantized", + "java": "bindings/java/src/main/java/build/crab/prolly/javaapi#TurboQuantized", + "ruby": "bindings/ruby/lib/prolly/api.rb#TurboQuantized", + "swift": "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#TurboQuantized", + "wasm": "bindings/wasm/src/index.ts#TurboQuantized" + }, + "exclusions": {}, + "tests": [ + "binding-proximity-turboquant-parity", + "proximity-turboquant-lifecycle" + ], + "docs": [ + "docs/proximity-map.md", + "docs/proximity-turboquant-qualification.md" + ], + "reconciliation": "bound-direct", + "reconciliation_evidence": [ + "bindings/uniffi/src/domain/proximity.rs#BindingTurboQuantizer", + "bindings/python/prolly/api.py#TurboQuantizer", + "bindings/go/proximity_accelerator.go#TurboQuantizer", + "bindings/node/src/proximity.ts#TurboQuantizer", + "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#TurboQuantizer", + "bindings/java/src/main/java/build/crab/prolly/javaapi/TurboQuantizer.java", + "bindings/ruby/lib/prolly/api.rb#TurboQuantizer", + "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#TurboQuantizer", + "bindings/wasm/src/index.ts#WasmTurboQuantizer" + ], + "reconciliation_rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators.", + "reviewed": true, + "rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators." + }, { "rust": "prolly::CborCodec", "classification": "portable", @@ -8663,6 +9715,47 @@ "tests": [], "docs": [] }, + { + "rust": "prolly::CompositeBase::TurboQuantized", + "classification": "portable", + "status": "implemented", + "family": "proximity-map", + "performance": "owned", + "languages": { + "python": "bindings/python/prolly/api.py#TurboQuantized", + "go": "bindings/go/proximity_accelerator.go#TurboQuantized", + "node": "bindings/node/src/proximity.ts#TurboQuantized", + "kotlin": "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#TurboQuantized", + "java": "bindings/java/src/main/java/build/crab/prolly/javaapi#TurboQuantized", + "ruby": "bindings/ruby/lib/prolly/api.rb#TurboQuantized", + "swift": "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#TurboQuantized", + "wasm": "bindings/wasm/src/index.ts#TurboQuantized" + }, + "exclusions": {}, + "tests": [ + "binding-proximity-turboquant-parity", + "proximity-turboquant-lifecycle" + ], + "docs": [ + "docs/proximity-map.md", + "docs/proximity-turboquant-qualification.md" + ], + "reconciliation": "bound-direct", + "reconciliation_evidence": [ + "bindings/uniffi/src/domain/proximity.rs#BindingTurboQuantizer", + "bindings/python/prolly/api.py#TurboQuantizer", + "bindings/go/proximity_accelerator.go#TurboQuantizer", + "bindings/node/src/proximity.ts#TurboQuantizer", + "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#TurboQuantizer", + "bindings/java/src/main/java/build/crab/prolly/javaapi/TurboQuantizer.java", + "bindings/ruby/lib/prolly/api.rb#TurboQuantizer", + "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#TurboQuantizer", + "bindings/wasm/src/index.ts#WasmTurboQuantizer" + ], + "reconciliation_rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators.", + "reviewed": true, + "rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators." + }, { "rust": "prolly::CompositeBase::kind", "classification": "portable", @@ -8718,6 +9811,47 @@ "tests": [], "docs": [] }, + { + "rust": "prolly::CompositeBaseKind::TurboQuantized", + "classification": "portable", + "status": "implemented", + "family": "proximity-map", + "performance": "owned", + "languages": { + "python": "bindings/python/prolly/api.py#TurboQuantized", + "go": "bindings/go/proximity_accelerator.go#TurboQuantized", + "node": "bindings/node/src/proximity.ts#TurboQuantized", + "kotlin": "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#TurboQuantized", + "java": "bindings/java/src/main/java/build/crab/prolly/javaapi#TurboQuantized", + "ruby": "bindings/ruby/lib/prolly/api.rb#TurboQuantized", + "swift": "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#TurboQuantized", + "wasm": "bindings/wasm/src/index.ts#TurboQuantized" + }, + "exclusions": {}, + "tests": [ + "binding-proximity-turboquant-parity", + "proximity-turboquant-lifecycle" + ], + "docs": [ + "docs/proximity-map.md", + "docs/proximity-turboquant-qualification.md" + ], + "reconciliation": "bound-direct", + "reconciliation_evidence": [ + "bindings/uniffi/src/domain/proximity.rs#BindingTurboQuantizer", + "bindings/python/prolly/api.py#TurboQuantizer", + "bindings/go/proximity_accelerator.go#TurboQuantizer", + "bindings/node/src/proximity.ts#TurboQuantizer", + "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#TurboQuantizer", + "bindings/java/src/main/java/build/crab/prolly/javaapi/TurboQuantizer.java", + "bindings/ruby/lib/prolly/api.rb#TurboQuantizer", + "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#TurboQuantizer", + "bindings/wasm/src/index.ts#WasmTurboQuantizer" + ], + "reconciliation_rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators.", + "reviewed": true, + "rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators." + }, { "rust": "prolly::CompositeBuildLimits", "classification": "portable", @@ -8828,6 +9962,47 @@ "tests": [], "docs": [] }, + { + "rust": "prolly::CompositeBuildOrRebuildOutcome::TurboQuantizedRebuilt", + "classification": "portable", + "status": "implemented", + "family": "proximity-map", + "performance": "owned", + "languages": { + "python": "bindings/python/prolly/api.py#TurboQuantizedRebuilt", + "go": "bindings/go/proximity_accelerator.go#TurboQuantizedRebuilt", + "node": "bindings/node/src/proximity.ts#TurboQuantizedRebuilt", + "kotlin": "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#TurboQuantizedRebuilt", + "java": "bindings/java/src/main/java/build/crab/prolly/javaapi#TurboQuantizedRebuilt", + "ruby": "bindings/ruby/lib/prolly/api.rb#TurboQuantizedRebuilt", + "swift": "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#TurboQuantizedRebuilt", + "wasm": "bindings/wasm/src/index.ts#TurboQuantizedRebuilt" + }, + "exclusions": {}, + "tests": [ + "binding-proximity-turboquant-parity", + "proximity-turboquant-lifecycle" + ], + "docs": [ + "docs/proximity-map.md", + "docs/proximity-turboquant-qualification.md" + ], + "reconciliation": "bound-direct", + "reconciliation_evidence": [ + "bindings/uniffi/src/domain/proximity.rs#BindingTurboQuantizer", + "bindings/python/prolly/api.py#TurboQuantizer", + "bindings/go/proximity_accelerator.go#TurboQuantizer", + "bindings/node/src/proximity.ts#TurboQuantizer", + "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#TurboQuantizer", + "bindings/java/src/main/java/build/crab/prolly/javaapi/TurboQuantizer.java", + "bindings/ruby/lib/prolly/api.rb#TurboQuantizer", + "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#TurboQuantizer", + "bindings/wasm/src/index.ts#WasmTurboQuantizer" + ], + "reconciliation_rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators.", + "reviewed": true, + "rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators." + }, { "rust": "prolly::CompositeBuildOutcome", "classification": "portable", @@ -9026,6 +10201,88 @@ "tests": [], "docs": [] }, + { + "rust": "prolly::CompositeRebuildOptions::turboquant_limits", + "classification": "portable", + "status": "implemented", + "family": "core", + "performance": "owned", + "languages": { + "python": "bindings/python/prolly/api.py#turboquant_limits", + "go": "bindings/go/proximity_accelerator.go#turboquant_limits", + "node": "bindings/node/src/proximity.ts#turboquant_limits", + "kotlin": "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#turboquant_limits", + "java": "bindings/java/src/main/java/build/crab/prolly/javaapi#turboquant_limits", + "ruby": "bindings/ruby/lib/prolly/api.rb#turboquant_limits", + "swift": "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#turboquant_limits", + "wasm": "bindings/wasm/src/index.ts#turboquant_limits" + }, + "exclusions": {}, + "tests": [ + "binding-proximity-turboquant-parity", + "proximity-turboquant-lifecycle" + ], + "docs": [ + "docs/proximity-map.md", + "docs/proximity-turboquant-qualification.md" + ], + "reconciliation": "bound-direct", + "reconciliation_evidence": [ + "bindings/uniffi/src/domain/proximity.rs#BindingTurboQuantizer", + "bindings/python/prolly/api.py#TurboQuantizer", + "bindings/go/proximity_accelerator.go#TurboQuantizer", + "bindings/node/src/proximity.ts#TurboQuantizer", + "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#TurboQuantizer", + "bindings/java/src/main/java/build/crab/prolly/javaapi/TurboQuantizer.java", + "bindings/ruby/lib/prolly/api.rb#TurboQuantizer", + "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#TurboQuantizer", + "bindings/wasm/src/index.ts#WasmTurboQuantizer" + ], + "reconciliation_rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators.", + "reviewed": true, + "rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators." + }, + { + "rust": "prolly::CompositeRebuildOptions::turboquant_parallelism", + "classification": "portable", + "status": "implemented", + "family": "core", + "performance": "owned", + "languages": { + "python": "bindings/python/prolly/api.py#turboquant_parallelism", + "go": "bindings/go/proximity_accelerator.go#turboquant_parallelism", + "node": "bindings/node/src/proximity.ts#turboquant_parallelism", + "kotlin": "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#turboquant_parallelism", + "java": "bindings/java/src/main/java/build/crab/prolly/javaapi#turboquant_parallelism", + "ruby": "bindings/ruby/lib/prolly/api.rb#turboquant_parallelism", + "swift": "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#turboquant_parallelism", + "wasm": "bindings/wasm/src/index.ts#turboquant_parallelism" + }, + "exclusions": {}, + "tests": [ + "binding-proximity-turboquant-parity", + "proximity-turboquant-lifecycle" + ], + "docs": [ + "docs/proximity-map.md", + "docs/proximity-turboquant-qualification.md" + ], + "reconciliation": "bound-direct", + "reconciliation_evidence": [ + "bindings/uniffi/src/domain/proximity.rs#BindingTurboQuantizer", + "bindings/python/prolly/api.py#TurboQuantizer", + "bindings/go/proximity_accelerator.go#TurboQuantizer", + "bindings/node/src/proximity.ts#TurboQuantizer", + "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#TurboQuantizer", + "bindings/java/src/main/java/build/crab/prolly/javaapi/TurboQuantizer.java", + "bindings/ruby/lib/prolly/api.rb#TurboQuantizer", + "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#TurboQuantizer", + "bindings/wasm/src/index.ts#WasmTurboQuantizer" + ], + "reconciliation_rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators.", + "reviewed": true, + "rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators." + }, { "rust": "prolly::Config", "classification": "portable", @@ -9963,6 +11220,47 @@ "tests": [], "docs": [] }, + { + "rust": "prolly::ContentObjectKind::TurboQuantization", + "classification": "portable", + "status": "implemented", + "family": "proximity-map", + "performance": "owned", + "languages": { + "python": "bindings/python/prolly/api.py#TurboQuantization", + "go": "bindings/go/proximity_accelerator.go#TurboQuantization", + "node": "bindings/node/src/proximity.ts#TurboQuantization", + "kotlin": "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#TurboQuantization", + "java": "bindings/java/src/main/java/build/crab/prolly/javaapi#TurboQuantization", + "ruby": "bindings/ruby/lib/prolly/api.rb#TurboQuantization", + "swift": "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#TurboQuantization", + "wasm": "bindings/wasm/src/index.ts#TurboQuantization" + }, + "exclusions": {}, + "tests": [ + "binding-proximity-turboquant-parity", + "proximity-turboquant-lifecycle" + ], + "docs": [ + "docs/proximity-map.md", + "docs/proximity-turboquant-qualification.md" + ], + "reconciliation": "bound-direct", + "reconciliation_evidence": [ + "bindings/uniffi/src/domain/proximity.rs#BindingTurboQuantizer", + "bindings/python/prolly/api.py#TurboQuantizer", + "bindings/go/proximity_accelerator.go#TurboQuantizer", + "bindings/node/src/proximity.ts#TurboQuantizer", + "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#TurboQuantizer", + "bindings/java/src/main/java/build/crab/prolly/javaapi/TurboQuantizer.java", + "bindings/ruby/lib/prolly/api.rb#TurboQuantizer", + "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#TurboQuantizer", + "bindings/wasm/src/index.ts#WasmTurboQuantizer" + ], + "reconciliation_rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators.", + "reviewed": true, + "rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators." + }, { "rust": "prolly::ContentRootManifest", "classification": "portable", @@ -33512,6 +34810,47 @@ "tests": [], "docs": [] }, + { + "rust": "prolly::SearchBackend::TurboQuantized", + "classification": "portable", + "status": "implemented", + "family": "proximity-map", + "performance": "owned", + "languages": { + "python": "bindings/python/prolly/api.py#TurboQuantized", + "go": "bindings/go/proximity_accelerator.go#TurboQuantized", + "node": "bindings/node/src/proximity.ts#TurboQuantized", + "kotlin": "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#TurboQuantized", + "java": "bindings/java/src/main/java/build/crab/prolly/javaapi#TurboQuantized", + "ruby": "bindings/ruby/lib/prolly/api.rb#TurboQuantized", + "swift": "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#TurboQuantized", + "wasm": "bindings/wasm/src/index.ts#TurboQuantized" + }, + "exclusions": {}, + "tests": [ + "binding-proximity-turboquant-parity", + "proximity-turboquant-lifecycle" + ], + "docs": [ + "docs/proximity-map.md", + "docs/proximity-turboquant-qualification.md" + ], + "reconciliation": "bound-direct", + "reconciliation_evidence": [ + "bindings/uniffi/src/domain/proximity.rs#BindingTurboQuantizer", + "bindings/python/prolly/api.py#TurboQuantizer", + "bindings/go/proximity_accelerator.go#TurboQuantizer", + "bindings/node/src/proximity.ts#TurboQuantizer", + "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#TurboQuantizer", + "bindings/java/src/main/java/build/crab/prolly/javaapi/TurboQuantizer.java", + "bindings/ruby/lib/prolly/api.rb#TurboQuantizer", + "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#TurboQuantizer", + "bindings/wasm/src/index.ts#WasmTurboQuantizer" + ], + "reconciliation_rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators.", + "reviewed": true, + "rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators." + }, { "rust": "prolly::SearchBudget", "classification": "portable", @@ -33824,6 +35163,47 @@ "tests": [], "docs": [] }, + { + "rust": "prolly::SearchOptions::turboquant", + "classification": "portable", + "status": "implemented", + "family": "core", + "performance": "owned", + "languages": { + "python": "bindings/python/prolly/api.py#turboquant", + "go": "bindings/go/proximity_accelerator.go#turboquant", + "node": "bindings/node/src/proximity.ts#turboquant", + "kotlin": "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#turboquant", + "java": "bindings/java/src/main/java/build/crab/prolly/javaapi#turboquant", + "ruby": "bindings/ruby/lib/prolly/api.rb#turboquant", + "swift": "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#turboquant", + "wasm": "bindings/wasm/src/index.ts#turboquant" + }, + "exclusions": {}, + "tests": [ + "binding-proximity-turboquant-parity", + "proximity-turboquant-lifecycle" + ], + "docs": [ + "docs/proximity-map.md", + "docs/proximity-turboquant-qualification.md" + ], + "reconciliation": "bound-direct", + "reconciliation_evidence": [ + "bindings/uniffi/src/domain/proximity.rs#BindingTurboQuantizer", + "bindings/python/prolly/api.py#TurboQuantizer", + "bindings/go/proximity_accelerator.go#TurboQuantizer", + "bindings/node/src/proximity.ts#TurboQuantizer", + "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#TurboQuantizer", + "bindings/java/src/main/java/build/crab/prolly/javaapi/TurboQuantizer.java", + "bindings/ruby/lib/prolly/api.rb#TurboQuantizer", + "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#TurboQuantizer", + "bindings/wasm/src/index.ts#WasmTurboQuantizer" + ], + "reconciliation_rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators.", + "reviewed": true, + "rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators." + }, { "rust": "prolly::SearchPlan", "classification": "portable", @@ -33890,6 +35270,47 @@ "tests": [], "docs": [] }, + { + "rust": "prolly::SearchPlan::TurboQuantized", + "classification": "portable", + "status": "implemented", + "family": "proximity-map", + "performance": "owned", + "languages": { + "python": "bindings/python/prolly/api.py#TurboQuantized", + "go": "bindings/go/proximity_accelerator.go#TurboQuantized", + "node": "bindings/node/src/proximity.ts#TurboQuantized", + "kotlin": "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#TurboQuantized", + "java": "bindings/java/src/main/java/build/crab/prolly/javaapi#TurboQuantized", + "ruby": "bindings/ruby/lib/prolly/api.rb#TurboQuantized", + "swift": "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#TurboQuantized", + "wasm": "bindings/wasm/src/index.ts#TurboQuantized" + }, + "exclusions": {}, + "tests": [ + "binding-proximity-turboquant-parity", + "proximity-turboquant-lifecycle" + ], + "docs": [ + "docs/proximity-map.md", + "docs/proximity-turboquant-qualification.md" + ], + "reconciliation": "bound-direct", + "reconciliation_evidence": [ + "bindings/uniffi/src/domain/proximity.rs#BindingTurboQuantizer", + "bindings/python/prolly/api.py#TurboQuantizer", + "bindings/go/proximity_accelerator.go#TurboQuantizer", + "bindings/node/src/proximity.ts#TurboQuantizer", + "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#TurboQuantizer", + "bindings/java/src/main/java/build/crab/prolly/javaapi/TurboQuantizer.java", + "bindings/ruby/lib/prolly/api.rb#TurboQuantizer", + "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#TurboQuantizer", + "bindings/wasm/src/index.ts#WasmTurboQuantizer" + ], + "reconciliation_rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators.", + "reviewed": true, + "rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators." + }, { "rust": "prolly::SearchPlan::summary", "classification": "portable", @@ -34333,6 +35754,47 @@ "tests": [], "docs": [] }, + { + "rust": "prolly::SearchRuntimePolicy::turboquant_max_bytes", + "classification": "portable", + "status": "implemented", + "family": "core", + "performance": "owned", + "languages": { + "python": "bindings/python/prolly/api.py#turboquant_max_bytes", + "go": "bindings/go/proximity_accelerator.go#turboquant_max_bytes", + "node": "bindings/node/src/proximity.ts#turboquant_max_bytes", + "kotlin": "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#turboquant_max_bytes", + "java": "bindings/java/src/main/java/build/crab/prolly/javaapi#turboquant_max_bytes", + "ruby": "bindings/ruby/lib/prolly/api.rb#turboquant_max_bytes", + "swift": "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#turboquant_max_bytes", + "wasm": "bindings/wasm/src/index.ts#turboquant_max_bytes" + }, + "exclusions": {}, + "tests": [ + "binding-proximity-turboquant-parity", + "proximity-turboquant-lifecycle" + ], + "docs": [ + "docs/proximity-map.md", + "docs/proximity-turboquant-qualification.md" + ], + "reconciliation": "bound-direct", + "reconciliation_evidence": [ + "bindings/uniffi/src/domain/proximity.rs#BindingTurboQuantizer", + "bindings/python/prolly/api.py#TurboQuantizer", + "bindings/go/proximity_accelerator.go#TurboQuantizer", + "bindings/node/src/proximity.ts#TurboQuantizer", + "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#TurboQuantizer", + "bindings/java/src/main/java/build/crab/prolly/javaapi/TurboQuantizer.java", + "bindings/ruby/lib/prolly/api.rb#TurboQuantizer", + "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#TurboQuantizer", + "bindings/wasm/src/index.ts#WasmTurboQuantizer" + ], + "reconciliation_rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators.", + "reviewed": true, + "rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators." + }, { "rust": "prolly::SearchRuntimePolicy::validate", "classification": "portable", @@ -38005,6 +39467,40 @@ ], "reconciliation_rationale": "The reviewed store-trait contract defines concrete host symbols, portable semantics, performance behavior, and shared conformance evidence for this Rust abstraction." }, + { + "rust": "prolly::Store::batch_get_validated_shared_ordered_unique", + "classification": "idiomatic", + "status": "implemented", + "family": "core", + "performance": "owned", + "languages": { + "python": "HostStoreCallback/ForeignRemoteStore contract (prolly::Store::batch_get_validated_shared_ordered_unique)", + "go": "prolly.RemoteStore contract with Rust-owned defaults (prolly::Store::batch_get_validated_shared_ordered_unique)", + "node": "NativeHostStore/RemoteStore contract (prolly::Store::batch_get_validated_shared_ordered_unique)", + "kotlin": "HostStoreCallback/RemoteStore contract (prolly::Store::batch_get_validated_shared_ordered_unique)", + "java": "HostStoreAdapter/RemoteStore contract (prolly::Store::batch_get_validated_shared_ordered_unique)", + "ruby": "Prolly::HostStoreCallback/ForeignRemoteStore contract (prolly::Store::batch_get_validated_shared_ordered_unique)", + "swift": "HostStoreCallback/ForeignRemoteStore contract (prolly::Store::batch_get_validated_shared_ordered_unique)", + "wasm": "RemoteStore contract with Rust-owned defaults (prolly::Store::batch_get_validated_shared_ordered_unique)" + }, + "exclusions": {}, + "tests": [ + "portable-parity::custom-store-callbacks" + ], + "docs": [ + "bindings/api/idiomatic-equivalents.json#store-trait" + ], + "equivalence": "store-trait", + "rationale": "prolly::Store::batch_get_validated_shared_ordered_unique is represented by the reviewed store-trait host-language contract instead of a literal Rust declaration.", + "reviewed": true, + "audience": "rust-extension", + "audience_rationale": "prolly::Store::batch_get_validated_shared_ordered_unique supports the portable application API through the store-trait contract and is not a separately invoked application operation.", + "reconciliation": "bound-idiomatic", + "reconciliation_evidence": [ + "bindings/api/idiomatic-equivalents.json#store-trait" + ], + "reconciliation_rationale": "The reviewed store-trait contract defines concrete host symbols, portable semantics, performance behavior, and shared conformance evidence for this Rust abstraction." + }, { "rust": "prolly::Store::batch_put", "classification": "idiomatic", @@ -38209,6 +39705,40 @@ ], "reconciliation_rationale": "The reviewed store-trait contract defines concrete host symbols, portable semantics, performance behavior, and shared conformance evidence for this Rust abstraction." }, + { + "rust": "prolly::Store::get_validated_shared", + "classification": "idiomatic", + "status": "implemented", + "family": "core", + "performance": "owned", + "languages": { + "python": "HostStoreCallback/ForeignRemoteStore contract (prolly::Store::get_validated_shared)", + "go": "prolly.RemoteStore contract with Rust-owned defaults (prolly::Store::get_validated_shared)", + "node": "NativeHostStore/RemoteStore contract (prolly::Store::get_validated_shared)", + "kotlin": "HostStoreCallback/RemoteStore contract (prolly::Store::get_validated_shared)", + "java": "HostStoreAdapter/RemoteStore contract (prolly::Store::get_validated_shared)", + "ruby": "Prolly::HostStoreCallback/ForeignRemoteStore contract (prolly::Store::get_validated_shared)", + "swift": "HostStoreCallback/ForeignRemoteStore contract (prolly::Store::get_validated_shared)", + "wasm": "RemoteStore contract with Rust-owned defaults (prolly::Store::get_validated_shared)" + }, + "exclusions": {}, + "tests": [ + "portable-parity::custom-store-callbacks" + ], + "docs": [ + "bindings/api/idiomatic-equivalents.json#store-trait" + ], + "equivalence": "store-trait", + "rationale": "prolly::Store::get_validated_shared is represented by the reviewed store-trait host-language contract instead of a literal Rust declaration.", + "reviewed": true, + "audience": "rust-extension", + "audience_rationale": "prolly::Store::get_validated_shared supports the portable application API through the store-trait contract and is not a separately invoked application operation.", + "reconciliation": "bound-idiomatic", + "reconciliation_evidence": [ + "bindings/api/idiomatic-equivalents.json#store-trait" + ], + "reconciliation_rationale": "The reviewed store-trait contract defines concrete host symbols, portable semantics, performance behavior, and shared conformance evidence for this Rust abstraction." + }, { "rust": "prolly::Store::has_native_shared_reads", "classification": "idiomatic", @@ -40615,6 +42145,1605 @@ "tests": [], "docs": [] }, + { + "rust": "prolly::TurboQuantSearchOptions", + "classification": "portable", + "status": "implemented", + "family": "core", + "performance": "owned", + "languages": { + "python": "bindings/python/prolly/api.py#TurboQuantSearchOptions", + "go": "bindings/go/proximity_accelerator.go#TurboQuantSearchOptions", + "node": "bindings/node/src/proximity.ts#TurboQuantSearchOptions", + "kotlin": "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#TurboQuantSearchOptions", + "java": "bindings/java/src/main/java/build/crab/prolly/javaapi#TurboQuantSearchOptions", + "ruby": "bindings/ruby/lib/prolly/api.rb#TurboQuantSearchOptions", + "swift": "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#TurboQuantSearchOptions", + "wasm": "bindings/wasm/src/index.ts#TurboQuantSearchOptions" + }, + "exclusions": {}, + "tests": [ + "binding-proximity-turboquant-parity", + "proximity-turboquant-lifecycle" + ], + "docs": [ + "docs/proximity-map.md", + "docs/proximity-turboquant-qualification.md" + ], + "reconciliation": "bound-direct", + "reconciliation_evidence": [ + "bindings/uniffi/src/domain/proximity.rs#BindingTurboQuantizer", + "bindings/python/prolly/api.py#TurboQuantizer", + "bindings/go/proximity_accelerator.go#TurboQuantizer", + "bindings/node/src/proximity.ts#TurboQuantizer", + "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#TurboQuantizer", + "bindings/java/src/main/java/build/crab/prolly/javaapi/TurboQuantizer.java", + "bindings/ruby/lib/prolly/api.rb#TurboQuantizer", + "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#TurboQuantizer", + "bindings/wasm/src/index.ts#WasmTurboQuantizer" + ], + "reconciliation_rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators.", + "reviewed": true, + "rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators." + }, + { + "rust": "prolly::TurboQuantSearchOptions::rerank_multiplier", + "classification": "portable", + "status": "implemented", + "family": "core", + "performance": "owned", + "languages": { + "python": "bindings/python/prolly/api.py#rerank_multiplier", + "go": "bindings/go/proximity_accelerator.go#rerank_multiplier", + "node": "bindings/node/src/proximity.ts#rerank_multiplier", + "kotlin": "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#rerank_multiplier", + "java": "bindings/java/src/main/java/build/crab/prolly/javaapi#rerank_multiplier", + "ruby": "bindings/ruby/lib/prolly/api.rb#rerank_multiplier", + "swift": "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#rerank_multiplier", + "wasm": "bindings/wasm/src/index.ts#rerank_multiplier" + }, + "exclusions": {}, + "tests": [ + "binding-proximity-turboquant-parity", + "proximity-turboquant-lifecycle" + ], + "docs": [ + "docs/proximity-map.md", + "docs/proximity-turboquant-qualification.md" + ], + "reconciliation": "bound-direct", + "reconciliation_evidence": [ + "bindings/uniffi/src/domain/proximity.rs#BindingTurboQuantizer", + "bindings/python/prolly/api.py#TurboQuantizer", + "bindings/go/proximity_accelerator.go#TurboQuantizer", + "bindings/node/src/proximity.ts#TurboQuantizer", + "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#TurboQuantizer", + "bindings/java/src/main/java/build/crab/prolly/javaapi/TurboQuantizer.java", + "bindings/ruby/lib/prolly/api.rb#TurboQuantizer", + "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#TurboQuantizer", + "bindings/wasm/src/index.ts#WasmTurboQuantizer" + ], + "reconciliation_rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators.", + "reviewed": true, + "rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators." + }, + { + "rust": "prolly::TurboQuantizationBuildLimits", + "classification": "portable", + "status": "implemented", + "family": "proximity-map", + "performance": "owned", + "languages": { + "python": "bindings/python/prolly/api.py#TurboQuantizationBuildLimits", + "go": "bindings/go/proximity_accelerator.go#TurboQuantizationBuildLimits", + "node": "bindings/node/src/proximity.ts#TurboQuantizationBuildLimits", + "kotlin": "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#TurboQuantizationBuildLimits", + "java": "bindings/java/src/main/java/build/crab/prolly/javaapi#TurboQuantizationBuildLimits", + "ruby": "bindings/ruby/lib/prolly/api.rb#TurboQuantizationBuildLimits", + "swift": "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#TurboQuantizationBuildLimits", + "wasm": "bindings/wasm/src/index.ts#TurboQuantizationBuildLimits" + }, + "exclusions": {}, + "tests": [ + "binding-proximity-turboquant-parity", + "proximity-turboquant-lifecycle" + ], + "docs": [ + "docs/proximity-map.md", + "docs/proximity-turboquant-qualification.md" + ], + "reconciliation": "bound-direct", + "reconciliation_evidence": [ + "bindings/uniffi/src/domain/proximity.rs#BindingTurboQuantizer", + "bindings/python/prolly/api.py#TurboQuantizer", + "bindings/go/proximity_accelerator.go#TurboQuantizer", + "bindings/node/src/proximity.ts#TurboQuantizer", + "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#TurboQuantizer", + "bindings/java/src/main/java/build/crab/prolly/javaapi/TurboQuantizer.java", + "bindings/ruby/lib/prolly/api.rb#TurboQuantizer", + "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#TurboQuantizer", + "bindings/wasm/src/index.ts#WasmTurboQuantizer" + ], + "reconciliation_rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators.", + "reviewed": true, + "rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators." + }, + { + "rust": "prolly::TurboQuantizationBuildLimits::max_encoded_output_bytes", + "classification": "portable", + "status": "implemented", + "family": "proximity-map", + "performance": "owned", + "languages": { + "python": "bindings/python/prolly/api.py#max_encoded_output_bytes", + "go": "bindings/go/proximity_accelerator.go#max_encoded_output_bytes", + "node": "bindings/node/src/proximity.ts#max_encoded_output_bytes", + "kotlin": "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#max_encoded_output_bytes", + "java": "bindings/java/src/main/java/build/crab/prolly/javaapi#max_encoded_output_bytes", + "ruby": "bindings/ruby/lib/prolly/api.rb#max_encoded_output_bytes", + "swift": "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#max_encoded_output_bytes", + "wasm": "bindings/wasm/src/index.ts#max_encoded_output_bytes" + }, + "exclusions": {}, + "tests": [ + "binding-proximity-turboquant-parity", + "proximity-turboquant-lifecycle" + ], + "docs": [ + "docs/proximity-map.md", + "docs/proximity-turboquant-qualification.md" + ], + "reconciliation": "bound-direct", + "reconciliation_evidence": [ + "bindings/uniffi/src/domain/proximity.rs#BindingTurboQuantizer", + "bindings/python/prolly/api.py#TurboQuantizer", + "bindings/go/proximity_accelerator.go#TurboQuantizer", + "bindings/node/src/proximity.ts#TurboQuantizer", + "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#TurboQuantizer", + "bindings/java/src/main/java/build/crab/prolly/javaapi/TurboQuantizer.java", + "bindings/ruby/lib/prolly/api.rb#TurboQuantizer", + "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#TurboQuantizer", + "bindings/wasm/src/index.ts#WasmTurboQuantizer" + ], + "reconciliation_rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators.", + "reviewed": true, + "rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators." + }, + { + "rust": "prolly::TurboQuantizationBuildLimits::max_input_bytes", + "classification": "portable", + "status": "implemented", + "family": "proximity-map", + "performance": "owned", + "languages": { + "python": "bindings/python/prolly/api.py#max_input_bytes", + "go": "bindings/go/proximity_accelerator.go#max_input_bytes", + "node": "bindings/node/src/proximity.ts#max_input_bytes", + "kotlin": "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#max_input_bytes", + "java": "bindings/java/src/main/java/build/crab/prolly/javaapi#max_input_bytes", + "ruby": "bindings/ruby/lib/prolly/api.rb#max_input_bytes", + "swift": "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#max_input_bytes", + "wasm": "bindings/wasm/src/index.ts#max_input_bytes" + }, + "exclusions": {}, + "tests": [ + "binding-proximity-turboquant-parity", + "proximity-turboquant-lifecycle" + ], + "docs": [ + "docs/proximity-map.md", + "docs/proximity-turboquant-qualification.md" + ], + "reconciliation": "bound-direct", + "reconciliation_evidence": [ + "bindings/uniffi/src/domain/proximity.rs#BindingTurboQuantizer", + "bindings/python/prolly/api.py#TurboQuantizer", + "bindings/go/proximity_accelerator.go#TurboQuantizer", + "bindings/node/src/proximity.ts#TurboQuantizer", + "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#TurboQuantizer", + "bindings/java/src/main/java/build/crab/prolly/javaapi/TurboQuantizer.java", + "bindings/ruby/lib/prolly/api.rb#TurboQuantizer", + "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#TurboQuantizer", + "bindings/wasm/src/index.ts#WasmTurboQuantizer" + ], + "reconciliation_rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators.", + "reviewed": true, + "rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators." + }, + { + "rust": "prolly::TurboQuantizationBuildLimits::max_records", + "classification": "portable", + "status": "implemented", + "family": "proximity-map", + "performance": "owned", + "languages": { + "python": "bindings/python/prolly/api.py#max_records", + "go": "bindings/go/proximity_accelerator.go#max_records", + "node": "bindings/node/src/proximity.ts#max_records", + "kotlin": "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#max_records", + "java": "bindings/java/src/main/java/build/crab/prolly/javaapi#max_records", + "ruby": "bindings/ruby/lib/prolly/api.rb#max_records", + "swift": "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#max_records", + "wasm": "bindings/wasm/src/index.ts#max_records" + }, + "exclusions": {}, + "tests": [ + "binding-proximity-turboquant-parity", + "proximity-turboquant-lifecycle" + ], + "docs": [ + "docs/proximity-map.md", + "docs/proximity-turboquant-qualification.md" + ], + "reconciliation": "bound-direct", + "reconciliation_evidence": [ + "bindings/uniffi/src/domain/proximity.rs#BindingTurboQuantizer", + "bindings/python/prolly/api.py#TurboQuantizer", + "bindings/go/proximity_accelerator.go#TurboQuantizer", + "bindings/node/src/proximity.ts#TurboQuantizer", + "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#TurboQuantizer", + "bindings/java/src/main/java/build/crab/prolly/javaapi/TurboQuantizer.java", + "bindings/ruby/lib/prolly/api.rb#TurboQuantizer", + "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#TurboQuantizer", + "bindings/wasm/src/index.ts#WasmTurboQuantizer" + ], + "reconciliation_rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators.", + "reviewed": true, + "rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators." + }, + { + "rust": "prolly::TurboQuantizationBuildLimits::max_temporary_bytes", + "classification": "portable", + "status": "implemented", + "family": "proximity-map", + "performance": "owned", + "languages": { + "python": "bindings/python/prolly/api.py#max_temporary_bytes", + "go": "bindings/go/proximity_accelerator.go#max_temporary_bytes", + "node": "bindings/node/src/proximity.ts#max_temporary_bytes", + "kotlin": "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#max_temporary_bytes", + "java": "bindings/java/src/main/java/build/crab/prolly/javaapi#max_temporary_bytes", + "ruby": "bindings/ruby/lib/prolly/api.rb#max_temporary_bytes", + "swift": "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#max_temporary_bytes", + "wasm": "bindings/wasm/src/index.ts#max_temporary_bytes" + }, + "exclusions": {}, + "tests": [ + "binding-proximity-turboquant-parity", + "proximity-turboquant-lifecycle" + ], + "docs": [ + "docs/proximity-map.md", + "docs/proximity-turboquant-qualification.md" + ], + "reconciliation": "bound-direct", + "reconciliation_evidence": [ + "bindings/uniffi/src/domain/proximity.rs#BindingTurboQuantizer", + "bindings/python/prolly/api.py#TurboQuantizer", + "bindings/go/proximity_accelerator.go#TurboQuantizer", + "bindings/node/src/proximity.ts#TurboQuantizer", + "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#TurboQuantizer", + "bindings/java/src/main/java/build/crab/prolly/javaapi/TurboQuantizer.java", + "bindings/ruby/lib/prolly/api.rb#TurboQuantizer", + "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#TurboQuantizer", + "bindings/wasm/src/index.ts#WasmTurboQuantizer" + ], + "reconciliation_rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators.", + "reviewed": true, + "rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators." + }, + { + "rust": "prolly::TurboQuantizationBuildLimits::max_transform_operations", + "classification": "portable", + "status": "implemented", + "family": "proximity-map", + "performance": "owned", + "languages": { + "python": "bindings/python/prolly/api.py#max_transform_operations", + "go": "bindings/go/proximity_accelerator.go#max_transform_operations", + "node": "bindings/node/src/proximity.ts#max_transform_operations", + "kotlin": "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#max_transform_operations", + "java": "bindings/java/src/main/java/build/crab/prolly/javaapi#max_transform_operations", + "ruby": "bindings/ruby/lib/prolly/api.rb#max_transform_operations", + "swift": "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#max_transform_operations", + "wasm": "bindings/wasm/src/index.ts#max_transform_operations" + }, + "exclusions": {}, + "tests": [ + "binding-proximity-turboquant-parity", + "proximity-turboquant-lifecycle" + ], + "docs": [ + "docs/proximity-map.md", + "docs/proximity-turboquant-qualification.md" + ], + "reconciliation": "bound-direct", + "reconciliation_evidence": [ + "bindings/uniffi/src/domain/proximity.rs#BindingTurboQuantizer", + "bindings/python/prolly/api.py#TurboQuantizer", + "bindings/go/proximity_accelerator.go#TurboQuantizer", + "bindings/node/src/proximity.ts#TurboQuantizer", + "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#TurboQuantizer", + "bindings/java/src/main/java/build/crab/prolly/javaapi/TurboQuantizer.java", + "bindings/ruby/lib/prolly/api.rb#TurboQuantizer", + "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#TurboQuantizer", + "bindings/wasm/src/index.ts#WasmTurboQuantizer" + ], + "reconciliation_rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators.", + "reviewed": true, + "rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators." + }, + { + "rust": "prolly::TurboQuantizationBuildLimits::max_worker_threads", + "classification": "portable", + "status": "implemented", + "family": "proximity-map", + "performance": "owned", + "languages": { + "python": "bindings/python/prolly/api.py#max_worker_threads", + "go": "bindings/go/proximity_accelerator.go#max_worker_threads", + "node": "bindings/node/src/proximity.ts#max_worker_threads", + "kotlin": "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#max_worker_threads", + "java": "bindings/java/src/main/java/build/crab/prolly/javaapi#max_worker_threads", + "ruby": "bindings/ruby/lib/prolly/api.rb#max_worker_threads", + "swift": "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#max_worker_threads", + "wasm": "bindings/wasm/src/index.ts#max_worker_threads" + }, + "exclusions": {}, + "tests": [ + "binding-proximity-turboquant-parity", + "proximity-turboquant-lifecycle" + ], + "docs": [ + "docs/proximity-map.md", + "docs/proximity-turboquant-qualification.md" + ], + "reconciliation": "bound-direct", + "reconciliation_evidence": [ + "bindings/uniffi/src/domain/proximity.rs#BindingTurboQuantizer", + "bindings/python/prolly/api.py#TurboQuantizer", + "bindings/go/proximity_accelerator.go#TurboQuantizer", + "bindings/node/src/proximity.ts#TurboQuantizer", + "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#TurboQuantizer", + "bindings/java/src/main/java/build/crab/prolly/javaapi/TurboQuantizer.java", + "bindings/ruby/lib/prolly/api.rb#TurboQuantizer", + "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#TurboQuantizer", + "bindings/wasm/src/index.ts#WasmTurboQuantizer" + ], + "reconciliation_rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators.", + "reviewed": true, + "rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators." + }, + { + "rust": "prolly::TurboQuantizationBuildStats", + "classification": "portable", + "status": "implemented", + "family": "proximity-map", + "performance": "owned", + "languages": { + "python": "bindings/python/prolly/api.py#TurboQuantizationBuildStats", + "go": "bindings/go/proximity_accelerator.go#TurboQuantizationBuildStats", + "node": "bindings/node/src/proximity.ts#TurboQuantizationBuildStats", + "kotlin": "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#TurboQuantizationBuildStats", + "java": "bindings/java/src/main/java/build/crab/prolly/javaapi#TurboQuantizationBuildStats", + "ruby": "bindings/ruby/lib/prolly/api.rb#TurboQuantizationBuildStats", + "swift": "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#TurboQuantizationBuildStats", + "wasm": "bindings/wasm/src/index.ts#TurboQuantizationBuildStats" + }, + "exclusions": {}, + "tests": [ + "binding-proximity-turboquant-parity", + "proximity-turboquant-lifecycle" + ], + "docs": [ + "docs/proximity-map.md", + "docs/proximity-turboquant-qualification.md" + ], + "reconciliation": "bound-direct", + "reconciliation_evidence": [ + "bindings/uniffi/src/domain/proximity.rs#BindingTurboQuantizer", + "bindings/python/prolly/api.py#TurboQuantizer", + "bindings/go/proximity_accelerator.go#TurboQuantizer", + "bindings/node/src/proximity.ts#TurboQuantizer", + "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#TurboQuantizer", + "bindings/java/src/main/java/build/crab/prolly/javaapi/TurboQuantizer.java", + "bindings/ruby/lib/prolly/api.rb#TurboQuantizer", + "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#TurboQuantizer", + "bindings/wasm/src/index.ts#WasmTurboQuantizer" + ], + "reconciliation_rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators.", + "reviewed": true, + "rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators." + }, + { + "rust": "prolly::TurboQuantizationBuildStats::butterfly_operations", + "classification": "portable", + "status": "implemented", + "family": "proximity-map", + "performance": "owned", + "languages": { + "python": "bindings/python/prolly/api.py#butterfly_operations", + "go": "bindings/go/proximity_accelerator.go#butterfly_operations", + "node": "bindings/node/src/proximity.ts#butterfly_operations", + "kotlin": "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#butterfly_operations", + "java": "bindings/java/src/main/java/build/crab/prolly/javaapi#butterfly_operations", + "ruby": "bindings/ruby/lib/prolly/api.rb#butterfly_operations", + "swift": "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#butterfly_operations", + "wasm": "bindings/wasm/src/index.ts#butterfly_operations" + }, + "exclusions": {}, + "tests": [ + "binding-proximity-turboquant-parity", + "proximity-turboquant-lifecycle" + ], + "docs": [ + "docs/proximity-map.md", + "docs/proximity-turboquant-qualification.md" + ], + "reconciliation": "bound-direct", + "reconciliation_evidence": [ + "bindings/uniffi/src/domain/proximity.rs#BindingTurboQuantizer", + "bindings/python/prolly/api.py#TurboQuantizer", + "bindings/go/proximity_accelerator.go#TurboQuantizer", + "bindings/node/src/proximity.ts#TurboQuantizer", + "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#TurboQuantizer", + "bindings/java/src/main/java/build/crab/prolly/javaapi/TurboQuantizer.java", + "bindings/ruby/lib/prolly/api.rb#TurboQuantizer", + "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#TurboQuantizer", + "bindings/wasm/src/index.ts#WasmTurboQuantizer" + ], + "reconciliation_rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators.", + "reviewed": true, + "rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators." + }, + { + "rust": "prolly::TurboQuantizationBuildStats::encoded_output_bytes", + "classification": "portable", + "status": "implemented", + "family": "proximity-map", + "performance": "owned", + "languages": { + "python": "bindings/python/prolly/api.py#encoded_output_bytes", + "go": "bindings/go/proximity_accelerator.go#encoded_output_bytes", + "node": "bindings/node/src/proximity.ts#encoded_output_bytes", + "kotlin": "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#encoded_output_bytes", + "java": "bindings/java/src/main/java/build/crab/prolly/javaapi#encoded_output_bytes", + "ruby": "bindings/ruby/lib/prolly/api.rb#encoded_output_bytes", + "swift": "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#encoded_output_bytes", + "wasm": "bindings/wasm/src/index.ts#encoded_output_bytes" + }, + "exclusions": {}, + "tests": [ + "binding-proximity-turboquant-parity", + "proximity-turboquant-lifecycle" + ], + "docs": [ + "docs/proximity-map.md", + "docs/proximity-turboquant-qualification.md" + ], + "reconciliation": "bound-direct", + "reconciliation_evidence": [ + "bindings/uniffi/src/domain/proximity.rs#BindingTurboQuantizer", + "bindings/python/prolly/api.py#TurboQuantizer", + "bindings/go/proximity_accelerator.go#TurboQuantizer", + "bindings/node/src/proximity.ts#TurboQuantizer", + "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#TurboQuantizer", + "bindings/java/src/main/java/build/crab/prolly/javaapi/TurboQuantizer.java", + "bindings/ruby/lib/prolly/api.rb#TurboQuantizer", + "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#TurboQuantizer", + "bindings/wasm/src/index.ts#WasmTurboQuantizer" + ], + "reconciliation_rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators.", + "reviewed": true, + "rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators." + }, + { + "rust": "prolly::TurboQuantizationBuildStats::encoded_vectors", + "classification": "portable", + "status": "implemented", + "family": "proximity-map", + "performance": "owned", + "languages": { + "python": "bindings/python/prolly/api.py#encoded_vectors", + "go": "bindings/go/proximity_accelerator.go#encoded_vectors", + "node": "bindings/node/src/proximity.ts#encoded_vectors", + "kotlin": "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#encoded_vectors", + "java": "bindings/java/src/main/java/build/crab/prolly/javaapi#encoded_vectors", + "ruby": "bindings/ruby/lib/prolly/api.rb#encoded_vectors", + "swift": "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#encoded_vectors", + "wasm": "bindings/wasm/src/index.ts#encoded_vectors" + }, + "exclusions": {}, + "tests": [ + "binding-proximity-turboquant-parity", + "proximity-turboquant-lifecycle" + ], + "docs": [ + "docs/proximity-map.md", + "docs/proximity-turboquant-qualification.md" + ], + "reconciliation": "bound-direct", + "reconciliation_evidence": [ + "bindings/uniffi/src/domain/proximity.rs#BindingTurboQuantizer", + "bindings/python/prolly/api.py#TurboQuantizer", + "bindings/go/proximity_accelerator.go#TurboQuantizer", + "bindings/node/src/proximity.ts#TurboQuantizer", + "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#TurboQuantizer", + "bindings/java/src/main/java/build/crab/prolly/javaapi/TurboQuantizer.java", + "bindings/ruby/lib/prolly/api.rb#TurboQuantizer", + "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#TurboQuantizer", + "bindings/wasm/src/index.ts#WasmTurboQuantizer" + ], + "reconciliation_rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators.", + "reviewed": true, + "rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators." + }, + { + "rust": "prolly::TurboQuantizationBuildStats::input_bytes", + "classification": "portable", + "status": "implemented", + "family": "proximity-map", + "performance": "owned", + "languages": { + "python": "bindings/python/prolly/api.py#input_bytes", + "go": "bindings/go/proximity_accelerator.go#input_bytes", + "node": "bindings/node/src/proximity.ts#input_bytes", + "kotlin": "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#input_bytes", + "java": "bindings/java/src/main/java/build/crab/prolly/javaapi#input_bytes", + "ruby": "bindings/ruby/lib/prolly/api.rb#input_bytes", + "swift": "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#input_bytes", + "wasm": "bindings/wasm/src/index.ts#input_bytes" + }, + "exclusions": {}, + "tests": [ + "binding-proximity-turboquant-parity", + "proximity-turboquant-lifecycle" + ], + "docs": [ + "docs/proximity-map.md", + "docs/proximity-turboquant-qualification.md" + ], + "reconciliation": "bound-direct", + "reconciliation_evidence": [ + "bindings/uniffi/src/domain/proximity.rs#BindingTurboQuantizer", + "bindings/python/prolly/api.py#TurboQuantizer", + "bindings/go/proximity_accelerator.go#TurboQuantizer", + "bindings/node/src/proximity.ts#TurboQuantizer", + "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#TurboQuantizer", + "bindings/java/src/main/java/build/crab/prolly/javaapi/TurboQuantizer.java", + "bindings/ruby/lib/prolly/api.rb#TurboQuantizer", + "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#TurboQuantizer", + "bindings/wasm/src/index.ts#WasmTurboQuantizer" + ], + "reconciliation_rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators.", + "reviewed": true, + "rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators." + }, + { + "rust": "prolly::TurboQuantizationBuildStats::peak_temporary_bytes", + "classification": "portable", + "status": "implemented", + "family": "proximity-map", + "performance": "owned", + "languages": { + "python": "bindings/python/prolly/api.py#peak_temporary_bytes", + "go": "bindings/go/proximity_accelerator.go#peak_temporary_bytes", + "node": "bindings/node/src/proximity.ts#peak_temporary_bytes", + "kotlin": "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#peak_temporary_bytes", + "java": "bindings/java/src/main/java/build/crab/prolly/javaapi#peak_temporary_bytes", + "ruby": "bindings/ruby/lib/prolly/api.rb#peak_temporary_bytes", + "swift": "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#peak_temporary_bytes", + "wasm": "bindings/wasm/src/index.ts#peak_temporary_bytes" + }, + "exclusions": {}, + "tests": [ + "binding-proximity-turboquant-parity", + "proximity-turboquant-lifecycle" + ], + "docs": [ + "docs/proximity-map.md", + "docs/proximity-turboquant-qualification.md" + ], + "reconciliation": "bound-direct", + "reconciliation_evidence": [ + "bindings/uniffi/src/domain/proximity.rs#BindingTurboQuantizer", + "bindings/python/prolly/api.py#TurboQuantizer", + "bindings/go/proximity_accelerator.go#TurboQuantizer", + "bindings/node/src/proximity.ts#TurboQuantizer", + "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#TurboQuantizer", + "bindings/java/src/main/java/build/crab/prolly/javaapi/TurboQuantizer.java", + "bindings/ruby/lib/prolly/api.rb#TurboQuantizer", + "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#TurboQuantizer", + "bindings/wasm/src/index.ts#WasmTurboQuantizer" + ], + "reconciliation_rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators.", + "reviewed": true, + "rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators." + }, + { + "rust": "prolly::TurboQuantizationBuildStats::transformed_components", + "classification": "portable", + "status": "implemented", + "family": "proximity-map", + "performance": "owned", + "languages": { + "python": "bindings/python/prolly/api.py#transformed_components", + "go": "bindings/go/proximity_accelerator.go#transformed_components", + "node": "bindings/node/src/proximity.ts#transformed_components", + "kotlin": "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#transformed_components", + "java": "bindings/java/src/main/java/build/crab/prolly/javaapi#transformed_components", + "ruby": "bindings/ruby/lib/prolly/api.rb#transformed_components", + "swift": "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#transformed_components", + "wasm": "bindings/wasm/src/index.ts#transformed_components" + }, + "exclusions": {}, + "tests": [ + "binding-proximity-turboquant-parity", + "proximity-turboquant-lifecycle" + ], + "docs": [ + "docs/proximity-map.md", + "docs/proximity-turboquant-qualification.md" + ], + "reconciliation": "bound-direct", + "reconciliation_evidence": [ + "bindings/uniffi/src/domain/proximity.rs#BindingTurboQuantizer", + "bindings/python/prolly/api.py#TurboQuantizer", + "bindings/go/proximity_accelerator.go#TurboQuantizer", + "bindings/node/src/proximity.ts#TurboQuantizer", + "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#TurboQuantizer", + "bindings/java/src/main/java/build/crab/prolly/javaapi/TurboQuantizer.java", + "bindings/ruby/lib/prolly/api.rb#TurboQuantizer", + "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#TurboQuantizer", + "bindings/wasm/src/index.ts#WasmTurboQuantizer" + ], + "reconciliation_rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators.", + "reviewed": true, + "rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators." + }, + { + "rust": "prolly::TurboQuantizationBuildStats::zero_vectors", + "classification": "portable", + "status": "implemented", + "family": "proximity-map", + "performance": "owned", + "languages": { + "python": "bindings/python/prolly/api.py#zero_vectors", + "go": "bindings/go/proximity_accelerator.go#zero_vectors", + "node": "bindings/node/src/proximity.ts#zero_vectors", + "kotlin": "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#zero_vectors", + "java": "bindings/java/src/main/java/build/crab/prolly/javaapi#zero_vectors", + "ruby": "bindings/ruby/lib/prolly/api.rb#zero_vectors", + "swift": "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#zero_vectors", + "wasm": "bindings/wasm/src/index.ts#zero_vectors" + }, + "exclusions": {}, + "tests": [ + "binding-proximity-turboquant-parity", + "proximity-turboquant-lifecycle" + ], + "docs": [ + "docs/proximity-map.md", + "docs/proximity-turboquant-qualification.md" + ], + "reconciliation": "bound-direct", + "reconciliation_evidence": [ + "bindings/uniffi/src/domain/proximity.rs#BindingTurboQuantizer", + "bindings/python/prolly/api.py#TurboQuantizer", + "bindings/go/proximity_accelerator.go#TurboQuantizer", + "bindings/node/src/proximity.ts#TurboQuantizer", + "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#TurboQuantizer", + "bindings/java/src/main/java/build/crab/prolly/javaapi/TurboQuantizer.java", + "bindings/ruby/lib/prolly/api.rb#TurboQuantizer", + "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#TurboQuantizer", + "bindings/wasm/src/index.ts#WasmTurboQuantizer" + ], + "reconciliation_rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators.", + "reviewed": true, + "rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators." + }, + { + "rust": "prolly::TurboQuantizationConfig", + "classification": "portable", + "status": "implemented", + "family": "proximity-map", + "performance": "owned", + "languages": { + "python": "bindings/python/prolly/api.py#TurboQuantizationConfig", + "go": "bindings/go/proximity_accelerator.go#TurboQuantizationConfig", + "node": "bindings/node/src/proximity.ts#TurboQuantizationConfig", + "kotlin": "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#TurboQuantizationConfig", + "java": "bindings/java/src/main/java/build/crab/prolly/javaapi#TurboQuantizationConfig", + "ruby": "bindings/ruby/lib/prolly/api.rb#TurboQuantizationConfig", + "swift": "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#TurboQuantizationConfig", + "wasm": "bindings/wasm/src/index.ts#TurboQuantizationConfig" + }, + "exclusions": {}, + "tests": [ + "binding-proximity-turboquant-parity", + "proximity-turboquant-lifecycle" + ], + "docs": [ + "docs/proximity-map.md", + "docs/proximity-turboquant-qualification.md" + ], + "reconciliation": "bound-direct", + "reconciliation_evidence": [ + "bindings/uniffi/src/domain/proximity.rs#BindingTurboQuantizer", + "bindings/python/prolly/api.py#TurboQuantizer", + "bindings/go/proximity_accelerator.go#TurboQuantizer", + "bindings/node/src/proximity.ts#TurboQuantizer", + "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#TurboQuantizer", + "bindings/java/src/main/java/build/crab/prolly/javaapi/TurboQuantizer.java", + "bindings/ruby/lib/prolly/api.rb#TurboQuantizer", + "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#TurboQuantizer", + "bindings/wasm/src/index.ts#WasmTurboQuantizer" + ], + "reconciliation_rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators.", + "reviewed": true, + "rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators." + }, + { + "rust": "prolly::TurboQuantizationConfig::bit_width", + "classification": "portable", + "status": "implemented", + "family": "proximity-map", + "performance": "owned", + "languages": { + "python": "bindings/python/prolly/api.py#bit_width", + "go": "bindings/go/proximity_accelerator.go#bit_width", + "node": "bindings/node/src/proximity.ts#bit_width", + "kotlin": "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#bit_width", + "java": "bindings/java/src/main/java/build/crab/prolly/javaapi#bit_width", + "ruby": "bindings/ruby/lib/prolly/api.rb#bit_width", + "swift": "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#bit_width", + "wasm": "bindings/wasm/src/index.ts#bit_width" + }, + "exclusions": {}, + "tests": [ + "binding-proximity-turboquant-parity", + "proximity-turboquant-lifecycle" + ], + "docs": [ + "docs/proximity-map.md", + "docs/proximity-turboquant-qualification.md" + ], + "reconciliation": "bound-direct", + "reconciliation_evidence": [ + "bindings/uniffi/src/domain/proximity.rs#BindingTurboQuantizer", + "bindings/python/prolly/api.py#TurboQuantizer", + "bindings/go/proximity_accelerator.go#TurboQuantizer", + "bindings/node/src/proximity.ts#TurboQuantizer", + "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#TurboQuantizer", + "bindings/java/src/main/java/build/crab/prolly/javaapi/TurboQuantizer.java", + "bindings/ruby/lib/prolly/api.rb#TurboQuantizer", + "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#TurboQuantizer", + "bindings/wasm/src/index.ts#WasmTurboQuantizer" + ], + "reconciliation_rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators.", + "reviewed": true, + "rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators." + }, + { + "rust": "prolly::TurboQuantizationConfig::rerank_multiplier", + "classification": "portable", + "status": "implemented", + "family": "proximity-map", + "performance": "owned", + "languages": { + "python": "bindings/python/prolly/api.py#rerank_multiplier", + "go": "bindings/go/proximity_accelerator.go#rerank_multiplier", + "node": "bindings/node/src/proximity.ts#rerank_multiplier", + "kotlin": "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#rerank_multiplier", + "java": "bindings/java/src/main/java/build/crab/prolly/javaapi#rerank_multiplier", + "ruby": "bindings/ruby/lib/prolly/api.rb#rerank_multiplier", + "swift": "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#rerank_multiplier", + "wasm": "bindings/wasm/src/index.ts#rerank_multiplier" + }, + "exclusions": {}, + "tests": [ + "binding-proximity-turboquant-parity", + "proximity-turboquant-lifecycle" + ], + "docs": [ + "docs/proximity-map.md", + "docs/proximity-turboquant-qualification.md" + ], + "reconciliation": "bound-direct", + "reconciliation_evidence": [ + "bindings/uniffi/src/domain/proximity.rs#BindingTurboQuantizer", + "bindings/python/prolly/api.py#TurboQuantizer", + "bindings/go/proximity_accelerator.go#TurboQuantizer", + "bindings/node/src/proximity.ts#TurboQuantizer", + "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#TurboQuantizer", + "bindings/java/src/main/java/build/crab/prolly/javaapi/TurboQuantizer.java", + "bindings/ruby/lib/prolly/api.rb#TurboQuantizer", + "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#TurboQuantizer", + "bindings/wasm/src/index.ts#WasmTurboQuantizer" + ], + "reconciliation_rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators.", + "reviewed": true, + "rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators." + }, + { + "rust": "prolly::TurboQuantizationConfig::seed", + "classification": "portable", + "status": "implemented", + "family": "proximity-map", + "performance": "owned", + "languages": { + "python": "bindings/python/prolly/api.py#seed", + "go": "bindings/go/proximity_accelerator.go#seed", + "node": "bindings/node/src/proximity.ts#seed", + "kotlin": "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#seed", + "java": "bindings/java/src/main/java/build/crab/prolly/javaapi#seed", + "ruby": "bindings/ruby/lib/prolly/api.rb#seed", + "swift": "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#seed", + "wasm": "bindings/wasm/src/index.ts#seed" + }, + "exclusions": {}, + "tests": [ + "binding-proximity-turboquant-parity", + "proximity-turboquant-lifecycle" + ], + "docs": [ + "docs/proximity-map.md", + "docs/proximity-turboquant-qualification.md" + ], + "reconciliation": "bound-direct", + "reconciliation_evidence": [ + "bindings/uniffi/src/domain/proximity.rs#BindingTurboQuantizer", + "bindings/python/prolly/api.py#TurboQuantizer", + "bindings/go/proximity_accelerator.go#TurboQuantizer", + "bindings/node/src/proximity.ts#TurboQuantizer", + "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#TurboQuantizer", + "bindings/java/src/main/java/build/crab/prolly/javaapi/TurboQuantizer.java", + "bindings/ruby/lib/prolly/api.rb#TurboQuantizer", + "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#TurboQuantizer", + "bindings/wasm/src/index.ts#WasmTurboQuantizer" + ], + "reconciliation_rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators.", + "reviewed": true, + "rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators." + }, + { + "rust": "prolly::TurboQuantizationQuality", + "classification": "portable", + "status": "implemented", + "family": "proximity-map", + "performance": "owned", + "languages": { + "python": "bindings/python/prolly/api.py#TurboQuantizationQuality", + "go": "bindings/go/proximity_accelerator.go#TurboQuantizationQuality", + "node": "bindings/node/src/proximity.ts#TurboQuantizationQuality", + "kotlin": "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#TurboQuantizationQuality", + "java": "bindings/java/src/main/java/build/crab/prolly/javaapi#TurboQuantizationQuality", + "ruby": "bindings/ruby/lib/prolly/api.rb#TurboQuantizationQuality", + "swift": "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#TurboQuantizationQuality", + "wasm": "bindings/wasm/src/index.ts#TurboQuantizationQuality" + }, + "exclusions": {}, + "tests": [ + "binding-proximity-turboquant-parity", + "proximity-turboquant-lifecycle" + ], + "docs": [ + "docs/proximity-map.md", + "docs/proximity-turboquant-qualification.md" + ], + "reconciliation": "bound-direct", + "reconciliation_evidence": [ + "bindings/uniffi/src/domain/proximity.rs#BindingTurboQuantizer", + "bindings/python/prolly/api.py#TurboQuantizer", + "bindings/go/proximity_accelerator.go#TurboQuantizer", + "bindings/node/src/proximity.ts#TurboQuantizer", + "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#TurboQuantizer", + "bindings/java/src/main/java/build/crab/prolly/javaapi/TurboQuantizer.java", + "bindings/ruby/lib/prolly/api.rb#TurboQuantizer", + "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#TurboQuantizer", + "bindings/wasm/src/index.ts#WasmTurboQuantizer" + ], + "reconciliation_rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators.", + "reviewed": true, + "rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators." + }, + { + "rust": "prolly::TurboQuantizationQuality::maximum_squared_error", + "classification": "portable", + "status": "implemented", + "family": "proximity-map", + "performance": "owned", + "languages": { + "python": "bindings/python/prolly/api.py#maximum_squared_error", + "go": "bindings/go/proximity_accelerator.go#maximum_squared_error", + "node": "bindings/node/src/proximity.ts#maximum_squared_error", + "kotlin": "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#maximum_squared_error", + "java": "bindings/java/src/main/java/build/crab/prolly/javaapi#maximum_squared_error", + "ruby": "bindings/ruby/lib/prolly/api.rb#maximum_squared_error", + "swift": "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#maximum_squared_error", + "wasm": "bindings/wasm/src/index.ts#maximum_squared_error" + }, + "exclusions": {}, + "tests": [ + "binding-proximity-turboquant-parity", + "proximity-turboquant-lifecycle" + ], + "docs": [ + "docs/proximity-map.md", + "docs/proximity-turboquant-qualification.md" + ], + "reconciliation": "bound-direct", + "reconciliation_evidence": [ + "bindings/uniffi/src/domain/proximity.rs#BindingTurboQuantizer", + "bindings/python/prolly/api.py#TurboQuantizer", + "bindings/go/proximity_accelerator.go#TurboQuantizer", + "bindings/node/src/proximity.ts#TurboQuantizer", + "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#TurboQuantizer", + "bindings/java/src/main/java/build/crab/prolly/javaapi/TurboQuantizer.java", + "bindings/ruby/lib/prolly/api.rb#TurboQuantizer", + "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#TurboQuantizer", + "bindings/wasm/src/index.ts#WasmTurboQuantizer" + ], + "reconciliation_rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators.", + "reviewed": true, + "rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators." + }, + { + "rust": "prolly::TurboQuantizationQuality::mean_squared_error", + "classification": "portable", + "status": "implemented", + "family": "proximity-map", + "performance": "owned", + "languages": { + "python": "bindings/python/prolly/api.py#mean_squared_error", + "go": "bindings/go/proximity_accelerator.go#mean_squared_error", + "node": "bindings/node/src/proximity.ts#mean_squared_error", + "kotlin": "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#mean_squared_error", + "java": "bindings/java/src/main/java/build/crab/prolly/javaapi#mean_squared_error", + "ruby": "bindings/ruby/lib/prolly/api.rb#mean_squared_error", + "swift": "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#mean_squared_error", + "wasm": "bindings/wasm/src/index.ts#mean_squared_error" + }, + "exclusions": {}, + "tests": [ + "binding-proximity-turboquant-parity", + "proximity-turboquant-lifecycle" + ], + "docs": [ + "docs/proximity-map.md", + "docs/proximity-turboquant-qualification.md" + ], + "reconciliation": "bound-direct", + "reconciliation_evidence": [ + "bindings/uniffi/src/domain/proximity.rs#BindingTurboQuantizer", + "bindings/python/prolly/api.py#TurboQuantizer", + "bindings/go/proximity_accelerator.go#TurboQuantizer", + "bindings/node/src/proximity.ts#TurboQuantizer", + "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#TurboQuantizer", + "bindings/java/src/main/java/build/crab/prolly/javaapi/TurboQuantizer.java", + "bindings/ruby/lib/prolly/api.rb#TurboQuantizer", + "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#TurboQuantizer", + "bindings/wasm/src/index.ts#WasmTurboQuantizer" + ], + "reconciliation_rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators.", + "reviewed": true, + "rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators." + }, + { + "rust": "prolly::TurboQuantizationVerification", + "classification": "portable", + "status": "implemented", + "family": "proximity-map", + "performance": "owned", + "languages": { + "python": "bindings/python/prolly/api.py#TurboQuantizationVerification", + "go": "bindings/go/proximity_accelerator.go#TurboQuantizationVerification", + "node": "bindings/node/src/proximity.ts#TurboQuantizationVerification", + "kotlin": "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#TurboQuantizationVerification", + "java": "bindings/java/src/main/java/build/crab/prolly/javaapi#TurboQuantizationVerification", + "ruby": "bindings/ruby/lib/prolly/api.rb#TurboQuantizationVerification", + "swift": "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#TurboQuantizationVerification", + "wasm": "bindings/wasm/src/index.ts#TurboQuantizationVerification" + }, + "exclusions": {}, + "tests": [ + "binding-proximity-turboquant-parity", + "proximity-turboquant-lifecycle" + ], + "docs": [ + "docs/proximity-map.md", + "docs/proximity-turboquant-qualification.md" + ], + "reconciliation": "bound-direct", + "reconciliation_evidence": [ + "bindings/uniffi/src/domain/proximity.rs#BindingTurboQuantizer", + "bindings/python/prolly/api.py#TurboQuantizer", + "bindings/go/proximity_accelerator.go#TurboQuantizer", + "bindings/node/src/proximity.ts#TurboQuantizer", + "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#TurboQuantizer", + "bindings/java/src/main/java/build/crab/prolly/javaapi/TurboQuantizer.java", + "bindings/ruby/lib/prolly/api.rb#TurboQuantizer", + "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#TurboQuantizer", + "bindings/wasm/src/index.ts#WasmTurboQuantizer" + ], + "reconciliation_rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators.", + "reviewed": true, + "rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators." + }, + { + "rust": "prolly::TurboQuantizationVerification::encoded_vectors", + "classification": "portable", + "status": "implemented", + "family": "proximity-map", + "performance": "owned", + "languages": { + "python": "bindings/python/prolly/api.py#encoded_vectors", + "go": "bindings/go/proximity_accelerator.go#encoded_vectors", + "node": "bindings/node/src/proximity.ts#encoded_vectors", + "kotlin": "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#encoded_vectors", + "java": "bindings/java/src/main/java/build/crab/prolly/javaapi#encoded_vectors", + "ruby": "bindings/ruby/lib/prolly/api.rb#encoded_vectors", + "swift": "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#encoded_vectors", + "wasm": "bindings/wasm/src/index.ts#encoded_vectors" + }, + "exclusions": {}, + "tests": [ + "binding-proximity-turboquant-parity", + "proximity-turboquant-lifecycle" + ], + "docs": [ + "docs/proximity-map.md", + "docs/proximity-turboquant-qualification.md" + ], + "reconciliation": "bound-direct", + "reconciliation_evidence": [ + "bindings/uniffi/src/domain/proximity.rs#BindingTurboQuantizer", + "bindings/python/prolly/api.py#TurboQuantizer", + "bindings/go/proximity_accelerator.go#TurboQuantizer", + "bindings/node/src/proximity.ts#TurboQuantizer", + "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#TurboQuantizer", + "bindings/java/src/main/java/build/crab/prolly/javaapi/TurboQuantizer.java", + "bindings/ruby/lib/prolly/api.rb#TurboQuantizer", + "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#TurboQuantizer", + "bindings/wasm/src/index.ts#WasmTurboQuantizer" + ], + "reconciliation_rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators.", + "reviewed": true, + "rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators." + }, + { + "rust": "prolly::TurboQuantizationVerification::quality", + "classification": "portable", + "status": "implemented", + "family": "proximity-map", + "performance": "owned", + "languages": { + "python": "bindings/python/prolly/api.py#quality", + "go": "bindings/go/proximity_accelerator.go#quality", + "node": "bindings/node/src/proximity.ts#quality", + "kotlin": "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#quality", + "java": "bindings/java/src/main/java/build/crab/prolly/javaapi#quality", + "ruby": "bindings/ruby/lib/prolly/api.rb#quality", + "swift": "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#quality", + "wasm": "bindings/wasm/src/index.ts#quality" + }, + "exclusions": {}, + "tests": [ + "binding-proximity-turboquant-parity", + "proximity-turboquant-lifecycle" + ], + "docs": [ + "docs/proximity-map.md", + "docs/proximity-turboquant-qualification.md" + ], + "reconciliation": "bound-direct", + "reconciliation_evidence": [ + "bindings/uniffi/src/domain/proximity.rs#BindingTurboQuantizer", + "bindings/python/prolly/api.py#TurboQuantizer", + "bindings/go/proximity_accelerator.go#TurboQuantizer", + "bindings/node/src/proximity.ts#TurboQuantizer", + "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#TurboQuantizer", + "bindings/java/src/main/java/build/crab/prolly/javaapi/TurboQuantizer.java", + "bindings/ruby/lib/prolly/api.rb#TurboQuantizer", + "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#TurboQuantizer", + "bindings/wasm/src/index.ts#WasmTurboQuantizer" + ], + "reconciliation_rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators.", + "reviewed": true, + "rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators." + }, + { + "rust": "prolly::TurboQuantizationVerification::zero_vectors", + "classification": "portable", + "status": "implemented", + "family": "proximity-map", + "performance": "owned", + "languages": { + "python": "bindings/python/prolly/api.py#zero_vectors", + "go": "bindings/go/proximity_accelerator.go#zero_vectors", + "node": "bindings/node/src/proximity.ts#zero_vectors", + "kotlin": "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#zero_vectors", + "java": "bindings/java/src/main/java/build/crab/prolly/javaapi#zero_vectors", + "ruby": "bindings/ruby/lib/prolly/api.rb#zero_vectors", + "swift": "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#zero_vectors", + "wasm": "bindings/wasm/src/index.ts#zero_vectors" + }, + "exclusions": {}, + "tests": [ + "binding-proximity-turboquant-parity", + "proximity-turboquant-lifecycle" + ], + "docs": [ + "docs/proximity-map.md", + "docs/proximity-turboquant-qualification.md" + ], + "reconciliation": "bound-direct", + "reconciliation_evidence": [ + "bindings/uniffi/src/domain/proximity.rs#BindingTurboQuantizer", + "bindings/python/prolly/api.py#TurboQuantizer", + "bindings/go/proximity_accelerator.go#TurboQuantizer", + "bindings/node/src/proximity.ts#TurboQuantizer", + "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#TurboQuantizer", + "bindings/java/src/main/java/build/crab/prolly/javaapi/TurboQuantizer.java", + "bindings/ruby/lib/prolly/api.rb#TurboQuantizer", + "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#TurboQuantizer", + "bindings/wasm/src/index.ts#WasmTurboQuantizer" + ], + "reconciliation_rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators.", + "reviewed": true, + "rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators." + }, + { + "rust": "prolly::TurboQuantizer", + "classification": "portable", + "status": "implemented", + "family": "proximity-map", + "performance": "owned", + "languages": { + "python": "bindings/python/prolly/api.py#TurboQuantizer", + "go": "bindings/go/proximity_accelerator.go#TurboQuantizer", + "node": "bindings/node/src/proximity.ts#TurboQuantizer", + "kotlin": "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#TurboQuantizer", + "java": "bindings/java/src/main/java/build/crab/prolly/javaapi#TurboQuantizer", + "ruby": "bindings/ruby/lib/prolly/api.rb#TurboQuantizer", + "swift": "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#TurboQuantizer", + "wasm": "bindings/wasm/src/index.ts#TurboQuantizer" + }, + "exclusions": {}, + "tests": [ + "binding-proximity-turboquant-parity", + "proximity-turboquant-lifecycle" + ], + "docs": [ + "docs/proximity-map.md", + "docs/proximity-turboquant-qualification.md" + ], + "reconciliation": "bound-direct", + "reconciliation_evidence": [ + "bindings/uniffi/src/domain/proximity.rs#BindingTurboQuantizer", + "bindings/python/prolly/api.py#TurboQuantizer", + "bindings/go/proximity_accelerator.go#TurboQuantizer", + "bindings/node/src/proximity.ts#TurboQuantizer", + "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#TurboQuantizer", + "bindings/java/src/main/java/build/crab/prolly/javaapi/TurboQuantizer.java", + "bindings/ruby/lib/prolly/api.rb#TurboQuantizer", + "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#TurboQuantizer", + "bindings/wasm/src/index.ts#WasmTurboQuantizer" + ], + "reconciliation_rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators.", + "reviewed": true, + "rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators." + }, + { + "rust": "prolly::TurboQuantizer::build", + "classification": "portable", + "status": "implemented", + "family": "proximity-map", + "performance": "owned", + "languages": { + "python": "bindings/python/prolly/api.py#build", + "go": "bindings/go/proximity_accelerator.go#build", + "node": "bindings/node/src/proximity.ts#build", + "kotlin": "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#build", + "java": "bindings/java/src/main/java/build/crab/prolly/javaapi#build", + "ruby": "bindings/ruby/lib/prolly/api.rb#build", + "swift": "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#build", + "wasm": "bindings/wasm/src/index.ts#build" + }, + "exclusions": {}, + "tests": [ + "binding-proximity-turboquant-parity", + "proximity-turboquant-lifecycle" + ], + "docs": [ + "docs/proximity-map.md", + "docs/proximity-turboquant-qualification.md" + ], + "reconciliation": "bound-direct", + "reconciliation_evidence": [ + "bindings/uniffi/src/domain/proximity.rs#BindingTurboQuantizer", + "bindings/python/prolly/api.py#TurboQuantizer", + "bindings/go/proximity_accelerator.go#TurboQuantizer", + "bindings/node/src/proximity.ts#TurboQuantizer", + "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#TurboQuantizer", + "bindings/java/src/main/java/build/crab/prolly/javaapi/TurboQuantizer.java", + "bindings/ruby/lib/prolly/api.rb#TurboQuantizer", + "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#TurboQuantizer", + "bindings/wasm/src/index.ts#WasmTurboQuantizer" + ], + "reconciliation_rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators.", + "reviewed": true, + "rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators." + }, + { + "rust": "prolly::TurboQuantizer::build_with_limits", + "classification": "portable", + "status": "implemented", + "family": "proximity-map", + "performance": "owned", + "languages": { + "python": "bindings/python/prolly/api.py#build_with_limits", + "go": "bindings/go/proximity_accelerator.go#build_with_limits", + "node": "bindings/node/src/proximity.ts#build_with_limits", + "kotlin": "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#build_with_limits", + "java": "bindings/java/src/main/java/build/crab/prolly/javaapi#build_with_limits", + "ruby": "bindings/ruby/lib/prolly/api.rb#build_with_limits", + "swift": "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#build_with_limits", + "wasm": "bindings/wasm/src/index.ts#build_with_limits" + }, + "exclusions": {}, + "tests": [ + "binding-proximity-turboquant-parity", + "proximity-turboquant-lifecycle" + ], + "docs": [ + "docs/proximity-map.md", + "docs/proximity-turboquant-qualification.md" + ], + "reconciliation": "bound-direct", + "reconciliation_evidence": [ + "bindings/uniffi/src/domain/proximity.rs#BindingTurboQuantizer", + "bindings/python/prolly/api.py#TurboQuantizer", + "bindings/go/proximity_accelerator.go#TurboQuantizer", + "bindings/node/src/proximity.ts#TurboQuantizer", + "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#TurboQuantizer", + "bindings/java/src/main/java/build/crab/prolly/javaapi/TurboQuantizer.java", + "bindings/ruby/lib/prolly/api.rb#TurboQuantizer", + "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#TurboQuantizer", + "bindings/wasm/src/index.ts#WasmTurboQuantizer" + ], + "reconciliation_rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators.", + "reviewed": true, + "rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators." + }, + { + "rust": "prolly::TurboQuantizer::config", + "classification": "portable", + "status": "implemented", + "family": "proximity-map", + "performance": "owned", + "languages": { + "python": "bindings/python/prolly/api.py#config", + "go": "bindings/go/proximity_accelerator.go#config", + "node": "bindings/node/src/proximity.ts#config", + "kotlin": "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#config", + "java": "bindings/java/src/main/java/build/crab/prolly/javaapi#config", + "ruby": "bindings/ruby/lib/prolly/api.rb#config", + "swift": "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#config", + "wasm": "bindings/wasm/src/index.ts#config" + }, + "exclusions": {}, + "tests": [ + "binding-proximity-turboquant-parity", + "proximity-turboquant-lifecycle" + ], + "docs": [ + "docs/proximity-map.md", + "docs/proximity-turboquant-qualification.md" + ], + "reconciliation": "bound-direct", + "reconciliation_evidence": [ + "bindings/uniffi/src/domain/proximity.rs#BindingTurboQuantizer", + "bindings/python/prolly/api.py#TurboQuantizer", + "bindings/go/proximity_accelerator.go#TurboQuantizer", + "bindings/node/src/proximity.ts#TurboQuantizer", + "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#TurboQuantizer", + "bindings/java/src/main/java/build/crab/prolly/javaapi/TurboQuantizer.java", + "bindings/ruby/lib/prolly/api.rb#TurboQuantizer", + "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#TurboQuantizer", + "bindings/wasm/src/index.ts#WasmTurboQuantizer" + ], + "reconciliation_rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators.", + "reviewed": true, + "rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators." + }, + { + "rust": "prolly::TurboQuantizer::load", + "classification": "portable", + "status": "implemented", + "family": "proximity-map", + "performance": "owned", + "languages": { + "python": "bindings/python/prolly/api.py#load", + "go": "bindings/go/proximity_accelerator.go#load", + "node": "bindings/node/src/proximity.ts#load", + "kotlin": "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#load", + "java": "bindings/java/src/main/java/build/crab/prolly/javaapi#load", + "ruby": "bindings/ruby/lib/prolly/api.rb#load", + "swift": "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#load", + "wasm": "bindings/wasm/src/index.ts#load" + }, + "exclusions": {}, + "tests": [ + "binding-proximity-turboquant-parity", + "proximity-turboquant-lifecycle" + ], + "docs": [ + "docs/proximity-map.md", + "docs/proximity-turboquant-qualification.md" + ], + "reconciliation": "bound-direct", + "reconciliation_evidence": [ + "bindings/uniffi/src/domain/proximity.rs#BindingTurboQuantizer", + "bindings/python/prolly/api.py#TurboQuantizer", + "bindings/go/proximity_accelerator.go#TurboQuantizer", + "bindings/node/src/proximity.ts#TurboQuantizer", + "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#TurboQuantizer", + "bindings/java/src/main/java/build/crab/prolly/javaapi/TurboQuantizer.java", + "bindings/ruby/lib/prolly/api.rb#TurboQuantizer", + "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#TurboQuantizer", + "bindings/wasm/src/index.ts#WasmTurboQuantizer" + ], + "reconciliation_rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators.", + "reviewed": true, + "rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators." + }, + { + "rust": "prolly::TurboQuantizer::manifest_cid", + "classification": "portable", + "status": "implemented", + "family": "proximity-map", + "performance": "owned", + "languages": { + "python": "bindings/python/prolly/api.py#manifest_cid", + "go": "bindings/go/proximity_accelerator.go#manifest_cid", + "node": "bindings/node/src/proximity.ts#manifest_cid", + "kotlin": "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#manifest_cid", + "java": "bindings/java/src/main/java/build/crab/prolly/javaapi#manifest_cid", + "ruby": "bindings/ruby/lib/prolly/api.rb#manifest_cid", + "swift": "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#manifest_cid", + "wasm": "bindings/wasm/src/index.ts#manifest_cid" + }, + "exclusions": {}, + "tests": [ + "binding-proximity-turboquant-parity", + "proximity-turboquant-lifecycle" + ], + "docs": [ + "docs/proximity-map.md", + "docs/proximity-turboquant-qualification.md" + ], + "reconciliation": "bound-direct", + "reconciliation_evidence": [ + "bindings/uniffi/src/domain/proximity.rs#BindingTurboQuantizer", + "bindings/python/prolly/api.py#TurboQuantizer", + "bindings/go/proximity_accelerator.go#TurboQuantizer", + "bindings/node/src/proximity.ts#TurboQuantizer", + "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#TurboQuantizer", + "bindings/java/src/main/java/build/crab/prolly/javaapi/TurboQuantizer.java", + "bindings/ruby/lib/prolly/api.rb#TurboQuantizer", + "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#TurboQuantizer", + "bindings/wasm/src/index.ts#WasmTurboQuantizer" + ], + "reconciliation_rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators.", + "reviewed": true, + "rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators." + }, + { + "rust": "prolly::TurboQuantizer::prove_search", + "classification": "portable", + "status": "implemented", + "family": "proximity-map", + "performance": "owned", + "languages": { + "python": "bindings/python/prolly/api.py#prove_search", + "go": "bindings/go/proximity_accelerator.go#prove_search", + "node": "bindings/node/src/proximity.ts#prove_search", + "kotlin": "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#prove_search", + "java": "bindings/java/src/main/java/build/crab/prolly/javaapi#prove_search", + "ruby": "bindings/ruby/lib/prolly/api.rb#prove_search", + "swift": "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#prove_search", + "wasm": "bindings/wasm/src/index.ts#prove_search" + }, + "exclusions": {}, + "tests": [ + "binding-proximity-turboquant-parity", + "proximity-turboquant-lifecycle" + ], + "docs": [ + "docs/proximity-map.md", + "docs/proximity-turboquant-qualification.md" + ], + "reconciliation": "bound-direct", + "reconciliation_evidence": [ + "bindings/uniffi/src/domain/proximity.rs#BindingTurboQuantizer", + "bindings/python/prolly/api.py#TurboQuantizer", + "bindings/go/proximity_accelerator.go#TurboQuantizer", + "bindings/node/src/proximity.ts#TurboQuantizer", + "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#TurboQuantizer", + "bindings/java/src/main/java/build/crab/prolly/javaapi/TurboQuantizer.java", + "bindings/ruby/lib/prolly/api.rb#TurboQuantizer", + "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#TurboQuantizer", + "bindings/wasm/src/index.ts#WasmTurboQuantizer" + ], + "reconciliation_rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators.", + "reviewed": true, + "rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators." + }, + { + "rust": "prolly::TurboQuantizer::quality", + "classification": "portable", + "status": "implemented", + "family": "proximity-map", + "performance": "owned", + "languages": { + "python": "bindings/python/prolly/api.py#quality", + "go": "bindings/go/proximity_accelerator.go#quality", + "node": "bindings/node/src/proximity.ts#quality", + "kotlin": "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#quality", + "java": "bindings/java/src/main/java/build/crab/prolly/javaapi#quality", + "ruby": "bindings/ruby/lib/prolly/api.rb#quality", + "swift": "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#quality", + "wasm": "bindings/wasm/src/index.ts#quality" + }, + "exclusions": {}, + "tests": [ + "binding-proximity-turboquant-parity", + "proximity-turboquant-lifecycle" + ], + "docs": [ + "docs/proximity-map.md", + "docs/proximity-turboquant-qualification.md" + ], + "reconciliation": "bound-direct", + "reconciliation_evidence": [ + "bindings/uniffi/src/domain/proximity.rs#BindingTurboQuantizer", + "bindings/python/prolly/api.py#TurboQuantizer", + "bindings/go/proximity_accelerator.go#TurboQuantizer", + "bindings/node/src/proximity.ts#TurboQuantizer", + "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#TurboQuantizer", + "bindings/java/src/main/java/build/crab/prolly/javaapi/TurboQuantizer.java", + "bindings/ruby/lib/prolly/api.rb#TurboQuantizer", + "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#TurboQuantizer", + "bindings/wasm/src/index.ts#WasmTurboQuantizer" + ], + "reconciliation_rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators.", + "reviewed": true, + "rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators." + }, + { + "rust": "prolly::TurboQuantizer::search", + "classification": "portable", + "status": "implemented", + "family": "proximity-map", + "performance": "owned", + "languages": { + "python": "bindings/python/prolly/api.py#search", + "go": "bindings/go/proximity_accelerator.go#search", + "node": "bindings/node/src/proximity.ts#search", + "kotlin": "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#search", + "java": "bindings/java/src/main/java/build/crab/prolly/javaapi#search", + "ruby": "bindings/ruby/lib/prolly/api.rb#search", + "swift": "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#search", + "wasm": "bindings/wasm/src/index.ts#search" + }, + "exclusions": {}, + "tests": [ + "binding-proximity-turboquant-parity", + "proximity-turboquant-lifecycle" + ], + "docs": [ + "docs/proximity-map.md", + "docs/proximity-turboquant-qualification.md" + ], + "reconciliation": "bound-direct", + "reconciliation_evidence": [ + "bindings/uniffi/src/domain/proximity.rs#BindingTurboQuantizer", + "bindings/python/prolly/api.py#TurboQuantizer", + "bindings/go/proximity_accelerator.go#TurboQuantizer", + "bindings/node/src/proximity.ts#TurboQuantizer", + "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#TurboQuantizer", + "bindings/java/src/main/java/build/crab/prolly/javaapi/TurboQuantizer.java", + "bindings/ruby/lib/prolly/api.rb#TurboQuantizer", + "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#TurboQuantizer", + "bindings/wasm/src/index.ts#WasmTurboQuantizer" + ], + "reconciliation_rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators.", + "reviewed": true, + "rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators." + }, + { + "rust": "prolly::TurboQuantizer::source_descriptor", + "classification": "portable", + "status": "implemented", + "family": "proximity-map", + "performance": "owned", + "languages": { + "python": "bindings/python/prolly/api.py#source_descriptor", + "go": "bindings/go/proximity_accelerator.go#source_descriptor", + "node": "bindings/node/src/proximity.ts#source_descriptor", + "kotlin": "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#source_descriptor", + "java": "bindings/java/src/main/java/build/crab/prolly/javaapi#source_descriptor", + "ruby": "bindings/ruby/lib/prolly/api.rb#source_descriptor", + "swift": "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#source_descriptor", + "wasm": "bindings/wasm/src/index.ts#source_descriptor" + }, + "exclusions": {}, + "tests": [ + "binding-proximity-turboquant-parity", + "proximity-turboquant-lifecycle" + ], + "docs": [ + "docs/proximity-map.md", + "docs/proximity-turboquant-qualification.md" + ], + "reconciliation": "bound-direct", + "reconciliation_evidence": [ + "bindings/uniffi/src/domain/proximity.rs#BindingTurboQuantizer", + "bindings/python/prolly/api.py#TurboQuantizer", + "bindings/go/proximity_accelerator.go#TurboQuantizer", + "bindings/node/src/proximity.ts#TurboQuantizer", + "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#TurboQuantizer", + "bindings/java/src/main/java/build/crab/prolly/javaapi/TurboQuantizer.java", + "bindings/ruby/lib/prolly/api.rb#TurboQuantizer", + "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#TurboQuantizer", + "bindings/wasm/src/index.ts#WasmTurboQuantizer" + ], + "reconciliation_rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators.", + "reviewed": true, + "rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators." + }, + { + "rust": "prolly::TurboQuantizer::verify", + "classification": "portable", + "status": "implemented", + "family": "proximity-map", + "performance": "owned", + "languages": { + "python": "bindings/python/prolly/api.py#verify", + "go": "bindings/go/proximity_accelerator.go#verify", + "node": "bindings/node/src/proximity.ts#verify", + "kotlin": "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#verify", + "java": "bindings/java/src/main/java/build/crab/prolly/javaapi#verify", + "ruby": "bindings/ruby/lib/prolly/api.rb#verify", + "swift": "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#verify", + "wasm": "bindings/wasm/src/index.ts#verify" + }, + "exclusions": {}, + "tests": [ + "binding-proximity-turboquant-parity", + "proximity-turboquant-lifecycle" + ], + "docs": [ + "docs/proximity-map.md", + "docs/proximity-turboquant-qualification.md" + ], + "reconciliation": "bound-direct", + "reconciliation_evidence": [ + "bindings/uniffi/src/domain/proximity.rs#BindingTurboQuantizer", + "bindings/python/prolly/api.py#TurboQuantizer", + "bindings/go/proximity_accelerator.go#TurboQuantizer", + "bindings/node/src/proximity.ts#TurboQuantizer", + "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#TurboQuantizer", + "bindings/java/src/main/java/build/crab/prolly/javaapi/TurboQuantizer.java", + "bindings/ruby/lib/prolly/api.rb#TurboQuantizer", + "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#TurboQuantizer", + "bindings/wasm/src/index.ts#WasmTurboQuantizer" + ], + "reconciliation_rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators.", + "reviewed": true, + "rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators." + }, { "rust": "prolly::TypedContentObject", "classification": "portable", diff --git a/bindings/api/proximity-map-reconciliation.json b/bindings/api/proximity-map-reconciliation.json index 65cfc1ec..0eb9167e 100644 --- a/bindings/api/proximity-map-reconciliation.json +++ b/bindings/api/proximity-map-reconciliation.json @@ -103,6 +103,114 @@ "bindings/wasm/src/index.ts#WasmProximityMap.scanRecordViews" ], "rationale": "Every host exposes inclusive-start/exclusive-end record-view scans with early stop and callback-scoped key/vector/value access. Native hosts page through the shared retained PRPG ABI; WASM borrows validated record slices directly from linear memory." + }, + { + "state": "bound-direct", + "rust": [ + "prolly::AcceleratorSet::with_turboquant", + "prolly::ApproximatePreference::TurboQuantizedFirst", + "prolly::AsyncAcceleratorBuildOptions::turboquant", + "prolly::AsyncAcceleratorBuildStats::turboquant", + "prolly::AsyncAcceleratorSet::with_turboquant", + "prolly::AsyncCompositeAccelerator::build_from_turboquant", + "prolly::AsyncCompositeBuildOptions::turboquant_limits", + "prolly::AsyncCompositeBuildOptions::turboquant_parallelism", + "prolly::AsyncTurboQuantizer", + "prolly::AsyncTurboQuantizer::build", + "prolly::AsyncTurboQuantizer::build_with_limits", + "prolly::AsyncTurboQuantizer::config", + "prolly::AsyncTurboQuantizer::load", + "prolly::AsyncTurboQuantizer::manifest_cid", + "prolly::AsyncTurboQuantizer::quality", + "prolly::AsyncTurboQuantizer::search", + "prolly::AsyncTurboQuantizer::source_descriptor", + "prolly::AsyncTurboQuantizer::verify", + "prolly::AsyncTurboQuantizer::zero_vectors", + "prolly::AsyncTurboQuantizerBuild", + "prolly::AsyncTurboQuantizerBuild::config", + "prolly::AsyncTurboQuantizerBuild::limits", + "prolly::AsyncTurboQuantizerBuild::parallelism", + "prolly::CatalogAcceleratorKind::TurboQuantized", + "prolly::CompositeBase::TurboQuantized", + "prolly::CompositeBaseKind::TurboQuantized", + "prolly::CompositeBuildOrRebuildOutcome::TurboQuantizedRebuilt", + "prolly::CompositeRebuildOptions::turboquant_limits", + "prolly::CompositeRebuildOptions::turboquant_parallelism", + "prolly::ContentObjectKind::TurboQuantization", + "prolly::SearchBackend::TurboQuantized", + "prolly::SearchOptions::turboquant", + "prolly::SearchPlan::TurboQuantized", + "prolly::SearchRuntimePolicy::turboquant_max_bytes", + "prolly::TurboQuantSearchOptions", + "prolly::TurboQuantSearchOptions::rerank_multiplier", + "prolly::TurboQuantizationBuildLimits", + "prolly::TurboQuantizationBuildLimits::max_encoded_output_bytes", + "prolly::TurboQuantizationBuildLimits::max_input_bytes", + "prolly::TurboQuantizationBuildLimits::max_records", + "prolly::TurboQuantizationBuildLimits::max_temporary_bytes", + "prolly::TurboQuantizationBuildLimits::max_transform_operations", + "prolly::TurboQuantizationBuildLimits::max_worker_threads", + "prolly::TurboQuantizationBuildStats", + "prolly::TurboQuantizationBuildStats::butterfly_operations", + "prolly::TurboQuantizationBuildStats::encoded_output_bytes", + "prolly::TurboQuantizationBuildStats::encoded_vectors", + "prolly::TurboQuantizationBuildStats::input_bytes", + "prolly::TurboQuantizationBuildStats::peak_temporary_bytes", + "prolly::TurboQuantizationBuildStats::transformed_components", + "prolly::TurboQuantizationBuildStats::zero_vectors", + "prolly::TurboQuantizationConfig", + "prolly::TurboQuantizationConfig::bit_width", + "prolly::TurboQuantizationConfig::rerank_multiplier", + "prolly::TurboQuantizationConfig::seed", + "prolly::TurboQuantizationQuality", + "prolly::TurboQuantizationQuality::maximum_squared_error", + "prolly::TurboQuantizationQuality::mean_squared_error", + "prolly::TurboQuantizationVerification", + "prolly::TurboQuantizationVerification::encoded_vectors", + "prolly::TurboQuantizationVerification::quality", + "prolly::TurboQuantizationVerification::zero_vectors", + "prolly::TurboQuantizer", + "prolly::TurboQuantizer::build", + "prolly::TurboQuantizer::build_with_limits", + "prolly::TurboQuantizer::config", + "prolly::TurboQuantizer::load", + "prolly::TurboQuantizer::manifest_cid", + "prolly::TurboQuantizer::prove_search", + "prolly::TurboQuantizer::quality", + "prolly::TurboQuantizer::search", + "prolly::TurboQuantizer::source_descriptor", + "prolly::TurboQuantizer::verify" + ], + "evidence": [ + "bindings/uniffi/src/domain/proximity.rs#BindingTurboQuantizer", + "bindings/python/prolly/api.py#TurboQuantizer", + "bindings/go/proximity_accelerator.go#TurboQuantizer", + "bindings/node/src/proximity.ts#TurboQuantizer", + "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#TurboQuantizer", + "bindings/java/src/main/java/build/crab/prolly/javaapi/TurboQuantizer.java", + "bindings/ruby/lib/prolly/api.rb#TurboQuantizer", + "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#TurboQuantizer", + "bindings/wasm/src/index.ts#WasmTurboQuantizer" + ], + "rationale": "All maintained hosts expose TurboQuant configuration and limits, build/load/verify/search, async cancellation through the host async contract, exact statistics and quality records, catalog/composite participation, and the appended planning/content discriminators.", + "language_templates": { + "python": "bindings/python/prolly/api.py#{member}", + "go": "bindings/go/proximity_accelerator.go#{member}", + "node": "bindings/node/src/proximity.ts#{member}", + "kotlin": "bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt#{member}", + "java": "bindings/java/src/main/java/build/crab/prolly/javaapi#{member}", + "ruby": "bindings/ruby/lib/prolly/api.rb#{member}", + "swift": "bindings/swift/Sources/ProllyAPI/PortableAPI.swift#{member}", + "wasm": "bindings/wasm/src/index.ts#{member}" + }, + "tests": [ + "binding-proximity-turboquant-parity", + "proximity-turboquant-lifecycle" + ], + "docs": [ + "docs/proximity-map.md", + "docs/proximity-turboquant-qualification.md" + ] } ] } diff --git a/bindings/go/COOKBOOK.md b/bindings/go/COOKBOOK.md index 4eca7012..267d0ca7 100644 --- a/bindings/go/COOKBOOK.md +++ b/bindings/go/COOKBOOK.md @@ -25,6 +25,52 @@ Application-style directories include `batch_build`, `local_first_state`, `document_chunk_index`, `vector_sidecar`, `provenance_values`, `materialized_view`, `filesystem_snapshot`, and `durable_sqlite`. +## Build And Force A TurboQuant RAG Sidecar + +TurboQuant is a disposable routing sidecar. The proximity map remains +authoritative and every retained candidate is reranked from its full-precision +vector. Keep the backend explicit until the checked qualification gates pass. + +```go +records := make([]prolly.ProximityRecord, 32) +for index := range records { + records[index] = prolly.ProximityRecord{ + Key: []byte(fmt.Sprintf("chunk/%02d", index)), + Vector: []float32{float32(index), float32(index % 3), 0, 1, 2, 3, 4, 5}, + Value: []byte(fmt.Sprintf("document-%02d", index)), + } +} + +proximity, err := engine.BuildProximity(8, records) +if err != nil { log.Fatal(err) } +defer proximity.Close() + +config, err := prolly.DefaultTurboQuantConfig() +if err != nil { log.Fatal(err) } +limits, err := prolly.DefaultTurboQuantBuildLimits() +if err != nil { log.Fatal(err) } +built, err := proximity.BuildTurboQuant(config, 2, limits) +if err != nil { log.Fatal(err) } +defer built.Index.Close() +verification, err := built.Index.Verify(proximity) +if err != nil || verification.EncodedVectors != uint64(len(records)) { + log.Fatal("incomplete TurboQuant sidecar") +} + +request := prolly.ExactSearch([]float32{0, 0, 0, 1, 2, 3, 4, 5}, 3) +request.Policy = prolly.SearchPolicyFixedBudget +request.Backend = prolly.SearchBackendTurboQuantized +result, err := built.Index.Search(context.Background(), proximity, request) +if err != nil { log.Fatal(err) } +if result.Backend != "turbo-quantized" { log.Fatal("unexpected backend") } + +manifest, err := built.Index.Manifest() +if err != nil { log.Fatal(err) } +reopened, err := proximity.LoadTurboQuant(manifest) +if err != nil { log.Fatal(err) } +defer reopened.Close() +``` + ## Create A Durable Index ```go diff --git a/bindings/go/async.go b/bindings/go/async.go index e7698cdb..8801517e 100644 --- a/bindings/go/async.go +++ b/bindings/go/async.go @@ -390,6 +390,23 @@ func (i *ProductQuantizer) SearchWithRuntimeAsync( }) } +func (i *TurboQuantizer) SearchAsync( + ctx context.Context, proximity *ProximityMap, request SearchRequest, +) *Future[SearchResult] { + return startProximitySearchFuture(ctx, request, func(owned SearchRequest, token *ProximityCancellationToken) (SearchResult, error) { + return i.SearchCancellable(ctx, proximity, owned, nil, token) + }) +} + +func (i *TurboQuantizer) SearchWithRuntimeAsync( + ctx context.Context, proximity *ProximityMap, request SearchRequest, + searchRuntime *ProximitySearchRuntime, +) *Future[SearchResult] { + return startProximitySearchFuture(ctx, request, func(owned SearchRequest, token *ProximityCancellationToken) (SearchResult, error) { + return i.SearchCancellable(ctx, proximity, owned, searchRuntime, token) + }) +} + func (a *CompositeAccelerator) SearchAsync( ctx context.Context, proximity *ProximityMap, request SearchRequest, ) *Future[SearchResult] { diff --git a/bindings/go/async_engine_test.go b/bindings/go/async_engine_test.go index 52961d9e..148b8d50 100644 --- a/bindings/go/async_engine_test.go +++ b/bindings/go/async_engine_test.go @@ -58,8 +58,10 @@ func (*remoteStoreStub) CommitTransaction(context.Context, []NodeMutation, []Roo } func TestAsyncEngineCancellationReachesStore(t *testing.T) { + started := make(chan struct{}) cancelled := make(chan struct{}) store := &remoteStoreStub{descriptor: func(ctx context.Context) (StoreDescriptor, error) { + close(started) <-ctx.Done() close(cancelled) return StoreDescriptor{}, ctx.Err() @@ -71,6 +73,11 @@ func TestAsyncEngineCancellationReachesStore(t *testing.T) { _, err := NewAsyncEngine(ctx, store, nil) done <- err }() + select { + case <-started: + case <-time.After(5 * time.Second): + t.Fatal("NewAsyncEngine did not reach the store callback") + } cancel() select { diff --git a/bindings/go/portable_ffi.go b/bindings/go/portable_ffi.go index 7390c0b5..9acb4086 100644 --- a/bindings/go/portable_ffi.go +++ b/bindings/go/portable_ffi.go @@ -249,10 +249,12 @@ extern void uniffi_prolly_bindings_fn_free_bindingproximitymap(uint64_t ptr, Rus extern RustBuffer uniffi_prolly_bindings_fn_method_bindingproximitymap_build_hnsw(uint64_t ptr, RustBuffer config, RustBuffer limits, RustCallStatus *out_err); extern RustBuffer uniffi_prolly_bindings_fn_method_bindingproximitymap_build_composite_hnsw(uint64_t ptr, uint64_t base_map, uint64_t base, RustBuffer config, RustBuffer limits, RustCallStatus *out_err); extern RustBuffer uniffi_prolly_bindings_fn_method_bindingproximitymap_build_composite_pq(uint64_t ptr, uint64_t base_map, uint64_t base, RustBuffer config, RustBuffer limits, RustCallStatus *out_err); +extern RustBuffer uniffi_prolly_bindings_fn_method_bindingproximitymap_build_composite_turboquant(uint64_t ptr, uint64_t base_map, uint64_t base, RustBuffer config, RustBuffer limits, RustCallStatus *out_err); extern RustBuffer uniffi_prolly_bindings_fn_method_bindingproximitymap_build_or_rebuild_composite_hnsw(uint64_t ptr, uint64_t base_map, uint64_t base, RustBuffer config, RustBuffer limits, RustBuffer rebuild, RustCallStatus *out_err); extern RustBuffer uniffi_prolly_bindings_fn_method_bindingproximitymap_build_or_rebuild_composite_pq(uint64_t ptr, uint64_t base_map, uint64_t base, RustBuffer config, RustBuffer limits, RustBuffer rebuild, RustCallStatus *out_err); +extern RustBuffer uniffi_prolly_bindings_fn_method_bindingproximitymap_build_or_rebuild_composite_turboquant(uint64_t ptr, uint64_t base_map, uint64_t base, RustBuffer config, RustBuffer limits, RustBuffer rebuild, RustCallStatus *out_err); extern uint64_t uniffi_prolly_bindings_fn_method_bindingproximitymap_load_composite(uint64_t ptr, RustBuffer manifest, RustCallStatus *out_err); -extern uint64_t uniffi_prolly_bindings_fn_method_bindingproximitymap_build_accelerator_catalog(uint64_t ptr, RustBuffer hnsw, RustBuffer pq, RustBuffer composite, RustCallStatus *out_err); +extern uint64_t uniffi_prolly_bindings_fn_method_bindingproximitymap_build_accelerator_catalog(uint64_t ptr, RustBuffer hnsw, RustBuffer pq, RustBuffer turboquant, RustBuffer composite, RustCallStatus *out_err); extern uint64_t uniffi_prolly_bindings_fn_method_bindingproximitymap_load_accelerator_catalog(uint64_t ptr, RustBuffer manifest, RustCallStatus *out_err); extern void uniffi_prolly_bindings_fn_method_bindingproximitymap_clear_content_cache(uint64_t ptr, RustCallStatus *out_err); extern int8_t uniffi_prolly_bindings_fn_method_bindingproximitymap_contains_key(uint64_t ptr, RustBuffer key, RustCallStatus *out_err); @@ -292,6 +294,8 @@ extern RustBuffer uniffi_prolly_bindings_fn_func_default_composite_build_limits( extern RustBuffer uniffi_prolly_bindings_fn_func_default_composite_rebuild_options(RustCallStatus *out_err); extern RustBuffer uniffi_prolly_bindings_fn_func_default_pq_build_limits(RustCallStatus *out_err); extern RustBuffer uniffi_prolly_bindings_fn_func_default_pq_config(RustCallStatus *out_err); +extern RustBuffer uniffi_prolly_bindings_fn_func_default_turboquant_build_limits(RustCallStatus *out_err); +extern RustBuffer uniffi_prolly_bindings_fn_func_default_turboquant_config(RustCallStatus *out_err); extern RustBuffer uniffi_prolly_bindings_fn_func_exact_proximity_search_request(RustBuffer query, uint64_t k, RustCallStatus *out_err); extern uint64_t uniffi_prolly_bindings_fn_clone_bindingproximitysearchproof(uint64_t ptr, RustCallStatus *out_err); extern void uniffi_prolly_bindings_fn_free_bindingproximitysearchproof(uint64_t ptr, RustCallStatus *out_err); @@ -320,6 +324,19 @@ extern RustBuffer uniffi_prolly_bindings_fn_method_bindingproductquantizer_quali extern RustBuffer uniffi_prolly_bindings_fn_method_bindingproductquantizer_search(uint64_t ptr, uint64_t map, RustBuffer request, RustCallStatus *out_err); extern RustBuffer uniffi_prolly_bindings_fn_method_bindingproductquantizer_search_with_runtime(uint64_t ptr, uint64_t map, RustBuffer request, uint64_t runtime, RustCallStatus *out_err); extern RustBuffer uniffi_prolly_bindings_fn_method_bindingproductquantizer_source_descriptor(uint64_t ptr, RustCallStatus *out_err); +extern RustBuffer uniffi_prolly_bindings_fn_method_bindingproximitymap_build_turboquant(uint64_t ptr, RustBuffer config, uint64_t worker_threads, RustBuffer limits, RustCallStatus *out_err); +extern uint64_t uniffi_prolly_bindings_fn_method_bindingproximitymap_load_turboquant(uint64_t ptr, RustBuffer manifest, RustCallStatus *out_err); +extern uint64_t uniffi_prolly_bindings_fn_clone_bindingturboquantizer(uint64_t ptr, RustCallStatus *out_err); +extern void uniffi_prolly_bindings_fn_free_bindingturboquantizer(uint64_t ptr, RustCallStatus *out_err); +extern RustBuffer uniffi_prolly_bindings_fn_method_bindingturboquantizer_config(uint64_t ptr, RustCallStatus *out_err); +extern RustBuffer uniffi_prolly_bindings_fn_method_bindingturboquantizer_manifest(uint64_t ptr, RustCallStatus *out_err); +extern uint64_t uniffi_prolly_bindings_fn_method_bindingturboquantizer_prove_search(uint64_t ptr, uint64_t map, RustBuffer request, RustBuffer limits, RustCallStatus *out_err); +extern RustBuffer uniffi_prolly_bindings_fn_method_bindingturboquantizer_quality(uint64_t ptr, RustCallStatus *out_err); +extern RustBuffer uniffi_prolly_bindings_fn_method_bindingturboquantizer_search(uint64_t ptr, uint64_t map, RustBuffer request, RustCallStatus *out_err); +extern RustBuffer uniffi_prolly_bindings_fn_method_bindingturboquantizer_search_cancellable(uint64_t ptr, uint64_t map, RustBuffer request, RustBuffer runtime, uint64_t cancellation, RustCallStatus *out_err); +extern RustBuffer uniffi_prolly_bindings_fn_method_bindingturboquantizer_search_with_runtime(uint64_t ptr, uint64_t map, RustBuffer request, uint64_t runtime, RustCallStatus *out_err); +extern RustBuffer uniffi_prolly_bindings_fn_method_bindingturboquantizer_source_descriptor(uint64_t ptr, RustCallStatus *out_err); +extern RustBuffer uniffi_prolly_bindings_fn_method_bindingturboquantizer_verify(uint64_t ptr, uint64_t map, RustCallStatus *out_err); extern uint64_t uniffi_prolly_bindings_fn_clone_bindingcompositeaccelerator(uint64_t ptr, RustCallStatus *out_err); extern void uniffi_prolly_bindings_fn_free_bindingcompositeaccelerator(uint64_t ptr, RustCallStatus *out_err); @@ -3242,6 +3259,227 @@ func ffiProductQuantizerProveSearch(index, proximity uint64, request, limits []b return uint64(proof), portableStatusError(&status) } +func ffiDefaultTurboQuantConfig() ([]byte, error) { + var status C.RustCallStatus + buf := C.uniffi_prolly_bindings_fn_func_default_turboquant_config(&status) + if err := portableStatusError(&status); err != nil { + return nil, err + } + return portableTakeBuffer(buf), nil +} + +func ffiDefaultTurboQuantBuildLimits() ([]byte, error) { + var status C.RustCallStatus + buf := C.uniffi_prolly_bindings_fn_func_default_turboquant_build_limits(&status) + if err := portableStatusError(&status); err != nil { + return nil, err + } + return portableTakeBuffer(buf), nil +} + +func ffiProximityBuildTurboQuant(handle uint64, config []byte, workerThreads uint64, limits []byte) ([]byte, error) { + configBuf, err := portableInput(config) + if err != nil { + return nil, err + } + limitsBuf, err := portableInput(limits) + if err != nil { + portableFreeBuffer(configBuf) + return nil, err + } + clone, err := ffiCloneProximity(handle) + if err != nil { + portableFreeBuffer(configBuf) + portableFreeBuffer(limitsBuf) + return nil, err + } + var status C.RustCallStatus + buf := C.uniffi_prolly_bindings_fn_method_bindingproximitymap_build_turboquant( + C.uint64_t(clone), configBuf, C.uint64_t(workerThreads), limitsBuf, &status, + ) + if err := portableStatusError(&status); err != nil { + return nil, err + } + return portableTakeBuffer(buf), nil +} + +func ffiProximityLoadTurboQuant(handle uint64, manifest []byte) (uint64, error) { + manifestBuf, err := portableInput(encodeByteArray(manifest)) + if err != nil { + return 0, err + } + clone, err := ffiCloneProximity(handle) + if err != nil { + portableFreeBuffer(manifestBuf) + return 0, err + } + var status C.RustCallStatus + index := C.uniffi_prolly_bindings_fn_method_bindingproximitymap_load_turboquant( + C.uint64_t(clone), manifestBuf, &status, + ) + return uint64(index), portableStatusError(&status) +} + +func ffiCloneTurboQuantizer(handle uint64) (uint64, error) { + var status C.RustCallStatus + clone := C.uniffi_prolly_bindings_fn_clone_bindingturboquantizer(C.uint64_t(handle), &status) + return uint64(clone), portableStatusError(&status) +} + +func ffiFreeTurboQuantizer(handle uint64) { + var status C.RustCallStatus + C.uniffi_prolly_bindings_fn_free_bindingturboquantizer(C.uint64_t(handle), &status) +} + +func ffiTurboQuantizerBufferCall( + handle uint64, + call func(C.uint64_t, *C.RustCallStatus) C.RustBuffer, +) ([]byte, error) { + clone, err := ffiCloneTurboQuantizer(handle) + if err != nil { + return nil, err + } + var status C.RustCallStatus + buf := call(C.uint64_t(clone), &status) + if err := portableStatusError(&status); err != nil { + return nil, err + } + return portableTakeBuffer(buf), nil +} + +func ffiTurboQuantizerManifest(handle uint64) ([]byte, error) { + return ffiTurboQuantizerBufferCall(handle, func(clone C.uint64_t, status *C.RustCallStatus) C.RustBuffer { + return C.uniffi_prolly_bindings_fn_method_bindingturboquantizer_manifest(clone, status) + }) +} + +func ffiTurboQuantizerSourceDescriptor(handle uint64) ([]byte, error) { + return ffiTurboQuantizerBufferCall(handle, func(clone C.uint64_t, status *C.RustCallStatus) C.RustBuffer { + return C.uniffi_prolly_bindings_fn_method_bindingturboquantizer_source_descriptor(clone, status) + }) +} + +func ffiTurboQuantizerConfig(handle uint64) ([]byte, error) { + return ffiTurboQuantizerBufferCall(handle, func(clone C.uint64_t, status *C.RustCallStatus) C.RustBuffer { + return C.uniffi_prolly_bindings_fn_method_bindingturboquantizer_config(clone, status) + }) +} + +func ffiTurboQuantizerQuality(handle uint64) ([]byte, error) { + return ffiTurboQuantizerBufferCall(handle, func(clone C.uint64_t, status *C.RustCallStatus) C.RustBuffer { + return C.uniffi_prolly_bindings_fn_method_bindingturboquantizer_quality(clone, status) + }) +} + +func ffiTurboQuantizerVerify(index, proximity uint64) ([]byte, error) { + indexClone, err := ffiCloneTurboQuantizer(index) + if err != nil { + return nil, err + } + mapClone, err := ffiCloneProximity(proximity) + if err != nil { + ffiFreeTurboQuantizer(indexClone) + return nil, err + } + var status C.RustCallStatus + buf := C.uniffi_prolly_bindings_fn_method_bindingturboquantizer_verify( + C.uint64_t(indexClone), C.uint64_t(mapClone), &status, + ) + if err := portableStatusError(&status); err != nil { + return nil, err + } + return portableTakeBuffer(buf), nil +} + +func ffiTurboQuantizerSearch(index, proximity uint64, request []byte) ([]byte, error) { + requestBuf, err := portableInput(request) + if err != nil { + return nil, err + } + indexClone, err := ffiCloneTurboQuantizer(index) + if err != nil { + portableFreeBuffer(requestBuf) + return nil, err + } + mapClone, err := ffiCloneProximity(proximity) + if err != nil { + portableFreeBuffer(requestBuf) + ffiFreeTurboQuantizer(indexClone) + return nil, err + } + var status C.RustCallStatus + buf := C.uniffi_prolly_bindings_fn_method_bindingturboquantizer_search( + C.uint64_t(indexClone), C.uint64_t(mapClone), requestBuf, &status, + ) + if err := portableStatusError(&status); err != nil { + return nil, err + } + return portableTakeBuffer(buf), nil +} + +func ffiTurboQuantizerSearchWithRuntime(index, proximity uint64, request []byte, searchRuntime uint64) ([]byte, error) { + requestBuf, err := portableInput(request) + if err != nil { + return nil, err + } + indexClone, err := ffiCloneTurboQuantizer(index) + if err != nil { + portableFreeBuffer(requestBuf) + return nil, err + } + mapClone, err := ffiCloneProximity(proximity) + if err != nil { + portableFreeBuffer(requestBuf) + ffiFreeTurboQuantizer(indexClone) + return nil, err + } + runtimeClone, err := ffiCloneProximitySearchRuntime(searchRuntime) + if err != nil { + portableFreeBuffer(requestBuf) + ffiFreeTurboQuantizer(indexClone) + ffiFreeProximity(mapClone) + return nil, err + } + var status C.RustCallStatus + buf := C.uniffi_prolly_bindings_fn_method_bindingturboquantizer_search_with_runtime( + C.uint64_t(indexClone), C.uint64_t(mapClone), requestBuf, C.uint64_t(runtimeClone), &status, + ) + if err := portableStatusError(&status); err != nil { + return nil, err + } + return portableTakeBuffer(buf), nil +} + +func ffiTurboQuantizerProveSearch(index, proximity uint64, request, limits []byte) (uint64, error) { + requestBuf, err := portableInput(request) + if err != nil { + return 0, err + } + limitsBuf, err := portableInput(limits) + if err != nil { + portableFreeBuffer(requestBuf) + return 0, err + } + indexClone, err := ffiCloneTurboQuantizer(index) + if err != nil { + portableFreeBuffer(requestBuf) + portableFreeBuffer(limitsBuf) + return 0, err + } + mapClone, err := ffiCloneProximity(proximity) + if err != nil { + portableFreeBuffer(requestBuf) + portableFreeBuffer(limitsBuf) + ffiFreeTurboQuantizer(indexClone) + return 0, err + } + var status C.RustCallStatus + proof := C.uniffi_prolly_bindings_fn_method_bindingturboquantizer_prove_search( + C.uint64_t(indexClone), C.uint64_t(mapClone), requestBuf, limitsBuf, &status, + ) + return uint64(proof), portableStatusError(&status) +} + func ffiDefaultCompositeConfig() ([]byte, error) { var status C.RustCallStatus buf := C.uniffi_prolly_bindings_fn_func_default_composite_accelerator_config(&status) @@ -3329,6 +3567,24 @@ func ffiProximityBuildCompositePQ(current, baseMap, base uint64, config, limits return portableTakeBuffer(buf), nil } +func ffiProximityBuildCompositeTurboQuant(current, baseMap, base uint64, config, limits []byte) ([]byte, error) { + currentClone, baseMapClone, baseClone, configBuf, limitsBuf, err := ffiCompositeInputs( + current, baseMap, base, ffiCloneTurboQuantizer, config, limits, + ) + if err != nil { + return nil, err + } + var status C.RustCallStatus + buf := C.uniffi_prolly_bindings_fn_method_bindingproximitymap_build_composite_turboquant( + C.uint64_t(currentClone), C.uint64_t(baseMapClone), C.uint64_t(baseClone), + configBuf, limitsBuf, &status, + ) + if err := portableStatusError(&status); err != nil { + return nil, err + } + return portableTakeBuffer(buf), nil +} + func ffiProximityRebuildCompositeHNSW(current, baseMap, base uint64, config, limits, rebuild []byte) ([]byte, error) { currentClone, baseMapClone, baseClone, configBuf, limitsBuf, err := ffiCompositeInputs(current, baseMap, base, ffiCloneHNSWIndex, config, limits) if err != nil { @@ -3373,6 +3629,33 @@ func ffiProximityRebuildCompositePQ(current, baseMap, base uint64, config, limit return portableTakeBuffer(buf), nil } +func ffiProximityRebuildCompositeTurboQuant(current, baseMap, base uint64, config, limits, rebuild []byte) ([]byte, error) { + currentClone, baseMapClone, baseClone, configBuf, limitsBuf, err := ffiCompositeInputs( + current, baseMap, base, ffiCloneTurboQuantizer, config, limits, + ) + if err != nil { + return nil, err + } + rebuildBuf, err := portableInput(rebuild) + if err != nil { + portableFreeBuffer(configBuf) + portableFreeBuffer(limitsBuf) + ffiFreeProximity(currentClone) + ffiFreeProximity(baseMapClone) + ffiFreeTurboQuantizer(baseClone) + return nil, err + } + var status C.RustCallStatus + buf := C.uniffi_prolly_bindings_fn_method_bindingproximitymap_build_or_rebuild_composite_turboquant( + C.uint64_t(currentClone), C.uint64_t(baseMapClone), C.uint64_t(baseClone), + configBuf, limitsBuf, rebuildBuf, &status, + ) + if err := portableStatusError(&status); err != nil { + return nil, err + } + return portableTakeBuffer(buf), nil +} + func ffiProximityLoadComposite(handle uint64, manifest []byte) (uint64, error) { manifestBuf, err := portableInput(encodeByteArray(manifest)) if err != nil { @@ -3539,7 +3822,7 @@ func ffiCompositeProveSearch(index, proximity uint64, request, limits []byte) (u return uint64(proof), portableStatusError(&status) } -func ffiProximityBuildCatalog(proximity uint64, hnsw, pq, composite *uint64) (uint64, error) { +func ffiProximityBuildCatalog(proximity uint64, hnsw, pq, turboquant, composite *uint64) (uint64, error) { cloneOptional := func(value *uint64, clone func(uint64) (uint64, error)) (*uint64, error) { if value == nil { return nil, nil @@ -3558,6 +3841,16 @@ func ffiProximityBuildCatalog(proximity uint64, hnsw, pq, composite *uint64) (ui } return 0, err } + turboquantClone, err := cloneOptional(turboquant, ffiCloneTurboQuantizer) + if err != nil { + if hnswClone != nil { + ffiFreeHNSWIndex(*hnswClone) + } + if pqClone != nil { + ffiFreeProductQuantizer(*pqClone) + } + return 0, err + } compositeClone, err := cloneOptional(composite, ffiCloneComposite) if err != nil { if hnswClone != nil { @@ -3566,6 +3859,9 @@ func ffiProximityBuildCatalog(proximity uint64, hnsw, pq, composite *uint64) (ui if pqClone != nil { ffiFreeProductQuantizer(*pqClone) } + if turboquantClone != nil { + ffiFreeTurboQuantizer(*turboquantClone) + } return 0, err } freeClones := func() { @@ -3575,6 +3871,9 @@ func ffiProximityBuildCatalog(proximity uint64, hnsw, pq, composite *uint64) (ui if pqClone != nil { ffiFreeProductQuantizer(*pqClone) } + if turboquantClone != nil { + ffiFreeTurboQuantizer(*turboquantClone) + } if compositeClone != nil { ffiFreeComposite(*compositeClone) } @@ -3590,10 +3889,18 @@ func ffiProximityBuildCatalog(proximity uint64, hnsw, pq, composite *uint64) (ui freeClones() return 0, err } + turboquantBuf, err := portableInput(encodeOptionalU64Bytes(turboquantClone)) + if err != nil { + portableFreeBuffer(hnswBuf) + portableFreeBuffer(pqBuf) + freeClones() + return 0, err + } compositeBuf, err := portableInput(encodeOptionalU64Bytes(compositeClone)) if err != nil { portableFreeBuffer(hnswBuf) portableFreeBuffer(pqBuf) + portableFreeBuffer(turboquantBuf) freeClones() return 0, err } @@ -3601,12 +3908,15 @@ func ffiProximityBuildCatalog(proximity uint64, hnsw, pq, composite *uint64) (ui if err != nil { portableFreeBuffer(hnswBuf) portableFreeBuffer(pqBuf) + portableFreeBuffer(turboquantBuf) portableFreeBuffer(compositeBuf) freeClones() return 0, err } var status C.RustCallStatus - value := C.uniffi_prolly_bindings_fn_method_bindingproximitymap_build_accelerator_catalog(C.uint64_t(mapClone), hnswBuf, pqBuf, compositeBuf, &status) + value := C.uniffi_prolly_bindings_fn_method_bindingproximitymap_build_accelerator_catalog( + C.uint64_t(mapClone), hnswBuf, pqBuf, turboquantBuf, compositeBuf, &status, + ) return uint64(value), portableStatusError(&status) } func ffiProximityLoadCatalog(handle uint64, manifest []byte) (uint64, error) { @@ -4213,6 +4523,27 @@ func ffiProductQuantizerSearchCancellable( return portableTakeBuffer(buf), nil } +func ffiTurboQuantizerSearchCancellable( + index, mapHandle uint64, request []byte, searchRuntime *uint64, cancellation uint64, +) ([]byte, error) { + inputs, err := preparePortableCancellableSearch( + index, ffiCloneTurboQuantizer, ffiFreeTurboQuantizer, + &mapHandle, request, searchRuntime, cancellation, + ) + if err != nil { + return nil, err + } + var status C.RustCallStatus + buf := C.uniffi_prolly_bindings_fn_method_bindingturboquantizer_search_cancellable( + C.uint64_t(inputs.target), C.uint64_t(inputs.mapHandle), inputs.request, inputs.runtime, + C.uint64_t(inputs.cancellation), &status, + ) + if err := portableStatusError(&status); err != nil { + return nil, err + } + return portableTakeBuffer(buf), nil +} + func ffiCompositeSearchCancellable( index, mapHandle uint64, request []byte, searchRuntime *uint64, cancellation uint64, ) ([]byte, error) { diff --git a/bindings/go/portable_parity_test.go b/bindings/go/portable_parity_test.go index 99bec8a8..32a7b69d 100644 --- a/bindings/go/portable_parity_test.go +++ b/bindings/go/portable_parity_test.go @@ -555,6 +555,162 @@ func TestProductQuantizerLifecycleIsPortableAndBounded(t *testing.T) { } } +func TestTurboQuantizerLifecycleIsPortableVerifiableAndBounded(t *testing.T) { + config, err := DefaultConfig() + if err != nil { + t.Fatal(err) + } + engine, err := NewMemoryEngine(config) + if err != nil { + t.Fatal(err) + } + t.Cleanup(engine.Close) + records := make([]ProximityRecord, 32) + for index := range records { + records[index] = ProximityRecord{ + Key: []byte(fmt.Sprintf("turbo-vector-%02d", index)), + Vector: []float32{ + float32(index), float32(index % 3), 0, 1, 2, 3, 4, 5, + }, + Value: []byte(fmt.Sprintf("turbo-value-%02d", index)), + } + } + proximity, err := engine.BuildProximity(8, records) + if err != nil { + t.Fatal(err) + } + t.Cleanup(proximity.Close) + limits, err := DefaultTurboQuantBuildLimits() + if err != nil { + t.Fatal(err) + } + turboConfig := TurboQuantizationConfig{BitWidth: 4, RerankMultiplier: 4, Seed: ^uint64(0)} + built, err := proximity.BuildTurboQuant(turboConfig, 2, limits) + if err != nil { + t.Fatal(err) + } + if built.Stats.EncodedVectors != 32 { + t.Fatalf("TurboQuant build stats = %#v", built.Stats) + } + index := built.Index + manifest, err := index.Manifest() + if err != nil { + t.Fatal(err) + } + descriptor, err := proximity.Descriptor() + if err != nil { + t.Fatal(err) + } + source, err := index.SourceDescriptor() + if err != nil || !bytes.Equal(source, descriptor) { + t.Fatalf("TurboQuant source = %x, %v", source, err) + } + actualConfig, err := index.Config() + if err != nil || actualConfig != turboConfig { + t.Fatalf("TurboQuant config = %#v, %v", actualConfig, err) + } + verification, err := index.Verify(proximity) + if err != nil || verification.EncodedVectors != 32 { + t.Fatalf("TurboQuant verification = %#v, %v", verification, err) + } + request := ExactSearch([]float32{0, 0, 0, 1, 2, 3, 4, 5}, 3) + request.Policy = SearchPolicyFixedBudget + request.Backend = SearchBackendTurboQuantized + result, err := index.Search(context.Background(), proximity, request) + if err != nil || result.Backend != "turbo-quantized" || !bytes.Equal(result.Neighbors[0].Key, []byte("turbo-vector-00")) { + t.Fatalf("TurboQuant search = %#v, %v", result, err) + } + if result.Stats.DistanceEvaluations == 0 { + t.Fatalf("TurboQuant search stats = %#v", result.Stats) + } + runtimeCache, err := engine.NewProximitySearchRuntime() + if err != nil { + t.Fatal(err) + } + t.Cleanup(runtimeCache.Close) + if cached, err := index.SearchWithRuntime(context.Background(), proximity, request, runtimeCache); err != nil || cached.Backend != "turbo-quantized" { + t.Fatalf("TurboQuant runtime search = %#v, %v", cached, err) + } + cancellation, err := NewProximityCancellationToken() + if err != nil { + t.Fatal(err) + } + t.Cleanup(cancellation.Close) + cancellation.Cancel() + cancelled, err := index.SearchCancellable(context.Background(), proximity, request, nil, cancellation) + if err != nil || cancelled.Completion != "cancelled" || len(cancelled.Neighbors) != 0 { + t.Fatalf("TurboQuant cancellation = %#v, %v", cancelled, err) + } + proof, err := index.ProveSearch(proximity, request) + if err != nil { + t.Fatal(err) + } + t.Cleanup(proof.Close) + verified, err := proof.Verify(descriptor) + if err != nil || verified.Result.Backend != "turbo-quantized" { + t.Fatalf("TurboQuant proof = %#v, %v", verified, err) + } + catalog, err := proximity.BuildAcceleratorCatalog(nil, nil, index, nil) + if err != nil { + t.Fatal(err) + } + entries, err := catalog.Entries() + if err != nil || len(entries) != 1 || entries[0].Kind != CatalogTurboQuantized { + t.Fatalf("TurboQuant catalog entries = %#v, %v", entries, err) + } + catalogResult, err := catalog.Search(context.Background(), proximity, request) + if err != nil || catalogResult.Backend != "turbo-quantized" { + t.Fatalf("TurboQuant catalog search = %#v, %v", catalogResult, err) + } + catalog.Close() + + current, _, err := proximity.Mutate([]ProximityMutation{UpsertProximity( + []byte("turbo-vector-00"), + []float32{0.25, 0, 0, 1, 2, 3, 4, 5}, + []byte("updated"), + )}) + if err != nil { + t.Fatal(err) + } + t.Cleanup(current.Close) + compositeConfig, err := DefaultCompositeAcceleratorConfig() + if err != nil { + t.Fatal(err) + } + compositeLimits, err := DefaultCompositeBuildLimits() + if err != nil { + t.Fatal(err) + } + compositeBuilt, err := current.BuildCompositeTurboQuant( + proximity, index, compositeConfig, compositeLimits, + ) + if err != nil || compositeBuilt.Accelerator == nil { + t.Fatalf("TurboQuant composite build = %#v, %v", compositeBuilt, err) + } + composite := compositeBuilt.Accelerator + baseKind, err := composite.BaseKind() + if err != nil || baseKind != CompositeBaseTurboQuantized { + t.Fatalf("TurboQuant composite base kind = %v, %v", baseKind, err) + } + compositeRequest := request + compositeRequest.Backend = SearchBackendComposite + compositeResult, err := composite.Search(context.Background(), current, compositeRequest) + if err != nil || compositeResult.Backend != "composite" { + t.Fatalf("TurboQuant composite search = %#v, %v", compositeResult, err) + } + composite.Close() + index.Close() + loaded, err := proximity.LoadTurboQuant(manifest) + if err != nil { + t.Fatal(err) + } + t.Cleanup(loaded.Close) + loadedManifest, err := loaded.Manifest() + if err != nil || !bytes.Equal(loadedManifest, manifest) { + t.Fatalf("loaded TurboQuant manifest = %x, %v", loadedManifest, err) + } +} + func TestCompositeAndCatalogLifecycleIsPortableAndBounded(t *testing.T) { config, err := DefaultConfig() if err != nil { @@ -663,7 +819,7 @@ func TestCompositeAndCatalogLifecycleIsPortableAndBounded(t *testing.T) { if err != nil { t.Fatal(err) } - catalog, err := current.BuildAcceleratorCatalog(nil, nil, composite) + catalog, err := current.BuildAcceleratorCatalog(nil, nil, nil, composite) if err != nil { t.Fatal(err) } diff --git a/bindings/go/proximity.go b/bindings/go/proximity.go index 5ce26ba1..16c510c1 100644 --- a/bindings/go/proximity.go +++ b/bindings/go/proximity.go @@ -406,6 +406,150 @@ func DefaultPQBuildLimits() (ProductQuantizationBuildLimits, error) { return decodeProductQuantizationBuildLimits(raw) } +type TurboQuantizationConfig struct { + BitWidth uint8 + RerankMultiplier uint32 + Seed uint64 +} + +type TurboQuantizationBuildLimits struct { + MaxRecords *uint64 + MaxInputBytes *uint64 + MaxTemporaryBytes *uint64 + MaxTransformOperations *uint64 + MaxEncodedOutputBytes *uint64 + MaxWorkerThreads *uint64 +} + +type TurboQuantizationBuildStats struct { + EncodedVectors uint64 + ZeroVectors uint64 + TransformedComponents uint64 + ButterflyOperations uint64 + InputBytes uint64 + EncodedOutputBytes uint64 + PeakTemporaryBytes uint64 +} + +type TurboQuantizationQuality struct { + MeanSquaredError float64 + MaximumSquaredError float64 +} + +type TurboQuantizationVerification struct { + EncodedVectors uint64 + ZeroVectors uint64 + Quality TurboQuantizationQuality +} + +type TurboQuantizationBuildResult struct { + Index *TurboQuantizer + Stats TurboQuantizationBuildStats +} + +func decodeTurboQuantizationConfig(raw []byte) (TurboQuantizationConfig, error) { + d := byteDecoder{data: raw} + bitWidth, err := d.readByte() + if err != nil { + return TurboQuantizationConfig{}, err + } + rerankMultiplier, err := d.readUint32() + if err != nil { + return TurboQuantizationConfig{}, err + } + seed, err := d.readUint64() + if err != nil { + return TurboQuantizationConfig{}, err + } + if err := d.done(); err != nil { + return TurboQuantizationConfig{}, err + } + return TurboQuantizationConfig{BitWidth: bitWidth, RerankMultiplier: rerankMultiplier, Seed: seed}, nil +} + +func encodeTurboQuantizationConfig(config TurboQuantizationConfig) []byte { + var out bytes.Buffer + out.WriteByte(config.BitWidth) + writeU32(&out, config.RerankMultiplier) + writeU64(&out, config.Seed) + return out.Bytes() +} + +func decodeTurboQuantizationBuildLimits(raw []byte) (TurboQuantizationBuildLimits, error) { + d := byteDecoder{data: raw} + var result TurboQuantizationBuildLimits + targets := []**uint64{ + &result.MaxRecords, &result.MaxInputBytes, &result.MaxTemporaryBytes, + &result.MaxTransformOperations, &result.MaxEncodedOutputBytes, &result.MaxWorkerThreads, + } + for _, target := range targets { + value, err := d.readOptionalUint64() + if err != nil { + return TurboQuantizationBuildLimits{}, err + } + *target = value + } + return result, d.done() +} + +func encodeTurboQuantizationBuildLimits(limits TurboQuantizationBuildLimits) []byte { + var out bytes.Buffer + encodeOptionalU64(&out, limits.MaxRecords) + encodeOptionalU64(&out, limits.MaxInputBytes) + encodeOptionalU64(&out, limits.MaxTemporaryBytes) + encodeOptionalU64(&out, limits.MaxTransformOperations) + encodeOptionalU64(&out, limits.MaxEncodedOutputBytes) + encodeOptionalU64(&out, limits.MaxWorkerThreads) + return out.Bytes() +} + +func decodeTurboQuantizationBuildStats(d *byteDecoder) (TurboQuantizationBuildStats, error) { + var result TurboQuantizationBuildStats + targets := []*uint64{ + &result.EncodedVectors, &result.ZeroVectors, &result.TransformedComponents, + &result.ButterflyOperations, &result.InputBytes, &result.EncodedOutputBytes, + &result.PeakTemporaryBytes, + } + for _, target := range targets { + value, err := d.readUint64() + if err != nil { + return TurboQuantizationBuildStats{}, err + } + *target = value + } + return result, nil +} + +func decodeTurboQuantizationQuality(d *byteDecoder) (TurboQuantizationQuality, error) { + mean, err := d.readUint64() + if err != nil { + return TurboQuantizationQuality{}, err + } + maximum, err := d.readUint64() + if err != nil { + return TurboQuantizationQuality{}, err + } + return TurboQuantizationQuality{ + MeanSquaredError: math.Float64frombits(mean), MaximumSquaredError: math.Float64frombits(maximum), + }, nil +} + +func DefaultTurboQuantConfig() (TurboQuantizationConfig, error) { + raw, err := ffiDefaultTurboQuantConfig() + if err != nil { + return TurboQuantizationConfig{}, err + } + return decodeTurboQuantizationConfig(raw) +} + +func DefaultTurboQuantBuildLimits() (TurboQuantizationBuildLimits, error) { + raw, err := ffiDefaultTurboQuantBuildLimits() + if err != nil { + return TurboQuantizationBuildLimits{}, err + } + return decodeTurboQuantizationBuildLimits(raw) +} + type ProximityMutation struct { Key []byte Vector []float32 @@ -522,6 +666,7 @@ const ( SearchBackendHNSW SearchBackend = 3 SearchBackendComposite SearchBackend = 4 SearchBackendAuto SearchBackend = 5 + SearchBackendTurboQuantized SearchBackend = 6 ) type ProximityFilterKind int32 @@ -560,16 +705,17 @@ func EligibleKeysFilter(keys [][]byte) ProximityFilter { } type SearchRequest struct { - Query []float32 - K uint32 - Policy SearchPolicy - AdaptiveQuality *AdaptiveQuality - Budget SearchBudget - Filter ProximityFilter - Kernel QueryKernel - Backend SearchBackend - HNSWEFSearch *uint32 - PQRerankMultiplier *uint16 + Query []float32 + K uint32 + Policy SearchPolicy + AdaptiveQuality *AdaptiveQuality + Budget SearchBudget + Filter ProximityFilter + Kernel QueryKernel + Backend SearchBackend + HNSWEFSearch *uint32 + PQRerankMultiplier *uint16 + TurboQuantRerankMultiplier *uint16 } func ExactSearch(query []float32, k uint32) SearchRequest { @@ -608,6 +754,10 @@ func cloneSearchRequest(request SearchRequest) SearchRequest { value := *request.PQRerankMultiplier request.PQRerankMultiplier = &value } + if request.TurboQuantRerankMultiplier != nil { + value := *request.TurboQuantRerankMultiplier + request.TurboQuantRerankMultiplier = &value + } return request } @@ -633,7 +783,7 @@ func (request SearchRequest) validate() error { if request.Kernel < QueryKernelScalarDeterministic || request.Kernel > QueryKernelAutoDeterministic { return errors.New("invalid query kernel") } - if request.Backend < SearchBackendNative || request.Backend > SearchBackendAuto { + if request.Backend < SearchBackendNative || request.Backend > SearchBackendTurboQuantized { return errors.New("invalid search backend") } return nil @@ -644,7 +794,8 @@ func (request SearchRequest) usesPackedExactPath() bool { request.Budget.MaxNodes == nil && request.Budget.MaxCommittedBytes == nil && request.Budget.MaxDistanceEvaluations == nil && request.Budget.MaxFrontierEntries == nil && request.Filter.Kind == ProximityFilterAll && request.Kernel == QueryKernelAutoDeterministic && - request.Backend == SearchBackendNative && request.HNSWEFSearch == nil && request.PQRerankMultiplier == nil + request.Backend == SearchBackendNative && request.HNSWEFSearch == nil && + request.PQRerankMultiplier == nil && request.TurboQuantRerankMultiplier == nil } type Neighbor struct { @@ -683,6 +834,7 @@ type ProximitySearchRuntimePolicy struct { AuthoritativeMaxBytes uint64 HNSWMaxBytes uint64 PQMaxBytes uint64 + TurboQuantMaxBytes uint64 } type ProximitySearchRuntimeStats struct { @@ -705,12 +857,13 @@ func encodeProximitySearchRuntimePolicy(policy ProximitySearchRuntimePolicy) []b writeU64(&out, policy.AuthoritativeMaxBytes) writeU64(&out, policy.HNSWMaxBytes) writeU64(&out, policy.PQMaxBytes) + writeU64(&out, policy.TurboQuantMaxBytes) return out.Bytes() } func decodeProximitySearchRuntimePolicy(raw []byte) (ProximitySearchRuntimePolicy, error) { d := byteDecoder{data: raw} - values := [5]uint64{} + values := [6]uint64{} for index := range values { value, err := d.readUint64() if err != nil { @@ -723,7 +876,7 @@ func decodeProximitySearchRuntimePolicy(raw []byte) (ProximitySearchRuntimePolic } return ProximitySearchRuntimePolicy{ MaxEntries: values[0], MaxBytes: values[1], AuthoritativeMaxBytes: values[2], - HNSWMaxBytes: values[3], PQMaxBytes: values[4], + HNSWMaxBytes: values[3], PQMaxBytes: values[4], TurboQuantMaxBytes: values[5], }, nil } @@ -1497,6 +1650,307 @@ func (i *ProductQuantizer) ProveSearch(proximity *ProximityMap, request SearchRe return proof, nil } +type TurboQuantizer struct { + handle uint64 + closed atomic.Bool + mu sync.RWMutex +} + +func newTurboQuantizer(handle uint64) *TurboQuantizer { + index := &TurboQuantizer{handle: handle} + runtime.SetFinalizer(index, (*TurboQuantizer).Close) + return index +} + +func (i *TurboQuantizer) Close() { + if i == nil || i.closed.Swap(true) { + return + } + i.mu.Lock() + defer i.mu.Unlock() + runtime.SetFinalizer(i, nil) + if i.handle != 0 { + ffiFreeTurboQuantizer(i.handle) + i.handle = 0 + } +} + +func (i *TurboQuantizer) withHandle() (uint64, func(), error) { + if i == nil || i.closed.Load() { + return 0, nil, errors.New("TurboQuantizer is closed") + } + i.mu.RLock() + if i.closed.Load() || i.handle == 0 { + i.mu.RUnlock() + return 0, nil, errors.New("TurboQuantizer is closed") + } + return i.handle, i.mu.RUnlock, nil +} + +func (m *ProximityMap) BuildTurboQuant( + config TurboQuantizationConfig, + workerThreads uint64, + limits TurboQuantizationBuildLimits, +) (TurboQuantizationBuildResult, error) { + handle, _, unlock, err := m.withHandle() + if err != nil { + return TurboQuantizationBuildResult{}, err + } + defer unlock() + raw, err := ffiProximityBuildTurboQuant( + handle, encodeTurboQuantizationConfig(config), workerThreads, + encodeTurboQuantizationBuildLimits(limits), + ) + if err != nil { + return TurboQuantizationBuildResult{}, err + } + d := byteDecoder{data: raw} + indexHandle, err := d.readUint64() + if err != nil { + return TurboQuantizationBuildResult{}, err + } + stats, err := decodeTurboQuantizationBuildStats(&d) + if err != nil { + ffiFreeTurboQuantizer(indexHandle) + return TurboQuantizationBuildResult{}, err + } + if err := d.done(); err != nil { + ffiFreeTurboQuantizer(indexHandle) + return TurboQuantizationBuildResult{}, err + } + return TurboQuantizationBuildResult{Index: newTurboQuantizer(indexHandle), Stats: stats}, nil +} + +func (m *ProximityMap) LoadTurboQuant(manifest []byte) (*TurboQuantizer, error) { + handle, _, unlock, err := m.withHandle() + if err != nil { + return nil, err + } + defer unlock() + indexHandle, err := ffiProximityLoadTurboQuant(handle, bytes.Clone(manifest)) + if err != nil { + return nil, err + } + return newTurboQuantizer(indexHandle), nil +} + +func (i *TurboQuantizer) Manifest() ([]byte, error) { + handle, unlock, err := i.withHandle() + if err != nil { + return nil, err + } + defer unlock() + raw, err := ffiTurboQuantizerManifest(handle) + if err != nil { + return nil, err + } + return decodeHNSWByteArray(raw) +} + +func (i *TurboQuantizer) SourceDescriptor() ([]byte, error) { + handle, unlock, err := i.withHandle() + if err != nil { + return nil, err + } + defer unlock() + raw, err := ffiTurboQuantizerSourceDescriptor(handle) + if err != nil { + return nil, err + } + return decodeHNSWByteArray(raw) +} + +func (i *TurboQuantizer) Config() (TurboQuantizationConfig, error) { + handle, unlock, err := i.withHandle() + if err != nil { + return TurboQuantizationConfig{}, err + } + defer unlock() + raw, err := ffiTurboQuantizerConfig(handle) + if err != nil { + return TurboQuantizationConfig{}, err + } + return decodeTurboQuantizationConfig(raw) +} + +func (i *TurboQuantizer) Quality() (TurboQuantizationQuality, error) { + handle, unlock, err := i.withHandle() + if err != nil { + return TurboQuantizationQuality{}, err + } + defer unlock() + raw, err := ffiTurboQuantizerQuality(handle) + if err != nil { + return TurboQuantizationQuality{}, err + } + d := byteDecoder{data: raw} + quality, err := decodeTurboQuantizationQuality(&d) + if err != nil { + return TurboQuantizationQuality{}, err + } + return quality, d.done() +} + +func (i *TurboQuantizer) Verify(proximity *ProximityMap) (TurboQuantizationVerification, error) { + indexHandle, indexUnlock, err := i.withHandle() + if err != nil { + return TurboQuantizationVerification{}, err + } + defer indexUnlock() + mapHandle, _, mapUnlock, err := proximity.withHandle() + if err != nil { + return TurboQuantizationVerification{}, err + } + defer mapUnlock() + raw, err := ffiTurboQuantizerVerify(indexHandle, mapHandle) + if err != nil { + return TurboQuantizationVerification{}, err + } + d := byteDecoder{data: raw} + encodedVectors, err := d.readUint64() + if err != nil { + return TurboQuantizationVerification{}, err + } + zeroVectors, err := d.readUint64() + if err != nil { + return TurboQuantizationVerification{}, err + } + quality, err := decodeTurboQuantizationQuality(&d) + if err != nil { + return TurboQuantizationVerification{}, err + } + if err := d.done(); err != nil { + return TurboQuantizationVerification{}, err + } + return TurboQuantizationVerification{ + EncodedVectors: encodedVectors, ZeroVectors: zeroVectors, Quality: quality, + }, nil +} + +func (i *TurboQuantizer) Search(ctx context.Context, proximity *ProximityMap, request SearchRequest) (SearchResult, error) { + if ctx == nil { + ctx = context.Background() + } + if err := ctx.Err(); err != nil { + return SearchResult{}, err + } + encoded, err := encodeProximitySearchRequest(cloneSearchRequest(request)) + if err != nil { + return SearchResult{}, err + } + index, indexUnlock, err := i.withHandle() + if err != nil { + return SearchResult{}, err + } + defer indexUnlock() + mapHandle, _, mapUnlock, err := proximity.withHandle() + if err != nil { + return SearchResult{}, err + } + defer mapUnlock() + raw, err := ffiTurboQuantizerSearch(index, mapHandle, encoded) + if err != nil { + return SearchResult{}, err + } + if err := ctx.Err(); err != nil { + return SearchResult{}, err + } + return decodeProximitySearchResultBytes(raw) +} + +func (i *TurboQuantizer) SearchWithRuntime( + ctx context.Context, proximity *ProximityMap, request SearchRequest, searchRuntime *ProximitySearchRuntime, +) (SearchResult, error) { + if ctx == nil { + ctx = context.Background() + } + if err := ctx.Err(); err != nil { + return SearchResult{}, err + } + encoded, err := encodeProximitySearchRequest(cloneSearchRequest(request)) + if err != nil { + return SearchResult{}, err + } + index, indexUnlock, err := i.withHandle() + if err != nil { + return SearchResult{}, err + } + defer indexUnlock() + mapHandle, _, mapUnlock, err := proximity.withHandle() + if err != nil { + return SearchResult{}, err + } + defer mapUnlock() + runtimeHandle, runtimeUnlock, err := searchRuntime.withHandle() + if err != nil { + return SearchResult{}, err + } + defer runtimeUnlock() + raw, err := ffiTurboQuantizerSearchWithRuntime(index, mapHandle, encoded, runtimeHandle) + if err != nil { + return SearchResult{}, err + } + if err := ctx.Err(); err != nil { + return SearchResult{}, err + } + return decodeProximitySearchResultBytes(raw) +} + +func (i *TurboQuantizer) SearchCancellable( + ctx context.Context, + proximity *ProximityMap, + request SearchRequest, + searchRuntime *ProximitySearchRuntime, + cancellation *ProximityCancellationToken, +) (SearchResult, error) { + index, indexUnlock, err := i.withHandle() + if err != nil { + return SearchResult{}, err + } + defer indexUnlock() + mapHandle, _, mapUnlock, err := proximity.withHandle() + if err != nil { + return SearchResult{}, err + } + defer mapUnlock() + return runPortableCancellableSearch( + ctx, request, searchRuntime, cancellation, + func(encoded []byte, runtimeHandle *uint64, cancellationHandle uint64) ([]byte, error) { + return ffiTurboQuantizerSearchCancellable( + index, mapHandle, encoded, runtimeHandle, cancellationHandle, + ) + }, + ) +} + +func (i *TurboQuantizer) ProveSearch(proximity *ProximityMap, request SearchRequest) (*ProximitySearchProof, error) { + encoded, err := encodeProximitySearchRequest(cloneSearchRequest(request)) + if err != nil { + return nil, err + } + limits, err := ffiDefaultContentGraphLimits() + if err != nil { + return nil, err + } + index, indexUnlock, err := i.withHandle() + if err != nil { + return nil, err + } + defer indexUnlock() + mapHandle, _, mapUnlock, err := proximity.withHandle() + if err != nil { + return nil, err + } + defer mapUnlock() + proofHandle, err := ffiTurboQuantizerProveSearch(index, mapHandle, encoded, limits) + if err != nil { + return nil, err + } + proof := &ProximitySearchProof{handle: proofHandle} + runtime.SetFinalizer(proof, (*ProximitySearchProof).Close) + return proof, nil +} + func encodeProximityRecords(dimensions uint32, records []ProximityRecord) ([]byte, error) { var out bytes.Buffer writeI32(&out, int32(len(records))) @@ -1562,6 +2016,13 @@ func encodeProximitySearchRequest(request SearchRequest) ([]byte, error) { out.WriteByte(byte(*request.PQRerankMultiplier >> 8)) out.WriteByte(byte(*request.PQRerankMultiplier)) } + if request.TurboQuantRerankMultiplier == nil { + out.WriteByte(0) + } else { + out.WriteByte(1) + out.WriteByte(byte(*request.TurboQuantRerankMultiplier >> 8)) + out.WriteByte(byte(*request.TurboQuantRerankMultiplier)) + } return out.Bytes(), nil } @@ -2534,6 +2995,7 @@ func decodeProximitySearchResult(d *byteDecoder) (SearchResult, error) { } result.Backend = map[int32]string{ 1: "native", 2: "product-quantized", 3: "hnsw", 4: "composite", 5: "auto", + 6: "turbo-quantized", }[backend] if result.Backend == "" { return SearchResult{}, errors.New("unknown proximity search backend") diff --git a/bindings/go/proximity_accelerator.go b/bindings/go/proximity_accelerator.go index 534aaf0b..62c7118c 100644 --- a/bindings/go/proximity_accelerator.go +++ b/bindings/go/proximity_accelerator.go @@ -14,6 +14,7 @@ type CompositeBaseKind int32 const ( CompositeBaseHNSW CompositeBaseKind = 1 CompositeBaseProductQuantized CompositeBaseKind = 2 + CompositeBaseTurboQuantized CompositeBaseKind = 3 ) type CompositeAcceleratorConfig struct { @@ -52,9 +53,11 @@ type FullRebuildReason struct { } type CompositeRebuildOptions struct { - HNSWLimits HNSWBuildLimits - PQWorkerThreads uint64 - PQLimits ProductQuantizationBuildLimits + HNSWLimits HNSWBuildLimits + PQWorkerThreads uint64 + PQLimits ProductQuantizationBuildLimits + TurboQuantWorkerThreads uint64 + TurboQuantLimits TurboQuantizationBuildLimits } type CompositeBuildOutcome struct { @@ -70,17 +73,20 @@ const ( CompositeNoAcceleratorRequired CompositeBuildOrRebuildKind = 2 CompositeHNSWRebuilt CompositeBuildOrRebuildKind = 3 CompositeProductQuantizedRebuilt CompositeBuildOrRebuildKind = 4 + CompositeTurboQuantizedRebuilt CompositeBuildOrRebuildKind = 5 ) type CompositeBuildOrRebuildOutcome struct { - Kind CompositeBuildOrRebuildKind - Composite *CompositeAccelerator - HNSW *HNSWIndex - PQ *ProductQuantizer - Reasons []FullRebuildReason - CompositeStats CompositeBuildStats - HNSWStats *HNSWBuildStats - PQStats *ProductQuantizationBuildStats + Kind CompositeBuildOrRebuildKind + Composite *CompositeAccelerator + HNSW *HNSWIndex + PQ *ProductQuantizer + TurboQuant *TurboQuantizer + Reasons []FullRebuildReason + CompositeStats CompositeBuildStats + HNSWStats *HNSWBuildStats + PQStats *ProductQuantizationBuildStats + TurboQuantStats *TurboQuantizationBuildStats } type CatalogAcceleratorKind int32 @@ -89,6 +95,7 @@ const ( CatalogHNSW CatalogAcceleratorKind = 1 CatalogProductQuantized CatalogAcceleratorKind = 2 CatalogComposite CatalogAcceleratorKind = 3 + CatalogTurboQuantized CatalogAcceleratorKind = 4 ) type AcceleratorCatalogEntry struct { @@ -209,6 +216,8 @@ func encodeCompositeRebuildOptions(value CompositeRebuildOptions) []byte { out.Write(encodeHNSWBuildLimits(value.HNSWLimits)) writeU64(&out, value.PQWorkerThreads) out.Write(encodeProductQuantizationBuildLimits(value.PQLimits)) + writeU64(&out, value.TurboQuantWorkerThreads) + out.Write(encodeTurboQuantizationBuildLimits(value.TurboQuantLimits)) return out.Bytes() } @@ -252,6 +261,27 @@ func decodeCompositeRebuildOptions(raw []byte) (CompositeRebuildOptions, error) if value.PQLimits.MaxWorkerThreads, err = d.readOptionalUint64(); err != nil { return value, err } + if value.TurboQuantWorkerThreads, err = d.readUint64(); err != nil { + return value, err + } + if value.TurboQuantLimits.MaxRecords, err = d.readOptionalUint64(); err != nil { + return value, err + } + if value.TurboQuantLimits.MaxInputBytes, err = d.readOptionalUint64(); err != nil { + return value, err + } + if value.TurboQuantLimits.MaxTemporaryBytes, err = d.readOptionalUint64(); err != nil { + return value, err + } + if value.TurboQuantLimits.MaxTransformOperations, err = d.readOptionalUint64(); err != nil { + return value, err + } + if value.TurboQuantLimits.MaxEncodedOutputBytes, err = d.readOptionalUint64(); err != nil { + return value, err + } + if value.TurboQuantLimits.MaxWorkerThreads, err = d.readOptionalUint64(); err != nil { + return value, err + } return value, d.done() } @@ -334,6 +364,15 @@ func decodeOptionalPQStats(d *byteDecoder) (*ProductQuantizationBuildStats, erro return &value, err } +func decodeOptionalTurboQuantStats(d *byteDecoder) (*TurboQuantizationBuildStats, error) { + present, err := d.readByte() + if err != nil || present == 0 { + return nil, err + } + value, err := decodeTurboQuantizationBuildStats(d) + return &value, err +} + func decodeCompositeRebuildOutcome(raw []byte) (CompositeBuildOrRebuildOutcome, error) { d := byteDecoder{data: raw} kind, err := d.readInt32() @@ -361,6 +400,19 @@ func decodeCompositeRebuildOutcome(raw []byte) (CompositeBuildOrRebuildOutcome, } return CompositeBuildOrRebuildOutcome{}, err } + turboquant, err := readOptionalObject(&d) + if err != nil { + if composite != 0 { + ffiFreeComposite(composite) + } + if hnsw != 0 { + ffiFreeHNSWIndex(hnsw) + } + if pq != 0 { + ffiFreeProductQuantizer(pq) + } + return CompositeBuildOrRebuildOutcome{}, err + } cleanup := func() { if composite != 0 { ffiFreeComposite(composite) @@ -371,6 +423,9 @@ func decodeCompositeRebuildOutcome(raw []byte) (CompositeBuildOrRebuildOutcome, if pq != 0 { ffiFreeProductQuantizer(pq) } + if turboquant != 0 { + ffiFreeTurboQuantizer(turboquant) + } } reasons, err := decodeFullRebuildReasons(&d) if err != nil { @@ -392,15 +447,23 @@ func decodeCompositeRebuildOutcome(raw []byte) (CompositeBuildOrRebuildOutcome, cleanup() return CompositeBuildOrRebuildOutcome{}, err } + turboquantStats, err := decodeOptionalTurboQuantStats(&d) + if err != nil { + cleanup() + return CompositeBuildOrRebuildOutcome{}, err + } if err := d.done(); err != nil { cleanup() return CompositeBuildOrRebuildOutcome{}, err } - if kind < 1 || kind > 4 { + if kind < 1 || kind > 5 { cleanup() return CompositeBuildOrRebuildOutcome{}, errors.New("unknown composite rebuild outcome") } - value := CompositeBuildOrRebuildOutcome{Kind: CompositeBuildOrRebuildKind(kind), Reasons: reasons, CompositeStats: stats, HNSWStats: hnswStats, PQStats: pqStats} + value := CompositeBuildOrRebuildOutcome{ + Kind: CompositeBuildOrRebuildKind(kind), Reasons: reasons, CompositeStats: stats, + HNSWStats: hnswStats, PQStats: pqStats, TurboQuantStats: turboquantStats, + } if composite != 0 { value.Composite = newCompositeAccelerator(composite) } @@ -410,6 +473,9 @@ func decodeCompositeRebuildOutcome(raw []byte) (CompositeBuildOrRebuildOutcome, if pq != 0 { value.PQ = newProductQuantizer(pq) } + if turboquant != 0 { + value.TurboQuant = newTurboQuantizer(turboquant) + } return value, nil } @@ -459,6 +525,32 @@ func (m *ProximityMap) BuildCompositePQ(baseMap *ProximityMap, base *ProductQuan return decodeCompositeBuildOutcome(raw) } +func (m *ProximityMap) BuildCompositeTurboQuant(baseMap *ProximityMap, base *TurboQuantizer, config CompositeAcceleratorConfig, limits CompositeBuildLimits) (CompositeBuildOutcome, error) { + current, _, currentUnlock, err := m.withHandle() + if err != nil { + return CompositeBuildOutcome{}, err + } + defer currentUnlock() + baseMapHandle, _, mapUnlock, err := baseMap.withHandle() + if err != nil { + return CompositeBuildOutcome{}, err + } + defer mapUnlock() + baseHandle, baseUnlock, err := base.withHandle() + if err != nil { + return CompositeBuildOutcome{}, err + } + defer baseUnlock() + raw, err := ffiProximityBuildCompositeTurboQuant( + current, baseMapHandle, baseHandle, encodeCompositeConfig(config), + encodeCompositeBuildLimits(limits), + ) + if err != nil { + return CompositeBuildOutcome{}, err + } + return decodeCompositeBuildOutcome(raw) +} + func (m *ProximityMap) BuildOrRebuildCompositeHNSW(baseMap *ProximityMap, base *HNSWIndex, config CompositeAcceleratorConfig, limits CompositeBuildLimits, rebuild CompositeRebuildOptions) (CompositeBuildOrRebuildOutcome, error) { current, _, currentUnlock, err := m.withHandle() if err != nil { @@ -505,6 +597,32 @@ func (m *ProximityMap) BuildOrRebuildCompositePQ(baseMap *ProximityMap, base *Pr return decodeCompositeRebuildOutcome(raw) } +func (m *ProximityMap) BuildOrRebuildCompositeTurboQuant(baseMap *ProximityMap, base *TurboQuantizer, config CompositeAcceleratorConfig, limits CompositeBuildLimits, rebuild CompositeRebuildOptions) (CompositeBuildOrRebuildOutcome, error) { + current, _, currentUnlock, err := m.withHandle() + if err != nil { + return CompositeBuildOrRebuildOutcome{}, err + } + defer currentUnlock() + baseMapHandle, _, mapUnlock, err := baseMap.withHandle() + if err != nil { + return CompositeBuildOrRebuildOutcome{}, err + } + defer mapUnlock() + baseHandle, baseUnlock, err := base.withHandle() + if err != nil { + return CompositeBuildOrRebuildOutcome{}, err + } + defer baseUnlock() + raw, err := ffiProximityRebuildCompositeTurboQuant( + current, baseMapHandle, baseHandle, encodeCompositeConfig(config), + encodeCompositeBuildLimits(limits), encodeCompositeRebuildOptions(rebuild), + ) + if err != nil { + return CompositeBuildOrRebuildOutcome{}, err + } + return decodeCompositeRebuildOutcome(raw) +} + type CompositeAccelerator struct { handle uint64 closed atomic.Bool @@ -809,13 +927,13 @@ func (a *AcceleratorCatalog) withHandle() (uint64, func(), error) { return a.handle, a.mu.RUnlock, nil } -func (m *ProximityMap) BuildAcceleratorCatalog(hnsw *HNSWIndex, pq *ProductQuantizer, composite *CompositeAccelerator) (*AcceleratorCatalog, error) { +func (m *ProximityMap) BuildAcceleratorCatalog(hnsw *HNSWIndex, pq *ProductQuantizer, turboquant *TurboQuantizer, composite *CompositeAccelerator) (*AcceleratorCatalog, error) { mapHandle, _, mapUnlock, err := m.withHandle() if err != nil { return nil, err } defer mapUnlock() - var hnswHandle, pqHandle, compositeHandle *uint64 + var hnswHandle, pqHandle, turboquantHandle, compositeHandle *uint64 var unlocks []func() defer func() { for i := len(unlocks) - 1; i >= 0; i-- { @@ -838,6 +956,14 @@ func (m *ProximityMap) BuildAcceleratorCatalog(hnsw *HNSWIndex, pq *ProductQuant pqHandle = &value unlocks = append(unlocks, unlock) } + if turboquant != nil { + value, unlock, err := turboquant.withHandle() + if err != nil { + return nil, err + } + turboquantHandle = &value + unlocks = append(unlocks, unlock) + } if composite != nil { value, unlock, err := composite.withHandle() if err != nil { @@ -846,7 +972,9 @@ func (m *ProximityMap) BuildAcceleratorCatalog(hnsw *HNSWIndex, pq *ProductQuant compositeHandle = &value unlocks = append(unlocks, unlock) } - handle, err := ffiProximityBuildCatalog(mapHandle, hnswHandle, pqHandle, compositeHandle) + handle, err := ffiProximityBuildCatalog( + mapHandle, hnswHandle, pqHandle, turboquantHandle, compositeHandle, + ) if err != nil { return nil, err } diff --git a/bindings/java/COOKBOOK.md b/bindings/java/COOKBOOK.md index 41d88624..0f6fe7ec 100644 --- a/bindings/java/COOKBOOK.md +++ b/bindings/java/COOKBOOK.md @@ -30,6 +30,51 @@ Application-style classes include `BatchBuild`, `LocalFirstState`, `VectorSidecar`, `ProvenanceValues`, `MaterializedView`, `FilesystemSnapshot`, and `DurableSqlite`. +## Build And Force A TurboQuant RAG Sidecar + +TurboQuant is a disposable routing sidecar. The proximity map remains +authoritative and every shortlisted record is reranked from its full-precision +vector. Keep selection explicit until qualification enables `Auto`. + +```java +import build.crab.prolly.javaapi.*; +import java.util.ArrayList; + +var records = new ArrayList(); +for (int index = 0; index < 32; index++) { + records.add(new ProximityRecord( + String.format("chunk/%02d", index).getBytes(), + new float[] {index, index % 3, 0, 1, 2, 3, 4, 5}, + String.format("document-%02d", index).getBytes())); +} + +try (Engine engine = Engine.memory(); + ProximityMap proximity = engine.buildProximity(8, records)) { + var built = proximity.buildTurboquant(TurboQuantizationConfig.defaults(), 2); + var request = SearchRequest.fixedBudget( + new float[] {0, 0, 0, 1, 2, 3, 4, 5}, + 3, + SearchRequest.SearchBudget.unlimited(), + SearchRequest.SearchFilter.all(), + SearchRequest.Kernel.AUTO_DETERMINISTIC, + SearchRequest.Backend.TURBO_QUANTIZED); + + byte[] manifest; + try (var index = built.index()) { + if (index.verify(proximity).encodedVectors() != records.size()) { + throw new IllegalStateException("incomplete TurboQuant sidecar"); + } + if (!index.search(proximity, request).backend().equals("turbo_quantized")) { + throw new IllegalStateException("unexpected backend"); + } + manifest = index.manifest(); + } + try (var reopened = proximity.loadTurboquant(manifest)) { + // The manifest CID is the stable handle for this immutable sidecar. + } +} +``` + ## Create A Durable Index ```java diff --git a/bindings/java/src/main/java/build/crab/prolly/javaapi/AcceleratorCatalogEntry.java b/bindings/java/src/main/java/build/crab/prolly/javaapi/AcceleratorCatalogEntry.java index ed981b16..6bfa5e2e 100644 --- a/bindings/java/src/main/java/build/crab/prolly/javaapi/AcceleratorCatalogEntry.java +++ b/bindings/java/src/main/java/build/crab/prolly/javaapi/AcceleratorCatalogEntry.java @@ -1,7 +1,7 @@ package build.crab.prolly.javaapi; public record AcceleratorCatalogEntry(Kind kind, byte[] configurationFingerprint, byte[] manifest) { - public enum Kind { HNSW, PRODUCT_QUANTIZED, COMPOSITE } + public enum Kind { HNSW, PRODUCT_QUANTIZED, TURBO_QUANTIZED, COMPOSITE } public AcceleratorCatalogEntry { configurationFingerprint = configurationFingerprint.clone(); manifest = manifest.clone(); diff --git a/bindings/java/src/main/java/build/crab/prolly/javaapi/CompositeBuildOrRebuildOutcome.java b/bindings/java/src/main/java/build/crab/prolly/javaapi/CompositeBuildOrRebuildOutcome.java index dec87f3c..28ed216b 100644 --- a/bindings/java/src/main/java/build/crab/prolly/javaapi/CompositeBuildOrRebuildOutcome.java +++ b/bindings/java/src/main/java/build/crab/prolly/javaapi/CompositeBuildOrRebuildOutcome.java @@ -7,9 +7,17 @@ public record CompositeBuildOrRebuildOutcome( CompositeAccelerator composite, HnswIndex hnsw, ProductQuantizer pq, + TurboQuantizer turboquant, List reasons, CompositeBuildStats compositeStats, HnswBuildStats hnswStats, - ProductQuantizationBuildStats pqStats) { - public enum Kind { COMPOSITE, NO_ACCELERATOR_REQUIRED, HNSW_REBUILT, PRODUCT_QUANTIZED_REBUILT } + ProductQuantizationBuildStats pqStats, + TurboQuantizationBuildStats turboquantStats) { + public enum Kind { + COMPOSITE, + NO_ACCELERATOR_REQUIRED, + HNSW_REBUILT, + PRODUCT_QUANTIZED_REBUILT, + TURBO_QUANTIZED_REBUILT + } } diff --git a/bindings/java/src/main/java/build/crab/prolly/javaapi/CompositeRebuildOptions.java b/bindings/java/src/main/java/build/crab/prolly/javaapi/CompositeRebuildOptions.java index 30208d69..8da98ca5 100644 --- a/bindings/java/src/main/java/build/crab/prolly/javaapi/CompositeRebuildOptions.java +++ b/bindings/java/src/main/java/build/crab/prolly/javaapi/CompositeRebuildOptions.java @@ -6,7 +6,9 @@ public record CompositeRebuildOptions( HnswBuildLimits hnswLimits, long pqWorkerThreads, - ProductQuantizationBuildLimits pqLimits) { + ProductQuantizationBuildLimits pqLimits, + long turboquantWorkerThreads, + TurboQuantizationBuildLimits turboquantLimits) { public static CompositeRebuildOptions defaults() { var value = JavaPortableBridge.defaultCompositeRebuildOptions(); return new CompositeRebuildOptions( @@ -16,10 +18,13 @@ public static CompositeRebuildOptions defaults() { value.getHnswLimits().getWorkerThreads(), value.getHnswLimits().getMaxEncodedGraphBytes()), value.getPqWorkerThreads(), - ProductQuantizationBuildLimits.fromNative(value.getPqLimits())); + ProductQuantizationBuildLimits.fromNative(value.getPqLimits()), + value.getTurboquantWorkerThreads(), + TurboQuantizationBuildLimits.fromNative(value.getTurboquantLimits())); } JavaCompositeRebuildOptions toNative() { return new JavaCompositeRebuildOptions( - hnswLimits.toNative(), pqWorkerThreads, pqLimits.toNative()); + hnswLimits.toNative(), pqWorkerThreads, pqLimits.toNative(), + turboquantWorkerThreads, turboquantLimits.toNative()); } } diff --git a/bindings/java/src/main/java/build/crab/prolly/javaapi/ProximityMap.java b/bindings/java/src/main/java/build/crab/prolly/javaapi/ProximityMap.java index edf632d6..90321cc5 100644 --- a/bindings/java/src/main/java/build/crab/prolly/javaapi/ProximityMap.java +++ b/bindings/java/src/main/java/build/crab/prolly/javaapi/ProximityMap.java @@ -83,6 +83,28 @@ public ProductQuantizationBuildResult buildPq( public ProductQuantizer loadPq(byte[] manifest) { return new ProductQuantizer(JavaPortableBridge.loadPq(open(), manifest.clone())); } + public TurboQuantizationBuildResult buildTurboquant() { + return buildTurboquant( + TurboQuantizationConfig.defaults(), 1, TurboQuantizationBuildLimits.defaults()); + } + public TurboQuantizationBuildResult buildTurboquant( + TurboQuantizationConfig config, long workerThreads) { + return buildTurboquant(config, workerThreads, TurboQuantizationBuildLimits.defaults()); + } + public TurboQuantizationBuildResult buildTurboquant( + TurboQuantizationConfig config, + long workerThreads, + TurboQuantizationBuildLimits limits) { + if (workerThreads <= 0) throw new IllegalArgumentException("workerThreads must be positive"); + var result = JavaPortableBridge.buildTurboquant( + open(), config.toNative(), workerThreads, limits.toNative()); + return new TurboQuantizationBuildResult( + new TurboQuantizer(result.getIndex()), + TurboQuantizationBuildStats.fromNative(result.getStats())); + } + public TurboQuantizer loadTurboquant(byte[] manifest) { + return new TurboQuantizer(JavaPortableBridge.loadTurboquant(open(), manifest.clone())); + } public CompositeBuildOutcome buildCompositeHnsw(ProximityMap baseMap, HnswIndex base) { return buildCompositeHnsw( baseMap, base, CompositeAcceleratorConfig.defaults(), CompositeBuildLimits.defaults()); @@ -107,6 +129,20 @@ public CompositeBuildOutcome buildCompositePq( return compositeOutcome(JavaPortableBridge.buildCompositePq( open(), baseMap.open(), base.open(), config.toNative(), limits.toNative())); } + public CompositeBuildOutcome buildCompositeTurboquant( + ProximityMap baseMap, TurboQuantizer base) { + return buildCompositeTurboquant( + baseMap, base, CompositeAcceleratorConfig.defaults(), + CompositeBuildLimits.defaults()); + } + public CompositeBuildOutcome buildCompositeTurboquant( + ProximityMap baseMap, + TurboQuantizer base, + CompositeAcceleratorConfig config, + CompositeBuildLimits limits) { + return compositeOutcome(JavaPortableBridge.buildCompositeTurboquant( + open(), baseMap.open(), base.open(), config.toNative(), limits.toNative())); + } public CompositeBuildOrRebuildOutcome buildOrRebuildCompositeHnsw( ProximityMap baseMap, HnswIndex base, @@ -125,13 +161,30 @@ public CompositeBuildOrRebuildOutcome buildOrRebuildCompositePq( CompositeBuildLimits.defaults().toNative(), CompositeRebuildOptions.defaults().toNative())); } + public CompositeBuildOrRebuildOutcome buildOrRebuildCompositeTurboquant( + ProximityMap baseMap, + TurboQuantizer base, + CompositeAcceleratorConfig config) { + return compositeRebuildOutcome(JavaPortableBridge.buildOrRebuildCompositeTurboquant( + open(), baseMap.open(), base.open(), config.toNative(), + CompositeBuildLimits.defaults().toNative(), + CompositeRebuildOptions.defaults().toNative())); + } public CompositeAccelerator loadComposite(byte[] manifest) { return new CompositeAccelerator(JavaPortableBridge.loadComposite(open(), manifest.clone())); } public AcceleratorCatalog buildAcceleratorCatalog( HnswIndex hnsw, ProductQuantizer pq, CompositeAccelerator composite) { + return buildAcceleratorCatalog(hnsw, pq, null, composite); + } + public AcceleratorCatalog buildAcceleratorCatalog( + HnswIndex hnsw, + ProductQuantizer pq, + TurboQuantizer turboquant, + CompositeAccelerator composite) { return new AcceleratorCatalog(JavaPortableBridge.buildAcceleratorCatalog( open(), hnsw == null ? null : hnsw.open(), pq == null ? null : pq.open(), + turboquant == null ? null : turboquant.open(), composite == null ? null : composite.open())); } public AcceleratorCatalog loadAcceleratorCatalog(byte[] manifest) { @@ -152,11 +205,15 @@ private static CompositeBuildOrRebuildOutcome compositeRebuildOutcome( value.getComposite() == null ? null : new CompositeAccelerator(value.getComposite()), value.getHnsw() == null ? null : new HnswIndex(value.getHnsw()), value.getPq() == null ? null : new ProductQuantizer(value.getPq()), + value.getTurboquant() == null ? null : new TurboQuantizer(value.getTurboquant()), value.getReasons().stream().map(FullRebuildReason::fromNative).toList(), CompositeBuildStats.fromNative(value.getCompositeStats()), value.getHnswStats() == null ? null : HnswBuildStats.fromNative(value.getHnswStats()), value.getPqStats() == null - ? null : ProductQuantizationBuildStats.fromNative(value.getPqStats())); + ? null : ProductQuantizationBuildStats.fromNative(value.getPqStats()), + value.getTurboquantStats() == null + ? null : TurboQuantizationBuildStats.fromNative( + value.getTurboquantStats())); } public ProximityReadSession read() { return new ProximityReadSession(this, open().read()); } public SearchResult search(SearchRequest request) { diff --git a/bindings/java/src/main/java/build/crab/prolly/javaapi/ProximitySearchRuntimePolicy.java b/bindings/java/src/main/java/build/crab/prolly/javaapi/ProximitySearchRuntimePolicy.java index 4aaff33c..711cea45 100644 --- a/bindings/java/src/main/java/build/crab/prolly/javaapi/ProximitySearchRuntimePolicy.java +++ b/bindings/java/src/main/java/build/crab/prolly/javaapi/ProximitySearchRuntimePolicy.java @@ -7,10 +7,11 @@ public record ProximitySearchRuntimePolicy( long maxBytes, long authoritativeMaxBytes, long hnswMaxBytes, - long pqMaxBytes) { + long pqMaxBytes, + long turboquantMaxBytes) { public ProximitySearchRuntimePolicy { if (maxEntries <= 0 || maxBytes <= 0 || authoritativeMaxBytes < 0 - || hnswMaxBytes < 0 || pqMaxBytes < 0) { + || hnswMaxBytes < 0 || pqMaxBytes < 0 || turboquantMaxBytes < 0) { throw new IllegalArgumentException("search runtime limits must be non-negative and totals positive"); } } @@ -26,11 +27,13 @@ static ProximitySearchRuntimePolicy fromNative( value.getMaxBytes(), value.getAuthoritativeMaxBytes(), value.getHnswMaxBytes(), - value.getPqMaxBytes()); + value.getPqMaxBytes(), + value.getTurboquantMaxBytes()); } build.crab.prolly.api.JavaProximitySearchRuntimePolicy toNative() { return new build.crab.prolly.api.JavaProximitySearchRuntimePolicy( - maxEntries, maxBytes, authoritativeMaxBytes, hnswMaxBytes, pqMaxBytes); + maxEntries, maxBytes, authoritativeMaxBytes, hnswMaxBytes, pqMaxBytes, + turboquantMaxBytes); } } diff --git a/bindings/java/src/main/java/build/crab/prolly/javaapi/SearchRequest.java b/bindings/java/src/main/java/build/crab/prolly/javaapi/SearchRequest.java index 19f51cbd..008885b0 100644 --- a/bindings/java/src/main/java/build/crab/prolly/javaapi/SearchRequest.java +++ b/bindings/java/src/main/java/build/crab/prolly/javaapi/SearchRequest.java @@ -16,13 +16,14 @@ public record SearchRequest( Kernel kernel, Backend backend, Integer hnswEfSearch, - Integer pqRerankMultiplier) { + Integer pqRerankMultiplier, + Integer turboquantRerankMultiplier) { public enum Policy { EXACT, FIXED_BUDGET, ADAPTIVE } public enum AdaptiveQuality { FAST, BALANCED, HIGH_RECALL } public enum FilterKind { ALL, KEY_RANGE, PREFIX, ELIGIBLE_KEYS } public enum Kernel { SCALAR_DETERMINISTIC, SIMD_DETERMINISTIC, AUTO_DETERMINISTIC } - public enum Backend { NATIVE, PRODUCT_QUANTIZED, HNSW, COMPOSITE, AUTO } + public enum Backend { NATIVE, PRODUCT_QUANTIZED, HNSW, TURBO_QUANTIZED, COMPOSITE, AUTO } public record SearchBudget( Long maxNodes, @@ -97,6 +98,11 @@ private static List copyKeys(List keys) { if (pqRerankMultiplier != null && (pqRerankMultiplier < 0 || pqRerankMultiplier > 65_535)) { throw new IllegalArgumentException("pqRerankMultiplier must fit an unsigned 16-bit value"); } + if (turboquantRerankMultiplier != null + && (turboquantRerankMultiplier < 0 || turboquantRerankMultiplier > 65_535)) { + throw new IllegalArgumentException( + "turboquantRerankMultiplier must fit an unsigned 16-bit value"); + } } @Override public float[] vector() { return vector.clone(); } @@ -104,7 +110,7 @@ private static List copyKeys(List keys) { public static SearchRequest exact(float[] vector, int topK) { return new SearchRequest( vector, topK, Policy.EXACT, null, SearchBudget.unlimited(), SearchFilter.all(), - Kernel.AUTO_DETERMINISTIC, Backend.NATIVE, null, null); + Kernel.AUTO_DETERMINISTIC, Backend.NATIVE, null, null, null); } public static SearchRequest fixedBudget( @@ -115,7 +121,8 @@ public static SearchRequest fixedBudget( Kernel kernel, Backend backend) { return new SearchRequest( - vector, topK, Policy.FIXED_BUDGET, null, budget, filter, kernel, backend, null, null); + vector, topK, Policy.FIXED_BUDGET, null, budget, filter, kernel, backend, + null, null, null); } public static SearchRequest adaptive( @@ -127,13 +134,14 @@ public static SearchRequest adaptive( Kernel kernel, Backend backend) { return new SearchRequest( - vector, topK, Policy.ADAPTIVE, quality, budget, filter, kernel, backend, null, null); + vector, topK, Policy.ADAPTIVE, quality, budget, filter, kernel, backend, + null, null, null); } SearchRequest ownedCopy() { return new SearchRequest( vector, topK, policy, adaptiveQuality, budget, filter, kernel, backend, - hnswEfSearch, pqRerankMultiplier); + hnswEfSearch, pqRerankMultiplier, turboquantRerankMultiplier); } JavaProximitySearchRequest toNative() { @@ -156,6 +164,7 @@ JavaProximitySearchRequest toNative() { kernel.name(), backend.name(), hnswEfSearch, - pqRerankMultiplier); + pqRerankMultiplier, + turboquantRerankMultiplier); } } diff --git a/bindings/java/src/main/java/build/crab/prolly/javaapi/TurboQuantizationBuildLimits.java b/bindings/java/src/main/java/build/crab/prolly/javaapi/TurboQuantizationBuildLimits.java new file mode 100644 index 00000000..d5c4d255 --- /dev/null +++ b/bindings/java/src/main/java/build/crab/prolly/javaapi/TurboQuantizationBuildLimits.java @@ -0,0 +1,44 @@ +package build.crab.prolly.javaapi; + +import build.crab.prolly.api.JavaPortableBridge; +import build.crab.prolly.api.JavaTurboQuantizationBuildLimits; + +public record TurboQuantizationBuildLimits( + Long maxRecords, + Long maxInputBytes, + Long maxTemporaryBytes, + Long maxTransformOperations, + Long maxEncodedOutputBytes, + Long maxWorkerThreads) { + public TurboQuantizationBuildLimits { + requireOptional(maxRecords, "maxRecords"); + requireOptional(maxInputBytes, "maxInputBytes"); + requireOptional(maxTemporaryBytes, "maxTemporaryBytes"); + requireOptional(maxTransformOperations, "maxTransformOperations"); + requireOptional(maxEncodedOutputBytes, "maxEncodedOutputBytes"); + requireOptional(maxWorkerThreads, "maxWorkerThreads"); + } + + public static TurboQuantizationBuildLimits defaults() { + return fromNative(JavaPortableBridge.defaultTurboquantBuildLimits()); + } + + static TurboQuantizationBuildLimits fromNative(JavaTurboQuantizationBuildLimits value) { + return new TurboQuantizationBuildLimits( + value.getMaxRecords(), value.getMaxInputBytes(), value.getMaxTemporaryBytes(), + value.getMaxTransformOperations(), value.getMaxEncodedOutputBytes(), + value.getMaxWorkerThreads()); + } + + JavaTurboQuantizationBuildLimits toNative() { + return new JavaTurboQuantizationBuildLimits( + maxRecords, maxInputBytes, maxTemporaryBytes, maxTransformOperations, + maxEncodedOutputBytes, maxWorkerThreads); + } + + private static void requireOptional(Long value, String name) { + if (value != null && value < 0) { + throw new IllegalArgumentException(name + " must be non-negative"); + } + } +} diff --git a/bindings/java/src/main/java/build/crab/prolly/javaapi/TurboQuantizationBuildResult.java b/bindings/java/src/main/java/build/crab/prolly/javaapi/TurboQuantizationBuildResult.java new file mode 100644 index 00000000..2befeb80 --- /dev/null +++ b/bindings/java/src/main/java/build/crab/prolly/javaapi/TurboQuantizationBuildResult.java @@ -0,0 +1,5 @@ +package build.crab.prolly.javaapi; + +public record TurboQuantizationBuildResult( + TurboQuantizer index, + TurboQuantizationBuildStats stats) {} diff --git a/bindings/java/src/main/java/build/crab/prolly/javaapi/TurboQuantizationBuildStats.java b/bindings/java/src/main/java/build/crab/prolly/javaapi/TurboQuantizationBuildStats.java new file mode 100644 index 00000000..0e3fc23b --- /dev/null +++ b/bindings/java/src/main/java/build/crab/prolly/javaapi/TurboQuantizationBuildStats.java @@ -0,0 +1,19 @@ +package build.crab.prolly.javaapi; + +import build.crab.prolly.api.JavaTurboQuantizationBuildStats; + +public record TurboQuantizationBuildStats( + long encodedVectors, + long zeroVectors, + long transformedComponents, + long butterflyOperations, + long inputBytes, + long encodedOutputBytes, + long peakTemporaryBytes) { + static TurboQuantizationBuildStats fromNative(JavaTurboQuantizationBuildStats value) { + return new TurboQuantizationBuildStats( + value.getEncodedVectors(), value.getZeroVectors(), value.getTransformedComponents(), + value.getButterflyOperations(), value.getInputBytes(), + value.getEncodedOutputBytes(), value.getPeakTemporaryBytes()); + } +} diff --git a/bindings/java/src/main/java/build/crab/prolly/javaapi/TurboQuantizationConfig.java b/bindings/java/src/main/java/build/crab/prolly/javaapi/TurboQuantizationConfig.java new file mode 100644 index 00000000..a43b8409 --- /dev/null +++ b/bindings/java/src/main/java/build/crab/prolly/javaapi/TurboQuantizationConfig.java @@ -0,0 +1,29 @@ +package build.crab.prolly.javaapi; + +import build.crab.prolly.api.JavaPortableBridge; +import build.crab.prolly.api.JavaTurboQuantizationConfig; + +public record TurboQuantizationConfig(int bitWidth, long rerankMultiplier, long seed) { + public TurboQuantizationConfig { + if (bitWidth < 0 || bitWidth > 255) { + throw new IllegalArgumentException("bitWidth must fit an unsigned 8-bit value"); + } + if (rerankMultiplier < 0 || rerankMultiplier > 0xffff_ffffL) { + throw new IllegalArgumentException( + "rerankMultiplier must fit an unsigned 32-bit value"); + } + } + + public static TurboQuantizationConfig defaults() { + return fromNative(JavaPortableBridge.defaultTurboquantConfig()); + } + + static TurboQuantizationConfig fromNative(JavaTurboQuantizationConfig value) { + return new TurboQuantizationConfig( + value.getBitWidth(), value.getRerankMultiplier(), value.getSeed()); + } + + JavaTurboQuantizationConfig toNative() { + return new JavaTurboQuantizationConfig(bitWidth, rerankMultiplier, seed); + } +} diff --git a/bindings/java/src/main/java/build/crab/prolly/javaapi/TurboQuantizationQuality.java b/bindings/java/src/main/java/build/crab/prolly/javaapi/TurboQuantizationQuality.java new file mode 100644 index 00000000..c4f5fea2 --- /dev/null +++ b/bindings/java/src/main/java/build/crab/prolly/javaapi/TurboQuantizationQuality.java @@ -0,0 +1,10 @@ +package build.crab.prolly.javaapi; + +import build.crab.prolly.api.JavaTurboQuantizationQuality; + +public record TurboQuantizationQuality(double meanSquaredError, double maximumSquaredError) { + static TurboQuantizationQuality fromNative(JavaTurboQuantizationQuality value) { + return new TurboQuantizationQuality( + value.getMeanSquaredError(), value.getMaximumSquaredError()); + } +} diff --git a/bindings/java/src/main/java/build/crab/prolly/javaapi/TurboQuantizationVerification.java b/bindings/java/src/main/java/build/crab/prolly/javaapi/TurboQuantizationVerification.java new file mode 100644 index 00000000..0473198b --- /dev/null +++ b/bindings/java/src/main/java/build/crab/prolly/javaapi/TurboQuantizationVerification.java @@ -0,0 +1,14 @@ +package build.crab.prolly.javaapi; + +import build.crab.prolly.api.JavaTurboQuantizationVerification; + +public record TurboQuantizationVerification( + long encodedVectors, + long zeroVectors, + TurboQuantizationQuality quality) { + static TurboQuantizationVerification fromNative(JavaTurboQuantizationVerification value) { + return new TurboQuantizationVerification( + value.getEncodedVectors(), value.getZeroVectors(), + TurboQuantizationQuality.fromNative(value.getQuality())); + } +} diff --git a/bindings/java/src/main/java/build/crab/prolly/javaapi/TurboQuantizer.java b/bindings/java/src/main/java/build/crab/prolly/javaapi/TurboQuantizer.java new file mode 100644 index 00000000..1fe71efb --- /dev/null +++ b/bindings/java/src/main/java/build/crab/prolly/javaapi/TurboQuantizer.java @@ -0,0 +1,71 @@ +package build.crab.prolly.javaapi; + +import build.crab.prolly.api.JavaPortableBridge; +import java.util.concurrent.CompletableFuture; + +public final class TurboQuantizer implements AutoCloseable { + private build.crab.prolly.api.TurboQuantizer nativeIndex; + + TurboQuantizer(build.crab.prolly.api.TurboQuantizer nativeIndex) { + this.nativeIndex = nativeIndex; + } + + build.crab.prolly.api.TurboQuantizer open() { + if (nativeIndex == null) throw new IllegalStateException("TurboQuantizer is closed"); + return nativeIndex; + } + + public byte[] manifest() { return open().getManifest().clone(); } + public byte[] sourceDescriptor() { return open().getSourceDescriptor().clone(); } + public TurboQuantizationConfig config() { + return TurboQuantizationConfig.fromNative(JavaPortableBridge.turboquantConfig(open())); + } + public TurboQuantizationQuality quality() { + return TurboQuantizationQuality.fromNative(JavaPortableBridge.turboquantQuality(open())); + } + public TurboQuantizationVerification verify(ProximityMap map) { + return TurboQuantizationVerification.fromNative( + JavaPortableBridge.turboquantVerify(open(), map.open())); + } + public SearchResult search(ProximityMap map, SearchRequest request) { + return ProximityMap.fromNative( + JavaPortableBridge.turboquantSearch(open(), map.open(), request.toNative())); + } + public SearchResult searchWithRuntime( + ProximityMap map, SearchRequest request, ProximitySearchRuntime runtime) { + return ProximityMap.fromNative(JavaPortableBridge.turboquantSearchWithRuntime( + open(), map.open(), request.toNative(), runtime.open())); + } + public SearchResult searchCancellable( + ProximityMap map, + SearchRequest request, + ProximitySearchRuntime runtime, + ProximityCancellationToken cancellation) { + return ProximityMap.fromNative(JavaPortableBridge.turboquantSearchCancellable( + open(), map.open(), request.toNative(), runtime == null ? null : runtime.open(), + cancellation.open())); + } + public CompletableFuture searchAsync(ProximityMap map, SearchRequest request) { + return searchAsync(map, request, null, null); + } + public CompletableFuture searchAsync( + ProximityMap map, + SearchRequest request, + ProximitySearchRuntime runtime, + ProximityCancellationToken cancellation) { + var owned = request.ownedCopy(); + return ProximityMap.cancellableFuture( + cancellation, token -> searchCancellable(map, owned, runtime, token)); + } + public ProximitySearchProof proveSearch(ProximityMap map, SearchRequest request) { + return new ProximitySearchProof( + JavaPortableBridge.turboquantProveSearch(open(), map.open(), request.toNative())); + } + + @Override public void close() { + if (nativeIndex != null) { + nativeIndex.close(); + nativeIndex = null; + } + } +} diff --git a/bindings/java/src/test/java/build/crab/prolly/PortableParityTest.java b/bindings/java/src/test/java/build/crab/prolly/PortableParityTest.java index 177f685f..2ac9430e 100644 --- a/bindings/java/src/test/java/build/crab/prolly/PortableParityTest.java +++ b/bindings/java/src/test/java/build/crab/prolly/PortableParityTest.java @@ -7,6 +7,7 @@ import static org.junit.jupiter.api.Assertions.assertThrows; import static org.junit.jupiter.api.Assertions.assertTrue; +import build.crab.prolly.javaapi.AcceleratorCatalogEntry; import build.crab.prolly.javaapi.Engine; import build.crab.prolly.javaapi.CompositeAcceleratorConfig; import build.crab.prolly.javaapi.HnswBuildLimits; @@ -25,6 +26,7 @@ import build.crab.prolly.javaapi.ProximityCancellationToken; import build.crab.prolly.javaapi.ProximityMutation; import build.crab.prolly.javaapi.ProductQuantizationConfig; +import build.crab.prolly.javaapi.TurboQuantizationConfig; import build.crab.prolly.javaapi.Proofs; import build.crab.prolly.javaapi.SearchRequest; import build.crab.prolly.javaapi.ScopedBytes; @@ -204,6 +206,84 @@ void productQuantizerLifecycleIsPortableAndBounded() throws Exception { } } + @Test + void turboQuantizerLifecycleIsPortableAndVerified() throws Exception { + Prolly.useLocalDebugLibrary(); + var records = new ArrayList(); + for (int index = 0; index < 16; index++) { + records.add(new ProximityRecord( + bytes(String.format("turbo-%02d", index)), + new float[] {index, index % 3, 0, 1, 0, 0, 0, 0}, + bytes(String.format("value-%02d", index)))); + } + try (Engine engine = Engine.memory(); var proximity = engine.buildProximity(8, records)) { + var config = new TurboQuantizationConfig(4, 4, -1L); + var built = proximity.buildTurboquant(config, 2); + assertEquals(16L, built.stats().encodedVectors()); + var request = SearchRequest.fixedBudget( + new float[] {0, 0, 0, 1, 0, 0, 0, 0}, + 3, + SearchRequest.SearchBudget.unlimited(), + SearchRequest.SearchFilter.all(), + SearchRequest.Kernel.AUTO_DETERMINISTIC, + SearchRequest.Backend.TURBO_QUANTIZED); + byte[] manifest; + try (var index = built.index()) { + assertEquals(config, index.config()); + assertArrayEquals(proximity.descriptor(), index.sourceDescriptor()); + assertEquals(16L, index.verify(proximity).encodedVectors()); + var result = index.search(proximity, request); + assertEquals("turbo_quantized", result.backend()); + assertArrayEquals(bytes("turbo-00"), result.neighbors().get(0).key()); + assertTrue(result.stats().distanceEvaluations() > 0); + try (var cancellation = new ProximityCancellationToken()) { + cancellation.cancel(); + var cancelled = index.searchCancellable( + proximity, request, null, cancellation); + assertEquals("cancelled", cancelled.completion()); + assertTrue(cancelled.neighbors().isEmpty()); + } + manifest = index.manifest(); + try (var proof = index.proveSearch(proximity, request)) { + assertEquals( + SearchBackendRecord.TURBO_QUANTIZED, + proof.verify(proximity.descriptor()).getResult().getBackend()); + } + try (var catalog = proximity.buildAcceleratorCatalog(null, null, index, null)) { + assertEquals(1, catalog.entries().size()); + assertEquals( + AcceleratorCatalogEntry.Kind.TURBO_QUANTIZED, + catalog.entries().get(0).kind()); + assertEquals("turbo_quantized", catalog.search(proximity, request).backend()); + } + var mutation = proximity.mutate(List.of(ProximityMutation.upsert( + bytes("turbo-00"), + new float[] {0.25f, 0, 0, 1, 0, 0, 0, 0}, + bytes("updated")))); + try (var current = mutation.map()) { + var compositeBuilt = current.buildCompositeTurboquant(proximity, index); + assertNotNull(compositeBuilt.accelerator()); + try (var composite = compositeBuilt.accelerator()) { + assertEquals("TURBO_QUANTIZED", composite.baseKind()); + var compositeRequest = SearchRequest.fixedBudget( + new float[] {0, 0, 0, 1, 0, 0, 0, 0}, + 3, + SearchRequest.SearchBudget.unlimited(), + SearchRequest.SearchFilter.all(), + SearchRequest.Kernel.AUTO_DETERMINISTIC, + SearchRequest.Backend.COMPOSITE); + assertEquals( + "composite", + composite.search(current, compositeRequest).backend()); + } + } + } + try (var loaded = proximity.loadTurboquant(manifest)) { + assertArrayEquals(manifest, loaded.manifest()); + } + } + } + @Test void hnswAcceleratorLifecycleIsPortable() throws Exception { Prolly.useLocalDebugLibrary(); diff --git a/bindings/kotlin/COOKBOOK.md b/bindings/kotlin/COOKBOOK.md index 62c67d97..25a76877 100644 --- a/bindings/kotlin/COOKBOOK.md +++ b/bindings/kotlin/COOKBOOK.md @@ -30,6 +30,41 @@ Application-style files include `BatchBuild.kt`, `LocalFirstState.kt`, `VectorSidecar.kt`, `ProvenanceValues.kt`, `MaterializedView.kt`, `FilesystemSnapshot.kt`, and `DurableSqlite.kt`. +## Build And Force A TurboQuant RAG Sidecar + +TurboQuant is a disposable routing sidecar. The proximity map remains +authoritative and every retained candidate is reranked from its full-precision +vector. Keep selection explicit until qualification enables `Auto`. + +```kotlin +Engine.memory().use { engine -> + val records = (0 until 32).map { index -> + ProximityRecord( + "chunk/%02d".format(index).toByteArray(), + listOf(index.toFloat(), (index % 3).toFloat(), 0f, 1f, 2f, 3f, 4f, 5f), + "document-%02d".format(index).toByteArray(), + ) + } + engine.buildProximity(8u, records).use { proximity -> + val built = proximity.buildTurboquant(workerThreads = 2uL) + val request = exactProximitySearchRequest( + listOf(0f, 0f, 0f, 1f, 2f, 3f, 4f, 5f), 3uL, + ).copy( + policy = SearchPolicyKind.FIXED_BUDGET, + backend = SearchBackendRecord.TURBO_QUANTIZED, + ) + built.index.use { index -> + check(index.verify(proximity).encodedVectors == 32uL) + check(index.search(proximity, request).backend == SearchBackendRecord.TURBO_QUANTIZED) + val manifest = index.manifest + proximity.loadTurboquant(manifest).use { reopened -> + check(reopened.manifest.contentEquals(manifest)) + } + } + } +} +``` + ## Create A Durable Index ```kotlin diff --git a/bindings/kotlin/src/main/kotlin/build/crab/prolly/api/JavaPortableBridge.kt b/bindings/kotlin/src/main/kotlin/build/crab/prolly/api/JavaPortableBridge.kt index defd7591..89f7b8b9 100644 --- a/bindings/kotlin/src/main/kotlin/build/crab/prolly/api/JavaPortableBridge.kt +++ b/bindings/kotlin/src/main/kotlin/build/crab/prolly/api/JavaPortableBridge.kt @@ -58,6 +58,11 @@ import build.crab.prolly.ProductQuantizationBuildLimitsRecord import build.crab.prolly.ProductQuantizationBuildStatsRecord import build.crab.prolly.ProductQuantizationConfigRecord import build.crab.prolly.ProductQuantizationQualityRecord +import build.crab.prolly.TurboQuantizationBuildLimitsRecord +import build.crab.prolly.TurboQuantizationBuildStatsRecord +import build.crab.prolly.TurboQuantizationConfigRecord +import build.crab.prolly.TurboQuantizationQualityRecord +import build.crab.prolly.TurboQuantizationVerificationRecord import build.crab.prolly.QueryKernelRecord import build.crab.prolly.RangeCursorRecord import build.crab.prolly.RangePageRecord @@ -78,6 +83,8 @@ import build.crab.prolly.defaultHnswBuildLimits as nativeDefaultHnswBuildLimits import build.crab.prolly.defaultHnswConfig as nativeDefaultHnswConfig import build.crab.prolly.defaultPqBuildLimits as nativeDefaultPqBuildLimits import build.crab.prolly.defaultPqConfig as nativeDefaultPqConfig +import build.crab.prolly.defaultTurboquantBuildLimits as nativeDefaultTurboquantBuildLimits +import build.crab.prolly.defaultTurboquantConfig as nativeDefaultTurboquantConfig import build.crab.prolly.defaultCompositeAcceleratorConfig as nativeDefaultCompositeAcceleratorConfig import build.crab.prolly.defaultCompositeBuildLimits as nativeDefaultCompositeBuildLimits import build.crab.prolly.defaultCompositeRebuildOptions as nativeDefaultCompositeRebuildOptions @@ -143,6 +150,7 @@ data class JavaProximitySearchRequest( val backend: String, val hnswEfSearch: Int?, val pqRerankMultiplier: Int?, + val turboquantRerankMultiplier: Int?, ) { fun toNative() = ProximitySearchRequestRecord( query = query.toList(), @@ -166,6 +174,7 @@ data class JavaProximitySearchRequest( backend = SearchBackendRecord.valueOf(backend), hnswEfSearch = hnswEfSearch?.toUInt(), pqRerankMultiplier = pqRerankMultiplier?.toUShort(), + turboquantRerankMultiplier = turboquantRerankMultiplier?.toUShort(), ) } @@ -323,6 +332,81 @@ private fun ProductQuantizationQualityRecord.toJava() = JavaProductQuantizationQ meanSquaredError, maximumSquaredError, ) +data class JavaTurboQuantizationConfig( + val bitWidth: Int, + val rerankMultiplier: Long, + val seed: Long, +) { + fun toNative() = TurboQuantizationConfigRecord( + bitWidth.toUByte(), rerankMultiplier.toUInt(), seed.toULong(), + ) +} + +data class JavaTurboQuantizationBuildLimits( + val maxRecords: Long?, + val maxInputBytes: Long?, + val maxTemporaryBytes: Long?, + val maxTransformOperations: Long?, + val maxEncodedOutputBytes: Long?, + val maxWorkerThreads: Long?, +) { + fun toNative() = TurboQuantizationBuildLimitsRecord( + maxRecords?.toULong(), maxInputBytes?.toULong(), maxTemporaryBytes?.toULong(), + maxTransformOperations?.toULong(), maxEncodedOutputBytes?.toULong(), + maxWorkerThreads?.toULong(), + ) +} + +data class JavaTurboQuantizationBuildStats( + val encodedVectors: Long, + val zeroVectors: Long, + val transformedComponents: Long, + val butterflyOperations: Long, + val inputBytes: Long, + val encodedOutputBytes: Long, + val peakTemporaryBytes: Long, +) + +data class JavaTurboQuantizationQuality( + val meanSquaredError: Double, + val maximumSquaredError: Double, +) + +data class JavaTurboQuantizationVerification( + val encodedVectors: Long, + val zeroVectors: Long, + val quality: JavaTurboQuantizationQuality, +) + +data class JavaTurboQuantizationBuildResult( + val index: TurboQuantizer, + val stats: JavaTurboQuantizationBuildStats, +) + +private fun TurboQuantizationConfigRecord.toJava() = JavaTurboQuantizationConfig( + bitWidth.toInt(), rerankMultiplier.toLong(), seed.toLong(), +) + +private fun TurboQuantizationBuildLimitsRecord.toJava() = JavaTurboQuantizationBuildLimits( + maxRecords?.toLong(), maxInputBytes?.toLong(), maxTemporaryBytes?.toLong(), + maxTransformOperations?.toLong(), maxEncodedOutputBytes?.toLong(), + maxWorkerThreads?.toLong(), +) + +private fun TurboQuantizationBuildStatsRecord.toJava() = JavaTurboQuantizationBuildStats( + encodedVectors.toLong(), zeroVectors.toLong(), transformedComponents.toLong(), + butterflyOperations.toLong(), inputBytes.toLong(), encodedOutputBytes.toLong(), + peakTemporaryBytes.toLong(), +) + +private fun TurboQuantizationQualityRecord.toJava() = JavaTurboQuantizationQuality( + meanSquaredError, maximumSquaredError, +) + +private fun TurboQuantizationVerificationRecord.toJava() = JavaTurboQuantizationVerification( + encodedVectors.toLong(), zeroVectors.toLong(), quality.toJava(), +) + data class JavaCompositeAcceleratorConfig( val maxDeltaRecords: Long, val maxShadowRecords: Long, @@ -367,9 +451,12 @@ data class JavaCompositeRebuildOptions( val hnswLimits: JavaHnswBuildLimits, val pqWorkerThreads: Long, val pqLimits: JavaProductQuantizationBuildLimits, + val turboquantWorkerThreads: Long, + val turboquantLimits: JavaTurboQuantizationBuildLimits, ) { fun toNative() = CompositeRebuildOptionsRecord( hnswLimits.toNative(), pqWorkerThreads.toULong(), pqLimits.toNative(), + turboquantWorkerThreads.toULong(), turboquantLimits.toNative(), ) } @@ -384,10 +471,12 @@ data class JavaCompositeBuildOrRebuildOutcome( val composite: CompositeAccelerator?, val hnsw: HnswIndex?, val pq: ProductQuantizer?, + val turboquant: TurboQuantizer?, val reasons: List, val compositeStats: JavaCompositeBuildStats, val hnswStats: JavaHnswBuildStats?, val pqStats: JavaProductQuantizationBuildStats?, + val turboquantStats: JavaTurboQuantizationBuildStats?, ) data class JavaAcceleratorCatalogEntry( @@ -420,8 +509,8 @@ private fun CompositeBuildOutcome.toJava() = JavaCompositeBuildOutcome( accelerator, reasons.map(FullRebuildReasonRecord::toJava), stats.toJava(), ) private fun CompositeBuildOrRebuildOutcome.toJava() = JavaCompositeBuildOrRebuildOutcome( - kind.name, composite, hnsw, pq, reasons.map(FullRebuildReasonRecord::toJava), - compositeStats.toJava(), hnswStats?.toJava(), pqStats?.toJava(), + kind.name, composite, hnsw, pq, turboquant, reasons.map(FullRebuildReasonRecord::toJava), + compositeStats.toJava(), hnswStats?.toJava(), pqStats?.toJava(), turboquantStats?.toJava(), ) data class JavaMapUpdate( @@ -707,10 +796,11 @@ data class JavaProximitySearchRuntimePolicy( val authoritativeMaxBytes: Long, val hnswMaxBytes: Long, val pqMaxBytes: Long, + val turboquantMaxBytes: Long, ) { fun toNative() = ProximitySearchRuntimePolicyRecord( maxEntries.toULong(), maxBytes.toULong(), authoritativeMaxBytes.toULong(), - hnswMaxBytes.toULong(), pqMaxBytes.toULong(), + hnswMaxBytes.toULong(), pqMaxBytes.toULong(), turboquantMaxBytes.toULong(), ) } @@ -721,7 +811,7 @@ data class JavaProximitySearchRuntimeStats( private fun ProximitySearchRuntimePolicyRecord.toJava() = JavaProximitySearchRuntimePolicy( maxEntries.toLong(), maxBytes.toLong(), authoritativeMaxBytes.toLong(), - hnswMaxBytes.toLong(), pqMaxBytes.toLong(), + hnswMaxBytes.toLong(), pqMaxBytes.toLong(), turboquantMaxBytes.toLong(), ) private fun ProximitySearchRuntimeStatsRecord.toJava() = JavaProximitySearchRuntimeStats( @@ -1286,6 +1376,76 @@ object JavaPortableBridge { request: JavaProximitySearchRequest, ): ProximitySearchProof = index.proveSearch(map, request.toNative()) + @JvmStatic + fun defaultTurboquantConfig(): JavaTurboQuantizationConfig = + nativeDefaultTurboquantConfig().toJava() + + @JvmStatic + fun defaultTurboquantBuildLimits(): JavaTurboQuantizationBuildLimits = + nativeDefaultTurboquantBuildLimits().toJava() + + @JvmStatic + fun buildTurboquant( + map: ProximityMap, + config: JavaTurboQuantizationConfig, + workerThreads: Long, + limits: JavaTurboQuantizationBuildLimits, + ): JavaTurboQuantizationBuildResult = + map.buildTurboquant(config.toNative(), workerThreads.toULong(), limits.toNative()).let { + JavaTurboQuantizationBuildResult(it.index, it.stats.toJava()) + } + + @JvmStatic + fun loadTurboquant(map: ProximityMap, manifest: ByteArray): TurboQuantizer = + map.loadTurboquant(manifest.copyOf()) + + @JvmStatic + fun turboquantConfig(index: TurboQuantizer): JavaTurboQuantizationConfig = + index.config.toJava() + + @JvmStatic + fun turboquantQuality(index: TurboQuantizer): JavaTurboQuantizationQuality = + index.quality.toJava() + + @JvmStatic + fun turboquantVerify( + index: TurboQuantizer, + map: ProximityMap, + ): JavaTurboQuantizationVerification = index.verify(map).toJava() + + @JvmStatic + fun turboquantSearch( + index: TurboQuantizer, + map: ProximityMap, + request: JavaProximitySearchRequest, + ): ProximitySearchResultRecord = index.search(map, request.toNative()) + + @JvmStatic + fun turboquantSearchWithRuntime( + index: TurboQuantizer, + map: ProximityMap, + request: JavaProximitySearchRequest, + runtime: ProximitySearchRuntime, + ): ProximitySearchResultRecord = index.searchWithRuntime(map, request.toNative(), runtime) + + @JvmStatic + fun turboquantSearchCancellable( + index: TurboQuantizer, + map: ProximityMap, + request: JavaProximitySearchRequest, + runtime: ProximitySearchRuntime?, + cancellation: ProximityCancellationToken, + ): ProximitySearchResultRecord = index.searchCancellable( + map, request.toNative(), runtime, cancellation, + ) + + @JvmStatic + fun turboquantProveSearch( + index: TurboQuantizer, + map: ProximityMap, + request: JavaProximitySearchRequest, + ): ProximitySearchProof = index.proveSearch(map, request.toNative()) + @JvmStatic fun defaultCompositeAcceleratorConfig(): JavaCompositeAcceleratorConfig = nativeDefaultCompositeAcceleratorConfig().toJava() @@ -1299,6 +1459,7 @@ object JavaPortableBridge { nativeDefaultCompositeRebuildOptions().let { JavaCompositeRebuildOptions( it.hnswLimits.toJava(), it.pqWorkerThreads.toLong(), it.pqLimits.toJava(), + it.turboquantWorkerThreads.toLong(), it.turboquantLimits.toJava(), ) } @@ -1322,6 +1483,16 @@ object JavaPortableBridge { ): JavaCompositeBuildOutcome = map.buildCompositePq(baseMap, base, config.toNative(), limits.toNative()).toJava() + @JvmStatic + fun buildCompositeTurboquant( + map: ProximityMap, + baseMap: ProximityMap, + base: TurboQuantizer, + config: JavaCompositeAcceleratorConfig, + limits: JavaCompositeBuildLimits, + ): JavaCompositeBuildOutcome = + map.buildCompositeTurboquant(baseMap, base, config.toNative(), limits.toNative()).toJava() + @JvmStatic fun buildOrRebuildCompositeHnsw( map: ProximityMap, @@ -1346,6 +1517,18 @@ object JavaPortableBridge { baseMap, base, config.toNative(), limits.toNative(), rebuild.toNative(), ).toJava() + @JvmStatic + fun buildOrRebuildCompositeTurboquant( + map: ProximityMap, + baseMap: ProximityMap, + base: TurboQuantizer, + config: JavaCompositeAcceleratorConfig, + limits: JavaCompositeBuildLimits, + rebuild: JavaCompositeRebuildOptions, + ): JavaCompositeBuildOrRebuildOutcome = map.buildOrRebuildCompositeTurboquant( + baseMap, base, config.toNative(), limits.toNative(), rebuild.toNative(), + ).toJava() + @JvmStatic fun loadComposite(map: ProximityMap, manifest: ByteArray): CompositeAccelerator = map.loadComposite(manifest.copyOf()) @@ -1355,8 +1538,9 @@ object JavaPortableBridge { map: ProximityMap, hnsw: HnswIndex?, pq: ProductQuantizer?, + turboquant: TurboQuantizer?, composite: CompositeAccelerator?, - ): AcceleratorCatalog = map.buildAcceleratorCatalog(hnsw, pq, composite) + ): AcceleratorCatalog = map.buildAcceleratorCatalog(hnsw, pq, turboquant, composite) @JvmStatic fun loadAcceleratorCatalog(map: ProximityMap, manifest: ByteArray): AcceleratorCatalog = diff --git a/bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt b/bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt index 5f594033..14d8fe8f 100644 --- a/bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt +++ b/bindings/kotlin/src/main/kotlin/build/crab/prolly/api/PortableApi.kt @@ -10,6 +10,7 @@ import build.crab.prolly.BindingMapComparison import build.crab.prolly.BindingMapMerge import build.crab.prolly.BindingMapSubscription import build.crab.prolly.BindingProductQuantizer +import build.crab.prolly.BindingTurboQuantizer import build.crab.prolly.BindingProximityCancellationToken import build.crab.prolly.BindingProximityMap import build.crab.prolly.BindingProximityReadSession @@ -58,6 +59,11 @@ import build.crab.prolly.ProductQuantizationBuildLimitsRecord import build.crab.prolly.ProductQuantizationBuildStatsRecord import build.crab.prolly.ProductQuantizationConfigRecord import build.crab.prolly.ProductQuantizationQualityRecord +import build.crab.prolly.TurboQuantizationBuildLimitsRecord +import build.crab.prolly.TurboQuantizationBuildStatsRecord +import build.crab.prolly.TurboQuantizationConfigRecord +import build.crab.prolly.TurboQuantizationQualityRecord +import build.crab.prolly.TurboQuantizationVerificationRecord import build.crab.prolly.RangeCursorRecord import build.crab.prolly.ReverseCursorRecord import build.crab.prolly.ProximityConfigRecord @@ -76,6 +82,8 @@ import build.crab.prolly.defaultHnswBuildLimits import build.crab.prolly.defaultHnswConfig import build.crab.prolly.defaultPqBuildLimits import build.crab.prolly.defaultPqConfig +import build.crab.prolly.defaultTurboquantBuildLimits +import build.crab.prolly.defaultTurboquantConfig import build.crab.prolly.defaultProximityConfig import build.crab.prolly.defaultProximitySearchRuntimePolicy import build.crab.prolly.exactProximitySearchRequest @@ -102,6 +110,10 @@ data class ProductQuantizationBuildResult( val index: ProductQuantizer, val stats: ProductQuantizationBuildStatsRecord, ) +data class TurboQuantizationBuildResult( + val index: TurboQuantizer, + val stats: TurboQuantizationBuildStatsRecord, +) data class CompositeBuildOutcome( val accelerator: CompositeAccelerator?, val reasons: List, @@ -112,10 +124,12 @@ data class CompositeBuildOrRebuildOutcome( val composite: CompositeAccelerator?, val hnsw: HnswIndex?, val pq: ProductQuantizer?, + val turboquant: TurboQuantizer?, val reasons: List, val compositeStats: CompositeBuildStatsRecord, val hnswStats: HnswBuildStatsRecord?, val pqStats: ProductQuantizationBuildStatsRecord?, + val turboquantStats: TurboQuantizationBuildStatsRecord?, ) private fun CompositeBuildOutcomeRecord.portable() = CompositeBuildOutcome( @@ -127,10 +141,12 @@ private fun CompositeBuildOrRebuildOutcomeRecord.portable() = CompositeBuildOrRe composite?.let(::CompositeAccelerator), hnsw?.let(::HnswIndex), pq?.let(::ProductQuantizer), + turboquant?.let(::TurboQuantizer), reasons, compositeStats, hnswStats, pqStats, + turboquantStats, ) internal fun ownedSnapshotBundle(bundle: SnapshotBundleRecord): SnapshotBundleRecord { @@ -793,6 +809,16 @@ class ProximityMap(internal val native: BindingProximityMap) : AutoCloseable { return ProductQuantizationBuildResult(ProductQuantizer(result.index), result.stats) } fun loadPq(manifest: ByteArray) = ProductQuantizer(native.loadPq(manifest.copyOf())) + fun buildTurboquant( + config: TurboQuantizationConfigRecord = defaultTurboquantConfig(), + workerThreads: ULong = 1uL, + limits: TurboQuantizationBuildLimitsRecord = defaultTurboquantBuildLimits(), + ): TurboQuantizationBuildResult { + val result = native.buildTurboquant(config, workerThreads, limits) + return TurboQuantizationBuildResult(TurboQuantizer(result.index), result.stats) + } + fun loadTurboquant(manifest: ByteArray) = + TurboQuantizer(native.loadTurboquant(manifest.copyOf())) fun buildCompositeHnsw( baseMap: ProximityMap, base: HnswIndex, @@ -805,6 +831,12 @@ class ProximityMap(internal val native: BindingProximityMap) : AutoCloseable { config: CompositeAcceleratorConfigRecord = defaultCompositeAcceleratorConfig(), limits: CompositeBuildLimitsRecord = defaultCompositeBuildLimits(), ) = native.buildCompositePq(baseMap.native, base.native, config, limits).portable() + fun buildCompositeTurboquant( + baseMap: ProximityMap, + base: TurboQuantizer, + config: CompositeAcceleratorConfigRecord = defaultCompositeAcceleratorConfig(), + limits: CompositeBuildLimitsRecord = defaultCompositeBuildLimits(), + ) = native.buildCompositeTurboquant(baseMap.native, base.native, config, limits).portable() fun buildOrRebuildCompositeHnsw( baseMap: ProximityMap, base: HnswIndex, @@ -823,14 +855,26 @@ class ProximityMap(internal val native: BindingProximityMap) : AutoCloseable { ) = native.buildOrRebuildCompositePq( baseMap.native, base.native, config, limits, rebuild, ).portable() + fun buildOrRebuildCompositeTurboquant( + baseMap: ProximityMap, + base: TurboQuantizer, + config: CompositeAcceleratorConfigRecord = defaultCompositeAcceleratorConfig(), + limits: CompositeBuildLimitsRecord = defaultCompositeBuildLimits(), + rebuild: CompositeRebuildOptionsRecord = defaultCompositeRebuildOptions(), + ) = native.buildOrRebuildCompositeTurboquant( + baseMap.native, base.native, config, limits, rebuild, + ).portable() fun loadComposite(manifest: ByteArray) = CompositeAccelerator(native.loadComposite(manifest.copyOf())) fun buildAcceleratorCatalog( hnsw: HnswIndex? = null, pq: ProductQuantizer? = null, + turboquant: TurboQuantizer? = null, composite: CompositeAccelerator? = null, ) = AcceleratorCatalog( - native.buildAcceleratorCatalog(hnsw?.native, pq?.native, composite?.native), + native.buildAcceleratorCatalog( + hnsw?.native, pq?.native, turboquant?.native, composite?.native, + ), ) fun loadAcceleratorCatalog(manifest: ByteArray) = AcceleratorCatalog(native.loadAcceleratorCatalog(manifest.copyOf())) @@ -1000,6 +1044,47 @@ class ProductQuantizer(internal val native: BindingProductQuantizer) : AutoClose override fun close() = native.close() } +class TurboQuantizer(internal val native: BindingTurboQuantizer) : AutoCloseable { + val manifest: ByteArray get() = native.manifest().copyOf() + val sourceDescriptor: ByteArray get() = native.sourceDescriptor().copyOf() + val config: TurboQuantizationConfigRecord get() = native.config() + val quality: TurboQuantizationQualityRecord get() = native.quality() + fun verify(map: ProximityMap): TurboQuantizationVerificationRecord = native.verify(map.native) + fun search(map: ProximityMap, request: ProximitySearchRequestRecord): ProximitySearchResultRecord = + native.search(map.native, ownedSearchRequest(request)) + fun searchWithRuntime( + map: ProximityMap, + request: ProximitySearchRequestRecord, + runtime: ProximitySearchRuntime, + ): ProximitySearchResultRecord = + native.searchWithRuntime(map.native, ownedSearchRequest(request), runtime.native) + fun searchCancellable( + map: ProximityMap, + request: ProximitySearchRequestRecord, + runtime: ProximitySearchRuntime? = null, + cancellation: ProximityCancellationToken, + ): ProximitySearchResultRecord = native.searchCancellable( + map.native, ownedSearchRequest(request), runtime?.native, cancellation.native, + ) + suspend fun searchAsync( + map: ProximityMap, + request: ProximitySearchRequestRecord, + runtime: ProximitySearchRuntime? = null, + cancellation: ProximityCancellationToken? = null, + ): ProximitySearchResultRecord { + val owned = ownedSearchRequest(request) + return cooperativeSearch(cancellation) { token -> + searchCancellable(map, owned, runtime, token) + } + } + fun proveSearch( + map: ProximityMap, + request: ProximitySearchRequestRecord, + limits: ContentGraphLimitsRecord = defaultContentGraphLimits(), + ) = ProximitySearchProof(native.proveSearch(map.native, ownedSearchRequest(request), limits)) + override fun close() = native.close() +} + class CompositeAccelerator(internal val native: BindingCompositeAccelerator) : AutoCloseable { val manifest: ByteArray get() = native.manifest().copyOf() val currentSourceDescriptor: ByteArray get() = native.currentSourceDescriptor().copyOf() diff --git a/bindings/kotlin/src/main/kotlin/build/crab/prolly/generated/prolly.kt b/bindings/kotlin/src/main/kotlin/build/crab/prolly/generated/prolly.kt index d8016907..80582406 100644 --- a/bindings/kotlin/src/main/kotlin/build/crab/prolly/generated/prolly.kt +++ b/bindings/kotlin/src/main/kotlin/build/crab/prolly/generated/prolly.kt @@ -1295,6 +1295,10 @@ external fun uniffi_prolly_bindings_checksum_func_default_proximity_config( ): Short external fun uniffi_prolly_bindings_checksum_func_default_proximity_search_runtime_policy( ): Short +external fun uniffi_prolly_bindings_checksum_func_default_turboquant_build_limits( +): Short +external fun uniffi_prolly_bindings_checksum_func_default_turboquant_config( +): Short external fun uniffi_prolly_bindings_checksum_func_exact_proximity_search_request( ): Short external fun uniffi_prolly_bindings_checksum_func_verify_proximity_membership_proof( @@ -1919,14 +1923,20 @@ external fun uniffi_prolly_bindings_checksum_method_bindingproximitymap_build_co ): Short external fun uniffi_prolly_bindings_checksum_method_bindingproximitymap_build_composite_pq( ): Short +external fun uniffi_prolly_bindings_checksum_method_bindingproximitymap_build_composite_turboquant( +): Short external fun uniffi_prolly_bindings_checksum_method_bindingproximitymap_build_hnsw( ): Short external fun uniffi_prolly_bindings_checksum_method_bindingproximitymap_build_or_rebuild_composite_hnsw( ): Short external fun uniffi_prolly_bindings_checksum_method_bindingproximitymap_build_or_rebuild_composite_pq( ): Short +external fun uniffi_prolly_bindings_checksum_method_bindingproximitymap_build_or_rebuild_composite_turboquant( +): Short external fun uniffi_prolly_bindings_checksum_method_bindingproximitymap_build_pq( ): Short +external fun uniffi_prolly_bindings_checksum_method_bindingproximitymap_build_turboquant( +): Short external fun uniffi_prolly_bindings_checksum_method_bindingproximitymap_clear_content_cache( ): Short external fun uniffi_prolly_bindings_checksum_method_bindingproximitymap_config( @@ -1949,6 +1959,8 @@ external fun uniffi_prolly_bindings_checksum_method_bindingproximitymap_load_hns ): Short external fun uniffi_prolly_bindings_checksum_method_bindingproximitymap_load_pq( ): Short +external fun uniffi_prolly_bindings_checksum_method_bindingproximitymap_load_turboquant( +): Short external fun uniffi_prolly_bindings_checksum_method_bindingproximitymap_mutate( ): Short external fun uniffi_prolly_bindings_checksum_method_bindingproximitymap_prove_membership( @@ -1995,6 +2007,24 @@ external fun uniffi_prolly_bindings_checksum_method_bindingproximitysearchruntim ): Short external fun uniffi_prolly_bindings_checksum_method_bindingproximitysearchruntime_stats( ): Short +external fun uniffi_prolly_bindings_checksum_method_bindingturboquantizer_config( +): Short +external fun uniffi_prolly_bindings_checksum_method_bindingturboquantizer_manifest( +): Short +external fun uniffi_prolly_bindings_checksum_method_bindingturboquantizer_prove_search( +): Short +external fun uniffi_prolly_bindings_checksum_method_bindingturboquantizer_quality( +): Short +external fun uniffi_prolly_bindings_checksum_method_bindingturboquantizer_search( +): Short +external fun uniffi_prolly_bindings_checksum_method_bindingturboquantizer_search_cancellable( +): Short +external fun uniffi_prolly_bindings_checksum_method_bindingturboquantizer_search_with_runtime( +): Short +external fun uniffi_prolly_bindings_checksum_method_bindingturboquantizer_source_descriptor( +): Short +external fun uniffi_prolly_bindings_checksum_method_bindingturboquantizer_verify( +): Short external fun uniffi_prolly_bindings_checksum_method_proximityrecordvisitorcallback_visit( ): Short external fun uniffi_prolly_bindings_checksum_method_bindingmapcomparison_base( @@ -3084,20 +3114,26 @@ external fun uniffi_prolly_bindings_fn_clone_bindingproximitymap(`handle`: Long, ): Long external fun uniffi_prolly_bindings_fn_free_bindingproximitymap(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -external fun uniffi_prolly_bindings_fn_method_bindingproximitymap_build_accelerator_catalog(`ptr`: Long,`hnsw`: RustBuffer.ByValue,`pq`: RustBuffer.ByValue,`composite`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_prolly_bindings_fn_method_bindingproximitymap_build_accelerator_catalog(`ptr`: Long,`hnsw`: RustBuffer.ByValue,`pq`: RustBuffer.ByValue,`turboquant`: RustBuffer.ByValue,`composite`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, ): Long external fun uniffi_prolly_bindings_fn_method_bindingproximitymap_build_composite_hnsw(`ptr`: Long,`baseMap`: Long,`base`: Long,`config`: RustBuffer.ByValue,`limits`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue external fun uniffi_prolly_bindings_fn_method_bindingproximitymap_build_composite_pq(`ptr`: Long,`baseMap`: Long,`base`: Long,`config`: RustBuffer.ByValue,`limits`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue +external fun uniffi_prolly_bindings_fn_method_bindingproximitymap_build_composite_turboquant(`ptr`: Long,`baseMap`: Long,`base`: Long,`config`: RustBuffer.ByValue,`limits`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): RustBuffer.ByValue external fun uniffi_prolly_bindings_fn_method_bindingproximitymap_build_hnsw(`ptr`: Long,`config`: RustBuffer.ByValue,`limits`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue external fun uniffi_prolly_bindings_fn_method_bindingproximitymap_build_or_rebuild_composite_hnsw(`ptr`: Long,`baseMap`: Long,`base`: Long,`config`: RustBuffer.ByValue,`limits`: RustBuffer.ByValue,`rebuild`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue external fun uniffi_prolly_bindings_fn_method_bindingproximitymap_build_or_rebuild_composite_pq(`ptr`: Long,`baseMap`: Long,`base`: Long,`config`: RustBuffer.ByValue,`limits`: RustBuffer.ByValue,`rebuild`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue +external fun uniffi_prolly_bindings_fn_method_bindingproximitymap_build_or_rebuild_composite_turboquant(`ptr`: Long,`baseMap`: Long,`base`: Long,`config`: RustBuffer.ByValue,`limits`: RustBuffer.ByValue,`rebuild`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): RustBuffer.ByValue external fun uniffi_prolly_bindings_fn_method_bindingproximitymap_build_pq(`ptr`: Long,`config`: RustBuffer.ByValue,`workerThreads`: Long,`limits`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue +external fun uniffi_prolly_bindings_fn_method_bindingproximitymap_build_turboquant(`ptr`: Long,`config`: RustBuffer.ByValue,`workerThreads`: Long,`limits`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): RustBuffer.ByValue external fun uniffi_prolly_bindings_fn_method_bindingproximitymap_clear_content_cache(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit external fun uniffi_prolly_bindings_fn_method_bindingproximitymap_config(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, @@ -3120,6 +3156,8 @@ external fun uniffi_prolly_bindings_fn_method_bindingproximitymap_load_hnsw(`ptr ): Long external fun uniffi_prolly_bindings_fn_method_bindingproximitymap_load_pq(`ptr`: Long,`manifest`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, ): Long +external fun uniffi_prolly_bindings_fn_method_bindingproximitymap_load_turboquant(`ptr`: Long,`manifest`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long external fun uniffi_prolly_bindings_fn_method_bindingproximitymap_mutate(`ptr`: Long,`mutations`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue external fun uniffi_prolly_bindings_fn_method_bindingproximitymap_prove_membership(`ptr`: Long,`key`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, @@ -3178,6 +3216,28 @@ external fun uniffi_prolly_bindings_fn_method_bindingproximitysearchruntime_poli ): RustBuffer.ByValue external fun uniffi_prolly_bindings_fn_method_bindingproximitysearchruntime_stats(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue +external fun uniffi_prolly_bindings_fn_clone_bindingturboquantizer(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_prolly_bindings_fn_free_bindingturboquantizer(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Unit +external fun uniffi_prolly_bindings_fn_method_bindingturboquantizer_config(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): RustBuffer.ByValue +external fun uniffi_prolly_bindings_fn_method_bindingturboquantizer_manifest(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): RustBuffer.ByValue +external fun uniffi_prolly_bindings_fn_method_bindingturboquantizer_prove_search(`ptr`: Long,`map`: Long,`request`: RustBuffer.ByValue,`limits`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_prolly_bindings_fn_method_bindingturboquantizer_quality(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): RustBuffer.ByValue +external fun uniffi_prolly_bindings_fn_method_bindingturboquantizer_search(`ptr`: Long,`map`: Long,`request`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): RustBuffer.ByValue +external fun uniffi_prolly_bindings_fn_method_bindingturboquantizer_search_cancellable(`ptr`: Long,`map`: Long,`request`: RustBuffer.ByValue,`runtime`: RustBuffer.ByValue,`cancellation`: Long,uniffi_out_err: UniffiRustCallStatus, +): RustBuffer.ByValue +external fun uniffi_prolly_bindings_fn_method_bindingturboquantizer_search_with_runtime(`ptr`: Long,`map`: Long,`request`: RustBuffer.ByValue,`runtime`: Long,uniffi_out_err: UniffiRustCallStatus, +): RustBuffer.ByValue +external fun uniffi_prolly_bindings_fn_method_bindingturboquantizer_source_descriptor(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): RustBuffer.ByValue +external fun uniffi_prolly_bindings_fn_method_bindingturboquantizer_verify(`ptr`: Long,`map`: Long,uniffi_out_err: UniffiRustCallStatus, +): RustBuffer.ByValue external fun uniffi_prolly_bindings_fn_clone_proximityrecordvisitorcallback(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Long external fun uniffi_prolly_bindings_fn_free_proximityrecordvisitorcallback(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, @@ -3764,6 +3824,10 @@ external fun uniffi_prolly_bindings_fn_func_default_proximity_config(`dimensions ): RustBuffer.ByValue external fun uniffi_prolly_bindings_fn_func_default_proximity_search_runtime_policy(uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue +external fun uniffi_prolly_bindings_fn_func_default_turboquant_build_limits(uniffi_out_err: UniffiRustCallStatus, +): RustBuffer.ByValue +external fun uniffi_prolly_bindings_fn_func_default_turboquant_config(uniffi_out_err: UniffiRustCallStatus, +): RustBuffer.ByValue external fun uniffi_prolly_bindings_fn_func_exact_proximity_search_request(`query`: RustBuffer.ByValue,`k`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue external fun uniffi_prolly_bindings_fn_func_verify_proximity_membership_proof(`proof`: RustBuffer.ByValue,`expectedDescriptor`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, @@ -4293,6 +4357,12 @@ private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) { if (lib.uniffi_prolly_bindings_checksum_func_default_proximity_search_runtime_policy() != 8352.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } + if (lib.uniffi_prolly_bindings_checksum_func_default_turboquant_build_limits() != 16284.toShort()) { + throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + } + if (lib.uniffi_prolly_bindings_checksum_func_default_turboquant_config() != 37586.toShort()) { + throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + } if (lib.uniffi_prolly_bindings_checksum_func_exact_proximity_search_request() != 59384.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } @@ -5220,7 +5290,7 @@ private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) { if (lib.uniffi_prolly_bindings_checksum_method_bindingproximitycancellationtoken_is_cancelled() != 33821.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_prolly_bindings_checksum_method_bindingproximitymap_build_accelerator_catalog() != 27841.toShort()) { + if (lib.uniffi_prolly_bindings_checksum_method_bindingproximitymap_build_accelerator_catalog() != 39929.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } if (lib.uniffi_prolly_bindings_checksum_method_bindingproximitymap_build_composite_hnsw() != 60836.toShort()) { @@ -5229,6 +5299,9 @@ private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) { if (lib.uniffi_prolly_bindings_checksum_method_bindingproximitymap_build_composite_pq() != 36562.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } + if (lib.uniffi_prolly_bindings_checksum_method_bindingproximitymap_build_composite_turboquant() != 32424.toShort()) { + throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + } if (lib.uniffi_prolly_bindings_checksum_method_bindingproximitymap_build_hnsw() != 15873.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } @@ -5238,9 +5311,15 @@ private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) { if (lib.uniffi_prolly_bindings_checksum_method_bindingproximitymap_build_or_rebuild_composite_pq() != 27287.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } + if (lib.uniffi_prolly_bindings_checksum_method_bindingproximitymap_build_or_rebuild_composite_turboquant() != 42282.toShort()) { + throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + } if (lib.uniffi_prolly_bindings_checksum_method_bindingproximitymap_build_pq() != 7075.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } + if (lib.uniffi_prolly_bindings_checksum_method_bindingproximitymap_build_turboquant() != 51245.toShort()) { + throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + } if (lib.uniffi_prolly_bindings_checksum_method_bindingproximitymap_clear_content_cache() != 42240.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } @@ -5274,6 +5353,9 @@ private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) { if (lib.uniffi_prolly_bindings_checksum_method_bindingproximitymap_load_pq() != 63976.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } + if (lib.uniffi_prolly_bindings_checksum_method_bindingproximitymap_load_turboquant() != 12420.toShort()) { + throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + } if (lib.uniffi_prolly_bindings_checksum_method_bindingproximitymap_mutate() != 39394.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } @@ -5343,6 +5425,33 @@ private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) { if (lib.uniffi_prolly_bindings_checksum_method_bindingproximitysearchruntime_stats() != 45140.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } + if (lib.uniffi_prolly_bindings_checksum_method_bindingturboquantizer_config() != 59416.toShort()) { + throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + } + if (lib.uniffi_prolly_bindings_checksum_method_bindingturboquantizer_manifest() != 10558.toShort()) { + throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + } + if (lib.uniffi_prolly_bindings_checksum_method_bindingturboquantizer_prove_search() != 38682.toShort()) { + throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + } + if (lib.uniffi_prolly_bindings_checksum_method_bindingturboquantizer_quality() != 37928.toShort()) { + throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + } + if (lib.uniffi_prolly_bindings_checksum_method_bindingturboquantizer_search() != 30129.toShort()) { + throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + } + if (lib.uniffi_prolly_bindings_checksum_method_bindingturboquantizer_search_cancellable() != 39190.toShort()) { + throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + } + if (lib.uniffi_prolly_bindings_checksum_method_bindingturboquantizer_search_with_runtime() != 64232.toShort()) { + throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + } + if (lib.uniffi_prolly_bindings_checksum_method_bindingturboquantizer_source_descriptor() != 44910.toShort()) { + throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + } + if (lib.uniffi_prolly_bindings_checksum_method_bindingturboquantizer_verify() != 57510.toShort()) { + throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + } if (lib.uniffi_prolly_bindings_checksum_method_proximityrecordvisitorcallback_visit() != 31782.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } @@ -12524,20 +12633,26 @@ public object FfiConverterTypeBindingProximityCancellationToken: FfiConverter): ProximityMutationResultRecord fun `proveMembership`(`key`: kotlin.ByteArray): ProximityMembershipProofRecord @@ -12682,13 +12799,13 @@ open class BindingProximityMap: Disposable, AutoCloseable, BindingProximityMapIn } - @Throws(ProllyBindingException::class)override fun `buildAcceleratorCatalog`(`hnsw`: BindingHnswIndex?, `pq`: BindingProductQuantizer?, `composite`: BindingCompositeAccelerator?): BindingAcceleratorCatalog { + @Throws(ProllyBindingException::class)override fun `buildAcceleratorCatalog`(`hnsw`: BindingHnswIndex?, `pq`: BindingProductQuantizer?, `turboquant`: BindingTurboQuantizer?, `composite`: BindingCompositeAccelerator?): BindingAcceleratorCatalog { return FfiConverterTypeBindingAcceleratorCatalog.lift( callWithHandle { uniffiRustCallWithError(ProllyBindingException) { _status -> UniffiLib.uniffi_prolly_bindings_fn_method_bindingproximitymap_build_accelerator_catalog( it, - FfiConverterOptionalTypeBindingHnswIndex.lower(`hnsw`),FfiConverterOptionalTypeBindingProductQuantizer.lower(`pq`),FfiConverterOptionalTypeBindingCompositeAccelerator.lower(`composite`),_status) + FfiConverterOptionalTypeBindingHnswIndex.lower(`hnsw`),FfiConverterOptionalTypeBindingProductQuantizer.lower(`pq`),FfiConverterOptionalTypeBindingTurboQuantizer.lower(`turboquant`),FfiConverterOptionalTypeBindingCompositeAccelerator.lower(`composite`),_status) } } ) @@ -12724,6 +12841,20 @@ open class BindingProximityMap: Disposable, AutoCloseable, BindingProximityMapIn + @Throws(ProllyBindingException::class)override fun `buildCompositeTurboquant`(`baseMap`: BindingProximityMap, `base`: BindingTurboQuantizer, `config`: CompositeAcceleratorConfigRecord, `limits`: CompositeBuildLimitsRecord): CompositeBuildOutcomeRecord { + return FfiConverterTypeCompositeBuildOutcomeRecord.lift( + callWithHandle { + uniffiRustCallWithError(ProllyBindingException) { _status -> + UniffiLib.uniffi_prolly_bindings_fn_method_bindingproximitymap_build_composite_turboquant( + it, + FfiConverterTypeBindingProximityMap.lower(`baseMap`),FfiConverterTypeBindingTurboQuantizer.lower(`base`),FfiConverterTypeCompositeAcceleratorConfigRecord.lower(`config`),FfiConverterTypeCompositeBuildLimitsRecord.lower(`limits`),_status) +} + } + ) + } + + + @Throws(ProllyBindingException::class)override fun `buildHnsw`(`config`: HnswConfigRecord, `limits`: HnswBuildLimitsRecord): HnswBuildResultRecord { return FfiConverterTypeHnswBuildResultRecord.lift( callWithHandle { @@ -12766,6 +12897,20 @@ open class BindingProximityMap: Disposable, AutoCloseable, BindingProximityMapIn + @Throws(ProllyBindingException::class)override fun `buildOrRebuildCompositeTurboquant`(`baseMap`: BindingProximityMap, `base`: BindingTurboQuantizer, `config`: CompositeAcceleratorConfigRecord, `limits`: CompositeBuildLimitsRecord, `rebuild`: CompositeRebuildOptionsRecord): CompositeBuildOrRebuildOutcomeRecord { + return FfiConverterTypeCompositeBuildOrRebuildOutcomeRecord.lift( + callWithHandle { + uniffiRustCallWithError(ProllyBindingException) { _status -> + UniffiLib.uniffi_prolly_bindings_fn_method_bindingproximitymap_build_or_rebuild_composite_turboquant( + it, + FfiConverterTypeBindingProximityMap.lower(`baseMap`),FfiConverterTypeBindingTurboQuantizer.lower(`base`),FfiConverterTypeCompositeAcceleratorConfigRecord.lower(`config`),FfiConverterTypeCompositeBuildLimitsRecord.lower(`limits`),FfiConverterTypeCompositeRebuildOptionsRecord.lower(`rebuild`),_status) +} + } + ) + } + + + @Throws(ProllyBindingException::class)override fun `buildPq`(`config`: ProductQuantizationConfigRecord, `workerThreads`: kotlin.ULong, `limits`: ProductQuantizationBuildLimitsRecord): ProductQuantizationBuildResultRecord { return FfiConverterTypeProductQuantizationBuildResultRecord.lift( callWithHandle { @@ -12780,6 +12925,20 @@ open class BindingProximityMap: Disposable, AutoCloseable, BindingProximityMapIn + @Throws(ProllyBindingException::class)override fun `buildTurboquant`(`config`: TurboQuantizationConfigRecord, `workerThreads`: kotlin.ULong, `limits`: TurboQuantizationBuildLimitsRecord): TurboQuantizationBuildResultRecord { + return FfiConverterTypeTurboQuantizationBuildResultRecord.lift( + callWithHandle { + uniffiRustCallWithError(ProllyBindingException) { _status -> + UniffiLib.uniffi_prolly_bindings_fn_method_bindingproximitymap_build_turboquant( + it, + FfiConverterTypeTurboQuantizationConfigRecord.lower(`config`),FfiConverterULong.lower(`workerThreads`),FfiConverterTypeTurboQuantizationBuildLimitsRecord.lower(`limits`),_status) +} + } + ) + } + + + @Throws(ProllyBindingException::class)override fun `clearContentCache`() = callWithHandle { @@ -12931,6 +13090,20 @@ open class BindingProximityMap: Disposable, AutoCloseable, BindingProximityMapIn + @Throws(ProllyBindingException::class)override fun `loadTurboquant`(`manifest`: kotlin.ByteArray): BindingTurboQuantizer { + return FfiConverterTypeBindingTurboQuantizer.lift( + callWithHandle { + uniffiRustCallWithError(ProllyBindingException) { _status -> + UniffiLib.uniffi_prolly_bindings_fn_method_bindingproximitymap_load_turboquant( + it, + FfiConverterByteArray.lower(`manifest`),_status) +} + } + ) + } + + + @Throws(ProllyBindingException::class)override fun `mutate`(`mutations`: List): ProximityMutationResultRecord { return FfiConverterTypeProximityMutationResultRecord.lift( callWithHandle { @@ -14534,164 +14707,539 @@ public object FfiConverterTypeBindingSecondaryIndexSnapshot: FfiConverter): MapVersionRecord - - fun `apply`(`mutations`: List): MapVersionRecord - - fun `applyAtMillis`(`mutations`: List, `timestampMillis`: kotlin.ULong): MapVersionRecord - - fun `applyIf`(`expected`: kotlin.ByteArray?, `mutations`: List): MapUpdateRecord - - fun `applyIfAtMillis`(`expected`: kotlin.ByteArray?, `mutations`: List, `timestampMillis`: kotlin.ULong): MapUpdateRecord - - fun `backup`(): kotlin.ByteArray - - fun `changesSince`(`base`: kotlin.ByteArray): List - - fun `compare`(`base`: kotlin.ByteArray, `target`: kotlin.ByteArray): BindingMapComparison - - fun `compareToHead`(`base`: kotlin.ByteArray): BindingMapComparison - - fun `containsKey`(`key`: kotlin.ByteArray): kotlin.Boolean - - fun `delete`(`key`: kotlin.ByteArray): MapVersionRecord - - fun `deleteIf`(`expected`: kotlin.ByteArray?, `key`: kotlin.ByteArray): MapUpdateRecord - - fun `diff`(`base`: kotlin.ByteArray, `target`: kotlin.ByteArray): List - - fun `edit`(`mutations`: List): MapVersionRecord - - fun `editIf`(`expected`: kotlin.ByteArray?, `mutations`: List): MapUpdateRecord - - fun `get`(`key`: kotlin.ByteArray): kotlin.ByteArray? - - fun `getAt`(`id`: kotlin.ByteArray, `key`: kotlin.ByteArray): kotlin.ByteArray? - - fun `getLargeValue`(`blobStore`: ProllyBlobStore, `key`: kotlin.ByteArray): kotlin.ByteArray? - - fun `getMany`(`keys`: List): List - - fun `getManyAt`(`id`: kotlin.ByteArray, `keys`: List): List - - fun `getValueRef`(`key`: kotlin.ByteArray): ValueRefRecord? - - fun `getValueRefAt`(`id`: kotlin.ByteArray, `key`: kotlin.ByteArray): ValueRefRecord? - - fun `head`(): MapVersionRecord? - - fun `headId`(): kotlin.ByteArray? - - fun `headName`(): kotlin.ByteArray - - fun `id`(): kotlin.ByteArray - - fun `importAsHead`(`bundle`: SnapshotBundleRecord): MapVersionRecord - - fun `importAsHeadAtMillis`(`bundle`: SnapshotBundleRecord, `timestampMillis`: kotlin.ULong): MapVersionRecord - - fun `initialize`(): MapVersionRecord - - fun `initializeSorted`(`entries`: List): MapUpdateRecord - - fun `isInitialized`(): kotlin.Boolean - - fun `keepFor`(`maxAgeMillis`: kotlin.ULong): VersionPruneRecord - - fun `keepForAt`(`nowMillis`: kotlin.ULong, `maxAgeMillis`: kotlin.ULong): VersionPruneRecord - - fun `keepLast`(`count`: kotlin.ULong): VersionPruneRecord - - fun `keepVersions`(`ids`: List): VersionPruneRecord - - fun `parallelApply`(`mutations`: List, `config`: ParallelConfigRecord): VersionedMapBatchResultRecord - - fun `planBlobGc`(`blobStore`: ProllyBlobStore): BlobGcPlanRecord - - fun `planGc`(): GcPlanRecord - - fun `prefix`(`prefix`: kotlin.ByteArray): List - - fun `prefixAt`(`id`: kotlin.ByteArray, `prefix`: kotlin.ByteArray): List - - fun `prefixPage`(`prefix`: kotlin.ByteArray, `cursor`: RangeCursorRecord?, `limit`: kotlin.ULong): RangePageRecord - - fun `prefixPageAt`(`id`: kotlin.ByteArray, `prefix`: kotlin.ByteArray, `cursor`: RangeCursorRecord?, `limit`: kotlin.ULong): RangePageRecord +public interface BindingTurboQuantizerInterface { - fun `prepareMerge`(`base`: kotlin.ByteArray, `candidate`: kotlin.ByteArray): BindingMapMerge - - fun `pruneVersions`(`keepLatest`: kotlin.ULong): VersionPruneRecord - - fun `put`(`key`: kotlin.ByteArray, `value`: kotlin.ByteArray): MapVersionRecord - - fun `putIf`(`expected`: kotlin.ByteArray?, `key`: kotlin.ByteArray, `value`: kotlin.ByteArray): MapUpdateRecord - - fun `putLargeValue`(`blobStore`: ProllyBlobStore, `key`: kotlin.ByteArray, `value`: kotlin.ByteArray, `config`: LargeValueConfigRecord): MapVersionRecord - - fun `putLargeValueIf`(`blobStore`: ProllyBlobStore, `expected`: kotlin.ByteArray?, `key`: kotlin.ByteArray, `value`: kotlin.ByteArray, `config`: LargeValueConfigRecord): MapUpdateRecord - - fun `range`(`start`: kotlin.ByteArray, `rangeEnd`: kotlin.ByteArray?): List - - fun `rangeAt`(`id`: kotlin.ByteArray, `start`: kotlin.ByteArray, `rangeEnd`: kotlin.ByteArray?): List - - fun `rangePage`(`cursor`: RangeCursorRecord?, `rangeEnd`: kotlin.ByteArray?, `limit`: kotlin.ULong): RangePageRecord - - fun `rangePageAt`(`id`: kotlin.ByteArray, `cursor`: RangeCursorRecord?, `rangeEnd`: kotlin.ByteArray?, `limit`: kotlin.ULong): RangePageRecord - - fun `readSession`(): ProllyReadSession? - - fun `rebuildFromEntriesIf`(`expected`: kotlin.ByteArray?, `entries`: List): MapUpdateRecord - - fun `rebuildFromIterIf`(`expected`: kotlin.ByteArray?, `entries`: List): MapUpdateRecord - - fun `rebuildSortedIf`(`expected`: kotlin.ByteArray?, `entries`: List): MapUpdateRecord - - fun `restoreBackup`(`bytes`: kotlin.ByteArray): MapVersionRecord - - fun `retentionPolicy`(): NamedRootRetentionRecord + fun `config`(): TurboQuantizationConfigRecord - fun `rollbackTo`(`id`: kotlin.ByteArray): MapVersionRecord - - fun `scanPrefix`(`prefix`: kotlin.ByteArray, `visitor`: EntryVisitorCallback): ScanOutcomeRecord - - fun `scanPrefixAt`(`id`: kotlin.ByteArray, `prefix`: kotlin.ByteArray, `visitor`: EntryVisitorCallback): ScanOutcomeRecord - - fun `scanRange`(`start`: kotlin.ByteArray, `rangeEnd`: kotlin.ByteArray?, `visitor`: EntryVisitorCallback): ScanOutcomeRecord - - fun `scanRangeAt`(`id`: kotlin.ByteArray, `start`: kotlin.ByteArray, `rangeEnd`: kotlin.ByteArray?, `visitor`: EntryVisitorCallback): ScanOutcomeRecord - - fun `snapshot`(): BindingMapSnapshot? - - fun `snapshotAt`(`id`: kotlin.ByteArray): BindingMapSnapshot? - - fun `subscribe`(): BindingMapSubscription + fun `manifest`(): kotlin.ByteArray - fun `subscribeFrom`(`lastSeen`: kotlin.ByteArray?): BindingMapSubscription + fun `proveSearch`(`map`: BindingProximityMap, `request`: ProximitySearchRequestRecord, `limits`: ContentGraphLimitsRecord): BindingProximitySearchProof - fun `sweepBlobGc`(`blobStore`: ProllyBlobStore): BlobGcSweepRecord + fun `quality`(): TurboQuantizationQualityRecord - fun `sweepGc`(): GcSweepRecord + fun `search`(`map`: BindingProximityMap, `request`: ProximitySearchRequestRecord): ProximitySearchResultRecord - fun `verifyCatalog`(): MapCatalogVerificationRecord + fun `searchCancellable`(`map`: BindingProximityMap, `request`: ProximitySearchRequestRecord, `runtime`: BindingProximitySearchRuntime?, `cancellation`: BindingProximityCancellationToken): ProximitySearchResultRecord - fun `version`(`id`: kotlin.ByteArray): MapVersionRecord? + fun `searchWithRuntime`(`map`: BindingProximityMap, `request`: ProximitySearchRequestRecord, `runtime`: BindingProximitySearchRuntime): ProximitySearchResultRecord - fun `versions`(): List + fun `sourceDescriptor`(): kotlin.ByteArray - fun `versionsPrefix`(): kotlin.ByteArray + fun `verify`(`map`: BindingProximityMap): TurboQuantizationVerificationRecord companion object } -/** - * Application-facing managed map with version history and optimistic updates. - */ -open class BindingVersionedMap: Disposable, AutoCloseable, BindingVersionedMapInterface +open class BindingTurboQuantizer: Disposable, AutoCloseable, BindingTurboQuantizerInterface +{ + + @Suppress("UNUSED_PARAMETER") + /** + * @suppress + */ + constructor(withHandle: UniffiWithHandle, handle: Long) { + this.handle = handle + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle)) + } + + /** + * @suppress + * + * This constructor can be used to instantiate a fake object. Only used for tests. Any + * attempt to actually use an object constructed this way will fail as there is no + * connected Rust object. + */ + @Suppress("UNUSED_PARAMETER") + constructor(noHandle: NoHandle) { + this.handle = 0 + this.cleanable = null + } + + protected val handle: Long + protected val cleanable: UniffiCleaner.Cleanable? + + private val wasDestroyed = AtomicBoolean(false) + private val callCounter = AtomicLong(1) + + override fun destroy() { + // Only allow a single call to this method. + // TODO: maybe we should log a warning if called more than once? + if (this.wasDestroyed.compareAndSet(false, true)) { + // This decrement always matches the initial count of 1 given at creation time. + if (this.callCounter.decrementAndGet() == 0L) { + cleanable?.clean() + } + } + } + + @Synchronized + override fun close() { + this.destroy() + } + + internal inline fun callWithHandle(block: (handle: Long) -> R): R { + // Check and increment the call counter, to keep the object alive. + // This needs a compare-and-set retry loop in case of concurrent updates. + do { + val c = this.callCounter.get() + if (c == 0L) { + throw IllegalStateException("${this.javaClass.simpleName} object has already been destroyed") + } + if (c == Long.MAX_VALUE) { + throw IllegalStateException("${this.javaClass.simpleName} call counter would overflow") + } + } while (! this.callCounter.compareAndSet(c, c + 1L)) + // Now we can safely do the method call without the handle being freed concurrently. + try { + return block(this.uniffiCloneHandle()) + } finally { + // This decrement always matches the increment we performed above. + if (this.callCounter.decrementAndGet() == 0L) { + cleanable?.clean() + } + } + } + + // Use a static inner class instead of a closure so as not to accidentally + // capture `this` as part of the cleanable's action. + private class UniffiCleanAction(private val handle: Long) : Runnable { + override fun run() { + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_prolly_bindings_fn_free_bindingturboquantizer(handle, status) + } + } + } + + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } + return uniffiRustCall() { status -> + UniffiLib.uniffi_prolly_bindings_fn_clone_bindingturboquantizer(handle, status) + } + } + + override fun `config`(): TurboQuantizationConfigRecord { + return FfiConverterTypeTurboQuantizationConfigRecord.lift( + callWithHandle { + uniffiRustCall() { _status -> + UniffiLib.uniffi_prolly_bindings_fn_method_bindingturboquantizer_config( + it, + _status) +} + } + ) + } + + + override fun `manifest`(): kotlin.ByteArray { + return FfiConverterByteArray.lift( + callWithHandle { + uniffiRustCall() { _status -> + UniffiLib.uniffi_prolly_bindings_fn_method_bindingturboquantizer_manifest( + it, + _status) +} + } + ) + } + + + + @Throws(ProllyBindingException::class)override fun `proveSearch`(`map`: BindingProximityMap, `request`: ProximitySearchRequestRecord, `limits`: ContentGraphLimitsRecord): BindingProximitySearchProof { + return FfiConverterTypeBindingProximitySearchProof.lift( + callWithHandle { + uniffiRustCallWithError(ProllyBindingException) { _status -> + UniffiLib.uniffi_prolly_bindings_fn_method_bindingturboquantizer_prove_search( + it, + FfiConverterTypeBindingProximityMap.lower(`map`),FfiConverterTypeProximitySearchRequestRecord.lower(`request`),FfiConverterTypeContentGraphLimitsRecord.lower(`limits`),_status) +} + } + ) + } + + + override fun `quality`(): TurboQuantizationQualityRecord { + return FfiConverterTypeTurboQuantizationQualityRecord.lift( + callWithHandle { + uniffiRustCall() { _status -> + UniffiLib.uniffi_prolly_bindings_fn_method_bindingturboquantizer_quality( + it, + _status) +} + } + ) + } + + + + @Throws(ProllyBindingException::class)override fun `search`(`map`: BindingProximityMap, `request`: ProximitySearchRequestRecord): ProximitySearchResultRecord { + return FfiConverterTypeProximitySearchResultRecord.lift( + callWithHandle { + uniffiRustCallWithError(ProllyBindingException) { _status -> + UniffiLib.uniffi_prolly_bindings_fn_method_bindingturboquantizer_search( + it, + FfiConverterTypeBindingProximityMap.lower(`map`),FfiConverterTypeProximitySearchRequestRecord.lower(`request`),_status) +} + } + ) + } + + + + @Throws(ProllyBindingException::class)override fun `searchCancellable`(`map`: BindingProximityMap, `request`: ProximitySearchRequestRecord, `runtime`: BindingProximitySearchRuntime?, `cancellation`: BindingProximityCancellationToken): ProximitySearchResultRecord { + return FfiConverterTypeProximitySearchResultRecord.lift( + callWithHandle { + uniffiRustCallWithError(ProllyBindingException) { _status -> + UniffiLib.uniffi_prolly_bindings_fn_method_bindingturboquantizer_search_cancellable( + it, + FfiConverterTypeBindingProximityMap.lower(`map`),FfiConverterTypeProximitySearchRequestRecord.lower(`request`),FfiConverterOptionalTypeBindingProximitySearchRuntime.lower(`runtime`),FfiConverterTypeBindingProximityCancellationToken.lower(`cancellation`),_status) +} + } + ) + } + + + + @Throws(ProllyBindingException::class)override fun `searchWithRuntime`(`map`: BindingProximityMap, `request`: ProximitySearchRequestRecord, `runtime`: BindingProximitySearchRuntime): ProximitySearchResultRecord { + return FfiConverterTypeProximitySearchResultRecord.lift( + callWithHandle { + uniffiRustCallWithError(ProllyBindingException) { _status -> + UniffiLib.uniffi_prolly_bindings_fn_method_bindingturboquantizer_search_with_runtime( + it, + FfiConverterTypeBindingProximityMap.lower(`map`),FfiConverterTypeProximitySearchRequestRecord.lower(`request`),FfiConverterTypeBindingProximitySearchRuntime.lower(`runtime`),_status) +} + } + ) + } + + + override fun `sourceDescriptor`(): kotlin.ByteArray { + return FfiConverterByteArray.lift( + callWithHandle { + uniffiRustCall() { _status -> + UniffiLib.uniffi_prolly_bindings_fn_method_bindingturboquantizer_source_descriptor( + it, + _status) +} + } + ) + } + + + + @Throws(ProllyBindingException::class)override fun `verify`(`map`: BindingProximityMap): TurboQuantizationVerificationRecord { + return FfiConverterTypeTurboQuantizationVerificationRecord.lift( + callWithHandle { + uniffiRustCallWithError(ProllyBindingException) { _status -> + UniffiLib.uniffi_prolly_bindings_fn_method_bindingturboquantizer_verify( + it, + FfiConverterTypeBindingProximityMap.lower(`map`),_status) +} + } + ) + } + + + + + + + + + + /** + * @suppress + */ + companion object + +} + + +/** + * @suppress + */ +public object FfiConverterTypeBindingTurboQuantizer: FfiConverter { + override fun lower(value: BindingTurboQuantizer): Long { + return value.uniffiCloneHandle() + } + + override fun lift(value: Long): BindingTurboQuantizer { + return BindingTurboQuantizer(UniffiWithHandle, value) + } + + override fun read(buf: ByteBuffer): BindingTurboQuantizer { + return lift(buf.getLong()) + } + + override fun allocationSize(value: BindingTurboQuantizer) = 8UL + + override fun write(value: BindingTurboQuantizer, buf: ByteBuffer) { + buf.putLong(lower(value)) + } +} + + +// This template implements a class for working with a Rust struct via a handle +// to the live Rust struct on the other side of the FFI. +// +// There's some subtlety here, because we have to be careful not to operate on a Rust +// struct after it has been dropped, and because we must expose a public API for freeing +// theq Kotlin wrapper object in lieu of reliable finalizers. The core requirements are: +// +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle from the object's state and pass it in to +// the Rust FFI. +// +// * When an instance is no longer needed, its handle should be passed to a +// special destructor function provided by the Rust FFI, which will drop the +// underlying Rust struct. +// +// * Given an instance, calling code is expected to call the special +// `destroy` method in order to free it after use, either by calling it explicitly +// or by using a higher-level helper like the `use` method. Failing to do so risks +// leaking the underlying Rust struct. +// +// * We can't assume that calling code will do the right thing, and must be prepared +// to handle Kotlin method calls executing concurrently with or even after a call to +// `destroy`, and to handle multiple (possibly concurrent!) calls to `destroy`. +// +// * We must never allow Rust code to operate on the underlying Rust struct after +// the destructor has been called, and must never call the destructor more than once. +// Doing so may trigger memory unsafety. +// +// * To mitigate many of the risks of leaking memory and use-after-free unsafety, a `Cleaner` +// is implemented to call the destructor when the Kotlin object becomes unreachable. +// This is done in a background thread. This is not a panacea, and client code should be aware that +// 1. the thread may starve if some there are objects that have poorly performing +// `drop` methods or do significant work in their `drop` methods. +// 2. the thread is shared across the whole library. This can be tuned by using `android_cleaner = true`, +// or `android = true` in the [`kotlin` section of the `uniffi.toml` file](https://mozilla.github.io/uniffi-rs/kotlin/configuration.html). +// +// If we try to implement this with mutual exclusion on access to the handle, there is the +// possibility of a race between a method call and a concurrent call to `destroy`: +// +// * Thread A starts a method call, reads the value of the handle, but is interrupted +// before it can pass the handle over the FFI to Rust. +// * Thread B calls `destroy` and frees the underlying Rust struct. +// * Thread A resumes, passing the already-read handle value to Rust and triggering +// a use-after-free. +// +// One possible solution would be to use a `ReadWriteLock`, with each method call taking +// a read lock (and thus allowed to run concurrently) and the special `destroy` method +// taking a write lock (and thus blocking on live method calls). However, we aim not to +// generate methods with any hidden blocking semantics, and a `destroy` method that might +// block if called incorrectly seems to meet that bar. +// +// So, we achieve our goals by giving each instance an associated `AtomicLong` counter to track +// the number of in-flight method calls, and an `AtomicBoolean` flag to indicate whether `destroy` +// has been called. These are updated according to the following rules: +// +// * The initial value of the counter is 1, indicating a live object with no in-flight calls. +// The initial value for the flag is false. +// +// * At the start of each method call, we atomically check the counter. +// If it is 0 then the underlying Rust struct has already been destroyed and the call is aborted. +// If it is nonzero them we atomically increment it by 1 and proceed with the method call. +// +// * At the end of each method call, we atomically decrement and check the counter. +// If it has reached zero then we destroy the underlying Rust struct. +// +// * When `destroy` is called, we atomically flip the flag from false to true. +// If the flag was already true we silently fail. +// Otherwise we atomically decrement and check the counter. +// If it has reached zero then we destroy the underlying Rust struct. +// +// Astute readers may observe that this all sounds very similar to the way that Rust's `Arc` works, +// and indeed it is, with the addition of a flag to guard against multiple calls to `destroy`. +// +// The overall effect is that the underlying Rust struct is destroyed only when `destroy` has been +// called *and* all in-flight method calls have completed, avoiding violating any of the expectations +// of the underlying Rust code. +// +// This makes a cleaner a better alternative to _not_ calling `destroy()` as +// and when the object is finished with, but the abstraction is not perfect: if the Rust object's `drop` +// method is slow, and/or there are many objects to cleanup, and it's on a low end Android device, then the cleaner +// thread may be starved, and the app will leak memory. +// +// In this case, `destroy`ing manually may be a better solution. +// +// The cleaner can live side by side with the manual calling of `destroy`. In the order of responsiveness, uniffi objects +// with Rust peers are reclaimed: +// +// 1. By calling the `destroy` method of the object, which calls `rustObject.free()`. If that doesn't happen: +// 2. When the object becomes unreachable, AND the Cleaner thread gets to call `rustObject.free()`. If the thread is starved then: +// 3. The memory is reclaimed when the process terminates. +// +// [1] https://stackoverflow.com/questions/24376768/can-java-finalize-an-object-when-it-is-still-in-scope/24380219 +// + + +/** + * Application-facing managed map with version history and optimistic updates. + */ +public interface BindingVersionedMapInterface { + + fun `append`(`mutations`: List): MapVersionRecord + + fun `apply`(`mutations`: List): MapVersionRecord + + fun `applyAtMillis`(`mutations`: List, `timestampMillis`: kotlin.ULong): MapVersionRecord + + fun `applyIf`(`expected`: kotlin.ByteArray?, `mutations`: List): MapUpdateRecord + + fun `applyIfAtMillis`(`expected`: kotlin.ByteArray?, `mutations`: List, `timestampMillis`: kotlin.ULong): MapUpdateRecord + + fun `backup`(): kotlin.ByteArray + + fun `changesSince`(`base`: kotlin.ByteArray): List + + fun `compare`(`base`: kotlin.ByteArray, `target`: kotlin.ByteArray): BindingMapComparison + + fun `compareToHead`(`base`: kotlin.ByteArray): BindingMapComparison + + fun `containsKey`(`key`: kotlin.ByteArray): kotlin.Boolean + + fun `delete`(`key`: kotlin.ByteArray): MapVersionRecord + + fun `deleteIf`(`expected`: kotlin.ByteArray?, `key`: kotlin.ByteArray): MapUpdateRecord + + fun `diff`(`base`: kotlin.ByteArray, `target`: kotlin.ByteArray): List + + fun `edit`(`mutations`: List): MapVersionRecord + + fun `editIf`(`expected`: kotlin.ByteArray?, `mutations`: List): MapUpdateRecord + + fun `get`(`key`: kotlin.ByteArray): kotlin.ByteArray? + + fun `getAt`(`id`: kotlin.ByteArray, `key`: kotlin.ByteArray): kotlin.ByteArray? + + fun `getLargeValue`(`blobStore`: ProllyBlobStore, `key`: kotlin.ByteArray): kotlin.ByteArray? + + fun `getMany`(`keys`: List): List + + fun `getManyAt`(`id`: kotlin.ByteArray, `keys`: List): List + + fun `getValueRef`(`key`: kotlin.ByteArray): ValueRefRecord? + + fun `getValueRefAt`(`id`: kotlin.ByteArray, `key`: kotlin.ByteArray): ValueRefRecord? + + fun `head`(): MapVersionRecord? + + fun `headId`(): kotlin.ByteArray? + + fun `headName`(): kotlin.ByteArray + + fun `id`(): kotlin.ByteArray + + fun `importAsHead`(`bundle`: SnapshotBundleRecord): MapVersionRecord + + fun `importAsHeadAtMillis`(`bundle`: SnapshotBundleRecord, `timestampMillis`: kotlin.ULong): MapVersionRecord + + fun `initialize`(): MapVersionRecord + + fun `initializeSorted`(`entries`: List): MapUpdateRecord + + fun `isInitialized`(): kotlin.Boolean + + fun `keepFor`(`maxAgeMillis`: kotlin.ULong): VersionPruneRecord + + fun `keepForAt`(`nowMillis`: kotlin.ULong, `maxAgeMillis`: kotlin.ULong): VersionPruneRecord + + fun `keepLast`(`count`: kotlin.ULong): VersionPruneRecord + + fun `keepVersions`(`ids`: List): VersionPruneRecord + + fun `parallelApply`(`mutations`: List, `config`: ParallelConfigRecord): VersionedMapBatchResultRecord + + fun `planBlobGc`(`blobStore`: ProllyBlobStore): BlobGcPlanRecord + + fun `planGc`(): GcPlanRecord + + fun `prefix`(`prefix`: kotlin.ByteArray): List + + fun `prefixAt`(`id`: kotlin.ByteArray, `prefix`: kotlin.ByteArray): List + + fun `prefixPage`(`prefix`: kotlin.ByteArray, `cursor`: RangeCursorRecord?, `limit`: kotlin.ULong): RangePageRecord + + fun `prefixPageAt`(`id`: kotlin.ByteArray, `prefix`: kotlin.ByteArray, `cursor`: RangeCursorRecord?, `limit`: kotlin.ULong): RangePageRecord + + fun `prepareMerge`(`base`: kotlin.ByteArray, `candidate`: kotlin.ByteArray): BindingMapMerge + + fun `pruneVersions`(`keepLatest`: kotlin.ULong): VersionPruneRecord + + fun `put`(`key`: kotlin.ByteArray, `value`: kotlin.ByteArray): MapVersionRecord + + fun `putIf`(`expected`: kotlin.ByteArray?, `key`: kotlin.ByteArray, `value`: kotlin.ByteArray): MapUpdateRecord + + fun `putLargeValue`(`blobStore`: ProllyBlobStore, `key`: kotlin.ByteArray, `value`: kotlin.ByteArray, `config`: LargeValueConfigRecord): MapVersionRecord + + fun `putLargeValueIf`(`blobStore`: ProllyBlobStore, `expected`: kotlin.ByteArray?, `key`: kotlin.ByteArray, `value`: kotlin.ByteArray, `config`: LargeValueConfigRecord): MapUpdateRecord + + fun `range`(`start`: kotlin.ByteArray, `rangeEnd`: kotlin.ByteArray?): List + + fun `rangeAt`(`id`: kotlin.ByteArray, `start`: kotlin.ByteArray, `rangeEnd`: kotlin.ByteArray?): List + + fun `rangePage`(`cursor`: RangeCursorRecord?, `rangeEnd`: kotlin.ByteArray?, `limit`: kotlin.ULong): RangePageRecord + + fun `rangePageAt`(`id`: kotlin.ByteArray, `cursor`: RangeCursorRecord?, `rangeEnd`: kotlin.ByteArray?, `limit`: kotlin.ULong): RangePageRecord + + fun `readSession`(): ProllyReadSession? + + fun `rebuildFromEntriesIf`(`expected`: kotlin.ByteArray?, `entries`: List): MapUpdateRecord + + fun `rebuildFromIterIf`(`expected`: kotlin.ByteArray?, `entries`: List): MapUpdateRecord + + fun `rebuildSortedIf`(`expected`: kotlin.ByteArray?, `entries`: List): MapUpdateRecord + + fun `restoreBackup`(`bytes`: kotlin.ByteArray): MapVersionRecord + + fun `retentionPolicy`(): NamedRootRetentionRecord + + fun `rollbackTo`(`id`: kotlin.ByteArray): MapVersionRecord + + fun `scanPrefix`(`prefix`: kotlin.ByteArray, `visitor`: EntryVisitorCallback): ScanOutcomeRecord + + fun `scanPrefixAt`(`id`: kotlin.ByteArray, `prefix`: kotlin.ByteArray, `visitor`: EntryVisitorCallback): ScanOutcomeRecord + + fun `scanRange`(`start`: kotlin.ByteArray, `rangeEnd`: kotlin.ByteArray?, `visitor`: EntryVisitorCallback): ScanOutcomeRecord + + fun `scanRangeAt`(`id`: kotlin.ByteArray, `start`: kotlin.ByteArray, `rangeEnd`: kotlin.ByteArray?, `visitor`: EntryVisitorCallback): ScanOutcomeRecord + + fun `snapshot`(): BindingMapSnapshot? + + fun `snapshotAt`(`id`: kotlin.ByteArray): BindingMapSnapshot? + + fun `subscribe`(): BindingMapSubscription + + fun `subscribeFrom`(`lastSeen`: kotlin.ByteArray?): BindingMapSubscription + + fun `sweepBlobGc`(`blobStore`: ProllyBlobStore): BlobGcSweepRecord + + fun `sweepGc`(): GcSweepRecord + + fun `verifyCatalog`(): MapCatalogVerificationRecord + + fun `version`(`id`: kotlin.ByteArray): MapVersionRecord? + + fun `versions`(): List + + fun `versionsPrefix`(): kotlin.ByteArray + + companion object +} + +/** + * Application-facing managed map with version history and optimistic updates. + */ +open class BindingVersionedMap: Disposable, AutoCloseable, BindingVersionedMapInterface { @Suppress("UNUSED_PARAMETER") @@ -25235,6 +25783,8 @@ data class CompositeBuildOrRebuildOutcomeRecord ( , var `pq`: BindingProductQuantizer? , + var `turboquant`: BindingTurboQuantizer? + , var `reasons`: List , var `compositeStats`: CompositeBuildStatsRecord @@ -25242,6 +25792,8 @@ data class CompositeBuildOrRebuildOutcomeRecord ( var `hnswStats`: HnswBuildStatsRecord? , var `pqStats`: ProductQuantizationBuildStatsRecord? + , + var `turboquantStats`: TurboQuantizationBuildStatsRecord? ): Disposable{ @@ -25257,10 +25809,12 @@ data class CompositeBuildOrRebuildOutcomeRecord ( this.`composite`, this.`hnsw`, this.`pq`, + this.`turboquant`, this.`reasons`, this.`compositeStats`, this.`hnswStats`, - this.`pqStats` + this.`pqStats`, + this.`turboquantStats` ) } @@ -25277,10 +25831,12 @@ public object FfiConverterTypeCompositeBuildOrRebuildOutcomeRecord: FfiConverter FfiConverterOptionalTypeBindingCompositeAccelerator.read(buf), FfiConverterOptionalTypeBindingHnswIndex.read(buf), FfiConverterOptionalTypeBindingProductQuantizer.read(buf), + FfiConverterOptionalTypeBindingTurboQuantizer.read(buf), FfiConverterSequenceTypeFullRebuildReasonRecord.read(buf), FfiConverterTypeCompositeBuildStatsRecord.read(buf), FfiConverterOptionalTypeHnswBuildStatsRecord.read(buf), FfiConverterOptionalTypeProductQuantizationBuildStatsRecord.read(buf), + FfiConverterOptionalTypeTurboQuantizationBuildStatsRecord.read(buf), ) } @@ -25289,10 +25845,12 @@ public object FfiConverterTypeCompositeBuildOrRebuildOutcomeRecord: FfiConverter FfiConverterOptionalTypeBindingCompositeAccelerator.allocationSize(value.`composite`) + FfiConverterOptionalTypeBindingHnswIndex.allocationSize(value.`hnsw`) + FfiConverterOptionalTypeBindingProductQuantizer.allocationSize(value.`pq`) + + FfiConverterOptionalTypeBindingTurboQuantizer.allocationSize(value.`turboquant`) + FfiConverterSequenceTypeFullRebuildReasonRecord.allocationSize(value.`reasons`) + FfiConverterTypeCompositeBuildStatsRecord.allocationSize(value.`compositeStats`) + FfiConverterOptionalTypeHnswBuildStatsRecord.allocationSize(value.`hnswStats`) + - FfiConverterOptionalTypeProductQuantizationBuildStatsRecord.allocationSize(value.`pqStats`) + FfiConverterOptionalTypeProductQuantizationBuildStatsRecord.allocationSize(value.`pqStats`) + + FfiConverterOptionalTypeTurboQuantizationBuildStatsRecord.allocationSize(value.`turboquantStats`) ) override fun write(value: CompositeBuildOrRebuildOutcomeRecord, buf: ByteBuffer) { @@ -25300,10 +25858,12 @@ public object FfiConverterTypeCompositeBuildOrRebuildOutcomeRecord: FfiConverter FfiConverterOptionalTypeBindingCompositeAccelerator.write(value.`composite`, buf) FfiConverterOptionalTypeBindingHnswIndex.write(value.`hnsw`, buf) FfiConverterOptionalTypeBindingProductQuantizer.write(value.`pq`, buf) + FfiConverterOptionalTypeBindingTurboQuantizer.write(value.`turboquant`, buf) FfiConverterSequenceTypeFullRebuildReasonRecord.write(value.`reasons`, buf) FfiConverterTypeCompositeBuildStatsRecord.write(value.`compositeStats`, buf) FfiConverterOptionalTypeHnswBuildStatsRecord.write(value.`hnswStats`, buf) FfiConverterOptionalTypeProductQuantizationBuildStatsRecord.write(value.`pqStats`, buf) + FfiConverterOptionalTypeTurboQuantizationBuildStatsRecord.write(value.`turboquantStats`, buf) } } @@ -25446,6 +26006,10 @@ data class CompositeRebuildOptionsRecord ( var `pqWorkerThreads`: kotlin.ULong , var `pqLimits`: ProductQuantizationBuildLimitsRecord + , + var `turboquantWorkerThreads`: kotlin.ULong + , + var `turboquantLimits`: TurboQuantizationBuildLimitsRecord ){ @@ -25465,19 +26029,25 @@ public object FfiConverterTypeCompositeRebuildOptionsRecord: FfiConverterRustBuf FfiConverterTypeHnswBuildLimitsRecord.read(buf), FfiConverterULong.read(buf), FfiConverterTypeProductQuantizationBuildLimitsRecord.read(buf), + FfiConverterULong.read(buf), + FfiConverterTypeTurboQuantizationBuildLimitsRecord.read(buf), ) } override fun allocationSize(value: CompositeRebuildOptionsRecord) = ( FfiConverterTypeHnswBuildLimitsRecord.allocationSize(value.`hnswLimits`) + FfiConverterULong.allocationSize(value.`pqWorkerThreads`) + - FfiConverterTypeProductQuantizationBuildLimitsRecord.allocationSize(value.`pqLimits`) + FfiConverterTypeProductQuantizationBuildLimitsRecord.allocationSize(value.`pqLimits`) + + FfiConverterULong.allocationSize(value.`turboquantWorkerThreads`) + + FfiConverterTypeTurboQuantizationBuildLimitsRecord.allocationSize(value.`turboquantLimits`) ) override fun write(value: CompositeRebuildOptionsRecord, buf: ByteBuffer) { FfiConverterTypeHnswBuildLimitsRecord.write(value.`hnswLimits`, buf) FfiConverterULong.write(value.`pqWorkerThreads`, buf) FfiConverterTypeProductQuantizationBuildLimitsRecord.write(value.`pqLimits`, buf) + FfiConverterULong.write(value.`turboquantWorkerThreads`, buf) + FfiConverterTypeTurboQuantizationBuildLimitsRecord.write(value.`turboquantLimits`, buf) } } @@ -30208,6 +30778,8 @@ data class ProximitySearchRequestRecord ( var `hnswEfSearch`: kotlin.UInt? , var `pqRerankMultiplier`: kotlin.UShort? + , + var `turboquantRerankMultiplier`: kotlin.UShort? ){ @@ -30234,6 +30806,7 @@ public object FfiConverterTypeProximitySearchRequestRecord: FfiConverterRustBuff FfiConverterTypeSearchBackendRecord.read(buf), FfiConverterOptionalUInt.read(buf), FfiConverterOptionalUShort.read(buf), + FfiConverterOptionalUShort.read(buf), ) } @@ -30247,7 +30820,8 @@ public object FfiConverterTypeProximitySearchRequestRecord: FfiConverterRustBuff FfiConverterTypeQueryKernelRecord.allocationSize(value.`kernel`) + FfiConverterTypeSearchBackendRecord.allocationSize(value.`backend`) + FfiConverterOptionalUInt.allocationSize(value.`hnswEfSearch`) + - FfiConverterOptionalUShort.allocationSize(value.`pqRerankMultiplier`) + FfiConverterOptionalUShort.allocationSize(value.`pqRerankMultiplier`) + + FfiConverterOptionalUShort.allocationSize(value.`turboquantRerankMultiplier`) ) override fun write(value: ProximitySearchRequestRecord, buf: ByteBuffer) { @@ -30261,6 +30835,7 @@ public object FfiConverterTypeProximitySearchRequestRecord: FfiConverterRustBuff FfiConverterTypeSearchBackendRecord.write(value.`backend`, buf) FfiConverterOptionalUInt.write(value.`hnswEfSearch`, buf) FfiConverterOptionalUShort.write(value.`pqRerankMultiplier`, buf) + FfiConverterOptionalUShort.write(value.`turboquantRerankMultiplier`, buf) } } @@ -30329,6 +30904,8 @@ data class ProximitySearchRuntimePolicyRecord ( var `hnswMaxBytes`: kotlin.ULong , var `pqMaxBytes`: kotlin.ULong + , + var `turboquantMaxBytes`: kotlin.ULong ){ @@ -30350,6 +30927,7 @@ public object FfiConverterTypeProximitySearchRuntimePolicyRecord: FfiConverterRu FfiConverterULong.read(buf), FfiConverterULong.read(buf), FfiConverterULong.read(buf), + FfiConverterULong.read(buf), ) } @@ -30358,7 +30936,8 @@ public object FfiConverterTypeProximitySearchRuntimePolicyRecord: FfiConverterRu FfiConverterULong.allocationSize(value.`maxBytes`) + FfiConverterULong.allocationSize(value.`authoritativeMaxBytes`) + FfiConverterULong.allocationSize(value.`hnswMaxBytes`) + - FfiConverterULong.allocationSize(value.`pqMaxBytes`) + FfiConverterULong.allocationSize(value.`pqMaxBytes`) + + FfiConverterULong.allocationSize(value.`turboquantMaxBytes`) ) override fun write(value: ProximitySearchRuntimePolicyRecord, buf: ByteBuffer) { @@ -30367,6 +30946,7 @@ public object FfiConverterTypeProximitySearchRuntimePolicyRecord: FfiConverterRu FfiConverterULong.write(value.`authoritativeMaxBytes`, buf) FfiConverterULong.write(value.`hnswMaxBytes`, buf) FfiConverterULong.write(value.`pqMaxBytes`, buf) + FfiConverterULong.write(value.`turboquantMaxBytes`, buf) } } @@ -33491,6 +34071,298 @@ public object FfiConverterTypeTreeStatsRecord: FfiConverterRustBuffer { + override fun read(buf: ByteBuffer): TurboQuantizationBuildLimitsRecord { + return TurboQuantizationBuildLimitsRecord( + FfiConverterOptionalULong.read(buf), + FfiConverterOptionalULong.read(buf), + FfiConverterOptionalULong.read(buf), + FfiConverterOptionalULong.read(buf), + FfiConverterOptionalULong.read(buf), + FfiConverterOptionalULong.read(buf), + ) + } + + override fun allocationSize(value: TurboQuantizationBuildLimitsRecord) = ( + FfiConverterOptionalULong.allocationSize(value.`maxRecords`) + + FfiConverterOptionalULong.allocationSize(value.`maxInputBytes`) + + FfiConverterOptionalULong.allocationSize(value.`maxTemporaryBytes`) + + FfiConverterOptionalULong.allocationSize(value.`maxTransformOperations`) + + FfiConverterOptionalULong.allocationSize(value.`maxEncodedOutputBytes`) + + FfiConverterOptionalULong.allocationSize(value.`maxWorkerThreads`) + ) + + override fun write(value: TurboQuantizationBuildLimitsRecord, buf: ByteBuffer) { + FfiConverterOptionalULong.write(value.`maxRecords`, buf) + FfiConverterOptionalULong.write(value.`maxInputBytes`, buf) + FfiConverterOptionalULong.write(value.`maxTemporaryBytes`, buf) + FfiConverterOptionalULong.write(value.`maxTransformOperations`, buf) + FfiConverterOptionalULong.write(value.`maxEncodedOutputBytes`, buf) + FfiConverterOptionalULong.write(value.`maxWorkerThreads`, buf) + } +} + + + +data class TurboQuantizationBuildResultRecord ( + var `index`: BindingTurboQuantizer + , + var `stats`: TurboQuantizationBuildStatsRecord + +): Disposable{ + + + + + + @Suppress("UNNECESSARY_SAFE_CALL") // codegen is much simpler if we unconditionally emit safe calls here + override fun destroy() { + + Disposable.destroy( + this.`index`, + this.`stats` + ) + } + + companion object +} + +/** + * @suppress + */ +public object FfiConverterTypeTurboQuantizationBuildResultRecord: FfiConverterRustBuffer { + override fun read(buf: ByteBuffer): TurboQuantizationBuildResultRecord { + return TurboQuantizationBuildResultRecord( + FfiConverterTypeBindingTurboQuantizer.read(buf), + FfiConverterTypeTurboQuantizationBuildStatsRecord.read(buf), + ) + } + + override fun allocationSize(value: TurboQuantizationBuildResultRecord) = ( + FfiConverterTypeBindingTurboQuantizer.allocationSize(value.`index`) + + FfiConverterTypeTurboQuantizationBuildStatsRecord.allocationSize(value.`stats`) + ) + + override fun write(value: TurboQuantizationBuildResultRecord, buf: ByteBuffer) { + FfiConverterTypeBindingTurboQuantizer.write(value.`index`, buf) + FfiConverterTypeTurboQuantizationBuildStatsRecord.write(value.`stats`, buf) + } +} + + + +data class TurboQuantizationBuildStatsRecord ( + var `encodedVectors`: kotlin.ULong + , + var `zeroVectors`: kotlin.ULong + , + var `transformedComponents`: kotlin.ULong + , + var `butterflyOperations`: kotlin.ULong + , + var `inputBytes`: kotlin.ULong + , + var `encodedOutputBytes`: kotlin.ULong + , + var `peakTemporaryBytes`: kotlin.ULong + +){ + + + + + + companion object +} + +/** + * @suppress + */ +public object FfiConverterTypeTurboQuantizationBuildStatsRecord: FfiConverterRustBuffer { + override fun read(buf: ByteBuffer): TurboQuantizationBuildStatsRecord { + return TurboQuantizationBuildStatsRecord( + FfiConverterULong.read(buf), + FfiConverterULong.read(buf), + FfiConverterULong.read(buf), + FfiConverterULong.read(buf), + FfiConverterULong.read(buf), + FfiConverterULong.read(buf), + FfiConverterULong.read(buf), + ) + } + + override fun allocationSize(value: TurboQuantizationBuildStatsRecord) = ( + FfiConverterULong.allocationSize(value.`encodedVectors`) + + FfiConverterULong.allocationSize(value.`zeroVectors`) + + FfiConverterULong.allocationSize(value.`transformedComponents`) + + FfiConverterULong.allocationSize(value.`butterflyOperations`) + + FfiConverterULong.allocationSize(value.`inputBytes`) + + FfiConverterULong.allocationSize(value.`encodedOutputBytes`) + + FfiConverterULong.allocationSize(value.`peakTemporaryBytes`) + ) + + override fun write(value: TurboQuantizationBuildStatsRecord, buf: ByteBuffer) { + FfiConverterULong.write(value.`encodedVectors`, buf) + FfiConverterULong.write(value.`zeroVectors`, buf) + FfiConverterULong.write(value.`transformedComponents`, buf) + FfiConverterULong.write(value.`butterflyOperations`, buf) + FfiConverterULong.write(value.`inputBytes`, buf) + FfiConverterULong.write(value.`encodedOutputBytes`, buf) + FfiConverterULong.write(value.`peakTemporaryBytes`, buf) + } +} + + + +data class TurboQuantizationConfigRecord ( + var `bitWidth`: kotlin.UByte + , + var `rerankMultiplier`: kotlin.UInt + , + var `seed`: kotlin.ULong + +){ + + + + + + companion object +} + +/** + * @suppress + */ +public object FfiConverterTypeTurboQuantizationConfigRecord: FfiConverterRustBuffer { + override fun read(buf: ByteBuffer): TurboQuantizationConfigRecord { + return TurboQuantizationConfigRecord( + FfiConverterUByte.read(buf), + FfiConverterUInt.read(buf), + FfiConverterULong.read(buf), + ) + } + + override fun allocationSize(value: TurboQuantizationConfigRecord) = ( + FfiConverterUByte.allocationSize(value.`bitWidth`) + + FfiConverterUInt.allocationSize(value.`rerankMultiplier`) + + FfiConverterULong.allocationSize(value.`seed`) + ) + + override fun write(value: TurboQuantizationConfigRecord, buf: ByteBuffer) { + FfiConverterUByte.write(value.`bitWidth`, buf) + FfiConverterUInt.write(value.`rerankMultiplier`, buf) + FfiConverterULong.write(value.`seed`, buf) + } +} + + + +data class TurboQuantizationQualityRecord ( + var `meanSquaredError`: kotlin.Double + , + var `maximumSquaredError`: kotlin.Double + +){ + + + + + + companion object +} + +/** + * @suppress + */ +public object FfiConverterTypeTurboQuantizationQualityRecord: FfiConverterRustBuffer { + override fun read(buf: ByteBuffer): TurboQuantizationQualityRecord { + return TurboQuantizationQualityRecord( + FfiConverterDouble.read(buf), + FfiConverterDouble.read(buf), + ) + } + + override fun allocationSize(value: TurboQuantizationQualityRecord) = ( + FfiConverterDouble.allocationSize(value.`meanSquaredError`) + + FfiConverterDouble.allocationSize(value.`maximumSquaredError`) + ) + + override fun write(value: TurboQuantizationQualityRecord, buf: ByteBuffer) { + FfiConverterDouble.write(value.`meanSquaredError`, buf) + FfiConverterDouble.write(value.`maximumSquaredError`, buf) + } +} + + + +data class TurboQuantizationVerificationRecord ( + var `encodedVectors`: kotlin.ULong + , + var `zeroVectors`: kotlin.ULong + , + var `quality`: TurboQuantizationQualityRecord + +){ + + + + + + companion object +} + +/** + * @suppress + */ +public object FfiConverterTypeTurboQuantizationVerificationRecord: FfiConverterRustBuffer { + override fun read(buf: ByteBuffer): TurboQuantizationVerificationRecord { + return TurboQuantizationVerificationRecord( + FfiConverterULong.read(buf), + FfiConverterULong.read(buf), + FfiConverterTypeTurboQuantizationQualityRecord.read(buf), + ) + } + + override fun allocationSize(value: TurboQuantizationVerificationRecord) = ( + FfiConverterULong.allocationSize(value.`encodedVectors`) + + FfiConverterULong.allocationSize(value.`zeroVectors`) + + FfiConverterTypeTurboQuantizationQualityRecord.allocationSize(value.`quality`) + ) + + override fun write(value: TurboQuantizationVerificationRecord, buf: ByteBuffer) { + FfiConverterULong.write(value.`encodedVectors`, buf) + FfiConverterULong.write(value.`zeroVectors`, buf) + FfiConverterTypeTurboQuantizationQualityRecord.write(value.`quality`, buf) + } +} + + + data class TypedContentObjectRecord ( var `kind`: ContentObjectKindRecord , @@ -33978,7 +34850,8 @@ enum class CatalogAcceleratorKindRecord { HNSW, PRODUCT_QUANTIZED, - COMPOSITE; + COMPOSITE, + TURBO_QUANTIZED; @@ -34012,7 +34885,8 @@ public object FfiConverterTypeCatalogAcceleratorKindRecord: FfiConverterRustBuff enum class CompositeBaseKindRecord { HNSW, - PRODUCT_QUANTIZED; + PRODUCT_QUANTIZED, + TURBO_QUANTIZED; @@ -34048,7 +34922,8 @@ enum class CompositeBuildOrRebuildKindRecord { COMPOSITE, NO_ACCELERATOR_REQUIRED, HNSW_REBUILT, - PRODUCT_QUANTIZED_REBUILT; + PRODUCT_QUANTIZED_REBUILT, + TURBO_QUANTIZED_REBUILT; @@ -34092,7 +34967,8 @@ enum class ContentObjectKindRecord { HNSW_MANIFEST, HNSW_PAGE, COMPOSITE_ACCELERATOR, - ACCELERATOR_CATALOG; + ACCELERATOR_CATALOG, + TURBO_QUANTIZATION; @@ -35182,7 +36058,8 @@ enum class SearchBackendRecord { PRODUCT_QUANTIZED, HNSW, COMPOSITE, - AUTO; + AUTO, + TURBO_QUANTIZED; @@ -35809,6 +36686,38 @@ public object FfiConverterOptionalTypeBindingProximitySearchRuntime: FfiConverte +/** + * @suppress + */ +public object FfiConverterOptionalTypeBindingTurboQuantizer: FfiConverterRustBuffer { + override fun read(buf: ByteBuffer): BindingTurboQuantizer? { + if (buf.get().toInt() == 0) { + return null + } + return FfiConverterTypeBindingTurboQuantizer.read(buf) + } + + override fun allocationSize(value: BindingTurboQuantizer?): ULong { + if (value == null) { + return 1UL + } else { + return 1UL + FfiConverterTypeBindingTurboQuantizer.allocationSize(value) + } + } + + override fun write(value: BindingTurboQuantizer?, buf: ByteBuffer) { + if (value == null) { + buf.put(0) + } else { + buf.put(1) + FfiConverterTypeBindingTurboQuantizer.write(value, buf) + } + } +} + + + + /** * @suppress */ @@ -36641,6 +37550,38 @@ public object FfiConverterOptionalTypeTreeRecord: FfiConverterRustBuffer { + override fun read(buf: ByteBuffer): TurboQuantizationBuildStatsRecord? { + if (buf.get().toInt() == 0) { + return null + } + return FfiConverterTypeTurboQuantizationBuildStatsRecord.read(buf) + } + + override fun allocationSize(value: TurboQuantizationBuildStatsRecord?): ULong { + if (value == null) { + return 1UL + } else { + return 1UL + FfiConverterTypeTurboQuantizationBuildStatsRecord.allocationSize(value) + } + } + + override fun write(value: TurboQuantizationBuildStatsRecord?, buf: ByteBuffer) { + if (value == null) { + buf.put(0) + } else { + buf.put(1) + FfiConverterTypeTurboQuantizationBuildStatsRecord.write(value, buf) + } + } +} + + + + /** * @suppress */ @@ -39570,6 +40511,26 @@ public object FfiConverterSequenceOptionalByteArray: FfiConverterRustBuffer + UniffiLib.uniffi_prolly_bindings_fn_func_default_turboquant_build_limits( + + _status) +} + ) + } + + fun `defaultTurboquantConfig`(): TurboQuantizationConfigRecord { + return FfiConverterTypeTurboQuantizationConfigRecord.lift( + uniffiRustCall() { _status -> + UniffiLib.uniffi_prolly_bindings_fn_func_default_turboquant_config( + + _status) +} + ) + } + fun `exactProximitySearchRequest`(`query`: List, `k`: kotlin.ULong): ProximitySearchRequestRecord { return FfiConverterTypeProximitySearchRequestRecord.lift( uniffiRustCall() { _status -> diff --git a/bindings/kotlin/src/test/kotlin/build/crab/prolly/PortableParityTest.kt b/bindings/kotlin/src/test/kotlin/build/crab/prolly/PortableParityTest.kt index a32fd8d1..5d9ddc31 100644 --- a/bindings/kotlin/src/test/kotlin/build/crab/prolly/PortableParityTest.kt +++ b/bindings/kotlin/src/test/kotlin/build/crab/prolly/PortableParityTest.kt @@ -248,6 +248,99 @@ class PortableParityTest { } } + @Test + fun turboQuantizerLifecycleIsPortableAndVerified() { + ProllyNative.useLocalDebugLibrary() + Engine.memory().use { engine -> + engine.buildProximity( + 8u, + (0 until 16).map { index -> + ProximityRecord( + "turbo-%02d".format(index).bytes(), + listOf(index.toFloat(), (index % 3).toFloat(), 0f, 1f, 0f, 0f, 0f, 0f), + "value-%02d".format(index).bytes(), + ) + }, + ).use { proximity -> + val config = TurboQuantizationConfigRecord( + bitWidth = 4u, + rerankMultiplier = 4u, + seed = ULong.MAX_VALUE, + ) + val built = proximity.buildTurboquant(config, workerThreads = 2uL) + assertEquals(16uL, built.stats.encodedVectors) + val request = exactProximitySearchRequest( + listOf(0f, 0f, 0f, 1f, 0f, 0f, 0f, 0f), 3uL, + ).copy( + policy = SearchPolicyKind.FIXED_BUDGET, + backend = SearchBackendRecord.TURBO_QUANTIZED, + ) + built.index.use { index -> + assertEquals(config, index.config) + assertArrayEquals(proximity.descriptor, index.sourceDescriptor) + assertEquals(16uL, index.verify(proximity).encodedVectors) + val result = index.search(proximity, request) + assertEquals(SearchBackendRecord.TURBO_QUANTIZED, result.backend) + assertArrayEquals("turbo-00".bytes(), result.neighbors.first().key) + assertEquals(true, result.stats.distanceEvaluations > 0uL) + ProximityCancellationToken().use { cancellation -> + cancellation.cancel() + val cancelled = index.searchCancellable( + proximity, request, cancellation = cancellation, + ) + assertEquals(SearchCompletionRecord.CANCELLED, cancelled.completion) + assertEquals(emptyList(), cancelled.neighbors) + } + val manifest = index.manifest + index.proveSearch(proximity, request).use { proof -> + assertEquals( + SearchBackendRecord.TURBO_QUANTIZED, + proof.verify(proximity.descriptor).result.backend, + ) + } + proximity.buildAcceleratorCatalog(turboquant = index).use { catalog -> + assertEquals( + CatalogAcceleratorKindRecord.TURBO_QUANTIZED, + catalog.entries.single().kind, + ) + assertEquals( + SearchBackendRecord.TURBO_QUANTIZED, + catalog.search(proximity, request).backend, + ) + } + val (current, _) = proximity.mutate( + listOf( + ProximityMutationRecord( + "turbo-00".bytes(), + listOf(0.25f, 0f, 0f, 1f, 0f, 0f, 0f, 0f), + "updated".bytes(), + ), + ), + ) + current.use { + val composite = current.buildCompositeTurboquant(proximity, index).accelerator + requireNotNull(composite).use { + assertEquals( + CompositeBaseKindRecord.TURBO_QUANTIZED, + composite.baseKind, + ) + assertEquals( + SearchBackendRecord.COMPOSITE, + composite.search( + current, + request.copy(backend = SearchBackendRecord.COMPOSITE), + ).backend, + ) + } + } + proximity.loadTurboquant(manifest).use { loaded -> + assertArrayEquals(manifest, loaded.manifest) + } + } + } + } + } + @Test fun hnswAcceleratorLifecycleIsPortable() { ProllyNative.useLocalDebugLibrary() @@ -322,6 +415,7 @@ class PortableParityTest { backend = SearchBackendRecord.AUTO, hnswEfSearch = null, pqRerankMultiplier = null, + turboquantRerankMultiplier = null, ) val result = proximity.search(request) diff --git a/bindings/node/COOKBOOK.md b/bindings/node/COOKBOOK.md index 08089151..75a8035f 100644 --- a/bindings/node/COOKBOOK.md +++ b/bindings/node/COOKBOOK.md @@ -27,6 +27,48 @@ Application-style files include `batch-build.ts`, `local-first-state.ts`, `vector-sidecar.ts`, `provenance-values.ts`, `materialized-view.ts`, `filesystem-snapshot.ts`, and `durable-sqlite.ts`. +## Build And Force A TurboQuant RAG Sidecar + +TurboQuant is a disposable candidate-routing sidecar. Results below are still +reranked from the authoritative full-precision vectors. Select it explicitly; +`Auto` remains disabled until qualification passes. + +```ts +import assert from "node:assert/strict"; +import { Engine, exactSearch } from "./src/index.ts"; + +const bytes = (value: string): Buffer => Buffer.from(value); +const engine = await Engine.memory(); +try { + const records = Array.from({ length: 32 }, (_, index) => ({ + key: bytes(`chunk/${index.toString().padStart(2, "0")}`), + vector: new Float32Array([index, index % 3, 0, 1, 2, 3, 4, 5]), + value: bytes(`document-${index.toString().padStart(2, "0")}`), + })); + const proximity = await engine.buildProximity(8, records); + try { + const built = await proximity.buildTurboQuant({ workerThreads: 2n }); + const request = { + ...exactSearch(new Float32Array([0, 0, 0, 1, 2, 3, 4, 5]), 3), + policy: "fixed_budget" as const, + backend: "turbo_quantized" as const, + }; + const index = built.index; + const manifest = index.manifest(); + assert.equal(index.verify(proximity).encodedVectors, 32n); + assert.equal((await index.search(proximity, request)).backend, "turbo_quantized"); + index.close(); + + const reopened = proximity.loadTurboQuant(manifest); + reopened.close(); + } finally { + proximity.close(); + } +} finally { + engine.close(); +} +``` + ## Create A Durable Index ```ts diff --git a/bindings/node/index.cjs b/bindings/node/index.cjs index 94a83731..745d2587 100644 --- a/bindings/node/index.cjs +++ b/bindings/node/index.cjs @@ -310,7 +310,7 @@ if (!nativeBinding) { throw new Error(`Failed to load native binding`) } -const { NodePortableProximityMutationResult, defaultProximitySearchRuntimePolicy, NativePortableVersionedMap, NativePortableMapComparison, NativePortableMapSubscription, NativePortableMapMerge, NativePortableVersionedTransaction, NativePortableMapSnapshot, NativePortableReadSession, NativePortableKeyProof, NativePortableMultiKeyProof, NativePortableRangeProof, NativePortableProvedRangePage, NativePortableIndexRegistry, NativePortableIndexedMap, NativePortableIndexedSnapshot, NativePortableSecondaryIndex, NativePortableProximitySearchRuntime, NativePortableProximityCancellationToken, NativePortableHnswBuildResult, NativePortableHnswIndex, NativePortablePqBuildResult, NativePortableProductQuantizer, NativePortableCompositeBuildResult, NativePortableCompositeBuildOrRebuildResult, NativePortableCompositeAccelerator, NativePortableAcceleratorCatalog, NativePortableProximityMap, NativePortableProximityStructuralProof, NativePortableProximityReadSession, NativePortableProximityProof, NativePortableProximitySearchProof, NativeRemoteProllyEngine, NativeRemoteProllyTransaction, NativeProllyBlobStore, NativeMergePolicyRegistry, NativeHostStore, NativeProllyTransaction, NativeProllyEngine, cidFromBytes, nodeBytesRoundTrip, nodeCidFromBytes, verifyKeyProof, verifyMultiKeyProof, verifyRangeProof, verifyRangePageProof, verifyDiffPageProof, keyProofToBytes, keyProofFromBytes, multiKeyProofToBytes, multiKeyProofFromBytes, rangeProofToBytes, rangeProofFromBytes, rangePageProofToBytes, rangePageProofFromBytes, diffPageProofToBytes, diffPageProofFromBytes, inspectProofBundle, verifyProofBundle, signProofBundleHmacSha256, verifyAuthenticatedProofEnvelope, verifyAuthenticatedProofBundle, authenticatedProofEnvelopeToBytes, authenticatedProofEnvelopeFromBytes, keyProofFromNodeBytes, multiKeyProofFromNodeBytes, rangeProofFromNodeBytes, rangePageProofFromNodeBytes, prefixEnd, prefixRange, rangeCursorStart, rangeCursorAfterKey, reverseCursorEnd, reverseCursorBeforeKey, upsertMutation, deleteMutation, resolutionValue, resolutionDelete, resolutionUnresolved, resolvePreferLeft, resolvePreferRight, resolveDeleteWins, resolveUpdateWins, crdtResolutionValue, crdtResolutionDelete, u64Key, u128Key, i64Key, i128Key, timestampMillisKey, encodeSegment, keyFromSegments, keyFromPrefixedSegments, changedSpan, changedSpanFromKey, changedSpanForPrefix, retainAllNamedRoots, retainExactNamedRoots, retainNamedRootPrefix, retainNewestNamedRoots, retainNamedRootsUpdatedSince, decodeSegments, debugKey, snapshotNamespaceBranch, snapshotNamespaceTag, snapshotNamespaceCheckpoint, snapshotNamespaceCustom, snapshotRootName, snapshotIdFromName, versionedValueBytesRoundTrip, versionedValueBytesMatchesSchema, versionedValueBytesRequireSchema, valueRefBytesRoundTrip, valueRefFromStoredBytes, valueRefInlineRequiresEscape, blobRefValidateBytes, rootManifestBytesRoundTrip, snapshotBundleToBytes, snapshotBundleFromBytes, snapshotBundleDigest, snapshotBundleDigestBytes, snapshotBundleSummary, snapshotBundleSummaryFromBytes, verifySnapshotBundle, verifySnapshotBundleBytes, defaultConfig, encodingRaw, encodingCbor, encodingJson, encodingCustom, treeConfig, defaultLargeValueConfig, largeValueConfig, defaultParallelConfig, parallelConfig, parallelConfigSequential, crdtConfigLww, crdtConfigMultiValue, timestampedValueToBytes, timestampedValueFromBytes, timestampedValueNow, multiValueSetToBytes, multiValueSetFromBytes, multiValueSetMerge, tombstoneToBytes, tombstoneFromBytes, tombstoneFromStoredBytes, isTombstoneValue, tombstoneUpsertMutation, tombstoneCompactionMutation } = nativeBinding +const { NodePortableProximityMutationResult, defaultProximitySearchRuntimePolicy, NativePortableVersionedMap, NativePortableMapComparison, NativePortableMapSubscription, NativePortableMapMerge, NativePortableVersionedTransaction, NativePortableMapSnapshot, NativePortableReadSession, NativePortableKeyProof, NativePortableMultiKeyProof, NativePortableRangeProof, NativePortableProvedRangePage, NativePortableIndexRegistry, NativePortableIndexedMap, NativePortableIndexedSnapshot, NativePortableSecondaryIndex, NativePortableProximitySearchRuntime, NativePortableProximityCancellationToken, NativePortableHnswBuildResult, NativePortableHnswIndex, NativePortablePqBuildResult, NativePortableProductQuantizer, NativePortableTurboQuantBuildResult, NativePortableTurboQuantizer, NativePortableCompositeBuildResult, NativePortableCompositeBuildOrRebuildResult, NativePortableCompositeAccelerator, NativePortableAcceleratorCatalog, NativePortableProximityMap, NativePortableProximityStructuralProof, NativePortableProximityReadSession, NativePortableProximityProof, NativePortableProximitySearchProof, NativeRemoteProllyEngine, NativeRemoteProllyTransaction, NativeProllyBlobStore, NativeMergePolicyRegistry, NativeHostStore, NativeProllyTransaction, NativeProllyEngine, cidFromBytes, nodeBytesRoundTrip, nodeCidFromBytes, verifyKeyProof, verifyMultiKeyProof, verifyRangeProof, verifyRangePageProof, verifyDiffPageProof, keyProofToBytes, keyProofFromBytes, multiKeyProofToBytes, multiKeyProofFromBytes, rangeProofToBytes, rangeProofFromBytes, rangePageProofToBytes, rangePageProofFromBytes, diffPageProofToBytes, diffPageProofFromBytes, inspectProofBundle, verifyProofBundle, signProofBundleHmacSha256, verifyAuthenticatedProofEnvelope, verifyAuthenticatedProofBundle, authenticatedProofEnvelopeToBytes, authenticatedProofEnvelopeFromBytes, keyProofFromNodeBytes, multiKeyProofFromNodeBytes, rangeProofFromNodeBytes, rangePageProofFromNodeBytes, prefixEnd, prefixRange, rangeCursorStart, rangeCursorAfterKey, reverseCursorEnd, reverseCursorBeforeKey, upsertMutation, deleteMutation, resolutionValue, resolutionDelete, resolutionUnresolved, resolvePreferLeft, resolvePreferRight, resolveDeleteWins, resolveUpdateWins, crdtResolutionValue, crdtResolutionDelete, u64Key, u128Key, i64Key, i128Key, timestampMillisKey, encodeSegment, keyFromSegments, keyFromPrefixedSegments, changedSpan, changedSpanFromKey, changedSpanForPrefix, retainAllNamedRoots, retainExactNamedRoots, retainNamedRootPrefix, retainNewestNamedRoots, retainNamedRootsUpdatedSince, decodeSegments, debugKey, snapshotNamespaceBranch, snapshotNamespaceTag, snapshotNamespaceCheckpoint, snapshotNamespaceCustom, snapshotRootName, snapshotIdFromName, versionedValueBytesRoundTrip, versionedValueBytesMatchesSchema, versionedValueBytesRequireSchema, valueRefBytesRoundTrip, valueRefFromStoredBytes, valueRefInlineRequiresEscape, blobRefValidateBytes, rootManifestBytesRoundTrip, snapshotBundleToBytes, snapshotBundleFromBytes, snapshotBundleDigest, snapshotBundleDigestBytes, snapshotBundleSummary, snapshotBundleSummaryFromBytes, verifySnapshotBundle, verifySnapshotBundleBytes, defaultConfig, encodingRaw, encodingCbor, encodingJson, encodingCustom, treeConfig, defaultLargeValueConfig, largeValueConfig, defaultParallelConfig, parallelConfig, parallelConfigSequential, crdtConfigLww, crdtConfigMultiValue, timestampedValueToBytes, timestampedValueFromBytes, timestampedValueNow, multiValueSetToBytes, multiValueSetFromBytes, multiValueSetMerge, tombstoneToBytes, tombstoneFromBytes, tombstoneFromStoredBytes, isTombstoneValue, tombstoneUpsertMutation, tombstoneCompactionMutation } = nativeBinding module.exports.NodePortableProximityMutationResult = NodePortableProximityMutationResult module.exports.defaultProximitySearchRuntimePolicy = defaultProximitySearchRuntimePolicy @@ -335,6 +335,8 @@ module.exports.NativePortableHnswBuildResult = NativePortableHnswBuildResult module.exports.NativePortableHnswIndex = NativePortableHnswIndex module.exports.NativePortablePqBuildResult = NativePortablePqBuildResult module.exports.NativePortableProductQuantizer = NativePortableProductQuantizer +module.exports.NativePortableTurboQuantBuildResult = NativePortableTurboQuantBuildResult +module.exports.NativePortableTurboQuantizer = NativePortableTurboQuantizer module.exports.NativePortableCompositeBuildResult = NativePortableCompositeBuildResult module.exports.NativePortableCompositeBuildOrRebuildResult = NativePortableCompositeBuildOrRebuildResult module.exports.NativePortableCompositeAccelerator = NativePortableCompositeAccelerator diff --git a/bindings/node/index.d.ts b/bindings/node/index.d.ts index 7955cabc..f34a9cc3 100644 --- a/bindings/node/index.d.ts +++ b/bindings/node/index.d.ts @@ -199,6 +199,7 @@ export interface NodePortableSearchRequest { backend: string hnswEfSearch?: number pqRerankMultiplier?: number + turboquantRerankMultiplier?: number } export interface NodePortableHnswConfig { maxConnections: number @@ -252,6 +253,37 @@ export interface NodePortablePqQuality { meanSquaredError: number maximumSquaredError: number } +export interface NodePortableTurboQuantConfig { + bitWidth: number + rerankMultiplier: number + seed: string +} +export interface NodePortableTurboQuantBuildLimits { + maxRecords?: string + maxInputBytes?: string + maxTemporaryBytes?: string + maxTransformOperations?: string + maxEncodedOutputBytes?: string + maxWorkerThreads?: string +} +export interface NodePortableTurboQuantBuildStats { + encodedVectors: string + zeroVectors: string + transformedComponents: string + butterflyOperations: string + inputBytes: string + encodedOutputBytes: string + peakTemporaryBytes: string +} +export interface NodePortableTurboQuantQuality { + meanSquaredError: number + maximumSquaredError: number +} +export interface NodePortableTurboQuantVerification { + encodedVectors: string + zeroVectors: string + quality: NodePortableTurboQuantQuality +} export interface NodePortableCompositeConfig { maxDeltaRecords: string maxShadowRecords: string @@ -286,6 +318,8 @@ export interface NodePortableCompositeRebuildOptions { hnswLimits: NodePortableHnswBuildLimits pqWorkerThreads: string pqLimits: NodePortablePqBuildLimits + turboquantWorkerThreads: string + turboquantLimits: NodePortableTurboQuantBuildLimits } export interface NodePortableCatalogEntry { kind: string @@ -311,6 +345,7 @@ export interface NodePortableProximitySearchRuntimePolicy { authoritativeMaxBytes: string hnswMaxBytes: string pqMaxBytes: string + turboquantMaxBytes: string } export interface NodePortableProximitySearchRuntimeStats { physicalReads: string @@ -1411,6 +1446,21 @@ export declare class NativePortableProductQuantizer { searchCancellable(map: NativePortableProximityMap, request: NodePortableSearchRequest, runtime: NativePortableProximitySearchRuntime | undefined | null, cancellation: NativePortableProximityCancellationToken): Promise proveSearch(map: NativePortableProximityMap, request: NodePortableSearchRequest): NativePortableProximitySearchProof } +export declare class NativePortableTurboQuantBuildResult { + index(): NativePortableTurboQuantizer + stats(): NodePortableTurboQuantBuildStats +} +export declare class NativePortableTurboQuantizer { + manifest(): Buffer + sourceDescriptor(): Buffer + config(): NodePortableTurboQuantConfig + quality(): NodePortableTurboQuantQuality + verify(map: NativePortableProximityMap): NodePortableTurboQuantVerification + search(map: NativePortableProximityMap, request: NodePortableSearchRequest): NodePortableSearchResult + searchWithRuntime(map: NativePortableProximityMap, request: NodePortableSearchRequest, runtime: NativePortableProximitySearchRuntime): NodePortableSearchResult + searchCancellable(map: NativePortableProximityMap, request: NodePortableSearchRequest, runtime: NativePortableProximitySearchRuntime | undefined | null, cancellation: NativePortableProximityCancellationToken): Promise + proveSearch(map: NativePortableProximityMap, request: NodePortableSearchRequest): NativePortableProximitySearchProof +} export declare class NativePortableCompositeBuildResult { accelerator(): NativePortableCompositeAccelerator | null reasons(): Array @@ -1421,10 +1471,12 @@ export declare class NativePortableCompositeBuildOrRebuildResult { composite(): NativePortableCompositeAccelerator | null hnsw(): NativePortableHnswIndex | null pq(): NativePortableProductQuantizer | null + turboquant(): NativePortableTurboQuantizer | null reasons(): Array compositeStats(): NodePortableCompositeBuildStats hnswStats(): NodePortableHnswBuildStats | null pqStats(): NodePortablePqBuildStats | null + turboquantStats(): NodePortableTurboQuantBuildStats | null } export declare class NativePortableCompositeAccelerator { manifest(): Buffer @@ -1455,12 +1507,16 @@ export declare class NativePortableProximityMap { loadHnsw(manifest: Buffer): NativePortableHnswIndex buildPq(config: NodePortablePqConfig | undefined | null, workerThreads: string, limits?: NodePortablePqBuildLimits | undefined | null): NativePortablePqBuildResult loadPq(manifest: Buffer): NativePortableProductQuantizer + buildTurboQuant(config: NodePortableTurboQuantConfig | undefined | null, workerThreads: string, limits?: NodePortableTurboQuantBuildLimits | undefined | null): NativePortableTurboQuantBuildResult + loadTurboQuant(manifest: Buffer): NativePortableTurboQuantizer buildCompositeHnsw(baseMap: NativePortableProximityMap, base: NativePortableHnswIndex, config?: NodePortableCompositeConfig | undefined | null, limits?: NodePortableCompositeBuildLimits | undefined | null): NativePortableCompositeBuildResult buildCompositePq(baseMap: NativePortableProximityMap, base: NativePortableProductQuantizer, config?: NodePortableCompositeConfig | undefined | null, limits?: NodePortableCompositeBuildLimits | undefined | null): NativePortableCompositeBuildResult + buildCompositeTurboQuant(baseMap: NativePortableProximityMap, base: NativePortableTurboQuantizer, config?: NodePortableCompositeConfig | undefined | null, limits?: NodePortableCompositeBuildLimits | undefined | null): NativePortableCompositeBuildResult buildOrRebuildCompositeHnsw(baseMap: NativePortableProximityMap, base: NativePortableHnswIndex, config?: NodePortableCompositeConfig | undefined | null, limits?: NodePortableCompositeBuildLimits | undefined | null, rebuild?: NodePortableCompositeRebuildOptions | undefined | null): NativePortableCompositeBuildOrRebuildResult buildOrRebuildCompositePq(baseMap: NativePortableProximityMap, base: NativePortableProductQuantizer, config?: NodePortableCompositeConfig | undefined | null, limits?: NodePortableCompositeBuildLimits | undefined | null, rebuild?: NodePortableCompositeRebuildOptions | undefined | null): NativePortableCompositeBuildOrRebuildResult + buildOrRebuildCompositeTurboQuant(baseMap: NativePortableProximityMap, base: NativePortableTurboQuantizer, config?: NodePortableCompositeConfig | undefined | null, limits?: NodePortableCompositeBuildLimits | undefined | null, rebuild?: NodePortableCompositeRebuildOptions | undefined | null): NativePortableCompositeBuildOrRebuildResult loadComposite(manifest: Buffer): NativePortableCompositeAccelerator - buildAcceleratorCatalog(hnsw?: NativePortableHnswIndex | undefined | null, pq?: NativePortableProductQuantizer | undefined | null, composite?: NativePortableCompositeAccelerator | undefined | null): NativePortableAcceleratorCatalog + buildAcceleratorCatalog(hnsw?: NativePortableHnswIndex | undefined | null, pq?: NativePortableProductQuantizer | undefined | null, turboquant?: NativePortableTurboQuantizer | undefined | null, composite?: NativePortableCompositeAccelerator | undefined | null): NativePortableAcceleratorCatalog loadAcceleratorCatalog(manifest: Buffer): NativePortableAcceleratorCatalog read(): NativePortableProximityReadSession count(): string diff --git a/bindings/node/native/src/portable.rs b/bindings/node/native/src/portable.rs index c95de71e..2c99ea84 100644 --- a/bindings/node/native/src/portable.rs +++ b/bindings/node/native/src/portable.rs @@ -16,7 +16,8 @@ use prolly_bindings::{ default_composite_accelerator_config, default_composite_build_limits, default_composite_rebuild_options, default_config, default_content_graph_limits, default_hnsw_build_limits, default_hnsw_config, default_pq_build_limits, default_pq_config, - default_proximity_config, default_proximity_search_runtime_policy, verify_key_proof, + default_proximity_config, default_proximity_search_runtime_policy, + default_turboquant_build_limits, default_turboquant_config, verify_key_proof, verify_multi_key_proof, verify_proximity_membership_proof, verify_proximity_structure_proof, verify_range_page_proof, verify_range_proof, AcceleratorCatalogEntryRecord, ActiveIndexHealthRecord, AdaptiveQualityRecord, BindingAcceleratorCatalog, @@ -24,15 +25,15 @@ use prolly_bindings::{ BindingIndexedSnapshot, BindingMapComparison, BindingMapMerge, BindingMapSnapshot, BindingMapSubscription, BindingProductQuantizer, BindingProximityCancellationToken, BindingProximityMap, BindingProximityReadSession, BindingProximitySearchProof, - BindingProximitySearchRuntime, BindingSecondaryIndexSnapshot, BindingVersionedMap, - BindingVersionedTransaction, CatalogAcceleratorKindRecord, CompositeAcceleratorConfigRecord, - CompositeBaseKindRecord, CompositeBuildLimitsRecord, CompositeBuildOrRebuildKindRecord, - CompositeBuildOrRebuildOutcomeRecord, CompositeBuildOutcomeRecord, CompositeBuildStatsRecord, - CompositeRebuildOptionsRecord, DistanceMetricRecord, ExactProximityRecordRecord, - FullRebuildReasonKindRecord, FullRebuildReasonRecord, HnswBuildLimitsRecord, - HnswBuildStatsRecord, HnswConfigRecord, HnswRoutingVectorEncodingRecord, - IndexBuildResultRecord, IndexEntryRecord, IndexMatchRecord, IndexPageRecord, - IndexProjectionRecord, IndexVerificationRecord, IndexedMapHealthRecord, + BindingProximitySearchRuntime, BindingSecondaryIndexSnapshot, BindingTurboQuantizer, + BindingVersionedMap, BindingVersionedTransaction, CatalogAcceleratorKindRecord, + CompositeAcceleratorConfigRecord, CompositeBaseKindRecord, CompositeBuildLimitsRecord, + CompositeBuildOrRebuildKindRecord, CompositeBuildOrRebuildOutcomeRecord, + CompositeBuildOutcomeRecord, CompositeBuildStatsRecord, CompositeRebuildOptionsRecord, + DistanceMetricRecord, ExactProximityRecordRecord, FullRebuildReasonKindRecord, + FullRebuildReasonRecord, HnswBuildLimitsRecord, HnswBuildStatsRecord, HnswConfigRecord, + HnswRoutingVectorEncodingRecord, IndexBuildResultRecord, IndexEntryRecord, IndexMatchRecord, + IndexPageRecord, IndexProjectionRecord, IndexVerificationRecord, IndexedMapHealthRecord, IndexedMapMetricsRecord, IndexedRetentionRecord, IndexedSnapshotIdRecord, IndexedSourceRecord, IndexedUpdateKind, IndexedUpdateRecord, IndexedVersionRecord, KeyProofRecord, MapUpdateKind, MapUpdateRecord, MapVersionRecord, MultiKeyProofRecord, ProductQuantizationBuildLimitsRecord, @@ -46,7 +47,9 @@ use prolly_bindings::{ ProximityStructuralProofRecord, ProximityVerificationRecord, QueryKernelRecord, RangeProofRecord, SearchBackendRecord, SearchBudgetRecord, SearchCompletionRecord, SearchPolicyKind, SecondaryIndexExtractorCallback, SecondaryIndexLimitsRecord, - VersionPruneRecord, + TurboQuantizationBuildLimitsRecord, TurboQuantizationBuildStatsRecord, + TurboQuantizationConfigRecord, TurboQuantizationQualityRecord, + TurboQuantizationVerificationRecord, VersionPruneRecord, }; use std::sync::Arc; @@ -879,6 +882,7 @@ pub struct NodePortableSearchRequest { pub backend: String, pub hnsw_ef_search: Option, pub pq_rerank_multiplier: Option, + pub turboquant_rerank_multiplier: Option, } fn parse_u64(value: String, name: &str) -> Result { @@ -1123,6 +1127,129 @@ impl From for NodePortablePqQuality { } } +#[napi(object)] +pub struct NodePortableTurboQuantConfig { + pub bit_width: u32, + pub rerank_multiplier: u32, + pub seed: String, +} + +impl From for NodePortableTurboQuantConfig { + fn from(value: TurboQuantizationConfigRecord) -> Self { + Self { + bit_width: u32::from(value.bit_width), + rerank_multiplier: value.rerank_multiplier, + seed: value.seed.to_string(), + } + } +} + +impl TryFrom for TurboQuantizationConfigRecord { + type Error = Error; + + fn try_from(value: NodePortableTurboQuantConfig) -> Result { + Ok(Self { + bit_width: value + .bit_width + .try_into() + .map_err(|_| Error::new(Status::InvalidArg, "bitWidth must fit in uint8"))?, + rerank_multiplier: value.rerank_multiplier, + seed: parse_u64(value.seed, "seed")?, + }) + } +} + +#[napi(object)] +pub struct NodePortableTurboQuantBuildLimits { + pub max_records: Option, + pub max_input_bytes: Option, + pub max_temporary_bytes: Option, + pub max_transform_operations: Option, + pub max_encoded_output_bytes: Option, + pub max_worker_threads: Option, +} + +impl TryFrom for TurboQuantizationBuildLimitsRecord { + type Error = Error; + + fn try_from(value: NodePortableTurboQuantBuildLimits) -> Result { + Ok(Self { + max_records: parse_optional_u64(value.max_records, "maxRecords")?, + max_input_bytes: parse_optional_u64(value.max_input_bytes, "maxInputBytes")?, + max_temporary_bytes: parse_optional_u64( + value.max_temporary_bytes, + "maxTemporaryBytes", + )?, + max_transform_operations: parse_optional_u64( + value.max_transform_operations, + "maxTransformOperations", + )?, + max_encoded_output_bytes: parse_optional_u64( + value.max_encoded_output_bytes, + "maxEncodedOutputBytes", + )?, + max_worker_threads: parse_optional_u64(value.max_worker_threads, "maxWorkerThreads")?, + }) + } +} + +#[napi(object)] +pub struct NodePortableTurboQuantBuildStats { + pub encoded_vectors: String, + pub zero_vectors: String, + pub transformed_components: String, + pub butterfly_operations: String, + pub input_bytes: String, + pub encoded_output_bytes: String, + pub peak_temporary_bytes: String, +} + +impl From for NodePortableTurboQuantBuildStats { + fn from(value: TurboQuantizationBuildStatsRecord) -> Self { + Self { + encoded_vectors: value.encoded_vectors.to_string(), + zero_vectors: value.zero_vectors.to_string(), + transformed_components: value.transformed_components.to_string(), + butterfly_operations: value.butterfly_operations.to_string(), + input_bytes: value.input_bytes.to_string(), + encoded_output_bytes: value.encoded_output_bytes.to_string(), + peak_temporary_bytes: value.peak_temporary_bytes.to_string(), + } + } +} + +#[napi(object)] +pub struct NodePortableTurboQuantQuality { + pub mean_squared_error: f64, + pub maximum_squared_error: f64, +} + +impl From for NodePortableTurboQuantQuality { + fn from(value: TurboQuantizationQualityRecord) -> Self { + Self { + mean_squared_error: value.mean_squared_error, + maximum_squared_error: value.maximum_squared_error, + } + } +} + +#[napi(object)] +pub struct NodePortableTurboQuantVerification { + pub encoded_vectors: String, + pub zero_vectors: String, + pub quality: NodePortableTurboQuantQuality, +} + +impl From for NodePortableTurboQuantVerification { + fn from(value: TurboQuantizationVerificationRecord) -> Self { + Self { + encoded_vectors: value.encoded_vectors.to_string(), + zero_vectors: value.zero_vectors.to_string(), + quality: value.quality.into(), + } + } +} + #[napi(object)] pub struct NodePortableCompositeConfig { pub max_delta_records: String, @@ -1259,6 +1386,8 @@ pub struct NodePortableCompositeRebuildOptions { pub hnsw_limits: NodePortableHnswBuildLimits, pub pq_worker_threads: String, pub pq_limits: NodePortablePqBuildLimits, + pub turboquant_worker_threads: String, + pub turboquant_limits: NodePortableTurboQuantBuildLimits, } impl TryFrom for CompositeRebuildOptionsRecord { @@ -1269,6 +1398,11 @@ impl TryFrom for CompositeRebuildOptionsRec hnsw_limits: value.hnsw_limits.try_into()?, pq_worker_threads: parse_u64(value.pq_worker_threads, "pqWorkerThreads")?, pq_limits: value.pq_limits.try_into()?, + turboquant_worker_threads: parse_u64( + value.turboquant_worker_threads, + "turboquantWorkerThreads", + )?, + turboquant_limits: value.turboquant_limits.try_into()?, }) } } @@ -1287,6 +1421,7 @@ impl From for NodePortableCatalogEntry { CatalogAcceleratorKindRecord::Hnsw => "hnsw", CatalogAcceleratorKindRecord::ProductQuantized => "product_quantized", CatalogAcceleratorKindRecord::Composite => "composite", + CatalogAcceleratorKindRecord::TurboQuantized => "turbo_quantized", } .to_string(), configuration_fingerprint: Buffer::from(value.configuration_fingerprint), @@ -1362,6 +1497,7 @@ impl TryFrom for ProximitySearchRequestRecord { "hnsw" => SearchBackendRecord::Hnsw, "composite" => SearchBackendRecord::Composite, "auto" => SearchBackendRecord::Auto, + "turbo_quantized" | "turboquant" => SearchBackendRecord::TurboQuantized, other => { return Err(Error::new( Status::InvalidArg, @@ -1394,6 +1530,7 @@ impl TryFrom for ProximitySearchRequestRecord { backend, hnsw_ef_search: value.hnsw_ef_search, pq_rerank_multiplier: value.pq_rerank_multiplier, + turboquant_rerank_multiplier: value.turboquant_rerank_multiplier, }) } } @@ -1420,6 +1557,7 @@ pub struct NodePortableProximitySearchRuntimePolicy { pub authoritative_max_bytes: String, pub hnsw_max_bytes: String, pub pq_max_bytes: String, + pub turboquant_max_bytes: String, } impl From for NodePortableProximitySearchRuntimePolicy { @@ -1430,6 +1568,7 @@ impl From for NodePortableProximitySearchRun authoritative_max_bytes: value.authoritative_max_bytes.to_string(), hnsw_max_bytes: value.hnsw_max_bytes.to_string(), pq_max_bytes: value.pq_max_bytes.to_string(), + turboquant_max_bytes: value.turboquant_max_bytes.to_string(), } } } @@ -1447,6 +1586,7 @@ impl TryFrom for ProximitySearchRuntim )?, hnsw_max_bytes: parse_u64(value.hnsw_max_bytes, "hnswMaxBytes")?, pq_max_bytes: parse_u64(value.pq_max_bytes, "pqMaxBytes")?, + turboquant_max_bytes: parse_u64(value.turboquant_max_bytes, "turboquantMaxBytes")?, }) } } @@ -1561,6 +1701,7 @@ impl From for NodePortableSearchResult { SearchBackendRecord::Hnsw => "hnsw", SearchBackendRecord::Composite => "composite", SearchBackendRecord::Auto => "auto", + SearchBackendRecord::TurboQuantized => "turbo_quantized", }; Self { neighbors: value.neighbors.into_iter().map(Into::into).collect(), @@ -3708,6 +3849,7 @@ enum NodePortableProximitySearchTarget { Session(Arc), Hnsw(Arc, Arc), ProductQuantized(Arc, Arc), + TurboQuantized(Arc, Arc), Composite(Arc, Arc), Catalog(Arc, Arc), } @@ -3741,6 +3883,13 @@ impl Task for NodePortableProximitySearchTask { self.runtime.clone(), Arc::clone(&self.cancellation), ), + NodePortableProximitySearchTarget::TurboQuantized(index, map) => index + .search_cancellable( + Arc::clone(map), + self.request.clone(), + self.runtime.clone(), + Arc::clone(&self.cancellation), + ), NodePortableProximitySearchTarget::Composite(index, map) => index.search_cancellable( Arc::clone(map), self.request.clone(), @@ -4006,6 +4155,130 @@ impl NativePortableProductQuantizer { } } +#[napi] +pub struct NativePortableTurboQuantBuildResult { + index: Arc, + stats: TurboQuantizationBuildStatsRecord, +} + +#[napi] +impl NativePortableTurboQuantBuildResult { + #[napi] + pub fn index(&self) -> NativePortableTurboQuantizer { + NativePortableTurboQuantizer { + inner: Arc::clone(&self.index), + } + } + + #[napi] + pub fn stats(&self) -> NodePortableTurboQuantBuildStats { + self.stats.clone().into() + } +} + +#[napi] +pub struct NativePortableTurboQuantizer { + inner: Arc, +} + +#[napi] +impl NativePortableTurboQuantizer { + #[napi] + pub fn manifest(&self) -> Buffer { + Buffer::from(self.inner.manifest()) + } + + #[napi(js_name = "sourceDescriptor")] + pub fn source_descriptor(&self) -> Buffer { + Buffer::from(self.inner.source_descriptor()) + } + + #[napi] + pub fn config(&self) -> NodePortableTurboQuantConfig { + self.inner.config().into() + } + + #[napi] + pub fn quality(&self) -> NodePortableTurboQuantQuality { + self.inner.quality().into() + } + + #[napi] + pub fn verify( + &self, + map: &NativePortableProximityMap, + ) -> Result { + self.inner + .verify(Arc::clone(&map.inner)) + .map(Into::into) + .map_err(to_napi_error) + } + + #[napi] + pub fn search( + &self, + map: &NativePortableProximityMap, + request: NodePortableSearchRequest, + ) -> Result { + self.inner + .search(Arc::clone(&map.inner), request.try_into()?) + .map(Into::into) + .map_err(to_napi_error) + } + + #[napi(js_name = "searchWithRuntime")] + pub fn search_with_runtime( + &self, + map: &NativePortableProximityMap, + request: NodePortableSearchRequest, + runtime: &NativePortableProximitySearchRuntime, + ) -> Result { + self.inner + .search_with_runtime( + Arc::clone(&map.inner), + request.try_into()?, + Arc::clone(&runtime.inner), + ) + .map(Into::into) + .map_err(to_napi_error) + } + + #[napi(js_name = "searchCancellable")] + pub fn search_cancellable( + &self, + map: &NativePortableProximityMap, + request: NodePortableSearchRequest, + runtime: Option<&NativePortableProximitySearchRuntime>, + cancellation: &NativePortableProximityCancellationToken, + ) -> Result> { + Ok(AsyncTask::new(NodePortableProximitySearchTask { + target: NodePortableProximitySearchTarget::TurboQuantized( + Arc::clone(&self.inner), + Arc::clone(&map.inner), + ), + request: request.try_into()?, + runtime: runtime.map(|value| Arc::clone(&value.inner)), + cancellation: Arc::clone(&cancellation.inner), + })) + } + + #[napi(js_name = "proveSearch")] + pub fn prove_search( + &self, + map: &NativePortableProximityMap, + request: NodePortableSearchRequest, + ) -> Result { + self.inner + .prove_search( + Arc::clone(&map.inner), + request.try_into()?, + default_content_graph_limits(), + ) + .map(|inner| NativePortableProximitySearchProof { inner }) + .map_err(to_napi_error) + } +} + #[napi] pub struct NativePortableCompositeBuildResult { accelerator: Option>, @@ -4061,6 +4334,7 @@ impl NativePortableCompositeBuildOrRebuildResult { CompositeBuildOrRebuildKindRecord::ProductQuantizedRebuilt => { "product_quantized_rebuilt" } + CompositeBuildOrRebuildKindRecord::TurboQuantizedRebuilt => "turbo_quantized_rebuilt", } .to_string() } @@ -4095,6 +4369,16 @@ impl NativePortableCompositeBuildOrRebuildResult { }) } + #[napi] + pub fn turboquant(&self) -> Option { + self.inner + .turboquant + .as_ref() + .map(|inner| NativePortableTurboQuantizer { + inner: Arc::clone(inner), + }) + } + #[napi] pub fn reasons(&self) -> Vec { self.inner @@ -4119,6 +4403,11 @@ impl NativePortableCompositeBuildOrRebuildResult { pub fn pq_stats(&self) -> Option { self.inner.pq_stats.clone().map(Into::into) } + + #[napi(js_name = "turboquantStats")] + pub fn turboquant_stats(&self) -> Option { + self.inner.turboquant_stats.clone().map(Into::into) + } } #[napi] @@ -4148,6 +4437,7 @@ impl NativePortableCompositeAccelerator { match self.inner.base_kind() { CompositeBaseKindRecord::Hnsw => "hnsw", CompositeBaseKindRecord::ProductQuantized => "product_quantized", + CompositeBaseKindRecord::TurboQuantized => "turbo_quantized", } .to_string() } @@ -4399,6 +4689,38 @@ impl NativePortableProximityMap { .map_err(to_napi_error) } + #[napi(js_name = "buildTurboQuant")] + pub fn build_turboquant( + &self, + config: Option, + worker_threads: String, + limits: Option, + ) -> Result { + let config = config + .map(TryInto::try_into) + .transpose()? + .unwrap_or_else(default_turboquant_config); + let limits = limits + .map(TryInto::try_into) + .transpose()? + .unwrap_or_else(default_turboquant_build_limits); + self.inner + .build_turboquant(config, parse_u64(worker_threads, "workerThreads")?, limits) + .map(|value| NativePortableTurboQuantBuildResult { + index: value.index, + stats: value.stats, + }) + .map_err(to_napi_error) + } + + #[napi(js_name = "loadTurboQuant")] + pub fn load_turboquant(&self, manifest: Buffer) -> Result { + self.inner + .load_turboquant(manifest.to_vec()) + .map(|inner| NativePortableTurboQuantizer { inner }) + .map_err(to_napi_error) + } + #[napi(js_name = "buildCompositeHnsw")] pub fn build_composite_hnsw( &self, @@ -4453,6 +4775,33 @@ impl NativePortableProximityMap { .map_err(to_napi_error) } + #[napi(js_name = "buildCompositeTurboQuant")] + pub fn build_composite_turboquant( + &self, + base_map: &NativePortableProximityMap, + base: &NativePortableTurboQuantizer, + config: Option, + limits: Option, + ) -> Result { + let config = config + .map(TryInto::try_into) + .transpose()? + .unwrap_or_else(default_composite_accelerator_config); + let limits = limits + .map(TryInto::try_into) + .transpose()? + .unwrap_or_else(default_composite_build_limits); + self.inner + .build_composite_turboquant( + Arc::clone(&base_map.inner), + Arc::clone(&base.inner), + config, + limits, + ) + .map(Into::into) + .map_err(to_napi_error) + } + #[napi(js_name = "buildOrRebuildCompositeHnsw")] pub fn build_or_rebuild_composite_hnsw( &self, @@ -4519,6 +4868,39 @@ impl NativePortableProximityMap { .map_err(to_napi_error) } + #[napi(js_name = "buildOrRebuildCompositeTurboQuant")] + pub fn build_or_rebuild_composite_turboquant( + &self, + base_map: &NativePortableProximityMap, + base: &NativePortableTurboQuantizer, + config: Option, + limits: Option, + rebuild: Option, + ) -> Result { + let config = config + .map(TryInto::try_into) + .transpose()? + .unwrap_or_else(default_composite_accelerator_config); + let limits = limits + .map(TryInto::try_into) + .transpose()? + .unwrap_or_else(default_composite_build_limits); + let rebuild = rebuild + .map(TryInto::try_into) + .transpose()? + .unwrap_or_else(default_composite_rebuild_options); + self.inner + .build_or_rebuild_composite_turboquant( + Arc::clone(&base_map.inner), + Arc::clone(&base.inner), + config, + limits, + rebuild, + ) + .map(|inner| NativePortableCompositeBuildOrRebuildResult { inner }) + .map_err(to_napi_error) + } + #[napi(js_name = "loadComposite")] pub fn load_composite(&self, manifest: Buffer) -> Result { self.inner @@ -4532,12 +4914,14 @@ impl NativePortableProximityMap { &self, hnsw: Option<&NativePortableHnswIndex>, pq: Option<&NativePortableProductQuantizer>, + turboquant: Option<&NativePortableTurboQuantizer>, composite: Option<&NativePortableCompositeAccelerator>, ) -> Result { self.inner .build_accelerator_catalog( hnsw.map(|value| Arc::clone(&value.inner)), pq.map(|value| Arc::clone(&value.inner)), + turboquant.map(|value| Arc::clone(&value.inner)), composite.map(|value| Arc::clone(&value.inner)), ) .map(|inner| NativePortableAcceleratorCatalog { inner }) diff --git a/bindings/node/src/index.ts b/bindings/node/src/index.ts index f1e06a7b..a586a8ee 100644 --- a/bindings/node/src/index.ts +++ b/bindings/node/src/index.ts @@ -21,12 +21,15 @@ export { defaultCompositeBuildLimits, defaultPqBuildLimits, defaultPqConfig, + defaultTurboQuantBuildLimits, + defaultTurboQuantConfig, defaultProximitySearchRuntimePolicy, exactSearch, HnswIndex, AcceleratorCatalog, CompositeAccelerator, ProductQuantizer, + TurboQuantizer, ProximityCancellationToken, ProximityMap, ProximityReadSession, diff --git a/bindings/node/src/proximity.ts b/bindings/node/src/proximity.ts index c52c0670..befb12b8 100644 --- a/bindings/node/src/proximity.ts +++ b/bindings/node/src/proximity.ts @@ -52,9 +52,10 @@ export interface SearchRequest { budget?: SearchBudget; filter?: SearchFilter; kernel?: "scalar_deterministic" | "simd_deterministic" | "auto_deterministic"; - backend?: "native" | "product_quantized" | "hnsw" | "composite" | "auto"; + backend?: "native" | "product_quantized" | "hnsw" | "composite" | "auto" | "turbo_quantized"; hnswEfSearch?: number; pqRerankMultiplier?: number; + turboquantRerankMultiplier?: number; signal?: AbortSignal; } @@ -117,6 +118,7 @@ export interface ProximitySearchRuntimePolicy { authoritativeMaxBytes: bigint; hnswMaxBytes: bigint; pqMaxBytes: bigint; + turboquantMaxBytes: bigint; } export interface ProximitySearchRuntimeStats { @@ -131,6 +133,7 @@ export function defaultProximitySearchRuntimePolicy(): ProximitySearchRuntimePol authoritativeMaxBytes: 128n * 1024n * 1024n, hnswMaxBytes: 96n * 1024n * 1024n, pqMaxBytes: 32n * 1024n * 1024n, + turboquantMaxBytes: 32n * 1024n * 1024n, }; } @@ -260,6 +263,62 @@ export function defaultPqBuildLimits(): ProductQuantizationBuildLimits { return {}; } +export interface TurboQuantizationConfig { + bitWidth: 2 | 3 | 4; + rerankMultiplier: number; + seed: bigint; +} + +export interface TurboQuantizationBuildLimits { + maxRecords?: bigint; + maxInputBytes?: bigint; + maxTemporaryBytes?: bigint; + maxTransformOperations?: bigint; + maxEncodedOutputBytes?: bigint; + maxWorkerThreads?: bigint; +} + +export interface TurboQuantizationBuildStats { + encodedVectors: bigint; + zeroVectors: bigint; + transformedComponents: bigint; + butterflyOperations: bigint; + inputBytes: bigint; + encodedOutputBytes: bigint; + peakTemporaryBytes: bigint; +} + +export interface TurboQuantizationQuality { + meanSquaredError: number; + maximumSquaredError: number; +} + +export interface TurboQuantizationVerification { + encodedVectors: bigint; + zeroVectors: bigint; + quality: TurboQuantizationQuality; +} + +export interface TurboQuantizationBuildOptions { + config?: TurboQuantizationConfig; + workerThreads?: bigint; + limits?: TurboQuantizationBuildLimits; + signal?: AbortSignal; +} + +export interface TurboQuantizationBuildResult { + index: TurboQuantizer; + stats: TurboQuantizationBuildStats; +} + +export function defaultTurboQuantConfig(): TurboQuantizationConfig { + return { bitWidth: 4, rerankMultiplier: 8, seed: 0n }; +} + +export function defaultTurboQuantBuildLimits(): TurboQuantizationBuildLimits { + return {}; +} + export interface CompositeAcceleratorConfig { maxDeltaRecords: bigint; maxShadowRecords: bigint; @@ -298,6 +357,8 @@ export interface CompositeRebuildOptions { hnswLimits?: HnswBuildLimits; pqWorkerThreads?: bigint; pqLimits?: ProductQuantizationBuildLimits; + turboquantWorkerThreads?: bigint; + turboquantLimits?: TurboQuantizationBuildLimits; } export interface CompositeBuildOptions { @@ -317,18 +378,20 @@ export interface CompositeBuildOutcome { } export interface CompositeBuildOrRebuildOutcome { - kind: "composite" | "no_accelerator_required" | "hnsw_rebuilt" | "product_quantized_rebuilt"; + kind: "composite" | "no_accelerator_required" | "hnsw_rebuilt" | "product_quantized_rebuilt" | "turbo_quantized_rebuilt"; composite?: CompositeAccelerator; hnsw?: HnswIndex; pq?: ProductQuantizer; + turboquant?: TurboQuantizer; reasons: FullRebuildReason[]; compositeStats: CompositeBuildStats; hnswStats?: HnswBuildStats; pqStats?: ProductQuantizationBuildStats; + turboquantStats?: TurboQuantizationBuildStats; } export interface AcceleratorCatalogEntry { - kind: "hnsw" | "product_quantized" | "composite"; + kind: "hnsw" | "product_quantized" | "composite" | "turbo_quantized"; configurationFingerprint: Uint8Array; manifest: Uint8Array; } @@ -482,6 +545,49 @@ interface NativeProductQuantizer { proveSearch(map: NativeProximityMap, request: NativeSearchRequest): NativeProximitySearchProof; } +interface NativeTurboQuantConfig { + bitWidth: number; + rerankMultiplier: number; + seed: string; +} +interface NativeTurboQuantBuildLimits { + maxRecords?: string; + maxInputBytes?: string; + maxTemporaryBytes?: string; + maxTransformOperations?: string; + maxEncodedOutputBytes?: string; + maxWorkerThreads?: string; +} +interface NativeTurboQuantBuildStats { + encodedVectors: string; + zeroVectors: string; + transformedComponents: string; + butterflyOperations: string; + inputBytes: string; + encodedOutputBytes: string; + peakTemporaryBytes: string; +} +interface NativeTurboQuantVerification { + encodedVectors: string; + zeroVectors: string; + quality: TurboQuantizationQuality; +} +interface NativeTurboQuantBuildResult { + index(): NativeTurboQuantizer; + stats(): NativeTurboQuantBuildStats; +} +interface NativeTurboQuantizer { + manifest(): Uint8Array; + sourceDescriptor(): Uint8Array; + config(): NativeTurboQuantConfig; + quality(): TurboQuantizationQuality; + verify(map: NativeProximityMap): NativeTurboQuantVerification; + search(map: NativeProximityMap, request: NativeSearchRequest): NativeSearchResult; + searchWithRuntime(map: NativeProximityMap, request: NativeSearchRequest, runtime: NativeProximitySearchRuntime): NativeSearchResult; + searchCancellable(map: NativeProximityMap, request: NativeSearchRequest, runtime: NativeProximitySearchRuntime | undefined, cancellation: NativeProximityCancellationToken): Promise; + proveSearch(map: NativeProximityMap, request: NativeSearchRequest): NativeProximitySearchProof; +} + interface NativeCompositeConfig { maxDeltaRecords: string; maxShadowRecords: string; @@ -512,6 +618,8 @@ interface NativeCompositeRebuildOptions { hnswLimits: NativeHnswBuildLimits; pqWorkerThreads: string; pqLimits: NativePqBuildLimits; + turboquantWorkerThreads: string; + turboquantLimits: NativeTurboQuantBuildLimits; } interface NativeCompositeBuildResult { accelerator(): NativeCompositeAccelerator | undefined; @@ -523,16 +631,18 @@ interface NativeCompositeBuildOrRebuildResult { composite(): NativeCompositeAccelerator | undefined; hnsw(): NativeHnswIndex | undefined; pq(): NativeProductQuantizer | undefined; + turboquant(): NativeTurboQuantizer | undefined; reasons(): NativeFullRebuildReason[]; compositeStats(): NativeCompositeBuildStats; hnswStats(): NativeHnswBuildStats | undefined; pqStats(): NativePqBuildStats | undefined; + turboquantStats(): NativeTurboQuantBuildStats | undefined; } interface NativeCompositeAccelerator { manifest(): Uint8Array; currentSourceDescriptor(): Uint8Array; baseSourceDescriptor(): Uint8Array; - baseKind(): "hnsw" | "product_quantized"; + baseKind(): "hnsw" | "product_quantized" | "turbo_quantized"; deltaCount(): string; shadowCount(): string; config(): NativeCompositeConfig; @@ -570,6 +680,7 @@ interface NativeSearchRequest { backend: NonNullable; hnswEfSearch?: number; pqRerankMultiplier?: number; + turboquantRerankMultiplier?: number; } interface NativeSearchResult { @@ -591,6 +702,7 @@ export interface NativeProximitySearchRuntimePolicy { authoritativeMaxBytes: string; hnswMaxBytes: string; pqMaxBytes: string; + turboquantMaxBytes: string; } export interface NativeProximitySearchRuntime { @@ -610,12 +722,16 @@ interface NativeProximityMap { loadHnsw(manifest: Uint8Array): NativeHnswIndex; buildPq(config: NativePqConfig | undefined, workerThreads: string, limits?: NativePqBuildLimits): NativePqBuildResult; loadPq(manifest: Uint8Array): NativeProductQuantizer; + buildTurboQuant(config: NativeTurboQuantConfig | undefined, workerThreads: string, limits?: NativeTurboQuantBuildLimits): NativeTurboQuantBuildResult; + loadTurboQuant(manifest: Uint8Array): NativeTurboQuantizer; buildCompositeHnsw(baseMap: NativeProximityMap, base: NativeHnswIndex, config?: NativeCompositeConfig, limits?: NativeCompositeBuildLimits): NativeCompositeBuildResult; buildCompositePq(baseMap: NativeProximityMap, base: NativeProductQuantizer, config?: NativeCompositeConfig, limits?: NativeCompositeBuildLimits): NativeCompositeBuildResult; + buildCompositeTurboQuant(baseMap: NativeProximityMap, base: NativeTurboQuantizer, config?: NativeCompositeConfig, limits?: NativeCompositeBuildLimits): NativeCompositeBuildResult; buildOrRebuildCompositeHnsw(baseMap: NativeProximityMap, base: NativeHnswIndex, config?: NativeCompositeConfig, limits?: NativeCompositeBuildLimits, rebuild?: NativeCompositeRebuildOptions): NativeCompositeBuildOrRebuildResult; buildOrRebuildCompositePq(baseMap: NativeProximityMap, base: NativeProductQuantizer, config?: NativeCompositeConfig, limits?: NativeCompositeBuildLimits, rebuild?: NativeCompositeRebuildOptions): NativeCompositeBuildOrRebuildResult; + buildOrRebuildCompositeTurboQuant(baseMap: NativeProximityMap, base: NativeTurboQuantizer, config?: NativeCompositeConfig, limits?: NativeCompositeBuildLimits, rebuild?: NativeCompositeRebuildOptions): NativeCompositeBuildOrRebuildResult; loadComposite(manifest: Uint8Array): NativeCompositeAccelerator; - buildAcceleratorCatalog(hnsw?: NativeHnswIndex, pq?: NativeProductQuantizer, composite?: NativeCompositeAccelerator): NativeAcceleratorCatalog; + buildAcceleratorCatalog(hnsw?: NativeHnswIndex, pq?: NativeProductQuantizer, turboquant?: NativeTurboQuantizer, composite?: NativeCompositeAccelerator): NativeAcceleratorCatalog; loadAcceleratorCatalog(manifest: Uint8Array): NativeAcceleratorCatalog; read(): NativeProximityReadSession; search(request: NativeSearchRequest): NativeSearchResult; @@ -716,6 +832,7 @@ function ownSearchRequest(request: SearchRequest): NativeSearchRequest { backend: request.backend ?? "native", hnswEfSearch: request.hnswEfSearch, pqRerankMultiplier: request.pqRerankMultiplier, + turboquantRerankMultiplier: request.turboquantRerankMultiplier, }; } @@ -842,6 +959,7 @@ export function ownProximitySearchRuntimePolicy( ), hnswMaxBytes: requireUnsignedBigInt(value.hnswMaxBytes, "hnswMaxBytes"), pqMaxBytes: requireUnsignedBigInt(value.pqMaxBytes, "pqMaxBytes"), + turboquantMaxBytes: requireUnsignedBigInt(value.turboquantMaxBytes, "turboquantMaxBytes"), }; } @@ -854,6 +972,7 @@ function proximitySearchRuntimePolicy( authoritativeMaxBytes: BigInt(value.authoritativeMaxBytes), hnswMaxBytes: BigInt(value.hnswMaxBytes), pqMaxBytes: BigInt(value.pqMaxBytes), + turboquantMaxBytes: BigInt(value.turboquantMaxBytes), }; } @@ -947,6 +1066,60 @@ function pqBuildStats(value: NativePqBuildStats): ProductQuantizationBuildStats }; } +function ownTurboQuantConfig( + value: TurboQuantizationConfig | undefined, +): NativeTurboQuantConfig | undefined { + if (value == null) return undefined; + if (value.bitWidth !== 2 && value.bitWidth !== 3 && value.bitWidth !== 4) { + throw new RangeError("bitWidth must be 2, 3, or 4"); + } + return { + bitWidth: value.bitWidth, + rerankMultiplier: requireUnsignedInteger( + value.rerankMultiplier, 0xffff_ffff, "rerankMultiplier", + ), + seed: requireUnsignedBigInt(value.seed, "seed"), + }; +} + +function ownTurboQuantBuildLimits( + value: TurboQuantizationBuildLimits | undefined, +): NativeTurboQuantBuildLimits | undefined { + if (value == null) return undefined; + const optional = (candidate: bigint | undefined, name: string) => + candidate == null ? undefined : requireUnsignedBigInt(candidate, name); + return { + maxRecords: optional(value.maxRecords, "maxRecords"), + maxInputBytes: optional(value.maxInputBytes, "maxInputBytes"), + maxTemporaryBytes: optional(value.maxTemporaryBytes, "maxTemporaryBytes"), + maxTransformOperations: optional(value.maxTransformOperations, "maxTransformOperations"), + maxEncodedOutputBytes: optional(value.maxEncodedOutputBytes, "maxEncodedOutputBytes"), + maxWorkerThreads: optional(value.maxWorkerThreads, "maxWorkerThreads"), + }; +} + +function turboquantBuildStats( + value: NativeTurboQuantBuildStats, +): TurboQuantizationBuildStats { + return { + encodedVectors: BigInt(value.encodedVectors), + zeroVectors: BigInt(value.zeroVectors), + transformedComponents: BigInt(value.transformedComponents), + butterflyOperations: BigInt(value.butterflyOperations), + inputBytes: BigInt(value.inputBytes), + encodedOutputBytes: BigInt(value.encodedOutputBytes), + peakTemporaryBytes: BigInt(value.peakTemporaryBytes), + }; +} + +function turboquantConfig(value: NativeTurboQuantConfig): TurboQuantizationConfig { + return { + bitWidth: value.bitWidth as 2 | 3 | 4, + rerankMultiplier: value.rerankMultiplier, + seed: BigInt(value.seed), + }; +} + function ownCompositeConfig(value: CompositeAcceleratorConfig | undefined): NativeCompositeConfig | undefined { if (value == null) return undefined; return { @@ -1005,6 +1178,13 @@ function ownCompositeRebuildOptions(value: CompositeRebuildOptions | undefined): hnswLimits: ownHnswBuildLimits(value.hnswLimits ?? defaultHnswBuildLimits())!, pqWorkerThreads: requireUnsignedBigInt(value.pqWorkerThreads ?? 1n, "pqWorkerThreads"), pqLimits: ownPqBuildLimits(value.pqLimits ?? defaultPqBuildLimits())!, + turboquantWorkerThreads: requireUnsignedBigInt( + value.turboquantWorkerThreads ?? 1n, + "turboquantWorkerThreads", + ), + turboquantLimits: ownTurboQuantBuildLimits( + value.turboquantLimits ?? defaultTurboQuantBuildLimits(), + )!, }; } @@ -1049,17 +1229,21 @@ function compositeRebuildOutcome(value: NativeCompositeBuildOrRebuildResult): Co const composite = value.composite(); const hnsw = value.hnsw(); const pq = value.pq(); + const turboquant = value.turboquant(); const hnswStats = value.hnswStats(); const pqStats = value.pqStats(); + const turboquantStats = value.turboquantStats(); return { kind: value.kind(), composite: composite == null ? undefined : new CompositeAccelerator(composite), hnsw: hnsw == null ? undefined : new HnswIndex(hnsw), pq: pq == null ? undefined : new ProductQuantizer(pq), + turboquant: turboquant == null ? undefined : new TurboQuantizer(turboquant), reasons: rebuildReasons(value.reasons()), compositeStats: compositeBuildStats(value.compositeStats()), hnswStats: hnswStats == null ? undefined : hnswBuildStats(hnswStats), pqStats: pqStats == null ? undefined : pqBuildStats(pqStats), + turboquantStats: turboquantStats == null ? undefined : turboquantBuildStats(turboquantStats), }; } interface NativeProximityStructuralProof { @@ -1246,6 +1430,24 @@ export class ProximityMap implements Disposable { loadPq(manifest: Uint8Array): ProductQuantizer { return new ProductQuantizer(this.nativeHandle().loadPq(ownedBytes(manifest))); } + buildTurboQuant( + options: TurboQuantizationBuildOptions = {}, + ): Promise { + const native = this.nativeHandle(); + const config = ownTurboQuantConfig(options.config); + const limits = ownTurboQuantBuildLimits(options.limits); + const workerThreads = requireUnsignedBigInt(options.workerThreads ?? 1n, "workerThreads"); + return nativePromise(options.signal, () => { + const result = native.buildTurboQuant(config, workerThreads, limits); + return { + index: new TurboQuantizer(result.index()), + stats: turboquantBuildStats(result.stats()), + }; + }); + } + loadTurboQuant(manifest: Uint8Array): TurboQuantizer { + return new TurboQuantizer(this.nativeHandle().loadTurboQuant(ownedBytes(manifest))); + } buildCompositeHnsw( baseMap: ProximityMap, base: HnswIndex, @@ -1284,6 +1486,25 @@ export class ProximityMap implements Disposable { }; }); } + buildCompositeTurboQuant( + baseMap: ProximityMap, + base: TurboQuantizer, + options: CompositeBuildOptions = {}, + ): Promise { + const native = this.nativeHandle(); + return nativePromise(options.signal, () => { + const result = native.buildCompositeTurboQuant( + baseMap.nativeHandle(), base.nativeHandle(), + ownCompositeConfig(options.config), ownCompositeBuildLimits(options.limits), + ); + const accelerator = result.accelerator(); + return { + accelerator: accelerator == null ? undefined : new CompositeAccelerator(accelerator), + reasons: rebuildReasons(result.reasons()), + stats: compositeBuildStats(result.stats()), + }; + }); + } buildOrRebuildCompositeHnsw( baseMap: ProximityMap, base: HnswIndex, @@ -1306,16 +1527,31 @@ export class ProximityMap implements Disposable { ownCompositeBuildLimits(options.limits), ownCompositeRebuildOptions(options.rebuild), ))); } + buildOrRebuildCompositeTurboQuant( + baseMap: ProximityMap, + base: TurboQuantizer, + options: CompositeBuildOrRebuildOptions = {}, + ): Promise { + const native = this.nativeHandle(); + return nativePromise(options.signal, () => compositeRebuildOutcome( + native.buildOrRebuildCompositeTurboQuant( + baseMap.nativeHandle(), base.nativeHandle(), ownCompositeConfig(options.config), + ownCompositeBuildLimits(options.limits), ownCompositeRebuildOptions(options.rebuild), + ), + )); + } loadComposite(manifest: Uint8Array): CompositeAccelerator { return new CompositeAccelerator(this.nativeHandle().loadComposite(ownedBytes(manifest))); } buildAcceleratorCatalog(options: { hnsw?: HnswIndex; pq?: ProductQuantizer; + turboquant?: TurboQuantizer; composite?: CompositeAccelerator; } = {}): AcceleratorCatalog { return new AcceleratorCatalog(this.nativeHandle().buildAcceleratorCatalog( - options.hnsw?.nativeHandle(), options.pq?.nativeHandle(), options.composite?.nativeHandle(), + options.hnsw?.nativeHandle(), options.pq?.nativeHandle(), + options.turboquant?.nativeHandle(), options.composite?.nativeHandle(), )); } loadAcceleratorCatalog(manifest: Uint8Array): AcceleratorCatalog { @@ -1465,6 +1701,58 @@ export class ProductQuantizer implements Disposable { [Symbol.dispose](): void { this.close(); } } +export class TurboQuantizer implements Disposable { + #native?: NativeTurboQuantizer; + constructor(native: NativeTurboQuantizer) { this.#native = native; } + #open(): NativeTurboQuantizer { + if (this.#native == null) throw new Error("TurboQuantizer is closed"); + return this.#native; + } + nativeHandle(): NativeTurboQuantizer { return this.#open(); } + manifest(): Uint8Array { return ownedBytes(this.#open().manifest()); } + sourceDescriptor(): Uint8Array { return ownedBytes(this.#open().sourceDescriptor()); } + config(): TurboQuantizationConfig { return turboquantConfig(this.#open().config()); } + quality(): TurboQuantizationQuality { return this.#open().quality(); } + verify(map: ProximityMap): TurboQuantizationVerification { + const value = this.#open().verify(map.nativeHandle()); + return { + encodedVectors: BigInt(value.encodedVectors), + zeroVectors: BigInt(value.zeroVectors), + quality: value.quality, + }; + } + search(map: ProximityMap, request: SearchRequest): Promise { + const cancellation = map.cancellationToken(); + return this.searchCancellable(map, request, cancellation).finally(() => cancellation.close()); + } + searchWithRuntime( + map: ProximityMap, request: SearchRequest, runtime: ProximitySearchRuntime, + ): Promise { + const cancellation = map.cancellationToken(); + return this.searchCancellable(map, request, cancellation, runtime) + .finally(() => cancellation.close()); + } + searchCancellable( + map: ProximityMap, request: SearchRequest, cancellation: ProximityCancellationToken, + runtime?: ProximitySearchRuntime, + ): Promise { + const native = this.#open(); + const nativeMap = map.nativeHandle(); + const nativeRuntime = runtime?.nativeHandle(); + return cooperativeNativeSearch( + request, cancellation, + (owned, token) => native.searchCancellable(nativeMap, owned, nativeRuntime, token), + ); + } + proveSearch(map: ProximityMap, request: SearchRequest): ProximitySearchProof { + return new ProximitySearchProof( + this.#open().proveSearch(map.nativeHandle(), ownSearchRequest(request)), + ); + } + close(): void { this.#native = undefined; } + [Symbol.dispose](): void { this.close(); } +} + export class CompositeAccelerator implements Disposable { #native?: NativeCompositeAccelerator; constructor(native: NativeCompositeAccelerator) { this.#native = native; } @@ -1475,7 +1763,9 @@ export class CompositeAccelerator implements Disposable { manifest(): Uint8Array { return ownedBytes(this.nativeHandle().manifest()); } currentSourceDescriptor(): Uint8Array { return ownedBytes(this.nativeHandle().currentSourceDescriptor()); } baseSourceDescriptor(): Uint8Array { return ownedBytes(this.nativeHandle().baseSourceDescriptor()); } - baseKind(): "hnsw" | "product_quantized" { return this.nativeHandle().baseKind(); } + baseKind(): "hnsw" | "product_quantized" | "turbo_quantized" { + return this.nativeHandle().baseKind(); + } deltaCount(): bigint { return BigInt(this.nativeHandle().deltaCount()); } shadowCount(): bigint { return BigInt(this.nativeHandle().shadowCount()); } config(): CompositeAcceleratorConfig { return compositeConfig(this.nativeHandle().config()); } diff --git a/bindings/node/test/portable-parity.test.ts b/bindings/node/test/portable-parity.test.ts index 70bb62a6..788d7d0a 100644 --- a/bindings/node/test/portable-parity.test.ts +++ b/bindings/node/test/portable-parity.test.ts @@ -186,6 +186,79 @@ test("product quantizer lifecycle is portable and bounded", async () => { } }); +test("TurboQuant lifecycle is portable, verifiable, and cancellable", async () => { + const engine = await Engine.memory(); + try { + const proximity = await engine.buildProximity(8, Array.from({ length: 32 }, (_, index) => ({ + key: bytes(`turbo-${index.toString().padStart(2, "0")}`), + vector: new Float32Array([index, index % 3, 0, 1, 2, 3, 4, 5]), + value: bytes(`value-${index.toString().padStart(2, "0")}`), + }))); + const config = { bitWidth: 4 as const, rerankMultiplier: 4, seed: (1n << 64n) - 1n }; + const built = await proximity.buildTurboQuant({ config, workerThreads: 2n }); + const index = built.index; + assert.equal(built.stats.encodedVectors, 32n); + assert.deepEqual(index.config(), config); + assert.deepEqual(index.sourceDescriptor(), proximity.descriptor()); + assert.equal(index.verify(proximity).encodedVectors, 32n); + const request = { + ...exactSearch(new Float32Array([0, 0, 0, 1, 2, 3, 4, 5]), 3), + policy: "fixed_budget" as const, + backend: "turbo_quantized" as const, + }; + const result = await index.search(proximity, request); + assert.equal(result.backend, "turbo_quantized"); + assert.equal(Buffer.from(result.neighbors[0].key).toString(), "turbo-00"); + assert.ok(result.stats.distanceEvaluations > 0n); + const runtime = engine.proximitySearchRuntime(); + try { + assert.equal((await index.searchWithRuntime(proximity, request, runtime)).backend, "turbo_quantized"); + } finally { + runtime.close(); + } + const cancellation = proximity.cancellationToken(); + try { + cancellation.cancel(); + const cancelled = await index.searchCancellable(proximity, request, cancellation); + assert.equal(cancelled.completion, "cancelled"); + assert.deepEqual(cancelled.neighbors, []); + } finally { + cancellation.close(); + } + const manifest = index.manifest(); + const proof = index.proveSearch(proximity, request); + assert.equal(proof.verify(proximity.descriptor()).result.backend, "turbo_quantized"); + proof.close(); + const catalog = proximity.buildAcceleratorCatalog({ turboquant: index }); + assert.equal(catalog.entries()[0].kind, "turbo_quantized"); + assert.equal((await catalog.search(proximity, request)).backend, "turbo_quantized"); + catalog.close(); + + const current = proximity.mutate([{ + key: bytes("turbo-00"), + vector: new Float32Array([0.25, 0, 0, 1, 2, 3, 4, 5]), + value: bytes("updated"), + }]).map; + const compositeBuilt = await current.buildCompositeTurboQuant(proximity, index); + assert.ok(compositeBuilt.accelerator); + const composite = compositeBuilt.accelerator!; + assert.equal(composite.baseKind(), "turbo_quantized"); + assert.equal((await composite.search(current, { + ...request, + backend: "composite", + })).backend, "composite"); + composite.close(); + current.close(); + index.close(); + const loaded = proximity.loadTurboQuant(manifest); + assert.deepEqual(loaded.manifest(), manifest); + loaded.close(); + proximity.close(); + } finally { + engine.close(); + } +}); + test("HNSW accelerator lifecycle is portable", async () => { const engine = await Engine.memory(); try { diff --git a/bindings/pom.xml b/bindings/pom.xml index 2ffabc40..ce5d5f9a 100644 --- a/bindings/pom.xml +++ b/bindings/pom.xml @@ -33,6 +33,22 @@ 5.11.4 5.14.0 2.2.21 + 1.17.7 UTF-8 + + + + + net.bytebuddy + byte-buddy + ${byte-buddy.version} + + + net.bytebuddy + byte-buddy-agent + ${byte-buddy.version} + + + diff --git a/bindings/python/COOKBOOK.md b/bindings/python/COOKBOOK.md index 0515aac4..03cc60a3 100644 --- a/bindings/python/COOKBOOK.md +++ b/bindings/python/COOKBOOK.md @@ -33,6 +33,43 @@ Application-style files include `batch_build.py`, `local_first_state.py`, `vector_sidecar.py`, `provenance_values.py`, `materialized_view.py`, `filesystem_snapshot.py`, and `durable_sqlite.py`. +## Build And Force A TurboQuant RAG Sidecar + +TurboQuant is a disposable routing sidecar: the proximity map remains the +source of truth, shortlisted records are reranked from their full-precision +vectors, and `Auto` does not select TurboQuant until qualification passes. + +```python +import prolly + +records = [ + prolly.ProximityRecord( + f"chunk/{index:02}".encode(), + [float(index), float(index % 3), 0.0, 1.0, 2.0, 3.0, 4.0, 5.0], + f"document-{index:02}".encode(), + ) + for index in range(32) +] + +with prolly.Engine.memory() as engine: + with engine.build_proximity(dimensions=8, records=records) as proximity: + built = proximity.build_turboquant(worker_threads=2) + request = prolly.exact_proximity_search_request( + [0.0, 0.0, 0.0, 1.0, 2.0, 3.0, 4.0, 5.0], 3 + ) + request.policy = prolly.SearchPolicyKind.FIXED_BUDGET + request.backend = prolly.SearchBackendRecord.TURBO_QUANTIZED + + with built.index as index: + assert index.verify(proximity).encoded_vectors == len(records) + result = index.search(proximity, request) + assert result.backend == prolly.SearchBackendRecord.TURBO_QUANTIZED + manifest = index.manifest + + with proximity.load_turboquant(manifest) as reopened: + assert reopened.manifest == manifest +``` + ## Create A Durable Index Use SQLite for an application-local durable store. Keep immutable snapshots as diff --git a/bindings/python/prolly/api.py b/bindings/python/prolly/api.py index f06a200a..914de03f 100644 --- a/bindings/python/prolly/api.py +++ b/bindings/python/prolly/api.py @@ -72,6 +72,12 @@ class ProductQuantizationBuildResult: stats: _native.ProductQuantizationBuildStatsRecord +@dataclass(frozen=True) +class TurboQuantizationBuildResult: + index: "TurboQuantizer" + stats: _native.TurboQuantizationBuildStatsRecord + + @dataclass(frozen=True) class CompositeBuildOutcome: accelerator: "CompositeAccelerator | None" @@ -85,10 +91,12 @@ class CompositeBuildOrRebuildOutcome: composite: "CompositeAccelerator | None" hnsw: "HnswIndex | None" pq: "ProductQuantizer | None" + turboquant: "TurboQuantizer | None" reasons: Sequence[_native.FullRebuildReasonRecord] composite_stats: _native.CompositeBuildStatsRecord hnsw_stats: _native.HnswBuildStatsRecord | None pq_stats: _native.ProductQuantizationBuildStatsRecord | None + turboquant_stats: _native.TurboQuantizationBuildStatsRecord | None IndexProjection = _native.IndexProjectionRecord @@ -397,6 +405,7 @@ def _owned_proximity_search_request(request): backend=request.backend, hnsw_ef_search=request.hnsw_ef_search, pq_rerank_multiplier=request.pq_rerank_multiplier, + turboquant_rerank_multiplier=request.turboquant_rerank_multiplier, ) @@ -1457,6 +1466,27 @@ def load_pq(self, manifest: bytes) -> "ProductQuantizer": self._open() return ProductQuantizer(self._inner.load_pq(bytes(manifest))) + def build_turboquant( + self, + config: _native.TurboQuantizationConfigRecord | None = None, + *, + worker_threads: int = 1, + limits: _native.TurboQuantizationBuildLimitsRecord | None = None, + ) -> TurboQuantizationBuildResult: + self._open() + result = self._inner.build_turboquant( + config or _native.default_turboquant_config(), + worker_threads, + limits or _native.default_turboquant_build_limits(), + ) + return TurboQuantizationBuildResult( + TurboQuantizer(result.index), result.stats + ) + + def load_turboquant(self, manifest: bytes) -> "TurboQuantizer": + self._open() + return TurboQuantizer(self._inner.load_turboquant(bytes(manifest))) + def build_composite_hnsw( self, base_map: "ProximityMap", @@ -1501,6 +1531,28 @@ def build_composite_pq( result.stats, ) + def build_composite_turboquant( + self, + base_map: "ProximityMap", + base: "TurboQuantizer", + config: _native.CompositeAcceleratorConfigRecord | None = None, + limits: _native.CompositeBuildLimitsRecord | None = None, + ) -> CompositeBuildOutcome: + self._open() + base_map._open() + base._open() + result = self._inner.build_composite_turboquant( + base_map._inner, + base._inner, + config or _native.default_composite_accelerator_config(), + limits or _native.default_composite_build_limits(), + ) + return CompositeBuildOutcome( + None if result.accelerator is None else CompositeAccelerator(result.accelerator), + result.reasons, + result.stats, + ) + @staticmethod def _rebuild_outcome(result) -> CompositeBuildOrRebuildOutcome: return CompositeBuildOrRebuildOutcome( @@ -1508,10 +1560,12 @@ def _rebuild_outcome(result) -> CompositeBuildOrRebuildOutcome: None if result.composite is None else CompositeAccelerator(result.composite), None if result.hnsw is None else HnswIndex(result.hnsw), None if result.pq is None else ProductQuantizer(result.pq), + None if result.turboquant is None else TurboQuantizer(result.turboquant), result.reasons, result.composite_stats, result.hnsw_stats, result.pq_stats, + result.turboquant_stats, ) def build_or_rebuild_composite_hnsw( @@ -1556,6 +1610,27 @@ def build_or_rebuild_composite_pq( ) ) + def build_or_rebuild_composite_turboquant( + self, + base_map: "ProximityMap", + base: "TurboQuantizer", + config: _native.CompositeAcceleratorConfigRecord | None = None, + limits: _native.CompositeBuildLimitsRecord | None = None, + rebuild: _native.CompositeRebuildOptionsRecord | None = None, + ) -> CompositeBuildOrRebuildOutcome: + self._open() + base_map._open() + base._open() + return self._rebuild_outcome( + self._inner.build_or_rebuild_composite_turboquant( + base_map._inner, + base._inner, + config or _native.default_composite_accelerator_config(), + limits or _native.default_composite_build_limits(), + rebuild or _native.default_composite_rebuild_options(), + ) + ) + def load_composite(self, manifest: bytes) -> "CompositeAccelerator": self._open() return CompositeAccelerator(self._inner.load_composite(bytes(manifest))) @@ -1565,16 +1640,18 @@ def build_accelerator_catalog( *, hnsw: "HnswIndex | None" = None, pq: "ProductQuantizer | None" = None, + turboquant: "TurboQuantizer | None" = None, composite: "CompositeAccelerator | None" = None, ) -> "AcceleratorCatalog": self._open() - for value in (hnsw, pq, composite): + for value in (hnsw, pq, turboquant, composite): if value is not None: value._open() return AcceleratorCatalog( self._inner.build_accelerator_catalog( None if hnsw is None else hnsw._inner, None if pq is None else pq._inner, + None if turboquant is None else turboquant._inner, None if composite is None else composite._inner, ) ) @@ -1947,6 +2024,121 @@ def prove_search( ) +class TurboQuantizer(_Scoped): + def __init__(self, inner: _native.BindingTurboQuantizer): + super().__init__() + self._inner = inner + + @property + def manifest(self) -> bytes: + self._open() + return self._inner.manifest() + + @property + def source_descriptor(self) -> bytes: + self._open() + return self._inner.source_descriptor() + + @property + def config(self) -> _native.TurboQuantizationConfigRecord: + self._open() + return self._inner.config() + + @property + def quality(self) -> _native.TurboQuantizationQualityRecord: + self._open() + return self._inner.quality() + + def verify(self, map: ProximityMap) -> _native.TurboQuantizationVerificationRecord: + self._open() + map._open() + return self._inner.verify(map._inner) + + def search( + self, + map: ProximityMap, + request: _native.ProximitySearchRequestRecord, + ) -> _native.ProximitySearchResultRecord: + self._open() + map._open() + return self._inner.search( + map._inner, + _owned_proximity_search_request(request), + ) + + def search_with_runtime( + self, + map: ProximityMap, + request: _native.ProximitySearchRequestRecord, + runtime: ProximitySearchRuntime, + ) -> _native.ProximitySearchResultRecord: + self._open() + map._open() + runtime._open() + return self._inner.search_with_runtime( + map._inner, + _owned_proximity_search_request(request), + runtime._inner, + ) + + def search_cancellable( + self, + map: ProximityMap, + request: _native.ProximitySearchRequestRecord, + *, + runtime: ProximitySearchRuntime | None = None, + cancellation: ProximityCancellationToken, + ) -> _native.ProximitySearchResultRecord: + self._open() + map._open() + cancellation._open() + if runtime is not None: + runtime._open() + return self._inner.search_cancellable( + map._inner, + _owned_proximity_search_request(request), + None if runtime is None else runtime._inner, + cancellation._inner, + ) + + async def search_async( + self, + map: ProximityMap, + request: _native.ProximitySearchRequestRecord, + *, + runtime: ProximitySearchRuntime | None = None, + cancellation: ProximityCancellationToken | None = None, + ) -> _native.ProximitySearchResultRecord: + token = cancellation or ProximityCancellationToken() + try: + return await asyncio.to_thread( + self.search_cancellable, + map, + _owned_proximity_search_request(request), + runtime=runtime, + cancellation=token, + ) + except asyncio.CancelledError: + token.cancel() + raise + + def prove_search( + self, + map: ProximityMap, + request: _native.ProximitySearchRequestRecord, + limits: _native.ContentGraphLimitsRecord | None = None, + ) -> "ProximitySearchProof": + self._open() + map._open() + return ProximitySearchProof( + self._inner.prove_search( + map._inner, + _owned_proximity_search_request(request), + limits or _native.default_content_graph_limits(), + ) + ) + + class CompositeAccelerator(_Scoped): def __init__(self, inner: _native.BindingCompositeAccelerator): super().__init__() @@ -2341,6 +2533,8 @@ def verify_proximity_structure_proof( "ProximitySearchProof", "ProductQuantizationBuildResult", "ProductQuantizer", + "TurboQuantizationBuildResult", + "TurboQuantizer", "JsonValueCodec", "SecondaryIndex", "ScopedBytes", diff --git a/bindings/python/prolly/uniffi/prolly.py b/bindings/python/prolly/uniffi/prolly.py index b51b90e9..6d53ba9a 100644 --- a/bindings/python/prolly/uniffi/prolly.py +++ b/bindings/python/prolly/uniffi/prolly.py @@ -334,7 +334,7 @@ def _uniffi_trait_interface_call_with_error(call_status, make_call, write_return except Exception as e: call_status.code = _UniffiRustCallStatus.CALL_UNEXPECTED_ERROR call_status.error_buf = _UniffiFfiConverterString.lower(repr(e)) -# Initial value and increment amount for handles. +# Initial value and increment amount for handles. # These ensure that Python-generated handles always have the lowest bit set _UNIFFI_HANDLEMAP_INITIAL = 1 _UNIFFI_HANDLEMAP_DELTA = 2 @@ -537,6 +537,10 @@ def _uniffi_check_api_checksums(lib): raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_prolly_bindings_checksum_func_default_secondary_index_limits() != 62049: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_prolly_bindings_checksum_func_default_turboquant_build_limits() != 16284: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_prolly_bindings_checksum_func_default_turboquant_config() != 37586: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_prolly_bindings_checksum_func_delete_mutation() != 23016: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_prolly_bindings_checksum_func_diff_page_proof_from_bytes() != 24710: @@ -1077,20 +1081,26 @@ def _uniffi_check_api_checksums(lib): raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_prolly_bindings_checksum_method_bindingproximitycancellationtoken_is_cancelled() != 33821: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_prolly_bindings_checksum_method_bindingproximitymap_build_accelerator_catalog() != 27841: + if lib.uniffi_prolly_bindings_checksum_method_bindingproximitymap_build_accelerator_catalog() != 39929: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_prolly_bindings_checksum_method_bindingproximitymap_build_composite_hnsw() != 60836: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_prolly_bindings_checksum_method_bindingproximitymap_build_composite_pq() != 36562: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_prolly_bindings_checksum_method_bindingproximitymap_build_composite_turboquant() != 32424: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_prolly_bindings_checksum_method_bindingproximitymap_build_hnsw() != 15873: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_prolly_bindings_checksum_method_bindingproximitymap_build_or_rebuild_composite_hnsw() != 51755: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_prolly_bindings_checksum_method_bindingproximitymap_build_or_rebuild_composite_pq() != 27287: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_prolly_bindings_checksum_method_bindingproximitymap_build_or_rebuild_composite_turboquant() != 42282: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_prolly_bindings_checksum_method_bindingproximitymap_build_pq() != 7075: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_prolly_bindings_checksum_method_bindingproximitymap_build_turboquant() != 51245: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_prolly_bindings_checksum_method_bindingproximitymap_clear_content_cache() != 42240: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_prolly_bindings_checksum_method_bindingproximitymap_config() != 38616: @@ -1113,6 +1123,8 @@ def _uniffi_check_api_checksums(lib): raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_prolly_bindings_checksum_method_bindingproximitymap_load_pq() != 63976: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_prolly_bindings_checksum_method_bindingproximitymap_load_turboquant() != 12420: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_prolly_bindings_checksum_method_bindingproximitymap_mutate() != 39394: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_prolly_bindings_checksum_method_bindingproximitymap_prove_membership() != 16834: @@ -1183,6 +1195,24 @@ def _uniffi_check_api_checksums(lib): raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_prolly_bindings_checksum_method_bindingsecondaryindexsnapshot_records() != 3203: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_prolly_bindings_checksum_method_bindingturboquantizer_config() != 59416: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_prolly_bindings_checksum_method_bindingturboquantizer_manifest() != 10558: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_prolly_bindings_checksum_method_bindingturboquantizer_prove_search() != 38682: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_prolly_bindings_checksum_method_bindingturboquantizer_quality() != 37928: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_prolly_bindings_checksum_method_bindingturboquantizer_search() != 30129: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_prolly_bindings_checksum_method_bindingturboquantizer_search_cancellable() != 39190: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_prolly_bindings_checksum_method_bindingturboquantizer_search_with_runtime() != 64232: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_prolly_bindings_checksum_method_bindingturboquantizer_source_descriptor() != 44910: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_prolly_bindings_checksum_method_bindingturboquantizer_verify() != 57510: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_prolly_bindings_checksum_constructor_bindingversionedmap_new() != 64633: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_prolly_bindings_checksum_method_bindingversionedmap_append() != 3269: @@ -2216,6 +2246,16 @@ class _UniffiForeignFutureDroppedCallbackStruct(ctypes.Structure): ctypes.POINTER(_UniffiRustCallStatus), ) _UniffiLib.uniffi_prolly_bindings_fn_free_bindingsecondaryindexsnapshot.restype = None +_UniffiLib.uniffi_prolly_bindings_fn_clone_bindingturboquantizer.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_prolly_bindings_fn_clone_bindingturboquantizer.restype = ctypes.c_uint64 +_UniffiLib.uniffi_prolly_bindings_fn_free_bindingturboquantizer.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_prolly_bindings_fn_free_bindingturboquantizer.restype = None _UniffiLib.uniffi_prolly_bindings_fn_clone_bindingversionedmap.argtypes = ( ctypes.c_uint64, ctypes.POINTER(_UniffiRustCallStatus), @@ -2766,6 +2806,14 @@ class _UniffiVTableCallbackInterfaceProllySecondaryIndexExtractorCallback(ctypes ctypes.POINTER(_UniffiRustCallStatus), ) _UniffiLib.uniffi_prolly_bindings_fn_func_default_secondary_index_limits.restype = _UniffiRustBuffer +_UniffiLib.uniffi_prolly_bindings_fn_func_default_turboquant_build_limits.argtypes = ( + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_prolly_bindings_fn_func_default_turboquant_build_limits.restype = _UniffiRustBuffer +_UniffiLib.uniffi_prolly_bindings_fn_func_default_turboquant_config.argtypes = ( + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_prolly_bindings_fn_func_default_turboquant_config.restype = _UniffiRustBuffer _UniffiLib.uniffi_prolly_bindings_fn_func_delete_mutation.argtypes = ( _UniffiRustBuffer, ctypes.POINTER(_UniffiRustCallStatus), @@ -4328,6 +4376,7 @@ class _UniffiVTableCallbackInterfaceProllySecondaryIndexExtractorCallback(ctypes _UniffiRustBuffer, _UniffiRustBuffer, _UniffiRustBuffer, + _UniffiRustBuffer, ctypes.POINTER(_UniffiRustCallStatus), ) _UniffiLib.uniffi_prolly_bindings_fn_method_bindingproximitymap_build_accelerator_catalog.restype = ctypes.c_uint64 @@ -4349,6 +4398,15 @@ class _UniffiVTableCallbackInterfaceProllySecondaryIndexExtractorCallback(ctypes ctypes.POINTER(_UniffiRustCallStatus), ) _UniffiLib.uniffi_prolly_bindings_fn_method_bindingproximitymap_build_composite_pq.restype = _UniffiRustBuffer +_UniffiLib.uniffi_prolly_bindings_fn_method_bindingproximitymap_build_composite_turboquant.argtypes = ( + ctypes.c_uint64, + ctypes.c_uint64, + ctypes.c_uint64, + _UniffiRustBuffer, + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_prolly_bindings_fn_method_bindingproximitymap_build_composite_turboquant.restype = _UniffiRustBuffer _UniffiLib.uniffi_prolly_bindings_fn_method_bindingproximitymap_build_hnsw.argtypes = ( ctypes.c_uint64, _UniffiRustBuffer, @@ -4376,6 +4434,16 @@ class _UniffiVTableCallbackInterfaceProllySecondaryIndexExtractorCallback(ctypes ctypes.POINTER(_UniffiRustCallStatus), ) _UniffiLib.uniffi_prolly_bindings_fn_method_bindingproximitymap_build_or_rebuild_composite_pq.restype = _UniffiRustBuffer +_UniffiLib.uniffi_prolly_bindings_fn_method_bindingproximitymap_build_or_rebuild_composite_turboquant.argtypes = ( + ctypes.c_uint64, + ctypes.c_uint64, + ctypes.c_uint64, + _UniffiRustBuffer, + _UniffiRustBuffer, + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_prolly_bindings_fn_method_bindingproximitymap_build_or_rebuild_composite_turboquant.restype = _UniffiRustBuffer _UniffiLib.uniffi_prolly_bindings_fn_method_bindingproximitymap_build_pq.argtypes = ( ctypes.c_uint64, _UniffiRustBuffer, @@ -4384,6 +4452,14 @@ class _UniffiVTableCallbackInterfaceProllySecondaryIndexExtractorCallback(ctypes ctypes.POINTER(_UniffiRustCallStatus), ) _UniffiLib.uniffi_prolly_bindings_fn_method_bindingproximitymap_build_pq.restype = _UniffiRustBuffer +_UniffiLib.uniffi_prolly_bindings_fn_method_bindingproximitymap_build_turboquant.argtypes = ( + ctypes.c_uint64, + _UniffiRustBuffer, + ctypes.c_uint64, + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_prolly_bindings_fn_method_bindingproximitymap_build_turboquant.restype = _UniffiRustBuffer _UniffiLib.uniffi_prolly_bindings_fn_method_bindingproximitymap_clear_content_cache.argtypes = ( ctypes.c_uint64, ctypes.POINTER(_UniffiRustCallStatus), @@ -4445,6 +4521,12 @@ class _UniffiVTableCallbackInterfaceProllySecondaryIndexExtractorCallback(ctypes ctypes.POINTER(_UniffiRustCallStatus), ) _UniffiLib.uniffi_prolly_bindings_fn_method_bindingproximitymap_load_pq.restype = ctypes.c_uint64 +_UniffiLib.uniffi_prolly_bindings_fn_method_bindingproximitymap_load_turboquant.argtypes = ( + ctypes.c_uint64, + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_prolly_bindings_fn_method_bindingproximitymap_load_turboquant.restype = ctypes.c_uint64 _UniffiLib.uniffi_prolly_bindings_fn_method_bindingproximitymap_mutate.argtypes = ( ctypes.c_uint64, _UniffiRustBuffer, @@ -4669,6 +4751,64 @@ class _UniffiVTableCallbackInterfaceProllySecondaryIndexExtractorCallback(ctypes ctypes.POINTER(_UniffiRustCallStatus), ) _UniffiLib.uniffi_prolly_bindings_fn_method_bindingsecondaryindexsnapshot_records.restype = _UniffiRustBuffer +_UniffiLib.uniffi_prolly_bindings_fn_method_bindingturboquantizer_config.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_prolly_bindings_fn_method_bindingturboquantizer_config.restype = _UniffiRustBuffer +_UniffiLib.uniffi_prolly_bindings_fn_method_bindingturboquantizer_manifest.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_prolly_bindings_fn_method_bindingturboquantizer_manifest.restype = _UniffiRustBuffer +_UniffiLib.uniffi_prolly_bindings_fn_method_bindingturboquantizer_prove_search.argtypes = ( + ctypes.c_uint64, + ctypes.c_uint64, + _UniffiRustBuffer, + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_prolly_bindings_fn_method_bindingturboquantizer_prove_search.restype = ctypes.c_uint64 +_UniffiLib.uniffi_prolly_bindings_fn_method_bindingturboquantizer_quality.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_prolly_bindings_fn_method_bindingturboquantizer_quality.restype = _UniffiRustBuffer +_UniffiLib.uniffi_prolly_bindings_fn_method_bindingturboquantizer_search.argtypes = ( + ctypes.c_uint64, + ctypes.c_uint64, + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_prolly_bindings_fn_method_bindingturboquantizer_search.restype = _UniffiRustBuffer +_UniffiLib.uniffi_prolly_bindings_fn_method_bindingturboquantizer_search_cancellable.argtypes = ( + ctypes.c_uint64, + ctypes.c_uint64, + _UniffiRustBuffer, + _UniffiRustBuffer, + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_prolly_bindings_fn_method_bindingturboquantizer_search_cancellable.restype = _UniffiRustBuffer +_UniffiLib.uniffi_prolly_bindings_fn_method_bindingturboquantizer_search_with_runtime.argtypes = ( + ctypes.c_uint64, + ctypes.c_uint64, + _UniffiRustBuffer, + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_prolly_bindings_fn_method_bindingturboquantizer_search_with_runtime.restype = _UniffiRustBuffer +_UniffiLib.uniffi_prolly_bindings_fn_method_bindingturboquantizer_source_descriptor.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_prolly_bindings_fn_method_bindingturboquantizer_source_descriptor.restype = _UniffiRustBuffer +_UniffiLib.uniffi_prolly_bindings_fn_method_bindingturboquantizer_verify.argtypes = ( + ctypes.c_uint64, + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_prolly_bindings_fn_method_bindingturboquantizer_verify.restype = _UniffiRustBuffer _UniffiLib.uniffi_prolly_bindings_fn_constructor_bindingversionedmap_new.argtypes = ( ctypes.c_uint64, _UniffiRustBuffer, @@ -6720,6 +6860,12 @@ class _UniffiVTableCallbackInterfaceProllySecondaryIndexExtractorCallback(ctypes _UniffiLib.uniffi_prolly_bindings_checksum_func_default_secondary_index_limits.argtypes = ( ) _UniffiLib.uniffi_prolly_bindings_checksum_func_default_secondary_index_limits.restype = ctypes.c_uint16 +_UniffiLib.uniffi_prolly_bindings_checksum_func_default_turboquant_build_limits.argtypes = ( +) +_UniffiLib.uniffi_prolly_bindings_checksum_func_default_turboquant_build_limits.restype = ctypes.c_uint16 +_UniffiLib.uniffi_prolly_bindings_checksum_func_default_turboquant_config.argtypes = ( +) +_UniffiLib.uniffi_prolly_bindings_checksum_func_default_turboquant_config.restype = ctypes.c_uint16 _UniffiLib.uniffi_prolly_bindings_checksum_func_delete_mutation.argtypes = ( ) _UniffiLib.uniffi_prolly_bindings_checksum_func_delete_mutation.restype = ctypes.c_uint16 @@ -7539,6 +7685,9 @@ class _UniffiVTableCallbackInterfaceProllySecondaryIndexExtractorCallback(ctypes _UniffiLib.uniffi_prolly_bindings_checksum_method_bindingproximitymap_build_composite_pq.argtypes = ( ) _UniffiLib.uniffi_prolly_bindings_checksum_method_bindingproximitymap_build_composite_pq.restype = ctypes.c_uint16 +_UniffiLib.uniffi_prolly_bindings_checksum_method_bindingproximitymap_build_composite_turboquant.argtypes = ( +) +_UniffiLib.uniffi_prolly_bindings_checksum_method_bindingproximitymap_build_composite_turboquant.restype = ctypes.c_uint16 _UniffiLib.uniffi_prolly_bindings_checksum_method_bindingproximitymap_build_hnsw.argtypes = ( ) _UniffiLib.uniffi_prolly_bindings_checksum_method_bindingproximitymap_build_hnsw.restype = ctypes.c_uint16 @@ -7548,9 +7697,15 @@ class _UniffiVTableCallbackInterfaceProllySecondaryIndexExtractorCallback(ctypes _UniffiLib.uniffi_prolly_bindings_checksum_method_bindingproximitymap_build_or_rebuild_composite_pq.argtypes = ( ) _UniffiLib.uniffi_prolly_bindings_checksum_method_bindingproximitymap_build_or_rebuild_composite_pq.restype = ctypes.c_uint16 +_UniffiLib.uniffi_prolly_bindings_checksum_method_bindingproximitymap_build_or_rebuild_composite_turboquant.argtypes = ( +) +_UniffiLib.uniffi_prolly_bindings_checksum_method_bindingproximitymap_build_or_rebuild_composite_turboquant.restype = ctypes.c_uint16 _UniffiLib.uniffi_prolly_bindings_checksum_method_bindingproximitymap_build_pq.argtypes = ( ) _UniffiLib.uniffi_prolly_bindings_checksum_method_bindingproximitymap_build_pq.restype = ctypes.c_uint16 +_UniffiLib.uniffi_prolly_bindings_checksum_method_bindingproximitymap_build_turboquant.argtypes = ( +) +_UniffiLib.uniffi_prolly_bindings_checksum_method_bindingproximitymap_build_turboquant.restype = ctypes.c_uint16 _UniffiLib.uniffi_prolly_bindings_checksum_method_bindingproximitymap_clear_content_cache.argtypes = ( ) _UniffiLib.uniffi_prolly_bindings_checksum_method_bindingproximitymap_clear_content_cache.restype = ctypes.c_uint16 @@ -7584,6 +7739,9 @@ class _UniffiVTableCallbackInterfaceProllySecondaryIndexExtractorCallback(ctypes _UniffiLib.uniffi_prolly_bindings_checksum_method_bindingproximitymap_load_pq.argtypes = ( ) _UniffiLib.uniffi_prolly_bindings_checksum_method_bindingproximitymap_load_pq.restype = ctypes.c_uint16 +_UniffiLib.uniffi_prolly_bindings_checksum_method_bindingproximitymap_load_turboquant.argtypes = ( +) +_UniffiLib.uniffi_prolly_bindings_checksum_method_bindingproximitymap_load_turboquant.restype = ctypes.c_uint16 _UniffiLib.uniffi_prolly_bindings_checksum_method_bindingproximitymap_mutate.argtypes = ( ) _UniffiLib.uniffi_prolly_bindings_checksum_method_bindingproximitymap_mutate.restype = ctypes.c_uint16 @@ -7689,6 +7847,33 @@ class _UniffiVTableCallbackInterfaceProllySecondaryIndexExtractorCallback(ctypes _UniffiLib.uniffi_prolly_bindings_checksum_method_bindingsecondaryindexsnapshot_records.argtypes = ( ) _UniffiLib.uniffi_prolly_bindings_checksum_method_bindingsecondaryindexsnapshot_records.restype = ctypes.c_uint16 +_UniffiLib.uniffi_prolly_bindings_checksum_method_bindingturboquantizer_config.argtypes = ( +) +_UniffiLib.uniffi_prolly_bindings_checksum_method_bindingturboquantizer_config.restype = ctypes.c_uint16 +_UniffiLib.uniffi_prolly_bindings_checksum_method_bindingturboquantizer_manifest.argtypes = ( +) +_UniffiLib.uniffi_prolly_bindings_checksum_method_bindingturboquantizer_manifest.restype = ctypes.c_uint16 +_UniffiLib.uniffi_prolly_bindings_checksum_method_bindingturboquantizer_prove_search.argtypes = ( +) +_UniffiLib.uniffi_prolly_bindings_checksum_method_bindingturboquantizer_prove_search.restype = ctypes.c_uint16 +_UniffiLib.uniffi_prolly_bindings_checksum_method_bindingturboquantizer_quality.argtypes = ( +) +_UniffiLib.uniffi_prolly_bindings_checksum_method_bindingturboquantizer_quality.restype = ctypes.c_uint16 +_UniffiLib.uniffi_prolly_bindings_checksum_method_bindingturboquantizer_search.argtypes = ( +) +_UniffiLib.uniffi_prolly_bindings_checksum_method_bindingturboquantizer_search.restype = ctypes.c_uint16 +_UniffiLib.uniffi_prolly_bindings_checksum_method_bindingturboquantizer_search_cancellable.argtypes = ( +) +_UniffiLib.uniffi_prolly_bindings_checksum_method_bindingturboquantizer_search_cancellable.restype = ctypes.c_uint16 +_UniffiLib.uniffi_prolly_bindings_checksum_method_bindingturboquantizer_search_with_runtime.argtypes = ( +) +_UniffiLib.uniffi_prolly_bindings_checksum_method_bindingturboquantizer_search_with_runtime.restype = ctypes.c_uint16 +_UniffiLib.uniffi_prolly_bindings_checksum_method_bindingturboquantizer_source_descriptor.argtypes = ( +) +_UniffiLib.uniffi_prolly_bindings_checksum_method_bindingturboquantizer_source_descriptor.restype = ctypes.c_uint16 +_UniffiLib.uniffi_prolly_bindings_checksum_method_bindingturboquantizer_verify.argtypes = ( +) +_UniffiLib.uniffi_prolly_bindings_checksum_method_bindingturboquantizer_verify.restype = ctypes.c_uint16 _UniffiLib.uniffi_prolly_bindings_checksum_constructor_bindingversionedmap_new.argtypes = ( ) _UniffiLib.uniffi_prolly_bindings_checksum_constructor_bindingversionedmap_new.restype = ctypes.c_uint16 @@ -8698,13 +8883,15 @@ def _uniffi_cancel_task(task): class CatalogAcceleratorKindRecord(enum.Enum): - + HNSW = 0 - + PRODUCT_QUANTIZED = 1 - + COMPOSITE = 2 - + + TURBO_QUANTIZED = 3 + class _UniffiFfiConverterTypeCatalogAcceleratorKindRecord(_UniffiConverterRustBuffer): @@ -8717,6 +8904,8 @@ def read(buf): return CatalogAcceleratorKindRecord.PRODUCT_QUANTIZED if variant == 3: return CatalogAcceleratorKindRecord.COMPOSITE + if variant == 4: + return CatalogAcceleratorKindRecord.TURBO_QUANTIZED raise InternalError("Raw enum value doesn't match any cases") @staticmethod @@ -8727,6 +8916,8 @@ def check_lower(value): return if value == CatalogAcceleratorKindRecord.COMPOSITE: return + if value == CatalogAcceleratorKindRecord.TURBO_QUANTIZED: + return raise ValueError(value) @staticmethod @@ -8737,6 +8928,8 @@ def write(value, buf): buf.write_i32(2) if value == CatalogAcceleratorKindRecord.COMPOSITE: buf.write_i32(3) + if value == CatalogAcceleratorKindRecord.TURBO_QUANTIZED: + buf.write_i32(4) @@ -8766,10 +8959,10 @@ def __init__(self, *, kind:CatalogAcceleratorKindRecord, configuration_fingerpri self.kind = kind self.configuration_fingerprint = configuration_fingerprint self.manifest = manifest - - - + + + def __str__(self): return "AcceleratorCatalogEntryRecord(kind={}, configuration_fingerprint={}, manifest={})".format(self.kind, self.configuration_fingerprint, self.manifest) def __eq__(self, other): @@ -8821,13 +9014,13 @@ def write(value, buf): class IndexProjectionRecord(enum.Enum): - + KEYS_ONLY = 0 - + INCLUDE = 1 - + ALL = 2 - + class _UniffiFfiConverterTypeIndexProjectionRecord(_UniffiConverterRustBuffer): @@ -8871,10 +9064,10 @@ def __init__(self, *, name:bytes, generation:int, fingerprint:bytes, projection: self.fingerprint = fingerprint self.projection = projection self.index_version = index_version - - - + + + def __str__(self): return "ActiveIndexHealthRecord(name={}, generation={}, fingerprint={}, projection={}, index_version={})".format(self.name, self.generation, self.fingerprint, self.projection, self.index_version) def __eq__(self, other): @@ -9010,10 +9203,10 @@ def __init__(self, *, valid:bool, signature_valid:bool, time_valid:bool, not_yet self.issued_at_millis = issued_at_millis self.expires_at_millis = expires_at_millis self.nonce = nonce - - - + + + def __str__(self): return "AuthenticatedProofEnvelopeVerificationRecord(valid={}, signature_valid={}, time_valid={}, not_yet_valid={}, expired={}, algorithm={}, key_id={}, proof_bundle={}, context={}, issued_at_millis={}, expires_at_millis={}, nonce={})".format(self.valid, self.signature_valid, self.time_valid, self.not_yet_valid, self.expired, self.algorithm, self.key_id, self.proof_bundle, self.context, self.issued_at_millis, self.expires_at_millis, self.nonce) def __eq__(self, other): @@ -9131,10 +9324,10 @@ def __init__(self, *, version:int, kind:str, root:typing.Optional[bytes], other_ self.requested_end = requested_end self.limit = limit self.has_lookahead = has_lookahead - - - + + + def __str__(self): return "ProofBundleSummaryRecord(version={}, kind={}, root={}, other_root={}, key_count={}, path_node_count={}, start={}, end={}, after={}, requested_end={}, limit={}, has_lookahead={})".format(self.version, self.kind, self.root, self.other_root, self.key_count, self.path_node_count, self.start, self.end, self.after, self.requested_end, self.limit, self.has_lookahead) def __eq__(self, other): @@ -9216,10 +9409,10 @@ def write(value, buf): class RangeCursorRecord: def __init__(self, *, after_key:typing.Optional[bytes]): self.after_key = after_key - - - + + + def __str__(self): return "RangeCursorRecord(after_key={})".format(self.after_key) def __eq__(self, other): @@ -9277,10 +9470,10 @@ def __init__(self, *, summary:ProofBundleSummaryRecord, valid:bool, exists_count self.entry_count = entry_count self.diff_count = diff_count self.next_cursor = next_cursor - - - + + + def __str__(self): return "ProofBundleVerificationRecord(summary={}, valid={}, exists_count={}, absence_count={}, entry_count={}, diff_count={}, next_cursor={})".format(self.summary, self.valid, self.exists_count, self.absence_count, self.entry_count, self.diff_count, self.next_cursor) def __eq__(self, other): @@ -9390,10 +9583,10 @@ def __init__(self, *, valid:bool, envelope:AuthenticatedProofEnvelopeVerificatio self.envelope = envelope self.proof = proof self.proof_error = proof_error - - - + + + def __str__(self): return "AuthenticatedProofBundleVerificationRecord(valid={}, envelope={}, proof={}, proof_error={})".format(self.valid, self.envelope, self.proof, self.proof_error) def __eq__(self, other): @@ -9442,10 +9635,10 @@ def __init__(self, *, algorithm:str, key_id:bytes, proof_bundle:bytes, context:b self.expires_at_millis = expires_at_millis self.nonce = nonce self.signature = signature - - - + + + def __str__(self): return "AuthenticatedProofEnvelopeRecord(algorithm={}, key_id={}, proof_bundle={}, context={}, issued_at_millis={}, expires_at_millis={}, nonce={}, signature={})".format(self.algorithm, self.key_id, self.proof_bundle, self.context, self.issued_at_millis, self.expires_at_millis, self.nonce, self.signature) def __eq__(self, other): @@ -9522,15 +9715,15 @@ def write(value, buf): class EncodingKind(enum.Enum): - + RAW = 0 - + CBOR = 1 - + JSON = 2 - + CUSTOM = 3 - + class _UniffiFfiConverterTypeEncodingKind(_UniffiConverterRustBuffer): @@ -9577,10 +9770,10 @@ class EncodingRecord: def __init__(self, *, kind:EncodingKind, custom_name:typing.Optional[str]): self.kind = kind self.custom_name = custom_name - - - + + + def __str__(self): return "EncodingRecord(kind={}, custom_name={})".format(self.kind, self.custom_name) def __eq__(self, other): @@ -9619,10 +9812,10 @@ def __init__(self, *, min_chunk_size:int, max_chunk_size:int, chunking_factor:in self.node_cache_max_nodes = node_cache_max_nodes self.node_cache_max_bytes = node_cache_max_bytes self.format_bytes = format_bytes - - - + + + def __str__(self): return "ConfigRecord(min_chunk_size={}, max_chunk_size={}, chunking_factor={}, hash_seed={}, encoding={}, node_cache_max_nodes={}, node_cache_max_bytes={}, format_bytes={})".format(self.min_chunk_size, self.max_chunk_size, self.chunking_factor, self.hash_seed, self.encoding, self.node_cache_max_nodes, self.node_cache_max_bytes, self.format_bytes) def __eq__(self, other): @@ -9685,10 +9878,10 @@ class TreeRecord: def __init__(self, *, root:typing.Optional[bytes], config:ConfigRecord): self.root = root self.config = config - - - + + + def __str__(self): return "TreeRecord(root={}, config={})".format(self.root, self.config) def __eq__(self, other): @@ -9736,10 +9929,10 @@ def __init__(self, *, input_mutations:int, effective_mutations:int, preprocess_i self.parallel_tasks = parallel_tasks self.structural_islands = structural_islands self.coalesced_islands = coalesced_islands - - - + + + def __str__(self): return "BatchApplyStatsRecord(input_mutations={}, effective_mutations={}, preprocess_input_sorted={}, entries_streamed={}, nodes_read={}, written_nodes={}, nodes_reused={}, bytes_read={}, written_bytes={}, resync_distance_entries={}, resync_distance_nodes={}, used_key_stable_fast_path={}, used_batched_value_update_path={}, parallel_width={}, parallel_tasks={}, structural_islands={}, coalesced_islands={})".format(self.input_mutations, self.effective_mutations, self.preprocess_input_sorted, self.entries_streamed, self.nodes_read, self.written_nodes, self.nodes_reused, self.bytes_read, self.written_bytes, self.resync_distance_entries, self.resync_distance_nodes, self.used_key_stable_fast_path, self.used_batched_value_update_path, self.parallel_width, self.parallel_tasks, self.structural_islands, self.coalesced_islands) def __eq__(self, other): @@ -9847,10 +10040,10 @@ class BatchApplyResultRecord: def __init__(self, *, tree:TreeRecord, stats:BatchApplyStatsRecord): self.tree = tree self.stats = stats - - - + + + def __str__(self): return "BatchApplyResultRecord(tree={}, stats={})".format(self.tree, self.stats) def __eq__(self, other): @@ -9883,10 +10076,10 @@ class BlobRefRecord: def __init__(self, *, cid:bytes, len:int): self.cid = cid self.len = len - - - + + + def __str__(self): return "BlobRefRecord(cid={}, len={})".format(self.cid, self.len) def __eq__(self, other): @@ -9945,10 +10138,10 @@ def __init__(self, *, live_blobs:typing.List[BlobRefRecord], live_blob_count:int self.live_blob_bytes = live_blob_bytes self.scanned_nodes = scanned_nodes self.scanned_values = scanned_values - - - + + + def __str__(self): return "BlobGcReachabilityRecord(live_blobs={}, live_blob_count={}, live_blob_bytes={}, scanned_nodes={}, scanned_values={})".format(self.live_blobs, self.live_blob_count, self.live_blob_bytes, self.scanned_nodes, self.scanned_values) def __eq__(self, other): @@ -10000,10 +10193,10 @@ def __init__(self, *, reachability:BlobGcReachabilityRecord, candidate_blobs:int self.reclaimable_blob_count = reclaimable_blob_count self.reclaimable_blob_bytes = reclaimable_blob_bytes self.missing_candidates = missing_candidates - - - + + + def __str__(self): return "BlobGcPlanRecord(reachability={}, candidate_blobs={}, reclaimable_blobs={}, reclaimable_blob_count={}, reclaimable_blob_bytes={}, missing_candidates={})".format(self.reachability, self.candidate_blobs, self.reclaimable_blobs, self.reclaimable_blob_count, self.reclaimable_blob_bytes, self.missing_candidates) def __eq__(self, other): @@ -10057,10 +10250,10 @@ def __init__(self, *, plan:BlobGcPlanRecord, deleted_blobs:int, deleted_blob_byt self.plan = plan self.deleted_blobs = deleted_blobs self.deleted_blob_bytes = deleted_blob_bytes - - - + + + def __str__(self): return "BlobGcSweepRecord(plan={}, deleted_blobs={}, deleted_blob_bytes={})".format(self.plan, self.deleted_blobs, self.deleted_blob_bytes) def __eq__(self, other): @@ -10123,10 +10316,10 @@ def __init__(self, *, code:str, message:str, retryable:bool, provider_code:typin self.message = message self.retryable = retryable self.provider_code = provider_code - - - + + + def __str__(self): return "StoreErrorRecord(code={}, message={}, retryable={}, provider_code={})".format(self.code, self.message, self.retryable, self.provider_code) def __eq__(self, other): @@ -10194,10 +10387,10 @@ class BytesListResultRecord: def __init__(self, *, values:typing.List[bytes], error:typing.Optional[StoreErrorRecord]): self.values = values self.error = error - - - + + + def __str__(self): return "BytesListResultRecord(values={}, error={})".format(self.values, self.error) def __eq__(self, other): @@ -10232,10 +10425,10 @@ def __init__(self, *, cached_nodes:int, cached_bytes:int, pinned_nodes:int, pinn self.cached_bytes = cached_bytes self.pinned_nodes = pinned_nodes self.pinned_bytes = pinned_bytes - - - + + + def __str__(self): return "CacheStatsRecord(cached_nodes={}, cached_bytes={}, pinned_nodes={}, pinned_bytes={})".format(self.cached_nodes, self.cached_bytes, self.pinned_nodes, self.pinned_bytes) def __eq__(self, other): @@ -10278,10 +10471,10 @@ class ChangedSpanRecord: def __init__(self, *, start:bytes, end:typing.Optional[bytes]): self.start = start self.end = end - - - + + + def __str__(self): return "ChangedSpanRecord(start={}, end={})".format(self.start, self.end) def __eq__(self, other): @@ -10338,10 +10531,10 @@ def __init__(self, *, base_root:typing.Optional[bytes], changed_root:typing.Opti self.base_root = base_root self.changed_root = changed_root self.spans = spans - - - + + + def __str__(self): return "ChangedSpanHintRecord(base_root={}, changed_root={}, spans={})".format(self.base_root, self.changed_root, self.spans) def __eq__(self, other): @@ -10382,10 +10575,10 @@ def __init__(self, *, max_delta_records:int, max_shadow_records:int, max_delta_r self.max_delta_ratio_ppm = max_delta_ratio_ppm self.max_shadow_ratio_ppm = max_shadow_ratio_ppm self.base_overfetch_multiplier = base_overfetch_multiplier - - - + + + def __str__(self): return "CompositeAcceleratorConfigRecord(max_delta_records={}, max_shadow_records={}, max_delta_ratio_ppm={}, max_shadow_ratio_ppm={}, base_overfetch_multiplier={})".format(self.max_delta_records, self.max_shadow_records, self.max_delta_ratio_ppm, self.max_shadow_ratio_ppm, self.base_overfetch_multiplier) def __eq__(self, other): @@ -10435,10 +10628,10 @@ def __init__(self, *, max_diff_entries:typing.Optional[int], max_owned_bytes:typ self.max_owned_bytes = max_owned_bytes self.max_encoded_output_bytes = max_encoded_output_bytes self.max_distance_evaluations = max_distance_evaluations - - - + + + def __str__(self): return "CompositeBuildLimitsRecord(max_diff_entries={}, max_owned_bytes={}, max_encoded_output_bytes={}, max_distance_evaluations={})".format(self.max_diff_entries, self.max_owned_bytes, self.max_encoded_output_bytes, self.max_distance_evaluations) def __eq__(self, other): @@ -10482,15 +10675,17 @@ def write(value, buf): class CompositeBuildOrRebuildKindRecord(enum.Enum): - + COMPOSITE = 0 - + NO_ACCELERATOR_REQUIRED = 1 - + HNSW_REBUILT = 2 - + PRODUCT_QUANTIZED_REBUILT = 3 - + + TURBO_QUANTIZED_REBUILT = 4 + class _UniffiFfiConverterTypeCompositeBuildOrRebuildKindRecord(_UniffiConverterRustBuffer): @@ -10505,6 +10700,8 @@ def read(buf): return CompositeBuildOrRebuildKindRecord.HNSW_REBUILT if variant == 4: return CompositeBuildOrRebuildKindRecord.PRODUCT_QUANTIZED_REBUILT + if variant == 5: + return CompositeBuildOrRebuildKindRecord.TURBO_QUANTIZED_REBUILT raise InternalError("Raw enum value doesn't match any cases") @staticmethod @@ -10517,6 +10714,8 @@ def check_lower(value): return if value == CompositeBuildOrRebuildKindRecord.PRODUCT_QUANTIZED_REBUILT: return + if value == CompositeBuildOrRebuildKindRecord.TURBO_QUANTIZED_REBUILT: + return raise ValueError(value) @staticmethod @@ -10529,6 +10728,8 @@ def write(value, buf): buf.write_i32(3) if value == CompositeBuildOrRebuildKindRecord.PRODUCT_QUANTIZED_REBUILT: buf.write_i32(4) + if value == CompositeBuildOrRebuildKindRecord.TURBO_QUANTIZED_REBUILT: + buf.write_i32(5) @@ -10538,11 +10739,13 @@ def write(value, buf): class CompositeBaseKindRecord(enum.Enum): - + HNSW = 0 - + PRODUCT_QUANTIZED = 1 - + + TURBO_QUANTIZED = 2 + class _UniffiFfiConverterTypeCompositeBaseKindRecord(_UniffiConverterRustBuffer): @@ -10553,6 +10756,8 @@ def read(buf): return CompositeBaseKindRecord.HNSW if variant == 2: return CompositeBaseKindRecord.PRODUCT_QUANTIZED + if variant == 3: + return CompositeBaseKindRecord.TURBO_QUANTIZED raise InternalError("Raw enum value doesn't match any cases") @staticmethod @@ -10561,6 +10766,8 @@ def check_lower(value): return if value == CompositeBaseKindRecord.PRODUCT_QUANTIZED: return + if value == CompositeBaseKindRecord.TURBO_QUANTIZED: + return raise ValueError(value) @staticmethod @@ -10569,6 +10776,8 @@ def write(value, buf): buf.write_i32(1) if value == CompositeBaseKindRecord.PRODUCT_QUANTIZED: buf.write_i32(2) + if value == CompositeBaseKindRecord.TURBO_QUANTIZED: + buf.write_i32(3) @@ -10585,10 +10794,10 @@ def __init__(self, *, diff_entries:int, inserted_records:int, vector_updated_rec self.owned_bytes_peak = owned_bytes_peak self.encoded_output_bytes = encoded_output_bytes self.distance_evaluations = distance_evaluations - - - + + + def __str__(self): return "CompositeBuildStatsRecord(diff_entries={}, inserted_records={}, vector_updated_records={}, value_only_records={}, deleted_records={}, delta_records={}, shadow_records={}, owned_bytes_peak={}, encoded_output_bytes={}, distance_evaluations={})".format(self.diff_entries, self.inserted_records, self.vector_updated_records, self.value_only_records, self.deleted_records, self.delta_records, self.shadow_records, self.owned_bytes_peak, self.encoded_output_bytes, self.distance_evaluations) def __eq__(self, other): @@ -10688,9 +10897,9 @@ def write(value, buf): class HnswRoutingVectorEncodingRecord(enum.Enum): - + FULL_F32 = 0 - + class _UniffiFfiConverterTypeHnswRoutingVectorEncodingRecord(_UniffiConverterRustBuffer): @@ -10724,10 +10933,10 @@ def __init__(self, *, max_connections:int, ef_construction:int, ef_search:int, l self.overfetch_multiplier = overfetch_multiplier self.seed = seed self.routing_vector_encoding = routing_vector_encoding - - - + + + def __str__(self): return "HnswConfigRecord(max_connections={}, ef_construction={}, ef_search={}, level_bits={}, overfetch_multiplier={}, seed={}, routing_vector_encoding={})".format(self.max_connections, self.ef_construction, self.ef_search, self.level_bits, self.overfetch_multiplier, self.seed, self.routing_vector_encoding) def __eq__(self, other): @@ -10818,13 +11027,13 @@ def read(cls, buf): class SearchPolicyKind(enum.Enum): - + EXACT = 0 - + FIXED_BUDGET = 1 - + ADAPTIVE = 2 - + class _UniffiFfiConverterTypeSearchPolicyKind(_UniffiConverterRustBuffer): @@ -10866,13 +11075,13 @@ def write(value, buf): class AdaptiveQualityRecord(enum.Enum): - + FAST = 0 - + BALANCED = 1 - + HIGH_RECALL = 2 - + class _UniffiFfiConverterTypeAdaptiveQualityRecord(_UniffiConverterRustBuffer): @@ -10940,10 +11149,10 @@ def __init__(self, *, max_nodes:typing.Optional[int], max_committed_bytes:typing self.max_committed_bytes = max_committed_bytes self.max_distance_evaluations = max_distance_evaluations self.max_frontier_entries = max_frontier_entries - - - + + + def __str__(self): return "SearchBudgetRecord(max_nodes={}, max_committed_bytes={}, max_distance_evaluations={}, max_frontier_entries={})".format(self.max_nodes, self.max_committed_bytes, self.max_distance_evaluations, self.max_frontier_entries) def __eq__(self, other): @@ -10987,15 +11196,15 @@ def write(value, buf): class ProximityFilterKind(enum.Enum): - + ALL = 0 - + KEY_RANGE = 1 - + PREFIX = 2 - + ELIGIBLE_KEYS = 3 - + class _UniffiFfiConverterTypeProximityFilterKind(_UniffiConverterRustBuffer): @@ -11045,10 +11254,10 @@ def __init__(self, *, kind:ProximityFilterKind, start:typing.Optional[bytes], ra self.range_end = range_end self.prefix = prefix self.eligible_keys = eligible_keys - - - + + + def __str__(self): return "ProximityFilterRecord(kind={}, start={}, range_end={}, prefix={}, eligible_keys={})".format(self.kind, self.start, self.range_end, self.prefix, self.eligible_keys) def __eq__(self, other): @@ -11097,13 +11306,13 @@ def write(value, buf): class QueryKernelRecord(enum.Enum): - + SCALAR_DETERMINISTIC = 0 - + SIMD_DETERMINISTIC = 1 - + AUTO_DETERMINISTIC = 2 - + class _UniffiFfiConverterTypeQueryKernelRecord(_UniffiConverterRustBuffer): @@ -11145,17 +11354,19 @@ def write(value, buf): class SearchBackendRecord(enum.Enum): - + NATIVE = 0 - + PRODUCT_QUANTIZED = 1 - + HNSW = 2 - + COMPOSITE = 3 - + AUTO = 4 - + + TURBO_QUANTIZED = 5 + class _UniffiFfiConverterTypeSearchBackendRecord(_UniffiConverterRustBuffer): @@ -11172,6 +11383,8 @@ def read(buf): return SearchBackendRecord.COMPOSITE if variant == 5: return SearchBackendRecord.AUTO + if variant == 6: + return SearchBackendRecord.TURBO_QUANTIZED raise InternalError("Raw enum value doesn't match any cases") @staticmethod @@ -11186,6 +11399,8 @@ def check_lower(value): return if value == SearchBackendRecord.AUTO: return + if value == SearchBackendRecord.TURBO_QUANTIZED: + return raise ValueError(value) @staticmethod @@ -11200,6 +11415,8 @@ def write(value, buf): buf.write_i32(4) if value == SearchBackendRecord.AUTO: buf.write_i32(5) + if value == SearchBackendRecord.TURBO_QUANTIZED: + buf.write_i32(6) @@ -11255,7 +11472,7 @@ def read(cls, buf): @dataclass class ProximitySearchRequestRecord: - def __init__(self, *, query:typing.List[float], k:int, policy:SearchPolicyKind, adaptive_quality:typing.Optional[AdaptiveQualityRecord], budget:SearchBudgetRecord, filter:ProximityFilterRecord, kernel:QueryKernelRecord, backend:SearchBackendRecord, hnsw_ef_search:typing.Optional[int], pq_rerank_multiplier:typing.Optional[int]): + def __init__(self, *, query:typing.List[float], k:int, policy:SearchPolicyKind, adaptive_quality:typing.Optional[AdaptiveQualityRecord], budget:SearchBudgetRecord, filter:ProximityFilterRecord, kernel:QueryKernelRecord, backend:SearchBackendRecord, hnsw_ef_search:typing.Optional[int], pq_rerank_multiplier:typing.Optional[int], turboquant_rerank_multiplier:typing.Optional[int]): self.query = query self.k = k self.policy = policy @@ -11266,12 +11483,13 @@ def __init__(self, *, query:typing.List[float], k:int, policy:SearchPolicyKind, self.backend = backend self.hnsw_ef_search = hnsw_ef_search self.pq_rerank_multiplier = pq_rerank_multiplier - - + self.turboquant_rerank_multiplier = turboquant_rerank_multiplier + + + - def __str__(self): - return "ProximitySearchRequestRecord(query={}, k={}, policy={}, adaptive_quality={}, budget={}, filter={}, kernel={}, backend={}, hnsw_ef_search={}, pq_rerank_multiplier={})".format(self.query, self.k, self.policy, self.adaptive_quality, self.budget, self.filter, self.kernel, self.backend, self.hnsw_ef_search, self.pq_rerank_multiplier) + return "ProximitySearchRequestRecord(query={}, k={}, policy={}, adaptive_quality={}, budget={}, filter={}, kernel={}, backend={}, hnsw_ef_search={}, pq_rerank_multiplier={}, turboquant_rerank_multiplier={})".format(self.query, self.k, self.policy, self.adaptive_quality, self.budget, self.filter, self.kernel, self.backend, self.hnsw_ef_search, self.pq_rerank_multiplier, self.turboquant_rerank_multiplier) def __eq__(self, other): if self.query != other.query: return False @@ -11293,6 +11511,8 @@ def __eq__(self, other): return False if self.pq_rerank_multiplier != other.pq_rerank_multiplier: return False + if self.turboquant_rerank_multiplier != other.turboquant_rerank_multiplier: + return False return True class _UniffiFfiConverterTypeProximitySearchRequestRecord(_UniffiConverterRustBuffer): @@ -11309,6 +11529,7 @@ def read(buf): backend=_UniffiFfiConverterTypeSearchBackendRecord.read(buf), hnsw_ef_search=_UniffiFfiConverterOptionalUInt32.read(buf), pq_rerank_multiplier=_UniffiFfiConverterOptionalUInt16.read(buf), + turboquant_rerank_multiplier=_UniffiFfiConverterOptionalUInt16.read(buf), ) @staticmethod @@ -11323,6 +11544,7 @@ def check_lower(value): _UniffiFfiConverterTypeSearchBackendRecord.check_lower(value.backend) _UniffiFfiConverterOptionalUInt32.check_lower(value.hnsw_ef_search) _UniffiFfiConverterOptionalUInt16.check_lower(value.pq_rerank_multiplier) + _UniffiFfiConverterOptionalUInt16.check_lower(value.turboquant_rerank_multiplier) @staticmethod def write(value, buf): @@ -11336,6 +11558,7 @@ def write(value, buf): _UniffiFfiConverterTypeSearchBackendRecord.write(value.backend, buf) _UniffiFfiConverterOptionalUInt32.write(value.hnsw_ef_search, buf) _UniffiFfiConverterOptionalUInt16.write(value.pq_rerank_multiplier, buf) + _UniffiFfiConverterOptionalUInt16.write(value.turboquant_rerank_multiplier, buf) @dataclass class ContentGraphLimitsRecord: @@ -11344,10 +11567,10 @@ def __init__(self, *, max_objects:int, max_depth:int, max_bytes:int, max_referen self.max_depth = max_depth self.max_bytes = max_bytes self.max_references_per_object = max_references_per_object - - - + + + def __str__(self): return "ContentGraphLimitsRecord(max_objects={}, max_depth={}, max_bytes={}, max_references_per_object={})".format(self.max_objects, self.max_depth, self.max_bytes, self.max_references_per_object) def __eq__(self, other): @@ -11400,10 +11623,10 @@ def __init__(self, *, key:bytes, value:bytes, distance:float): self.key = key self.value = value self.distance = distance - - - + + + def __str__(self): return "ProximityNeighborRecord(key={}, value={}, distance={})".format(self.key, self.value, self.distance) def __eq__(self, other): @@ -11473,10 +11696,10 @@ def __init__(self, *, levels_visited:int, nodes_read:int, bytes_read:int, physic self.frontier_peak = frontier_peak self.candidate_handles_peak = candidate_handles_peak self.candidate_retained_bytes_peak = candidate_retained_bytes_peak - - - + + + def __str__(self): return "ProximitySearchStatsRecord(levels_visited={}, nodes_read={}, bytes_read={}, physical_bytes_read={}, committed_bytes={}, distance_evaluations={}, quantized_distance_evaluations={}, reranked_candidates={}, frontier_peak={}, candidate_handles_peak={}, candidate_retained_bytes_peak={})".format(self.levels_visited, self.nodes_read, self.bytes_read, self.physical_bytes_read, self.committed_bytes, self.distance_evaluations, self.quantized_distance_evaluations, self.reranked_candidates, self.frontier_peak, self.candidate_handles_peak, self.candidate_retained_bytes_peak) def __eq__(self, other): @@ -11555,17 +11778,17 @@ def write(value, buf): class SearchCompletionRecord(enum.Enum): - + EXACT = 0 - + APPROXIMATE_POLICY_SATISFIED = 1 - + BUDGET_EXHAUSTED = 2 - + CANCELLED = 3 - + DEADLINE_EXCEEDED = 4 - + class _UniffiFfiConverterTypeSearchCompletionRecord(_UniffiConverterRustBuffer): @@ -11621,10 +11844,10 @@ def __init__(self, *, neighbors:typing.List[ProximityNeighborRecord], stats:Prox self.completion = completion self.backend = backend self.plan_format_version = plan_format_version - - - + + + def __str__(self): return "ProximitySearchResultRecord(neighbors={}, stats={}, completion={}, backend={}, plan_format_version={})".format(self.neighbors, self.stats, self.completion, self.backend, self.plan_format_version) def __eq__(self, other): @@ -11673,11 +11896,11 @@ def write(value, buf): class ProximitySearchClaimKindRecord(enum.Enum): - + EXACT_L2_OPTIMAL = 0 - + HONEST_EXECUTION = 1 - + class _UniffiFfiConverterTypeProximitySearchClaimKindRecord(_UniffiConverterRustBuffer): @@ -11737,10 +11960,10 @@ class ProximitySearchClaimRecord: def __init__(self, *, kind:ProximitySearchClaimKindRecord, terminal_lower_bound:typing.Optional[float]): self.kind = kind self.terminal_lower_bound = terminal_lower_bound - - - + + + def __str__(self): return "ProximitySearchClaimRecord(kind={}, terminal_lower_bound={})".format(self.kind, self.terminal_lower_bound) def __eq__(self, other): @@ -11774,10 +11997,10 @@ def __init__(self, *, result:ProximitySearchResultRecord, claim:ProximitySearchC self.result = result self.claim = claim self.replayed_events = replayed_events - - - + + + def __str__(self): return "ProximitySearchVerificationRecord(result={}, claim={}, replayed_events={})".format(self.result, self.claim, self.replayed_events) def __eq__(self, other): @@ -11824,9 +12047,9 @@ class ProllyBindingError(Exception): _UniffiTempProllyBindingError = ProllyBindingError class ProllyBindingError: # type: ignore - + class InvalidArgument(_UniffiTempProllyBindingError): - + def __init__(self, reason): super().__init__(", ".join([ "reason={!r}".format(reason), @@ -11837,7 +12060,7 @@ def __repr__(self): return "ProllyBindingError.InvalidArgument({})".format(str(self)) _UniffiTempProllyBindingError.InvalidArgument = InvalidArgument # type: ignore class InvalidCid(_UniffiTempProllyBindingError): - + def __init__(self, reason): super().__init__(", ".join([ "reason={!r}".format(reason), @@ -11848,7 +12071,7 @@ def __repr__(self): return "ProllyBindingError.InvalidCid({})".format(str(self)) _UniffiTempProllyBindingError.InvalidCid = InvalidCid # type: ignore class InvalidNode(_UniffiTempProllyBindingError): - + def __init__(self, reason): super().__init__(", ".join([ "reason={!r}".format(reason), @@ -11859,7 +12082,7 @@ def __repr__(self): return "ProllyBindingError.InvalidNode({})".format(str(self)) _UniffiTempProllyBindingError.InvalidNode = InvalidNode # type: ignore class NotFound(_UniffiTempProllyBindingError): - + def __init__(self, reason): super().__init__(", ".join([ "reason={!r}".format(reason), @@ -11870,7 +12093,7 @@ def __repr__(self): return "ProllyBindingError.NotFound({})".format(str(self)) _UniffiTempProllyBindingError.NotFound = NotFound # type: ignore class Conflict(_UniffiTempProllyBindingError): - + def __init__(self, reason): super().__init__(", ".join([ "reason={!r}".format(reason), @@ -11881,7 +12104,7 @@ def __repr__(self): return "ProllyBindingError.Conflict({})".format(str(self)) _UniffiTempProllyBindingError.Conflict = Conflict # type: ignore class Store(_UniffiTempProllyBindingError): - + def __init__(self, reason): super().__init__(", ".join([ "reason={!r}".format(reason), @@ -11892,7 +12115,7 @@ def __repr__(self): return "ProllyBindingError.Store({})".format(str(self)) _UniffiTempProllyBindingError.Store = Store # type: ignore class Serialization(_UniffiTempProllyBindingError): - + def __init__(self, reason): super().__init__(", ".join([ "reason={!r}".format(reason), @@ -11918,7 +12141,7 @@ def __repr__(self): return "ProllyBindingError.Index({})".format(str(self)) _UniffiTempProllyBindingError.Index = Index # type: ignore class Internal(_UniffiTempProllyBindingError): - + def __init__(self, reason): super().__init__(", ".join([ "reason={!r}".format(reason), @@ -12043,16 +12266,16 @@ def write(value, buf): class BindingProximitySearchProofProtocol(typing.Protocol): - + def source_descriptor(self, ) -> bytes: raise NotImplementedError def verify(self, expected_descriptor: typing.Optional[bytes],limits: ContentGraphLimitsRecord) -> ProximitySearchVerificationRecord: raise NotImplementedError class BindingProximitySearchProof(BindingProximitySearchProofProtocol): - + _handle: ctypes.c_uint64 - + def __init__(self, *args, **kwargs): raise ValueError("This class has no default constructor") @@ -12086,7 +12309,7 @@ def source_descriptor(self, ) -> bytes: ) return _uniffi_lift_return(_uniffi_ffi_result) def verify(self, expected_descriptor: typing.Optional[bytes],limits: ContentGraphLimitsRecord) -> ProximitySearchVerificationRecord: - + _UniffiFfiConverterOptionalBytes.check_lower(expected_descriptor) _UniffiFfiConverterTypeContentGraphLimitsRecord.check_lower(limits) @@ -12135,18 +12358,19 @@ def write(cls, value: BindingProximitySearchProof, buf: _UniffiRustBuffer): @dataclass class ProximitySearchRuntimePolicyRecord: - def __init__(self, *, max_entries:int, max_bytes:int, authoritative_max_bytes:int, hnsw_max_bytes:int, pq_max_bytes:int): + def __init__(self, *, max_entries:int, max_bytes:int, authoritative_max_bytes:int, hnsw_max_bytes:int, pq_max_bytes:int, turboquant_max_bytes:int): self.max_entries = max_entries self.max_bytes = max_bytes self.authoritative_max_bytes = authoritative_max_bytes self.hnsw_max_bytes = hnsw_max_bytes self.pq_max_bytes = pq_max_bytes - - + self.turboquant_max_bytes = turboquant_max_bytes + + + - def __str__(self): - return "ProximitySearchRuntimePolicyRecord(max_entries={}, max_bytes={}, authoritative_max_bytes={}, hnsw_max_bytes={}, pq_max_bytes={})".format(self.max_entries, self.max_bytes, self.authoritative_max_bytes, self.hnsw_max_bytes, self.pq_max_bytes) + return "ProximitySearchRuntimePolicyRecord(max_entries={}, max_bytes={}, authoritative_max_bytes={}, hnsw_max_bytes={}, pq_max_bytes={}, turboquant_max_bytes={})".format(self.max_entries, self.max_bytes, self.authoritative_max_bytes, self.hnsw_max_bytes, self.pq_max_bytes, self.turboquant_max_bytes) def __eq__(self, other): if self.max_entries != other.max_entries: return False @@ -12158,6 +12382,8 @@ def __eq__(self, other): return False if self.pq_max_bytes != other.pq_max_bytes: return False + if self.turboquant_max_bytes != other.turboquant_max_bytes: + return False return True class _UniffiFfiConverterTypeProximitySearchRuntimePolicyRecord(_UniffiConverterRustBuffer): @@ -12169,6 +12395,7 @@ def read(buf): authoritative_max_bytes=_UniffiFfiConverterUInt64.read(buf), hnsw_max_bytes=_UniffiFfiConverterUInt64.read(buf), pq_max_bytes=_UniffiFfiConverterUInt64.read(buf), + turboquant_max_bytes=_UniffiFfiConverterUInt64.read(buf), ) @staticmethod @@ -12178,6 +12405,7 @@ def check_lower(value): _UniffiFfiConverterUInt64.check_lower(value.authoritative_max_bytes) _UniffiFfiConverterUInt64.check_lower(value.hnsw_max_bytes) _UniffiFfiConverterUInt64.check_lower(value.pq_max_bytes) + _UniffiFfiConverterUInt64.check_lower(value.turboquant_max_bytes) @staticmethod def write(value, buf): @@ -12186,16 +12414,17 @@ def write(value, buf): _UniffiFfiConverterUInt64.write(value.authoritative_max_bytes, buf) _UniffiFfiConverterUInt64.write(value.hnsw_max_bytes, buf) _UniffiFfiConverterUInt64.write(value.pq_max_bytes, buf) + _UniffiFfiConverterUInt64.write(value.turboquant_max_bytes, buf) @dataclass class ProximitySearchRuntimeStatsRecord: def __init__(self, *, physical_reads:int, physical_bytes_read:int): self.physical_reads = physical_reads self.physical_bytes_read = physical_bytes_read - - - + + + def __str__(self): return "ProximitySearchRuntimeStatsRecord(physical_reads={}, physical_bytes_read={})".format(self.physical_reads, self.physical_bytes_read) def __eq__(self, other): @@ -12225,7 +12454,7 @@ def write(value, buf): class BindingProximitySearchRuntimeProtocol(typing.Protocol): - + def clear(self, ) -> None: raise NotImplementedError def policy(self, ) -> ProximitySearchRuntimePolicyRecord: @@ -12234,9 +12463,9 @@ def stats(self, ) -> ProximitySearchRuntimeStatsRecord: raise NotImplementedError class BindingProximitySearchRuntime(BindingProximitySearchRuntimeProtocol): - + _handle: ctypes.c_uint64 - + def __init__(self, *args, **kwargs): raise ValueError("This class has no default constructor") @@ -12350,14 +12579,14 @@ def read(cls, buf): class BindingProximityCancellationTokenProtocol(typing.Protocol): - + def cancel(self, ) -> None: raise NotImplementedError def is_cancelled(self, ) -> bool: raise NotImplementedError class BindingProximityCancellationToken(BindingProximityCancellationTokenProtocol): - + _handle: ctypes.c_uint64 def __init__(self, ): _uniffi_lowered_args = ( @@ -12444,7 +12673,7 @@ def write(cls, value: BindingProximityCancellationToken, buf: _UniffiRustBuffer) class BindingHnswIndexProtocol(typing.Protocol): - + def config(self, ) -> HnswConfigRecord: raise NotImplementedError def is_canonical(self, ) -> bool: @@ -12463,9 +12692,9 @@ def source_descriptor(self, ) -> bytes: raise NotImplementedError class BindingHnswIndex(BindingHnswIndexProtocol): - + _handle: ctypes.c_uint64 - + def __init__(self, *args, **kwargs): raise ValueError("This class has no default constructor") @@ -12523,7 +12752,7 @@ def manifest(self, ) -> bytes: ) return _uniffi_lift_return(_uniffi_ffi_result) def prove_search(self, map: BindingProximityMap,request: ProximitySearchRequestRecord,limits: ContentGraphLimitsRecord) -> BindingProximitySearchProof: - + _UniffiFfiConverterTypeBindingProximityMap.check_lower(map) _UniffiFfiConverterTypeProximitySearchRequestRecord.check_lower(request) @@ -12544,7 +12773,7 @@ def prove_search(self, map: BindingProximityMap,request: ProximitySearchRequestR ) return _uniffi_lift_return(_uniffi_ffi_result) def search(self, map: BindingProximityMap,request: ProximitySearchRequestRecord) -> ProximitySearchResultRecord: - + _UniffiFfiConverterTypeBindingProximityMap.check_lower(map) _UniffiFfiConverterTypeProximitySearchRequestRecord.check_lower(request) @@ -12562,7 +12791,7 @@ def search(self, map: BindingProximityMap,request: ProximitySearchRequestRecord) ) return _uniffi_lift_return(_uniffi_ffi_result) def search_cancellable(self, map: BindingProximityMap,request: ProximitySearchRequestRecord,runtime: typing.Optional[BindingProximitySearchRuntime],cancellation: BindingProximityCancellationToken) -> ProximitySearchResultRecord: - + _UniffiFfiConverterTypeBindingProximityMap.check_lower(map) _UniffiFfiConverterTypeProximitySearchRequestRecord.check_lower(request) @@ -12586,7 +12815,7 @@ def search_cancellable(self, map: BindingProximityMap,request: ProximitySearchRe ) return _uniffi_lift_return(_uniffi_ffi_result) def search_with_runtime(self, map: BindingProximityMap,request: ProximitySearchRequestRecord,runtime: BindingProximitySearchRuntime) -> ProximitySearchResultRecord: - + _UniffiFfiConverterTypeBindingProximityMap.check_lower(map) _UniffiFfiConverterTypeProximitySearchRequestRecord.check_lower(request) @@ -12682,10 +12911,10 @@ def __init__(self, *, subquantizers:int, centroids_per_subquantizer:int, trainin self.rerank_multiplier = rerank_multiplier self.seed = seed self.max_training_vectors = max_training_vectors - - - + + + def __str__(self): return "ProductQuantizationConfigRecord(subquantizers={}, centroids_per_subquantizer={}, training_iterations={}, rerank_multiplier={}, seed={}, max_training_vectors={})".format(self.subquantizers, self.centroids_per_subquantizer, self.training_iterations, self.rerank_multiplier, self.seed, self.max_training_vectors) def __eq__(self, other): @@ -12738,10 +12967,10 @@ class ProductQuantizationQualityRecord: def __init__(self, *, mean_squared_error:float, maximum_squared_error:float): self.mean_squared_error = mean_squared_error self.maximum_squared_error = maximum_squared_error - - - + + + def __str__(self): return "ProductQuantizationQualityRecord(mean_squared_error={}, maximum_squared_error={})".format(self.mean_squared_error, self.maximum_squared_error) def __eq__(self, other): @@ -12771,7 +13000,7 @@ def write(value, buf): class BindingProductQuantizerProtocol(typing.Protocol): - + def config(self, ) -> ProductQuantizationConfigRecord: raise NotImplementedError def manifest(self, ) -> bytes: @@ -12790,9 +13019,9 @@ def source_descriptor(self, ) -> bytes: raise NotImplementedError class BindingProductQuantizer(BindingProductQuantizerProtocol): - + _handle: ctypes.c_uint64 - + def __init__(self, *args, **kwargs): raise ValueError("This class has no default constructor") @@ -12838,7 +13067,7 @@ def manifest(self, ) -> bytes: ) return _uniffi_lift_return(_uniffi_ffi_result) def prove_search(self, map: BindingProximityMap,request: ProximitySearchRequestRecord,limits: ContentGraphLimitsRecord) -> BindingProximitySearchProof: - + _UniffiFfiConverterTypeBindingProximityMap.check_lower(map) _UniffiFfiConverterTypeProximitySearchRequestRecord.check_lower(request) @@ -12871,7 +13100,7 @@ def quality(self, ) -> ProductQuantizationQualityRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def search(self, map: BindingProximityMap,request: ProximitySearchRequestRecord) -> ProximitySearchResultRecord: - + _UniffiFfiConverterTypeBindingProximityMap.check_lower(map) _UniffiFfiConverterTypeProximitySearchRequestRecord.check_lower(request) @@ -12889,7 +13118,7 @@ def search(self, map: BindingProximityMap,request: ProximitySearchRequestRecord) ) return _uniffi_lift_return(_uniffi_ffi_result) def search_cancellable(self, map: BindingProximityMap,request: ProximitySearchRequestRecord,runtime: typing.Optional[BindingProximitySearchRuntime],cancellation: BindingProximityCancellationToken) -> ProximitySearchResultRecord: - + _UniffiFfiConverterTypeBindingProximityMap.check_lower(map) _UniffiFfiConverterTypeProximitySearchRequestRecord.check_lower(request) @@ -12913,7 +13142,7 @@ def search_cancellable(self, map: BindingProximityMap,request: ProximitySearchRe ) return _uniffi_lift_return(_uniffi_ffi_result) def search_with_runtime(self, map: BindingProximityMap,request: ProximitySearchRequestRecord,runtime: BindingProximitySearchRuntime) -> ProximitySearchResultRecord: - + _UniffiFfiConverterTypeBindingProximityMap.check_lower(map) _UniffiFfiConverterTypeProximitySearchRequestRecord.check_lower(request) @@ -13000,6 +13229,374 @@ def read(cls, buf): else: raise InternalError("Unexpected flag byte for optional type") +@dataclass +class TurboQuantizationConfigRecord: + def __init__(self, *, bit_width:int, rerank_multiplier:int, seed:int): + self.bit_width = bit_width + self.rerank_multiplier = rerank_multiplier + self.seed = seed + + + + + def __str__(self): + return "TurboQuantizationConfigRecord(bit_width={}, rerank_multiplier={}, seed={})".format(self.bit_width, self.rerank_multiplier, self.seed) + def __eq__(self, other): + if self.bit_width != other.bit_width: + return False + if self.rerank_multiplier != other.rerank_multiplier: + return False + if self.seed != other.seed: + return False + return True + +class _UniffiFfiConverterTypeTurboQuantizationConfigRecord(_UniffiConverterRustBuffer): + @staticmethod + def read(buf): + return TurboQuantizationConfigRecord( + bit_width=_UniffiFfiConverterUInt8.read(buf), + rerank_multiplier=_UniffiFfiConverterUInt32.read(buf), + seed=_UniffiFfiConverterUInt64.read(buf), + ) + + @staticmethod + def check_lower(value): + _UniffiFfiConverterUInt8.check_lower(value.bit_width) + _UniffiFfiConverterUInt32.check_lower(value.rerank_multiplier) + _UniffiFfiConverterUInt64.check_lower(value.seed) + + @staticmethod + def write(value, buf): + _UniffiFfiConverterUInt8.write(value.bit_width, buf) + _UniffiFfiConverterUInt32.write(value.rerank_multiplier, buf) + _UniffiFfiConverterUInt64.write(value.seed, buf) + +@dataclass +class TurboQuantizationQualityRecord: + def __init__(self, *, mean_squared_error:float, maximum_squared_error:float): + self.mean_squared_error = mean_squared_error + self.maximum_squared_error = maximum_squared_error + + + + + def __str__(self): + return "TurboQuantizationQualityRecord(mean_squared_error={}, maximum_squared_error={})".format(self.mean_squared_error, self.maximum_squared_error) + def __eq__(self, other): + if self.mean_squared_error != other.mean_squared_error: + return False + if self.maximum_squared_error != other.maximum_squared_error: + return False + return True + +class _UniffiFfiConverterTypeTurboQuantizationQualityRecord(_UniffiConverterRustBuffer): + @staticmethod + def read(buf): + return TurboQuantizationQualityRecord( + mean_squared_error=_UniffiFfiConverterFloat64.read(buf), + maximum_squared_error=_UniffiFfiConverterFloat64.read(buf), + ) + + @staticmethod + def check_lower(value): + _UniffiFfiConverterFloat64.check_lower(value.mean_squared_error) + _UniffiFfiConverterFloat64.check_lower(value.maximum_squared_error) + + @staticmethod + def write(value, buf): + _UniffiFfiConverterFloat64.write(value.mean_squared_error, buf) + _UniffiFfiConverterFloat64.write(value.maximum_squared_error, buf) + +@dataclass +class TurboQuantizationVerificationRecord: + def __init__(self, *, encoded_vectors:int, zero_vectors:int, quality:TurboQuantizationQualityRecord): + self.encoded_vectors = encoded_vectors + self.zero_vectors = zero_vectors + self.quality = quality + + + + + def __str__(self): + return "TurboQuantizationVerificationRecord(encoded_vectors={}, zero_vectors={}, quality={})".format(self.encoded_vectors, self.zero_vectors, self.quality) + def __eq__(self, other): + if self.encoded_vectors != other.encoded_vectors: + return False + if self.zero_vectors != other.zero_vectors: + return False + if self.quality != other.quality: + return False + return True + +class _UniffiFfiConverterTypeTurboQuantizationVerificationRecord(_UniffiConverterRustBuffer): + @staticmethod + def read(buf): + return TurboQuantizationVerificationRecord( + encoded_vectors=_UniffiFfiConverterUInt64.read(buf), + zero_vectors=_UniffiFfiConverterUInt64.read(buf), + quality=_UniffiFfiConverterTypeTurboQuantizationQualityRecord.read(buf), + ) + + @staticmethod + def check_lower(value): + _UniffiFfiConverterUInt64.check_lower(value.encoded_vectors) + _UniffiFfiConverterUInt64.check_lower(value.zero_vectors) + _UniffiFfiConverterTypeTurboQuantizationQualityRecord.check_lower(value.quality) + + @staticmethod + def write(value, buf): + _UniffiFfiConverterUInt64.write(value.encoded_vectors, buf) + _UniffiFfiConverterUInt64.write(value.zero_vectors, buf) + _UniffiFfiConverterTypeTurboQuantizationQualityRecord.write(value.quality, buf) + + +class BindingTurboQuantizerProtocol(typing.Protocol): + + def config(self, ) -> TurboQuantizationConfigRecord: + raise NotImplementedError + def manifest(self, ) -> bytes: + raise NotImplementedError + def prove_search(self, map: BindingProximityMap,request: ProximitySearchRequestRecord,limits: ContentGraphLimitsRecord) -> BindingProximitySearchProof: + raise NotImplementedError + def quality(self, ) -> TurboQuantizationQualityRecord: + raise NotImplementedError + def search(self, map: BindingProximityMap,request: ProximitySearchRequestRecord) -> ProximitySearchResultRecord: + raise NotImplementedError + def search_cancellable(self, map: BindingProximityMap,request: ProximitySearchRequestRecord,runtime: typing.Optional[BindingProximitySearchRuntime],cancellation: BindingProximityCancellationToken) -> ProximitySearchResultRecord: + raise NotImplementedError + def search_with_runtime(self, map: BindingProximityMap,request: ProximitySearchRequestRecord,runtime: BindingProximitySearchRuntime) -> ProximitySearchResultRecord: + raise NotImplementedError + def source_descriptor(self, ) -> bytes: + raise NotImplementedError + def verify(self, map: BindingProximityMap) -> TurboQuantizationVerificationRecord: + raise NotImplementedError + +class BindingTurboQuantizer(BindingTurboQuantizerProtocol): + + _handle: ctypes.c_uint64 + + def __init__(self, *args, **kwargs): + raise ValueError("This class has no default constructor") + + def __del__(self): + # In case of partial initialization of instances. + handle = getattr(self, "_handle", None) + if handle is not None: + _uniffi_rust_call(_UniffiLib.uniffi_prolly_bindings_fn_free_bindingturboquantizer, handle) + + def _uniffi_clone_handle(self): + return _uniffi_rust_call(_UniffiLib.uniffi_prolly_bindings_fn_clone_bindingturboquantizer, self._handle) + + # Used by alternative constructors or any methods which return this type. + @classmethod + def _uniffi_make_instance(cls, handle): + # Lightly yucky way to bypass the usual __init__ logic + # and just create a new instance with the required handle. + inst = cls.__new__(cls) + inst._handle = handle + return inst + def config(self, ) -> TurboQuantizationConfigRecord: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeTurboQuantizationConfigRecord.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_prolly_bindings_fn_method_bindingturboquantizer_config, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def manifest(self, ) -> bytes: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterBytes.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_prolly_bindings_fn_method_bindingturboquantizer_manifest, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def prove_search(self, map: BindingProximityMap,request: ProximitySearchRequestRecord,limits: ContentGraphLimitsRecord) -> BindingProximitySearchProof: + + _UniffiFfiConverterTypeBindingProximityMap.check_lower(map) + + _UniffiFfiConverterTypeProximitySearchRequestRecord.check_lower(request) + + _UniffiFfiConverterTypeContentGraphLimitsRecord.check_lower(limits) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterTypeBindingProximityMap.lower(map), + _UniffiFfiConverterTypeProximitySearchRequestRecord.lower(request), + _UniffiFfiConverterTypeContentGraphLimitsRecord.lower(limits), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeBindingProximitySearchProof.lift + _uniffi_error_converter = _UniffiFfiConverterTypeProllyBindingError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_prolly_bindings_fn_method_bindingturboquantizer_prove_search, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def quality(self, ) -> TurboQuantizationQualityRecord: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeTurboQuantizationQualityRecord.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_prolly_bindings_fn_method_bindingturboquantizer_quality, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def search(self, map: BindingProximityMap,request: ProximitySearchRequestRecord) -> ProximitySearchResultRecord: + + _UniffiFfiConverterTypeBindingProximityMap.check_lower(map) + + _UniffiFfiConverterTypeProximitySearchRequestRecord.check_lower(request) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterTypeBindingProximityMap.lower(map), + _UniffiFfiConverterTypeProximitySearchRequestRecord.lower(request), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeProximitySearchResultRecord.lift + _uniffi_error_converter = _UniffiFfiConverterTypeProllyBindingError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_prolly_bindings_fn_method_bindingturboquantizer_search, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def search_cancellable(self, map: BindingProximityMap,request: ProximitySearchRequestRecord,runtime: typing.Optional[BindingProximitySearchRuntime],cancellation: BindingProximityCancellationToken) -> ProximitySearchResultRecord: + + _UniffiFfiConverterTypeBindingProximityMap.check_lower(map) + + _UniffiFfiConverterTypeProximitySearchRequestRecord.check_lower(request) + + _UniffiFfiConverterOptionalTypeBindingProximitySearchRuntime.check_lower(runtime) + + _UniffiFfiConverterTypeBindingProximityCancellationToken.check_lower(cancellation) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterTypeBindingProximityMap.lower(map), + _UniffiFfiConverterTypeProximitySearchRequestRecord.lower(request), + _UniffiFfiConverterOptionalTypeBindingProximitySearchRuntime.lower(runtime), + _UniffiFfiConverterTypeBindingProximityCancellationToken.lower(cancellation), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeProximitySearchResultRecord.lift + _uniffi_error_converter = _UniffiFfiConverterTypeProllyBindingError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_prolly_bindings_fn_method_bindingturboquantizer_search_cancellable, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def search_with_runtime(self, map: BindingProximityMap,request: ProximitySearchRequestRecord,runtime: BindingProximitySearchRuntime) -> ProximitySearchResultRecord: + + _UniffiFfiConverterTypeBindingProximityMap.check_lower(map) + + _UniffiFfiConverterTypeProximitySearchRequestRecord.check_lower(request) + + _UniffiFfiConverterTypeBindingProximitySearchRuntime.check_lower(runtime) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterTypeBindingProximityMap.lower(map), + _UniffiFfiConverterTypeProximitySearchRequestRecord.lower(request), + _UniffiFfiConverterTypeBindingProximitySearchRuntime.lower(runtime), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeProximitySearchResultRecord.lift + _uniffi_error_converter = _UniffiFfiConverterTypeProllyBindingError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_prolly_bindings_fn_method_bindingturboquantizer_search_with_runtime, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def source_descriptor(self, ) -> bytes: + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + ) + _uniffi_lift_return = _UniffiFfiConverterBytes.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_prolly_bindings_fn_method_bindingturboquantizer_source_descriptor, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + def verify(self, map: BindingProximityMap) -> TurboQuantizationVerificationRecord: + + _UniffiFfiConverterTypeBindingProximityMap.check_lower(map) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterTypeBindingProximityMap.lower(map), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeTurboQuantizationVerificationRecord.lift + _uniffi_error_converter = _UniffiFfiConverterTypeProllyBindingError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_prolly_bindings_fn_method_bindingturboquantizer_verify, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) + + + + + +class _UniffiFfiConverterTypeBindingTurboQuantizer: + @staticmethod + def lift(value: int) -> BindingTurboQuantizer: + return BindingTurboQuantizer._uniffi_make_instance(value) + + @staticmethod + def check_lower(value: BindingTurboQuantizer): + if not isinstance(value, BindingTurboQuantizer): + raise TypeError("Expected BindingTurboQuantizer instance, {} found".format(type(value).__name__)) + + @staticmethod + def lower(value: BindingTurboQuantizer) -> ctypes.c_uint64: + return value._uniffi_clone_handle() + + @classmethod + def read(cls, buf: _UniffiRustBuffer) -> BindingTurboQuantizer: + ptr = buf.read_u64() + if ptr == 0: + raise InternalError("Raw handle value was null") + return cls.lift(ptr) + + @classmethod + def write(cls, value: BindingTurboQuantizer, buf: _UniffiRustBuffer): + buf.write_u64(cls.lower(value)) + +class _UniffiFfiConverterOptionalTypeBindingTurboQuantizer(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + if value is not None: + _UniffiFfiConverterTypeBindingTurboQuantizer.check_lower(value) + + @classmethod + def write(cls, value, buf): + if value is None: + buf.write_u8(0) + return + + buf.write_u8(1) + _UniffiFfiConverterTypeBindingTurboQuantizer.write(value, buf) + + @classmethod + def read(cls, buf): + flag = buf.read_u8() + if flag == 0: + return None + elif flag == 1: + return _UniffiFfiConverterTypeBindingTurboQuantizer.read(buf) + else: + raise InternalError("Unexpected flag byte for optional type") + class _UniffiFfiConverterSequenceTypeAcceleratorCatalogEntryRecord(_UniffiConverterRustBuffer): @classmethod def check_lower(cls, value): @@ -13025,7 +13622,7 @@ def read(cls, buf): class BindingAcceleratorCatalogProtocol(typing.Protocol): - + def entries(self, ) -> typing.List[AcceleratorCatalogEntryRecord]: raise NotImplementedError def manifest(self, ) -> bytes: @@ -13042,9 +13639,9 @@ def source_descriptor(self, ) -> bytes: raise NotImplementedError class BindingAcceleratorCatalog(BindingAcceleratorCatalogProtocol): - + _handle: ctypes.c_uint64 - + def __init__(self, *args, **kwargs): raise ValueError("This class has no default constructor") @@ -13090,7 +13687,7 @@ def manifest(self, ) -> bytes: ) return _uniffi_lift_return(_uniffi_ffi_result) def prove_search(self, map: BindingProximityMap,request: ProximitySearchRequestRecord,limits: ContentGraphLimitsRecord) -> BindingProximitySearchProof: - + _UniffiFfiConverterTypeBindingProximityMap.check_lower(map) _UniffiFfiConverterTypeProximitySearchRequestRecord.check_lower(request) @@ -13111,7 +13708,7 @@ def prove_search(self, map: BindingProximityMap,request: ProximitySearchRequestR ) return _uniffi_lift_return(_uniffi_ffi_result) def search(self, map: BindingProximityMap,request: ProximitySearchRequestRecord) -> ProximitySearchResultRecord: - + _UniffiFfiConverterTypeBindingProximityMap.check_lower(map) _UniffiFfiConverterTypeProximitySearchRequestRecord.check_lower(request) @@ -13129,7 +13726,7 @@ def search(self, map: BindingProximityMap,request: ProximitySearchRequestRecord) ) return _uniffi_lift_return(_uniffi_ffi_result) def search_cancellable(self, map: BindingProximityMap,request: ProximitySearchRequestRecord,runtime: typing.Optional[BindingProximitySearchRuntime],cancellation: BindingProximityCancellationToken) -> ProximitySearchResultRecord: - + _UniffiFfiConverterTypeBindingProximityMap.check_lower(map) _UniffiFfiConverterTypeProximitySearchRequestRecord.check_lower(request) @@ -13153,7 +13750,7 @@ def search_cancellable(self, map: BindingProximityMap,request: ProximitySearchRe ) return _uniffi_lift_return(_uniffi_ffi_result) def search_with_runtime(self, map: BindingProximityMap,request: ProximitySearchRequestRecord,runtime: BindingProximitySearchRuntime) -> ProximitySearchResultRecord: - + _UniffiFfiConverterTypeBindingProximityMap.check_lower(map) _UniffiFfiConverterTypeProximitySearchRequestRecord.check_lower(request) @@ -13221,15 +13818,15 @@ def write(cls, value: BindingAcceleratorCatalog, buf: _UniffiRustBuffer): class FullRebuildReasonKindRecord(enum.Enum): - + DELTA_RECORDS = 0 - + SHADOW_RECORDS = 1 - + DELTA_RATIO = 2 - + SHADOW_RATIO = 3 - + class _UniffiFfiConverterTypeFullRebuildReasonKindRecord(_UniffiConverterRustBuffer): @@ -13277,10 +13874,10 @@ def __init__(self, *, kind:FullRebuildReasonKindRecord, actual:int, maximum:int) self.kind = kind self.actual = actual self.maximum = maximum - - - + + + def __str__(self): return "FullRebuildReasonRecord(kind={}, actual={}, maximum={})".format(self.kind, self.actual, self.maximum) def __eq__(self, other): @@ -13342,10 +13939,10 @@ def __init__(self, *, accelerator:typing.Optional[BindingCompositeAccelerator], self.accelerator = accelerator self.reasons = reasons self.stats = stats - - - + + + def __str__(self): return "CompositeBuildOutcomeRecord(accelerator={}, reasons={}, stats={})".format(self.accelerator, self.reasons, self.stats) def __eq__(self, other): @@ -13386,10 +13983,10 @@ def __init__(self, *, max_records:typing.Optional[int], max_owned_bytes:typing.O self.max_distance_evaluations = max_distance_evaluations self.worker_threads = worker_threads self.max_encoded_graph_bytes = max_encoded_graph_bytes - - - + + + def __str__(self): return "HnswBuildLimitsRecord(max_records={}, max_owned_bytes={}, max_distance_evaluations={}, worker_threads={}, max_encoded_graph_bytes={})".format(self.max_records, self.max_owned_bytes, self.max_distance_evaluations, self.worker_threads, self.max_encoded_graph_bytes) def __eq__(self, other): @@ -13441,10 +14038,10 @@ def __init__(self, *, records:int, distance_evaluations:int, directed_edges:int, self.maximum_level = maximum_level self.owned_bytes = owned_bytes self.encoded_graph_bytes = encoded_graph_bytes - - - + + + def __str__(self): return "HnswBuildStatsRecord(records={}, distance_evaluations={}, directed_edges={}, maximum_level={}, owned_bytes={}, encoded_graph_bytes={})".format(self.records, self.distance_evaluations, self.directed_edges, self.maximum_level, self.owned_bytes, self.encoded_graph_bytes) def __eq__(self, other): @@ -13497,10 +14094,10 @@ class HnswBuildResultRecord: def __init__(self, *, index:BindingHnswIndex, stats:HnswBuildStatsRecord): self.index = index self.stats = stats - - - + + + def __str__(self): return "HnswBuildResultRecord(index={}, stats={})".format(self.index, self.stats) def __eq__(self, other): @@ -13537,10 +14134,10 @@ def __init__(self, *, max_training_vectors:typing.Optional[int], max_training_by self.max_distance_evaluations = max_distance_evaluations self.max_encoded_output_bytes = max_encoded_output_bytes self.max_worker_threads = max_worker_threads - - - + + + def __str__(self): return "ProductQuantizationBuildLimitsRecord(max_training_vectors={}, max_training_bytes={}, max_temporary_code_bytes={}, max_distance_evaluations={}, max_encoded_output_bytes={}, max_worker_threads={})".format(self.max_training_vectors, self.max_training_bytes, self.max_temporary_code_bytes, self.max_distance_evaluations, self.max_encoded_output_bytes, self.max_worker_threads) def __eq__(self, other): @@ -13588,18 +14185,80 @@ def write(value, buf): _UniffiFfiConverterOptionalUInt64.write(value.max_encoded_output_bytes, buf) _UniffiFfiConverterOptionalUInt64.write(value.max_worker_threads, buf) +@dataclass +class TurboQuantizationBuildLimitsRecord: + def __init__(self, *, max_records:typing.Optional[int], max_input_bytes:typing.Optional[int], max_temporary_bytes:typing.Optional[int], max_transform_operations:typing.Optional[int], max_encoded_output_bytes:typing.Optional[int], max_worker_threads:typing.Optional[int]): + self.max_records = max_records + self.max_input_bytes = max_input_bytes + self.max_temporary_bytes = max_temporary_bytes + self.max_transform_operations = max_transform_operations + self.max_encoded_output_bytes = max_encoded_output_bytes + self.max_worker_threads = max_worker_threads + + + + + def __str__(self): + return "TurboQuantizationBuildLimitsRecord(max_records={}, max_input_bytes={}, max_temporary_bytes={}, max_transform_operations={}, max_encoded_output_bytes={}, max_worker_threads={})".format(self.max_records, self.max_input_bytes, self.max_temporary_bytes, self.max_transform_operations, self.max_encoded_output_bytes, self.max_worker_threads) + def __eq__(self, other): + if self.max_records != other.max_records: + return False + if self.max_input_bytes != other.max_input_bytes: + return False + if self.max_temporary_bytes != other.max_temporary_bytes: + return False + if self.max_transform_operations != other.max_transform_operations: + return False + if self.max_encoded_output_bytes != other.max_encoded_output_bytes: + return False + if self.max_worker_threads != other.max_worker_threads: + return False + return True + +class _UniffiFfiConverterTypeTurboQuantizationBuildLimitsRecord(_UniffiConverterRustBuffer): + @staticmethod + def read(buf): + return TurboQuantizationBuildLimitsRecord( + max_records=_UniffiFfiConverterOptionalUInt64.read(buf), + max_input_bytes=_UniffiFfiConverterOptionalUInt64.read(buf), + max_temporary_bytes=_UniffiFfiConverterOptionalUInt64.read(buf), + max_transform_operations=_UniffiFfiConverterOptionalUInt64.read(buf), + max_encoded_output_bytes=_UniffiFfiConverterOptionalUInt64.read(buf), + max_worker_threads=_UniffiFfiConverterOptionalUInt64.read(buf), + ) + + @staticmethod + def check_lower(value): + _UniffiFfiConverterOptionalUInt64.check_lower(value.max_records) + _UniffiFfiConverterOptionalUInt64.check_lower(value.max_input_bytes) + _UniffiFfiConverterOptionalUInt64.check_lower(value.max_temporary_bytes) + _UniffiFfiConverterOptionalUInt64.check_lower(value.max_transform_operations) + _UniffiFfiConverterOptionalUInt64.check_lower(value.max_encoded_output_bytes) + _UniffiFfiConverterOptionalUInt64.check_lower(value.max_worker_threads) + + @staticmethod + def write(value, buf): + _UniffiFfiConverterOptionalUInt64.write(value.max_records, buf) + _UniffiFfiConverterOptionalUInt64.write(value.max_input_bytes, buf) + _UniffiFfiConverterOptionalUInt64.write(value.max_temporary_bytes, buf) + _UniffiFfiConverterOptionalUInt64.write(value.max_transform_operations, buf) + _UniffiFfiConverterOptionalUInt64.write(value.max_encoded_output_bytes, buf) + _UniffiFfiConverterOptionalUInt64.write(value.max_worker_threads, buf) + @dataclass class CompositeRebuildOptionsRecord: - def __init__(self, *, hnsw_limits:HnswBuildLimitsRecord, pq_worker_threads:int, pq_limits:ProductQuantizationBuildLimitsRecord): + def __init__(self, *, hnsw_limits:HnswBuildLimitsRecord, pq_worker_threads:int, pq_limits:ProductQuantizationBuildLimitsRecord, turboquant_worker_threads:int, turboquant_limits:TurboQuantizationBuildLimitsRecord): self.hnsw_limits = hnsw_limits self.pq_worker_threads = pq_worker_threads self.pq_limits = pq_limits - - + self.turboquant_worker_threads = turboquant_worker_threads + self.turboquant_limits = turboquant_limits + + + - def __str__(self): - return "CompositeRebuildOptionsRecord(hnsw_limits={}, pq_worker_threads={}, pq_limits={})".format(self.hnsw_limits, self.pq_worker_threads, self.pq_limits) + return "CompositeRebuildOptionsRecord(hnsw_limits={}, pq_worker_threads={}, pq_limits={}, turboquant_worker_threads={}, turboquant_limits={})".format(self.hnsw_limits, self.pq_worker_threads, self.pq_limits, self.turboquant_worker_threads, self.turboquant_limits) def __eq__(self, other): if self.hnsw_limits != other.hnsw_limits: return False @@ -13607,6 +14266,10 @@ def __eq__(self, other): return False if self.pq_limits != other.pq_limits: return False + if self.turboquant_worker_threads != other.turboquant_worker_threads: + return False + if self.turboquant_limits != other.turboquant_limits: + return False return True class _UniffiFfiConverterTypeCompositeRebuildOptionsRecord(_UniffiConverterRustBuffer): @@ -13616,6 +14279,8 @@ def read(buf): hnsw_limits=_UniffiFfiConverterTypeHnswBuildLimitsRecord.read(buf), pq_worker_threads=_UniffiFfiConverterUInt64.read(buf), pq_limits=_UniffiFfiConverterTypeProductQuantizationBuildLimitsRecord.read(buf), + turboquant_worker_threads=_UniffiFfiConverterUInt64.read(buf), + turboquant_limits=_UniffiFfiConverterTypeTurboQuantizationBuildLimitsRecord.read(buf), ) @staticmethod @@ -13623,12 +14288,16 @@ def check_lower(value): _UniffiFfiConverterTypeHnswBuildLimitsRecord.check_lower(value.hnsw_limits) _UniffiFfiConverterUInt64.check_lower(value.pq_worker_threads) _UniffiFfiConverterTypeProductQuantizationBuildLimitsRecord.check_lower(value.pq_limits) + _UniffiFfiConverterUInt64.check_lower(value.turboquant_worker_threads) + _UniffiFfiConverterTypeTurboQuantizationBuildLimitsRecord.check_lower(value.turboquant_limits) @staticmethod def write(value, buf): _UniffiFfiConverterTypeHnswBuildLimitsRecord.write(value.hnsw_limits, buf) _UniffiFfiConverterUInt64.write(value.pq_worker_threads, buf) _UniffiFfiConverterTypeProductQuantizationBuildLimitsRecord.write(value.pq_limits, buf) + _UniffiFfiConverterUInt64.write(value.turboquant_worker_threads, buf) + _UniffiFfiConverterTypeTurboQuantizationBuildLimitsRecord.write(value.turboquant_limits, buf) @dataclass class ProductQuantizationBuildStatsRecord: @@ -13639,10 +14308,10 @@ def __init__(self, *, training_distance_evaluations:int, encoding_distance_evalu self.training_vectors = training_vectors self.training_bytes = training_bytes self.encoded_output_bytes = encoded_output_bytes - - - + + + def __str__(self): return "ProductQuantizationBuildStatsRecord(training_distance_evaluations={}, encoding_distance_evaluations={}, encoded_vectors={}, training_vectors={}, training_bytes={}, encoded_output_bytes={})".format(self.training_distance_evaluations, self.encoding_distance_evaluations, self.encoded_vectors, self.training_vectors, self.training_bytes, self.encoded_output_bytes) def __eq__(self, other): @@ -13695,10 +14364,10 @@ class ProductQuantizationBuildResultRecord: def __init__(self, *, index:BindingProductQuantizer, stats:ProductQuantizationBuildStatsRecord): self.index = index self.stats = stats - - - + + + def __str__(self): return "ProductQuantizationBuildResultRecord(index={}, stats={})".format(self.index, self.stats) def __eq__(self, other): @@ -13726,19 +14395,121 @@ def write(value, buf): _UniffiFfiConverterTypeBindingProductQuantizer.write(value.index, buf) _UniffiFfiConverterTypeProductQuantizationBuildStatsRecord.write(value.stats, buf) +@dataclass +class TurboQuantizationBuildStatsRecord: + def __init__(self, *, encoded_vectors:int, zero_vectors:int, transformed_components:int, butterfly_operations:int, input_bytes:int, encoded_output_bytes:int, peak_temporary_bytes:int): + self.encoded_vectors = encoded_vectors + self.zero_vectors = zero_vectors + self.transformed_components = transformed_components + self.butterfly_operations = butterfly_operations + self.input_bytes = input_bytes + self.encoded_output_bytes = encoded_output_bytes + self.peak_temporary_bytes = peak_temporary_bytes + + + + + def __str__(self): + return "TurboQuantizationBuildStatsRecord(encoded_vectors={}, zero_vectors={}, transformed_components={}, butterfly_operations={}, input_bytes={}, encoded_output_bytes={}, peak_temporary_bytes={})".format(self.encoded_vectors, self.zero_vectors, self.transformed_components, self.butterfly_operations, self.input_bytes, self.encoded_output_bytes, self.peak_temporary_bytes) + def __eq__(self, other): + if self.encoded_vectors != other.encoded_vectors: + return False + if self.zero_vectors != other.zero_vectors: + return False + if self.transformed_components != other.transformed_components: + return False + if self.butterfly_operations != other.butterfly_operations: + return False + if self.input_bytes != other.input_bytes: + return False + if self.encoded_output_bytes != other.encoded_output_bytes: + return False + if self.peak_temporary_bytes != other.peak_temporary_bytes: + return False + return True + +class _UniffiFfiConverterTypeTurboQuantizationBuildStatsRecord(_UniffiConverterRustBuffer): + @staticmethod + def read(buf): + return TurboQuantizationBuildStatsRecord( + encoded_vectors=_UniffiFfiConverterUInt64.read(buf), + zero_vectors=_UniffiFfiConverterUInt64.read(buf), + transformed_components=_UniffiFfiConverterUInt64.read(buf), + butterfly_operations=_UniffiFfiConverterUInt64.read(buf), + input_bytes=_UniffiFfiConverterUInt64.read(buf), + encoded_output_bytes=_UniffiFfiConverterUInt64.read(buf), + peak_temporary_bytes=_UniffiFfiConverterUInt64.read(buf), + ) + + @staticmethod + def check_lower(value): + _UniffiFfiConverterUInt64.check_lower(value.encoded_vectors) + _UniffiFfiConverterUInt64.check_lower(value.zero_vectors) + _UniffiFfiConverterUInt64.check_lower(value.transformed_components) + _UniffiFfiConverterUInt64.check_lower(value.butterfly_operations) + _UniffiFfiConverterUInt64.check_lower(value.input_bytes) + _UniffiFfiConverterUInt64.check_lower(value.encoded_output_bytes) + _UniffiFfiConverterUInt64.check_lower(value.peak_temporary_bytes) + + @staticmethod + def write(value, buf): + _UniffiFfiConverterUInt64.write(value.encoded_vectors, buf) + _UniffiFfiConverterUInt64.write(value.zero_vectors, buf) + _UniffiFfiConverterUInt64.write(value.transformed_components, buf) + _UniffiFfiConverterUInt64.write(value.butterfly_operations, buf) + _UniffiFfiConverterUInt64.write(value.input_bytes, buf) + _UniffiFfiConverterUInt64.write(value.encoded_output_bytes, buf) + _UniffiFfiConverterUInt64.write(value.peak_temporary_bytes, buf) + +@dataclass +class TurboQuantizationBuildResultRecord: + def __init__(self, *, index:BindingTurboQuantizer, stats:TurboQuantizationBuildStatsRecord): + self.index = index + self.stats = stats + + + + + def __str__(self): + return "TurboQuantizationBuildResultRecord(index={}, stats={})".format(self.index, self.stats) + def __eq__(self, other): + if self.index != other.index: + return False + if self.stats != other.stats: + return False + return True + +class _UniffiFfiConverterTypeTurboQuantizationBuildResultRecord(_UniffiConverterRustBuffer): + @staticmethod + def read(buf): + return TurboQuantizationBuildResultRecord( + index=_UniffiFfiConverterTypeBindingTurboQuantizer.read(buf), + stats=_UniffiFfiConverterTypeTurboQuantizationBuildStatsRecord.read(buf), + ) + + @staticmethod + def check_lower(value): + _UniffiFfiConverterTypeBindingTurboQuantizer.check_lower(value.index) + _UniffiFfiConverterTypeTurboQuantizationBuildStatsRecord.check_lower(value.stats) + + @staticmethod + def write(value, buf): + _UniffiFfiConverterTypeBindingTurboQuantizer.write(value.index, buf) + _UniffiFfiConverterTypeTurboQuantizationBuildStatsRecord.write(value.stats, buf) + class DistanceMetricRecord(enum.Enum): - + L2_SQUARED = 0 - + COSINE = 1 - + INNER_PRODUCT = 2 - + class _UniffiFfiConverterTypeDistanceMetricRecord(_UniffiConverterRustBuffer): @@ -13787,10 +14558,10 @@ def __init__(self, *, dimensions:int, metric:DistanceMetricRecord, log_chunk_siz self.overflow_hash_seed = overflow_hash_seed self.inline_threshold_bytes = inline_threshold_bytes self.scalar_quantization_group_size = scalar_quantization_group_size - - - + + + def __str__(self): return "ProximityConfigRecord(dimensions={}, metric={}, log_chunk_size={}, level_hash_seed={}, min_page_bytes={}, target_page_bytes={}, max_page_bytes={}, overflow_hash_seed={}, inline_threshold_bytes={}, scalar_quantization_group_size={})".format(self.dimensions, self.metric, self.log_chunk_size, self.level_hash_seed, self.min_page_bytes, self.target_page_bytes, self.max_page_bytes, self.overflow_hash_seed, self.inline_threshold_bytes, self.scalar_quantization_group_size) def __eq__(self, other): @@ -13863,10 +14634,10 @@ class ExactProximityRecordRecord: def __init__(self, *, vector:typing.List[float], value:bytes): self.vector = vector self.value = value - - - + + + def __str__(self): return "ExactProximityRecordRecord(vector={}, value={})".format(self.vector, self.value) def __eq__(self, other): @@ -13950,10 +14721,10 @@ def __init__(self, *, key:bytes, vector:typing.Optional[typing.List[float]], val self.key = key self.vector = vector self.value = value - - - + + + def __str__(self): return "ProximityMutationRecord(key={}, vector={}, value={})".format(self.key, self.vector, self.value) def __eq__(self, other): @@ -14025,10 +14796,10 @@ def __init__(self, *, directory_entries_scanned:int, directory_nodes_read:int, d self.records_rebuilt = records_rebuilt self.distance_evaluations = distance_evaluations self.full_proximity_rebuild = full_proximity_rebuild - - - + + + def __str__(self): return "ProximityMutationStatsRecord(directory_entries_scanned={}, directory_nodes_read={}, directory_nodes_rebuilt={}, directory_nodes_written={}, directory_nodes_reused={}, directory_levels_rebuilt={}, directory_right_edge_rebuilt={}, nodes_read={}, nodes_written={}, nodes_reused={}, records_rebuilt={}, distance_evaluations={}, full_proximity_rebuild={})".format(self.directory_entries_scanned, self.directory_nodes_read, self.directory_nodes_rebuilt, self.directory_nodes_written, self.directory_nodes_reused, self.directory_levels_rebuilt, self.directory_right_edge_rebuilt, self.nodes_read, self.nodes_written, self.nodes_reused, self.records_rebuilt, self.distance_evaluations, self.full_proximity_rebuild) def __eq__(self, other): @@ -14116,10 +14887,10 @@ class ProximityMutationResultRecord: def __init__(self, *, map:BindingProximityMap, stats:ProximityMutationStatsRecord): self.map = map self.stats = stats - - - + + + def __str__(self): return "ProximityMutationResultRecord(map={}, stats={})".format(self.map, self.stats) def __eq__(self, other): @@ -14184,10 +14955,10 @@ def __init__(self, *, keys:typing.List[bytes], vals:typing.List[bytes], child_co self.hash_seed = hash_seed self.encoding = encoding self.format_bytes = format_bytes - - - + + + def __str__(self): return "NodeRecord(keys={}, vals={}, child_counts={}, leaf={}, level={}, min_chunk_size={}, max_chunk_size={}, chunking_factor={}, hash_seed={}, encoding={}, format_bytes={})".format(self.keys, self.vals, self.child_counts, self.leaf, self.level, self.min_chunk_size, self.max_chunk_size, self.chunking_factor, self.hash_seed, self.encoding, self.format_bytes) def __eq__(self, other): @@ -14289,10 +15060,10 @@ def __init__(self, *, root:typing.Optional[bytes], key:bytes, path:typing.List[N self.root = root self.key = key self.path = path - - - + + + def __str__(self): return "KeyProofRecord(root={}, key={}, path={})".format(self.root, self.key, self.path) def __eq__(self, other): @@ -14332,10 +15103,10 @@ def __init__(self, *, descriptor:bytes, descriptor_bytes:bytes, directory_proof: self.descriptor_bytes = descriptor_bytes self.directory_proof = directory_proof self.record_bytes = record_bytes - - - + + + def __str__(self): return "ProximityMembershipProofRecord(descriptor={}, descriptor_bytes={}, directory_proof={}, record_bytes={})".format(self.descriptor, self.descriptor_bytes, self.directory_proof, self.record_bytes) def __eq__(self, other): @@ -14379,31 +15150,33 @@ def write(value, buf): class ContentObjectKindRecord(enum.Enum): - + ORDERED_NODE = 0 - + PROXIMITY_DESCRIPTOR = 1 - + PROXIMITY_NODE = 2 - + OVERFLOW_DIRECTORY = 3 - + OVERFLOW_PAGE = 4 - + EXTERNAL_VECTOR = 5 - + SCALAR_QUANTIZATION = 6 - + PRODUCT_QUANTIZATION = 7 - + HNSW_MANIFEST = 8 - + HNSW_PAGE = 9 - + COMPOSITE_ACCELERATOR = 10 - + ACCELERATOR_CATALOG = 11 - + + TURBO_QUANTIZATION = 12 + class _UniffiFfiConverterTypeContentObjectKindRecord(_UniffiConverterRustBuffer): @@ -14434,6 +15207,8 @@ def read(buf): return ContentObjectKindRecord.COMPOSITE_ACCELERATOR if variant == 12: return ContentObjectKindRecord.ACCELERATOR_CATALOG + if variant == 13: + return ContentObjectKindRecord.TURBO_QUANTIZATION raise InternalError("Raw enum value doesn't match any cases") @staticmethod @@ -14462,6 +15237,8 @@ def check_lower(value): return if value == ContentObjectKindRecord.ACCELERATOR_CATALOG: return + if value == ContentObjectKindRecord.TURBO_QUANTIZATION: + return raise ValueError(value) @staticmethod @@ -14490,6 +15267,8 @@ def write(value, buf): buf.write_i32(11) if value == ContentObjectKindRecord.ACCELERATOR_CATALOG: buf.write_i32(12) + if value == ContentObjectKindRecord.TURBO_QUANTIZATION: + buf.write_i32(13) @@ -14501,10 +15280,10 @@ def __init__(self, *, kind:ContentObjectKindRecord, cid:bytes, dimensions:typing self.dimensions = dimensions self.bytes = bytes self.depth = depth - - - + + + def __str__(self): return "TypedContentObjectRecord(kind={}, cid={}, dimensions={}, bytes={}, depth={})".format(self.kind, self.cid, self.dimensions, self.bytes, self.depth) def __eq__(self, other): @@ -14575,10 +15354,10 @@ class ProximityStructuralProofRecord: def __init__(self, *, descriptor:bytes, objects:typing.List[TypedContentObjectRecord]): self.descriptor = descriptor self.objects = objects - - - + + + def __str__(self): return "ProximityStructuralProofRecord(descriptor={}, objects={})".format(self.descriptor, self.objects) def __eq__(self, other): @@ -14612,10 +15391,10 @@ def __init__(self, *, key:bytes, vector:typing.List[float], value:bytes): self.key = key self.vector = vector self.value = value - - - + + + def __str__(self): return "ProximityRecordRecord(key={}, vector={}, value={})".format(self.key, self.vector, self.value) def __eq__(self, other): @@ -14650,14 +15429,14 @@ def write(value, buf): class ProximityRecordVisitorCallback(): - + def visit(self, record: ProximityRecordRecord) -> bool: raise NotImplementedError class ProximityRecordVisitorCallbackImpl(ProximityRecordVisitorCallback): - + _handle: ctypes.c_uint64 - + def __init__(self, *args, **kwargs): raise ValueError("This class has no default constructor") @@ -14679,7 +15458,7 @@ def _uniffi_make_instance(cls, handle): inst._handle = handle return inst def visit(self, record: ProximityRecordRecord) -> bool: - + _UniffiFfiConverterTypeProximityRecordRecord.check_lower(record) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -14779,7 +15558,7 @@ def write(cls, value: ProximityRecordVisitorCallback, buf: _UniffiRustBuffer): class BindingProximityReadSessionProtocol(typing.Protocol): - + def contains_key(self, key: bytes) -> bool: raise NotImplementedError def fast_handle(self, ) -> int: @@ -14796,9 +15575,9 @@ def search_with_runtime(self, request: ProximitySearchRequestRecord,runtime: Bin raise NotImplementedError class BindingProximityReadSession(BindingProximityReadSessionProtocol): - + _handle: ctypes.c_uint64 - + def __init__(self, *args, **kwargs): raise ValueError("This class has no default constructor") @@ -14820,7 +15599,7 @@ def _uniffi_make_instance(cls, handle): inst._handle = handle return inst def contains_key(self, key: bytes) -> bool: - + _UniffiFfiConverterBytes.check_lower(key) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -14847,7 +15626,7 @@ def fast_handle(self, ) -> int: ) return _uniffi_lift_return(_uniffi_ffi_result) def get(self, key: bytes) -> typing.Optional[ExactProximityRecordRecord]: - + _UniffiFfiConverterBytes.check_lower(key) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -14862,7 +15641,7 @@ def get(self, key: bytes) -> typing.Optional[ExactProximityRecordRecord]: ) return _uniffi_lift_return(_uniffi_ffi_result) def scan_records(self, visitor: ProximityRecordVisitorCallback) -> int: - + _UniffiFfiConverterTypeProximityRecordVisitorCallback.check_lower(visitor) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -14877,7 +15656,7 @@ def scan_records(self, visitor: ProximityRecordVisitorCallback) -> int: ) return _uniffi_lift_return(_uniffi_ffi_result) def search(self, request: ProximitySearchRequestRecord) -> ProximitySearchResultRecord: - + _UniffiFfiConverterTypeProximitySearchRequestRecord.check_lower(request) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -14892,7 +15671,7 @@ def search(self, request: ProximitySearchRequestRecord) -> ProximitySearchResult ) return _uniffi_lift_return(_uniffi_ffi_result) def search_cancellable(self, request: ProximitySearchRequestRecord,runtime: typing.Optional[BindingProximitySearchRuntime],cancellation: BindingProximityCancellationToken) -> ProximitySearchResultRecord: - + _UniffiFfiConverterTypeProximitySearchRequestRecord.check_lower(request) _UniffiFfiConverterOptionalTypeBindingProximitySearchRuntime.check_lower(runtime) @@ -14913,7 +15692,7 @@ def search_cancellable(self, request: ProximitySearchRequestRecord,runtime: typi ) return _uniffi_lift_return(_uniffi_ffi_result) def search_with_runtime(self, request: ProximitySearchRequestRecord,runtime: BindingProximitySearchRuntime) -> ProximitySearchResultRecord: - + _UniffiFfiConverterTypeProximitySearchRequestRecord.check_lower(request) _UniffiFfiConverterTypeBindingProximitySearchRuntime.check_lower(runtime) @@ -14973,10 +15752,10 @@ def __init__(self, *, record_count:int, proximity_node_count:int, external_vecto self.maximum_level = maximum_level self.maximum_node_bytes = maximum_node_bytes self.distance_checks = distance_checks - - - + + + def __str__(self): return "ProximityVerificationRecord(record_count={}, proximity_node_count={}, external_vector_count={}, quantized_node_count={}, scalar_quantizer_count={}, overflow_page_count={}, overflow_directory_count={}, maximum_level={}, maximum_node_bytes={}, distance_checks={})".format(self.record_count, self.proximity_node_count, self.external_vector_count, self.quantized_node_count, self.scalar_quantizer_count, self.overflow_page_count, self.overflow_directory_count, self.maximum_level, self.maximum_node_bytes, self.distance_checks) def __eq__(self, other): @@ -15046,21 +15825,27 @@ def write(value, buf): class BindingProximityMapProtocol(typing.Protocol): - - def build_accelerator_catalog(self, hnsw: typing.Optional[BindingHnswIndex],pq: typing.Optional[BindingProductQuantizer],composite: typing.Optional[BindingCompositeAccelerator]) -> BindingAcceleratorCatalog: + + def build_accelerator_catalog(self, hnsw: typing.Optional[BindingHnswIndex],pq: typing.Optional[BindingProductQuantizer],turboquant: typing.Optional[BindingTurboQuantizer],composite: typing.Optional[BindingCompositeAccelerator]) -> BindingAcceleratorCatalog: raise NotImplementedError def build_composite_hnsw(self, base_map: BindingProximityMap,base: BindingHnswIndex,config: CompositeAcceleratorConfigRecord,limits: CompositeBuildLimitsRecord) -> CompositeBuildOutcomeRecord: raise NotImplementedError def build_composite_pq(self, base_map: BindingProximityMap,base: BindingProductQuantizer,config: CompositeAcceleratorConfigRecord,limits: CompositeBuildLimitsRecord) -> CompositeBuildOutcomeRecord: raise NotImplementedError + def build_composite_turboquant(self, base_map: BindingProximityMap,base: BindingTurboQuantizer,config: CompositeAcceleratorConfigRecord,limits: CompositeBuildLimitsRecord) -> CompositeBuildOutcomeRecord: + raise NotImplementedError def build_hnsw(self, config: HnswConfigRecord,limits: HnswBuildLimitsRecord) -> HnswBuildResultRecord: raise NotImplementedError def build_or_rebuild_composite_hnsw(self, base_map: BindingProximityMap,base: BindingHnswIndex,config: CompositeAcceleratorConfigRecord,limits: CompositeBuildLimitsRecord,rebuild: CompositeRebuildOptionsRecord) -> CompositeBuildOrRebuildOutcomeRecord: raise NotImplementedError def build_or_rebuild_composite_pq(self, base_map: BindingProximityMap,base: BindingProductQuantizer,config: CompositeAcceleratorConfigRecord,limits: CompositeBuildLimitsRecord,rebuild: CompositeRebuildOptionsRecord) -> CompositeBuildOrRebuildOutcomeRecord: raise NotImplementedError + def build_or_rebuild_composite_turboquant(self, base_map: BindingProximityMap,base: BindingTurboQuantizer,config: CompositeAcceleratorConfigRecord,limits: CompositeBuildLimitsRecord,rebuild: CompositeRebuildOptionsRecord) -> CompositeBuildOrRebuildOutcomeRecord: + raise NotImplementedError def build_pq(self, config: ProductQuantizationConfigRecord,worker_threads: int,limits: ProductQuantizationBuildLimitsRecord) -> ProductQuantizationBuildResultRecord: raise NotImplementedError + def build_turboquant(self, config: TurboQuantizationConfigRecord,worker_threads: int,limits: TurboQuantizationBuildLimitsRecord) -> TurboQuantizationBuildResultRecord: + raise NotImplementedError def clear_content_cache(self, ) -> None: raise NotImplementedError def config(self, ) -> ProximityConfigRecord: @@ -15083,6 +15868,8 @@ def load_hnsw(self, manifest: bytes) -> BindingHnswIndex: raise NotImplementedError def load_pq(self, manifest: bytes) -> BindingProductQuantizer: raise NotImplementedError + def load_turboquant(self, manifest: bytes) -> BindingTurboQuantizer: + raise NotImplementedError def mutate(self, mutations: typing.List[ProximityMutationRecord]) -> ProximityMutationResultRecord: raise NotImplementedError def prove_membership(self, key: bytes) -> ProximityMembershipProofRecord: @@ -15107,9 +15894,9 @@ def verify(self, ) -> ProximityVerificationRecord: raise NotImplementedError class BindingProximityMap(BindingProximityMapProtocol): - + _handle: ctypes.c_uint64 - + def __init__(self, *args, **kwargs): raise ValueError("This class has no default constructor") @@ -15130,17 +15917,20 @@ def _uniffi_make_instance(cls, handle): inst = cls.__new__(cls) inst._handle = handle return inst - def build_accelerator_catalog(self, hnsw: typing.Optional[BindingHnswIndex],pq: typing.Optional[BindingProductQuantizer],composite: typing.Optional[BindingCompositeAccelerator]) -> BindingAcceleratorCatalog: - + def build_accelerator_catalog(self, hnsw: typing.Optional[BindingHnswIndex],pq: typing.Optional[BindingProductQuantizer],turboquant: typing.Optional[BindingTurboQuantizer],composite: typing.Optional[BindingCompositeAccelerator]) -> BindingAcceleratorCatalog: + _UniffiFfiConverterOptionalTypeBindingHnswIndex.check_lower(hnsw) _UniffiFfiConverterOptionalTypeBindingProductQuantizer.check_lower(pq) + _UniffiFfiConverterOptionalTypeBindingTurboQuantizer.check_lower(turboquant) + _UniffiFfiConverterOptionalTypeBindingCompositeAccelerator.check_lower(composite) _uniffi_lowered_args = ( self._uniffi_clone_handle(), _UniffiFfiConverterOptionalTypeBindingHnswIndex.lower(hnsw), _UniffiFfiConverterOptionalTypeBindingProductQuantizer.lower(pq), + _UniffiFfiConverterOptionalTypeBindingTurboQuantizer.lower(turboquant), _UniffiFfiConverterOptionalTypeBindingCompositeAccelerator.lower(composite), ) _uniffi_lift_return = _UniffiFfiConverterTypeBindingAcceleratorCatalog.lift @@ -15152,7 +15942,7 @@ def build_accelerator_catalog(self, hnsw: typing.Optional[BindingHnswIndex],pq: ) return _uniffi_lift_return(_uniffi_ffi_result) def build_composite_hnsw(self, base_map: BindingProximityMap,base: BindingHnswIndex,config: CompositeAcceleratorConfigRecord,limits: CompositeBuildLimitsRecord) -> CompositeBuildOutcomeRecord: - + _UniffiFfiConverterTypeBindingProximityMap.check_lower(base_map) _UniffiFfiConverterTypeBindingHnswIndex.check_lower(base) @@ -15176,7 +15966,7 @@ def build_composite_hnsw(self, base_map: BindingProximityMap,base: BindingHnswIn ) return _uniffi_lift_return(_uniffi_ffi_result) def build_composite_pq(self, base_map: BindingProximityMap,base: BindingProductQuantizer,config: CompositeAcceleratorConfigRecord,limits: CompositeBuildLimitsRecord) -> CompositeBuildOutcomeRecord: - + _UniffiFfiConverterTypeBindingProximityMap.check_lower(base_map) _UniffiFfiConverterTypeBindingProductQuantizer.check_lower(base) @@ -15199,8 +15989,32 @@ def build_composite_pq(self, base_map: BindingProximityMap,base: BindingProductQ *_uniffi_lowered_args, ) return _uniffi_lift_return(_uniffi_ffi_result) + def build_composite_turboquant(self, base_map: BindingProximityMap,base: BindingTurboQuantizer,config: CompositeAcceleratorConfigRecord,limits: CompositeBuildLimitsRecord) -> CompositeBuildOutcomeRecord: + + _UniffiFfiConverterTypeBindingProximityMap.check_lower(base_map) + + _UniffiFfiConverterTypeBindingTurboQuantizer.check_lower(base) + + _UniffiFfiConverterTypeCompositeAcceleratorConfigRecord.check_lower(config) + + _UniffiFfiConverterTypeCompositeBuildLimitsRecord.check_lower(limits) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterTypeBindingProximityMap.lower(base_map), + _UniffiFfiConverterTypeBindingTurboQuantizer.lower(base), + _UniffiFfiConverterTypeCompositeAcceleratorConfigRecord.lower(config), + _UniffiFfiConverterTypeCompositeBuildLimitsRecord.lower(limits), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeCompositeBuildOutcomeRecord.lift + _uniffi_error_converter = _UniffiFfiConverterTypeProllyBindingError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_prolly_bindings_fn_method_bindingproximitymap_build_composite_turboquant, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) def build_hnsw(self, config: HnswConfigRecord,limits: HnswBuildLimitsRecord) -> HnswBuildResultRecord: - + _UniffiFfiConverterTypeHnswConfigRecord.check_lower(config) _UniffiFfiConverterTypeHnswBuildLimitsRecord.check_lower(limits) @@ -15218,7 +16032,7 @@ def build_hnsw(self, config: HnswConfigRecord,limits: HnswBuildLimitsRecord) -> ) return _uniffi_lift_return(_uniffi_ffi_result) def build_or_rebuild_composite_hnsw(self, base_map: BindingProximityMap,base: BindingHnswIndex,config: CompositeAcceleratorConfigRecord,limits: CompositeBuildLimitsRecord,rebuild: CompositeRebuildOptionsRecord) -> CompositeBuildOrRebuildOutcomeRecord: - + _UniffiFfiConverterTypeBindingProximityMap.check_lower(base_map) _UniffiFfiConverterTypeBindingHnswIndex.check_lower(base) @@ -15245,7 +16059,7 @@ def build_or_rebuild_composite_hnsw(self, base_map: BindingProximityMap,base: Bi ) return _uniffi_lift_return(_uniffi_ffi_result) def build_or_rebuild_composite_pq(self, base_map: BindingProximityMap,base: BindingProductQuantizer,config: CompositeAcceleratorConfigRecord,limits: CompositeBuildLimitsRecord,rebuild: CompositeRebuildOptionsRecord) -> CompositeBuildOrRebuildOutcomeRecord: - + _UniffiFfiConverterTypeBindingProximityMap.check_lower(base_map) _UniffiFfiConverterTypeBindingProductQuantizer.check_lower(base) @@ -15271,8 +16085,35 @@ def build_or_rebuild_composite_pq(self, base_map: BindingProximityMap,base: Bind *_uniffi_lowered_args, ) return _uniffi_lift_return(_uniffi_ffi_result) + def build_or_rebuild_composite_turboquant(self, base_map: BindingProximityMap,base: BindingTurboQuantizer,config: CompositeAcceleratorConfigRecord,limits: CompositeBuildLimitsRecord,rebuild: CompositeRebuildOptionsRecord) -> CompositeBuildOrRebuildOutcomeRecord: + + _UniffiFfiConverterTypeBindingProximityMap.check_lower(base_map) + + _UniffiFfiConverterTypeBindingTurboQuantizer.check_lower(base) + + _UniffiFfiConverterTypeCompositeAcceleratorConfigRecord.check_lower(config) + + _UniffiFfiConverterTypeCompositeBuildLimitsRecord.check_lower(limits) + + _UniffiFfiConverterTypeCompositeRebuildOptionsRecord.check_lower(rebuild) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterTypeBindingProximityMap.lower(base_map), + _UniffiFfiConverterTypeBindingTurboQuantizer.lower(base), + _UniffiFfiConverterTypeCompositeAcceleratorConfigRecord.lower(config), + _UniffiFfiConverterTypeCompositeBuildLimitsRecord.lower(limits), + _UniffiFfiConverterTypeCompositeRebuildOptionsRecord.lower(rebuild), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeCompositeBuildOrRebuildOutcomeRecord.lift + _uniffi_error_converter = _UniffiFfiConverterTypeProllyBindingError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_prolly_bindings_fn_method_bindingproximitymap_build_or_rebuild_composite_turboquant, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) def build_pq(self, config: ProductQuantizationConfigRecord,worker_threads: int,limits: ProductQuantizationBuildLimitsRecord) -> ProductQuantizationBuildResultRecord: - + _UniffiFfiConverterTypeProductQuantizationConfigRecord.check_lower(config) _UniffiFfiConverterUInt64.check_lower(worker_threads) @@ -15292,6 +16133,27 @@ def build_pq(self, config: ProductQuantizationConfigRecord,worker_threads: int,l *_uniffi_lowered_args, ) return _uniffi_lift_return(_uniffi_ffi_result) + def build_turboquant(self, config: TurboQuantizationConfigRecord,worker_threads: int,limits: TurboQuantizationBuildLimitsRecord) -> TurboQuantizationBuildResultRecord: + + _UniffiFfiConverterTypeTurboQuantizationConfigRecord.check_lower(config) + + _UniffiFfiConverterUInt64.check_lower(worker_threads) + + _UniffiFfiConverterTypeTurboQuantizationBuildLimitsRecord.check_lower(limits) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterTypeTurboQuantizationConfigRecord.lower(config), + _UniffiFfiConverterUInt64.lower(worker_threads), + _UniffiFfiConverterTypeTurboQuantizationBuildLimitsRecord.lower(limits), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeTurboQuantizationBuildResultRecord.lift + _uniffi_error_converter = _UniffiFfiConverterTypeProllyBindingError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_prolly_bindings_fn_method_bindingproximitymap_build_turboquant, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) def clear_content_cache(self, ) -> None: _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -15317,7 +16179,7 @@ def config(self, ) -> ProximityConfigRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def contains_key(self, key: bytes) -> bool: - + _UniffiFfiConverterBytes.check_lower(key) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -15368,7 +16230,7 @@ def fast_handle(self, ) -> int: ) return _uniffi_lift_return(_uniffi_ffi_result) def get(self, key: bytes) -> typing.Optional[ExactProximityRecordRecord]: - + _UniffiFfiConverterBytes.check_lower(key) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -15383,7 +16245,7 @@ def get(self, key: bytes) -> typing.Optional[ExactProximityRecordRecord]: ) return _uniffi_lift_return(_uniffi_ffi_result) def load_accelerator_catalog(self, manifest: bytes) -> BindingAcceleratorCatalog: - + _UniffiFfiConverterBytes.check_lower(manifest) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -15398,7 +16260,7 @@ def load_accelerator_catalog(self, manifest: bytes) -> BindingAcceleratorCatalog ) return _uniffi_lift_return(_uniffi_ffi_result) def load_composite(self, manifest: bytes) -> BindingCompositeAccelerator: - + _UniffiFfiConverterBytes.check_lower(manifest) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -15413,7 +16275,7 @@ def load_composite(self, manifest: bytes) -> BindingCompositeAccelerator: ) return _uniffi_lift_return(_uniffi_ffi_result) def load_hnsw(self, manifest: bytes) -> BindingHnswIndex: - + _UniffiFfiConverterBytes.check_lower(manifest) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -15428,7 +16290,7 @@ def load_hnsw(self, manifest: bytes) -> BindingHnswIndex: ) return _uniffi_lift_return(_uniffi_ffi_result) def load_pq(self, manifest: bytes) -> BindingProductQuantizer: - + _UniffiFfiConverterBytes.check_lower(manifest) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -15442,8 +16304,23 @@ def load_pq(self, manifest: bytes) -> BindingProductQuantizer: *_uniffi_lowered_args, ) return _uniffi_lift_return(_uniffi_ffi_result) + def load_turboquant(self, manifest: bytes) -> BindingTurboQuantizer: + + _UniffiFfiConverterBytes.check_lower(manifest) + _uniffi_lowered_args = ( + self._uniffi_clone_handle(), + _UniffiFfiConverterBytes.lower(manifest), + ) + _uniffi_lift_return = _UniffiFfiConverterTypeBindingTurboQuantizer.lift + _uniffi_error_converter = _UniffiFfiConverterTypeProllyBindingError + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_prolly_bindings_fn_method_bindingproximitymap_load_turboquant, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) def mutate(self, mutations: typing.List[ProximityMutationRecord]) -> ProximityMutationResultRecord: - + _UniffiFfiConverterSequenceTypeProximityMutationRecord.check_lower(mutations) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -15458,7 +16335,7 @@ def mutate(self, mutations: typing.List[ProximityMutationRecord]) -> ProximityMu ) return _uniffi_lift_return(_uniffi_ffi_result) def prove_membership(self, key: bytes) -> ProximityMembershipProofRecord: - + _UniffiFfiConverterBytes.check_lower(key) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -15473,7 +16350,7 @@ def prove_membership(self, key: bytes) -> ProximityMembershipProofRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def prove_search(self, request: ProximitySearchRequestRecord,limits: ContentGraphLimitsRecord) -> BindingProximitySearchProof: - + _UniffiFfiConverterTypeProximitySearchRequestRecord.check_lower(request) _UniffiFfiConverterTypeContentGraphLimitsRecord.check_lower(limits) @@ -15491,7 +16368,7 @@ def prove_search(self, request: ProximitySearchRequestRecord,limits: ContentGrap ) return _uniffi_lift_return(_uniffi_ffi_result) def prove_structure(self, limits: ContentGraphLimitsRecord) -> ProximityStructuralProofRecord: - + _UniffiFfiConverterTypeContentGraphLimitsRecord.check_lower(limits) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -15518,7 +16395,7 @@ def read_session(self, ) -> BindingProximityReadSession: ) return _uniffi_lift_return(_uniffi_ffi_result) def rebuild(self, mutations: typing.List[ProximityMutationRecord]) -> BindingProximityMap: - + _UniffiFfiConverterSequenceTypeProximityMutationRecord.check_lower(mutations) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -15533,7 +16410,7 @@ def rebuild(self, mutations: typing.List[ProximityMutationRecord]) -> BindingPro ) return _uniffi_lift_return(_uniffi_ffi_result) def scan_records(self, visitor: ProximityRecordVisitorCallback) -> int: - + _UniffiFfiConverterTypeProximityRecordVisitorCallback.check_lower(visitor) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -15548,7 +16425,7 @@ def scan_records(self, visitor: ProximityRecordVisitorCallback) -> int: ) return _uniffi_lift_return(_uniffi_ffi_result) def search(self, request: ProximitySearchRequestRecord) -> ProximitySearchResultRecord: - + _UniffiFfiConverterTypeProximitySearchRequestRecord.check_lower(request) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -15563,7 +16440,7 @@ def search(self, request: ProximitySearchRequestRecord) -> ProximitySearchResult ) return _uniffi_lift_return(_uniffi_ffi_result) def search_cancellable(self, request: ProximitySearchRequestRecord,runtime: typing.Optional[BindingProximitySearchRuntime],cancellation: BindingProximityCancellationToken) -> ProximitySearchResultRecord: - + _UniffiFfiConverterTypeProximitySearchRequestRecord.check_lower(request) _UniffiFfiConverterOptionalTypeBindingProximitySearchRuntime.check_lower(runtime) @@ -15584,7 +16461,7 @@ def search_cancellable(self, request: ProximitySearchRequestRecord,runtime: typi ) return _uniffi_lift_return(_uniffi_ffi_result) def search_with_runtime(self, request: ProximitySearchRequestRecord,runtime: BindingProximitySearchRuntime) -> ProximitySearchResultRecord: - + _UniffiFfiConverterTypeProximitySearchRequestRecord.check_lower(request) _UniffiFfiConverterTypeBindingProximitySearchRuntime.check_lower(runtime) @@ -15645,7 +16522,7 @@ def write(cls, value: BindingProximityMap, buf: _UniffiRustBuffer): class BindingCompositeAcceleratorProtocol(typing.Protocol): - + def base_kind(self, ) -> CompositeBaseKindRecord: raise NotImplementedError def base_source_descriptor(self, ) -> bytes: @@ -15672,9 +16549,9 @@ def shadow_count(self, ) -> int: raise NotImplementedError class BindingCompositeAccelerator(BindingCompositeAcceleratorProtocol): - + _handle: ctypes.c_uint64 - + def __init__(self, *args, **kwargs): raise ValueError("This class has no default constructor") @@ -15780,7 +16657,7 @@ def manifest(self, ) -> bytes: ) return _uniffi_lift_return(_uniffi_ffi_result) def prove_search(self, map: BindingProximityMap,request: ProximitySearchRequestRecord,limits: ContentGraphLimitsRecord) -> BindingProximitySearchProof: - + _UniffiFfiConverterTypeBindingProximityMap.check_lower(map) _UniffiFfiConverterTypeProximitySearchRequestRecord.check_lower(request) @@ -15801,7 +16678,7 @@ def prove_search(self, map: BindingProximityMap,request: ProximitySearchRequestR ) return _uniffi_lift_return(_uniffi_ffi_result) def search(self, map: BindingProximityMap,request: ProximitySearchRequestRecord) -> ProximitySearchResultRecord: - + _UniffiFfiConverterTypeBindingProximityMap.check_lower(map) _UniffiFfiConverterTypeProximitySearchRequestRecord.check_lower(request) @@ -15819,7 +16696,7 @@ def search(self, map: BindingProximityMap,request: ProximitySearchRequestRecord) ) return _uniffi_lift_return(_uniffi_ffi_result) def search_cancellable(self, map: BindingProximityMap,request: ProximitySearchRequestRecord,runtime: typing.Optional[BindingProximitySearchRuntime],cancellation: BindingProximityCancellationToken) -> ProximitySearchResultRecord: - + _UniffiFfiConverterTypeBindingProximityMap.check_lower(map) _UniffiFfiConverterTypeProximitySearchRequestRecord.check_lower(request) @@ -15843,7 +16720,7 @@ def search_cancellable(self, map: BindingProximityMap,request: ProximitySearchRe ) return _uniffi_lift_return(_uniffi_ffi_result) def search_with_runtime(self, map: BindingProximityMap,request: ProximitySearchRequestRecord,runtime: BindingProximitySearchRuntime) -> ProximitySearchResultRecord: - + _UniffiFfiConverterTypeBindingProximityMap.check_lower(map) _UniffiFfiConverterTypeProximitySearchRequestRecord.check_lower(request) @@ -15980,23 +16857,50 @@ def read(cls, buf): else: raise InternalError("Unexpected flag byte for optional type") +class _UniffiFfiConverterOptionalTypeTurboQuantizationBuildStatsRecord(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + if value is not None: + _UniffiFfiConverterTypeTurboQuantizationBuildStatsRecord.check_lower(value) + + @classmethod + def write(cls, value, buf): + if value is None: + buf.write_u8(0) + return + + buf.write_u8(1) + _UniffiFfiConverterTypeTurboQuantizationBuildStatsRecord.write(value, buf) + + @classmethod + def read(cls, buf): + flag = buf.read_u8() + if flag == 0: + return None + elif flag == 1: + return _UniffiFfiConverterTypeTurboQuantizationBuildStatsRecord.read(buf) + else: + raise InternalError("Unexpected flag byte for optional type") + @dataclass class CompositeBuildOrRebuildOutcomeRecord: - def __init__(self, *, kind:CompositeBuildOrRebuildKindRecord, composite:typing.Optional[BindingCompositeAccelerator], hnsw:typing.Optional[BindingHnswIndex], pq:typing.Optional[BindingProductQuantizer], reasons:typing.List[FullRebuildReasonRecord], composite_stats:CompositeBuildStatsRecord, hnsw_stats:typing.Optional[HnswBuildStatsRecord], pq_stats:typing.Optional[ProductQuantizationBuildStatsRecord]): + def __init__(self, *, kind:CompositeBuildOrRebuildKindRecord, composite:typing.Optional[BindingCompositeAccelerator], hnsw:typing.Optional[BindingHnswIndex], pq:typing.Optional[BindingProductQuantizer], turboquant:typing.Optional[BindingTurboQuantizer], reasons:typing.List[FullRebuildReasonRecord], composite_stats:CompositeBuildStatsRecord, hnsw_stats:typing.Optional[HnswBuildStatsRecord], pq_stats:typing.Optional[ProductQuantizationBuildStatsRecord], turboquant_stats:typing.Optional[TurboQuantizationBuildStatsRecord]): self.kind = kind self.composite = composite self.hnsw = hnsw self.pq = pq + self.turboquant = turboquant self.reasons = reasons self.composite_stats = composite_stats self.hnsw_stats = hnsw_stats self.pq_stats = pq_stats - - + self.turboquant_stats = turboquant_stats + + + - def __str__(self): - return "CompositeBuildOrRebuildOutcomeRecord(kind={}, composite={}, hnsw={}, pq={}, reasons={}, composite_stats={}, hnsw_stats={}, pq_stats={})".format(self.kind, self.composite, self.hnsw, self.pq, self.reasons, self.composite_stats, self.hnsw_stats, self.pq_stats) + return "CompositeBuildOrRebuildOutcomeRecord(kind={}, composite={}, hnsw={}, pq={}, turboquant={}, reasons={}, composite_stats={}, hnsw_stats={}, pq_stats={}, turboquant_stats={})".format(self.kind, self.composite, self.hnsw, self.pq, self.turboquant, self.reasons, self.composite_stats, self.hnsw_stats, self.pq_stats, self.turboquant_stats) def __eq__(self, other): if self.kind != other.kind: return False @@ -16006,6 +16910,8 @@ def __eq__(self, other): return False if self.pq != other.pq: return False + if self.turboquant != other.turboquant: + return False if self.reasons != other.reasons: return False if self.composite_stats != other.composite_stats: @@ -16014,6 +16920,8 @@ def __eq__(self, other): return False if self.pq_stats != other.pq_stats: return False + if self.turboquant_stats != other.turboquant_stats: + return False return True class _UniffiFfiConverterTypeCompositeBuildOrRebuildOutcomeRecord(_UniffiConverterRustBuffer): @@ -16024,10 +16932,12 @@ def read(buf): composite=_UniffiFfiConverterOptionalTypeBindingCompositeAccelerator.read(buf), hnsw=_UniffiFfiConverterOptionalTypeBindingHnswIndex.read(buf), pq=_UniffiFfiConverterOptionalTypeBindingProductQuantizer.read(buf), + turboquant=_UniffiFfiConverterOptionalTypeBindingTurboQuantizer.read(buf), reasons=_UniffiFfiConverterSequenceTypeFullRebuildReasonRecord.read(buf), composite_stats=_UniffiFfiConverterTypeCompositeBuildStatsRecord.read(buf), hnsw_stats=_UniffiFfiConverterOptionalTypeHnswBuildStatsRecord.read(buf), pq_stats=_UniffiFfiConverterOptionalTypeProductQuantizationBuildStatsRecord.read(buf), + turboquant_stats=_UniffiFfiConverterOptionalTypeTurboQuantizationBuildStatsRecord.read(buf), ) @staticmethod @@ -16036,10 +16946,12 @@ def check_lower(value): _UniffiFfiConverterOptionalTypeBindingCompositeAccelerator.check_lower(value.composite) _UniffiFfiConverterOptionalTypeBindingHnswIndex.check_lower(value.hnsw) _UniffiFfiConverterOptionalTypeBindingProductQuantizer.check_lower(value.pq) + _UniffiFfiConverterOptionalTypeBindingTurboQuantizer.check_lower(value.turboquant) _UniffiFfiConverterSequenceTypeFullRebuildReasonRecord.check_lower(value.reasons) _UniffiFfiConverterTypeCompositeBuildStatsRecord.check_lower(value.composite_stats) _UniffiFfiConverterOptionalTypeHnswBuildStatsRecord.check_lower(value.hnsw_stats) _UniffiFfiConverterOptionalTypeProductQuantizationBuildStatsRecord.check_lower(value.pq_stats) + _UniffiFfiConverterOptionalTypeTurboQuantizationBuildStatsRecord.check_lower(value.turboquant_stats) @staticmethod def write(value, buf): @@ -16047,10 +16959,12 @@ def write(value, buf): _UniffiFfiConverterOptionalTypeBindingCompositeAccelerator.write(value.composite, buf) _UniffiFfiConverterOptionalTypeBindingHnswIndex.write(value.hnsw, buf) _UniffiFfiConverterOptionalTypeBindingProductQuantizer.write(value.pq, buf) + _UniffiFfiConverterOptionalTypeBindingTurboQuantizer.write(value.turboquant, buf) _UniffiFfiConverterSequenceTypeFullRebuildReasonRecord.write(value.reasons, buf) _UniffiFfiConverterTypeCompositeBuildStatsRecord.write(value.composite_stats, buf) _UniffiFfiConverterOptionalTypeHnswBuildStatsRecord.write(value.hnsw_stats, buf) _UniffiFfiConverterOptionalTypeProductQuantizationBuildStatsRecord.write(value.pq_stats, buf) + _UniffiFfiConverterOptionalTypeTurboQuantizationBuildStatsRecord.write(value.turboquant_stats, buf) @dataclass class ConflictRecord: @@ -16059,10 +16973,10 @@ def __init__(self, *, key:bytes, base:typing.Optional[bytes], left:typing.Option self.base = base self.left = left self.right = right - - - + + + def __str__(self): return "ConflictRecord(key={}, base={}, left={}, right={})".format(self.key, self.base, self.left, self.right) def __eq__(self, other): @@ -16128,10 +17042,10 @@ class ConflictPageRecord: def __init__(self, *, conflicts:typing.List[ConflictRecord], next_cursor:typing.Optional[RangeCursorRecord]): self.conflicts = conflicts self.next_cursor = next_cursor - - - + + + def __str__(self): return "ConflictPageRecord(conflicts={}, next_cursor={})".format(self.conflicts, self.next_cursor) def __eq__(self, other): @@ -16165,11 +17079,11 @@ def write(value, buf): class CrdtMergeStrategyKind(enum.Enum): - + LAST_WRITER_WINS = 0 - + MULTI_VALUE = 1 - + class _UniffiFfiConverterTypeCrdtMergeStrategyKind(_UniffiConverterRustBuffer): @@ -16205,11 +17119,11 @@ def write(value, buf): class CrdtDeletePolicyKind(enum.Enum): - + DELETE_WINS = 0 - + UPDATE_WINS = 1 - + class _UniffiFfiConverterTypeCrdtDeletePolicyKind(_UniffiConverterRustBuffer): @@ -16244,10 +17158,10 @@ class CrdtConfigRecord: def __init__(self, *, strategy:CrdtMergeStrategyKind, delete_policy:CrdtDeletePolicyKind): self.strategy = strategy self.delete_policy = delete_policy - - - + + + def __str__(self): return "CrdtConfigRecord(strategy={}, delete_policy={})".format(self.strategy, self.delete_policy) def __eq__(self, other): @@ -16281,11 +17195,11 @@ def write(value, buf): class CrdtResolutionKind(enum.Enum): - + VALUE = 0 - + DELETE = 1 - + class _UniffiFfiConverterTypeCrdtResolutionKind(_UniffiConverterRustBuffer): @@ -16320,10 +17234,10 @@ class CrdtResolutionRecord: def __init__(self, *, kind:CrdtResolutionKind, value:typing.Optional[bytes]): self.kind = kind self.value = value - - - + + + def __str__(self): return "CrdtResolutionRecord(kind={}, value={})".format(self.kind, self.value) def __eq__(self, other): @@ -16356,10 +17270,10 @@ class EntryRecord: def __init__(self, *, key:bytes, value:bytes): self.key = key self.value = value - - - + + + def __str__(self): return "EntryRecord(key={}, value={})".format(self.key, self.value) def __eq__(self, other): @@ -16418,10 +17332,10 @@ def __init__(self, *, position_key:typing.Optional[bytes], position_value:typing self.found = found self.entries = entries self.next_cursor = next_cursor - - - + + + def __str__(self): return "CursorWindowRecord(position_key={}, position_value={}, found={}, entries={}, next_cursor={})".format(self.position_key, self.position_value, self.found, self.entries, self.next_cursor) def __eq__(self, other): @@ -16471,10 +17385,10 @@ def __init__(self, *, root:typing.Optional[bytes], after:typing.Optional[bytes], self.after = after self.end = end self.path = path - - - + + + def __str__(self): return "RangePageProofRecord(root={}, after={}, end={}, path={})".format(self.root, self.after, self.end, self.path) def __eq__(self, other): @@ -16546,10 +17460,10 @@ def __init__(self, *, base:RangePageProofRecord, other:RangePageProofRecord, loo self.lookahead_other = lookahead_other self.requested_end = requested_end self.limit = limit - - - + + + def __str__(self): return "DiffPageProofRecord(base={}, other={}, lookahead_base={}, lookahead_other={}, requested_end={}, limit={})".format(self.base, self.other, self.lookahead_base, self.lookahead_other, self.requested_end, self.limit) def __eq__(self, other): @@ -16603,13 +17517,13 @@ def write(value, buf): class DiffKind(enum.Enum): - + ADDED = 0 - + REMOVED = 1 - + CHANGED = 2 - + class _UniffiFfiConverterTypeDiffKind(_UniffiConverterRustBuffer): @@ -16653,10 +17567,10 @@ def __init__(self, *, kind:DiffKind, key:bytes, value:typing.Optional[bytes], ol self.value = value self.old_value = old_value self.new_value = new_value - - - + + + def __str__(self): return "DiffRecord(kind={}, key={}, value={}, old_value={}, new_value={})".format(self.kind, self.key, self.value, self.old_value, self.new_value) def __eq__(self, other): @@ -16737,10 +17651,10 @@ def __init__(self, *, valid:bool, base_valid:bool, other_valid:bool, lookahead_v self.limit = limit self.diffs = diffs self.next_cursor = next_cursor - - - + + + def __str__(self): return "DiffPageProofVerificationRecord(valid={}, base_valid={}, other_valid={}, lookahead_valid={}, base_root={}, other_root={}, after={}, requested_end={}, proof_end={}, limit={}, diffs={}, next_cursor={})".format(self.valid, self.base_valid, self.other_valid, self.lookahead_valid, self.base_root, self.other_root, self.after, self.requested_end, self.proof_end, self.limit, self.diffs, self.next_cursor) def __eq__(self, other): @@ -16823,10 +17737,10 @@ class DiffPageRecord: def __init__(self, *, diffs:typing.List[DiffRecord], next_cursor:typing.Optional[RangeCursorRecord]): self.diffs = diffs self.next_cursor = next_cursor - - - + + + def __str__(self): return "DiffPageRecord(diffs={}, next_cursor={})".format(self.diffs, self.next_cursor) def __eq__(self, other): @@ -16863,10 +17777,10 @@ def __init__(self, *, compared_nodes:int, reused_subtrees:int, added_subtrees:in self.removed_subtrees = removed_subtrees self.collected_fallbacks = collected_fallbacks self.emitted_diffs = emitted_diffs - - - + + + def __str__(self): return "DiffTraversalStatsRecord(compared_nodes={}, reused_subtrees={}, added_subtrees={}, removed_subtrees={}, collected_fallbacks={}, emitted_diffs={})".format(self.compared_nodes, self.reused_subtrees, self.added_subtrees, self.removed_subtrees, self.collected_fallbacks, self.emitted_diffs) def __eq__(self, other): @@ -16922,10 +17836,10 @@ def __init__(self, *, live_cids:typing.List[bytes], live_nodes:int, live_bytes:i self.live_bytes = live_bytes self.leaf_nodes = leaf_nodes self.internal_nodes = internal_nodes - - - + + + def __str__(self): return "GcReachabilityRecord(live_cids={}, live_nodes={}, live_bytes={}, leaf_nodes={}, internal_nodes={})".format(self.live_cids, self.live_nodes, self.live_bytes, self.leaf_nodes, self.internal_nodes) def __eq__(self, other): @@ -16977,10 +17891,10 @@ def __init__(self, *, reachability:GcReachabilityRecord, candidate_nodes:int, re self.reclaimable_nodes = reclaimable_nodes self.reclaimable_bytes = reclaimable_bytes self.missing_candidates = missing_candidates - - - + + + def __str__(self): return "GcPlanRecord(reachability={}, candidate_nodes={}, reclaimable_cids={}, reclaimable_nodes={}, reclaimable_bytes={}, missing_candidates={})".format(self.reachability, self.candidate_nodes, self.reclaimable_cids, self.reclaimable_nodes, self.reclaimable_bytes, self.missing_candidates) def __eq__(self, other): @@ -17034,10 +17948,10 @@ def __init__(self, *, plan:GcPlanRecord, deleted_nodes:int, deleted_bytes:int): self.plan = plan self.deleted_nodes = deleted_nodes self.deleted_bytes = deleted_bytes - - - + + + def __str__(self): return "GcSweepRecord(plan={}, deleted_nodes={}, deleted_bytes={})".format(self.plan, self.deleted_nodes, self.deleted_bytes) def __eq__(self, other): @@ -17098,10 +18012,10 @@ class HostStoreBatchGetResultRecord: def __init__(self, *, values:typing.List[typing.Optional[bytes]], error:typing.Optional[str]): self.values = values self.error = error - - - + + + def __str__(self): return "HostStoreBatchGetResultRecord(values={}, error={})".format(self.values, self.error) def __eq__(self, other): @@ -17134,10 +18048,10 @@ class HostStoreBoolResultRecord: def __init__(self, *, value:bool, error:typing.Optional[str]): self.value = value self.error = error - - - + + + def __str__(self): return "HostStoreBoolResultRecord(value={}, error={})".format(self.value, self.error) def __eq__(self, other): @@ -17170,10 +18084,10 @@ class HostStoreBytesResultRecord: def __init__(self, *, value:typing.Optional[bytes], error:typing.Optional[str]): self.value = value self.error = error - - - + + + def __str__(self): return "HostStoreBytesResultRecord(value={}, error={})".format(self.value, self.error) def __eq__(self, other): @@ -17206,10 +18120,10 @@ class HostStoreListBytesResultRecord: def __init__(self, *, values:typing.List[bytes], error:typing.Optional[str]): self.values = values self.error = error - - - + + + def __str__(self): return "HostStoreListBytesResultRecord(values={}, error={})".format(self.values, self.error) def __eq__(self, other): @@ -17243,10 +18157,10 @@ def __init__(self, *, tree:TreeRecord, created_at_millis:typing.Optional[int], u self.tree = tree self.created_at_millis = created_at_millis self.updated_at_millis = updated_at_millis - - - + + + def __str__(self): return "RootManifestRecord(tree={}, created_at_millis={}, updated_at_millis={})".format(self.tree, self.created_at_millis, self.updated_at_millis) def __eq__(self, other): @@ -17284,10 +18198,10 @@ class HostStoreNamedRootManifestRecord: def __init__(self, *, name:bytes, manifest:RootManifestRecord): self.name = name self.manifest = manifest - - - + + + def __str__(self): return "HostStoreNamedRootManifestRecord(name={}, manifest={})".format(self.name, self.manifest) def __eq__(self, other): @@ -17343,10 +18257,10 @@ class HostStoreListRootsResultRecord: def __init__(self, *, values:typing.List[HostStoreNamedRootManifestRecord], error:typing.Optional[str]): self.values = values self.error = error - - - + + + def __str__(self): return "HostStoreListRootsResultRecord(values={}, error={})".format(self.values, self.error) def __eq__(self, other): @@ -17405,10 +18319,10 @@ def __init__(self, *, applied:bool, current:typing.Optional[RootManifestRecord], self.applied = applied self.current = current self.error = error - - - + + + def __str__(self): return "HostStoreRootCasResultRecord(applied={}, current={}, error={})".format(self.applied, self.current, self.error) def __eq__(self, other): @@ -17446,10 +18360,10 @@ class HostStoreRootResultRecord: def __init__(self, *, value:typing.Optional[RootManifestRecord], error:typing.Optional[str]): self.value = value self.error = error - - - + + + def __str__(self): return "HostStoreRootResultRecord(value={}, error={})".format(self.value, self.error) def __eq__(self, other): @@ -17481,10 +18395,10 @@ def write(value, buf): class HostStoreUnitResultRecord: def __init__(self, *, error:typing.Optional[str]): self.error = error - - - + + + def __str__(self): return "HostStoreUnitResultRecord(error={})".format(self.error) def __eq__(self, other): @@ -17517,10 +18431,10 @@ def __init__(self, *, source_version:bytes, index_version:bytes, state_version:b self.entries = entries self.attempts = attempts self.activated = activated - - - + + + def __str__(self): return "IndexBuildResultRecord(source_version={}, index_version={}, state_version={}, generation={}, entries={}, attempts={}, activated={})".format(self.source_version, self.index_version, self.state_version, self.generation, self.entries, self.attempts, self.activated) def __eq__(self, other): @@ -17578,10 +18492,10 @@ class IndexEntryRecord: def __init__(self, *, term:bytes, projection:typing.Optional[bytes]): self.term = term self.projection = projection - - - + + + def __str__(self): return "IndexEntryRecord(term={}, projection={})".format(self.term, self.projection) def __eq__(self, other): @@ -17615,10 +18529,10 @@ def __init__(self, *, term:bytes, primary_key:bytes, projection:typing.Optional[ self.term = term self.primary_key = primary_key self.projection = projection - - - + + + def __str__(self): return "IndexMatchRecord(term={}, primary_key={}, projection={})".format(self.term, self.primary_key, self.projection) def __eq__(self, other): @@ -17679,10 +18593,10 @@ class IndexPageRecord: def __init__(self, *, matches:typing.List[IndexMatchRecord], next_cursor:typing.Optional[bytes]): self.matches = matches self.next_cursor = next_cursor - - - + + + def __str__(self): return "IndexPageRecord(matches={}, next_cursor={})".format(self.matches, self.next_cursor) def __eq__(self, other): @@ -17722,10 +18636,10 @@ def __init__(self, *, name:bytes, source_version:bytes, expected_index_version:b self.semantic_differences = semantic_differences self.valid = valid self.canonical = canonical - - - + + + def __str__(self): return "IndexVerificationRecord(name={}, source_version={}, expected_index_version={}, actual_index_version={}, expected_entries={}, actual_entries={}, semantic_differences={}, valid={}, canonical={})".format(self.name, self.source_version, self.expected_index_version, self.actual_index_version, self.expected_entries, self.actual_entries, self.semantic_differences, self.valid, self.canonical) def __eq__(self, other): @@ -17821,10 +18735,10 @@ def __init__(self, *, source_map_id:bytes, source_version:typing.Optional[bytes] self.closure_valid = closure_valid self.retained_snapshots = retained_snapshots self.durable_pins = durable_pins - - - + + + def __str__(self): return "IndexedMapHealthRecord(source_map_id={}, source_version={}, state_version={}, active_indexes={}, closure_valid={}, retained_snapshots={}, durable_pins={})".format(self.source_map_id, self.source_version, self.state_version, self.active_indexes, self.closure_valid, self.retained_snapshots, self.durable_pins) def __eq__(self, other): @@ -17891,10 +18805,10 @@ def __init__(self, *, normalized_source_mutations:int, records_extracted:int, te self.build_attempts = build_attempts self.verification_outcomes = verification_outcomes self.retained_roots = retained_roots - - - + + + def __str__(self): return "IndexedMapMetricsRecord(normalized_source_mutations={}, records_extracted={}, terms_emitted={}, projected_bytes={}, physical_upserts={}, physical_deletes={}, unchanged_emissions_skipped={}, retries={}, build_attempts={}, verification_outcomes={}, retained_roots={})".format(self.normalized_source_mutations, self.records_extracted, self.terms_emitted, self.projected_bytes, self.physical_upserts, self.physical_deletes, self.unchanged_emissions_skipped, self.retries, self.build_attempts, self.verification_outcomes, self.retained_roots) def __eq__(self, other): @@ -17977,10 +18891,10 @@ def __init__(self, *, retained_source_versions:typing.List[bytes], removed_sourc self.removed_state_versions = removed_state_versions self.removed_snapshot_records = removed_snapshot_records self.removed_named_roots = removed_named_roots - - - + + + def __str__(self): return "IndexedRetentionRecord(retained_source_versions={}, removed_source_versions={}, retained_index_versions={}, removed_index_versions={}, removed_state_versions={}, removed_snapshot_records={}, removed_named_roots={})".format(self.retained_source_versions, self.removed_source_versions, self.retained_index_versions, self.removed_index_versions, self.removed_state_versions, self.removed_snapshot_records, self.removed_named_roots) def __eq__(self, other): @@ -18037,10 +18951,10 @@ def write(value, buf): class IndexedSnapshotIdRecord: def __init__(self, *, snapshot:bytes): self.snapshot = snapshot - - - + + + def __str__(self): return "IndexedSnapshotIdRecord(snapshot={})".format(self.snapshot) def __eq__(self, other): @@ -18070,10 +18984,10 @@ def __init__(self, *, term:bytes, primary_key:bytes, projection:typing.Optional[ self.primary_key = primary_key self.projection = projection self.source_value = source_value - - - + + + def __str__(self): return "IndexedSourceRecord(term={}, primary_key={}, projection={}, source_value={})".format(self.term, self.primary_key, self.projection, self.source_value) def __eq__(self, other): @@ -18117,13 +19031,13 @@ def write(value, buf): class IndexedUpdateKind(enum.Enum): - + APPLIED = 0 - + UNCHANGED = 1 - + CONFLICT = 2 - + class _UniffiFfiConverterTypeIndexedUpdateKind(_UniffiConverterRustBuffer): @@ -18165,10 +19079,10 @@ def __init__(self, *, source_version:bytes, state_version:bytes, index_count:int self.source_version = source_version self.state_version = state_version self.index_count = index_count - - - + + + def __str__(self): return "IndexedVersionRecord(source_version={}, state_version={}, index_count={})".format(self.source_version, self.state_version, self.index_count) def __eq__(self, other): @@ -18232,10 +19146,10 @@ def __init__(self, *, kind:IndexedUpdateKind, previous_source_version:typing.Opt self.kind = kind self.previous_source_version = previous_source_version self.current = current - - - + + + def __str__(self): return "IndexedUpdateRecord(kind={}, previous_source_version={}, current={})".format(self.kind, self.previous_source_version, self.current) def __eq__(self, other): @@ -18272,10 +19186,10 @@ def write(value, buf): class JsonDocumentRecord: def __init__(self, *, json:str): self.json = json - - - + + + def __str__(self): return "JsonDocumentRecord(json={})".format(self.json) def __eq__(self, other): @@ -18307,10 +19221,10 @@ def __init__(self, *, valid:bool, exists:bool, absence:bool, root:typing.Optiona self.root = root self.key = key self.value = value - - - + + + def __str__(self): return "KeyProofVerificationRecord(valid={}, exists={}, absence={}, root={}, key={}, value={})".format(self.valid, self.exists, self.absence, self.root, self.key, self.value) def __eq__(self, other): @@ -18362,10 +19276,10 @@ def write(value, buf): class LargeValueConfigRecord: def __init__(self, *, inline_threshold:int): self.inline_threshold = inline_threshold - - - + + + def __str__(self): return "LargeValueConfigRecord(inline_threshold={})".format(self.inline_threshold) def __eq__(self, other): @@ -18395,10 +19309,10 @@ def __init__(self, *, head:bytes, version_count:int, reachable_nodes:int, reacha self.version_count = version_count self.reachable_nodes = reachable_nodes self.reachable_bytes = reachable_bytes - - - + + + def __str__(self): return "MapCatalogVerificationRecord(head={}, version_count={}, reachable_nodes={}, reachable_bytes={})".format(self.head, self.version_count, self.reachable_nodes, self.reachable_bytes) def __eq__(self, other): @@ -18446,10 +19360,10 @@ def __init__(self, *, id:bytes, tree:TreeRecord, created_at_millis:typing.Option self.tree = tree self.created_at_millis = created_at_millis self.is_head = is_head - - - + + + def __str__(self): return "MapVersionRecord(id={}, tree={}, created_at_millis={}, is_head={})".format(self.id, self.tree, self.created_at_millis, self.is_head) def __eq__(self, other): @@ -18493,10 +19407,10 @@ def __init__(self, *, previous:typing.Optional[bytes], current:MapVersionRecord, self.previous = previous self.current = current self.diffs = diffs - - - + + + def __str__(self): return "MapChangeEventRecord(previous={}, current={}, diffs={})".format(self.previous, self.current, self.diffs) def __eq__(self, other): @@ -18535,13 +19449,13 @@ def write(value, buf): class MapUpdateKind(enum.Enum): - + APPLIED = 0 - + UNCHANGED = 1 - + CONFLICT = 2 - + class _UniffiFfiConverterTypeMapUpdateKind(_UniffiConverterRustBuffer): @@ -18608,10 +19522,10 @@ def __init__(self, *, kind:MapUpdateKind, previous:typing.Optional[bytes], curre self.kind = kind self.previous = previous self.current = current - - - + + + def __str__(self): return "MapUpdateRecord(kind={}, previous={}, current={})".format(self.kind, self.previous, self.current) def __eq__(self, other): @@ -18675,23 +19589,23 @@ def read(cls, buf): class MergeTraceEventKind(enum.Enum): - + FAST_PATH = 0 - + STRUCTURAL_MERGE_STARTED = 1 - + REUSED_SUBTREE = 2 - + REWRITTEN_NODE = 3 - + RESOLVER_CALLED = 4 - + FALLBACK = 5 - + DIFF_TRAVERSAL = 6 - + BATCH_MERGE = 7 - + class _UniffiFfiConverterTypeMergeTraceEventKind(_UniffiConverterRustBuffer): @@ -18763,13 +19677,13 @@ def write(value, buf): class MergeFastPathKind(enum.Enum): - + BRANCHES_EQUAL = 0 - + LEFT_UNCHANGED = 1 - + RIGHT_UNCHANGED = 2 - + class _UniffiFfiConverterTypeMergeFastPathKind(_UniffiConverterRustBuffer): @@ -18836,19 +19750,19 @@ def read(cls, buf): class MergeReuseReasonKind(enum.Enum): - + BRANCHES_EQUAL = 0 - + LEFT_UNCHANGED = 1 - + RIGHT_UNCHANGED = 2 - + UNCHANGED_AFTER_MERGE = 3 - + MATCHES_LEFT = 4 - + MATCHES_RIGHT = 5 - + class _UniffiFfiConverterTypeMergeReuseReasonKind(_UniffiConverterRustBuffer): @@ -18933,11 +19847,11 @@ def read(cls, buf): class MergeTraceStageKind(enum.Enum): - + STRUCTURAL = 0 - + BATCH = 1 - + class _UniffiFfiConverterTypeMergeTraceStageKind(_UniffiConverterRustBuffer): @@ -18998,13 +19912,13 @@ def read(cls, buf): class MergeTraceResolutionKind(enum.Enum): - + VALUE = 0 - + DELETE = 1 - + UNRESOLVED = 2 - + class _UniffiFfiConverterTypeMergeTraceResolutionKind(_UniffiConverterRustBuffer): @@ -19071,19 +19985,19 @@ def read(cls, buf): class MergeFallbackReasonKind(enum.Enum): - + MISSING_ROOT = 0 - + SHAPE_MISMATCH = 1 - + NODE_LENGTH_MISMATCH = 2 - + CHILD_FALLBACK = 3 - + DELETE_RESOLUTION = 4 - + DIFF_BATCH = 5 - + class _UniffiFfiConverterTypeMergeFallbackReasonKind(_UniffiConverterRustBuffer): @@ -19231,10 +20145,10 @@ def __init__(self, *, kind:MergeTraceEventKind, fast_path:typing.Optional[MergeF self.right_changes = right_changes self.mutations = mutations self.append_only = append_only - - - + + + def __str__(self): return "MergeTraceEventRecord(kind={}, fast_path={}, cid={}, reuse_reason={}, level={}, entries={}, first_key={}, last_key={}, stage={}, key={}, resolution={}, fallback_reason={}, diff_stats={}, right_changes={}, mutations={}, append_only={})".format(self.kind, self.fast_path, self.cid, self.reuse_reason, self.level, self.entries, self.first_key, self.last_key, self.stage, self.key, self.resolution, self.fallback_reason, self.diff_stats, self.right_changes, self.mutations, self.append_only) def __eq__(self, other): @@ -19359,10 +20273,10 @@ def read(cls, buf): class MergeTraceRecord: def __init__(self, *, events:typing.List[MergeTraceEventRecord]): self.events = events - - - + + + def __str__(self): return "MergeTraceRecord(events={})".format(self.events) def __eq__(self, other): @@ -19392,10 +20306,10 @@ def __init__(self, *, result:typing.Optional[TreeRecord], error:typing.Optional[ self.error = error self.trace_json = trace_json self.trace = trace - - - + + + def __str__(self): return "MergeExplanationRecord(result={}, error={}, trace_json={}, trace={})".format(self.result, self.error, self.trace_json, self.trace) def __eq__(self, other): @@ -19449,10 +20363,10 @@ def __init__(self, *, node_cache_hits:int, node_cache_misses:int, node_cache_evi self.store_put_calls = store_put_calls self.store_batch_put_calls = store_batch_put_calls self.store_batch_put_nodes = store_batch_put_nodes - - - + + + def __str__(self): return "MetricsRecord(node_cache_hits={}, node_cache_misses={}, node_cache_evictions={}, nodes_read={}, bytes_read={}, nodes_written={}, bytes_written={}, store_get_calls={}, store_batch_get_calls={}, store_batch_get_keys={}, store_put_calls={}, store_batch_put_calls={}, store_batch_put_nodes={})".format(self.node_cache_hits, self.node_cache_misses, self.node_cache_evictions, self.nodes_read, self.bytes_read, self.nodes_written, self.bytes_written, self.store_get_calls, self.store_batch_get_calls, self.store_batch_get_keys, self.store_put_calls, self.store_batch_put_calls, self.store_batch_put_nodes) def __eq__(self, other): @@ -19544,10 +20458,10 @@ def __init__(self, *, required_cids:typing.List[bytes], required_nodes:int, requ self.missing_cids = missing_cids self.missing_nodes = missing_nodes self.missing_bytes = missing_bytes - - - + + + def __str__(self): return "MissingNodePlanRecord(required_cids={}, required_nodes={}, required_bytes={}, missing_cids={}, missing_nodes={}, missing_bytes={})".format(self.required_cids, self.required_nodes, self.required_bytes, self.missing_cids, self.missing_nodes, self.missing_bytes) def __eq__(self, other): @@ -19601,10 +20515,10 @@ def __init__(self, *, plan:MissingNodePlanRecord, copied_nodes:int, copied_bytes self.plan = plan self.copied_nodes = copied_nodes self.copied_bytes = copied_bytes - - - + + + def __str__(self): return "MissingNodeCopyRecord(plan={}, copied_nodes={}, copied_bytes={})".format(self.plan, self.copied_nodes, self.copied_bytes) def __eq__(self, other): @@ -19643,10 +20557,10 @@ def __init__(self, *, root:typing.Optional[bytes], keys:typing.List[bytes], path self.root = root self.keys = keys self.path = path - - - + + + def __str__(self): return "MultiKeyProofRecord(root={}, keys={}, path={})".format(self.root, self.keys, self.path) def __eq__(self, other): @@ -19708,10 +20622,10 @@ def __init__(self, *, valid:bool, root:typing.Optional[bytes], results:typing.Li self.valid = valid self.root = root self.results = results - - - + + + def __str__(self): return "MultiKeyProofVerificationRecord(valid={}, root={}, results={})".format(self.valid, self.root, self.results) def __eq__(self, other): @@ -19750,11 +20664,11 @@ def write(value, buf): class MutationKind(enum.Enum): - + UPSERT = 0 - + DELETE = 1 - + class _UniffiFfiConverterTypeMutationKind(_UniffiConverterRustBuffer): @@ -19790,10 +20704,10 @@ def __init__(self, *, kind:MutationKind, key:bytes, value:typing.Optional[bytes] self.kind = kind self.key = key self.value = value - - - + + + def __str__(self): return "MutationRecord(kind={}, key={}, value={})".format(self.kind, self.key, self.value) def __eq__(self, other): @@ -19831,10 +20745,10 @@ class NamedBytesRecord: def __init__(self, *, name:bytes, value:bytes): self.name = name self.value = value - - - + + + def __str__(self): return "NamedBytesRecord(name={}, value={})".format(self.name, self.value) def __eq__(self, other): @@ -19890,10 +20804,10 @@ class NamedBytesListResultRecord: def __init__(self, *, values:typing.List[NamedBytesRecord], error:typing.Optional[StoreErrorRecord]): self.values = values self.error = error - - - + + + def __str__(self): return "NamedBytesListResultRecord(values={}, error={})".format(self.values, self.error) def __eq__(self, other): @@ -19926,10 +20840,10 @@ class NamedRootManifestRecord: def __init__(self, *, name:bytes, manifest:RootManifestRecord): self.name = name self.manifest = manifest - - - + + + def __str__(self): return "NamedRootManifestRecord(name={}, manifest={})".format(self.name, self.manifest) def __eq__(self, other): @@ -19962,10 +20876,10 @@ class NamedRootRecord: def __init__(self, *, name:bytes, tree:TreeRecord): self.name = name self.tree = tree - - - + + + def __str__(self): return "NamedRootRecord(name={}, tree={})".format(self.name, self.tree) def __eq__(self, other): @@ -19999,17 +20913,17 @@ def write(value, buf): class NamedRootRetentionKind(enum.Enum): - + ALL = 0 - + EXACT = 1 - + PREFIX = 2 - + NEWEST_BY_NAME = 3 - + UPDATED_SINCE = 4 - + class _UniffiFfiConverterTypeNamedRootRetentionKind(_UniffiConverterRustBuffer): @@ -20065,10 +20979,10 @@ def __init__(self, *, kind:NamedRootRetentionKind, names:typing.List[bytes], pre self.prefix = prefix self.count = count self.min_updated_at_millis = min_updated_at_millis - - - + + + def __str__(self): return "NamedRootRetentionRecord(kind={}, names={}, prefix={}, count={}, min_updated_at_millis={})".format(self.kind, self.names, self.prefix, self.count, self.min_updated_at_millis) def __eq__(self, other): @@ -20139,10 +21053,10 @@ class NamedRootSelectionRecord: def __init__(self, *, roots:typing.List[NamedRootRecord], missing_names:typing.List[bytes]): self.roots = roots self.missing_names = missing_names - - - + + + def __str__(self): return "NamedRootSelectionRecord(roots={}, missing_names={})".format(self.roots, self.missing_names) def __eq__(self, other): @@ -20176,10 +21090,10 @@ def __init__(self, *, applied:bool, conflict:bool, current:typing.Optional[TreeR self.applied = applied self.conflict = conflict self.current = current - - - + + + def __str__(self): return "NamedRootUpdateRecord(applied={}, conflict={}, current={})".format(self.applied, self.conflict, self.current) def __eq__(self, other): @@ -20217,10 +21131,10 @@ class NodeEntryRecord: def __init__(self, *, key:bytes, value:bytes): self.key = key self.value = value - - - + + + def __str__(self): return "NodeEntryRecord(key={}, value={})".format(self.key, self.value) def __eq__(self, other): @@ -20253,10 +21167,10 @@ class OptionalBytesRecord: def __init__(self, *, present:bool, value:bytes): self.present = present self.value = value - - - + + + def __str__(self): return "OptionalBytesRecord(present={}, value={})".format(self.present, self.value) def __eq__(self, other): @@ -20289,10 +21203,10 @@ class NodeMutationRecord: def __init__(self, *, key:bytes, value:OptionalBytesRecord): self.key = key self.value = value - - - + + + def __str__(self): return "NodeMutationRecord(key={}, value={})".format(self.key, self.value) def __eq__(self, other): @@ -20510,10 +21424,10 @@ class OptionalBytesListResultRecord: def __init__(self, *, values:typing.List[OptionalBytesRecord], error:typing.Optional[StoreErrorRecord]): self.values = values self.error = error - - - + + + def __str__(self): return "OptionalBytesListResultRecord(values={}, error={})".format(self.values, self.error) def __eq__(self, other): @@ -20546,10 +21460,10 @@ class OptionalBytesResultRecord: def __init__(self, *, value:OptionalBytesRecord, error:typing.Optional[StoreErrorRecord]): self.value = value self.error = error - - - + + + def __str__(self): return "OptionalBytesResultRecord(value={}, error={})".format(self.value, self.error) def __eq__(self, other): @@ -20582,10 +21496,10 @@ class ParallelConfigRecord: def __init__(self, *, max_threads:int, parallelism_threshold:int): self.max_threads = max_threads self.parallelism_threshold = parallelism_threshold - - - + + + def __str__(self): return "ParallelConfigRecord(max_threads={}, parallelism_threshold={})".format(self.max_threads, self.parallelism_threshold) def __eq__(self, other): @@ -20618,10 +21532,10 @@ class ProvedDiffPageRecord: def __init__(self, *, page:DiffPageRecord, proof:DiffPageProofRecord): self.page = page self.proof = proof - - - + + + def __str__(self): return "ProvedDiffPageRecord(page={}, proof={})".format(self.page, self.proof) def __eq__(self, other): @@ -20654,10 +21568,10 @@ class RangePageRecord: def __init__(self, *, entries:typing.List[EntryRecord], next_cursor:typing.Optional[RangeCursorRecord]): self.entries = entries self.next_cursor = next_cursor - - - + + + def __str__(self): return "RangePageRecord(entries={}, next_cursor={})".format(self.entries, self.next_cursor) def __eq__(self, other): @@ -20690,10 +21604,10 @@ class ProvedRangePageRecord: def __init__(self, *, page:RangePageRecord, proof:RangePageProofRecord): self.page = page self.proof = proof - - - + + + def __str__(self): return "ProvedRangePageRecord(page={}, proof={})".format(self.page, self.proof) def __eq__(self, other): @@ -20727,10 +21641,10 @@ def __init__(self, *, descriptor:bytes, key:bytes, record:typing.Optional[ExactP self.descriptor = descriptor self.key = key self.record = record - - - + + + def __str__(self): return "ProximityMembershipVerificationRecord(descriptor={}, key={}, record={})".format(self.descriptor, self.key, self.record) def __eq__(self, other): @@ -20769,10 +21683,10 @@ def __init__(self, *, descriptor:bytes, object_count:int, summary:ProximityVerif self.descriptor = descriptor self.object_count = object_count self.summary = summary - - - + + + def __str__(self): return "ProximityStructuralVerificationRecord(descriptor={}, object_count={}, summary={})".format(self.descriptor, self.object_count, self.summary) def __eq__(self, other): @@ -20810,10 +21724,10 @@ class RangeBoundsRecord: def __init__(self, *, start:bytes, end:typing.Optional[bytes]): self.start = start self.end = end - - - + + + def __str__(self): return "RangeBoundsRecord(start={}, end={})".format(self.start, self.end) def __eq__(self, other): @@ -20849,10 +21763,10 @@ def __init__(self, *, valid:bool, root:typing.Optional[bytes], after:typing.Opti self.after = after self.end = end self.entries = entries - - - + + + def __str__(self): return "RangePageProofVerificationRecord(valid={}, root={}, after={}, end={}, entries={})".format(self.valid, self.root, self.after, self.end, self.entries) def __eq__(self, other): @@ -20902,10 +21816,10 @@ def __init__(self, *, root:typing.Optional[bytes], start:bytes, end:typing.Optio self.start = start self.end = end self.path = path - - - + + + def __str__(self): return "RangeProofRecord(root={}, start={}, end={}, path={})".format(self.root, self.start, self.end, self.path) def __eq__(self, other): @@ -20951,10 +21865,10 @@ def __init__(self, *, valid:bool, root:typing.Optional[bytes], start:bytes, end: self.start = start self.end = end self.entries = entries - - - + + + def __str__(self): return "RangeProofVerificationRecord(valid={}, root={}, start={}, end={}, entries={})".format(self.valid, self.root, self.start, self.end, self.entries) def __eq__(self, other): @@ -21003,13 +21917,13 @@ def write(value, buf): class ResolutionKind(enum.Enum): - + VALUE = 0 - + DELETE = 1 - + UNRESOLVED = 2 - + class _UniffiFfiConverterTypeResolutionKind(_UniffiConverterRustBuffer): @@ -21050,10 +21964,10 @@ class ResolutionRecord: def __init__(self, *, kind:ResolutionKind, value:typing.Optional[bytes]): self.kind = kind self.value = value - - - + + + def __str__(self): return "ResolutionRecord(kind={}, value={})".format(self.kind, self.value) def __eq__(self, other): @@ -21085,10 +21999,10 @@ def write(value, buf): class ReverseCursorRecord: def __init__(self, *, before_key:typing.Optional[bytes]): self.before_key = before_key - - - + + + def __str__(self): return "ReverseCursorRecord(before_key={})".format(self.before_key) def __eq__(self, other): @@ -21141,10 +22055,10 @@ class ReversePageRecord: def __init__(self, *, entries:typing.List[EntryRecord], next_cursor:typing.Optional[ReverseCursorRecord]): self.entries = entries self.next_cursor = next_cursor - - - + + + def __str__(self): return "ReversePageRecord(entries={}, next_cursor={})".format(self.entries, self.next_cursor) def __eq__(self, other): @@ -21178,10 +22092,10 @@ def __init__(self, *, applied:bool, current:OptionalBytesRecord, error:typing.Op self.applied = applied self.current = current self.error = error - - - + + + def __str__(self): return "RootCasResultRecord(applied={}, current={}, error={})".format(self.applied, self.current, self.error) def __eq__(self, other): @@ -21219,10 +22133,10 @@ class RootConditionRecord: def __init__(self, *, name:bytes, expected:OptionalBytesRecord): self.name = name self.expected = expected - - - + + + def __str__(self): return "RootConditionRecord(name={}, expected={})".format(self.name, self.expected) def __eq__(self, other): @@ -21255,10 +22169,10 @@ class RootWriteRecord: def __init__(self, *, name:bytes, replacement:OptionalBytesRecord): self.name = name self.replacement = replacement - - - + + + def __str__(self): return "RootWriteRecord(name={}, replacement={})".format(self.name, self.replacement) def __eq__(self, other): @@ -21298,10 +22212,10 @@ class ScanOutcomeRecord: def __init__(self, *, visited:int, stopped:bool): self.visited = visited self.stopped = stopped - - - + + + def __str__(self): return "ScanOutcomeRecord(visited={}, stopped={})".format(self.visited, self.stopped) def __eq__(self, other): @@ -21347,10 +22261,10 @@ def __init__(self, *, max_term_bytes:int, max_projection_bytes:int, max_all_valu self.max_verification_entries = max_verification_entries self.max_write_retries = max_write_retries self.max_build_retries = max_build_retries - - - + + + def __str__(self): return "SecondaryIndexLimitsRecord(max_term_bytes={}, max_projection_bytes={}, max_all_value_bytes={}, max_terms_per_record={}, max_projected_bytes_per_record={}, max_derived_mutations_per_write={}, max_projected_bytes_per_write={}, max_indexes={}, build_page_size={}, max_temporary_sort_bytes={}, max_bundle_nodes={}, max_bundle_bytes={}, max_verification_entries={}, max_write_retries={}, max_build_retries={})".format(self.max_term_bytes, self.max_projection_bytes, self.max_all_value_bytes, self.max_terms_per_record, self.max_projected_bytes_per_record, self.max_derived_mutations_per_write, self.max_projected_bytes_per_write, self.max_indexes, self.build_page_size, self.max_temporary_sort_bytes, self.max_bundle_nodes, self.max_bundle_bytes, self.max_verification_entries, self.max_write_retries, self.max_build_retries) def __eq__(self, other): @@ -21448,10 +22362,10 @@ class SnapshotBundleNodeRecord: def __init__(self, *, cid:bytes, bytes:bytes): self.cid = cid self.bytes = bytes - - - + + + def __str__(self): return "SnapshotBundleNodeRecord(cid={}, bytes={})".format(self.cid, self.bytes) def __eq__(self, other): @@ -21508,10 +22422,10 @@ def __init__(self, *, format_version:int, tree:TreeRecord, nodes:typing.List[Sna self.format_version = format_version self.tree = tree self.nodes = nodes - - - + + + def __str__(self): return "SnapshotBundleRecord(format_version={}, tree={}, nodes={})".format(self.format_version, self.tree, self.nodes) def __eq__(self, other): @@ -21553,10 +22467,10 @@ def __init__(self, *, format_version:int, root:typing.Optional[bytes], node_coun self.byte_count = byte_count self.min_node_bytes = min_node_bytes self.max_node_bytes = max_node_bytes - - - + + + def __str__(self): return "SnapshotBundleSummaryRecord(format_version={}, root={}, node_count={}, byte_count={}, min_node_bytes={}, max_node_bytes={})".format(self.format_version, self.root, self.node_count, self.byte_count, self.min_node_bytes, self.max_node_bytes) def __eq__(self, other): @@ -21613,10 +22527,10 @@ def __init__(self, *, valid:bool, summary:SnapshotBundleSummaryRecord, reachable self.reachable_bytes = reachable_bytes self.missing_cids = missing_cids self.extra_cids = extra_cids - - - + + + def __str__(self): return "SnapshotBundleVerificationRecord(valid={}, summary={}, reachable_nodes={}, reachable_bytes={}, missing_cids={}, extra_cids={})".format(self.valid, self.summary, self.reachable_nodes, self.reachable_bytes, self.missing_cids, self.extra_cids) def __eq__(self, other): @@ -21670,15 +22584,15 @@ def write(value, buf): class SnapshotNamespaceKind(enum.Enum): - + BRANCH = 0 - + TAG = 1 - + CHECKPOINT = 2 - + CUSTOM = 3 - + class _UniffiFfiConverterTypeSnapshotNamespaceKind(_UniffiConverterRustBuffer): @@ -21725,10 +22639,10 @@ class SnapshotNamespaceRecord: def __init__(self, *, kind:SnapshotNamespaceKind, custom_prefix:typing.Optional[bytes]): self.kind = kind self.custom_prefix = custom_prefix - - - + + + def __str__(self): return "SnapshotNamespaceRecord(kind={}, custom_prefix={})".format(self.kind, self.custom_prefix) def __eq__(self, other): @@ -21764,10 +22678,10 @@ def __init__(self, *, id:bytes, name:bytes, tree:TreeRecord, created_at_millis:t self.tree = tree self.created_at_millis = created_at_millis self.updated_at_millis = updated_at_millis - - - + + + def __str__(self): return "SnapshotRecord(id={}, name={}, tree={}, created_at_millis={}, updated_at_millis={})".format(self.id, self.name, self.tree, self.created_at_millis, self.updated_at_millis) def __eq__(self, other): @@ -21838,10 +22752,10 @@ class SnapshotSelectionRecord: def __init__(self, *, snapshots:typing.List[SnapshotRecord], missing_ids:typing.List[bytes]): self.snapshots = snapshots self.missing_ids = missing_ids - - - + + + def __str__(self): return "SnapshotSelectionRecord(snapshots={}, missing_ids={})".format(self.snapshots, self.missing_ids) def __eq__(self, other): @@ -21874,10 +22788,10 @@ class TreeStatsLevelU64Record: def __init__(self, *, level:int, value:int): self.level = level self.value = value - - - + + + def __str__(self): return "TreeStatsLevelU64Record(level={}, value={})".format(self.level, self.value) def __eq__(self, other): @@ -21933,10 +22847,10 @@ class TreeStatsLevelF64Record: def __init__(self, *, level:int, value:float): self.level = level self.value = value - - - + + + def __str__(self): return "TreeStatsLevelF64Record(level={}, value={})".format(self.level, self.value) def __eq__(self, other): @@ -22019,10 +22933,10 @@ def __init__(self, *, num_nodes:int, num_leaves:int, num_internal_nodes:int, tre self.max_value_size_bytes = max_value_size_bytes self.total_keys_size_bytes = total_keys_size_bytes self.total_values_size_bytes = total_values_size_bytes - - - + + + def __str__(self): return "TreeStatsRecord(num_nodes={}, num_leaves={}, num_internal_nodes={}, tree_height={}, total_key_value_pairs={}, total_tree_size_bytes={}, avg_node_size_bytes={}, min_node_size_bytes={}, max_node_size_bytes={}, avg_entries_per_node={}, nodes_per_level={}, avg_node_size_per_level={}, avg_entries_per_level={}, min_entries_per_level={}, max_entries_per_level={}, avg_fanout={}, min_fanout={}, max_fanout={}, avg_fill_factor={}, avg_leaf_fill_factor={}, avg_internal_fill_factor={}, avg_key_size_bytes={}, avg_value_size_bytes={}, min_key_size_bytes={}, max_key_size_bytes={}, min_value_size_bytes={}, max_value_size_bytes={}, total_keys_size_bytes={}, total_values_size_bytes={})".format(self.num_nodes, self.num_leaves, self.num_internal_nodes, self.tree_height, self.total_key_value_pairs, self.total_tree_size_bytes, self.avg_node_size_bytes, self.min_node_size_bytes, self.max_node_size_bytes, self.avg_entries_per_node, self.nodes_per_level, self.avg_node_size_per_level, self.avg_entries_per_level, self.min_entries_per_level, self.max_entries_per_level, self.avg_fanout, self.min_fanout, self.max_fanout, self.avg_fill_factor, self.avg_leaf_fill_factor, self.avg_internal_fill_factor, self.avg_key_size_bytes, self.avg_value_size_bytes, self.min_key_size_bytes, self.max_key_size_bytes, self.min_value_size_bytes, self.max_value_size_bytes, self.total_keys_size_bytes, self.total_values_size_bytes) def __eq__(self, other): @@ -22238,10 +23152,10 @@ def __init__(self, *, num_nodes_diff:int, num_leaves_diff:int, num_internal_node self.max_value_size_bytes_diff = max_value_size_bytes_diff self.total_keys_size_bytes_diff = total_keys_size_bytes_diff self.total_values_size_bytes_diff = total_values_size_bytes_diff - - - + + + def __str__(self): return "StatsDiffRecord(num_nodes_diff={}, num_leaves_diff={}, num_internal_nodes_diff={}, tree_height_diff={}, total_key_value_pairs_diff={}, total_tree_size_bytes_diff={}, avg_node_size_bytes_diff={}, min_node_size_bytes_diff={}, max_node_size_bytes_diff={}, avg_entries_per_node_diff={}, avg_fanout_diff={}, min_fanout_diff={}, max_fanout_diff={}, avg_fill_factor_diff={}, avg_leaf_fill_factor_diff={}, avg_internal_fill_factor_diff={}, avg_key_size_bytes_diff={}, avg_value_size_bytes_diff={}, min_key_size_bytes_diff={}, max_key_size_bytes_diff={}, min_value_size_bytes_diff={}, max_value_size_bytes_diff={}, total_keys_size_bytes_diff={}, total_values_size_bytes_diff={})".format(self.num_nodes_diff, self.num_leaves_diff, self.num_internal_nodes_diff, self.tree_height_diff, self.total_key_value_pairs_diff, self.total_tree_size_bytes_diff, self.avg_node_size_bytes_diff, self.min_node_size_bytes_diff, self.max_node_size_bytes_diff, self.avg_entries_per_node_diff, self.avg_fanout_diff, self.min_fanout_diff, self.max_fanout_diff, self.avg_fill_factor_diff, self.avg_leaf_fill_factor_diff, self.avg_internal_fill_factor_diff, self.avg_key_size_bytes_diff, self.avg_value_size_bytes_diff, self.min_key_size_bytes_diff, self.max_key_size_bytes_diff, self.min_value_size_bytes_diff, self.max_value_size_bytes_diff, self.total_keys_size_bytes_diff, self.total_values_size_bytes_diff) def __eq__(self, other): @@ -22406,10 +23320,10 @@ def __init__(self, *, num_nodes_pct:float, num_leaves_pct:float, num_internal_no self.max_value_size_bytes_pct = max_value_size_bytes_pct self.total_keys_size_bytes_pct = total_keys_size_bytes_pct self.total_values_size_bytes_pct = total_values_size_bytes_pct - - - + + + def __str__(self): return "StatsPercentageChangeRecord(num_nodes_pct={}, num_leaves_pct={}, num_internal_nodes_pct={}, tree_height_pct={}, total_key_value_pairs_pct={}, total_tree_size_bytes_pct={}, avg_node_size_bytes_pct={}, min_node_size_bytes_pct={}, max_node_size_bytes_pct={}, avg_entries_per_node_pct={}, avg_fanout_pct={}, min_fanout_pct={}, max_fanout_pct={}, avg_fill_factor_pct={}, avg_leaf_fill_factor_pct={}, avg_internal_fill_factor_pct={}, avg_key_size_bytes_pct={}, avg_value_size_bytes_pct={}, min_key_size_bytes_pct={}, max_key_size_bytes_pct={}, min_value_size_bytes_pct={}, max_value_size_bytes_pct={}, total_keys_size_bytes_pct={}, total_values_size_bytes_pct={})".format(self.num_nodes_pct, self.num_leaves_pct, self.num_internal_nodes_pct, self.tree_height_pct, self.total_key_value_pairs_pct, self.total_tree_size_bytes_pct, self.avg_node_size_bytes_pct, self.min_node_size_bytes_pct, self.max_node_size_bytes_pct, self.avg_entries_per_node_pct, self.avg_fanout_pct, self.min_fanout_pct, self.max_fanout_pct, self.avg_fill_factor_pct, self.avg_leaf_fill_factor_pct, self.avg_internal_fill_factor_pct, self.avg_key_size_bytes_pct, self.avg_value_size_bytes_pct, self.min_key_size_bytes_pct, self.max_key_size_bytes_pct, self.min_value_size_bytes_pct, self.max_value_size_bytes_pct, self.total_keys_size_bytes_pct, self.total_values_size_bytes_pct) def __eq__(self, other): @@ -22554,10 +23468,10 @@ def __init__(self, *, before:TreeStatsRecord, after:TreeStatsRecord, absolute:St self.after = after self.absolute = absolute self.percentage = percentage - - - + + + def __str__(self): return "StatsComparisonRecord(before={}, after={}, absolute={}, percentage={})".format(self.before, self.after, self.absolute, self.percentage) def __eq__(self, other): @@ -22607,10 +23521,10 @@ def __init__(self, *, native_batch_reads:bool, atomic_batch_writes:bool, node_sc self.root_compare_and_swap = root_compare_and_swap self.transactions = transactions self.read_parallelism = read_parallelism - - - + + + def __str__(self): return "StoreCapabilitiesRecord(native_batch_reads={}, atomic_batch_writes={}, node_scan={}, hints={}, atomic_nodes_and_hint={}, root_scan={}, root_compare_and_swap={}, transactions={}, read_parallelism={})".format(self.native_batch_reads, self.atomic_batch_writes, self.node_scan, self.hints, self.atomic_nodes_and_hint, self.root_scan, self.root_compare_and_swap, self.transactions, self.read_parallelism) def __eq__(self, other): @@ -22680,10 +23594,10 @@ def __init__(self, *, max_batch_read_items:typing.Optional[int], max_batch_write self.max_batch_write_items = max_batch_write_items self.max_transaction_operations = max_transaction_operations self.max_node_bytes = max_node_bytes - - - + + + def __str__(self): return "StoreLimitsRecord(max_batch_read_items={}, max_batch_write_items={}, max_transaction_operations={}, max_node_bytes={})".format(self.max_batch_read_items, self.max_batch_write_items, self.max_transaction_operations, self.max_node_bytes) def __eq__(self, other): @@ -22730,10 +23644,10 @@ def __init__(self, *, protocol_major:int, adapter_name:str, provider:str, schema self.schema_version = schema_version self.capabilities = capabilities self.limits = limits - - - + + + def __str__(self): return "StoreDescriptorRecord(protocol_major={}, adapter_name={}, provider={}, schema_version={}, capabilities={}, limits={})".format(self.protocol_major, self.adapter_name, self.provider, self.schema_version, self.capabilities, self.limits) def __eq__(self, other): @@ -22811,10 +23725,10 @@ class StoreDescriptorResultRecord: def __init__(self, *, value:typing.Optional[StoreDescriptorRecord], error:typing.Optional[StoreErrorRecord]): self.value = value self.error = error - - - + + + def __str__(self): return "StoreDescriptorResultRecord(value={}, error={})".format(self.value, self.error) def __eq__(self, other): @@ -22848,10 +23762,10 @@ def __init__(self, *, name:bytes, expected:OptionalBytesRecord, current:Optional self.name = name self.expected = expected self.current = current - - - + + + def __str__(self): return "StoreTransactionConflictRecord(name={}, expected={}, current={})".format(self.name, self.expected, self.current) def __eq__(self, other): @@ -22890,13 +23804,13 @@ def write(value, buf): class StructuralDiffMarkerKind(enum.Enum): - + COMPARE = 0 - + ADDED = 1 - + REMOVED = 2 - + class _UniffiFfiConverterTypeStructuralDiffMarkerKind(_UniffiConverterRustBuffer): @@ -22940,10 +23854,10 @@ def __init__(self, *, kind:StructuralDiffMarkerKind, base_cid:typing.Optional[by self.other_cid = other_cid self.span_end = span_end self.cid = cid - - - + + + def __str__(self): return "StructuralDiffMarkerRecord(kind={}, base_cid={}, other_cid={}, span_end={}, cid={})".format(self.kind, self.base_cid, self.other_cid, self.span_end, self.cid) def __eq__(self, other): @@ -23016,10 +23930,10 @@ def __init__(self, *, base_root:typing.Optional[bytes], other_root:typing.Option self.other_root = other_root self.markers = markers self.pending = pending - - - + + + def __str__(self): return "StructuralDiffCursorRecord(base_root={}, other_root={}, markers={}, pending={})".format(self.base_root, self.other_root, self.markers, self.pending) def __eq__(self, other): @@ -23089,10 +24003,10 @@ def __init__(self, *, diffs:typing.List[DiffRecord], next_cursor_json:typing.Opt self.next_cursor_json = next_cursor_json self.stats = stats self.next_cursor = next_cursor - - - + + + def __str__(self): return "StructuralDiffPageRecord(diffs={}, next_cursor_json={}, stats={}, next_cursor={})".format(self.diffs, self.next_cursor_json, self.stats, self.next_cursor) def __eq__(self, other): @@ -23135,10 +24049,10 @@ class TimestampedValueRecord: def __init__(self, *, value:bytes, timestamp:int): self.value = value self.timestamp = timestamp - - - + + + def __str__(self): return "TimestampedValueRecord(value={}, timestamp={})".format(self.value, self.timestamp) def __eq__(self, other): @@ -23171,10 +24085,10 @@ class TombstoneMetadataRecord: def __init__(self, *, key:str, value:bytes): self.key = key self.value = value - - - + + + def __str__(self): return "TombstoneMetadataRecord(key={}, value={})".format(self.key, self.value) def __eq__(self, other): @@ -23231,10 +24145,10 @@ def __init__(self, *, actor:bytes, timestamp_millis:int, causal_metadata:typing. self.actor = actor self.timestamp_millis = timestamp_millis self.causal_metadata = causal_metadata - - - + + + def __str__(self): return "TombstoneRecord(actor={}, timestamp_millis={}, causal_metadata={})".format(self.actor, self.timestamp_millis, self.causal_metadata) def __eq__(self, other): @@ -23273,10 +24187,10 @@ def __init__(self, *, name:bytes, expected:typing.Optional[RootManifestRecord], self.name = name self.expected = expected self.current = current - - - + + + def __str__(self): return "TransactionConflictRecord(name={}, expected={}, current={})".format(self.name, self.expected, self.current) def __eq__(self, other): @@ -23340,10 +24254,10 @@ def __init__(self, *, applied:bool, conflict:typing.Optional[StoreTransactionCon self.applied = applied self.conflict = conflict self.error = error - - - + + + def __str__(self): return "TransactionResultRecord(applied={}, conflict={}, error={})".format(self.applied, self.conflict, self.error) def __eq__(self, other): @@ -23409,10 +24323,10 @@ def __init__(self, *, applied:bool, conflict:bool, nodes_written:int, roots_writ self.nodes_written = nodes_written self.roots_written = roots_written self.conflict_detail = conflict_detail - - - + + + def __str__(self): return "TransactionUpdateRecord(applied={}, conflict={}, nodes_written={}, roots_written={}, conflict_detail={})".format(self.applied, self.conflict, self.nodes_written, self.roots_written, self.conflict_detail) def __eq__(self, other): @@ -23461,13 +24375,13 @@ def write(value, buf): class TreeDebugNodeStatusKind(enum.Enum): - + SHARED = 0 - + LEFT_ONLY = 1 - + RIGHT_ONLY = 2 - + class _UniffiFfiConverterTypeTreeDebugNodeStatusKind(_UniffiConverterRustBuffer): @@ -23515,10 +24429,10 @@ def __init__(self, *, cid:bytes, leaf:bool, level:int, entry_count:int, max_entr self.encoded_bytes = encoded_bytes self.first_key = first_key self.last_key = last_key - - - + + + def __str__(self): return "TreeDebugNodeRecord(cid={}, leaf={}, level={}, entry_count={}, max_entries={}, fill_factor={}, encoded_bytes={}, first_key={}, last_key={})".format(self.cid, self.leaf, self.level, self.entry_count, self.max_entries, self.fill_factor, self.encoded_bytes, self.first_key, self.last_key) def __eq__(self, other): @@ -23586,10 +24500,10 @@ class TreeDebugComparedNodeRecord: def __init__(self, *, status:TreeDebugNodeStatusKind, node:TreeDebugNodeRecord): self.status = status self.node = node - - - + + + def __str__(self): return "TreeDebugComparedNodeRecord(status={}, node={})".format(self.status, self.node) def __eq__(self, other): @@ -23651,10 +24565,10 @@ def __init__(self, *, level:int, shared_nodes:int, left_only_nodes:int, right_on self.left_only_bytes = left_only_bytes self.right_only_bytes = right_only_bytes self.nodes = nodes - - - + + + def __str__(self): return "TreeDebugComparisonLevelRecord(level={}, shared_nodes={}, left_only_nodes={}, right_only_nodes={}, shared_bytes={}, left_only_bytes={}, right_only_bytes={}, nodes={})".format(self.level, self.shared_nodes, self.left_only_nodes, self.right_only_nodes, self.shared_bytes, self.left_only_bytes, self.right_only_bytes, self.nodes) def __eq__(self, other): @@ -23745,10 +24659,10 @@ def __init__(self, *, shared_nodes:int, left_only_nodes:int, right_only_nodes:in self.left_only_bytes = left_only_bytes self.right_only_bytes = right_only_bytes self.levels = levels - - - + + + def __str__(self): return "TreeDebugComparisonRecord(shared_nodes={}, left_only_nodes={}, right_only_nodes={}, shared_bytes={}, left_only_bytes={}, right_only_bytes={}, levels={})".format(self.shared_nodes, self.left_only_nodes, self.right_only_nodes, self.shared_bytes, self.left_only_bytes, self.right_only_bytes, self.levels) def __eq__(self, other): @@ -23829,10 +24743,10 @@ class TreeDebugLevelRecord: def __init__(self, *, level:int, nodes:typing.List[TreeDebugNodeRecord]): self.level = level self.nodes = nodes - - - + + + def __str__(self): return "TreeDebugLevelRecord(level={}, nodes={})".format(self.level, self.nodes) def __eq__(self, other): @@ -23887,10 +24801,10 @@ def read(cls, buf): class TreeDebugViewRecord: def __init__(self, *, levels:typing.List[TreeDebugLevelRecord]): self.levels = levels - - - + + + def __str__(self): return "TreeDebugViewRecord(levels={})".format(self.levels) def __eq__(self, other): @@ -23917,10 +24831,10 @@ def write(value, buf): class UnitResultRecord: def __init__(self, *, error:typing.Optional[StoreErrorRecord]): self.error = error - - - + + + def __str__(self): return "UnitResultRecord(error={})".format(self.error) def __eq__(self, other): @@ -23949,11 +24863,11 @@ def write(value, buf): class ValueRefKind(enum.Enum): - + INLINE = 0 - + BLOB = 1 - + class _UniffiFfiConverterTypeValueRefKind(_UniffiConverterRustBuffer): @@ -24014,10 +24928,10 @@ def __init__(self, *, kind:ValueRefKind, value:typing.Optional[bytes], blob:typi self.kind = kind self.value = value self.blob = blob - - - + + + def __str__(self): return "ValueRefRecord(kind={}, value={}, blob={})".format(self.kind, self.value, self.blob) def __eq__(self, other): @@ -24055,10 +24969,10 @@ class VersionPruneRecord: def __init__(self, *, retained:typing.List[bytes], removed:typing.List[bytes]): self.retained = retained self.removed = removed - - - + + + def __str__(self): return "VersionPruneRecord(retained={}, removed={})".format(self.retained, self.removed) def __eq__(self, other): @@ -24091,10 +25005,10 @@ class VersionedMapBatchResultRecord: def __init__(self, *, version:MapVersionRecord, stats:BatchApplyStatsRecord): self.version = version self.stats = stats - - - + + + def __str__(self): return "VersionedMapBatchResultRecord(version={}, stats={})".format(self.version, self.stats) def __eq__(self, other): @@ -24152,10 +25066,10 @@ def __init__(self, *, applied:bool, versions:typing.List[MapVersionRecord], conf self.versions = versions self.conflict_map_id = conflict_map_id self.conflict_current = conflict_current - - - + + + def __str__(self): return "VersionedTransactionCommitRecord(applied={}, versions={}, conflict_map_id={}, conflict_current={})".format(self.applied, self.versions, self.conflict_map_id, self.conflict_current) def __eq__(self, other): @@ -24200,10 +25114,10 @@ def __init__(self, *, schema:str, version:int, encoding:EncodingRecord, payload: self.version = version self.encoding = encoding self.payload = payload - - - + + + def __str__(self): return "VersionedValueRecord(schema={}, version={}, encoding={}, payload={})".format(self.schema, self.version, self.encoding, self.payload) def __eq__(self, other): @@ -24260,10 +25174,10 @@ def __init__(self, *, input_mutations:int, effective_mutations:int, entries_stre self.parallel_tasks = parallel_tasks self.structural_islands = structural_islands self.coalesced_islands = coalesced_islands - - - + + + def __str__(self): return "WriteStatsRecord(input_mutations={}, effective_mutations={}, entries_streamed={}, nodes_read={}, nodes_written={}, nodes_reused={}, bytes_read={}, bytes_written={}, resync_distance_entries={}, resync_distance_nodes={}, used_key_stable_fast_path={}, used_batched_value_update_path={}, parallel_width={}, parallel_tasks={}, structural_islands={}, coalesced_islands={})".format(self.input_mutations, self.effective_mutations, self.entries_streamed, self.nodes_read, self.nodes_written, self.nodes_reused, self.bytes_read, self.bytes_written, self.resync_distance_entries, self.resync_distance_nodes, self.used_key_stable_fast_path, self.used_batched_value_update_path, self.parallel_width, self.parallel_tasks, self.structural_islands, self.coalesced_islands) def __eq__(self, other): @@ -24366,10 +25280,10 @@ class WriteResultRecord: def __init__(self, *, tree:TreeRecord, stats:WriteStatsRecord): self.tree = tree self.stats = stats - - - + + + def __str__(self): return "WriteResultRecord(tree={}, stats={})".format(self.tree, self.stats) def __eq__(self, other): @@ -24422,7 +25336,7 @@ def read(cls, buf): class AsyncProllyTransactionProtocol(typing.Protocol): - + async def batch(self, tree: TreeRecord,mutations: typing.List[MutationRecord]) -> TreeRecord: raise NotImplementedError async def commit(self, ) -> TransactionUpdateRecord: @@ -24449,9 +25363,9 @@ async def rollback(self, ) -> None: raise NotImplementedError class AsyncProllyTransaction(AsyncProllyTransactionProtocol): - + _handle: ctypes.c_uint64 - + def __init__(self, *args, **kwargs): raise ValueError("This class has no default constructor") @@ -24473,7 +25387,7 @@ def _uniffi_make_instance(cls, handle): inst._handle = handle return inst async def batch(self, tree: TreeRecord,mutations: typing.List[MutationRecord]) -> TreeRecord: - + _UniffiFfiConverterTypeTreeRecord.check_lower(tree) _UniffiFfiConverterSequenceTypeMutationRecord.check_lower(mutations) @@ -24507,7 +25421,7 @@ async def commit(self, ) -> TransactionUpdateRecord: _uniffi_error_converter, ) async def compare_and_swap_named_root(self, name: bytes,expected: typing.Optional[TreeRecord],replacement: typing.Optional[TreeRecord]) -> NamedRootUpdateRecord: - + _UniffiFfiConverterBytes.check_lower(name) _UniffiFfiConverterOptionalTypeTreeRecord.check_lower(expected) @@ -24544,7 +25458,7 @@ async def create(self, ) -> TreeRecord: _uniffi_error_converter, ) async def delete(self, tree: TreeRecord,key: bytes) -> TreeRecord: - + _UniffiFfiConverterTypeTreeRecord.check_lower(tree) _UniffiFfiConverterBytes.check_lower(key) @@ -24564,7 +25478,7 @@ async def delete(self, tree: TreeRecord,key: bytes) -> TreeRecord: _uniffi_error_converter, ) async def delete_named_root(self, name: bytes) -> None: - + _UniffiFfiConverterBytes.check_lower(name) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -24581,7 +25495,7 @@ async def delete_named_root(self, name: bytes) -> None: _uniffi_error_converter, ) async def get(self, tree: TreeRecord,key: bytes) -> typing.Optional[bytes]: - + _UniffiFfiConverterTypeTreeRecord.check_lower(tree) _UniffiFfiConverterBytes.check_lower(key) @@ -24601,7 +25515,7 @@ async def get(self, tree: TreeRecord,key: bytes) -> typing.Optional[bytes]: _uniffi_error_converter, ) async def load_named_root(self, name: bytes) -> typing.Optional[TreeRecord]: - + _UniffiFfiConverterBytes.check_lower(name) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -24618,7 +25532,7 @@ async def load_named_root(self, name: bytes) -> typing.Optional[TreeRecord]: _uniffi_error_converter, ) async def publish_named_root(self, name: bytes,tree: TreeRecord) -> None: - + _UniffiFfiConverterBytes.check_lower(name) _UniffiFfiConverterTypeTreeRecord.check_lower(tree) @@ -24638,7 +25552,7 @@ async def publish_named_root(self, name: bytes,tree: TreeRecord) -> None: _uniffi_error_converter, ) async def publish_named_root_at_millis(self, name: bytes,tree: TreeRecord,timestamp_millis: int) -> None: - + _UniffiFfiConverterBytes.check_lower(name) _UniffiFfiConverterTypeTreeRecord.check_lower(tree) @@ -24661,7 +25575,7 @@ async def publish_named_root_at_millis(self, name: bytes,tree: TreeRecord,timest _uniffi_error_converter, ) async def put(self, tree: TreeRecord,key: bytes,value: bytes) -> TreeRecord: - + _UniffiFfiConverterTypeTreeRecord.check_lower(tree) _UniffiFfiConverterBytes.check_lower(key) @@ -24729,7 +25643,7 @@ def write(cls, value: AsyncProllyTransaction, buf: _UniffiRustBuffer): class AsyncProllyEngineProtocol(typing.Protocol): - + async def batch(self, tree: TreeRecord,mutations: typing.List[MutationRecord]) -> TreeRecord: raise NotImplementedError async def begin_transaction(self, ) -> AsyncProllyTransaction: @@ -24770,7 +25684,7 @@ async def range_page(self, tree: TreeRecord,cursor: typing.Optional[RangeCursorR raise NotImplementedError class AsyncProllyEngine(AsyncProllyEngineProtocol): - + _handle: ctypes.c_uint64 def __init__(self, *args, **kw): raise ValueError("async constructors not supported.") @@ -24793,7 +25707,7 @@ def _uniffi_make_instance(cls, handle): inst._handle = handle return inst async def batch(self, tree: TreeRecord,mutations: typing.List[MutationRecord]) -> TreeRecord: - + _UniffiFfiConverterTypeTreeRecord.check_lower(tree) _UniffiFfiConverterSequenceTypeMutationRecord.check_lower(mutations) @@ -24827,7 +25741,7 @@ async def begin_transaction(self, ) -> AsyncProllyTransaction: _uniffi_error_converter, ) async def collect_stats(self, tree: TreeRecord) -> TreeStatsRecord: - + _UniffiFfiConverterTypeTreeRecord.check_lower(tree) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -24844,7 +25758,7 @@ async def collect_stats(self, tree: TreeRecord) -> TreeStatsRecord: _uniffi_error_converter, ) async def compare_and_swap_named_root(self, name: bytes,expected: typing.Optional[TreeRecord],replacement: typing.Optional[TreeRecord]) -> NamedRootUpdateRecord: - + _UniffiFfiConverterBytes.check_lower(name) _UniffiFfiConverterOptionalTypeTreeRecord.check_lower(expected) @@ -24879,7 +25793,7 @@ def create(self, ) -> TreeRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) async def delete(self, tree: TreeRecord,key: bytes) -> TreeRecord: - + _UniffiFfiConverterTypeTreeRecord.check_lower(tree) _UniffiFfiConverterBytes.check_lower(key) @@ -24899,7 +25813,7 @@ async def delete(self, tree: TreeRecord,key: bytes) -> TreeRecord: _uniffi_error_converter, ) async def delete_named_root(self, name: bytes) -> None: - + _UniffiFfiConverterBytes.check_lower(name) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -24916,7 +25830,7 @@ async def delete_named_root(self, name: bytes) -> None: _uniffi_error_converter, ) async def diff(self, base: TreeRecord,other: TreeRecord) -> typing.List[DiffRecord]: - + _UniffiFfiConverterTypeTreeRecord.check_lower(base) _UniffiFfiConverterTypeTreeRecord.check_lower(other) @@ -24936,7 +25850,7 @@ async def diff(self, base: TreeRecord,other: TreeRecord) -> typing.List[DiffReco _uniffi_error_converter, ) async def get(self, tree: TreeRecord,key: bytes) -> typing.Optional[bytes]: - + _UniffiFfiConverterTypeTreeRecord.check_lower(tree) _UniffiFfiConverterBytes.check_lower(key) @@ -24956,7 +25870,7 @@ async def get(self, tree: TreeRecord,key: bytes) -> typing.Optional[bytes]: _uniffi_error_converter, ) async def get_many(self, tree: TreeRecord,keys: typing.List[bytes]) -> typing.List[typing.Optional[bytes]]: - + _UniffiFfiConverterTypeTreeRecord.check_lower(tree) _UniffiFfiConverterSequenceBytes.check_lower(keys) @@ -24990,7 +25904,7 @@ async def list_named_roots(self, ) -> typing.List[NamedRootRecord]: _uniffi_error_converter, ) async def load_named_root(self, name: bytes) -> typing.Optional[TreeRecord]: - + _UniffiFfiConverterBytes.check_lower(name) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -25007,7 +25921,7 @@ async def load_named_root(self, name: bytes) -> typing.Optional[TreeRecord]: _uniffi_error_converter, ) async def merge(self, base: TreeRecord,left: TreeRecord,right: TreeRecord,resolver: typing.Optional[str]) -> TreeRecord: - + _UniffiFfiConverterTypeTreeRecord.check_lower(base) _UniffiFfiConverterTypeTreeRecord.check_lower(left) @@ -25033,7 +25947,7 @@ async def merge(self, base: TreeRecord,left: TreeRecord,right: TreeRecord,resolv _uniffi_error_converter, ) async def prefix(self, tree: TreeRecord,prefix: bytes) -> typing.List[EntryRecord]: - + _UniffiFfiConverterTypeTreeRecord.check_lower(tree) _UniffiFfiConverterBytes.check_lower(prefix) @@ -25053,7 +25967,7 @@ async def prefix(self, tree: TreeRecord,prefix: bytes) -> typing.List[EntryRecor _uniffi_error_converter, ) async def publish_named_root(self, name: bytes,tree: TreeRecord) -> None: - + _UniffiFfiConverterBytes.check_lower(name) _UniffiFfiConverterTypeTreeRecord.check_lower(tree) @@ -25073,7 +25987,7 @@ async def publish_named_root(self, name: bytes,tree: TreeRecord) -> None: _uniffi_error_converter, ) async def publish_named_root_at_millis(self, name: bytes,tree: TreeRecord,timestamp_millis: int) -> None: - + _UniffiFfiConverterBytes.check_lower(name) _UniffiFfiConverterTypeTreeRecord.check_lower(tree) @@ -25096,7 +26010,7 @@ async def publish_named_root_at_millis(self, name: bytes,tree: TreeRecord,timest _uniffi_error_converter, ) async def put(self, tree: TreeRecord,key: bytes,value: bytes) -> TreeRecord: - + _UniffiFfiConverterTypeTreeRecord.check_lower(tree) _UniffiFfiConverterBytes.check_lower(key) @@ -25119,7 +26033,7 @@ async def put(self, tree: TreeRecord,key: bytes,value: bytes) -> TreeRecord: _uniffi_error_converter, ) async def range(self, tree: TreeRecord,start: bytes,end: typing.Optional[bytes]) -> typing.List[EntryRecord]: - + _UniffiFfiConverterTypeTreeRecord.check_lower(tree) _UniffiFfiConverterBytes.check_lower(start) @@ -25142,7 +26056,7 @@ async def range(self, tree: TreeRecord,start: bytes,end: typing.Optional[bytes]) _uniffi_error_converter, ) async def range_page(self, tree: TreeRecord,cursor: typing.Optional[RangeCursorRecord],end: typing.Optional[bytes],limit: int) -> RangePageRecord: - + _UniffiFfiConverterTypeTreeRecord.check_lower(tree) _UniffiFfiConverterOptionalTypeRangeCursorRecord.check_lower(cursor) @@ -25247,14 +26161,14 @@ def read(cls, buf): class SecondaryIndexExtractorCallback(): - + def extract(self, primary_key: bytes,source_value: bytes) -> typing.List[IndexEntryRecord]: raise NotImplementedError class SecondaryIndexExtractorCallbackImpl(SecondaryIndexExtractorCallback): - + _handle: ctypes.c_uint64 - + def __init__(self, *args, **kwargs): raise ValueError("This class has no default constructor") @@ -25276,7 +26190,7 @@ def _uniffi_make_instance(cls, handle): inst._handle = handle return inst def extract(self, primary_key: bytes,source_value: bytes) -> typing.List[IndexEntryRecord]: - + _UniffiFfiConverterBytes.check_lower(primary_key) _UniffiFfiConverterBytes.check_lower(source_value) @@ -25382,14 +26296,14 @@ def write(cls, value: SecondaryIndexExtractorCallback, buf: _UniffiRustBuffer): class BindingIndexRegistryProtocol(typing.Protocol): - + def len(self, ) -> int: raise NotImplementedError def register(self, name: bytes,generation: int,extractor_id: str,projection: IndexProjectionRecord,limits: typing.Optional[SecondaryIndexLimitsRecord],extractor: SecondaryIndexExtractorCallback) -> None: raise NotImplementedError class BindingIndexRegistry(BindingIndexRegistryProtocol): - + _handle: ctypes.c_uint64 def __init__(self, ): _uniffi_lowered_args = ( @@ -25433,7 +26347,7 @@ def len(self, ) -> int: ) return _uniffi_lift_return(_uniffi_ffi_result) def register(self, name: bytes,generation: int,extractor_id: str,projection: IndexProjectionRecord,limits: typing.Optional[SecondaryIndexLimitsRecord],extractor: SecondaryIndexExtractorCallback) -> None: - + _UniffiFfiConverterBytes.check_lower(name) _UniffiFfiConverterUInt64.check_lower(generation) @@ -25517,7 +26431,7 @@ def read(cls, buf): class BindingSecondaryIndexSnapshotProtocol(typing.Protocol): - + def exact(self, term: bytes) -> typing.List[IndexMatchRecord]: raise NotImplementedError def exact_page(self, term: bytes,cursor: typing.Optional[bytes],limit: int) -> IndexPageRecord: @@ -25544,9 +26458,9 @@ def records(self, term: bytes) -> typing.List[IndexedSourceRecord]: raise NotImplementedError class BindingSecondaryIndexSnapshot(BindingSecondaryIndexSnapshotProtocol): - + _handle: ctypes.c_uint64 - + def __init__(self, *args, **kwargs): raise ValueError("This class has no default constructor") @@ -25568,7 +26482,7 @@ def _uniffi_make_instance(cls, handle): inst._handle = handle return inst def exact(self, term: bytes) -> typing.List[IndexMatchRecord]: - + _UniffiFfiConverterBytes.check_lower(term) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -25583,7 +26497,7 @@ def exact(self, term: bytes) -> typing.List[IndexMatchRecord]: ) return _uniffi_lift_return(_uniffi_ffi_result) def exact_page(self, term: bytes,cursor: typing.Optional[bytes],limit: int) -> IndexPageRecord: - + _UniffiFfiConverterBytes.check_lower(term) _UniffiFfiConverterOptionalBytes.check_lower(cursor) @@ -25604,7 +26518,7 @@ def exact_page(self, term: bytes,cursor: typing.Optional[bytes],limit: int) -> I ) return _uniffi_lift_return(_uniffi_ffi_result) def exact_reverse_page(self, term: bytes,cursor: typing.Optional[bytes],limit: int) -> IndexPageRecord: - + _UniffiFfiConverterBytes.check_lower(term) _UniffiFfiConverterOptionalBytes.check_lower(cursor) @@ -25649,7 +26563,7 @@ def name(self, ) -> bytes: ) return _uniffi_lift_return(_uniffi_ffi_result) def prefix(self, prefix: bytes) -> typing.List[IndexMatchRecord]: - + _UniffiFfiConverterBytes.check_lower(prefix) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -25664,7 +26578,7 @@ def prefix(self, prefix: bytes) -> typing.List[IndexMatchRecord]: ) return _uniffi_lift_return(_uniffi_ffi_result) def prefix_page(self, prefix: bytes,cursor: typing.Optional[bytes],limit: int) -> IndexPageRecord: - + _UniffiFfiConverterBytes.check_lower(prefix) _UniffiFfiConverterOptionalBytes.check_lower(cursor) @@ -25685,7 +26599,7 @@ def prefix_page(self, prefix: bytes,cursor: typing.Optional[bytes],limit: int) - ) return _uniffi_lift_return(_uniffi_ffi_result) def prefix_reverse_page(self, prefix: bytes,cursor: typing.Optional[bytes],limit: int) -> IndexPageRecord: - + _UniffiFfiConverterBytes.check_lower(prefix) _UniffiFfiConverterOptionalBytes.check_lower(cursor) @@ -25706,7 +26620,7 @@ def prefix_reverse_page(self, prefix: bytes,cursor: typing.Optional[bytes],limit ) return _uniffi_lift_return(_uniffi_ffi_result) def range(self, start: bytes,range_end: typing.Optional[bytes]) -> typing.List[IndexMatchRecord]: - + _UniffiFfiConverterBytes.check_lower(start) _UniffiFfiConverterOptionalBytes.check_lower(range_end) @@ -25724,7 +26638,7 @@ def range(self, start: bytes,range_end: typing.Optional[bytes]) -> typing.List[I ) return _uniffi_lift_return(_uniffi_ffi_result) def range_page(self, start: bytes,range_end: typing.Optional[bytes],cursor: typing.Optional[bytes],limit: int) -> IndexPageRecord: - + _UniffiFfiConverterBytes.check_lower(start) _UniffiFfiConverterOptionalBytes.check_lower(range_end) @@ -25748,7 +26662,7 @@ def range_page(self, start: bytes,range_end: typing.Optional[bytes],cursor: typi ) return _uniffi_lift_return(_uniffi_ffi_result) def range_reverse_page(self, start: bytes,range_end: typing.Optional[bytes],cursor: typing.Optional[bytes],limit: int) -> IndexPageRecord: - + _UniffiFfiConverterBytes.check_lower(start) _UniffiFfiConverterOptionalBytes.check_lower(range_end) @@ -25772,7 +26686,7 @@ def range_reverse_page(self, start: bytes,range_end: typing.Optional[bytes],curs ) return _uniffi_lift_return(_uniffi_ffi_result) def records(self, term: bytes) -> typing.List[IndexedSourceRecord]: - + _UniffiFfiConverterBytes.check_lower(term) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -25818,16 +26732,16 @@ def write(cls, value: BindingSecondaryIndexSnapshot, buf: _UniffiRustBuffer): class BindingIndexedSnapshotProtocol(typing.Protocol): - + def id(self, ) -> IndexedSnapshotIdRecord: raise NotImplementedError def index(self, name: bytes) -> BindingSecondaryIndexSnapshot: raise NotImplementedError class BindingIndexedSnapshot(BindingIndexedSnapshotProtocol): - + _handle: ctypes.c_uint64 - + def __init__(self, *args, **kwargs): raise ValueError("This class has no default constructor") @@ -25861,7 +26775,7 @@ def id(self, ) -> IndexedSnapshotIdRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def index(self, name: bytes) -> BindingSecondaryIndexSnapshot: - + _UniffiFfiConverterBytes.check_lower(name) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -25930,7 +26844,7 @@ def read(cls, buf): class BindingIndexedMapProtocol(typing.Protocol): - + def apply(self, mutations: typing.List[MutationRecord]) -> IndexedVersionRecord: raise NotImplementedError def apply_if(self, expected_source: typing.Optional[bytes],mutations: typing.List[MutationRecord]) -> IndexedUpdateRecord: @@ -25977,10 +26891,10 @@ def verify_index(self, name: bytes,source_version: bytes) -> IndexVerificationRe raise NotImplementedError class BindingIndexedMap(BindingIndexedMapProtocol): - + _handle: ctypes.c_uint64 def __init__(self, engine: ProllyEngine,id: bytes,registry: BindingIndexRegistry): - + _UniffiFfiConverterTypeProllyEngine.check_lower(engine) _UniffiFfiConverterBytes.check_lower(id) @@ -26018,7 +26932,7 @@ def _uniffi_make_instance(cls, handle): inst._handle = handle return inst def apply(self, mutations: typing.List[MutationRecord]) -> IndexedVersionRecord: - + _UniffiFfiConverterSequenceTypeMutationRecord.check_lower(mutations) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -26033,7 +26947,7 @@ def apply(self, mutations: typing.List[MutationRecord]) -> IndexedVersionRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def apply_if(self, expected_source: typing.Optional[bytes],mutations: typing.List[MutationRecord]) -> IndexedUpdateRecord: - + _UniffiFfiConverterOptionalBytes.check_lower(expected_source) _UniffiFfiConverterSequenceTypeMutationRecord.check_lower(mutations) @@ -26051,7 +26965,7 @@ def apply_if(self, expected_source: typing.Optional[bytes],mutations: typing.Lis ) return _uniffi_lift_return(_uniffi_ffi_result) def deactivate_index(self, name: bytes) -> IndexedVersionRecord: - + _UniffiFfiConverterBytes.check_lower(name) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -26066,7 +26980,7 @@ def deactivate_index(self, name: bytes) -> IndexedVersionRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def delete(self, key: bytes) -> IndexedVersionRecord: - + _UniffiFfiConverterBytes.check_lower(key) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -26081,7 +26995,7 @@ def delete(self, key: bytes) -> IndexedVersionRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def ensure_index(self, name: bytes) -> IndexBuildResultRecord: - + _UniffiFfiConverterBytes.check_lower(name) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -26120,7 +27034,7 @@ def fast_handle(self, ) -> int: ) return _uniffi_lift_return(_uniffi_ffi_result) def get(self, key: bytes) -> typing.Optional[bytes]: - + _UniffiFfiConverterBytes.check_lower(key) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -26159,7 +27073,7 @@ def id(self, ) -> bytes: ) return _uniffi_lift_return(_uniffi_ffi_result) def import_current(self, bundle: bytes,expected_source: typing.Optional[bytes]) -> IndexedVersionRecord: - + _UniffiFfiConverterBytes.check_lower(bundle) _UniffiFfiConverterOptionalBytes.check_lower(expected_source) @@ -26177,7 +27091,7 @@ def import_current(self, bundle: bytes,expected_source: typing.Optional[bytes]) ) return _uniffi_lift_return(_uniffi_ffi_result) def keep_last(self, count: int) -> IndexedRetentionRecord: - + _UniffiFfiConverterUInt64.check_lower(count) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -26216,7 +27130,7 @@ def plan_gc(self, ) -> GcPlanRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def put(self, key: bytes,value: bytes) -> IndexedVersionRecord: - + _UniffiFfiConverterBytes.check_lower(key) _UniffiFfiConverterBytes.check_lower(value) @@ -26234,7 +27148,7 @@ def put(self, key: bytes,value: bytes) -> IndexedVersionRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def repair_index(self, name: bytes,source_version: bytes) -> IndexVerificationRecord: - + _UniffiFfiConverterBytes.check_lower(name) _UniffiFfiConverterBytes.check_lower(source_version) @@ -26252,7 +27166,7 @@ def repair_index(self, name: bytes,source_version: bytes) -> IndexVerificationRe ) return _uniffi_lift_return(_uniffi_ffi_result) def replace_index(self, name: bytes,generation: int,extractor_id: str,projection: IndexProjectionRecord,limits: typing.Optional[SecondaryIndexLimitsRecord],extractor: SecondaryIndexExtractorCallback) -> IndexBuildResultRecord: - + _UniffiFfiConverterBytes.check_lower(name) _UniffiFfiConverterUInt64.check_lower(generation) @@ -26294,7 +27208,7 @@ def snapshot(self, ) -> BindingIndexedSnapshot: ) return _uniffi_lift_return(_uniffi_ffi_result) def snapshot_at(self, source_version: bytes) -> BindingIndexedSnapshot: - + _UniffiFfiConverterBytes.check_lower(source_version) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -26309,7 +27223,7 @@ def snapshot_at(self, source_version: bytes) -> BindingIndexedSnapshot: ) return _uniffi_lift_return(_uniffi_ffi_result) def snapshot_by_id(self, snapshot_id: IndexedSnapshotIdRecord) -> BindingIndexedSnapshot: - + _UniffiFfiConverterTypeIndexedSnapshotIdRecord.check_lower(snapshot_id) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -26324,7 +27238,7 @@ def snapshot_by_id(self, snapshot_id: IndexedSnapshotIdRecord) -> BindingIndexed ) return _uniffi_lift_return(_uniffi_ffi_result) def verify_all(self, source_version: bytes) -> typing.List[IndexVerificationRecord]: - + _UniffiFfiConverterBytes.check_lower(source_version) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -26339,7 +27253,7 @@ def verify_all(self, source_version: bytes) -> typing.List[IndexVerificationReco ) return _uniffi_lift_return(_uniffi_ffi_result) def verify_index(self, name: bytes,source_version: bytes) -> IndexVerificationRecord: - + _UniffiFfiConverterBytes.check_lower(name) _UniffiFfiConverterBytes.check_lower(source_version) @@ -26413,7 +27327,7 @@ def read(cls, buf): class DiffVisitorCallback(): - + def visit(self, diff: DiffRecord) -> bool: """ Return `true` to continue or `false` to stop after this diff. @@ -26421,9 +27335,9 @@ def visit(self, diff: DiffRecord) -> bool: raise NotImplementedError class DiffVisitorCallbackImpl(DiffVisitorCallback): - + _handle: ctypes.c_uint64 - + def __init__(self, *args, **kwargs): raise ValueError("This class has no default constructor") @@ -26448,7 +27362,7 @@ def visit(self, diff: DiffRecord) -> bool: """ Return `true` to continue or `false` to stop after this diff. """ - + _UniffiFfiConverterTypeDiffRecord.check_lower(diff) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -26551,7 +27465,7 @@ class BindingMapComparisonProtocol(typing.Protocol): """ Owned version-pinned comparison. It never re-resolves head. """ - + def base(self, ) -> MapVersionRecord: raise NotImplementedError def changed_spans(self, ) -> typing.Optional[ChangedSpanHintRecord]: @@ -26579,9 +27493,9 @@ class BindingMapComparison(BindingMapComparisonProtocol): """ Owned version-pinned comparison. It never re-resolves head. """ - + _handle: ctypes.c_uint64 - + def __init__(self, *args, **kwargs): raise ValueError("This class has no default constructor") @@ -26651,7 +27565,7 @@ def diff(self, ) -> typing.List[DiffRecord]: ) return _uniffi_lift_return(_uniffi_ffi_result) def diff_page(self, cursor: typing.Optional[RangeCursorRecord],range_end: typing.Optional[bytes],limit: int) -> DiffPageRecord: - + _UniffiFfiConverterOptionalTypeRangeCursorRecord.check_lower(cursor) _UniffiFfiConverterOptionalBytes.check_lower(range_end) @@ -26672,7 +27586,7 @@ def diff_page(self, cursor: typing.Optional[RangeCursorRecord],range_end: typing ) return _uniffi_lift_return(_uniffi_ffi_result) def prove_diff_page(self, cursor: typing.Optional[RangeCursorRecord],range_end: typing.Optional[bytes],limit: int) -> ProvedDiffPageRecord: - + _UniffiFfiConverterOptionalTypeRangeCursorRecord.check_lower(cursor) _UniffiFfiConverterOptionalBytes.check_lower(range_end) @@ -26693,7 +27607,7 @@ def prove_diff_page(self, cursor: typing.Optional[RangeCursorRecord],range_end: ) return _uniffi_lift_return(_uniffi_ffi_result) def publish_changed_spans(self, spans: typing.List[ChangedSpanRecord]) -> bool: - + _UniffiFfiConverterSequenceTypeChangedSpanRecord.check_lower(spans) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -26708,7 +27622,7 @@ def publish_changed_spans(self, spans: typing.List[ChangedSpanRecord]) -> bool: ) return _uniffi_lift_return(_uniffi_ffi_result) def scan_diff(self, visitor: DiffVisitorCallback) -> ScanOutcomeRecord: - + _UniffiFfiConverterTypeDiffVisitorCallback.check_lower(visitor) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -26735,7 +27649,7 @@ def stats(self, ) -> StatsComparisonRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def structural_diff_page(self, cursor: typing.Optional[StructuralDiffCursorRecord],limit: int) -> StructuralDiffPageRecord: - + _UniffiFfiConverterOptionalTypeStructuralDiffCursorRecord.check_lower(cursor) _UniffiFfiConverterUInt64.check_lower(limit) @@ -26796,14 +27710,14 @@ def write(cls, value: BindingMapComparison, buf: _UniffiRustBuffer): class MergeResolverCallback(): - + def resolve(self, conflict: ConflictRecord) -> ResolutionRecord: raise NotImplementedError class MergeResolverCallbackImpl(MergeResolverCallback): - + _handle: ctypes.c_uint64 - + def __init__(self, *args, **kwargs): raise ValueError("This class has no default constructor") @@ -26825,7 +27739,7 @@ def _uniffi_make_instance(cls, handle): inst._handle = handle return inst def resolve(self, conflict: ConflictRecord) -> ResolutionRecord: - + _UniffiFfiConverterTypeConflictRecord.check_lower(conflict) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -26925,7 +27839,7 @@ def write(cls, value: MergeResolverCallback, buf: _UniffiRustBuffer): class MergePolicyRegistryProtocol(typing.Protocol): - + def has_default(self, ) -> bool: raise NotImplementedError def is_empty(self, ) -> bool: @@ -26946,7 +27860,7 @@ def set_default_resolver_name(self, name: str) -> None: raise NotImplementedError class MergePolicyRegistry(MergePolicyRegistryProtocol): - + _handle: ctypes.c_uint64 def __init__(self, ): _uniffi_lowered_args = ( @@ -27014,7 +27928,7 @@ def len(self, ) -> int: ) return _uniffi_lift_return(_uniffi_ffi_result) def push_exact_resolver(self, key: bytes,resolver: MergeResolverCallback) -> None: - + _UniffiFfiConverterBytes.check_lower(key) _UniffiFfiConverterTypeMergeResolverCallback.check_lower(resolver) @@ -27032,7 +27946,7 @@ def push_exact_resolver(self, key: bytes,resolver: MergeResolverCallback) -> Non ) return _uniffi_lift_return(_uniffi_ffi_result) def push_exact_resolver_name(self, key: bytes,name: str) -> None: - + _UniffiFfiConverterBytes.check_lower(key) _UniffiFfiConverterString.check_lower(name) @@ -27050,7 +27964,7 @@ def push_exact_resolver_name(self, key: bytes,name: str) -> None: ) return _uniffi_lift_return(_uniffi_ffi_result) def push_prefix_resolver(self, prefix: bytes,resolver: MergeResolverCallback) -> None: - + _UniffiFfiConverterBytes.check_lower(prefix) _UniffiFfiConverterTypeMergeResolverCallback.check_lower(resolver) @@ -27068,7 +27982,7 @@ def push_prefix_resolver(self, prefix: bytes,resolver: MergeResolverCallback) -> ) return _uniffi_lift_return(_uniffi_ffi_result) def push_prefix_resolver_name(self, prefix: bytes,name: str) -> None: - + _UniffiFfiConverterBytes.check_lower(prefix) _UniffiFfiConverterString.check_lower(name) @@ -27086,7 +28000,7 @@ def push_prefix_resolver_name(self, prefix: bytes,name: str) -> None: ) return _uniffi_lift_return(_uniffi_ffi_result) def set_default_resolver(self, resolver: MergeResolverCallback) -> None: - + _UniffiFfiConverterTypeMergeResolverCallback.check_lower(resolver) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -27101,7 +28015,7 @@ def set_default_resolver(self, resolver: MergeResolverCallback) -> None: ) return _uniffi_lift_return(_uniffi_ffi_result) def set_default_resolver_name(self, name: str) -> None: - + _UniffiFfiConverterString.check_lower(name) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -27147,7 +28061,7 @@ def write(cls, value: MergePolicyRegistry, buf: _UniffiRustBuffer): class ConflictVisitorCallback(): - + def visit(self, conflict: ConflictRecord) -> bool: """ Return `true` to continue or `false` to stop after this conflict. @@ -27155,9 +28069,9 @@ def visit(self, conflict: ConflictRecord) -> bool: raise NotImplementedError class ConflictVisitorCallbackImpl(ConflictVisitorCallback): - + _handle: ctypes.c_uint64 - + def __init__(self, *args, **kwargs): raise ValueError("This class has no default constructor") @@ -27182,7 +28096,7 @@ def visit(self, conflict: ConflictRecord) -> bool: """ Return `true` to continue or `false` to stop after this conflict. """ - + _UniffiFfiConverterTypeConflictRecord.check_lower(conflict) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -27285,7 +28199,7 @@ class BindingMapMergeProtocol(typing.Protocol): """ Three-way merge pinned to a concrete base, head, and candidate. """ - + def base(self, ) -> MapVersionRecord: raise NotImplementedError def candidate(self, ) -> MapVersionRecord: @@ -27318,9 +28232,9 @@ class BindingMapMerge(BindingMapMergeProtocol): """ Three-way merge pinned to a concrete base, head, and candidate. """ - + _handle: ctypes.c_uint64 - + def __init__(self, *args, **kwargs): raise ValueError("This class has no default constructor") @@ -27366,7 +28280,7 @@ def candidate(self, ) -> MapVersionRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def conflict_page(self, cursor: typing.Optional[RangeCursorRecord],limit: int) -> ConflictPageRecord: - + _UniffiFfiConverterOptionalTypeRangeCursorRecord.check_lower(cursor) _UniffiFfiConverterUInt64.check_lower(limit) @@ -27384,7 +28298,7 @@ def conflict_page(self, cursor: typing.Optional[RangeCursorRecord],limit: int) - ) return _uniffi_lift_return(_uniffi_ffi_result) def crdt_merge(self, config: CrdtConfigRecord) -> TreeRecord: - + _UniffiFfiConverterTypeCrdtConfigRecord.check_lower(config) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -27399,7 +28313,7 @@ def crdt_merge(self, config: CrdtConfigRecord) -> TreeRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def crdt_merge_explain(self, config: CrdtConfigRecord) -> MergeExplanationRecord: - + _UniffiFfiConverterTypeCrdtConfigRecord.check_lower(config) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -27426,7 +28340,7 @@ def head(self, ) -> MapVersionRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def merge(self, resolver: typing.Optional[str]) -> TreeRecord: - + _UniffiFfiConverterOptionalString.check_lower(resolver) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -27441,7 +28355,7 @@ def merge(self, resolver: typing.Optional[str]) -> TreeRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def merge_with_policy(self, policy: MergePolicyRegistry) -> TreeRecord: - + _UniffiFfiConverterTypeMergePolicyRegistry.check_lower(policy) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -27459,7 +28373,7 @@ def publish(self, resolver: typing.Optional[str]) -> MapUpdateRecord: """ Publish only if the head pinned when this object was created is still current. """ - + _UniffiFfiConverterOptionalString.check_lower(resolver) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -27474,7 +28388,7 @@ def publish(self, resolver: typing.Optional[str]) -> MapUpdateRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def publish_crdt(self, config: CrdtConfigRecord) -> MapUpdateRecord: - + _UniffiFfiConverterTypeCrdtConfigRecord.check_lower(config) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -27489,7 +28403,7 @@ def publish_crdt(self, config: CrdtConfigRecord) -> MapUpdateRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def publish_with_policy(self, policy: MergePolicyRegistry) -> MapUpdateRecord: - + _UniffiFfiConverterTypeMergePolicyRegistry.check_lower(policy) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -27504,7 +28418,7 @@ def publish_with_policy(self, policy: MergePolicyRegistry) -> MapUpdateRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def scan_conflicts(self, visitor: ConflictVisitorCallback) -> ScanOutcomeRecord: - + _UniffiFfiConverterTypeConflictVisitorCallback.check_lower(visitor) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -27550,7 +28464,7 @@ def write(cls, value: BindingMapMerge, buf: _UniffiRustBuffer): class ProllyTransactionProtocol(typing.Protocol): - + def batch(self, tree: TreeRecord,mutations: typing.List[MutationRecord]) -> TreeRecord: raise NotImplementedError def commit(self, ) -> TransactionUpdateRecord: @@ -27575,9 +28489,9 @@ def rollback(self, ) -> None: raise NotImplementedError class ProllyTransaction(ProllyTransactionProtocol): - + _handle: ctypes.c_uint64 - + def __init__(self, *args, **kwargs): raise ValueError("This class has no default constructor") @@ -27599,7 +28513,7 @@ def _uniffi_make_instance(cls, handle): inst._handle = handle return inst def batch(self, tree: TreeRecord,mutations: typing.List[MutationRecord]) -> TreeRecord: - + _UniffiFfiConverterTypeTreeRecord.check_lower(tree) _UniffiFfiConverterSequenceTypeMutationRecord.check_lower(mutations) @@ -27629,7 +28543,7 @@ def commit(self, ) -> TransactionUpdateRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def compare_and_swap_named_root(self, name: bytes,expected: typing.Optional[TreeRecord],replacement: typing.Optional[TreeRecord]) -> NamedRootUpdateRecord: - + _UniffiFfiConverterBytes.check_lower(name) _UniffiFfiConverterOptionalTypeTreeRecord.check_lower(expected) @@ -27662,7 +28576,7 @@ def create(self, ) -> TreeRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def delete(self, tree: TreeRecord,key: bytes) -> TreeRecord: - + _UniffiFfiConverterTypeTreeRecord.check_lower(tree) _UniffiFfiConverterBytes.check_lower(key) @@ -27680,7 +28594,7 @@ def delete(self, tree: TreeRecord,key: bytes) -> TreeRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def delete_named_root(self, name: bytes) -> None: - + _UniffiFfiConverterBytes.check_lower(name) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -27695,7 +28609,7 @@ def delete_named_root(self, name: bytes) -> None: ) return _uniffi_lift_return(_uniffi_ffi_result) def get(self, tree: TreeRecord,key: bytes) -> typing.Optional[bytes]: - + _UniffiFfiConverterTypeTreeRecord.check_lower(tree) _UniffiFfiConverterBytes.check_lower(key) @@ -27713,7 +28627,7 @@ def get(self, tree: TreeRecord,key: bytes) -> typing.Optional[bytes]: ) return _uniffi_lift_return(_uniffi_ffi_result) def load_named_root(self, name: bytes) -> typing.Optional[TreeRecord]: - + _UniffiFfiConverterBytes.check_lower(name) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -27728,7 +28642,7 @@ def load_named_root(self, name: bytes) -> typing.Optional[TreeRecord]: ) return _uniffi_lift_return(_uniffi_ffi_result) def publish_named_root(self, name: bytes,tree: TreeRecord) -> None: - + _UniffiFfiConverterBytes.check_lower(name) _UniffiFfiConverterTypeTreeRecord.check_lower(tree) @@ -27746,7 +28660,7 @@ def publish_named_root(self, name: bytes,tree: TreeRecord) -> None: ) return _uniffi_lift_return(_uniffi_ffi_result) def put(self, tree: TreeRecord,key: bytes,value: bytes) -> TreeRecord: - + _UniffiFfiConverterTypeTreeRecord.check_lower(tree) _UniffiFfiConverterBytes.check_lower(key) @@ -27815,7 +28729,7 @@ class BindingVersionedTransactionProtocol(typing.Protocol): owned form, provide read-your-writes, and execute through Rust's strict `VersionedMapsTransaction` at commit. """ - + def apply(self, map_id: bytes,mutations: typing.List[MutationRecord]) -> MapVersionRecord: raise NotImplementedError def apply_if(self, map_id: bytes,expected: typing.Optional[bytes],mutations: typing.List[MutationRecord]) -> MapUpdateRecord: @@ -27839,9 +28753,9 @@ class BindingVersionedTransaction(BindingVersionedTransactionProtocol): owned form, provide read-your-writes, and execute through Rust's strict `VersionedMapsTransaction` at commit. """ - + _handle: ctypes.c_uint64 - + def __init__(self, *args, **kwargs): raise ValueError("This class has no default constructor") @@ -27863,7 +28777,7 @@ def _uniffi_make_instance(cls, handle): inst._handle = handle return inst def apply(self, map_id: bytes,mutations: typing.List[MutationRecord]) -> MapVersionRecord: - + _UniffiFfiConverterBytes.check_lower(map_id) _UniffiFfiConverterSequenceTypeMutationRecord.check_lower(mutations) @@ -27881,7 +28795,7 @@ def apply(self, map_id: bytes,mutations: typing.List[MutationRecord]) -> MapVers ) return _uniffi_lift_return(_uniffi_ffi_result) def apply_if(self, map_id: bytes,expected: typing.Optional[bytes],mutations: typing.List[MutationRecord]) -> MapUpdateRecord: - + _UniffiFfiConverterBytes.check_lower(map_id) _UniffiFfiConverterOptionalBytes.check_lower(expected) @@ -27914,7 +28828,7 @@ def commit(self, ) -> VersionedTransactionCommitRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def delete(self, map_id: bytes,key: bytes) -> MapVersionRecord: - + _UniffiFfiConverterBytes.check_lower(map_id) _UniffiFfiConverterBytes.check_lower(key) @@ -27932,7 +28846,7 @@ def delete(self, map_id: bytes,key: bytes) -> MapVersionRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def get(self, map_id: bytes,key: bytes) -> typing.Optional[bytes]: - + _UniffiFfiConverterBytes.check_lower(map_id) _UniffiFfiConverterBytes.check_lower(key) @@ -27950,7 +28864,7 @@ def get(self, map_id: bytes,key: bytes) -> typing.Optional[bytes]: ) return _uniffi_lift_return(_uniffi_ffi_result) def head(self, map_id: bytes) -> typing.Optional[MapVersionRecord]: - + _UniffiFfiConverterBytes.check_lower(map_id) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -27965,7 +28879,7 @@ def head(self, map_id: bytes) -> typing.Optional[MapVersionRecord]: ) return _uniffi_lift_return(_uniffi_ffi_result) def put(self, map_id: bytes,key: bytes,value: bytes) -> MapVersionRecord: - + _UniffiFfiConverterBytes.check_lower(map_id) _UniffiFfiConverterBytes.check_lower(key) @@ -28052,14 +28966,14 @@ def read(cls, buf): class CrdtResolverCallback(): - + def resolve(self, conflict: ConflictRecord) -> CrdtResolutionRecord: raise NotImplementedError class CrdtResolverCallbackImpl(CrdtResolverCallback): - + _handle: ctypes.c_uint64 - + def __init__(self, *args, **kwargs): raise ValueError("This class has no default constructor") @@ -28081,7 +28995,7 @@ def _uniffi_make_instance(cls, handle): inst._handle = handle return inst def resolve(self, conflict: ConflictRecord) -> CrdtResolutionRecord: - + _UniffiFfiConverterTypeConflictRecord.check_lower(conflict) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -28206,7 +29120,7 @@ def read(cls, buf): class ProllyBlobStoreProtocol(typing.Protocol): - + def blob_count(self, ) -> int: raise NotImplementedError def delete_blob(self, reference: BlobRefRecord) -> None: @@ -28219,11 +29133,11 @@ def put_blob(self, bytes: bytes) -> BlobRefRecord: raise NotImplementedError class ProllyBlobStore(ProllyBlobStoreProtocol): - + _handle: ctypes.c_uint64 @classmethod def file(cls, path: str) -> ProllyBlobStore: - + _UniffiFfiConverterString.check_lower(path) _uniffi_lowered_args = ( _UniffiFfiConverterString.lower(path), @@ -28248,7 +29162,7 @@ def memory(cls, ) -> ProllyBlobStore: *_uniffi_lowered_args, ) return cls._uniffi_make_instance(_uniffi_ffi_result) - + def __init__(self, *args, **kwargs): raise ValueError("This class has no default constructor") @@ -28282,7 +29196,7 @@ def blob_count(self, ) -> int: ) return _uniffi_lift_return(_uniffi_ffi_result) def delete_blob(self, reference: BlobRefRecord) -> None: - + _UniffiFfiConverterTypeBlobRefRecord.check_lower(reference) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -28297,7 +29211,7 @@ def delete_blob(self, reference: BlobRefRecord) -> None: ) return _uniffi_lift_return(_uniffi_ffi_result) def get_blob(self, reference: BlobRefRecord) -> typing.Optional[bytes]: - + _UniffiFfiConverterTypeBlobRefRecord.check_lower(reference) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -28324,7 +29238,7 @@ def list_blob_refs(self, ) -> typing.List[BlobRefRecord]: ) return _uniffi_lift_return(_uniffi_ffi_result) def put_blob(self, bytes: bytes) -> BlobRefRecord: - + _UniffiFfiConverterBytes.check_lower(bytes) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -28441,7 +29355,7 @@ def read(cls, buf): class EntryVisitorCallback(): - + def visit(self, entry: EntryRecord) -> bool: """ Return `true` to continue or `false` to stop after this entry. @@ -28449,9 +29363,9 @@ def visit(self, entry: EntryRecord) -> bool: raise NotImplementedError class EntryVisitorCallbackImpl(EntryVisitorCallback): - + _handle: ctypes.c_uint64 - + def __init__(self, *args, **kwargs): raise ValueError("This class has no default constructor") @@ -28476,7 +29390,7 @@ def visit(self, entry: EntryRecord) -> bool: """ Return `true` to continue or `false` to stop after this entry. """ - + _UniffiFfiConverterTypeEntryRecord.check_lower(entry) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -28580,7 +29494,7 @@ class ProllyReadSessionProtocol(typing.Protocol): A root-bound read object that amortizes tree decoding and ownership across repeated foreign-language reads. """ - + def fast_handle(self, ) -> int: """ Internal opaque transport handle used by handwritten native adapters. @@ -28620,9 +29534,9 @@ class ProllyReadSession(ProllyReadSessionProtocol): A root-bound read object that amortizes tree decoding and ownership across repeated foreign-language reads. """ - + _handle: ctypes.c_uint64 - + def __init__(self, *args, **kwargs): raise ValueError("This class has no default constructor") @@ -28664,7 +29578,7 @@ def get(self, key: bytes) -> typing.Optional[bytes]: Return an owned value while reusing the decoded tree bound to this session. This is the portable UniFFI session API. """ - + _UniffiFfiConverterBytes.check_lower(key) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -28682,7 +29596,7 @@ def get_many(self, keys: typing.List[bytes]) -> typing.List[typing.Optional[byte """ Batch point reads while serializing the key set and result only once. """ - + _UniffiFfiConverterSequenceBytes.check_lower(keys) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -28700,7 +29614,7 @@ def scan_conflicts(self, left: ProllyReadSession,right: ProllyReadSession,visito """ Stream genuine three-way conflicts. The receiver is the merge base. """ - + _UniffiFfiConverterTypeProllyReadSession.check_lower(left) _UniffiFfiConverterTypeProllyReadSession.check_lower(right) @@ -28725,7 +29639,7 @@ def scan_range(self, start: bytes,range_end: typing.Optional[bytes],visitor: Ent Stream a half-open range without retransmitting the tree on every operation. Callback records remain owned for compatibility. """ - + _UniffiFfiConverterBytes.check_lower(start) _UniffiFfiConverterOptionalBytes.check_lower(range_end) @@ -28749,7 +29663,7 @@ def scan_range_diff(self, other: ProllyReadSession,start: bytes,range_end: typin """ Stream structural differences against another root-bound session. """ - + _UniffiFfiConverterTypeProllyReadSession.check_lower(other) _UniffiFfiConverterBytes.check_lower(start) @@ -28882,7 +29796,7 @@ class BindingMapSubscriptionProtocol(typing.Protocol): """ Resumable polling subscription with portable owned state. """ - + def last_seen(self, ) -> typing.Optional[bytes]: raise NotImplementedError def poll(self, ) -> typing.Optional[MapChangeEventRecord]: @@ -28892,9 +29806,9 @@ class BindingMapSubscription(BindingMapSubscriptionProtocol): """ Resumable polling subscription with portable owned state. """ - + _handle: ctypes.c_uint64 - + def __init__(self, *args, **kwargs): raise ValueError("This class has no default constructor") @@ -28974,7 +29888,7 @@ class BindingVersionedMapProtocol(typing.Protocol): """ Application-facing managed map with version history and optimistic updates. """ - + def append(self, mutations: typing.List[MutationRecord]) -> MapVersionRecord: raise NotImplementedError def apply(self, mutations: typing.List[MutationRecord]) -> MapVersionRecord: @@ -29126,10 +30040,10 @@ class BindingVersionedMap(BindingVersionedMapProtocol): """ Application-facing managed map with version history and optimistic updates. """ - + _handle: ctypes.c_uint64 def __init__(self, engine: ProllyEngine,id: bytes): - + _UniffiFfiConverterTypeProllyEngine.check_lower(engine) _UniffiFfiConverterBytes.check_lower(id) @@ -29164,7 +30078,7 @@ def _uniffi_make_instance(cls, handle): inst._handle = handle return inst def append(self, mutations: typing.List[MutationRecord]) -> MapVersionRecord: - + _UniffiFfiConverterSequenceTypeMutationRecord.check_lower(mutations) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -29179,7 +30093,7 @@ def append(self, mutations: typing.List[MutationRecord]) -> MapVersionRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def apply(self, mutations: typing.List[MutationRecord]) -> MapVersionRecord: - + _UniffiFfiConverterSequenceTypeMutationRecord.check_lower(mutations) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -29194,7 +30108,7 @@ def apply(self, mutations: typing.List[MutationRecord]) -> MapVersionRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def apply_at_millis(self, mutations: typing.List[MutationRecord],timestamp_millis: int) -> MapVersionRecord: - + _UniffiFfiConverterSequenceTypeMutationRecord.check_lower(mutations) _UniffiFfiConverterUInt64.check_lower(timestamp_millis) @@ -29212,7 +30126,7 @@ def apply_at_millis(self, mutations: typing.List[MutationRecord],timestamp_milli ) return _uniffi_lift_return(_uniffi_ffi_result) def apply_if(self, expected: typing.Optional[bytes],mutations: typing.List[MutationRecord]) -> MapUpdateRecord: - + _UniffiFfiConverterOptionalBytes.check_lower(expected) _UniffiFfiConverterSequenceTypeMutationRecord.check_lower(mutations) @@ -29230,7 +30144,7 @@ def apply_if(self, expected: typing.Optional[bytes],mutations: typing.List[Mutat ) return _uniffi_lift_return(_uniffi_ffi_result) def apply_if_at_millis(self, expected: typing.Optional[bytes],mutations: typing.List[MutationRecord],timestamp_millis: int) -> MapUpdateRecord: - + _UniffiFfiConverterOptionalBytes.check_lower(expected) _UniffiFfiConverterSequenceTypeMutationRecord.check_lower(mutations) @@ -29263,7 +30177,7 @@ def backup(self, ) -> bytes: ) return _uniffi_lift_return(_uniffi_ffi_result) def changes_since(self, base: bytes) -> typing.List[DiffRecord]: - + _UniffiFfiConverterBytes.check_lower(base) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -29278,7 +30192,7 @@ def changes_since(self, base: bytes) -> typing.List[DiffRecord]: ) return _uniffi_lift_return(_uniffi_ffi_result) def compare(self, base: bytes,target: bytes) -> BindingMapComparison: - + _UniffiFfiConverterBytes.check_lower(base) _UniffiFfiConverterBytes.check_lower(target) @@ -29296,7 +30210,7 @@ def compare(self, base: bytes,target: bytes) -> BindingMapComparison: ) return _uniffi_lift_return(_uniffi_ffi_result) def compare_to_head(self, base: bytes) -> BindingMapComparison: - + _UniffiFfiConverterBytes.check_lower(base) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -29311,7 +30225,7 @@ def compare_to_head(self, base: bytes) -> BindingMapComparison: ) return _uniffi_lift_return(_uniffi_ffi_result) def contains_key(self, key: bytes) -> bool: - + _UniffiFfiConverterBytes.check_lower(key) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -29326,7 +30240,7 @@ def contains_key(self, key: bytes) -> bool: ) return _uniffi_lift_return(_uniffi_ffi_result) def delete(self, key: bytes) -> MapVersionRecord: - + _UniffiFfiConverterBytes.check_lower(key) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -29341,7 +30255,7 @@ def delete(self, key: bytes) -> MapVersionRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def delete_if(self, expected: typing.Optional[bytes],key: bytes) -> MapUpdateRecord: - + _UniffiFfiConverterOptionalBytes.check_lower(expected) _UniffiFfiConverterBytes.check_lower(key) @@ -29359,7 +30273,7 @@ def delete_if(self, expected: typing.Optional[bytes],key: bytes) -> MapUpdateRec ) return _uniffi_lift_return(_uniffi_ffi_result) def diff(self, base: bytes,target: bytes) -> typing.List[DiffRecord]: - + _UniffiFfiConverterBytes.check_lower(base) _UniffiFfiConverterBytes.check_lower(target) @@ -29377,7 +30291,7 @@ def diff(self, base: bytes,target: bytes) -> typing.List[DiffRecord]: ) return _uniffi_lift_return(_uniffi_ffi_result) def edit(self, mutations: typing.List[MutationRecord]) -> MapVersionRecord: - + _UniffiFfiConverterSequenceTypeMutationRecord.check_lower(mutations) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -29392,7 +30306,7 @@ def edit(self, mutations: typing.List[MutationRecord]) -> MapVersionRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def edit_if(self, expected: typing.Optional[bytes],mutations: typing.List[MutationRecord]) -> MapUpdateRecord: - + _UniffiFfiConverterOptionalBytes.check_lower(expected) _UniffiFfiConverterSequenceTypeMutationRecord.check_lower(mutations) @@ -29410,7 +30324,7 @@ def edit_if(self, expected: typing.Optional[bytes],mutations: typing.List[Mutati ) return _uniffi_lift_return(_uniffi_ffi_result) def get(self, key: bytes) -> typing.Optional[bytes]: - + _UniffiFfiConverterBytes.check_lower(key) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -29425,7 +30339,7 @@ def get(self, key: bytes) -> typing.Optional[bytes]: ) return _uniffi_lift_return(_uniffi_ffi_result) def get_at(self, id: bytes,key: bytes) -> typing.Optional[bytes]: - + _UniffiFfiConverterBytes.check_lower(id) _UniffiFfiConverterBytes.check_lower(key) @@ -29443,7 +30357,7 @@ def get_at(self, id: bytes,key: bytes) -> typing.Optional[bytes]: ) return _uniffi_lift_return(_uniffi_ffi_result) def get_large_value(self, blob_store: ProllyBlobStore,key: bytes) -> typing.Optional[bytes]: - + _UniffiFfiConverterTypeProllyBlobStore.check_lower(blob_store) _UniffiFfiConverterBytes.check_lower(key) @@ -29461,7 +30375,7 @@ def get_large_value(self, blob_store: ProllyBlobStore,key: bytes) -> typing.Opti ) return _uniffi_lift_return(_uniffi_ffi_result) def get_many(self, keys: typing.List[bytes]) -> typing.List[typing.Optional[bytes]]: - + _UniffiFfiConverterSequenceBytes.check_lower(keys) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -29476,7 +30390,7 @@ def get_many(self, keys: typing.List[bytes]) -> typing.List[typing.Optional[byte ) return _uniffi_lift_return(_uniffi_ffi_result) def get_many_at(self, id: bytes,keys: typing.List[bytes]) -> typing.List[typing.Optional[bytes]]: - + _UniffiFfiConverterBytes.check_lower(id) _UniffiFfiConverterSequenceBytes.check_lower(keys) @@ -29494,7 +30408,7 @@ def get_many_at(self, id: bytes,keys: typing.List[bytes]) -> typing.List[typing. ) return _uniffi_lift_return(_uniffi_ffi_result) def get_value_ref(self, key: bytes) -> typing.Optional[ValueRefRecord]: - + _UniffiFfiConverterBytes.check_lower(key) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -29509,7 +30423,7 @@ def get_value_ref(self, key: bytes) -> typing.Optional[ValueRefRecord]: ) return _uniffi_lift_return(_uniffi_ffi_result) def get_value_ref_at(self, id: bytes,key: bytes) -> typing.Optional[ValueRefRecord]: - + _UniffiFfiConverterBytes.check_lower(id) _UniffiFfiConverterBytes.check_lower(key) @@ -29575,7 +30489,7 @@ def id(self, ) -> bytes: ) return _uniffi_lift_return(_uniffi_ffi_result) def import_as_head(self, bundle: SnapshotBundleRecord) -> MapVersionRecord: - + _UniffiFfiConverterTypeSnapshotBundleRecord.check_lower(bundle) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -29590,7 +30504,7 @@ def import_as_head(self, bundle: SnapshotBundleRecord) -> MapVersionRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def import_as_head_at_millis(self, bundle: SnapshotBundleRecord,timestamp_millis: int) -> MapVersionRecord: - + _UniffiFfiConverterTypeSnapshotBundleRecord.check_lower(bundle) _UniffiFfiConverterUInt64.check_lower(timestamp_millis) @@ -29620,7 +30534,7 @@ def initialize(self, ) -> MapVersionRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def initialize_sorted(self, entries: typing.List[EntryRecord]) -> MapUpdateRecord: - + _UniffiFfiConverterSequenceTypeEntryRecord.check_lower(entries) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -29647,7 +30561,7 @@ def is_initialized(self, ) -> bool: ) return _uniffi_lift_return(_uniffi_ffi_result) def keep_for(self, max_age_millis: int) -> VersionPruneRecord: - + _UniffiFfiConverterUInt64.check_lower(max_age_millis) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -29662,7 +30576,7 @@ def keep_for(self, max_age_millis: int) -> VersionPruneRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def keep_for_at(self, now_millis: int,max_age_millis: int) -> VersionPruneRecord: - + _UniffiFfiConverterUInt64.check_lower(now_millis) _UniffiFfiConverterUInt64.check_lower(max_age_millis) @@ -29680,7 +30594,7 @@ def keep_for_at(self, now_millis: int,max_age_millis: int) -> VersionPruneRecord ) return _uniffi_lift_return(_uniffi_ffi_result) def keep_last(self, count: int) -> VersionPruneRecord: - + _UniffiFfiConverterUInt64.check_lower(count) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -29695,7 +30609,7 @@ def keep_last(self, count: int) -> VersionPruneRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def keep_versions(self, ids: typing.List[bytes]) -> VersionPruneRecord: - + _UniffiFfiConverterSequenceBytes.check_lower(ids) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -29710,7 +30624,7 @@ def keep_versions(self, ids: typing.List[bytes]) -> VersionPruneRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def parallel_apply(self, mutations: typing.List[MutationRecord],config: ParallelConfigRecord) -> VersionedMapBatchResultRecord: - + _UniffiFfiConverterSequenceTypeMutationRecord.check_lower(mutations) _UniffiFfiConverterTypeParallelConfigRecord.check_lower(config) @@ -29728,7 +30642,7 @@ def parallel_apply(self, mutations: typing.List[MutationRecord],config: Parallel ) return _uniffi_lift_return(_uniffi_ffi_result) def plan_blob_gc(self, blob_store: ProllyBlobStore) -> BlobGcPlanRecord: - + _UniffiFfiConverterTypeProllyBlobStore.check_lower(blob_store) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -29755,7 +30669,7 @@ def plan_gc(self, ) -> GcPlanRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def prefix(self, prefix: bytes) -> typing.List[EntryRecord]: - + _UniffiFfiConverterBytes.check_lower(prefix) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -29770,7 +30684,7 @@ def prefix(self, prefix: bytes) -> typing.List[EntryRecord]: ) return _uniffi_lift_return(_uniffi_ffi_result) def prefix_at(self, id: bytes,prefix: bytes) -> typing.List[EntryRecord]: - + _UniffiFfiConverterBytes.check_lower(id) _UniffiFfiConverterBytes.check_lower(prefix) @@ -29788,7 +30702,7 @@ def prefix_at(self, id: bytes,prefix: bytes) -> typing.List[EntryRecord]: ) return _uniffi_lift_return(_uniffi_ffi_result) def prefix_page(self, prefix: bytes,cursor: typing.Optional[RangeCursorRecord],limit: int) -> RangePageRecord: - + _UniffiFfiConverterBytes.check_lower(prefix) _UniffiFfiConverterOptionalTypeRangeCursorRecord.check_lower(cursor) @@ -29809,7 +30723,7 @@ def prefix_page(self, prefix: bytes,cursor: typing.Optional[RangeCursorRecord],l ) return _uniffi_lift_return(_uniffi_ffi_result) def prefix_page_at(self, id: bytes,prefix: bytes,cursor: typing.Optional[RangeCursorRecord],limit: int) -> RangePageRecord: - + _UniffiFfiConverterBytes.check_lower(id) _UniffiFfiConverterBytes.check_lower(prefix) @@ -29833,7 +30747,7 @@ def prefix_page_at(self, id: bytes,prefix: bytes,cursor: typing.Optional[RangeCu ) return _uniffi_lift_return(_uniffi_ffi_result) def prepare_merge(self, base: bytes,candidate: bytes) -> BindingMapMerge: - + _UniffiFfiConverterBytes.check_lower(base) _UniffiFfiConverterBytes.check_lower(candidate) @@ -29851,7 +30765,7 @@ def prepare_merge(self, base: bytes,candidate: bytes) -> BindingMapMerge: ) return _uniffi_lift_return(_uniffi_ffi_result) def prune_versions(self, keep_latest: int) -> VersionPruneRecord: - + _UniffiFfiConverterUInt64.check_lower(keep_latest) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -29866,7 +30780,7 @@ def prune_versions(self, keep_latest: int) -> VersionPruneRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def put(self, key: bytes,value: bytes) -> MapVersionRecord: - + _UniffiFfiConverterBytes.check_lower(key) _UniffiFfiConverterBytes.check_lower(value) @@ -29884,7 +30798,7 @@ def put(self, key: bytes,value: bytes) -> MapVersionRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def put_if(self, expected: typing.Optional[bytes],key: bytes,value: bytes) -> MapUpdateRecord: - + _UniffiFfiConverterOptionalBytes.check_lower(expected) _UniffiFfiConverterBytes.check_lower(key) @@ -29905,7 +30819,7 @@ def put_if(self, expected: typing.Optional[bytes],key: bytes,value: bytes) -> Ma ) return _uniffi_lift_return(_uniffi_ffi_result) def put_large_value(self, blob_store: ProllyBlobStore,key: bytes,value: bytes,config: LargeValueConfigRecord) -> MapVersionRecord: - + _UniffiFfiConverterTypeProllyBlobStore.check_lower(blob_store) _UniffiFfiConverterBytes.check_lower(key) @@ -29929,7 +30843,7 @@ def put_large_value(self, blob_store: ProllyBlobStore,key: bytes,value: bytes,co ) return _uniffi_lift_return(_uniffi_ffi_result) def put_large_value_if(self, blob_store: ProllyBlobStore,expected: typing.Optional[bytes],key: bytes,value: bytes,config: LargeValueConfigRecord) -> MapUpdateRecord: - + _UniffiFfiConverterTypeProllyBlobStore.check_lower(blob_store) _UniffiFfiConverterOptionalBytes.check_lower(expected) @@ -29956,7 +30870,7 @@ def put_large_value_if(self, blob_store: ProllyBlobStore,expected: typing.Option ) return _uniffi_lift_return(_uniffi_ffi_result) def range(self, start: bytes,range_end: typing.Optional[bytes]) -> typing.List[EntryRecord]: - + _UniffiFfiConverterBytes.check_lower(start) _UniffiFfiConverterOptionalBytes.check_lower(range_end) @@ -29974,7 +30888,7 @@ def range(self, start: bytes,range_end: typing.Optional[bytes]) -> typing.List[E ) return _uniffi_lift_return(_uniffi_ffi_result) def range_at(self, id: bytes,start: bytes,range_end: typing.Optional[bytes]) -> typing.List[EntryRecord]: - + _UniffiFfiConverterBytes.check_lower(id) _UniffiFfiConverterBytes.check_lower(start) @@ -29995,7 +30909,7 @@ def range_at(self, id: bytes,start: bytes,range_end: typing.Optional[bytes]) -> ) return _uniffi_lift_return(_uniffi_ffi_result) def range_page(self, cursor: typing.Optional[RangeCursorRecord],range_end: typing.Optional[bytes],limit: int) -> RangePageRecord: - + _UniffiFfiConverterOptionalTypeRangeCursorRecord.check_lower(cursor) _UniffiFfiConverterOptionalBytes.check_lower(range_end) @@ -30016,7 +30930,7 @@ def range_page(self, cursor: typing.Optional[RangeCursorRecord],range_end: typin ) return _uniffi_lift_return(_uniffi_ffi_result) def range_page_at(self, id: bytes,cursor: typing.Optional[RangeCursorRecord],range_end: typing.Optional[bytes],limit: int) -> RangePageRecord: - + _UniffiFfiConverterBytes.check_lower(id) _UniffiFfiConverterOptionalTypeRangeCursorRecord.check_lower(cursor) @@ -30052,7 +30966,7 @@ def read_session(self, ) -> typing.Optional[ProllyReadSession]: ) return _uniffi_lift_return(_uniffi_ffi_result) def rebuild_from_entries_if(self, expected: typing.Optional[bytes],entries: typing.List[EntryRecord]) -> MapUpdateRecord: - + _UniffiFfiConverterOptionalBytes.check_lower(expected) _UniffiFfiConverterSequenceTypeEntryRecord.check_lower(entries) @@ -30070,7 +30984,7 @@ def rebuild_from_entries_if(self, expected: typing.Optional[bytes],entries: typi ) return _uniffi_lift_return(_uniffi_ffi_result) def rebuild_from_iter_if(self, expected: typing.Optional[bytes],entries: typing.List[EntryRecord]) -> MapUpdateRecord: - + _UniffiFfiConverterOptionalBytes.check_lower(expected) _UniffiFfiConverterSequenceTypeEntryRecord.check_lower(entries) @@ -30088,7 +31002,7 @@ def rebuild_from_iter_if(self, expected: typing.Optional[bytes],entries: typing. ) return _uniffi_lift_return(_uniffi_ffi_result) def rebuild_sorted_if(self, expected: typing.Optional[bytes],entries: typing.List[EntryRecord]) -> MapUpdateRecord: - + _UniffiFfiConverterOptionalBytes.check_lower(expected) _UniffiFfiConverterSequenceTypeEntryRecord.check_lower(entries) @@ -30106,7 +31020,7 @@ def rebuild_sorted_if(self, expected: typing.Optional[bytes],entries: typing.Lis ) return _uniffi_lift_return(_uniffi_ffi_result) def restore_backup(self, bytes: bytes) -> MapVersionRecord: - + _UniffiFfiConverterBytes.check_lower(bytes) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -30133,7 +31047,7 @@ def retention_policy(self, ) -> NamedRootRetentionRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def rollback_to(self, id: bytes) -> MapVersionRecord: - + _UniffiFfiConverterBytes.check_lower(id) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -30148,7 +31062,7 @@ def rollback_to(self, id: bytes) -> MapVersionRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def scan_prefix(self, prefix: bytes,visitor: EntryVisitorCallback) -> ScanOutcomeRecord: - + _UniffiFfiConverterBytes.check_lower(prefix) _UniffiFfiConverterTypeEntryVisitorCallback.check_lower(visitor) @@ -30166,7 +31080,7 @@ def scan_prefix(self, prefix: bytes,visitor: EntryVisitorCallback) -> ScanOutcom ) return _uniffi_lift_return(_uniffi_ffi_result) def scan_prefix_at(self, id: bytes,prefix: bytes,visitor: EntryVisitorCallback) -> ScanOutcomeRecord: - + _UniffiFfiConverterBytes.check_lower(id) _UniffiFfiConverterBytes.check_lower(prefix) @@ -30187,7 +31101,7 @@ def scan_prefix_at(self, id: bytes,prefix: bytes,visitor: EntryVisitorCallback) ) return _uniffi_lift_return(_uniffi_ffi_result) def scan_range(self, start: bytes,range_end: typing.Optional[bytes],visitor: EntryVisitorCallback) -> ScanOutcomeRecord: - + _UniffiFfiConverterBytes.check_lower(start) _UniffiFfiConverterOptionalBytes.check_lower(range_end) @@ -30208,7 +31122,7 @@ def scan_range(self, start: bytes,range_end: typing.Optional[bytes],visitor: Ent ) return _uniffi_lift_return(_uniffi_ffi_result) def scan_range_at(self, id: bytes,start: bytes,range_end: typing.Optional[bytes],visitor: EntryVisitorCallback) -> ScanOutcomeRecord: - + _UniffiFfiConverterBytes.check_lower(id) _UniffiFfiConverterBytes.check_lower(start) @@ -30244,7 +31158,7 @@ def snapshot(self, ) -> typing.Optional[BindingMapSnapshot]: ) return _uniffi_lift_return(_uniffi_ffi_result) def snapshot_at(self, id: bytes) -> typing.Optional[BindingMapSnapshot]: - + _UniffiFfiConverterBytes.check_lower(id) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -30271,7 +31185,7 @@ def subscribe(self, ) -> BindingMapSubscription: ) return _uniffi_lift_return(_uniffi_ffi_result) def subscribe_from(self, last_seen: typing.Optional[bytes]) -> BindingMapSubscription: - + _UniffiFfiConverterOptionalBytes.check_lower(last_seen) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -30286,7 +31200,7 @@ def subscribe_from(self, last_seen: typing.Optional[bytes]) -> BindingMapSubscri ) return _uniffi_lift_return(_uniffi_ffi_result) def sweep_blob_gc(self, blob_store: ProllyBlobStore) -> BlobGcSweepRecord: - + _UniffiFfiConverterTypeProllyBlobStore.check_lower(blob_store) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -30325,7 +31239,7 @@ def verify_catalog(self, ) -> MapCatalogVerificationRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def version(self, id: bytes) -> typing.Optional[MapVersionRecord]: - + _UniffiFfiConverterBytes.check_lower(id) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -30395,7 +31309,7 @@ def write(cls, value: BindingVersionedMap, buf: _UniffiRustBuffer): class ProllyEngineProtocol(typing.Protocol): - + def append_batch(self, tree: TreeRecord,mutations: typing.List[MutationRecord]) -> TreeRecord: raise NotImplementedError def append_batch_with_stats(self, tree: TreeRecord,mutations: typing.List[MutationRecord]) -> BatchApplyResultRecord: @@ -30709,11 +31623,11 @@ def versioned_map(self, id: bytes) -> BindingVersionedMap: raise NotImplementedError class ProllyEngine(ProllyEngineProtocol): - + _handle: ctypes.c_uint64 @classmethod def custom_store(cls, callback: HostStoreCallback,config: ConfigRecord) -> ProllyEngine: - + _UniffiFfiConverterTypeHostStoreCallback.check_lower(callback) _UniffiFfiConverterTypeConfigRecord.check_lower(config) @@ -30731,7 +31645,7 @@ def custom_store(cls, callback: HostStoreCallback,config: ConfigRecord) -> Proll return cls._uniffi_make_instance(_uniffi_ffi_result) @classmethod def file(cls, path: str,config: ConfigRecord) -> ProllyEngine: - + _UniffiFfiConverterString.check_lower(path) _UniffiFfiConverterTypeConfigRecord.check_lower(config) @@ -30749,7 +31663,7 @@ def file(cls, path: str,config: ConfigRecord) -> ProllyEngine: return cls._uniffi_make_instance(_uniffi_ffi_result) @classmethod def memory(cls, config: ConfigRecord) -> ProllyEngine: - + _UniffiFfiConverterTypeConfigRecord.check_lower(config) _uniffi_lowered_args = ( _UniffiFfiConverterTypeConfigRecord.lower(config), @@ -30764,7 +31678,7 @@ def memory(cls, config: ConfigRecord) -> ProllyEngine: return cls._uniffi_make_instance(_uniffi_ffi_result) @classmethod def sqlite(cls, path: str,config: ConfigRecord) -> ProllyEngine: - + _UniffiFfiConverterString.check_lower(path) _UniffiFfiConverterTypeConfigRecord.check_lower(config) @@ -30782,7 +31696,7 @@ def sqlite(cls, path: str,config: ConfigRecord) -> ProllyEngine: return cls._uniffi_make_instance(_uniffi_ffi_result) @classmethod def sqlite_in_memory(cls, config: ConfigRecord) -> ProllyEngine: - + _UniffiFfiConverterTypeConfigRecord.check_lower(config) _uniffi_lowered_args = ( _UniffiFfiConverterTypeConfigRecord.lower(config), @@ -30795,7 +31709,7 @@ def sqlite_in_memory(cls, config: ConfigRecord) -> ProllyEngine: *_uniffi_lowered_args, ) return cls._uniffi_make_instance(_uniffi_ffi_result) - + def __init__(self, *args, **kwargs): raise ValueError("This class has no default constructor") @@ -30817,7 +31731,7 @@ def _uniffi_make_instance(cls, handle): inst._handle = handle return inst def append_batch(self, tree: TreeRecord,mutations: typing.List[MutationRecord]) -> TreeRecord: - + _UniffiFfiConverterTypeTreeRecord.check_lower(tree) _UniffiFfiConverterSequenceTypeMutationRecord.check_lower(mutations) @@ -30835,7 +31749,7 @@ def append_batch(self, tree: TreeRecord,mutations: typing.List[MutationRecord]) ) return _uniffi_lift_return(_uniffi_ffi_result) def append_batch_with_stats(self, tree: TreeRecord,mutations: typing.List[MutationRecord]) -> BatchApplyResultRecord: - + _UniffiFfiConverterTypeTreeRecord.check_lower(tree) _UniffiFfiConverterSequenceTypeMutationRecord.check_lower(mutations) @@ -30853,7 +31767,7 @@ def append_batch_with_stats(self, tree: TreeRecord,mutations: typing.List[Mutati ) return _uniffi_lift_return(_uniffi_ffi_result) def batch(self, tree: TreeRecord,mutations: typing.List[MutationRecord]) -> TreeRecord: - + _UniffiFfiConverterTypeTreeRecord.check_lower(tree) _UniffiFfiConverterSequenceTypeMutationRecord.check_lower(mutations) @@ -30871,7 +31785,7 @@ def batch(self, tree: TreeRecord,mutations: typing.List[MutationRecord]) -> Tree ) return _uniffi_lift_return(_uniffi_ffi_result) def batch_with_stats(self, tree: TreeRecord,mutations: typing.List[MutationRecord]) -> BatchApplyResultRecord: - + _UniffiFfiConverterTypeTreeRecord.check_lower(tree) _UniffiFfiConverterSequenceTypeMutationRecord.check_lower(mutations) @@ -30913,7 +31827,7 @@ def begin_versioned_transaction(self, ) -> BindingVersionedTransaction: ) return _uniffi_lift_return(_uniffi_ffi_result) def build_from_entries(self, entries: typing.List[EntryRecord]) -> TreeRecord: - + _UniffiFfiConverterSequenceTypeEntryRecord.check_lower(entries) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -30928,7 +31842,7 @@ def build_from_entries(self, entries: typing.List[EntryRecord]) -> TreeRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def build_from_sorted_entries(self, entries: typing.List[EntryRecord]) -> TreeRecord: - + _UniffiFfiConverterSequenceTypeEntryRecord.check_lower(entries) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -30947,7 +31861,7 @@ def build_proximity_map(self, config: ProximityConfigRecord,records: typing.List Canonically build one immutable proximity map and return its descriptor-bound application handle. """ - + _UniffiFfiConverterTypeProximityConfigRecord.check_lower(config) _UniffiFfiConverterSequenceTypeProximityRecordRecord.check_lower(records) @@ -30992,7 +31906,7 @@ def clear_cache(self, ) -> None: ) return _uniffi_lift_return(_uniffi_ffi_result) def collect_stats(self, tree: TreeRecord) -> TreeStatsRecord: - + _UniffiFfiConverterTypeTreeRecord.check_lower(tree) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -31007,7 +31921,7 @@ def collect_stats(self, tree: TreeRecord) -> TreeStatsRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def collect_stats_json(self, tree: TreeRecord) -> JsonDocumentRecord: - + _UniffiFfiConverterTypeTreeRecord.check_lower(tree) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -31022,7 +31936,7 @@ def collect_stats_json(self, tree: TreeRecord) -> JsonDocumentRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def compare_and_swap_named_root(self, name: bytes,expected: typing.Optional[TreeRecord],replacement: typing.Optional[TreeRecord]) -> NamedRootUpdateRecord: - + _UniffiFfiConverterBytes.check_lower(name) _UniffiFfiConverterOptionalTypeTreeRecord.check_lower(expected) @@ -31043,7 +31957,7 @@ def compare_and_swap_named_root(self, name: bytes,expected: typing.Optional[Tree ) return _uniffi_lift_return(_uniffi_ffi_result) def compare_and_swap_named_root_at_millis(self, name: bytes,expected: typing.Optional[TreeRecord],replacement: typing.Optional[TreeRecord],timestamp_millis: int) -> NamedRootUpdateRecord: - + _UniffiFfiConverterBytes.check_lower(name) _UniffiFfiConverterOptionalTypeTreeRecord.check_lower(expected) @@ -31067,7 +31981,7 @@ def compare_and_swap_named_root_at_millis(self, name: bytes,expected: typing.Opt ) return _uniffi_lift_return(_uniffi_ffi_result) def compare_and_swap_snapshot(self, namespace: SnapshotNamespaceRecord,id: bytes,expected: typing.Optional[TreeRecord],replacement: typing.Optional[TreeRecord]) -> NamedRootUpdateRecord: - + _UniffiFfiConverterTypeSnapshotNamespaceRecord.check_lower(namespace) _UniffiFfiConverterBytes.check_lower(id) @@ -31091,7 +32005,7 @@ def compare_and_swap_snapshot(self, namespace: SnapshotNamespaceRecord,id: bytes ) return _uniffi_lift_return(_uniffi_ffi_result) def compare_and_swap_snapshot_at_millis(self, namespace: SnapshotNamespaceRecord,id: bytes,expected: typing.Optional[TreeRecord],replacement: typing.Optional[TreeRecord],timestamp_millis: int) -> NamedRootUpdateRecord: - + _UniffiFfiConverterTypeSnapshotNamespaceRecord.check_lower(namespace) _UniffiFfiConverterBytes.check_lower(id) @@ -31118,7 +32032,7 @@ def compare_and_swap_snapshot_at_millis(self, namespace: SnapshotNamespaceRecord ) return _uniffi_lift_return(_uniffi_ffi_result) def conflict_page(self, base: TreeRecord,left: TreeRecord,right: TreeRecord,cursor: typing.Optional[RangeCursorRecord],limit: int) -> ConflictPageRecord: - + _UniffiFfiConverterTypeTreeRecord.check_lower(base) _UniffiFfiConverterTypeTreeRecord.check_lower(left) @@ -31145,7 +32059,7 @@ def conflict_page(self, base: TreeRecord,left: TreeRecord,right: TreeRecord,curs ) return _uniffi_lift_return(_uniffi_ffi_result) def copy_missing_nodes(self, tree: TreeRecord,destination: ProllyEngine) -> MissingNodeCopyRecord: - + _UniffiFfiConverterTypeTreeRecord.check_lower(tree) _UniffiFfiConverterTypeProllyEngine.check_lower(destination) @@ -31163,7 +32077,7 @@ def copy_missing_nodes(self, tree: TreeRecord,destination: ProllyEngine) -> Miss ) return _uniffi_lift_return(_uniffi_ffi_result) def crdt_merge(self, base: TreeRecord,left: TreeRecord,right: TreeRecord,config: CrdtConfigRecord) -> TreeRecord: - + _UniffiFfiConverterTypeTreeRecord.check_lower(base) _UniffiFfiConverterTypeTreeRecord.check_lower(left) @@ -31187,7 +32101,7 @@ def crdt_merge(self, base: TreeRecord,left: TreeRecord,right: TreeRecord,config: ) return _uniffi_lift_return(_uniffi_ffi_result) def crdt_merge_with_resolver(self, base: TreeRecord,left: TreeRecord,right: TreeRecord,delete_policy: CrdtDeletePolicyKind,resolver: CrdtResolverCallback) -> TreeRecord: - + _UniffiFfiConverterTypeTreeRecord.check_lower(base) _UniffiFfiConverterTypeTreeRecord.check_lower(left) @@ -31226,7 +32140,7 @@ def create(self, ) -> TreeRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def cursor_window(self, tree: TreeRecord,key: bytes,range_end: typing.Optional[bytes],limit: int) -> CursorWindowRecord: - + _UniffiFfiConverterTypeTreeRecord.check_lower(tree) _UniffiFfiConverterBytes.check_lower(key) @@ -31250,7 +32164,7 @@ def cursor_window(self, tree: TreeRecord,key: bytes,range_end: typing.Optional[b ) return _uniffi_lift_return(_uniffi_ffi_result) def debug_compare_trees(self, left: TreeRecord,right: TreeRecord) -> TreeDebugComparisonRecord: - + _UniffiFfiConverterTypeTreeRecord.check_lower(left) _UniffiFfiConverterTypeTreeRecord.check_lower(right) @@ -31268,7 +32182,7 @@ def debug_compare_trees(self, left: TreeRecord,right: TreeRecord) -> TreeDebugCo ) return _uniffi_lift_return(_uniffi_ffi_result) def debug_compare_trees_json(self, left: TreeRecord,right: TreeRecord) -> JsonDocumentRecord: - + _UniffiFfiConverterTypeTreeRecord.check_lower(left) _UniffiFfiConverterTypeTreeRecord.check_lower(right) @@ -31286,7 +32200,7 @@ def debug_compare_trees_json(self, left: TreeRecord,right: TreeRecord) -> JsonDo ) return _uniffi_lift_return(_uniffi_ffi_result) def debug_compare_trees_text(self, left: TreeRecord,right: TreeRecord) -> str: - + _UniffiFfiConverterTypeTreeRecord.check_lower(left) _UniffiFfiConverterTypeTreeRecord.check_lower(right) @@ -31304,7 +32218,7 @@ def debug_compare_trees_text(self, left: TreeRecord,right: TreeRecord) -> str: ) return _uniffi_lift_return(_uniffi_ffi_result) def debug_tree(self, tree: TreeRecord) -> TreeDebugViewRecord: - + _UniffiFfiConverterTypeTreeRecord.check_lower(tree) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -31319,7 +32233,7 @@ def debug_tree(self, tree: TreeRecord) -> TreeDebugViewRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def debug_tree_json(self, tree: TreeRecord) -> JsonDocumentRecord: - + _UniffiFfiConverterTypeTreeRecord.check_lower(tree) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -31334,7 +32248,7 @@ def debug_tree_json(self, tree: TreeRecord) -> JsonDocumentRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def debug_tree_text(self, tree: TreeRecord) -> str: - + _UniffiFfiConverterTypeTreeRecord.check_lower(tree) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -31349,7 +32263,7 @@ def debug_tree_text(self, tree: TreeRecord) -> str: ) return _uniffi_lift_return(_uniffi_ffi_result) def delete(self, tree: TreeRecord,key: bytes) -> TreeRecord: - + _UniffiFfiConverterTypeTreeRecord.check_lower(tree) _UniffiFfiConverterBytes.check_lower(key) @@ -31367,7 +32281,7 @@ def delete(self, tree: TreeRecord,key: bytes) -> TreeRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def delete_named_root(self, name: bytes) -> None: - + _UniffiFfiConverterBytes.check_lower(name) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -31385,7 +32299,7 @@ def delete_range(self, tree: TreeRecord,start: bytes,range_end: bytes) -> TreeRe """ Delete every raw-byte key in the half-open range `[start, end)`. """ - + _UniffiFfiConverterTypeTreeRecord.check_lower(tree) _UniffiFfiConverterBytes.check_lower(start) @@ -31409,7 +32323,7 @@ def delete_range_with_stats(self, tree: TreeRecord,start: bytes,range_end: bytes """ Delete every raw-byte key in `[start, end)` and return write statistics. """ - + _UniffiFfiConverterTypeTreeRecord.check_lower(tree) _UniffiFfiConverterBytes.check_lower(start) @@ -31430,7 +32344,7 @@ def delete_range_with_stats(self, tree: TreeRecord,start: bytes,range_end: bytes ) return _uniffi_lift_return(_uniffi_ffi_result) def delete_snapshot(self, namespace: SnapshotNamespaceRecord,id: bytes) -> None: - + _UniffiFfiConverterTypeSnapshotNamespaceRecord.check_lower(namespace) _UniffiFfiConverterBytes.check_lower(id) @@ -31448,7 +32362,7 @@ def delete_snapshot(self, namespace: SnapshotNamespaceRecord,id: bytes) -> None: ) return _uniffi_lift_return(_uniffi_ffi_result) def diff(self, base: TreeRecord,other: TreeRecord) -> typing.List[DiffRecord]: - + _UniffiFfiConverterTypeTreeRecord.check_lower(base) _UniffiFfiConverterTypeTreeRecord.check_lower(other) @@ -31466,7 +32380,7 @@ def diff(self, base: TreeRecord,other: TreeRecord) -> typing.List[DiffRecord]: ) return _uniffi_lift_return(_uniffi_ffi_result) def diff_from_cursor(self, base: TreeRecord,other: TreeRecord,cursor: typing.Optional[RangeCursorRecord],range_end: typing.Optional[bytes]) -> typing.List[DiffRecord]: - + _UniffiFfiConverterTypeTreeRecord.check_lower(base) _UniffiFfiConverterTypeTreeRecord.check_lower(other) @@ -31490,7 +32404,7 @@ def diff_from_cursor(self, base: TreeRecord,other: TreeRecord,cursor: typing.Opt ) return _uniffi_lift_return(_uniffi_ffi_result) def diff_page(self, base: TreeRecord,other: TreeRecord,cursor: typing.Optional[RangeCursorRecord],range_end: typing.Optional[bytes],limit: int) -> DiffPageRecord: - + _UniffiFfiConverterTypeTreeRecord.check_lower(base) _UniffiFfiConverterTypeTreeRecord.check_lower(other) @@ -31517,7 +32431,7 @@ def diff_page(self, base: TreeRecord,other: TreeRecord,cursor: typing.Optional[R ) return _uniffi_lift_return(_uniffi_ffi_result) def export_snapshot(self, tree: TreeRecord) -> SnapshotBundleRecord: - + _UniffiFfiConverterTypeTreeRecord.check_lower(tree) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -31532,7 +32446,7 @@ def export_snapshot(self, tree: TreeRecord) -> SnapshotBundleRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def first_entry(self, tree: TreeRecord) -> typing.Optional[EntryRecord]: - + _UniffiFfiConverterTypeTreeRecord.check_lower(tree) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -31547,7 +32461,7 @@ def first_entry(self, tree: TreeRecord) -> typing.Optional[EntryRecord]: ) return _uniffi_lift_return(_uniffi_ffi_result) def get(self, tree: TreeRecord,key: bytes) -> typing.Optional[bytes]: - + _UniffiFfiConverterTypeTreeRecord.check_lower(tree) _UniffiFfiConverterBytes.check_lower(key) @@ -31565,7 +32479,7 @@ def get(self, tree: TreeRecord,key: bytes) -> typing.Optional[bytes]: ) return _uniffi_lift_return(_uniffi_ffi_result) def get_large_value(self, blob_store: ProllyBlobStore,tree: TreeRecord,key: bytes) -> typing.Optional[bytes]: - + _UniffiFfiConverterTypeProllyBlobStore.check_lower(blob_store) _UniffiFfiConverterTypeTreeRecord.check_lower(tree) @@ -31586,7 +32500,7 @@ def get_large_value(self, blob_store: ProllyBlobStore,tree: TreeRecord,key: byte ) return _uniffi_lift_return(_uniffi_ffi_result) def get_many(self, tree: TreeRecord,keys: typing.List[bytes]) -> typing.List[typing.Optional[bytes]]: - + _UniffiFfiConverterTypeTreeRecord.check_lower(tree) _UniffiFfiConverterSequenceBytes.check_lower(keys) @@ -31604,7 +32518,7 @@ def get_many(self, tree: TreeRecord,keys: typing.List[bytes]) -> typing.List[typ ) return _uniffi_lift_return(_uniffi_ffi_result) def get_value_ref(self, tree: TreeRecord,key: bytes) -> typing.Optional[ValueRefRecord]: - + _UniffiFfiConverterTypeTreeRecord.check_lower(tree) _UniffiFfiConverterBytes.check_lower(key) @@ -31622,7 +32536,7 @@ def get_value_ref(self, tree: TreeRecord,key: bytes) -> typing.Optional[ValueRef ) return _uniffi_lift_return(_uniffi_ffi_result) def hydrate_prefix_path_hint(self, tree: TreeRecord,prefix: bytes) -> bool: - + _UniffiFfiConverterTypeTreeRecord.check_lower(tree) _UniffiFfiConverterBytes.check_lower(prefix) @@ -31640,7 +32554,7 @@ def hydrate_prefix_path_hint(self, tree: TreeRecord,prefix: bytes) -> bool: ) return _uniffi_lift_return(_uniffi_ffi_result) def import_snapshot(self, bundle: SnapshotBundleRecord) -> TreeRecord: - + _UniffiFfiConverterTypeSnapshotBundleRecord.check_lower(bundle) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -31659,7 +32573,7 @@ def indexed_map(self, id: bytes,registry: BindingIndexRegistry) -> BindingIndexe Open an application-facing indexed map using a frozen snapshot of the supplied extractor registry. """ - + _UniffiFfiConverterBytes.check_lower(id) _UniffiFfiConverterTypeBindingIndexRegistry.check_lower(registry) @@ -31677,7 +32591,7 @@ def indexed_map(self, id: bytes,registry: BindingIndexRegistry) -> BindingIndexe ) return _uniffi_lift_return(_uniffi_ffi_result) def last_entry(self, tree: TreeRecord) -> typing.Optional[EntryRecord]: - + _UniffiFfiConverterTypeTreeRecord.check_lower(tree) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -31728,7 +32642,7 @@ def list_node_cids(self, ) -> typing.List[bytes]: ) return _uniffi_lift_return(_uniffi_ffi_result) def list_snapshots(self, namespace: SnapshotNamespaceRecord) -> typing.List[SnapshotRecord]: - + _UniffiFfiConverterTypeSnapshotNamespaceRecord.check_lower(namespace) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -31743,7 +32657,7 @@ def list_snapshots(self, namespace: SnapshotNamespaceRecord) -> typing.List[Snap ) return _uniffi_lift_return(_uniffi_ffi_result) def load_changed_spans_hint(self, base: TreeRecord,changed: TreeRecord) -> typing.Optional[ChangedSpanHintRecord]: - + _UniffiFfiConverterTypeTreeRecord.check_lower(base) _UniffiFfiConverterTypeTreeRecord.check_lower(changed) @@ -31761,7 +32675,7 @@ def load_changed_spans_hint(self, base: TreeRecord,changed: TreeRecord) -> typin ) return _uniffi_lift_return(_uniffi_ffi_result) def load_named_root(self, name: bytes) -> typing.Optional[TreeRecord]: - + _UniffiFfiConverterBytes.check_lower(name) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -31776,7 +32690,7 @@ def load_named_root(self, name: bytes) -> typing.Optional[TreeRecord]: ) return _uniffi_lift_return(_uniffi_ffi_result) def load_named_roots(self, names: typing.List[bytes]) -> NamedRootSelectionRecord: - + _UniffiFfiConverterSequenceBytes.check_lower(names) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -31795,7 +32709,7 @@ def load_proximity_map(self, descriptor: bytes) -> BindingProximityMap: Reopen and validate an immutable proximity descriptor from this engine's content store. """ - + _UniffiFfiConverterBytes.check_lower(descriptor) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -31810,7 +32724,7 @@ def load_proximity_map(self, descriptor: bytes) -> BindingProximityMap: ) return _uniffi_lift_return(_uniffi_ffi_result) def load_retained_named_roots(self, retention: NamedRootRetentionRecord) -> NamedRootSelectionRecord: - + _UniffiFfiConverterTypeNamedRootRetentionRecord.check_lower(retention) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -31825,7 +32739,7 @@ def load_retained_named_roots(self, retention: NamedRootRetentionRecord) -> Name ) return _uniffi_lift_return(_uniffi_ffi_result) def load_snapshot(self, namespace: SnapshotNamespaceRecord,id: bytes) -> typing.Optional[TreeRecord]: - + _UniffiFfiConverterTypeSnapshotNamespaceRecord.check_lower(namespace) _UniffiFfiConverterBytes.check_lower(id) @@ -31843,7 +32757,7 @@ def load_snapshot(self, namespace: SnapshotNamespaceRecord,id: bytes) -> typing. ) return _uniffi_lift_return(_uniffi_ffi_result) def load_snapshots(self, namespace: SnapshotNamespaceRecord,ids: typing.List[bytes]) -> SnapshotSelectionRecord: - + _UniffiFfiConverterTypeSnapshotNamespaceRecord.check_lower(namespace) _UniffiFfiConverterSequenceBytes.check_lower(ids) @@ -31861,7 +32775,7 @@ def load_snapshots(self, namespace: SnapshotNamespaceRecord,ids: typing.List[byt ) return _uniffi_lift_return(_uniffi_ffi_result) def lower_bound(self, tree: TreeRecord,key: bytes) -> typing.Optional[EntryRecord]: - + _UniffiFfiConverterTypeTreeRecord.check_lower(tree) _UniffiFfiConverterBytes.check_lower(key) @@ -31879,7 +32793,7 @@ def lower_bound(self, tree: TreeRecord,key: bytes) -> typing.Optional[EntryRecor ) return _uniffi_lift_return(_uniffi_ffi_result) def mark_reachable(self, roots: typing.List[TreeRecord]) -> GcReachabilityRecord: - + _UniffiFfiConverterSequenceTypeTreeRecord.check_lower(roots) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -31894,7 +32808,7 @@ def mark_reachable(self, roots: typing.List[TreeRecord]) -> GcReachabilityRecord ) return _uniffi_lift_return(_uniffi_ffi_result) def mark_reachable_blobs(self, roots: typing.List[TreeRecord]) -> BlobGcReachabilityRecord: - + _UniffiFfiConverterSequenceTypeTreeRecord.check_lower(roots) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -31909,7 +32823,7 @@ def mark_reachable_blobs(self, roots: typing.List[TreeRecord]) -> BlobGcReachabi ) return _uniffi_lift_return(_uniffi_ffi_result) def merge(self, base: TreeRecord,left: TreeRecord,right: TreeRecord,resolver: typing.Optional[str]) -> TreeRecord: - + _UniffiFfiConverterTypeTreeRecord.check_lower(base) _UniffiFfiConverterTypeTreeRecord.check_lower(left) @@ -31933,7 +32847,7 @@ def merge(self, base: TreeRecord,left: TreeRecord,right: TreeRecord,resolver: ty ) return _uniffi_lift_return(_uniffi_ffi_result) def merge_explain(self, base: TreeRecord,left: TreeRecord,right: TreeRecord,resolver: typing.Optional[str]) -> MergeExplanationRecord: - + _UniffiFfiConverterTypeTreeRecord.check_lower(base) _UniffiFfiConverterTypeTreeRecord.check_lower(left) @@ -31957,7 +32871,7 @@ def merge_explain(self, base: TreeRecord,left: TreeRecord,right: TreeRecord,reso ) return _uniffi_lift_return(_uniffi_ffi_result) def merge_explain_with_policy(self, base: TreeRecord,left: TreeRecord,right: TreeRecord,policy: MergePolicyRegistry) -> MergeExplanationRecord: - + _UniffiFfiConverterTypeTreeRecord.check_lower(base) _UniffiFfiConverterTypeTreeRecord.check_lower(left) @@ -31981,7 +32895,7 @@ def merge_explain_with_policy(self, base: TreeRecord,left: TreeRecord,right: Tre ) return _uniffi_lift_return(_uniffi_ffi_result) def merge_explain_with_resolver(self, base: TreeRecord,left: TreeRecord,right: TreeRecord,resolver: MergeResolverCallback) -> MergeExplanationRecord: - + _UniffiFfiConverterTypeTreeRecord.check_lower(base) _UniffiFfiConverterTypeTreeRecord.check_lower(left) @@ -32005,7 +32919,7 @@ def merge_explain_with_resolver(self, base: TreeRecord,left: TreeRecord,right: T ) return _uniffi_lift_return(_uniffi_ffi_result) def merge_prefix(self, base: TreeRecord,left: TreeRecord,right: TreeRecord,prefix: bytes,resolver: typing.Optional[str]) -> TreeRecord: - + _UniffiFfiConverterTypeTreeRecord.check_lower(base) _UniffiFfiConverterTypeTreeRecord.check_lower(left) @@ -32032,7 +32946,7 @@ def merge_prefix(self, base: TreeRecord,left: TreeRecord,right: TreeRecord,prefi ) return _uniffi_lift_return(_uniffi_ffi_result) def merge_prefix_with_policy(self, base: TreeRecord,left: TreeRecord,right: TreeRecord,prefix: bytes,policy: MergePolicyRegistry) -> TreeRecord: - + _UniffiFfiConverterTypeTreeRecord.check_lower(base) _UniffiFfiConverterTypeTreeRecord.check_lower(left) @@ -32059,7 +32973,7 @@ def merge_prefix_with_policy(self, base: TreeRecord,left: TreeRecord,right: Tree ) return _uniffi_lift_return(_uniffi_ffi_result) def merge_prefix_with_resolver(self, base: TreeRecord,left: TreeRecord,right: TreeRecord,prefix: bytes,resolver: MergeResolverCallback) -> TreeRecord: - + _UniffiFfiConverterTypeTreeRecord.check_lower(base) _UniffiFfiConverterTypeTreeRecord.check_lower(left) @@ -32086,7 +33000,7 @@ def merge_prefix_with_resolver(self, base: TreeRecord,left: TreeRecord,right: Tr ) return _uniffi_lift_return(_uniffi_ffi_result) def merge_range(self, base: TreeRecord,left: TreeRecord,right: TreeRecord,start: bytes,range_end: typing.Optional[bytes],resolver: typing.Optional[str]) -> TreeRecord: - + _UniffiFfiConverterTypeTreeRecord.check_lower(base) _UniffiFfiConverterTypeTreeRecord.check_lower(left) @@ -32116,7 +33030,7 @@ def merge_range(self, base: TreeRecord,left: TreeRecord,right: TreeRecord,start: ) return _uniffi_lift_return(_uniffi_ffi_result) def merge_range_with_policy(self, base: TreeRecord,left: TreeRecord,right: TreeRecord,start: bytes,range_end: typing.Optional[bytes],policy: MergePolicyRegistry) -> TreeRecord: - + _UniffiFfiConverterTypeTreeRecord.check_lower(base) _UniffiFfiConverterTypeTreeRecord.check_lower(left) @@ -32146,7 +33060,7 @@ def merge_range_with_policy(self, base: TreeRecord,left: TreeRecord,right: TreeR ) return _uniffi_lift_return(_uniffi_ffi_result) def merge_range_with_resolver(self, base: TreeRecord,left: TreeRecord,right: TreeRecord,start: bytes,range_end: typing.Optional[bytes],resolver: MergeResolverCallback) -> TreeRecord: - + _UniffiFfiConverterTypeTreeRecord.check_lower(base) _UniffiFfiConverterTypeTreeRecord.check_lower(left) @@ -32176,7 +33090,7 @@ def merge_range_with_resolver(self, base: TreeRecord,left: TreeRecord,right: Tre ) return _uniffi_lift_return(_uniffi_ffi_result) def merge_with_policy(self, base: TreeRecord,left: TreeRecord,right: TreeRecord,policy: MergePolicyRegistry) -> TreeRecord: - + _UniffiFfiConverterTypeTreeRecord.check_lower(base) _UniffiFfiConverterTypeTreeRecord.check_lower(left) @@ -32200,7 +33114,7 @@ def merge_with_policy(self, base: TreeRecord,left: TreeRecord,right: TreeRecord, ) return _uniffi_lift_return(_uniffi_ffi_result) def merge_with_resolver(self, base: TreeRecord,left: TreeRecord,right: TreeRecord,resolver: MergeResolverCallback) -> TreeRecord: - + _UniffiFfiConverterTypeTreeRecord.check_lower(base) _UniffiFfiConverterTypeTreeRecord.check_lower(left) @@ -32236,7 +33150,7 @@ def metrics(self, ) -> MetricsRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def parallel_batch(self, tree: TreeRecord,mutations: typing.List[MutationRecord],config: ParallelConfigRecord) -> TreeRecord: - + _UniffiFfiConverterTypeTreeRecord.check_lower(tree) _UniffiFfiConverterSequenceTypeMutationRecord.check_lower(mutations) @@ -32257,7 +33171,7 @@ def parallel_batch(self, tree: TreeRecord,mutations: typing.List[MutationRecord] ) return _uniffi_lift_return(_uniffi_ffi_result) def parallel_batch_with_stats(self, tree: TreeRecord,mutations: typing.List[MutationRecord],config: ParallelConfigRecord) -> BatchApplyResultRecord: - + _UniffiFfiConverterTypeTreeRecord.check_lower(tree) _UniffiFfiConverterSequenceTypeMutationRecord.check_lower(mutations) @@ -32278,7 +33192,7 @@ def parallel_batch_with_stats(self, tree: TreeRecord,mutations: typing.List[Muta ) return _uniffi_lift_return(_uniffi_ffi_result) def pin_tree_path(self, tree: TreeRecord,key: bytes) -> int: - + _UniffiFfiConverterTypeTreeRecord.check_lower(tree) _UniffiFfiConverterBytes.check_lower(key) @@ -32296,7 +33210,7 @@ def pin_tree_path(self, tree: TreeRecord,key: bytes) -> int: ) return _uniffi_lift_return(_uniffi_ffi_result) def pin_tree_root(self, tree: TreeRecord) -> int: - + _UniffiFfiConverterTypeTreeRecord.check_lower(tree) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -32311,7 +33225,7 @@ def pin_tree_root(self, tree: TreeRecord) -> int: ) return _uniffi_lift_return(_uniffi_ffi_result) def plan_blob_gc(self, blob_store: ProllyBlobStore,roots: typing.List[TreeRecord],candidate_blobs: typing.List[BlobRefRecord]) -> BlobGcPlanRecord: - + _UniffiFfiConverterTypeProllyBlobStore.check_lower(blob_store) _UniffiFfiConverterSequenceTypeTreeRecord.check_lower(roots) @@ -32332,7 +33246,7 @@ def plan_blob_gc(self, blob_store: ProllyBlobStore,roots: typing.List[TreeRecord ) return _uniffi_lift_return(_uniffi_ffi_result) def plan_blob_store_gc(self, blob_store: ProllyBlobStore,roots: typing.List[TreeRecord]) -> BlobGcPlanRecord: - + _UniffiFfiConverterTypeProllyBlobStore.check_lower(blob_store) _UniffiFfiConverterSequenceTypeTreeRecord.check_lower(roots) @@ -32350,7 +33264,7 @@ def plan_blob_store_gc(self, blob_store: ProllyBlobStore,roots: typing.List[Tree ) return _uniffi_lift_return(_uniffi_ffi_result) def plan_gc(self, roots: typing.List[TreeRecord],candidate_cids: typing.List[bytes]) -> GcPlanRecord: - + _UniffiFfiConverterSequenceTypeTreeRecord.check_lower(roots) _UniffiFfiConverterSequenceBytes.check_lower(candidate_cids) @@ -32368,7 +33282,7 @@ def plan_gc(self, roots: typing.List[TreeRecord],candidate_cids: typing.List[byt ) return _uniffi_lift_return(_uniffi_ffi_result) def plan_missing_nodes(self, tree: TreeRecord,destination: ProllyEngine) -> MissingNodePlanRecord: - + _UniffiFfiConverterTypeTreeRecord.check_lower(tree) _UniffiFfiConverterTypeProllyEngine.check_lower(destination) @@ -32386,7 +33300,7 @@ def plan_missing_nodes(self, tree: TreeRecord,destination: ProllyEngine) -> Miss ) return _uniffi_lift_return(_uniffi_ffi_result) def plan_store_gc(self, roots: typing.List[TreeRecord]) -> GcPlanRecord: - + _UniffiFfiConverterSequenceTypeTreeRecord.check_lower(roots) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -32401,7 +33315,7 @@ def plan_store_gc(self, roots: typing.List[TreeRecord]) -> GcPlanRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def plan_store_gc_for_retention(self, retention: NamedRootRetentionRecord) -> GcPlanRecord: - + _UniffiFfiConverterTypeNamedRootRetentionRecord.check_lower(retention) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -32416,7 +33330,7 @@ def plan_store_gc_for_retention(self, retention: NamedRootRetentionRecord) -> Gc ) return _uniffi_lift_return(_uniffi_ffi_result) def prefix(self, tree: TreeRecord,prefix: bytes) -> typing.List[EntryRecord]: - + _UniffiFfiConverterTypeTreeRecord.check_lower(tree) _UniffiFfiConverterBytes.check_lower(prefix) @@ -32434,7 +33348,7 @@ def prefix(self, tree: TreeRecord,prefix: bytes) -> typing.List[EntryRecord]: ) return _uniffi_lift_return(_uniffi_ffi_result) def prefix_page(self, tree: TreeRecord,prefix: bytes,cursor: typing.Optional[RangeCursorRecord],limit: int) -> RangePageRecord: - + _UniffiFfiConverterTypeTreeRecord.check_lower(tree) _UniffiFfiConverterBytes.check_lower(prefix) @@ -32458,7 +33372,7 @@ def prefix_page(self, tree: TreeRecord,prefix: bytes,cursor: typing.Optional[Ran ) return _uniffi_lift_return(_uniffi_ffi_result) def prefix_reverse_page(self, tree: TreeRecord,prefix: bytes,cursor: typing.Optional[ReverseCursorRecord],limit: int) -> ReversePageRecord: - + _UniffiFfiConverterTypeTreeRecord.check_lower(tree) _UniffiFfiConverterBytes.check_lower(prefix) @@ -32482,7 +33396,7 @@ def prefix_reverse_page(self, tree: TreeRecord,prefix: bytes,cursor: typing.Opti ) return _uniffi_lift_return(_uniffi_ffi_result) def prove_diff_page(self, base: TreeRecord,other: TreeRecord,cursor: typing.Optional[RangeCursorRecord],range_end: typing.Optional[bytes],limit: int) -> ProvedDiffPageRecord: - + _UniffiFfiConverterTypeTreeRecord.check_lower(base) _UniffiFfiConverterTypeTreeRecord.check_lower(other) @@ -32509,7 +33423,7 @@ def prove_diff_page(self, base: TreeRecord,other: TreeRecord,cursor: typing.Opti ) return _uniffi_lift_return(_uniffi_ffi_result) def prove_key(self, tree: TreeRecord,key: bytes) -> KeyProofRecord: - + _UniffiFfiConverterTypeTreeRecord.check_lower(tree) _UniffiFfiConverterBytes.check_lower(key) @@ -32527,7 +33441,7 @@ def prove_key(self, tree: TreeRecord,key: bytes) -> KeyProofRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def prove_keys(self, tree: TreeRecord,keys: typing.List[bytes]) -> MultiKeyProofRecord: - + _UniffiFfiConverterTypeTreeRecord.check_lower(tree) _UniffiFfiConverterSequenceBytes.check_lower(keys) @@ -32545,7 +33459,7 @@ def prove_keys(self, tree: TreeRecord,keys: typing.List[bytes]) -> MultiKeyProof ) return _uniffi_lift_return(_uniffi_ffi_result) def prove_prefix(self, tree: TreeRecord,prefix: bytes) -> RangeProofRecord: - + _UniffiFfiConverterTypeTreeRecord.check_lower(tree) _UniffiFfiConverterBytes.check_lower(prefix) @@ -32563,7 +33477,7 @@ def prove_prefix(self, tree: TreeRecord,prefix: bytes) -> RangeProofRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def prove_range(self, tree: TreeRecord,start: bytes,range_end: typing.Optional[bytes]) -> RangeProofRecord: - + _UniffiFfiConverterTypeTreeRecord.check_lower(tree) _UniffiFfiConverterBytes.check_lower(start) @@ -32584,7 +33498,7 @@ def prove_range(self, tree: TreeRecord,start: bytes,range_end: typing.Optional[b ) return _uniffi_lift_return(_uniffi_ffi_result) def prove_range_page(self, tree: TreeRecord,cursor: typing.Optional[RangeCursorRecord],range_end: typing.Optional[bytes],limit: int) -> ProvedRangePageRecord: - + _UniffiFfiConverterTypeTreeRecord.check_lower(tree) _UniffiFfiConverterOptionalTypeRangeCursorRecord.check_lower(cursor) @@ -32613,7 +33527,7 @@ def proximity_search_runtime(self, policy: ProximitySearchRuntimePolicyRecord) - object across searches preserves validated content-cache entries and exposes cumulative physical I/O counters. """ - + _UniffiFfiConverterTypeProximitySearchRuntimePolicyRecord.check_lower(policy) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -32628,7 +33542,7 @@ def proximity_search_runtime(self, policy: ProximitySearchRuntimePolicyRecord) - ) return _uniffi_lift_return(_uniffi_ffi_result) def publish_changed_spans_hint(self, base: TreeRecord,changed: TreeRecord,spans: typing.List[ChangedSpanRecord]) -> bool: - + _UniffiFfiConverterTypeTreeRecord.check_lower(base) _UniffiFfiConverterTypeTreeRecord.check_lower(changed) @@ -32649,7 +33563,7 @@ def publish_changed_spans_hint(self, base: TreeRecord,changed: TreeRecord,spans: ) return _uniffi_lift_return(_uniffi_ffi_result) def publish_named_root(self, name: bytes,tree: TreeRecord) -> None: - + _UniffiFfiConverterBytes.check_lower(name) _UniffiFfiConverterTypeTreeRecord.check_lower(tree) @@ -32667,7 +33581,7 @@ def publish_named_root(self, name: bytes,tree: TreeRecord) -> None: ) return _uniffi_lift_return(_uniffi_ffi_result) def publish_named_root_at_millis(self, name: bytes,tree: TreeRecord,timestamp_millis: int) -> None: - + _UniffiFfiConverterBytes.check_lower(name) _UniffiFfiConverterTypeTreeRecord.check_lower(tree) @@ -32688,7 +33602,7 @@ def publish_named_root_at_millis(self, name: bytes,tree: TreeRecord,timestamp_mi ) return _uniffi_lift_return(_uniffi_ffi_result) def publish_prefix_path_hint(self, tree: TreeRecord,prefix: bytes) -> bool: - + _UniffiFfiConverterTypeTreeRecord.check_lower(tree) _UniffiFfiConverterBytes.check_lower(prefix) @@ -32706,7 +33620,7 @@ def publish_prefix_path_hint(self, tree: TreeRecord,prefix: bytes) -> bool: ) return _uniffi_lift_return(_uniffi_ffi_result) def publish_snapshot(self, namespace: SnapshotNamespaceRecord,id: bytes,tree: TreeRecord) -> None: - + _UniffiFfiConverterTypeSnapshotNamespaceRecord.check_lower(namespace) _UniffiFfiConverterBytes.check_lower(id) @@ -32727,7 +33641,7 @@ def publish_snapshot(self, namespace: SnapshotNamespaceRecord,id: bytes,tree: Tr ) return _uniffi_lift_return(_uniffi_ffi_result) def publish_snapshot_at_millis(self, namespace: SnapshotNamespaceRecord,id: bytes,tree: TreeRecord,timestamp_millis: int) -> None: - + _UniffiFfiConverterTypeSnapshotNamespaceRecord.check_lower(namespace) _UniffiFfiConverterBytes.check_lower(id) @@ -32751,7 +33665,7 @@ def publish_snapshot_at_millis(self, namespace: SnapshotNamespaceRecord,id: byte ) return _uniffi_lift_return(_uniffi_ffi_result) def put(self, tree: TreeRecord,key: bytes,value: bytes) -> TreeRecord: - + _UniffiFfiConverterTypeTreeRecord.check_lower(tree) _UniffiFfiConverterBytes.check_lower(key) @@ -32772,7 +33686,7 @@ def put(self, tree: TreeRecord,key: bytes,value: bytes) -> TreeRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def put_large_value(self, blob_store: ProllyBlobStore,tree: TreeRecord,key: bytes,value: bytes,config: LargeValueConfigRecord) -> TreeRecord: - + _UniffiFfiConverterTypeProllyBlobStore.check_lower(blob_store) _UniffiFfiConverterTypeTreeRecord.check_lower(tree) @@ -32799,7 +33713,7 @@ def put_large_value(self, blob_store: ProllyBlobStore,tree: TreeRecord,key: byte ) return _uniffi_lift_return(_uniffi_ffi_result) def range(self, tree: TreeRecord,start: bytes,range_end: typing.Optional[bytes]) -> typing.List[EntryRecord]: - + _UniffiFfiConverterTypeTreeRecord.check_lower(tree) _UniffiFfiConverterBytes.check_lower(start) @@ -32820,7 +33734,7 @@ def range(self, tree: TreeRecord,start: bytes,range_end: typing.Optional[bytes]) ) return _uniffi_lift_return(_uniffi_ffi_result) def range_after(self, tree: TreeRecord,after_key: bytes,range_end: typing.Optional[bytes]) -> typing.List[EntryRecord]: - + _UniffiFfiConverterTypeTreeRecord.check_lower(tree) _UniffiFfiConverterBytes.check_lower(after_key) @@ -32841,7 +33755,7 @@ def range_after(self, tree: TreeRecord,after_key: bytes,range_end: typing.Option ) return _uniffi_lift_return(_uniffi_ffi_result) def range_diff(self, base: TreeRecord,other: TreeRecord,start: bytes,range_end: typing.Optional[bytes]) -> typing.List[DiffRecord]: - + _UniffiFfiConverterTypeTreeRecord.check_lower(base) _UniffiFfiConverterTypeTreeRecord.check_lower(other) @@ -32865,7 +33779,7 @@ def range_diff(self, base: TreeRecord,other: TreeRecord,start: bytes,range_end: ) return _uniffi_lift_return(_uniffi_ffi_result) def range_from_cursor(self, tree: TreeRecord,cursor: typing.Optional[RangeCursorRecord],range_end: typing.Optional[bytes]) -> typing.List[EntryRecord]: - + _UniffiFfiConverterTypeTreeRecord.check_lower(tree) _UniffiFfiConverterOptionalTypeRangeCursorRecord.check_lower(cursor) @@ -32886,7 +33800,7 @@ def range_from_cursor(self, tree: TreeRecord,cursor: typing.Optional[RangeCursor ) return _uniffi_lift_return(_uniffi_ffi_result) def range_page(self, tree: TreeRecord,cursor: typing.Optional[RangeCursorRecord],range_end: typing.Optional[bytes],limit: int) -> RangePageRecord: - + _UniffiFfiConverterTypeTreeRecord.check_lower(tree) _UniffiFfiConverterOptionalTypeRangeCursorRecord.check_lower(cursor) @@ -32915,7 +33829,7 @@ def read_session(self, tree: TreeRecord) -> ProllyReadSession: issue repeated reads should prefer this over retransmitting `TreeRecord` on every operation. """ - + _UniffiFfiConverterTypeTreeRecord.check_lower(tree) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -32942,7 +33856,7 @@ def reset_metrics(self, ) -> None: ) return _uniffi_lift_return(_uniffi_ffi_result) def reverse_page(self, tree: TreeRecord,cursor: typing.Optional[ReverseCursorRecord],start: bytes,limit: int) -> ReversePageRecord: - + _UniffiFfiConverterTypeTreeRecord.check_lower(tree) _UniffiFfiConverterOptionalTypeReverseCursorRecord.check_lower(cursor) @@ -32969,7 +33883,7 @@ def scan_conflicts(self, base: TreeRecord,left: TreeRecord,right: TreeRecord,vis """ Stream genuine three-way conflicts without allocating a complete list. """ - + _UniffiFfiConverterTypeTreeRecord.check_lower(base) _UniffiFfiConverterTypeTreeRecord.check_lower(left) @@ -32996,7 +33910,7 @@ def scan_diff(self, base: TreeRecord,other: TreeRecord,visitor: DiffVisitorCallb """ Stream structural differences without first allocating a complete list. """ - + _UniffiFfiConverterTypeTreeRecord.check_lower(base) _UniffiFfiConverterTypeTreeRecord.check_lower(other) @@ -33020,7 +33934,7 @@ def scan_prefix(self, tree: TreeRecord,prefix: bytes,visitor: EntryVisitorCallba """ Stream all entries with `prefix` through the borrowed Rust traversal. """ - + _UniffiFfiConverterTypeTreeRecord.check_lower(tree) _UniffiFfiConverterBytes.check_lower(prefix) @@ -33044,7 +33958,7 @@ def scan_prefix_reverse(self, tree: TreeRecord,prefix: bytes,visitor: EntryVisit """ Stream a prefix in descending key order. """ - + _UniffiFfiConverterTypeTreeRecord.check_lower(tree) _UniffiFfiConverterBytes.check_lower(prefix) @@ -33068,7 +33982,7 @@ def scan_range(self, tree: TreeRecord,start: bytes,range_end: typing.Optional[by """ Stream a half-open range through the borrowed Rust traversal. """ - + _UniffiFfiConverterTypeTreeRecord.check_lower(tree) _UniffiFfiConverterBytes.check_lower(start) @@ -33095,7 +34009,7 @@ def scan_range_diff(self, base: TreeRecord,other: TreeRecord,start: bytes,range_ """ Stream structural differences whose keys fall in `[start, end)`. """ - + _UniffiFfiConverterTypeTreeRecord.check_lower(base) _UniffiFfiConverterTypeTreeRecord.check_lower(other) @@ -33125,7 +34039,7 @@ def scan_range_reverse(self, tree: TreeRecord,start: bytes,range_end: typing.Opt """ Stream a half-open range in descending key order. """ - + _UniffiFfiConverterTypeTreeRecord.check_lower(tree) _UniffiFfiConverterBytes.check_lower(start) @@ -33149,7 +34063,7 @@ def scan_range_reverse(self, tree: TreeRecord,start: bytes,range_end: typing.Opt ) return _uniffi_lift_return(_uniffi_ffi_result) def stats_diff(self, before: TreeRecord,after: TreeRecord) -> StatsComparisonRecord: - + _UniffiFfiConverterTypeTreeRecord.check_lower(before) _UniffiFfiConverterTypeTreeRecord.check_lower(after) @@ -33167,7 +34081,7 @@ def stats_diff(self, before: TreeRecord,after: TreeRecord) -> StatsComparisonRec ) return _uniffi_lift_return(_uniffi_ffi_result) def stats_diff_json(self, before: TreeRecord,after: TreeRecord) -> JsonDocumentRecord: - + _UniffiFfiConverterTypeTreeRecord.check_lower(before) _UniffiFfiConverterTypeTreeRecord.check_lower(after) @@ -33185,7 +34099,7 @@ def stats_diff_json(self, before: TreeRecord,after: TreeRecord) -> JsonDocumentR ) return _uniffi_lift_return(_uniffi_ffi_result) def structural_diff_page(self, base: TreeRecord,other: TreeRecord,cursor_json: typing.Optional[str],limit: int) -> StructuralDiffPageRecord: - + _UniffiFfiConverterTypeTreeRecord.check_lower(base) _UniffiFfiConverterTypeTreeRecord.check_lower(other) @@ -33209,7 +34123,7 @@ def structural_diff_page(self, base: TreeRecord,other: TreeRecord,cursor_json: t ) return _uniffi_lift_return(_uniffi_ffi_result) def structural_diff_page_with_cursor(self, base: TreeRecord,other: TreeRecord,cursor: typing.Optional[StructuralDiffCursorRecord],limit: int) -> StructuralDiffPageRecord: - + _UniffiFfiConverterTypeTreeRecord.check_lower(base) _UniffiFfiConverterTypeTreeRecord.check_lower(other) @@ -33233,7 +34147,7 @@ def structural_diff_page_with_cursor(self, base: TreeRecord,other: TreeRecord,cu ) return _uniffi_lift_return(_uniffi_ffi_result) def sweep_blob_gc(self, blob_store: ProllyBlobStore,roots: typing.List[TreeRecord],candidate_blobs: typing.List[BlobRefRecord]) -> BlobGcSweepRecord: - + _UniffiFfiConverterTypeProllyBlobStore.check_lower(blob_store) _UniffiFfiConverterSequenceTypeTreeRecord.check_lower(roots) @@ -33254,7 +34168,7 @@ def sweep_blob_gc(self, blob_store: ProllyBlobStore,roots: typing.List[TreeRecor ) return _uniffi_lift_return(_uniffi_ffi_result) def sweep_blob_store_gc(self, blob_store: ProllyBlobStore,roots: typing.List[TreeRecord]) -> BlobGcSweepRecord: - + _UniffiFfiConverterTypeProllyBlobStore.check_lower(blob_store) _UniffiFfiConverterSequenceTypeTreeRecord.check_lower(roots) @@ -33272,7 +34186,7 @@ def sweep_blob_store_gc(self, blob_store: ProllyBlobStore,roots: typing.List[Tre ) return _uniffi_lift_return(_uniffi_ffi_result) def sweep_gc(self, roots: typing.List[TreeRecord],candidate_cids: typing.List[bytes]) -> GcSweepRecord: - + _UniffiFfiConverterSequenceTypeTreeRecord.check_lower(roots) _UniffiFfiConverterSequenceBytes.check_lower(candidate_cids) @@ -33290,7 +34204,7 @@ def sweep_gc(self, roots: typing.List[TreeRecord],candidate_cids: typing.List[by ) return _uniffi_lift_return(_uniffi_ffi_result) def sweep_store_gc(self, roots: typing.List[TreeRecord]) -> GcSweepRecord: - + _UniffiFfiConverterSequenceTypeTreeRecord.check_lower(roots) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -33305,7 +34219,7 @@ def sweep_store_gc(self, roots: typing.List[TreeRecord]) -> GcSweepRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def sweep_store_gc_for_retention(self, retention: NamedRootRetentionRecord) -> GcSweepRecord: - + _UniffiFfiConverterTypeNamedRootRetentionRecord.check_lower(retention) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -33332,7 +34246,7 @@ def unpin_all_cache_nodes(self, ) -> int: ) return _uniffi_lift_return(_uniffi_ffi_result) def upper_bound(self, tree: TreeRecord,key: bytes) -> typing.Optional[EntryRecord]: - + _UniffiFfiConverterTypeTreeRecord.check_lower(tree) _UniffiFfiConverterBytes.check_lower(key) @@ -33354,7 +34268,7 @@ def versioned_map(self, id: bytes) -> BindingVersionedMap: Open an application-facing managed map. The returned object shares the underlying engine and may outlive this particular foreign handle. """ - + _UniffiFfiConverterBytes.check_lower(id) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -33403,7 +34317,7 @@ class BindingMapSnapshotProtocol(typing.Protocol): """ Owned immutable snapshot that remains valid while the managed head advances. """ - + def contains_key(self, key: bytes) -> bool: raise NotImplementedError def copy_missing_nodes(self, destination: ProllyEngine) -> MissingNodeCopyRecord: @@ -33485,9 +34399,9 @@ class BindingMapSnapshot(BindingMapSnapshotProtocol): """ Owned immutable snapshot that remains valid while the managed head advances. """ - + _handle: ctypes.c_uint64 - + def __init__(self, *args, **kwargs): raise ValueError("This class has no default constructor") @@ -33509,7 +34423,7 @@ def _uniffi_make_instance(cls, handle): inst._handle = handle return inst def contains_key(self, key: bytes) -> bool: - + _UniffiFfiConverterBytes.check_lower(key) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -33524,7 +34438,7 @@ def contains_key(self, key: bytes) -> bool: ) return _uniffi_lift_return(_uniffi_ffi_result) def copy_missing_nodes(self, destination: ProllyEngine) -> MissingNodeCopyRecord: - + _UniffiFfiConverterTypeProllyEngine.check_lower(destination) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -33539,7 +34453,7 @@ def copy_missing_nodes(self, destination: ProllyEngine) -> MissingNodeCopyRecord ) return _uniffi_lift_return(_uniffi_ffi_result) def cursor_window(self, key: bytes,range_end: typing.Optional[bytes],limit: int) -> CursorWindowRecord: - + _UniffiFfiConverterBytes.check_lower(key) _UniffiFfiConverterOptionalBytes.check_lower(range_end) @@ -33596,7 +34510,7 @@ def first_entry(self, ) -> typing.Optional[EntryRecord]: ) return _uniffi_lift_return(_uniffi_ffi_result) def get(self, key: bytes) -> typing.Optional[bytes]: - + _UniffiFfiConverterBytes.check_lower(key) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -33611,7 +34525,7 @@ def get(self, key: bytes) -> typing.Optional[bytes]: ) return _uniffi_lift_return(_uniffi_ffi_result) def get_many(self, keys: typing.List[bytes]) -> typing.List[typing.Optional[bytes]]: - + _UniffiFfiConverterSequenceBytes.check_lower(keys) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -33626,7 +34540,7 @@ def get_many(self, keys: typing.List[bytes]) -> typing.List[typing.Optional[byte ) return _uniffi_lift_return(_uniffi_ffi_result) def get_value_ref(self, key: bytes) -> typing.Optional[ValueRefRecord]: - + _UniffiFfiConverterBytes.check_lower(key) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -33641,7 +34555,7 @@ def get_value_ref(self, key: bytes) -> typing.Optional[ValueRefRecord]: ) return _uniffi_lift_return(_uniffi_ffi_result) def hydrate_prefix_hint(self, prefix: bytes) -> bool: - + _UniffiFfiConverterBytes.check_lower(prefix) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -33680,7 +34594,7 @@ def last_entry(self, ) -> typing.Optional[EntryRecord]: ) return _uniffi_lift_return(_uniffi_ffi_result) def lower_bound(self, key: bytes) -> typing.Optional[EntryRecord]: - + _UniffiFfiConverterBytes.check_lower(key) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -33695,7 +34609,7 @@ def lower_bound(self, key: bytes) -> typing.Optional[EntryRecord]: ) return _uniffi_lift_return(_uniffi_ffi_result) def pin_path(self, key: bytes) -> int: - + _UniffiFfiConverterBytes.check_lower(key) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -33722,7 +34636,7 @@ def pin_root(self, ) -> int: ) return _uniffi_lift_return(_uniffi_ffi_result) def plan_missing_nodes(self, destination: ProllyEngine) -> MissingNodePlanRecord: - + _UniffiFfiConverterTypeProllyEngine.check_lower(destination) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -33737,7 +34651,7 @@ def plan_missing_nodes(self, destination: ProllyEngine) -> MissingNodePlanRecord ) return _uniffi_lift_return(_uniffi_ffi_result) def prefix(self, prefix: bytes) -> typing.List[EntryRecord]: - + _UniffiFfiConverterBytes.check_lower(prefix) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -33752,7 +34666,7 @@ def prefix(self, prefix: bytes) -> typing.List[EntryRecord]: ) return _uniffi_lift_return(_uniffi_ffi_result) def prefix_page(self, prefix: bytes,cursor: typing.Optional[RangeCursorRecord],limit: int) -> RangePageRecord: - + _UniffiFfiConverterBytes.check_lower(prefix) _UniffiFfiConverterOptionalTypeRangeCursorRecord.check_lower(cursor) @@ -33773,7 +34687,7 @@ def prefix_page(self, prefix: bytes,cursor: typing.Optional[RangeCursorRecord],l ) return _uniffi_lift_return(_uniffi_ffi_result) def prefix_reverse_page(self, prefix: bytes,cursor: typing.Optional[ReverseCursorRecord],limit: int) -> ReversePageRecord: - + _UniffiFfiConverterBytes.check_lower(prefix) _UniffiFfiConverterOptionalTypeReverseCursorRecord.check_lower(cursor) @@ -33794,7 +34708,7 @@ def prefix_reverse_page(self, prefix: bytes,cursor: typing.Optional[ReverseCurso ) return _uniffi_lift_return(_uniffi_ffi_result) def prove_key(self, key: bytes) -> KeyProofRecord: - + _UniffiFfiConverterBytes.check_lower(key) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -33809,7 +34723,7 @@ def prove_key(self, key: bytes) -> KeyProofRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def prove_keys(self, keys: typing.List[bytes]) -> MultiKeyProofRecord: - + _UniffiFfiConverterSequenceBytes.check_lower(keys) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -33824,7 +34738,7 @@ def prove_keys(self, keys: typing.List[bytes]) -> MultiKeyProofRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def prove_prefix(self, prefix: bytes) -> RangeProofRecord: - + _UniffiFfiConverterBytes.check_lower(prefix) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -33839,7 +34753,7 @@ def prove_prefix(self, prefix: bytes) -> RangeProofRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def prove_range(self, start: bytes,range_end: typing.Optional[bytes]) -> RangeProofRecord: - + _UniffiFfiConverterBytes.check_lower(start) _UniffiFfiConverterOptionalBytes.check_lower(range_end) @@ -33857,7 +34771,7 @@ def prove_range(self, start: bytes,range_end: typing.Optional[bytes]) -> RangePr ) return _uniffi_lift_return(_uniffi_ffi_result) def prove_range_page(self, cursor: typing.Optional[RangeCursorRecord],range_end: typing.Optional[bytes],limit: int) -> ProvedRangePageRecord: - + _UniffiFfiConverterOptionalTypeRangeCursorRecord.check_lower(cursor) _UniffiFfiConverterOptionalBytes.check_lower(range_end) @@ -33878,7 +34792,7 @@ def prove_range_page(self, cursor: typing.Optional[RangeCursorRecord],range_end: ) return _uniffi_lift_return(_uniffi_ffi_result) def publish_prefix_hint(self, prefix: bytes) -> bool: - + _UniffiFfiConverterBytes.check_lower(prefix) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -33893,7 +34807,7 @@ def publish_prefix_hint(self, prefix: bytes) -> bool: ) return _uniffi_lift_return(_uniffi_ffi_result) def push_to(self, destination: BindingVersionedMap) -> MapVersionRecord: - + _UniffiFfiConverterTypeBindingVersionedMap.check_lower(destination) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -33908,7 +34822,7 @@ def push_to(self, destination: BindingVersionedMap) -> MapVersionRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def range(self, start: bytes,range_end: typing.Optional[bytes]) -> typing.List[EntryRecord]: - + _UniffiFfiConverterBytes.check_lower(start) _UniffiFfiConverterOptionalBytes.check_lower(range_end) @@ -33926,7 +34840,7 @@ def range(self, start: bytes,range_end: typing.Optional[bytes]) -> typing.List[E ) return _uniffi_lift_return(_uniffi_ffi_result) def range_page(self, cursor: typing.Optional[RangeCursorRecord],range_end: typing.Optional[bytes],limit: int) -> RangePageRecord: - + _UniffiFfiConverterOptionalTypeRangeCursorRecord.check_lower(cursor) _UniffiFfiConverterOptionalBytes.check_lower(range_end) @@ -33963,7 +34877,7 @@ def read_session(self, ) -> ProllyReadSession: ) return _uniffi_lift_return(_uniffi_ffi_result) def reverse_page(self, cursor: typing.Optional[ReverseCursorRecord],start: bytes,limit: int) -> ReversePageRecord: - + _UniffiFfiConverterOptionalTypeReverseCursorRecord.check_lower(cursor) _UniffiFfiConverterBytes.check_lower(start) @@ -33984,7 +34898,7 @@ def reverse_page(self, cursor: typing.Optional[ReverseCursorRecord],start: bytes ) return _uniffi_lift_return(_uniffi_ffi_result) def scan_prefix(self, prefix: bytes,visitor: EntryVisitorCallback) -> ScanOutcomeRecord: - + _UniffiFfiConverterBytes.check_lower(prefix) _UniffiFfiConverterTypeEntryVisitorCallback.check_lower(visitor) @@ -34002,7 +34916,7 @@ def scan_prefix(self, prefix: bytes,visitor: EntryVisitorCallback) -> ScanOutcom ) return _uniffi_lift_return(_uniffi_ffi_result) def scan_range(self, start: bytes,range_end: typing.Optional[bytes],visitor: EntryVisitorCallback) -> ScanOutcomeRecord: - + _UniffiFfiConverterBytes.check_lower(start) _UniffiFfiConverterOptionalBytes.check_lower(range_end) @@ -34047,7 +34961,7 @@ def tree(self, ) -> TreeRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def upper_bound(self, key: bytes) -> typing.Optional[EntryRecord]: - + _UniffiFfiConverterBytes.check_lower(key) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -34174,7 +35088,7 @@ def read(cls, buf): class ForeignRemoteStore(): - + async def descriptor(self, ) -> StoreDescriptorResultRecord: raise NotImplementedError async def get_node(self, cid: bytes) -> OptionalBytesResultRecord: @@ -34211,9 +35125,9 @@ async def commit_transaction(self, nodes: typing.List[NodeMutationRecord],condit raise NotImplementedError class ForeignRemoteStoreImpl(ForeignRemoteStore): - + _handle: ctypes.c_uint64 - + def __init__(self, *args, **kwargs): raise ValueError("This class has no default constructor") @@ -34249,7 +35163,7 @@ async def descriptor(self, ) -> StoreDescriptorResultRecord: _uniffi_error_converter, ) async def get_node(self, cid: bytes) -> OptionalBytesResultRecord: - + _UniffiFfiConverterBytes.check_lower(cid) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -34266,7 +35180,7 @@ async def get_node(self, cid: bytes) -> OptionalBytesResultRecord: _uniffi_error_converter, ) async def put_node(self, cid: bytes,value: bytes) -> UnitResultRecord: - + _UniffiFfiConverterBytes.check_lower(cid) _UniffiFfiConverterBytes.check_lower(value) @@ -34286,7 +35200,7 @@ async def put_node(self, cid: bytes,value: bytes) -> UnitResultRecord: _uniffi_error_converter, ) async def delete_node(self, cid: bytes) -> UnitResultRecord: - + _UniffiFfiConverterBytes.check_lower(cid) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -34303,7 +35217,7 @@ async def delete_node(self, cid: bytes) -> UnitResultRecord: _uniffi_error_converter, ) async def batch_nodes(self, ops: typing.List[NodeMutationRecord]) -> UnitResultRecord: - + _UniffiFfiConverterSequenceTypeNodeMutationRecord.check_lower(ops) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -34337,7 +35251,7 @@ async def publish_nodes(self, publication: NodePublicationRecord) -> UnitResultR _uniffi_error_converter, ) async def batch_get_nodes_ordered(self, cids: typing.List[bytes]) -> OptionalBytesListResultRecord: - + _UniffiFfiConverterSequenceBytes.check_lower(cids) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -34368,7 +35282,7 @@ async def list_node_cids(self, ) -> BytesListResultRecord: _uniffi_error_converter, ) async def get_hint(self, namespace: bytes,key: bytes) -> OptionalBytesResultRecord: - + _UniffiFfiConverterBytes.check_lower(namespace) _UniffiFfiConverterBytes.check_lower(key) @@ -34388,7 +35302,7 @@ async def get_hint(self, namespace: bytes,key: bytes) -> OptionalBytesResultReco _uniffi_error_converter, ) async def put_hint(self, namespace: bytes,key: bytes,value: bytes) -> UnitResultRecord: - + _UniffiFfiConverterBytes.check_lower(namespace) _UniffiFfiConverterBytes.check_lower(key) @@ -34411,7 +35325,7 @@ async def put_hint(self, namespace: bytes,key: bytes,value: bytes) -> UnitResult _uniffi_error_converter, ) async def batch_put_nodes_with_hint(self, nodes: typing.List[NodeEntryRecord],namespace: bytes,key: bytes,value: bytes) -> UnitResultRecord: - + _UniffiFfiConverterSequenceTypeNodeEntryRecord.check_lower(nodes) _UniffiFfiConverterBytes.check_lower(namespace) @@ -34437,7 +35351,7 @@ async def batch_put_nodes_with_hint(self, nodes: typing.List[NodeEntryRecord],na _uniffi_error_converter, ) async def get_root_manifest(self, name: bytes) -> OptionalBytesResultRecord: - + _UniffiFfiConverterBytes.check_lower(name) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -34454,7 +35368,7 @@ async def get_root_manifest(self, name: bytes) -> OptionalBytesResultRecord: _uniffi_error_converter, ) async def put_root_manifest(self, name: bytes,manifest: bytes) -> UnitResultRecord: - + _UniffiFfiConverterBytes.check_lower(name) _UniffiFfiConverterBytes.check_lower(manifest) @@ -34474,7 +35388,7 @@ async def put_root_manifest(self, name: bytes,manifest: bytes) -> UnitResultReco _uniffi_error_converter, ) async def delete_root_manifest(self, name: bytes) -> UnitResultRecord: - + _UniffiFfiConverterBytes.check_lower(name) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -34491,7 +35405,7 @@ async def delete_root_manifest(self, name: bytes) -> UnitResultRecord: _uniffi_error_converter, ) async def compare_and_swap_root_manifest(self, name: bytes,expected: OptionalBytesRecord,new: OptionalBytesRecord) -> RootCasResultRecord: - + _UniffiFfiConverterBytes.check_lower(name) _UniffiFfiConverterTypeOptionalBytesRecord.check_lower(expected) @@ -34528,7 +35442,7 @@ async def list_root_manifests(self, ) -> NamedBytesListResultRecord: _uniffi_error_converter, ) async def commit_transaction(self, nodes: typing.List[NodeMutationRecord],conditions: typing.List[RootConditionRecord],roots: typing.List[RootWriteRecord]) -> TransactionResultRecord: - + _UniffiFfiConverterSequenceTypeNodeMutationRecord.check_lower(nodes) _UniffiFfiConverterSequenceTypeRootConditionRecord.check_lower(conditions) @@ -35185,7 +36099,7 @@ def write(cls, value: ForeignRemoteStore, buf: _UniffiRustBuffer): class HostStoreCallback(): - + def get(self, key: bytes) -> HostStoreBytesResultRecord: raise NotImplementedError def put(self, key: bytes,value: bytes) -> HostStoreUnitResultRecord: @@ -35220,9 +36134,9 @@ def list_roots(self, ) -> HostStoreListRootsResultRecord: raise NotImplementedError class HostStoreCallbackImpl(HostStoreCallback): - + _handle: ctypes.c_uint64 - + def __init__(self, *args, **kwargs): raise ValueError("This class has no default constructor") @@ -35244,7 +36158,7 @@ def _uniffi_make_instance(cls, handle): inst._handle = handle return inst def get(self, key: bytes) -> HostStoreBytesResultRecord: - + _UniffiFfiConverterBytes.check_lower(key) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -35259,7 +36173,7 @@ def get(self, key: bytes) -> HostStoreBytesResultRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def put(self, key: bytes,value: bytes) -> HostStoreUnitResultRecord: - + _UniffiFfiConverterBytes.check_lower(key) _UniffiFfiConverterBytes.check_lower(value) @@ -35277,7 +36191,7 @@ def put(self, key: bytes,value: bytes) -> HostStoreUnitResultRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def delete(self, key: bytes) -> HostStoreUnitResultRecord: - + _UniffiFfiConverterBytes.check_lower(key) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -35292,7 +36206,7 @@ def delete(self, key: bytes) -> HostStoreUnitResultRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def batch(self, ops: typing.List[MutationRecord]) -> HostStoreUnitResultRecord: - + _UniffiFfiConverterSequenceTypeMutationRecord.check_lower(ops) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -35322,7 +36236,7 @@ def publish_nodes(self, publication: NodePublicationRecord) -> HostStoreUnitResu ) return _uniffi_lift_return(_uniffi_ffi_result) def batch_get_ordered(self, keys: typing.List[bytes]) -> HostStoreBatchGetResultRecord: - + _UniffiFfiConverterSequenceBytes.check_lower(keys) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -35361,7 +36275,7 @@ def supports_hints(self, ) -> HostStoreBoolResultRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def get_hint(self, namespace: bytes,key: bytes) -> HostStoreBytesResultRecord: - + _UniffiFfiConverterBytes.check_lower(namespace) _UniffiFfiConverterBytes.check_lower(key) @@ -35379,7 +36293,7 @@ def get_hint(self, namespace: bytes,key: bytes) -> HostStoreBytesResultRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def put_hint(self, namespace: bytes,key: bytes,value: bytes) -> HostStoreUnitResultRecord: - + _UniffiFfiConverterBytes.check_lower(namespace) _UniffiFfiConverterBytes.check_lower(key) @@ -35412,7 +36326,7 @@ def list_node_cids(self, ) -> HostStoreListBytesResultRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def get_root(self, name: bytes) -> HostStoreRootResultRecord: - + _UniffiFfiConverterBytes.check_lower(name) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -35427,7 +36341,7 @@ def get_root(self, name: bytes) -> HostStoreRootResultRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def put_root(self, name: bytes,manifest: RootManifestRecord) -> HostStoreUnitResultRecord: - + _UniffiFfiConverterBytes.check_lower(name) _UniffiFfiConverterTypeRootManifestRecord.check_lower(manifest) @@ -35445,7 +36359,7 @@ def put_root(self, name: bytes,manifest: RootManifestRecord) -> HostStoreUnitRes ) return _uniffi_lift_return(_uniffi_ffi_result) def delete_root(self, name: bytes) -> HostStoreUnitResultRecord: - + _UniffiFfiConverterBytes.check_lower(name) _uniffi_lowered_args = ( self._uniffi_clone_handle(), @@ -35460,7 +36374,7 @@ def delete_root(self, name: bytes) -> HostStoreUnitResultRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def compare_and_swap_root(self, name: bytes,expected: typing.Optional[RootManifestRecord],replacement: typing.Optional[RootManifestRecord]) -> HostStoreRootCasResultRecord: - + _UniffiFfiConverterBytes.check_lower(name) _UniffiFfiConverterOptionalTypeRootManifestRecord.check_lower(expected) @@ -35944,7 +36858,7 @@ def read(cls, buf): else: raise InternalError("Unexpected flag byte for optional type") def authenticated_proof_envelope_from_bytes(bytes: bytes) -> AuthenticatedProofEnvelopeRecord: - + _UniffiFfiConverterBytes.check_lower(bytes) _uniffi_lowered_args = ( _UniffiFfiConverterBytes.lower(bytes), @@ -35958,7 +36872,7 @@ def authenticated_proof_envelope_from_bytes(bytes: bytes) -> AuthenticatedProofE ) return _uniffi_lift_return(_uniffi_ffi_result) def authenticated_proof_envelope_to_bytes(envelope: AuthenticatedProofEnvelopeRecord) -> bytes: - + _UniffiFfiConverterTypeAuthenticatedProofEnvelopeRecord.check_lower(envelope) _uniffi_lowered_args = ( _UniffiFfiConverterTypeAuthenticatedProofEnvelopeRecord.lower(envelope), @@ -35972,7 +36886,7 @@ def authenticated_proof_envelope_to_bytes(envelope: AuthenticatedProofEnvelopeRe ) return _uniffi_lift_return(_uniffi_ffi_result) def blob_ref_validate_bytes(reference: BlobRefRecord,bytes: bytes) -> None: - + _UniffiFfiConverterTypeBlobRefRecord.check_lower(reference) _UniffiFfiConverterBytes.check_lower(bytes) @@ -35989,7 +36903,7 @@ def blob_ref_validate_bytes(reference: BlobRefRecord,bytes: bytes) -> None: ) return _uniffi_lift_return(_uniffi_ffi_result) def changed_span(start: bytes,range_end: typing.Optional[bytes]) -> ChangedSpanRecord: - + _UniffiFfiConverterBytes.check_lower(start) _UniffiFfiConverterOptionalBytes.check_lower(range_end) @@ -36006,7 +36920,7 @@ def changed_span(start: bytes,range_end: typing.Optional[bytes]) -> ChangedSpanR ) return _uniffi_lift_return(_uniffi_ffi_result) def changed_span_for_prefix(prefix: bytes) -> ChangedSpanRecord: - + _UniffiFfiConverterBytes.check_lower(prefix) _uniffi_lowered_args = ( _UniffiFfiConverterBytes.lower(prefix), @@ -36020,7 +36934,7 @@ def changed_span_for_prefix(prefix: bytes) -> ChangedSpanRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def changed_span_from_key(key: bytes) -> ChangedSpanRecord: - + _UniffiFfiConverterBytes.check_lower(key) _uniffi_lowered_args = ( _UniffiFfiConverterBytes.lower(key), @@ -36034,7 +36948,7 @@ def changed_span_from_key(key: bytes) -> ChangedSpanRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def cid_from_bytes(bytes: bytes) -> bytes: - + _UniffiFfiConverterBytes.check_lower(bytes) _uniffi_lowered_args = ( _UniffiFfiConverterBytes.lower(bytes), @@ -36048,7 +36962,7 @@ def cid_from_bytes(bytes: bytes) -> bytes: ) return _uniffi_lift_return(_uniffi_ffi_result) def crdt_config_lww(delete_policy: CrdtDeletePolicyKind) -> CrdtConfigRecord: - + _UniffiFfiConverterTypeCrdtDeletePolicyKind.check_lower(delete_policy) _uniffi_lowered_args = ( _UniffiFfiConverterTypeCrdtDeletePolicyKind.lower(delete_policy), @@ -36062,7 +36976,7 @@ def crdt_config_lww(delete_policy: CrdtDeletePolicyKind) -> CrdtConfigRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def crdt_config_multi_value(delete_policy: CrdtDeletePolicyKind) -> CrdtConfigRecord: - + _UniffiFfiConverterTypeCrdtDeletePolicyKind.check_lower(delete_policy) _uniffi_lowered_args = ( _UniffiFfiConverterTypeCrdtDeletePolicyKind.lower(delete_policy), @@ -36087,7 +37001,7 @@ def crdt_resolution_delete() -> CrdtResolutionRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def crdt_resolution_value(value: bytes) -> CrdtResolutionRecord: - + _UniffiFfiConverterBytes.check_lower(value) _uniffi_lowered_args = ( _UniffiFfiConverterBytes.lower(value), @@ -36101,7 +37015,7 @@ def crdt_resolution_value(value: bytes) -> CrdtResolutionRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def debug_key(key: bytes) -> str: - + _UniffiFfiConverterBytes.check_lower(key) _uniffi_lowered_args = ( _UniffiFfiConverterBytes.lower(key), @@ -36115,7 +37029,7 @@ def debug_key(key: bytes) -> str: ) return _uniffi_lift_return(_uniffi_ffi_result) def decode_segments(key: bytes) -> typing.List[bytes]: - + _UniffiFfiConverterBytes.check_lower(key) _uniffi_lowered_args = ( _UniffiFfiConverterBytes.lower(key), @@ -36250,7 +37164,7 @@ def default_pq_config() -> ProductQuantizationConfigRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def default_proximity_config(dimensions: int) -> ProximityConfigRecord: - + _UniffiFfiConverterUInt32.check_lower(dimensions) _uniffi_lowered_args = ( _UniffiFfiConverterUInt32.lower(dimensions), @@ -36285,8 +37199,30 @@ def default_secondary_index_limits() -> SecondaryIndexLimitsRecord: *_uniffi_lowered_args, ) return _uniffi_lift_return(_uniffi_ffi_result) +def default_turboquant_build_limits() -> TurboQuantizationBuildLimitsRecord: + _uniffi_lowered_args = ( + ) + _uniffi_lift_return = _UniffiFfiConverterTypeTurboQuantizationBuildLimitsRecord.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_prolly_bindings_fn_func_default_turboquant_build_limits, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) +def default_turboquant_config() -> TurboQuantizationConfigRecord: + _uniffi_lowered_args = ( + ) + _uniffi_lift_return = _UniffiFfiConverterTypeTurboQuantizationConfigRecord.lift + _uniffi_error_converter = None + _uniffi_ffi_result = _uniffi_rust_call_with_error( + _uniffi_error_converter, + _UniffiLib.uniffi_prolly_bindings_fn_func_default_turboquant_config, + *_uniffi_lowered_args, + ) + return _uniffi_lift_return(_uniffi_ffi_result) def delete_mutation(key: bytes) -> MutationRecord: - + _UniffiFfiConverterBytes.check_lower(key) _uniffi_lowered_args = ( _UniffiFfiConverterBytes.lower(key), @@ -36300,7 +37236,7 @@ def delete_mutation(key: bytes) -> MutationRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def diff_page_proof_from_bytes(bytes: bytes) -> DiffPageProofRecord: - + _UniffiFfiConverterBytes.check_lower(bytes) _uniffi_lowered_args = ( _UniffiFfiConverterBytes.lower(bytes), @@ -36314,7 +37250,7 @@ def diff_page_proof_from_bytes(bytes: bytes) -> DiffPageProofRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def diff_page_proof_to_bytes(proof: DiffPageProofRecord) -> bytes: - + _UniffiFfiConverterTypeDiffPageProofRecord.check_lower(proof) _uniffi_lowered_args = ( _UniffiFfiConverterTypeDiffPageProofRecord.lower(proof), @@ -36328,7 +37264,7 @@ def diff_page_proof_to_bytes(proof: DiffPageProofRecord) -> bytes: ) return _uniffi_lift_return(_uniffi_ffi_result) def encode_segment(segment: bytes) -> bytes: - + _UniffiFfiConverterBytes.check_lower(segment) _uniffi_lowered_args = ( _UniffiFfiConverterBytes.lower(segment), @@ -36353,7 +37289,7 @@ def encoding_cbor() -> EncodingRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def encoding_custom(name: str) -> EncodingRecord: - + _UniffiFfiConverterString.check_lower(name) _uniffi_lowered_args = ( _UniffiFfiConverterString.lower(name), @@ -36389,7 +37325,7 @@ def encoding_raw() -> EncodingRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def exact_proximity_search_request(query: typing.List[float],k: int) -> ProximitySearchRequestRecord: - + _UniffiFfiConverterSequenceFloat32.check_lower(query) _UniffiFfiConverterUInt64.check_lower(k) @@ -36406,7 +37342,7 @@ def exact_proximity_search_request(query: typing.List[float],k: int) -> Proximit ) return _uniffi_lift_return(_uniffi_ffi_result) def i128_key(value: str) -> bytes: - + _UniffiFfiConverterString.check_lower(value) _uniffi_lowered_args = ( _UniffiFfiConverterString.lower(value), @@ -36420,7 +37356,7 @@ def i128_key(value: str) -> bytes: ) return _uniffi_lift_return(_uniffi_ffi_result) def i64_key(value: int) -> bytes: - + _UniffiFfiConverterInt64.check_lower(value) _uniffi_lowered_args = ( _UniffiFfiConverterInt64.lower(value), @@ -36434,7 +37370,7 @@ def i64_key(value: int) -> bytes: ) return _uniffi_lift_return(_uniffi_ffi_result) def inspect_proof_bundle(bytes: bytes) -> ProofBundleSummaryRecord: - + _UniffiFfiConverterBytes.check_lower(bytes) _uniffi_lowered_args = ( _UniffiFfiConverterBytes.lower(bytes), @@ -36448,7 +37384,7 @@ def inspect_proof_bundle(bytes: bytes) -> ProofBundleSummaryRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def is_tombstone_value(bytes: bytes) -> bool: - + _UniffiFfiConverterBytes.check_lower(bytes) _uniffi_lowered_args = ( _UniffiFfiConverterBytes.lower(bytes), @@ -36462,7 +37398,7 @@ def is_tombstone_value(bytes: bytes) -> bool: ) return _uniffi_lift_return(_uniffi_ffi_result) def key_from_prefixed_segments(prefix: bytes,segments: typing.List[bytes]) -> bytes: - + _UniffiFfiConverterBytes.check_lower(prefix) _UniffiFfiConverterSequenceBytes.check_lower(segments) @@ -36479,7 +37415,7 @@ def key_from_prefixed_segments(prefix: bytes,segments: typing.List[bytes]) -> by ) return _uniffi_lift_return(_uniffi_ffi_result) def key_from_segments(segments: typing.List[bytes]) -> bytes: - + _UniffiFfiConverterSequenceBytes.check_lower(segments) _uniffi_lowered_args = ( _UniffiFfiConverterSequenceBytes.lower(segments), @@ -36493,7 +37429,7 @@ def key_from_segments(segments: typing.List[bytes]) -> bytes: ) return _uniffi_lift_return(_uniffi_ffi_result) def key_proof_from_bytes(bytes: bytes) -> KeyProofRecord: - + _UniffiFfiConverterBytes.check_lower(bytes) _uniffi_lowered_args = ( _UniffiFfiConverterBytes.lower(bytes), @@ -36507,7 +37443,7 @@ def key_proof_from_bytes(bytes: bytes) -> KeyProofRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def key_proof_from_node_bytes(root: typing.Optional[bytes],key: bytes,path_node_bytes: typing.List[bytes]) -> KeyProofRecord: - + _UniffiFfiConverterOptionalBytes.check_lower(root) _UniffiFfiConverterBytes.check_lower(key) @@ -36527,7 +37463,7 @@ def key_proof_from_node_bytes(root: typing.Optional[bytes],key: bytes,path_node_ ) return _uniffi_lift_return(_uniffi_ffi_result) def key_proof_path_node_bytes(proof: KeyProofRecord) -> typing.List[bytes]: - + _UniffiFfiConverterTypeKeyProofRecord.check_lower(proof) _uniffi_lowered_args = ( _UniffiFfiConverterTypeKeyProofRecord.lower(proof), @@ -36541,7 +37477,7 @@ def key_proof_path_node_bytes(proof: KeyProofRecord) -> typing.List[bytes]: ) return _uniffi_lift_return(_uniffi_ffi_result) def key_proof_to_bytes(proof: KeyProofRecord) -> bytes: - + _UniffiFfiConverterTypeKeyProofRecord.check_lower(proof) _uniffi_lowered_args = ( _UniffiFfiConverterTypeKeyProofRecord.lower(proof), @@ -36555,7 +37491,7 @@ def key_proof_to_bytes(proof: KeyProofRecord) -> bytes: ) return _uniffi_lift_return(_uniffi_ffi_result) def large_value_config(inline_threshold: int) -> LargeValueConfigRecord: - + _UniffiFfiConverterUInt64.check_lower(inline_threshold) _uniffi_lowered_args = ( _UniffiFfiConverterUInt64.lower(inline_threshold), @@ -36569,7 +37505,7 @@ def large_value_config(inline_threshold: int) -> LargeValueConfigRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def multi_key_proof_from_bytes(bytes: bytes) -> MultiKeyProofRecord: - + _UniffiFfiConverterBytes.check_lower(bytes) _uniffi_lowered_args = ( _UniffiFfiConverterBytes.lower(bytes), @@ -36583,7 +37519,7 @@ def multi_key_proof_from_bytes(bytes: bytes) -> MultiKeyProofRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def multi_key_proof_from_node_bytes(root: typing.Optional[bytes],keys: typing.List[bytes],path_node_bytes: typing.List[bytes]) -> MultiKeyProofRecord: - + _UniffiFfiConverterOptionalBytes.check_lower(root) _UniffiFfiConverterSequenceBytes.check_lower(keys) @@ -36603,7 +37539,7 @@ def multi_key_proof_from_node_bytes(root: typing.Optional[bytes],keys: typing.Li ) return _uniffi_lift_return(_uniffi_ffi_result) def multi_key_proof_path_node_bytes(proof: MultiKeyProofRecord) -> typing.List[bytes]: - + _UniffiFfiConverterTypeMultiKeyProofRecord.check_lower(proof) _uniffi_lowered_args = ( _UniffiFfiConverterTypeMultiKeyProofRecord.lower(proof), @@ -36617,7 +37553,7 @@ def multi_key_proof_path_node_bytes(proof: MultiKeyProofRecord) -> typing.List[b ) return _uniffi_lift_return(_uniffi_ffi_result) def multi_key_proof_to_bytes(proof: MultiKeyProofRecord) -> bytes: - + _UniffiFfiConverterTypeMultiKeyProofRecord.check_lower(proof) _uniffi_lowered_args = ( _UniffiFfiConverterTypeMultiKeyProofRecord.lower(proof), @@ -36631,7 +37567,7 @@ def multi_key_proof_to_bytes(proof: MultiKeyProofRecord) -> bytes: ) return _uniffi_lift_return(_uniffi_ffi_result) def multi_value_set_from_bytes(bytes: bytes) -> typing.List[bytes]: - + _UniffiFfiConverterBytes.check_lower(bytes) _uniffi_lowered_args = ( _UniffiFfiConverterBytes.lower(bytes), @@ -36645,7 +37581,7 @@ def multi_value_set_from_bytes(bytes: bytes) -> typing.List[bytes]: ) return _uniffi_lift_return(_uniffi_ffi_result) def multi_value_set_merge(left: typing.List[bytes],right: typing.List[bytes]) -> typing.List[bytes]: - + _UniffiFfiConverterSequenceBytes.check_lower(left) _UniffiFfiConverterSequenceBytes.check_lower(right) @@ -36662,7 +37598,7 @@ def multi_value_set_merge(left: typing.List[bytes],right: typing.List[bytes]) -> ) return _uniffi_lift_return(_uniffi_ffi_result) def multi_value_set_to_bytes(values: typing.List[bytes]) -> bytes: - + _UniffiFfiConverterSequenceBytes.check_lower(values) _uniffi_lowered_args = ( _UniffiFfiConverterSequenceBytes.lower(values), @@ -36676,7 +37612,7 @@ def multi_value_set_to_bytes(values: typing.List[bytes]) -> bytes: ) return _uniffi_lift_return(_uniffi_ffi_result) def node_cid(node: NodeRecord) -> bytes: - + _UniffiFfiConverterTypeNodeRecord.check_lower(node) _uniffi_lowered_args = ( _UniffiFfiConverterTypeNodeRecord.lower(node), @@ -36690,7 +37626,7 @@ def node_cid(node: NodeRecord) -> bytes: ) return _uniffi_lift_return(_uniffi_ffi_result) def node_from_bytes(bytes: bytes) -> NodeRecord: - + _UniffiFfiConverterBytes.check_lower(bytes) _uniffi_lowered_args = ( _UniffiFfiConverterBytes.lower(bytes), @@ -36704,7 +37640,7 @@ def node_from_bytes(bytes: bytes) -> NodeRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def node_to_bytes(node: NodeRecord) -> bytes: - + _UniffiFfiConverterTypeNodeRecord.check_lower(node) _uniffi_lowered_args = ( _UniffiFfiConverterTypeNodeRecord.lower(node), @@ -36732,7 +37668,7 @@ def normalize_publication_origin_code(code: int) -> int: ) return _uniffi_lift_return(_uniffi_ffi_result) async def open_remote_prolly_engine(store: ForeignRemoteStore,config: ConfigRecord) -> AsyncProllyEngine: - + _UniffiFfiConverterTypeForeignRemoteStore.check_lower(store) _UniffiFfiConverterTypeConfigRecord.check_lower(config) @@ -36751,7 +37687,7 @@ async def open_remote_prolly_engine(store: ForeignRemoteStore,config: ConfigReco _uniffi_error_converter, ) def parallel_config(max_threads: int,parallelism_threshold: int) -> ParallelConfigRecord: - + _UniffiFfiConverterUInt64.check_lower(max_threads) _UniffiFfiConverterUInt64.check_lower(parallelism_threshold) @@ -36779,7 +37715,7 @@ def parallel_config_sequential() -> ParallelConfigRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def prefix_end(prefix: bytes) -> typing.Optional[bytes]: - + _UniffiFfiConverterBytes.check_lower(prefix) _uniffi_lowered_args = ( _UniffiFfiConverterBytes.lower(prefix), @@ -36793,7 +37729,7 @@ def prefix_end(prefix: bytes) -> typing.Optional[bytes]: ) return _uniffi_lift_return(_uniffi_ffi_result) def prefix_range(prefix: bytes) -> RangeBoundsRecord: - + _UniffiFfiConverterBytes.check_lower(prefix) _uniffi_lowered_args = ( _UniffiFfiConverterBytes.lower(prefix), @@ -36807,7 +37743,7 @@ def prefix_range(prefix: bytes) -> RangeBoundsRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def range_cursor_after_key(key: bytes) -> RangeCursorRecord: - + _UniffiFfiConverterBytes.check_lower(key) _uniffi_lowered_args = ( _UniffiFfiConverterBytes.lower(key), @@ -36832,7 +37768,7 @@ def range_cursor_start() -> RangeCursorRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def range_page_proof_from_bytes(bytes: bytes) -> RangePageProofRecord: - + _UniffiFfiConverterBytes.check_lower(bytes) _uniffi_lowered_args = ( _UniffiFfiConverterBytes.lower(bytes), @@ -36846,7 +37782,7 @@ def range_page_proof_from_bytes(bytes: bytes) -> RangePageProofRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def range_page_proof_from_node_bytes(root: typing.Optional[bytes],after: typing.Optional[bytes],range_end: typing.Optional[bytes],path_node_bytes: typing.List[bytes]) -> RangePageProofRecord: - + _UniffiFfiConverterOptionalBytes.check_lower(root) _UniffiFfiConverterOptionalBytes.check_lower(after) @@ -36869,7 +37805,7 @@ def range_page_proof_from_node_bytes(root: typing.Optional[bytes],after: typing. ) return _uniffi_lift_return(_uniffi_ffi_result) def range_page_proof_path_node_bytes(proof: RangePageProofRecord) -> typing.List[bytes]: - + _UniffiFfiConverterTypeRangePageProofRecord.check_lower(proof) _uniffi_lowered_args = ( _UniffiFfiConverterTypeRangePageProofRecord.lower(proof), @@ -36883,7 +37819,7 @@ def range_page_proof_path_node_bytes(proof: RangePageProofRecord) -> typing.List ) return _uniffi_lift_return(_uniffi_ffi_result) def range_page_proof_to_bytes(proof: RangePageProofRecord) -> bytes: - + _UniffiFfiConverterTypeRangePageProofRecord.check_lower(proof) _uniffi_lowered_args = ( _UniffiFfiConverterTypeRangePageProofRecord.lower(proof), @@ -36897,7 +37833,7 @@ def range_page_proof_to_bytes(proof: RangePageProofRecord) -> bytes: ) return _uniffi_lift_return(_uniffi_ffi_result) def range_proof_from_bytes(bytes: bytes) -> RangeProofRecord: - + _UniffiFfiConverterBytes.check_lower(bytes) _uniffi_lowered_args = ( _UniffiFfiConverterBytes.lower(bytes), @@ -36911,7 +37847,7 @@ def range_proof_from_bytes(bytes: bytes) -> RangeProofRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def range_proof_from_node_bytes(root: typing.Optional[bytes],start: bytes,range_end: typing.Optional[bytes],path_node_bytes: typing.List[bytes]) -> RangeProofRecord: - + _UniffiFfiConverterOptionalBytes.check_lower(root) _UniffiFfiConverterBytes.check_lower(start) @@ -36934,7 +37870,7 @@ def range_proof_from_node_bytes(root: typing.Optional[bytes],start: bytes,range_ ) return _uniffi_lift_return(_uniffi_ffi_result) def range_proof_path_node_bytes(proof: RangeProofRecord) -> typing.List[bytes]: - + _UniffiFfiConverterTypeRangeProofRecord.check_lower(proof) _uniffi_lowered_args = ( _UniffiFfiConverterTypeRangeProofRecord.lower(proof), @@ -36948,7 +37884,7 @@ def range_proof_path_node_bytes(proof: RangeProofRecord) -> typing.List[bytes]: ) return _uniffi_lift_return(_uniffi_ffi_result) def range_proof_to_bytes(proof: RangeProofRecord) -> bytes: - + _UniffiFfiConverterTypeRangeProofRecord.check_lower(proof) _uniffi_lowered_args = ( _UniffiFfiConverterTypeRangeProofRecord.lower(proof), @@ -36984,7 +37920,7 @@ def resolution_unresolved() -> ResolutionRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def resolution_value(value: bytes) -> ResolutionRecord: - + _UniffiFfiConverterBytes.check_lower(value) _uniffi_lowered_args = ( _UniffiFfiConverterBytes.lower(value), @@ -36998,7 +37934,7 @@ def resolution_value(value: bytes) -> ResolutionRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def resolve_delete_wins(conflict: ConflictRecord) -> ResolutionRecord: - + _UniffiFfiConverterTypeConflictRecord.check_lower(conflict) _uniffi_lowered_args = ( _UniffiFfiConverterTypeConflictRecord.lower(conflict), @@ -37012,7 +37948,7 @@ def resolve_delete_wins(conflict: ConflictRecord) -> ResolutionRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def resolve_prefer_left(conflict: ConflictRecord) -> ResolutionRecord: - + _UniffiFfiConverterTypeConflictRecord.check_lower(conflict) _uniffi_lowered_args = ( _UniffiFfiConverterTypeConflictRecord.lower(conflict), @@ -37026,7 +37962,7 @@ def resolve_prefer_left(conflict: ConflictRecord) -> ResolutionRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def resolve_prefer_right(conflict: ConflictRecord) -> ResolutionRecord: - + _UniffiFfiConverterTypeConflictRecord.check_lower(conflict) _uniffi_lowered_args = ( _UniffiFfiConverterTypeConflictRecord.lower(conflict), @@ -37040,7 +37976,7 @@ def resolve_prefer_right(conflict: ConflictRecord) -> ResolutionRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def resolve_update_wins(conflict: ConflictRecord) -> ResolutionRecord: - + _UniffiFfiConverterTypeConflictRecord.check_lower(conflict) _uniffi_lowered_args = ( _UniffiFfiConverterTypeConflictRecord.lower(conflict), @@ -37065,7 +38001,7 @@ def retain_all_named_roots() -> NamedRootRetentionRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def retain_exact_named_roots(names: typing.List[bytes]) -> NamedRootRetentionRecord: - + _UniffiFfiConverterSequenceBytes.check_lower(names) _uniffi_lowered_args = ( _UniffiFfiConverterSequenceBytes.lower(names), @@ -37079,7 +38015,7 @@ def retain_exact_named_roots(names: typing.List[bytes]) -> NamedRootRetentionRec ) return _uniffi_lift_return(_uniffi_ffi_result) def retain_named_root_prefix(prefix: bytes) -> NamedRootRetentionRecord: - + _UniffiFfiConverterBytes.check_lower(prefix) _uniffi_lowered_args = ( _UniffiFfiConverterBytes.lower(prefix), @@ -37093,7 +38029,7 @@ def retain_named_root_prefix(prefix: bytes) -> NamedRootRetentionRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def retain_named_roots_updated_since(prefix: bytes,min_updated_at_millis: int) -> NamedRootRetentionRecord: - + _UniffiFfiConverterBytes.check_lower(prefix) _UniffiFfiConverterUInt64.check_lower(min_updated_at_millis) @@ -37110,7 +38046,7 @@ def retain_named_roots_updated_since(prefix: bytes,min_updated_at_millis: int) - ) return _uniffi_lift_return(_uniffi_ffi_result) def retain_newest_named_roots(prefix: bytes,count: int) -> NamedRootRetentionRecord: - + _UniffiFfiConverterBytes.check_lower(prefix) _UniffiFfiConverterUInt64.check_lower(count) @@ -37127,7 +38063,7 @@ def retain_newest_named_roots(prefix: bytes,count: int) -> NamedRootRetentionRec ) return _uniffi_lift_return(_uniffi_ffi_result) def reverse_cursor_before_key(key: bytes) -> ReverseCursorRecord: - + _UniffiFfiConverterBytes.check_lower(key) _uniffi_lowered_args = ( _UniffiFfiConverterBytes.lower(key), @@ -37152,7 +38088,7 @@ def reverse_cursor_end() -> ReverseCursorRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def root_manifest_from_bytes(bytes: bytes) -> RootManifestRecord: - + _UniffiFfiConverterBytes.check_lower(bytes) _uniffi_lowered_args = ( _UniffiFfiConverterBytes.lower(bytes), @@ -37166,7 +38102,7 @@ def root_manifest_from_bytes(bytes: bytes) -> RootManifestRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def root_manifest_to_bytes(record: RootManifestRecord) -> bytes: - + _UniffiFfiConverterTypeRootManifestRecord.check_lower(record) _uniffi_lowered_args = ( _UniffiFfiConverterTypeRootManifestRecord.lower(record), @@ -37180,7 +38116,7 @@ def root_manifest_to_bytes(record: RootManifestRecord) -> bytes: ) return _uniffi_lift_return(_uniffi_ffi_result) def sign_proof_bundle_hmac_sha256(proof_bundle: bytes,key_id: bytes,secret: bytes,context: bytes,issued_at_millis: typing.Optional[int],expires_at_millis: typing.Optional[int],nonce: bytes) -> AuthenticatedProofEnvelopeRecord: - + _UniffiFfiConverterBytes.check_lower(proof_bundle) _UniffiFfiConverterBytes.check_lower(key_id) @@ -37212,7 +38148,7 @@ def sign_proof_bundle_hmac_sha256(proof_bundle: bytes,key_id: bytes,secret: byte ) return _uniffi_lift_return(_uniffi_ffi_result) def snapshot_bundle_digest(record: SnapshotBundleRecord) -> bytes: - + _UniffiFfiConverterTypeSnapshotBundleRecord.check_lower(record) _uniffi_lowered_args = ( _UniffiFfiConverterTypeSnapshotBundleRecord.lower(record), @@ -37226,7 +38162,7 @@ def snapshot_bundle_digest(record: SnapshotBundleRecord) -> bytes: ) return _uniffi_lift_return(_uniffi_ffi_result) def snapshot_bundle_digest_bytes(bytes: bytes) -> bytes: - + _UniffiFfiConverterBytes.check_lower(bytes) _uniffi_lowered_args = ( _UniffiFfiConverterBytes.lower(bytes), @@ -37240,7 +38176,7 @@ def snapshot_bundle_digest_bytes(bytes: bytes) -> bytes: ) return _uniffi_lift_return(_uniffi_ffi_result) def snapshot_bundle_from_bytes(bytes: bytes) -> SnapshotBundleRecord: - + _UniffiFfiConverterBytes.check_lower(bytes) _uniffi_lowered_args = ( _UniffiFfiConverterBytes.lower(bytes), @@ -37254,7 +38190,7 @@ def snapshot_bundle_from_bytes(bytes: bytes) -> SnapshotBundleRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def snapshot_bundle_summary(record: SnapshotBundleRecord) -> SnapshotBundleSummaryRecord: - + _UniffiFfiConverterTypeSnapshotBundleRecord.check_lower(record) _uniffi_lowered_args = ( _UniffiFfiConverterTypeSnapshotBundleRecord.lower(record), @@ -37268,7 +38204,7 @@ def snapshot_bundle_summary(record: SnapshotBundleRecord) -> SnapshotBundleSumma ) return _uniffi_lift_return(_uniffi_ffi_result) def snapshot_bundle_summary_from_bytes(bytes: bytes) -> SnapshotBundleSummaryRecord: - + _UniffiFfiConverterBytes.check_lower(bytes) _uniffi_lowered_args = ( _UniffiFfiConverterBytes.lower(bytes), @@ -37282,7 +38218,7 @@ def snapshot_bundle_summary_from_bytes(bytes: bytes) -> SnapshotBundleSummaryRec ) return _uniffi_lift_return(_uniffi_ffi_result) def snapshot_bundle_to_bytes(record: SnapshotBundleRecord) -> bytes: - + _UniffiFfiConverterTypeSnapshotBundleRecord.check_lower(record) _uniffi_lowered_args = ( _UniffiFfiConverterTypeSnapshotBundleRecord.lower(record), @@ -37296,7 +38232,7 @@ def snapshot_bundle_to_bytes(record: SnapshotBundleRecord) -> bytes: ) return _uniffi_lift_return(_uniffi_ffi_result) def snapshot_id_from_name(namespace: SnapshotNamespaceRecord,name: bytes) -> typing.Optional[bytes]: - + _UniffiFfiConverterTypeSnapshotNamespaceRecord.check_lower(namespace) _UniffiFfiConverterBytes.check_lower(name) @@ -37335,7 +38271,7 @@ def snapshot_namespace_checkpoint() -> SnapshotNamespaceRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def snapshot_namespace_custom(prefix: bytes) -> SnapshotNamespaceRecord: - + _UniffiFfiConverterBytes.check_lower(prefix) _uniffi_lowered_args = ( _UniffiFfiConverterBytes.lower(prefix), @@ -37360,7 +38296,7 @@ def snapshot_namespace_tag() -> SnapshotNamespaceRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def snapshot_root_name(namespace: SnapshotNamespaceRecord,id: bytes) -> bytes: - + _UniffiFfiConverterTypeSnapshotNamespaceRecord.check_lower(namespace) _UniffiFfiConverterBytes.check_lower(id) @@ -37377,7 +38313,7 @@ def snapshot_root_name(namespace: SnapshotNamespaceRecord,id: bytes) -> bytes: ) return _uniffi_lift_return(_uniffi_ffi_result) def timestamp_millis_key(value: int) -> bytes: - + _UniffiFfiConverterUInt64.check_lower(value) _uniffi_lowered_args = ( _UniffiFfiConverterUInt64.lower(value), @@ -37391,7 +38327,7 @@ def timestamp_millis_key(value: int) -> bytes: ) return _uniffi_lift_return(_uniffi_ffi_result) def timestamped_value_from_bytes(bytes: bytes) -> TimestampedValueRecord: - + _UniffiFfiConverterBytes.check_lower(bytes) _uniffi_lowered_args = ( _UniffiFfiConverterBytes.lower(bytes), @@ -37405,7 +38341,7 @@ def timestamped_value_from_bytes(bytes: bytes) -> TimestampedValueRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def timestamped_value_now(value: bytes) -> TimestampedValueRecord: - + _UniffiFfiConverterBytes.check_lower(value) _uniffi_lowered_args = ( _UniffiFfiConverterBytes.lower(value), @@ -37419,7 +38355,7 @@ def timestamped_value_now(value: bytes) -> TimestampedValueRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def timestamped_value_to_bytes(record: TimestampedValueRecord) -> bytes: - + _UniffiFfiConverterTypeTimestampedValueRecord.check_lower(record) _uniffi_lowered_args = ( _UniffiFfiConverterTypeTimestampedValueRecord.lower(record), @@ -37433,7 +38369,7 @@ def timestamped_value_to_bytes(record: TimestampedValueRecord) -> bytes: ) return _uniffi_lift_return(_uniffi_ffi_result) def tombstone_compaction_mutation(key: bytes,stored_value: bytes) -> typing.Optional[MutationRecord]: - + _UniffiFfiConverterBytes.check_lower(key) _UniffiFfiConverterBytes.check_lower(stored_value) @@ -37450,7 +38386,7 @@ def tombstone_compaction_mutation(key: bytes,stored_value: bytes) -> typing.Opti ) return _uniffi_lift_return(_uniffi_ffi_result) def tombstone_from_bytes(bytes: bytes) -> TombstoneRecord: - + _UniffiFfiConverterBytes.check_lower(bytes) _uniffi_lowered_args = ( _UniffiFfiConverterBytes.lower(bytes), @@ -37464,7 +38400,7 @@ def tombstone_from_bytes(bytes: bytes) -> TombstoneRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def tombstone_from_stored_bytes(bytes: bytes) -> typing.Optional[TombstoneRecord]: - + _UniffiFfiConverterBytes.check_lower(bytes) _uniffi_lowered_args = ( _UniffiFfiConverterBytes.lower(bytes), @@ -37478,7 +38414,7 @@ def tombstone_from_stored_bytes(bytes: bytes) -> typing.Optional[TombstoneRecord ) return _uniffi_lift_return(_uniffi_ffi_result) def tombstone_to_bytes(record: TombstoneRecord) -> bytes: - + _UniffiFfiConverterTypeTombstoneRecord.check_lower(record) _uniffi_lowered_args = ( _UniffiFfiConverterTypeTombstoneRecord.lower(record), @@ -37492,7 +38428,7 @@ def tombstone_to_bytes(record: TombstoneRecord) -> bytes: ) return _uniffi_lift_return(_uniffi_ffi_result) def tombstone_upsert_mutation(key: bytes,tombstone: TombstoneRecord) -> MutationRecord: - + _UniffiFfiConverterBytes.check_lower(key) _UniffiFfiConverterTypeTombstoneRecord.check_lower(tombstone) @@ -37509,7 +38445,7 @@ def tombstone_upsert_mutation(key: bytes,tombstone: TombstoneRecord) -> Mutation ) return _uniffi_lift_return(_uniffi_ffi_result) def tree_config(min_chunk_size: int,max_chunk_size: int,chunking_factor: int,hash_seed: int,encoding: EncodingRecord,node_cache_max_nodes: typing.Optional[int],node_cache_max_bytes: typing.Optional[int]) -> ConfigRecord: - + _UniffiFfiConverterUInt64.check_lower(min_chunk_size) _UniffiFfiConverterUInt64.check_lower(max_chunk_size) @@ -37541,7 +38477,7 @@ def tree_config(min_chunk_size: int,max_chunk_size: int,chunking_factor: int,has ) return _uniffi_lift_return(_uniffi_ffi_result) def tree_config_from_format_bytes(format_bytes: bytes,node_cache_max_nodes: typing.Optional[int],node_cache_max_bytes: typing.Optional[int]) -> ConfigRecord: - + _UniffiFfiConverterBytes.check_lower(format_bytes) _UniffiFfiConverterOptionalUInt64.check_lower(node_cache_max_nodes) @@ -37561,7 +38497,7 @@ def tree_config_from_format_bytes(format_bytes: bytes,node_cache_max_nodes: typi ) return _uniffi_lift_return(_uniffi_ffi_result) def u128_key(value: str) -> bytes: - + _UniffiFfiConverterString.check_lower(value) _uniffi_lowered_args = ( _UniffiFfiConverterString.lower(value), @@ -37575,7 +38511,7 @@ def u128_key(value: str) -> bytes: ) return _uniffi_lift_return(_uniffi_ffi_result) def u64_key(value: int) -> bytes: - + _UniffiFfiConverterUInt64.check_lower(value) _uniffi_lowered_args = ( _UniffiFfiConverterUInt64.lower(value), @@ -37589,7 +38525,7 @@ def u64_key(value: int) -> bytes: ) return _uniffi_lift_return(_uniffi_ffi_result) def upsert_mutation(key: bytes,value: bytes) -> MutationRecord: - + _UniffiFfiConverterBytes.check_lower(key) _UniffiFfiConverterBytes.check_lower(value) @@ -37606,7 +38542,7 @@ def upsert_mutation(key: bytes,value: bytes) -> MutationRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def value_ref_from_bytes(bytes: bytes) -> ValueRefRecord: - + _UniffiFfiConverterBytes.check_lower(bytes) _uniffi_lowered_args = ( _UniffiFfiConverterBytes.lower(bytes), @@ -37620,7 +38556,7 @@ def value_ref_from_bytes(bytes: bytes) -> ValueRefRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def value_ref_from_stored_bytes(bytes: bytes) -> ValueRefRecord: - + _UniffiFfiConverterBytes.check_lower(bytes) _uniffi_lowered_args = ( _UniffiFfiConverterBytes.lower(bytes), @@ -37634,7 +38570,7 @@ def value_ref_from_stored_bytes(bytes: bytes) -> ValueRefRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def value_ref_inline_requires_escape(value: bytes) -> bool: - + _UniffiFfiConverterBytes.check_lower(value) _uniffi_lowered_args = ( _UniffiFfiConverterBytes.lower(value), @@ -37648,7 +38584,7 @@ def value_ref_inline_requires_escape(value: bytes) -> bool: ) return _uniffi_lift_return(_uniffi_ffi_result) def value_ref_to_bytes(record: ValueRefRecord) -> bytes: - + _UniffiFfiConverterTypeValueRefRecord.check_lower(record) _uniffi_lowered_args = ( _UniffiFfiConverterTypeValueRefRecord.lower(record), @@ -37662,7 +38598,7 @@ def value_ref_to_bytes(record: ValueRefRecord) -> bytes: ) return _uniffi_lift_return(_uniffi_ffi_result) def verify_authenticated_proof_bundle(envelope_bytes: bytes,secret: bytes,now_millis: typing.Optional[int]) -> AuthenticatedProofBundleVerificationRecord: - + _UniffiFfiConverterBytes.check_lower(envelope_bytes) _UniffiFfiConverterBytes.check_lower(secret) @@ -37682,7 +38618,7 @@ def verify_authenticated_proof_bundle(envelope_bytes: bytes,secret: bytes,now_mi ) return _uniffi_lift_return(_uniffi_ffi_result) def verify_authenticated_proof_envelope(envelope: AuthenticatedProofEnvelopeRecord,secret: bytes,now_millis: typing.Optional[int]) -> AuthenticatedProofEnvelopeVerificationRecord: - + _UniffiFfiConverterTypeAuthenticatedProofEnvelopeRecord.check_lower(envelope) _UniffiFfiConverterBytes.check_lower(secret) @@ -37702,7 +38638,7 @@ def verify_authenticated_proof_envelope(envelope: AuthenticatedProofEnvelopeReco ) return _uniffi_lift_return(_uniffi_ffi_result) def verify_diff_page_proof(proof: DiffPageProofRecord) -> DiffPageProofVerificationRecord: - + _UniffiFfiConverterTypeDiffPageProofRecord.check_lower(proof) _uniffi_lowered_args = ( _UniffiFfiConverterTypeDiffPageProofRecord.lower(proof), @@ -37716,7 +38652,7 @@ def verify_diff_page_proof(proof: DiffPageProofRecord) -> DiffPageProofVerificat ) return _uniffi_lift_return(_uniffi_ffi_result) def verify_key_proof(proof: KeyProofRecord) -> KeyProofVerificationRecord: - + _UniffiFfiConverterTypeKeyProofRecord.check_lower(proof) _uniffi_lowered_args = ( _UniffiFfiConverterTypeKeyProofRecord.lower(proof), @@ -37730,7 +38666,7 @@ def verify_key_proof(proof: KeyProofRecord) -> KeyProofVerificationRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def verify_multi_key_proof(proof: MultiKeyProofRecord) -> MultiKeyProofVerificationRecord: - + _UniffiFfiConverterTypeMultiKeyProofRecord.check_lower(proof) _uniffi_lowered_args = ( _UniffiFfiConverterTypeMultiKeyProofRecord.lower(proof), @@ -37744,7 +38680,7 @@ def verify_multi_key_proof(proof: MultiKeyProofRecord) -> MultiKeyProofVerificat ) return _uniffi_lift_return(_uniffi_ffi_result) def verify_proof_bundle(bytes: bytes) -> ProofBundleVerificationRecord: - + _UniffiFfiConverterBytes.check_lower(bytes) _uniffi_lowered_args = ( _UniffiFfiConverterBytes.lower(bytes), @@ -37758,7 +38694,7 @@ def verify_proof_bundle(bytes: bytes) -> ProofBundleVerificationRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def verify_proximity_membership_proof(proof: ProximityMembershipProofRecord,expected_descriptor: typing.Optional[bytes]) -> ProximityMembershipVerificationRecord: - + _UniffiFfiConverterTypeProximityMembershipProofRecord.check_lower(proof) _UniffiFfiConverterOptionalBytes.check_lower(expected_descriptor) @@ -37775,7 +38711,7 @@ def verify_proximity_membership_proof(proof: ProximityMembershipProofRecord,expe ) return _uniffi_lift_return(_uniffi_ffi_result) def verify_proximity_structure_proof(proof: ProximityStructuralProofRecord,expected_descriptor: typing.Optional[bytes],limits: ContentGraphLimitsRecord) -> ProximityStructuralVerificationRecord: - + _UniffiFfiConverterTypeProximityStructuralProofRecord.check_lower(proof) _UniffiFfiConverterOptionalBytes.check_lower(expected_descriptor) @@ -37795,7 +38731,7 @@ def verify_proximity_structure_proof(proof: ProximityStructuralProofRecord,expec ) return _uniffi_lift_return(_uniffi_ffi_result) def verify_range_page_proof(proof: RangePageProofRecord) -> RangePageProofVerificationRecord: - + _UniffiFfiConverterTypeRangePageProofRecord.check_lower(proof) _uniffi_lowered_args = ( _UniffiFfiConverterTypeRangePageProofRecord.lower(proof), @@ -37809,7 +38745,7 @@ def verify_range_page_proof(proof: RangePageProofRecord) -> RangePageProofVerifi ) return _uniffi_lift_return(_uniffi_ffi_result) def verify_range_proof(proof: RangeProofRecord) -> RangeProofVerificationRecord: - + _UniffiFfiConverterTypeRangeProofRecord.check_lower(proof) _uniffi_lowered_args = ( _UniffiFfiConverterTypeRangeProofRecord.lower(proof), @@ -37823,7 +38759,7 @@ def verify_range_proof(proof: RangeProofRecord) -> RangeProofVerificationRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def verify_snapshot_bundle(record: SnapshotBundleRecord) -> SnapshotBundleVerificationRecord: - + _UniffiFfiConverterTypeSnapshotBundleRecord.check_lower(record) _uniffi_lowered_args = ( _UniffiFfiConverterTypeSnapshotBundleRecord.lower(record), @@ -37837,7 +38773,7 @@ def verify_snapshot_bundle(record: SnapshotBundleRecord) -> SnapshotBundleVerifi ) return _uniffi_lift_return(_uniffi_ffi_result) def verify_snapshot_bundle_bytes(bytes: bytes) -> SnapshotBundleVerificationRecord: - + _UniffiFfiConverterBytes.check_lower(bytes) _uniffi_lowered_args = ( _UniffiFfiConverterBytes.lower(bytes), @@ -37851,7 +38787,7 @@ def verify_snapshot_bundle_bytes(bytes: bytes) -> SnapshotBundleVerificationReco ) return _uniffi_lift_return(_uniffi_ffi_result) def versioned_value_bytes_matches_schema(bytes: bytes,schema: str,version: int) -> bool: - + _UniffiFfiConverterBytes.check_lower(bytes) _UniffiFfiConverterString.check_lower(schema) @@ -37871,7 +38807,7 @@ def versioned_value_bytes_matches_schema(bytes: bytes,schema: str,version: int) ) return _uniffi_lift_return(_uniffi_ffi_result) def versioned_value_bytes_require_schema(bytes: bytes,schema: str,version: int) -> None: - + _UniffiFfiConverterBytes.check_lower(bytes) _UniffiFfiConverterString.check_lower(schema) @@ -37891,7 +38827,7 @@ def versioned_value_bytes_require_schema(bytes: bytes,schema: str,version: int) ) return _uniffi_lift_return(_uniffi_ffi_result) def versioned_value_from_bytes(bytes: bytes) -> VersionedValueRecord: - + _UniffiFfiConverterBytes.check_lower(bytes) _uniffi_lowered_args = ( _UniffiFfiConverterBytes.lower(bytes), @@ -37905,7 +38841,7 @@ def versioned_value_from_bytes(bytes: bytes) -> VersionedValueRecord: ) return _uniffi_lift_return(_uniffi_ffi_result) def versioned_value_matches_schema(record: VersionedValueRecord,schema: str,version: int) -> bool: - + _UniffiFfiConverterTypeVersionedValueRecord.check_lower(record) _UniffiFfiConverterString.check_lower(schema) @@ -37925,7 +38861,7 @@ def versioned_value_matches_schema(record: VersionedValueRecord,schema: str,vers ) return _uniffi_lift_return(_uniffi_ffi_result) def versioned_value_require_schema(record: VersionedValueRecord,schema: str,version: int) -> None: - + _UniffiFfiConverterTypeVersionedValueRecord.check_lower(record) _UniffiFfiConverterString.check_lower(schema) @@ -37945,7 +38881,7 @@ def versioned_value_require_schema(record: VersionedValueRecord,schema: str,vers ) return _uniffi_lift_return(_uniffi_ffi_result) def versioned_value_to_bytes(record: VersionedValueRecord) -> bytes: - + _UniffiFfiConverterTypeVersionedValueRecord.check_lower(record) _uniffi_lowered_args = ( _UniffiFfiConverterTypeVersionedValueRecord.lower(record), @@ -38036,15 +38972,21 @@ def versioned_value_to_bytes(record: VersionedValueRecord) -> bytes: "ProximitySearchRuntimeStatsRecord", "ProductQuantizationConfigRecord", "ProductQuantizationQualityRecord", + "TurboQuantizationConfigRecord", + "TurboQuantizationQualityRecord", + "TurboQuantizationVerificationRecord", "FullRebuildReasonRecord", "CompositeBuildOutcomeRecord", "HnswBuildLimitsRecord", "HnswBuildStatsRecord", "HnswBuildResultRecord", "ProductQuantizationBuildLimitsRecord", + "TurboQuantizationBuildLimitsRecord", "CompositeRebuildOptionsRecord", "ProductQuantizationBuildStatsRecord", "ProductQuantizationBuildResultRecord", + "TurboQuantizationBuildStatsRecord", + "TurboQuantizationBuildResultRecord", "ProximityConfigRecord", "ExactProximityRecordRecord", "ProximityMutationRecord", @@ -38212,6 +39154,8 @@ def versioned_value_to_bytes(record: VersionedValueRecord) -> bytes: "default_proximity_config", "default_proximity_search_runtime_policy", "default_secondary_index_limits", + "default_turboquant_build_limits", + "default_turboquant_config", "delete_mutation", "diff_page_proof_from_bytes", "diff_page_proof_to_bytes", @@ -38333,6 +39277,8 @@ def versioned_value_to_bytes(record: VersionedValueRecord) -> bytes: "BindingHnswIndexProtocol", "BindingProductQuantizer", "BindingProductQuantizerProtocol", + "BindingTurboQuantizer", + "BindingTurboQuantizerProtocol", "BindingAcceleratorCatalog", "BindingAcceleratorCatalogProtocol", "ProximityRecordVisitorCallbackImpl", diff --git a/bindings/python/tests/test_portable_parity.py b/bindings/python/tests/test_portable_parity.py index 169d948f..5edadf2a 100644 --- a/bindings/python/tests/test_portable_parity.py +++ b/bindings/python/tests/test_portable_parity.py @@ -16,6 +16,7 @@ ProximityFilterRecord, ProximityRecord, ProductQuantizationConfigRecord, + TurboQuantizationConfigRecord, ProllyBindingError, ProximityMutationRecord, ProximityCancellationToken, @@ -260,6 +261,100 @@ def test_product_quantizer_lifecycle_is_portable_and_bounded(self): with proximity.load_pq(manifest) as loaded: self.assertEqual(loaded.manifest, manifest) + def test_turboquant_lifecycle_is_portable_verifiable_and_bounded(self): + with Engine.memory() as engine: + proximity = engine.build_proximity( + dimensions=8, + records=[ + ProximityRecord( + f"turbo-{index:02}".encode(), + [float(index), float(index % 3), 0.0, 1.0, 2.0, 3.0, 4.0, 5.0], + f"value-{index:02}".encode(), + ) + for index in range(32) + ], + ) + config = TurboQuantizationConfigRecord( + bit_width=4, + rerank_multiplier=4, + seed=(1 << 64) - 1, + ) + built = proximity.build_turboquant(config=config, worker_threads=2) + self.assertEqual(built.stats.encoded_vectors, 32) + request = exact_proximity_search_request( + [0.0, 0.0, 0.0, 1.0, 2.0, 3.0, 4.0, 5.0], 3 + ) + request.policy = SearchPolicyKind.FIXED_BUDGET + request.backend = SearchBackendRecord.TURBO_QUANTIZED + + with built.index as index: + self.assertEqual(index.config, config) + self.assertEqual(index.source_descriptor, proximity.descriptor) + self.assertEqual(index.verify(proximity).encoded_vectors, 32) + result = index.search(proximity, request) + self.assertEqual(result.backend, SearchBackendRecord.TURBO_QUANTIZED) + self.assertEqual(result.neighbors[0].key, b"turbo-00") + self.assertGreater(result.stats.distance_evaluations, 0) + with engine.proximity_search_runtime() as runtime: + self.assertEqual( + index.search_with_runtime(proximity, request, runtime).backend, + SearchBackendRecord.TURBO_QUANTIZED, + ) + with ProximityCancellationToken() as cancellation: + cancellation.cancel() + cancelled = index.search_cancellable( + proximity, request, cancellation=cancellation + ) + self.assertEqual(cancelled.completion, SearchCompletionRecord.CANCELLED) + self.assertEqual(cancelled.neighbors, []) + manifest = index.manifest + with index.prove_search(proximity, request) as proof: + self.assertEqual( + proof.verify(proximity.descriptor).result.backend, + SearchBackendRecord.TURBO_QUANTIZED, + ) + with proximity.build_accelerator_catalog(turboquant=index) as catalog: + self.assertEqual( + catalog.entries[0].kind, + CatalogAcceleratorKindRecord.TURBO_QUANTIZED, + ) + self.assertEqual( + catalog.search(proximity, request).backend, + SearchBackendRecord.TURBO_QUANTIZED, + ) + + current, _ = proximity.mutate( + [ + ProximityMutationRecord( + key=b"turbo-00", + vector=[0.25, 0.0, 0.0, 1.0, 2.0, 3.0, 4.0, 5.0], + value=b"updated", + ) + ] + ) + with current: + composite = current.build_composite_turboquant( + proximity, index + ).accelerator + self.assertIsNotNone(composite) + with composite: + self.assertEqual( + composite.base_kind, + CompositeBaseKindRecord.TURBO_QUANTIZED, + ) + composite_request = exact_proximity_search_request( + [0.0, 0.0, 0.0, 1.0, 2.0, 3.0, 4.0, 5.0], 3 + ) + composite_request.policy = SearchPolicyKind.FIXED_BUDGET + composite_request.backend = SearchBackendRecord.COMPOSITE + self.assertEqual( + composite.search(current, composite_request).backend, + SearchBackendRecord.COMPOSITE, + ) + + with proximity.load_turboquant(manifest) as loaded: + self.assertEqual(loaded.manifest, manifest) + def test_hnsw_accelerator_lifecycle_is_portable(self): with Engine.memory() as engine: proximity = engine.build_proximity( @@ -336,6 +431,7 @@ def test_proximity_rich_search_request_is_shared_by_map_session_and_proof(self): backend=SearchBackendRecord.AUTO, hnsw_ef_search=None, pq_rerank_multiplier=None, + turboquant_rerank_multiplier=None, ) result = proximity.search(request) diff --git a/bindings/ruby/COOKBOOK.md b/bindings/ruby/COOKBOOK.md index 3e29609b..6a32eafe 100644 --- a/bindings/ruby/COOKBOOK.md +++ b/bindings/ruby/COOKBOOK.md @@ -42,6 +42,59 @@ Application-style files include `batch_build.rb`, `local_first_state.rb`, `vector_sidecar.rb`, `provenance_values.rb`, `materialized_view.rb`, `filesystem_snapshot.rb`, and `durable_sqlite.rb`. +## Build And Force A TurboQuant RAG Sidecar + +TurboQuant is a disposable routing sidecar. The proximity map remains +authoritative and every retained candidate is reranked from its full-precision +vector. Keep the backend explicit until qualification enables `Auto`. + +```ruby +require 'prolly' + +records = 32.times.map do |index| + Prolly::ProximityRecord.new( + key: format('chunk/%02d', index).b, + vector: [index.to_f, (index % 3).to_f, 0.0, 1.0, 2.0, 3.0, 4.0, 5.0], + value: format('document-%02d', index).b + ) +end + +Prolly::Engine.memory.use do |engine| + proximity = engine.build_proximity(dimensions: 8, records: records) + begin + built = proximity.build_turboquant(worker_threads: 2) + request = Prolly.exact_proximity_search_request( + [0.0, 0.0, 0.0, 1.0, 2.0, 3.0, 4.0, 5.0], 3 + ) + request = Prolly::ProximitySearchRequestRecord.new( + query: request.query, + k: request.k, + policy: Prolly::SearchPolicyKind::FIXED_BUDGET, + adaptive_quality: request.adaptive_quality, + budget: request.budget, + filter: request.filter, + kernel: request.kernel, + backend: Prolly::SearchBackendRecord::TURBO_QUANTIZED, + hnsw_ef_search: request.hnsw_ef_search, + pq_rerank_multiplier: request.pq_rerank_multiplier, + turboquant_rerank_multiplier: request.turboquant_rerank_multiplier + ) + + built.index.use do |index| + raise 'incomplete sidecar' unless index.verify(proximity).encoded_vectors == records.length + result = index.search(proximity, request) + raise 'unexpected backend' unless result.backend == Prolly::SearchBackendRecord::TURBO_QUANTIZED + manifest = index.manifest + proximity.load_turboquant(manifest).use do |reopened| + raise 'manifest mismatch' unless reopened.manifest == manifest + end + end + ensure + proximity.close + end +end +``` + ## Create A Durable Index ```ruby diff --git a/bindings/ruby/lib/prolly/api.rb b/bindings/ruby/lib/prolly/api.rb index be5e5805..6109377d 100644 --- a/bindings/ruby/lib/prolly/api.rb +++ b/bindings/ruby/lib/prolly/api.rb @@ -6,9 +6,11 @@ module Prolly ProximityRecord = Data.define(:key, :vector, :value) HnswBuildResult = Data.define(:index, :stats) ProductQuantizationBuildResult = Data.define(:index, :stats) + TurboQuantizationBuildResult = Data.define(:index, :stats) CompositeBuildOutcome = Data.define(:accelerator, :reasons, :stats) CompositeBuildOrRebuildOutcome = Data.define( - :kind, :composite, :hnsw, :pq, :reasons, :composite_stats, :hnsw_stats, :pq_stats + :kind, :composite, :hnsw, :pq, :turboquant, :reasons, :composite_stats, + :hnsw_stats, :pq_stats, :turboquant_stats ) TypedEntry = Data.define(:key, :value) TypedMigrationResult = Data.define(:update, :scanned_values, :rewritten_values) @@ -173,7 +175,8 @@ def self.owned_proximity_search_request(request) kernel: request.kernel, backend: request.backend, hnsw_ef_search: request.hnsw_ef_search, - pq_rerank_multiplier: request.pq_rerank_multiplier + pq_rerank_multiplier: request.pq_rerank_multiplier, + turboquant_rerank_multiplier: request.turboquant_rerank_multiplier ) end @@ -958,6 +961,17 @@ def build_pq(config: Prolly.default_pq_config, worker_threads: 1, end end def load_pq(manifest) = open! { ProductQuantizer.new(@native.load_pq(manifest.b)) } + def build_turboquant(config: Prolly.default_turboquant_config, worker_threads: 1, + limits: Prolly.default_turboquant_build_limits) + open! do + result = @native.build_turboquant(config, worker_threads, limits) + TurboQuantizationBuildResult.new( + index: TurboQuantizer.new(result.index), + stats: result.stats + ) + end + end + def load_turboquant(manifest) = open! { TurboQuantizer.new(@native.load_turboquant(manifest.b)) } def build_composite_hnsw(base_map, base, config: Prolly.default_composite_accelerator_config, limits: Prolly.default_composite_build_limits) open! do @@ -984,16 +998,33 @@ def build_composite_pq(base_map, base, config: Prolly.default_composite_accelera ) end end + def build_composite_turboquant( + base_map, base, config: Prolly.default_composite_accelerator_config, + limits: Prolly.default_composite_build_limits + ) + open! do + result = @native.build_composite_turboquant( + base_map.send(:native_for_accelerator), base.send(:native_for_composite), config, limits + ) + CompositeBuildOutcome.new( + accelerator: result.accelerator && CompositeAccelerator.new(result.accelerator), + reasons: result.reasons, + stats: result.stats + ) + end + end def portable_rebuild_outcome(result) CompositeBuildOrRebuildOutcome.new( kind: result.kind, composite: result.composite && CompositeAccelerator.new(result.composite), hnsw: result.hnsw && HnswIndex.new(result.hnsw), pq: result.pq && ProductQuantizer.new(result.pq), + turboquant: result.turboquant && TurboQuantizer.new(result.turboquant), reasons: result.reasons, composite_stats: result.composite_stats, hnsw_stats: result.hnsw_stats, - pq_stats: result.pq_stats + pq_stats: result.pq_stats, + turboquant_stats: result.turboquant_stats ) end private :portable_rebuild_outcome @@ -1025,13 +1056,28 @@ def build_or_rebuild_composite_pq( ) end end + def build_or_rebuild_composite_turboquant( + base_map, base, config: Prolly.default_composite_accelerator_config, + limits: Prolly.default_composite_build_limits, + rebuild: Prolly.default_composite_rebuild_options + ) + open! do + portable_rebuild_outcome( + @native.build_or_rebuild_composite_turboquant( + base_map.send(:native_for_accelerator), base.send(:native_for_composite), + config, limits, rebuild + ) + ) + end + end def load_composite(manifest) = open! { CompositeAccelerator.new(@native.load_composite(manifest.b)) } - def build_accelerator_catalog(hnsw: nil, pq: nil, composite: nil) + def build_accelerator_catalog(hnsw: nil, pq: nil, turboquant: nil, composite: nil) open! do AcceleratorCatalog.new( @native.build_accelerator_catalog( hnsw&.send(:native_for_composite), pq&.send(:native_for_composite), + turboquant&.send(:native_for_composite), composite&.send(:native_for_composite) ) ) @@ -1268,6 +1314,81 @@ def open! end end + class TurboQuantizer + def initialize(native) + @native = native + @closed = false + end + + def manifest = open! { @native.manifest } + def source_descriptor = open! { @native.source_descriptor } + def config = open! { @native.config } + def quality = open! { @native.quality } + def verify(map) = open! { @native.verify(map.send(:native_for_accelerator)) } + def search(map, request) + open! do + @native.search( + map.send(:native_for_accelerator), Prolly.owned_proximity_search_request(request) + ) + end + end + def search_with_runtime(map, request, runtime) + open! do + @native.search_with_runtime( + map.send(:native_for_accelerator), Prolly.owned_proximity_search_request(request), + runtime.send(:native_for_search) + ) + end + end + def search_cancellable(map, request, cancellation:, runtime: nil) + open! do + @native.search_cancellable( + map.send(:native_for_accelerator), Prolly.owned_proximity_search_request(request), + runtime&.send(:native_for_search), cancellation.send(:native_for_search) + ) + end + end + def search_async(map, request, runtime: nil, cancellation: nil) + owned = Prolly.owned_proximity_search_request(request) + token = cancellation || ProximityCancellationToken.new + Future.new(cancel: -> { token.cancel }) do + search_cancellable(map, owned, runtime: runtime, cancellation: token) + end + end + def prove_search(map, request, limits = Prolly.default_content_graph_limits) + open! do + ProximitySearchProof.new( + @native.prove_search( + map.send(:native_for_accelerator), + Prolly.owned_proximity_search_request(request), + limits + ) + ) + end + end + def close = @closed = true + + def use + raise 'TurboQuantizer is closed' if @closed + return self unless block_given? + + begin + yield self + ensure + close + end + end + + private + + def native_for_composite = open! { @native } + + def open! + raise 'TurboQuantizer is closed' if @closed + yield + end + end + class CompositeAccelerator def initialize(native) @native = native diff --git a/bindings/ruby/lib/prolly/generated/prolly.rb b/bindings/ruby/lib/prolly/generated/prolly.rb index 36186963..8a3b96ca 100644 --- a/bindings/ruby/lib/prolly/generated/prolly.rb +++ b/bindings/ruby/lib/prolly/generated/prolly.rb @@ -130,8 +130,8 @@ def consumeIntoBytes def self.check_lower_TypeAcceleratorCatalogEntryRecord(v) RustBuffer.check_lower_TypeCatalogAcceleratorKindRecord(v.kind) - - + + end def self.alloc_from_TypeAcceleratorCatalogEntryRecord(v) @@ -150,11 +150,11 @@ def consumeIntoTypeAcceleratorCatalogEntryRecord # The Record type ActiveIndexHealthRecord. def self.check_lower_TypeActiveIndexHealthRecord(v) - - - + + + RustBuffer.check_lower_TypeIndexProjectionRecord(v.projection) - + end def self.alloc_from_TypeActiveIndexHealthRecord(v) @@ -173,7 +173,7 @@ def consumeIntoTypeActiveIndexHealthRecord # The Record type AuthenticatedProofBundleVerificationRecord. def self.check_lower_TypeAuthenticatedProofBundleVerificationRecord(v) - + RustBuffer.check_lower_TypeAuthenticatedProofEnvelopeVerificationRecord(v.envelope) RustBuffer.check_lower_OptionalTypeProofBundleVerificationRecord(v.proof) RustBuffer.check_lower_Optionalstring(v.proof_error) @@ -195,14 +195,14 @@ def consumeIntoTypeAuthenticatedProofBundleVerificationRecord # The Record type AuthenticatedProofEnvelopeRecord. def self.check_lower_TypeAuthenticatedProofEnvelopeRecord(v) - - - - + + + + RustBuffer.check_lower_Optionalu64(v.issued_at_millis) RustBuffer.check_lower_Optionalu64(v.expires_at_millis) - - + + end def self.alloc_from_TypeAuthenticatedProofEnvelopeRecord(v) @@ -221,18 +221,18 @@ def consumeIntoTypeAuthenticatedProofEnvelopeRecord # The Record type AuthenticatedProofEnvelopeVerificationRecord. def self.check_lower_TypeAuthenticatedProofEnvelopeVerificationRecord(v) - - - - - - - - - + + + + + + + + + RustBuffer.check_lower_Optionalu64(v.issued_at_millis) RustBuffer.check_lower_Optionalu64(v.expires_at_millis) - + end def self.alloc_from_TypeAuthenticatedProofEnvelopeVerificationRecord(v) @@ -271,20 +271,20 @@ def consumeIntoTypeBatchApplyResultRecord # The Record type BatchApplyStatsRecord. def self.check_lower_TypeBatchApplyStatsRecord(v) - - - - - - - - - - - - - - + + + + + + + + + + + + + + @@ -307,11 +307,11 @@ def consumeIntoTypeBatchApplyStatsRecord def self.check_lower_TypeBlobGcPlanRecord(v) RustBuffer.check_lower_TypeBlobGcReachabilityRecord(v.reachability) - + RustBuffer.check_lower_SequenceTypeBlobRefRecord(v.reclaimable_blobs) - - - + + + end def self.alloc_from_TypeBlobGcPlanRecord(v) @@ -331,10 +331,10 @@ def consumeIntoTypeBlobGcPlanRecord def self.check_lower_TypeBlobGcReachabilityRecord(v) RustBuffer.check_lower_SequenceTypeBlobRefRecord(v.live_blobs) - - - - + + + + end def self.alloc_from_TypeBlobGcReachabilityRecord(v) @@ -354,8 +354,8 @@ def consumeIntoTypeBlobGcReachabilityRecord def self.check_lower_TypeBlobGcSweepRecord(v) RustBuffer.check_lower_TypeBlobGcPlanRecord(v.plan) - - + + end def self.alloc_from_TypeBlobGcSweepRecord(v) @@ -374,8 +374,8 @@ def consumeIntoTypeBlobGcSweepRecord # The Record type BlobRefRecord. def self.check_lower_TypeBlobRefRecord(v) - - + + end def self.alloc_from_TypeBlobRefRecord(v) @@ -414,10 +414,10 @@ def consumeIntoTypeBytesListResultRecord # The Record type CacheStatsRecord. def self.check_lower_TypeCacheStatsRecord(v) - - - - + + + + end def self.alloc_from_TypeCacheStatsRecord(v) @@ -457,7 +457,7 @@ def consumeIntoTypeChangedSpanHintRecord # The Record type ChangedSpanRecord. def self.check_lower_TypeChangedSpanRecord(v) - + RustBuffer.check_lower_Optionalbytes(v._end) end @@ -477,11 +477,11 @@ def consumeIntoTypeChangedSpanRecord # The Record type CompositeAcceleratorConfigRecord. def self.check_lower_TypeCompositeAcceleratorConfigRecord(v) - - - - - + + + + + end def self.alloc_from_TypeCompositeAcceleratorConfigRecord(v) @@ -526,10 +526,12 @@ def self.check_lower_TypeCompositeBuildOrRebuildOutcomeRecord(v) RustBuffer.check_lower_OptionalTypeBindingCompositeAccelerator(v.composite) RustBuffer.check_lower_OptionalTypeBindingHnswIndex(v.hnsw) RustBuffer.check_lower_OptionalTypeBindingProductQuantizer(v.pq) + RustBuffer.check_lower_OptionalTypeBindingTurboQuantizer(v.turboquant) RustBuffer.check_lower_SequenceTypeFullRebuildReasonRecord(v.reasons) RustBuffer.check_lower_TypeCompositeBuildStatsRecord(v.composite_stats) RustBuffer.check_lower_OptionalTypeHnswBuildStatsRecord(v.hnsw_stats) RustBuffer.check_lower_OptionalTypeProductQuantizationBuildStatsRecord(v.pq_stats) + RustBuffer.check_lower_OptionalTypeTurboQuantizationBuildStatsRecord(v.turboquant_stats) end def self.alloc_from_TypeCompositeBuildOrRebuildOutcomeRecord(v) @@ -569,16 +571,16 @@ def consumeIntoTypeCompositeBuildOutcomeRecord # The Record type CompositeBuildStatsRecord. def self.check_lower_TypeCompositeBuildStatsRecord(v) - - - - - - - - - - + + + + + + + + + + end def self.alloc_from_TypeCompositeBuildStatsRecord(v) @@ -598,8 +600,10 @@ def consumeIntoTypeCompositeBuildStatsRecord def self.check_lower_TypeCompositeRebuildOptionsRecord(v) RustBuffer.check_lower_TypeHnswBuildLimitsRecord(v.hnsw_limits) - + RustBuffer.check_lower_TypeProductQuantizationBuildLimitsRecord(v.pq_limits) + + RustBuffer.check_lower_TypeTurboQuantizationBuildLimitsRecord(v.turboquant_limits) end def self.alloc_from_TypeCompositeRebuildOptionsRecord(v) @@ -618,10 +622,10 @@ def consumeIntoTypeCompositeRebuildOptionsRecord # The Record type ConfigRecord. def self.check_lower_TypeConfigRecord(v) - - - - + + + + RustBuffer.check_lower_TypeEncodingRecord(v.encoding) RustBuffer.check_lower_Optionalu64(v.node_cache_max_nodes) RustBuffer.check_lower_Optionalu64(v.node_cache_max_bytes) @@ -664,7 +668,7 @@ def consumeIntoTypeConflictPageRecord # The Record type ConflictRecord. def self.check_lower_TypeConflictRecord(v) - + RustBuffer.check_lower_Optionalbytes(v.base) RustBuffer.check_lower_Optionalbytes(v.left) RustBuffer.check_lower_Optionalbytes(v.right) @@ -686,10 +690,10 @@ def consumeIntoTypeConflictRecord # The Record type ContentGraphLimitsRecord. def self.check_lower_TypeContentGraphLimitsRecord(v) - - - - + + + + end def self.alloc_from_TypeContentGraphLimitsRecord(v) @@ -750,7 +754,7 @@ def consumeIntoTypeCrdtResolutionRecord def self.check_lower_TypeCursorWindowRecord(v) RustBuffer.check_lower_Optionalbytes(v.position_key) RustBuffer.check_lower_Optionalbytes(v.position_value) - + RustBuffer.check_lower_SequenceTypeEntryRecord(v.entries) RustBuffer.check_lower_OptionalTypeRangeCursorRecord(v.next_cursor) end @@ -776,7 +780,7 @@ def self.check_lower_TypeDiffPageProofRecord(v) RustBuffer.check_lower_OptionalTypeKeyProofRecord(v.lookahead_base) RustBuffer.check_lower_OptionalTypeKeyProofRecord(v.lookahead_other) RustBuffer.check_lower_Optionalbytes(v.requested_end) - + end def self.alloc_from_TypeDiffPageProofRecord(v) @@ -795,16 +799,16 @@ def consumeIntoTypeDiffPageProofRecord # The Record type DiffPageProofVerificationRecord. def self.check_lower_TypeDiffPageProofVerificationRecord(v) - - - - + + + + RustBuffer.check_lower_Optionalbytes(v.base_root) RustBuffer.check_lower_Optionalbytes(v.other_root) RustBuffer.check_lower_Optionalbytes(v.after) RustBuffer.check_lower_Optionalbytes(v.requested_end) RustBuffer.check_lower_Optionalbytes(v.proof_end) - + RustBuffer.check_lower_SequenceTypeDiffRecord(v.diffs) RustBuffer.check_lower_OptionalTypeRangeCursorRecord(v.next_cursor) end @@ -846,7 +850,7 @@ def consumeIntoTypeDiffPageRecord def self.check_lower_TypeDiffRecord(v) RustBuffer.check_lower_TypeDiffKind(v.kind) - + RustBuffer.check_lower_Optionalbytes(v.value) RustBuffer.check_lower_Optionalbytes(v.old_value) RustBuffer.check_lower_Optionalbytes(v.new_value) @@ -868,12 +872,12 @@ def consumeIntoTypeDiffRecord # The Record type DiffTraversalStatsRecord. def self.check_lower_TypeDiffTraversalStatsRecord(v) - - - - - - + + + + + + end def self.alloc_from_TypeDiffTraversalStatsRecord(v) @@ -912,8 +916,8 @@ def consumeIntoTypeEncodingRecord # The Record type EntryRecord. def self.check_lower_TypeEntryRecord(v) - - + + end def self.alloc_from_TypeEntryRecord(v) @@ -933,7 +937,7 @@ def consumeIntoTypeEntryRecord def self.check_lower_TypeExactProximityRecordRecord(v) RustBuffer.check_lower_Sequencef32(v.vector) - + end def self.alloc_from_TypeExactProximityRecordRecord(v) @@ -953,8 +957,8 @@ def consumeIntoTypeExactProximityRecordRecord def self.check_lower_TypeFullRebuildReasonRecord(v) RustBuffer.check_lower_TypeFullRebuildReasonKindRecord(v.kind) - - + + end def self.alloc_from_TypeFullRebuildReasonRecord(v) @@ -974,11 +978,11 @@ def consumeIntoTypeFullRebuildReasonRecord def self.check_lower_TypeGcPlanRecord(v) RustBuffer.check_lower_TypeGcReachabilityRecord(v.reachability) - + RustBuffer.check_lower_Sequencebytes(v.reclaimable_cids) - - - + + + end def self.alloc_from_TypeGcPlanRecord(v) @@ -998,10 +1002,10 @@ def consumeIntoTypeGcPlanRecord def self.check_lower_TypeGcReachabilityRecord(v) RustBuffer.check_lower_Sequencebytes(v.live_cids) - - - - + + + + end def self.alloc_from_TypeGcReachabilityRecord(v) @@ -1021,8 +1025,8 @@ def consumeIntoTypeGcReachabilityRecord def self.check_lower_TypeGcSweepRecord(v) RustBuffer.check_lower_TypeGcPlanRecord(v.plan) - - + + end def self.alloc_from_TypeGcSweepRecord(v) @@ -1044,7 +1048,7 @@ def self.check_lower_TypeHnswBuildLimitsRecord(v) RustBuffer.check_lower_Optionalu64(v.max_records) RustBuffer.check_lower_Optionalu64(v.max_owned_bytes) RustBuffer.check_lower_Optionalu64(v.max_distance_evaluations) - + RustBuffer.check_lower_Optionalu64(v.max_encoded_graph_bytes) end @@ -1084,12 +1088,12 @@ def consumeIntoTypeHnswBuildResultRecord # The Record type HnswBuildStatsRecord. def self.check_lower_TypeHnswBuildStatsRecord(v) - - - - - - + + + + + + end def self.alloc_from_TypeHnswBuildStatsRecord(v) @@ -1108,12 +1112,12 @@ def consumeIntoTypeHnswBuildStatsRecord # The Record type HnswConfigRecord. def self.check_lower_TypeHnswConfigRecord(v) - - - - - - + + + + + + RustBuffer.check_lower_TypeHnswRoutingVectorEncodingRecord(v.routing_vector_encoding) end @@ -1153,7 +1157,7 @@ def consumeIntoTypeHostStoreBatchGetResultRecord # The Record type HostStoreBoolResultRecord. def self.check_lower_TypeHostStoreBoolResultRecord(v) - + RustBuffer.check_lower_Optionalstring(v.error) end @@ -1233,7 +1237,7 @@ def consumeIntoTypeHostStoreListRootsResultRecord # The Record type HostStoreNamedRootManifestRecord. def self.check_lower_TypeHostStoreNamedRootManifestRecord(v) - + RustBuffer.check_lower_TypeRootManifestRecord(v.manifest) end @@ -1253,7 +1257,7 @@ def consumeIntoTypeHostStoreNamedRootManifestRecord # The Record type HostStoreRootCasResultRecord. def self.check_lower_TypeHostStoreRootCasResultRecord(v) - + RustBuffer.check_lower_OptionalTypeRootManifestRecord(v.current) RustBuffer.check_lower_Optionalstring(v.error) end @@ -1313,13 +1317,13 @@ def consumeIntoTypeHostStoreUnitResultRecord # The Record type IndexBuildResultRecord. def self.check_lower_TypeIndexBuildResultRecord(v) - - - - - - - + + + + + + + end def self.alloc_from_TypeIndexBuildResultRecord(v) @@ -1338,7 +1342,7 @@ def consumeIntoTypeIndexBuildResultRecord # The Record type IndexEntryRecord. def self.check_lower_TypeIndexEntryRecord(v) - + RustBuffer.check_lower_Optionalbytes(v.projection) end @@ -1358,8 +1362,8 @@ def consumeIntoTypeIndexEntryRecord # The Record type IndexMatchRecord. def self.check_lower_TypeIndexMatchRecord(v) - - + + RustBuffer.check_lower_Optionalbytes(v.projection) end @@ -1399,15 +1403,15 @@ def consumeIntoTypeIndexPageRecord # The Record type IndexVerificationRecord. def self.check_lower_TypeIndexVerificationRecord(v) - - - - - - - - - + + + + + + + + + end def self.alloc_from_TypeIndexVerificationRecord(v) @@ -1426,14 +1430,13 @@ def consumeIntoTypeIndexVerificationRecord # The Record type IndexedMapHealthRecord. def self.check_lower_TypeIndexedMapHealthRecord(v) - + RustBuffer.check_lower_Optionalbytes(v.source_version) RustBuffer.check_lower_Optionalbytes(v.state_version) RustBuffer.check_lower_SequenceTypeActiveIndexHealthRecord(v.active_indexes) - end def self.alloc_from_TypeIndexedMapHealthRecord(v) @@ -1452,17 +1455,17 @@ def consumeIntoTypeIndexedMapHealthRecord # The Record type IndexedMapMetricsRecord. def self.check_lower_TypeIndexedMapMetricsRecord(v) - - - - - - - - - - - + + + + + + + + + + + end def self.alloc_from_TypeIndexedMapMetricsRecord(v) @@ -1486,7 +1489,7 @@ def self.check_lower_TypeIndexedRetentionRecord(v) RustBuffer.check_lower_Sequencebytes(v.retained_index_versions) RustBuffer.check_lower_Sequencebytes(v.removed_index_versions) RustBuffer.check_lower_Sequencebytes(v.removed_state_versions) - + RustBuffer.check_lower_Sequencebytes(v.removed_named_roots) end @@ -1506,7 +1509,7 @@ def consumeIntoTypeIndexedRetentionRecord # The Record type IndexedSnapshotIdRecord. def self.check_lower_TypeIndexedSnapshotIdRecord(v) - + end def self.alloc_from_TypeIndexedSnapshotIdRecord(v) @@ -1525,10 +1528,10 @@ def consumeIntoTypeIndexedSnapshotIdRecord # The Record type IndexedSourceRecord. def self.check_lower_TypeIndexedSourceRecord(v) - - + + RustBuffer.check_lower_Optionalbytes(v.projection) - + end def self.alloc_from_TypeIndexedSourceRecord(v) @@ -1568,9 +1571,9 @@ def consumeIntoTypeIndexedUpdateRecord # The Record type IndexedVersionRecord. def self.check_lower_TypeIndexedVersionRecord(v) - - + + end def self.alloc_from_TypeIndexedVersionRecord(v) @@ -1589,7 +1592,7 @@ def consumeIntoTypeIndexedVersionRecord # The Record type JsonDocumentRecord. def self.check_lower_TypeJsonDocumentRecord(v) - + end def self.alloc_from_TypeJsonDocumentRecord(v) @@ -1609,7 +1612,7 @@ def consumeIntoTypeJsonDocumentRecord def self.check_lower_TypeKeyProofRecord(v) RustBuffer.check_lower_Optionalbytes(v.root) - + RustBuffer.check_lower_SequenceTypeNodeRecord(v.path) end @@ -1629,11 +1632,11 @@ def consumeIntoTypeKeyProofRecord # The Record type KeyProofVerificationRecord. def self.check_lower_TypeKeyProofVerificationRecord(v) - - - + + + RustBuffer.check_lower_Optionalbytes(v.root) - + RustBuffer.check_lower_Optionalbytes(v.value) end @@ -1653,7 +1656,7 @@ def consumeIntoTypeKeyProofVerificationRecord # The Record type LargeValueConfigRecord. def self.check_lower_TypeLargeValueConfigRecord(v) - + end def self.alloc_from_TypeLargeValueConfigRecord(v) @@ -1672,10 +1675,10 @@ def consumeIntoTypeLargeValueConfigRecord # The Record type MapCatalogVerificationRecord. def self.check_lower_TypeMapCatalogVerificationRecord(v) - - - - + + + + end def self.alloc_from_TypeMapCatalogVerificationRecord(v) @@ -1736,10 +1739,10 @@ def consumeIntoTypeMapUpdateRecord # The Record type MapVersionRecord. def self.check_lower_TypeMapVersionRecord(v) - + RustBuffer.check_lower_TypeTreeRecord(v.tree) RustBuffer.check_lower_Optionalu64(v.created_at_millis) - + end def self.alloc_from_TypeMapVersionRecord(v) @@ -1760,7 +1763,7 @@ def consumeIntoTypeMapVersionRecord def self.check_lower_TypeMergeExplanationRecord(v) RustBuffer.check_lower_OptionalTypeTreeRecord(v.result) RustBuffer.check_lower_Optionalstring(v.error) - + RustBuffer.check_lower_TypeMergeTraceRecord(v.trace) end @@ -1833,19 +1836,19 @@ def consumeIntoTypeMergeTraceRecord # The Record type MetricsRecord. def self.check_lower_TypeMetricsRecord(v) - - - - - - - - - - - - - + + + + + + + + + + + + + end def self.alloc_from_TypeMetricsRecord(v) @@ -1865,8 +1868,8 @@ def consumeIntoTypeMetricsRecord def self.check_lower_TypeMissingNodeCopyRecord(v) RustBuffer.check_lower_TypeMissingNodePlanRecord(v.plan) - - + + end def self.alloc_from_TypeMissingNodeCopyRecord(v) @@ -1886,11 +1889,11 @@ def consumeIntoTypeMissingNodeCopyRecord def self.check_lower_TypeMissingNodePlanRecord(v) RustBuffer.check_lower_Sequencebytes(v.required_cids) - - + + RustBuffer.check_lower_Sequencebytes(v.missing_cids) - - + + end def self.alloc_from_TypeMissingNodePlanRecord(v) @@ -1930,7 +1933,7 @@ def consumeIntoTypeMultiKeyProofRecord # The Record type MultiKeyProofVerificationRecord. def self.check_lower_TypeMultiKeyProofVerificationRecord(v) - + RustBuffer.check_lower_Optionalbytes(v.root) RustBuffer.check_lower_SequenceTypeKeyProofVerificationRecord(v.results) end @@ -1952,7 +1955,7 @@ def consumeIntoTypeMultiKeyProofVerificationRecord def self.check_lower_TypeMutationRecord(v) RustBuffer.check_lower_TypeMutationKind(v.kind) - + RustBuffer.check_lower_Optionalbytes(v.value) end @@ -1992,8 +1995,8 @@ def consumeIntoTypeNamedBytesListResultRecord # The Record type NamedBytesRecord. def self.check_lower_TypeNamedBytesRecord(v) - - + + end def self.alloc_from_TypeNamedBytesRecord(v) @@ -2012,7 +2015,7 @@ def consumeIntoTypeNamedBytesRecord # The Record type NamedRootManifestRecord. def self.check_lower_TypeNamedRootManifestRecord(v) - + RustBuffer.check_lower_TypeRootManifestRecord(v.manifest) end @@ -2032,7 +2035,7 @@ def consumeIntoTypeNamedRootManifestRecord # The Record type NamedRootRecord. def self.check_lower_TypeNamedRootRecord(v) - + RustBuffer.check_lower_TypeTreeRecord(v.tree) end @@ -2054,7 +2057,7 @@ def consumeIntoTypeNamedRootRecord def self.check_lower_TypeNamedRootRetentionRecord(v) RustBuffer.check_lower_TypeNamedRootRetentionKind(v.kind) RustBuffer.check_lower_Sequencebytes(v.names) - + RustBuffer.check_lower_Optionalu64(v.count) RustBuffer.check_lower_Optionalu64(v.min_updated_at_millis) end @@ -2095,8 +2098,8 @@ def consumeIntoTypeNamedRootSelectionRecord # The Record type NamedRootUpdateRecord. def self.check_lower_TypeNamedRootUpdateRecord(v) - - + + RustBuffer.check_lower_OptionalTypeTreeRecord(v.current) end @@ -2116,8 +2119,8 @@ def consumeIntoTypeNamedRootUpdateRecord # The Record type NodeEntryRecord. def self.check_lower_TypeNodeEntryRecord(v) - - + + end def self.alloc_from_TypeNodeEntryRecord(v) @@ -2136,7 +2139,7 @@ def consumeIntoTypeNodeEntryRecord # The Record type NodeMutationRecord. def self.check_lower_TypeNodeMutationRecord(v) - + RustBuffer.check_lower_TypeOptionalBytesRecord(v.value) end @@ -2201,12 +2204,12 @@ def self.check_lower_TypeNodeRecord(v) RustBuffer.check_lower_Sequencebytes(v.keys) RustBuffer.check_lower_Sequencebytes(v.vals) RustBuffer.check_lower_Sequenceu64(v.child_counts) - - - - - - + + + + + + RustBuffer.check_lower_TypeEncodingRecord(v.encoding) RustBuffer.check_lower_Optionalbytes(v.format_bytes) end @@ -2247,8 +2250,8 @@ def consumeIntoTypeOptionalBytesListResultRecord # The Record type OptionalBytesRecord. def self.check_lower_TypeOptionalBytesRecord(v) - - + + end def self.alloc_from_TypeOptionalBytesRecord(v) @@ -2287,8 +2290,8 @@ def consumeIntoTypeOptionalBytesResultRecord # The Record type ParallelConfigRecord. def self.check_lower_TypeParallelConfigRecord(v) - - + + end def self.alloc_from_TypeParallelConfigRecord(v) @@ -2351,12 +2354,12 @@ def consumeIntoTypeProductQuantizationBuildResultRecord # The Record type ProductQuantizationBuildStatsRecord. def self.check_lower_TypeProductQuantizationBuildStatsRecord(v) - - - - - - + + + + + + end def self.alloc_from_TypeProductQuantizationBuildStatsRecord(v) @@ -2375,12 +2378,12 @@ def consumeIntoTypeProductQuantizationBuildStatsRecord # The Record type ProductQuantizationConfigRecord. def self.check_lower_TypeProductQuantizationConfigRecord(v) - - - - - - + + + + + + end def self.alloc_from_TypeProductQuantizationConfigRecord(v) @@ -2399,8 +2402,8 @@ def consumeIntoTypeProductQuantizationConfigRecord # The Record type ProductQuantizationQualityRecord. def self.check_lower_TypeProductQuantizationQualityRecord(v) - - + + end def self.alloc_from_TypeProductQuantizationQualityRecord(v) @@ -2419,18 +2422,18 @@ def consumeIntoTypeProductQuantizationQualityRecord # The Record type ProofBundleSummaryRecord. def self.check_lower_TypeProofBundleSummaryRecord(v) - - + + RustBuffer.check_lower_Optionalbytes(v.root) RustBuffer.check_lower_Optionalbytes(v.other_root) - - + + RustBuffer.check_lower_Optionalbytes(v.start) RustBuffer.check_lower_Optionalbytes(v._end) RustBuffer.check_lower_Optionalbytes(v.after) RustBuffer.check_lower_Optionalbytes(v.requested_end) RustBuffer.check_lower_Optionalu64(v.limit) - + end def self.alloc_from_TypeProofBundleSummaryRecord(v) @@ -2450,11 +2453,11 @@ def consumeIntoTypeProofBundleSummaryRecord def self.check_lower_TypeProofBundleVerificationRecord(v) RustBuffer.check_lower_TypeProofBundleSummaryRecord(v.summary) - - - - - + + + + + RustBuffer.check_lower_OptionalTypeRangeCursorRecord(v.next_cursor) end @@ -2514,15 +2517,15 @@ def consumeIntoTypeProvedRangePageRecord # The Record type ProximityConfigRecord. def self.check_lower_TypeProximityConfigRecord(v) - + RustBuffer.check_lower_TypeDistanceMetricRecord(v.metric) - - - - - - - + + + + + + + RustBuffer.check_lower_Optionalu32(v.scalar_quantization_group_size) end @@ -2565,8 +2568,8 @@ def consumeIntoTypeProximityFilterRecord # The Record type ProximityMembershipProofRecord. def self.check_lower_TypeProximityMembershipProofRecord(v) - - + + RustBuffer.check_lower_TypeKeyProofRecord(v.directory_proof) RustBuffer.check_lower_Optionalbytes(v.record_bytes) end @@ -2587,8 +2590,8 @@ def consumeIntoTypeProximityMembershipProofRecord # The Record type ProximityMembershipVerificationRecord. def self.check_lower_TypeProximityMembershipVerificationRecord(v) - - + + RustBuffer.check_lower_OptionalTypeExactProximityRecordRecord(v.record) end @@ -2608,7 +2611,7 @@ def consumeIntoTypeProximityMembershipVerificationRecord # The Record type ProximityMutationRecord. def self.check_lower_TypeProximityMutationRecord(v) - + RustBuffer.check_lower_OptionalSequencef32(v.vector) RustBuffer.check_lower_Optionalbytes(v.value) end @@ -2649,20 +2652,20 @@ def consumeIntoTypeProximityMutationResultRecord # The Record type ProximityMutationStatsRecord. def self.check_lower_TypeProximityMutationStatsRecord(v) - - - - - - - - - - - - - - end + + + + + + + + + + + + + + end def self.alloc_from_TypeProximityMutationStatsRecord(v) RustBuffer.allocWithBuilder do |builder| @@ -2680,9 +2683,9 @@ def consumeIntoTypeProximityMutationStatsRecord # The Record type ProximityNeighborRecord. def self.check_lower_TypeProximityNeighborRecord(v) - - - + + + end def self.alloc_from_TypeProximityNeighborRecord(v) @@ -2701,9 +2704,9 @@ def consumeIntoTypeProximityNeighborRecord # The Record type ProximityRecordRecord. def self.check_lower_TypeProximityRecordRecord(v) - + RustBuffer.check_lower_Sequencef32(v.vector) - + end def self.alloc_from_TypeProximityRecordRecord(v) @@ -2743,7 +2746,7 @@ def consumeIntoTypeProximitySearchClaimRecord def self.check_lower_TypeProximitySearchRequestRecord(v) RustBuffer.check_lower_Sequencef32(v.query) - + RustBuffer.check_lower_TypeSearchPolicyKind(v.policy) RustBuffer.check_lower_OptionalTypeAdaptiveQualityRecord(v.adaptive_quality) RustBuffer.check_lower_TypeSearchBudgetRecord(v.budget) @@ -2752,6 +2755,7 @@ def self.check_lower_TypeProximitySearchRequestRecord(v) RustBuffer.check_lower_TypeSearchBackendRecord(v.backend) RustBuffer.check_lower_Optionalu32(v.hnsw_ef_search) RustBuffer.check_lower_Optionalu16(v.pq_rerank_multiplier) + RustBuffer.check_lower_Optionalu16(v.turboquant_rerank_multiplier) end def self.alloc_from_TypeProximitySearchRequestRecord(v) @@ -2774,7 +2778,7 @@ def self.check_lower_TypeProximitySearchResultRecord(v) RustBuffer.check_lower_TypeProximitySearchStatsRecord(v.stats) RustBuffer.check_lower_TypeSearchCompletionRecord(v.completion) RustBuffer.check_lower_TypeSearchBackendRecord(v.backend) - + end def self.alloc_from_TypeProximitySearchResultRecord(v) @@ -2793,11 +2797,12 @@ def consumeIntoTypeProximitySearchResultRecord # The Record type ProximitySearchRuntimePolicyRecord. def self.check_lower_TypeProximitySearchRuntimePolicyRecord(v) - - - - - + + + + + + end def self.alloc_from_TypeProximitySearchRuntimePolicyRecord(v) @@ -2816,8 +2821,8 @@ def consumeIntoTypeProximitySearchRuntimePolicyRecord # The Record type ProximitySearchRuntimeStatsRecord. def self.check_lower_TypeProximitySearchRuntimeStatsRecord(v) - - + + end def self.alloc_from_TypeProximitySearchRuntimeStatsRecord(v) @@ -2836,17 +2841,17 @@ def consumeIntoTypeProximitySearchRuntimeStatsRecord # The Record type ProximitySearchStatsRecord. def self.check_lower_TypeProximitySearchStatsRecord(v) - - - - - - - - - - - + + + + + + + + + + + end def self.alloc_from_TypeProximitySearchStatsRecord(v) @@ -2867,7 +2872,7 @@ def consumeIntoTypeProximitySearchStatsRecord def self.check_lower_TypeProximitySearchVerificationRecord(v) RustBuffer.check_lower_TypeProximitySearchResultRecord(v.result) RustBuffer.check_lower_TypeProximitySearchClaimRecord(v.claim) - + end def self.alloc_from_TypeProximitySearchVerificationRecord(v) @@ -2886,7 +2891,7 @@ def consumeIntoTypeProximitySearchVerificationRecord # The Record type ProximityStructuralProofRecord. def self.check_lower_TypeProximityStructuralProofRecord(v) - + RustBuffer.check_lower_SequenceTypeTypedContentObjectRecord(v.objects) end @@ -2906,8 +2911,8 @@ def consumeIntoTypeProximityStructuralProofRecord # The Record type ProximityStructuralVerificationRecord. def self.check_lower_TypeProximityStructuralVerificationRecord(v) - - + + RustBuffer.check_lower_TypeProximityVerificationRecord(v.summary) end @@ -2927,16 +2932,16 @@ def consumeIntoTypeProximityStructuralVerificationRecord # The Record type ProximityVerificationRecord. def self.check_lower_TypeProximityVerificationRecord(v) - - - - - - - - - - + + + + + + + + + + end def self.alloc_from_TypeProximityVerificationRecord(v) @@ -2974,7 +2979,7 @@ def consumeIntoTypePublicationOriginRecord # The Record type RangeBoundsRecord. def self.check_lower_TypeRangeBoundsRecord(v) - + RustBuffer.check_lower_Optionalbytes(v._end) end @@ -3035,7 +3040,7 @@ def consumeIntoTypeRangePageProofRecord # The Record type RangePageProofVerificationRecord. def self.check_lower_TypeRangePageProofVerificationRecord(v) - + RustBuffer.check_lower_Optionalbytes(v.root) RustBuffer.check_lower_Optionalbytes(v.after) RustBuffer.check_lower_Optionalbytes(v._end) @@ -3079,7 +3084,7 @@ def consumeIntoTypeRangePageRecord def self.check_lower_TypeRangeProofRecord(v) RustBuffer.check_lower_Optionalbytes(v.root) - + RustBuffer.check_lower_Optionalbytes(v._end) RustBuffer.check_lower_SequenceTypeNodeRecord(v.path) end @@ -3100,9 +3105,9 @@ def consumeIntoTypeRangeProofRecord # The Record type RangeProofVerificationRecord. def self.check_lower_TypeRangeProofVerificationRecord(v) - + RustBuffer.check_lower_Optionalbytes(v.root) - + RustBuffer.check_lower_Optionalbytes(v._end) RustBuffer.check_lower_SequenceTypeEntryRecord(v.entries) end @@ -3182,7 +3187,7 @@ def consumeIntoTypeReversePageRecord # The Record type RootCasResultRecord. def self.check_lower_TypeRootCasResultRecord(v) - + RustBuffer.check_lower_TypeOptionalBytesRecord(v.current) RustBuffer.check_lower_OptionalTypeStoreErrorRecord(v.error) end @@ -3203,7 +3208,7 @@ def consumeIntoTypeRootCasResultRecord # The Record type RootConditionRecord. def self.check_lower_TypeRootConditionRecord(v) - + RustBuffer.check_lower_TypeOptionalBytesRecord(v.expected) end @@ -3244,7 +3249,7 @@ def consumeIntoTypeRootManifestRecord # The Record type RootWriteRecord. def self.check_lower_TypeRootWriteRecord(v) - + RustBuffer.check_lower_TypeOptionalBytesRecord(v.replacement) end @@ -3264,8 +3269,8 @@ def consumeIntoTypeRootWriteRecord # The Record type ScanOutcomeRecord. def self.check_lower_TypeScanOutcomeRecord(v) - - + + end def self.alloc_from_TypeScanOutcomeRecord(v) @@ -3306,21 +3311,21 @@ def consumeIntoTypeSearchBudgetRecord # The Record type SecondaryIndexLimitsRecord. def self.check_lower_TypeSecondaryIndexLimitsRecord(v) - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + end def self.alloc_from_TypeSecondaryIndexLimitsRecord(v) @@ -3339,8 +3344,8 @@ def consumeIntoTypeSecondaryIndexLimitsRecord # The Record type SnapshotBundleNodeRecord. def self.check_lower_TypeSnapshotBundleNodeRecord(v) - - + + end def self.alloc_from_TypeSnapshotBundleNodeRecord(v) @@ -3359,7 +3364,7 @@ def consumeIntoTypeSnapshotBundleNodeRecord # The Record type SnapshotBundleRecord. def self.check_lower_TypeSnapshotBundleRecord(v) - + RustBuffer.check_lower_TypeTreeRecord(v.tree) RustBuffer.check_lower_SequenceTypeSnapshotBundleNodeRecord(v.nodes) end @@ -3380,12 +3385,12 @@ def consumeIntoTypeSnapshotBundleRecord # The Record type SnapshotBundleSummaryRecord. def self.check_lower_TypeSnapshotBundleSummaryRecord(v) - + RustBuffer.check_lower_Optionalbytes(v.root) - - - - + + + + end def self.alloc_from_TypeSnapshotBundleSummaryRecord(v) @@ -3404,10 +3409,10 @@ def consumeIntoTypeSnapshotBundleSummaryRecord # The Record type SnapshotBundleVerificationRecord. def self.check_lower_TypeSnapshotBundleVerificationRecord(v) - + RustBuffer.check_lower_TypeSnapshotBundleSummaryRecord(v.summary) - - + + RustBuffer.check_lower_Sequencebytes(v.missing_cids) RustBuffer.check_lower_Sequencebytes(v.extra_cids) end @@ -3448,8 +3453,8 @@ def consumeIntoTypeSnapshotNamespaceRecord # The Record type SnapshotRecord. def self.check_lower_TypeSnapshotRecord(v) - - + + RustBuffer.check_lower_TypeTreeRecord(v.tree) RustBuffer.check_lower_Optionalu64(v.created_at_millis) RustBuffer.check_lower_Optionalu64(v.updated_at_millis) @@ -3513,30 +3518,30 @@ def consumeIntoTypeStatsComparisonRecord # The Record type StatsDiffRecord. def self.check_lower_TypeStatsDiffRecord(v) - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + end def self.alloc_from_TypeStatsDiffRecord(v) @@ -3555,30 +3560,30 @@ def consumeIntoTypeStatsDiffRecord # The Record type StatsPercentageChangeRecord. def self.check_lower_TypeStatsPercentageChangeRecord(v) - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + end def self.alloc_from_TypeStatsPercentageChangeRecord(v) @@ -3597,15 +3602,15 @@ def consumeIntoTypeStatsPercentageChangeRecord # The Record type StoreCapabilitiesRecord. def self.check_lower_TypeStoreCapabilitiesRecord(v) - - - - - - - - - + + + + + + + + + end def self.alloc_from_TypeStoreCapabilitiesRecord(v) @@ -3624,10 +3629,10 @@ def consumeIntoTypeStoreCapabilitiesRecord # The Record type StoreDescriptorRecord. def self.check_lower_TypeStoreDescriptorRecord(v) - - - - + + + + RustBuffer.check_lower_TypeStoreCapabilitiesRecord(v.capabilities) RustBuffer.check_lower_TypeStoreLimitsRecord(v.limits) end @@ -3668,9 +3673,9 @@ def consumeIntoTypeStoreDescriptorResultRecord # The Record type StoreErrorRecord. def self.check_lower_TypeStoreErrorRecord(v) - - - + + + RustBuffer.check_lower_Optionalstring(v.provider_code) end @@ -3712,7 +3717,7 @@ def consumeIntoTypeStoreLimitsRecord # The Record type StoreTransactionConflictRecord. def self.check_lower_TypeStoreTransactionConflictRecord(v) - + RustBuffer.check_lower_TypeOptionalBytesRecord(v.expected) RustBuffer.check_lower_TypeOptionalBytesRecord(v.current) end @@ -3800,8 +3805,8 @@ def consumeIntoTypeStructuralDiffPageRecord # The Record type TimestampedValueRecord. def self.check_lower_TypeTimestampedValueRecord(v) - - + + end def self.alloc_from_TypeTimestampedValueRecord(v) @@ -3820,8 +3825,8 @@ def consumeIntoTypeTimestampedValueRecord # The Record type TombstoneMetadataRecord. def self.check_lower_TypeTombstoneMetadataRecord(v) - - + + end def self.alloc_from_TypeTombstoneMetadataRecord(v) @@ -3840,8 +3845,8 @@ def consumeIntoTypeTombstoneMetadataRecord # The Record type TombstoneRecord. def self.check_lower_TypeTombstoneRecord(v) - - + + RustBuffer.check_lower_SequenceTypeTombstoneMetadataRecord(v.causal_metadata) end @@ -3861,7 +3866,7 @@ def consumeIntoTypeTombstoneRecord # The Record type TransactionConflictRecord. def self.check_lower_TypeTransactionConflictRecord(v) - + RustBuffer.check_lower_OptionalTypeRootManifestRecord(v.expected) RustBuffer.check_lower_OptionalTypeRootManifestRecord(v.current) end @@ -3882,7 +3887,7 @@ def consumeIntoTypeTransactionConflictRecord # The Record type TransactionResultRecord. def self.check_lower_TypeTransactionResultRecord(v) - + RustBuffer.check_lower_OptionalTypeStoreTransactionConflictRecord(v.conflict) RustBuffer.check_lower_OptionalTypeStoreErrorRecord(v.error) end @@ -3903,10 +3908,10 @@ def consumeIntoTypeTransactionResultRecord # The Record type TransactionUpdateRecord. def self.check_lower_TypeTransactionUpdateRecord(v) - - - - + + + + RustBuffer.check_lower_OptionalTypeTransactionConflictRecord(v.conflict_detail) end @@ -3946,13 +3951,13 @@ def consumeIntoTypeTreeDebugComparedNodeRecord # The Record type TreeDebugComparisonLevelRecord. def self.check_lower_TypeTreeDebugComparisonLevelRecord(v) - - - - - - - + + + + + + + RustBuffer.check_lower_SequenceTypeTreeDebugComparedNodeRecord(v.nodes) end @@ -3972,12 +3977,12 @@ def consumeIntoTypeTreeDebugComparisonLevelRecord # The Record type TreeDebugComparisonRecord. def self.check_lower_TypeTreeDebugComparisonRecord(v) - - - - - - + + + + + + RustBuffer.check_lower_SequenceTypeTreeDebugComparisonLevelRecord(v.levels) end @@ -3997,7 +4002,7 @@ def consumeIntoTypeTreeDebugComparisonRecord # The Record type TreeDebugLevelRecord. def self.check_lower_TypeTreeDebugLevelRecord(v) - + RustBuffer.check_lower_SequenceTypeTreeDebugNodeRecord(v.nodes) end @@ -4017,13 +4022,13 @@ def consumeIntoTypeTreeDebugLevelRecord # The Record type TreeDebugNodeRecord. def self.check_lower_TypeTreeDebugNodeRecord(v) - - - - - - - + + + + + + + RustBuffer.check_lower_Optionalbytes(v.first_key) RustBuffer.check_lower_Optionalbytes(v.last_key) end @@ -4083,8 +4088,8 @@ def consumeIntoTypeTreeRecord # The Record type TreeStatsLevelF64Record. def self.check_lower_TypeTreeStatsLevelF64Record(v) - - + + end def self.alloc_from_TypeTreeStatsLevelF64Record(v) @@ -4103,8 +4108,8 @@ def consumeIntoTypeTreeStatsLevelF64Record # The Record type TreeStatsLevelU64Record. def self.check_lower_TypeTreeStatsLevelU64Record(v) - - + + end def self.alloc_from_TypeTreeStatsLevelU64Record(v) @@ -4123,35 +4128,35 @@ def consumeIntoTypeTreeStatsLevelU64Record # The Record type TreeStatsRecord. def self.check_lower_TypeTreeStatsRecord(v) - - - - - - - - - - + + + + + + + + + + RustBuffer.check_lower_SequenceTypeTreeStatsLevelU64Record(v.nodes_per_level) RustBuffer.check_lower_SequenceTypeTreeStatsLevelF64Record(v.avg_node_size_per_level) RustBuffer.check_lower_SequenceTypeTreeStatsLevelF64Record(v.avg_entries_per_level) RustBuffer.check_lower_SequenceTypeTreeStatsLevelU64Record(v.min_entries_per_level) RustBuffer.check_lower_SequenceTypeTreeStatsLevelU64Record(v.max_entries_per_level) - - - - - - - - - - - - - - + + + + + + + + + + + + + + end def self.alloc_from_TypeTreeStatsRecord(v) @@ -4167,74 +4172,205 @@ def consumeIntoTypeTreeStatsRecord end end - # The Record type TypedContentObjectRecord. + # The Record type TurboQuantizationBuildLimitsRecord. - def self.check_lower_TypeTypedContentObjectRecord(v) - RustBuffer.check_lower_TypeContentObjectKindRecord(v.kind) - - RustBuffer.check_lower_Optionalu32(v.dimensions) - - + def self.check_lower_TypeTurboQuantizationBuildLimitsRecord(v) + RustBuffer.check_lower_Optionalu64(v.max_records) + RustBuffer.check_lower_Optionalu64(v.max_input_bytes) + RustBuffer.check_lower_Optionalu64(v.max_temporary_bytes) + RustBuffer.check_lower_Optionalu64(v.max_transform_operations) + RustBuffer.check_lower_Optionalu64(v.max_encoded_output_bytes) + RustBuffer.check_lower_Optionalu64(v.max_worker_threads) end - def self.alloc_from_TypeTypedContentObjectRecord(v) + def self.alloc_from_TypeTurboQuantizationBuildLimitsRecord(v) RustBuffer.allocWithBuilder do |builder| - builder.write_TypeTypedContentObjectRecord(v) + builder.write_TypeTurboQuantizationBuildLimitsRecord(v) return builder.finalize end end - def consumeIntoTypeTypedContentObjectRecord + def consumeIntoTypeTurboQuantizationBuildLimitsRecord consumeWithStream do |stream| - return stream.readTypeTypedContentObjectRecord + return stream.readTypeTurboQuantizationBuildLimitsRecord end end - # The Record type UnitResultRecord. + # The Record type TurboQuantizationBuildResultRecord. - def self.check_lower_TypeUnitResultRecord(v) - RustBuffer.check_lower_OptionalTypeStoreErrorRecord(v.error) + def self.check_lower_TypeTurboQuantizationBuildResultRecord(v) + (BindingTurboQuantizer.uniffi_check_lower v.index) + RustBuffer.check_lower_TypeTurboQuantizationBuildStatsRecord(v.stats) end - def self.alloc_from_TypeUnitResultRecord(v) + def self.alloc_from_TypeTurboQuantizationBuildResultRecord(v) RustBuffer.allocWithBuilder do |builder| - builder.write_TypeUnitResultRecord(v) + builder.write_TypeTurboQuantizationBuildResultRecord(v) return builder.finalize end end - def consumeIntoTypeUnitResultRecord + def consumeIntoTypeTurboQuantizationBuildResultRecord consumeWithStream do |stream| - return stream.readTypeUnitResultRecord + return stream.readTypeTurboQuantizationBuildResultRecord end end - # The Record type ValueRefRecord. + # The Record type TurboQuantizationBuildStatsRecord. + + def self.check_lower_TypeTurboQuantizationBuildStatsRecord(v) + + + + + + - def self.check_lower_TypeValueRefRecord(v) - RustBuffer.check_lower_TypeValueRefKind(v.kind) - RustBuffer.check_lower_Optionalbytes(v.value) - RustBuffer.check_lower_OptionalTypeBlobRefRecord(v.blob) end - def self.alloc_from_TypeValueRefRecord(v) + def self.alloc_from_TypeTurboQuantizationBuildStatsRecord(v) RustBuffer.allocWithBuilder do |builder| - builder.write_TypeValueRefRecord(v) + builder.write_TypeTurboQuantizationBuildStatsRecord(v) return builder.finalize end end - def consumeIntoTypeValueRefRecord + def consumeIntoTypeTurboQuantizationBuildStatsRecord consumeWithStream do |stream| - return stream.readTypeValueRefRecord + return stream.readTypeTurboQuantizationBuildStatsRecord end end - # The Record type VersionPruneRecord. + # The Record type TurboQuantizationConfigRecord. - def self.check_lower_TypeVersionPruneRecord(v) - RustBuffer.check_lower_Sequencebytes(v.retained) - RustBuffer.check_lower_Sequencebytes(v.removed) + def self.check_lower_TypeTurboQuantizationConfigRecord(v) + + + + end + + def self.alloc_from_TypeTurboQuantizationConfigRecord(v) + RustBuffer.allocWithBuilder do |builder| + builder.write_TypeTurboQuantizationConfigRecord(v) + return builder.finalize + end + end + + def consumeIntoTypeTurboQuantizationConfigRecord + consumeWithStream do |stream| + return stream.readTypeTurboQuantizationConfigRecord + end + end + + # The Record type TurboQuantizationQualityRecord. + + def self.check_lower_TypeTurboQuantizationQualityRecord(v) + + + end + + def self.alloc_from_TypeTurboQuantizationQualityRecord(v) + RustBuffer.allocWithBuilder do |builder| + builder.write_TypeTurboQuantizationQualityRecord(v) + return builder.finalize + end + end + + def consumeIntoTypeTurboQuantizationQualityRecord + consumeWithStream do |stream| + return stream.readTypeTurboQuantizationQualityRecord + end + end + + # The Record type TurboQuantizationVerificationRecord. + + def self.check_lower_TypeTurboQuantizationVerificationRecord(v) + + + RustBuffer.check_lower_TypeTurboQuantizationQualityRecord(v.quality) + end + + def self.alloc_from_TypeTurboQuantizationVerificationRecord(v) + RustBuffer.allocWithBuilder do |builder| + builder.write_TypeTurboQuantizationVerificationRecord(v) + return builder.finalize + end + end + + def consumeIntoTypeTurboQuantizationVerificationRecord + consumeWithStream do |stream| + return stream.readTypeTurboQuantizationVerificationRecord + end + end + + # The Record type TypedContentObjectRecord. + + def self.check_lower_TypeTypedContentObjectRecord(v) + RustBuffer.check_lower_TypeContentObjectKindRecord(v.kind) + + RustBuffer.check_lower_Optionalu32(v.dimensions) + + + end + + def self.alloc_from_TypeTypedContentObjectRecord(v) + RustBuffer.allocWithBuilder do |builder| + builder.write_TypeTypedContentObjectRecord(v) + return builder.finalize + end + end + + def consumeIntoTypeTypedContentObjectRecord + consumeWithStream do |stream| + return stream.readTypeTypedContentObjectRecord + end + end + + # The Record type UnitResultRecord. + + def self.check_lower_TypeUnitResultRecord(v) + RustBuffer.check_lower_OptionalTypeStoreErrorRecord(v.error) + end + + def self.alloc_from_TypeUnitResultRecord(v) + RustBuffer.allocWithBuilder do |builder| + builder.write_TypeUnitResultRecord(v) + return builder.finalize + end + end + + def consumeIntoTypeUnitResultRecord + consumeWithStream do |stream| + return stream.readTypeUnitResultRecord + end + end + + # The Record type ValueRefRecord. + + def self.check_lower_TypeValueRefRecord(v) + RustBuffer.check_lower_TypeValueRefKind(v.kind) + RustBuffer.check_lower_Optionalbytes(v.value) + RustBuffer.check_lower_OptionalTypeBlobRefRecord(v.blob) + end + + def self.alloc_from_TypeValueRefRecord(v) + RustBuffer.allocWithBuilder do |builder| + builder.write_TypeValueRefRecord(v) + return builder.finalize + end + end + + def consumeIntoTypeValueRefRecord + consumeWithStream do |stream| + return stream.readTypeValueRefRecord + end + end + + # The Record type VersionPruneRecord. + + def self.check_lower_TypeVersionPruneRecord(v) + RustBuffer.check_lower_Sequencebytes(v.retained) + RustBuffer.check_lower_Sequencebytes(v.removed) end def self.alloc_from_TypeVersionPruneRecord(v) @@ -4273,7 +4409,7 @@ def consumeIntoTypeVersionedMapBatchResultRecord # The Record type VersionedTransactionCommitRecord. def self.check_lower_TypeVersionedTransactionCommitRecord(v) - + RustBuffer.check_lower_SequenceTypeMapVersionRecord(v.versions) RustBuffer.check_lower_Optionalbytes(v.conflict_map_id) RustBuffer.check_lower_OptionalTypeMapVersionRecord(v.conflict_current) @@ -4295,10 +4431,10 @@ def consumeIntoTypeVersionedTransactionCommitRecord # The Record type VersionedValueRecord. def self.check_lower_TypeVersionedValueRecord(v) - - + + RustBuffer.check_lower_TypeEncodingRecord(v.encoding) - + end def self.alloc_from_TypeVersionedValueRecord(v) @@ -4337,18 +4473,18 @@ def consumeIntoTypeWriteResultRecord # The Record type WriteStatsRecord. def self.check_lower_TypeWriteStatsRecord(v) - - - - - - - - - - - - + + + + + + + + + + + + @@ -4385,7 +4521,7 @@ def consumeIntoTypeAdaptiveQualityRecord return stream.readTypeAdaptiveQualityRecord end end - + # The Enum type CatalogAcceleratorKindRecord. @@ -4404,7 +4540,7 @@ def consumeIntoTypeCatalogAcceleratorKindRecord return stream.readTypeCatalogAcceleratorKindRecord end end - + # The Enum type CompositeBaseKindRecord. @@ -4423,7 +4559,7 @@ def consumeIntoTypeCompositeBaseKindRecord return stream.readTypeCompositeBaseKindRecord end end - + # The Enum type CompositeBuildOrRebuildKindRecord. @@ -4442,7 +4578,7 @@ def consumeIntoTypeCompositeBuildOrRebuildKindRecord return stream.readTypeCompositeBuildOrRebuildKindRecord end end - + # The Enum type ContentObjectKindRecord. @@ -4461,7 +4597,7 @@ def consumeIntoTypeContentObjectKindRecord return stream.readTypeContentObjectKindRecord end end - + # The Enum type CrdtDeletePolicyKind. @@ -4480,7 +4616,7 @@ def consumeIntoTypeCrdtDeletePolicyKind return stream.readTypeCrdtDeletePolicyKind end end - + # The Enum type CrdtMergeStrategyKind. @@ -4499,7 +4635,7 @@ def consumeIntoTypeCrdtMergeStrategyKind return stream.readTypeCrdtMergeStrategyKind end end - + # The Enum type CrdtResolutionKind. @@ -4518,7 +4654,7 @@ def consumeIntoTypeCrdtResolutionKind return stream.readTypeCrdtResolutionKind end end - + # The Enum type DiffKind. @@ -4537,7 +4673,7 @@ def consumeIntoTypeDiffKind return stream.readTypeDiffKind end end - + # The Enum type DistanceMetricRecord. @@ -4556,7 +4692,7 @@ def consumeIntoTypeDistanceMetricRecord return stream.readTypeDistanceMetricRecord end end - + # The Enum type EncodingKind. @@ -4575,7 +4711,7 @@ def consumeIntoTypeEncodingKind return stream.readTypeEncodingKind end end - + # The Enum type FullRebuildReasonKindRecord. @@ -4594,7 +4730,7 @@ def consumeIntoTypeFullRebuildReasonKindRecord return stream.readTypeFullRebuildReasonKindRecord end end - + # The Enum type HnswRoutingVectorEncodingRecord. @@ -4613,7 +4749,7 @@ def consumeIntoTypeHnswRoutingVectorEncodingRecord return stream.readTypeHnswRoutingVectorEncodingRecord end end - + # The Enum type IndexProjectionRecord. @@ -4632,7 +4768,7 @@ def consumeIntoTypeIndexProjectionRecord return stream.readTypeIndexProjectionRecord end end - + # The Enum type IndexedUpdateKind. @@ -4651,7 +4787,7 @@ def consumeIntoTypeIndexedUpdateKind return stream.readTypeIndexedUpdateKind end end - + # The Enum type MapUpdateKind. @@ -4670,7 +4806,7 @@ def consumeIntoTypeMapUpdateKind return stream.readTypeMapUpdateKind end end - + # The Enum type MergeFallbackReasonKind. @@ -4689,7 +4825,7 @@ def consumeIntoTypeMergeFallbackReasonKind return stream.readTypeMergeFallbackReasonKind end end - + # The Enum type MergeFastPathKind. @@ -4708,7 +4844,7 @@ def consumeIntoTypeMergeFastPathKind return stream.readTypeMergeFastPathKind end end - + # The Enum type MergeReuseReasonKind. @@ -4727,7 +4863,7 @@ def consumeIntoTypeMergeReuseReasonKind return stream.readTypeMergeReuseReasonKind end end - + # The Enum type MergeTraceEventKind. @@ -4746,7 +4882,7 @@ def consumeIntoTypeMergeTraceEventKind return stream.readTypeMergeTraceEventKind end end - + # The Enum type MergeTraceResolutionKind. @@ -4765,7 +4901,7 @@ def consumeIntoTypeMergeTraceResolutionKind return stream.readTypeMergeTraceResolutionKind end end - + # The Enum type MergeTraceStageKind. @@ -4784,7 +4920,7 @@ def consumeIntoTypeMergeTraceStageKind return stream.readTypeMergeTraceStageKind end end - + # The Enum type MutationKind. @@ -4803,7 +4939,7 @@ def consumeIntoTypeMutationKind return stream.readTypeMutationKind end end - + # The Enum type NamedRootRetentionKind. @@ -4822,9 +4958,9 @@ def consumeIntoTypeNamedRootRetentionKind return stream.readTypeNamedRootRetentionKind end end - - + + # The Enum type ProximityFilterKind. @@ -4843,7 +4979,7 @@ def consumeIntoTypeProximityFilterKind return stream.readTypeProximityFilterKind end end - + # The Enum type ProximitySearchClaimKindRecord. @@ -4862,7 +4998,7 @@ def consumeIntoTypeProximitySearchClaimKindRecord return stream.readTypeProximitySearchClaimKindRecord end end - + # The Enum type QueryKernelRecord. @@ -4881,7 +5017,7 @@ def consumeIntoTypeQueryKernelRecord return stream.readTypeQueryKernelRecord end end - + # The Enum type ResolutionKind. @@ -4900,7 +5036,7 @@ def consumeIntoTypeResolutionKind return stream.readTypeResolutionKind end end - + # The Enum type SearchBackendRecord. @@ -4919,7 +5055,7 @@ def consumeIntoTypeSearchBackendRecord return stream.readTypeSearchBackendRecord end end - + # The Enum type SearchCompletionRecord. @@ -4938,7 +5074,7 @@ def consumeIntoTypeSearchCompletionRecord return stream.readTypeSearchCompletionRecord end end - + # The Enum type SearchPolicyKind. @@ -4957,7 +5093,7 @@ def consumeIntoTypeSearchPolicyKind return stream.readTypeSearchPolicyKind end end - + # The Enum type SnapshotNamespaceKind. @@ -4976,7 +5112,7 @@ def consumeIntoTypeSnapshotNamespaceKind return stream.readTypeSnapshotNamespaceKind end end - + # The Enum type StructuralDiffMarkerKind. @@ -4995,7 +5131,7 @@ def consumeIntoTypeStructuralDiffMarkerKind return stream.readTypeStructuralDiffMarkerKind end end - + # The Enum type TreeDebugNodeStatusKind. @@ -5014,7 +5150,7 @@ def consumeIntoTypeTreeDebugNodeStatusKind return stream.readTypeTreeDebugNodeStatusKind end end - + # The Enum type ValueRefKind. @@ -5033,13 +5169,13 @@ def consumeIntoTypeValueRefKind return stream.readTypeValueRefKind end end - + # The Optional type for u16. def self.check_lower_Optionalu16(v) if not v.nil? - + end end @@ -5060,7 +5196,7 @@ def consumeIntoOptionalu16 def self.check_lower_Optionalu32(v) if not v.nil? - + end end @@ -5081,7 +5217,7 @@ def consumeIntoOptionalu32 def self.check_lower_Optionalu64(v) if not v.nil? - + end end @@ -5102,7 +5238,7 @@ def consumeIntoOptionalu64 def self.check_lower_Optionalf64(v) if not v.nil? - + end end @@ -5123,7 +5259,7 @@ def consumeIntoOptionalf64 def self.check_lower_Optionalbool(v) if not v.nil? - + end end @@ -5144,7 +5280,7 @@ def consumeIntoOptionalbool def self.check_lower_Optionalstring(v) if not v.nil? - + end end @@ -5165,7 +5301,7 @@ def consumeIntoOptionalstring def self.check_lower_Optionalbytes(v) if not v.nil? - + end end @@ -5287,6 +5423,27 @@ def consumeIntoOptionalTypeBindingProximitySearchRuntime end end + # The Optional type for TypeBindingTurboQuantizer. + + def self.check_lower_OptionalTypeBindingTurboQuantizer(v) + if not v.nil? + (BindingTurboQuantizer.uniffi_check_lower v) + end + end + + def self.alloc_from_OptionalTypeBindingTurboQuantizer(v) + RustBuffer.allocWithBuilder do |builder| + builder.write_OptionalTypeBindingTurboQuantizer(v) + return builder.finalize() + end + end + + def consumeIntoOptionalTypeBindingTurboQuantizer + consumeWithStream do |stream| + return stream.readOptionalTypeBindingTurboQuantizer + end + end + # The Optional type for TypeProllyReadSession. def self.check_lower_OptionalTypeProllyReadSession(v) @@ -5833,6 +5990,27 @@ def consumeIntoOptionalTypeTreeRecord end end + # The Optional type for TypeTurboQuantizationBuildStatsRecord. + + def self.check_lower_OptionalTypeTurboQuantizationBuildStatsRecord(v) + if not v.nil? + RustBuffer.check_lower_TypeTurboQuantizationBuildStatsRecord(v) + end + end + + def self.alloc_from_OptionalTypeTurboQuantizationBuildStatsRecord(v) + RustBuffer.allocWithBuilder do |builder| + builder.write_OptionalTypeTurboQuantizationBuildStatsRecord(v) + return builder.finalize() + end + end + + def consumeIntoOptionalTypeTurboQuantizationBuildStatsRecord + consumeWithStream do |stream| + return stream.readOptionalTypeTurboQuantizationBuildStatsRecord + end + end + # The Optional type for TypeValueRefRecord. def self.check_lower_OptionalTypeValueRefRecord(v) @@ -6005,7 +6183,7 @@ def consumeIntoOptionalSequencef32 def self.check_lower_Sequenceu64(v) v.each do |item| - + end end @@ -6026,7 +6204,7 @@ def consumeIntoSequenceu64 def self.check_lower_Sequencef32(v) v.each do |item| - + end end @@ -6047,7 +6225,7 @@ def consumeIntoSequencef32 def self.check_lower_Sequencebytes(v) v.each do |item| - + end end @@ -6946,7 +7124,7 @@ def consumeIntoSequenceOptionalbytes end end - + end module UniFFILib @@ -6969,7 +7147,7 @@ def to_s end private_constant :UniFFILib - + # Helper for structured reading of values from a RustBuffer. class RustBufferStream @@ -7182,6 +7360,13 @@ def readTypeBindingSecondaryIndexSnapshot return BindingSecondaryIndexSnapshot.uniffi_allocate(handle) end + # The Object type BindingTurboQuantizer. + + def readTypeBindingTurboQuantizer + handle = unpack_from 8, 'Q>' + return BindingTurboQuantizer.uniffi_allocate(handle) + end + # The Object type BindingVersionedMap. def readTypeBindingVersionedMap @@ -7508,10 +7693,12 @@ def readTypeCompositeBuildOrRebuildOutcomeRecord composite: readOptionalTypeBindingCompositeAccelerator, hnsw: readOptionalTypeBindingHnswIndex, pq: readOptionalTypeBindingProductQuantizer, + turboquant: readOptionalTypeBindingTurboQuantizer, reasons: readSequenceTypeFullRebuildReasonRecord, composite_stats: readTypeCompositeBuildStatsRecord, hnsw_stats: readOptionalTypeHnswBuildStatsRecord, - pq_stats: readOptionalTypeProductQuantizationBuildStatsRecord + pq_stats: readOptionalTypeProductQuantizationBuildStatsRecord, + turboquant_stats: readOptionalTypeTurboQuantizationBuildStatsRecord ) end @@ -7548,7 +7735,9 @@ def readTypeCompositeRebuildOptionsRecord CompositeRebuildOptionsRecord.new( hnsw_limits: readTypeHnswBuildLimitsRecord, pq_worker_threads: readU64, - pq_limits: readTypeProductQuantizationBuildLimitsRecord + pq_limits: readTypeProductQuantizationBuildLimitsRecord, + turboquant_worker_threads: readU64, + turboquant_limits: readTypeTurboQuantizationBuildLimitsRecord ) end @@ -8632,7 +8821,8 @@ def readTypeProximitySearchRequestRecord kernel: readTypeQueryKernelRecord, backend: readTypeSearchBackendRecord, hnsw_ef_search: readOptionalu32, - pq_rerank_multiplier: readOptionalu16 + pq_rerank_multiplier: readOptionalu16, + turboquant_rerank_multiplier: readOptionalu16 ) end @@ -8656,7 +8846,8 @@ def readTypeProximitySearchRuntimePolicyRecord max_bytes: readU64, authoritative_max_bytes: readU64, hnsw_max_bytes: readU64, - pq_max_bytes: readU64 + pq_max_bytes: readU64, + turboquant_max_bytes: readU64 ) end @@ -9365,6 +9556,71 @@ def readTypeTreeStatsRecord ) end + # The Record type TurboQuantizationBuildLimitsRecord. + + def readTypeTurboQuantizationBuildLimitsRecord + TurboQuantizationBuildLimitsRecord.new( + max_records: readOptionalu64, + max_input_bytes: readOptionalu64, + max_temporary_bytes: readOptionalu64, + max_transform_operations: readOptionalu64, + max_encoded_output_bytes: readOptionalu64, + max_worker_threads: readOptionalu64 + ) + end + + # The Record type TurboQuantizationBuildResultRecord. + + def readTypeTurboQuantizationBuildResultRecord + TurboQuantizationBuildResultRecord.new( + index: readTypeBindingTurboQuantizer, + stats: readTypeTurboQuantizationBuildStatsRecord + ) + end + + # The Record type TurboQuantizationBuildStatsRecord. + + def readTypeTurboQuantizationBuildStatsRecord + TurboQuantizationBuildStatsRecord.new( + encoded_vectors: readU64, + zero_vectors: readU64, + transformed_components: readU64, + butterfly_operations: readU64, + input_bytes: readU64, + encoded_output_bytes: readU64, + peak_temporary_bytes: readU64 + ) + end + + # The Record type TurboQuantizationConfigRecord. + + def readTypeTurboQuantizationConfigRecord + TurboQuantizationConfigRecord.new( + bit_width: readU8, + rerank_multiplier: readU32, + seed: readU64 + ) + end + + # The Record type TurboQuantizationQualityRecord. + + def readTypeTurboQuantizationQualityRecord + TurboQuantizationQualityRecord.new( + mean_squared_error: readF64, + maximum_squared_error: readF64 + ) + end + + # The Record type TurboQuantizationVerificationRecord. + + def readTypeTurboQuantizationVerificationRecord + TurboQuantizationVerificationRecord.new( + encoded_vectors: readU64, + zero_vectors: readU64, + quality: readTypeTurboQuantizationQualityRecord + ) + end + # The Record type TypedContentObjectRecord. def readTypeTypedContentObjectRecord @@ -9467,13 +9723,13 @@ def readTypeWriteStatsRecord ) end - - + + # The Enum type AdaptiveQualityRecord. def readTypeAdaptiveQualityRecord variant = unpack_from 4, 'l>' - + if variant == 1 return AdaptiveQualityRecord::FAST end @@ -9487,15 +9743,15 @@ def readTypeAdaptiveQualityRecord raise InternalError, 'Unexpected variant tag for TypeAdaptiveQualityRecord' end - - - + + + # The Enum type CatalogAcceleratorKindRecord. def readTypeCatalogAcceleratorKindRecord variant = unpack_from 4, 'l>' - + if variant == 1 return CatalogAcceleratorKindRecord::HNSW end @@ -9505,38 +9761,44 @@ def readTypeCatalogAcceleratorKindRecord if variant == 3 return CatalogAcceleratorKindRecord::COMPOSITE end + if variant == 4 + return CatalogAcceleratorKindRecord::TURBO_QUANTIZED + end raise InternalError, 'Unexpected variant tag for TypeCatalogAcceleratorKindRecord' end - - - + + + # The Enum type CompositeBaseKindRecord. def readTypeCompositeBaseKindRecord variant = unpack_from 4, 'l>' - + if variant == 1 return CompositeBaseKindRecord::HNSW end if variant == 2 return CompositeBaseKindRecord::PRODUCT_QUANTIZED end + if variant == 3 + return CompositeBaseKindRecord::TURBO_QUANTIZED + end raise InternalError, 'Unexpected variant tag for TypeCompositeBaseKindRecord' end - - - - # The Enum type CompositeBuildOrRebuildKindRecord. - def readTypeCompositeBuildOrRebuildKindRecord + + + # The Enum type CompositeBuildOrRebuildKindRecord. + + def readTypeCompositeBuildOrRebuildKindRecord variant = unpack_from 4, 'l>' - + if variant == 1 return CompositeBuildOrRebuildKindRecord::COMPOSITE end @@ -9549,19 +9811,22 @@ def readTypeCompositeBuildOrRebuildKindRecord if variant == 4 return CompositeBuildOrRebuildKindRecord::PRODUCT_QUANTIZED_REBUILT end + if variant == 5 + return CompositeBuildOrRebuildKindRecord::TURBO_QUANTIZED_REBUILT + end raise InternalError, 'Unexpected variant tag for TypeCompositeBuildOrRebuildKindRecord' end - - - + + + # The Enum type ContentObjectKindRecord. def readTypeContentObjectKindRecord variant = unpack_from 4, 'l>' - + if variant == 1 return ContentObjectKindRecord::ORDERED_NODE end @@ -9598,19 +9863,22 @@ def readTypeContentObjectKindRecord if variant == 12 return ContentObjectKindRecord::ACCELERATOR_CATALOG end + if variant == 13 + return ContentObjectKindRecord::TURBO_QUANTIZATION + end raise InternalError, 'Unexpected variant tag for TypeContentObjectKindRecord' end - - - + + + # The Enum type CrdtDeletePolicyKind. def readTypeCrdtDeletePolicyKind variant = unpack_from 4, 'l>' - + if variant == 1 return CrdtDeletePolicyKind::DELETE_WINS end @@ -9621,15 +9889,15 @@ def readTypeCrdtDeletePolicyKind raise InternalError, 'Unexpected variant tag for TypeCrdtDeletePolicyKind' end - - - + + + # The Enum type CrdtMergeStrategyKind. def readTypeCrdtMergeStrategyKind variant = unpack_from 4, 'l>' - + if variant == 1 return CrdtMergeStrategyKind::LAST_WRITER_WINS end @@ -9640,15 +9908,15 @@ def readTypeCrdtMergeStrategyKind raise InternalError, 'Unexpected variant tag for TypeCrdtMergeStrategyKind' end - - - + + + # The Enum type CrdtResolutionKind. def readTypeCrdtResolutionKind variant = unpack_from 4, 'l>' - + if variant == 1 return CrdtResolutionKind::VALUE end @@ -9659,15 +9927,15 @@ def readTypeCrdtResolutionKind raise InternalError, 'Unexpected variant tag for TypeCrdtResolutionKind' end - - - + + + # The Enum type DiffKind. def readTypeDiffKind variant = unpack_from 4, 'l>' - + if variant == 1 return DiffKind::ADDED end @@ -9681,15 +9949,15 @@ def readTypeDiffKind raise InternalError, 'Unexpected variant tag for TypeDiffKind' end - - - + + + # The Enum type DistanceMetricRecord. def readTypeDistanceMetricRecord variant = unpack_from 4, 'l>' - + if variant == 1 return DistanceMetricRecord::L2_SQUARED end @@ -9703,15 +9971,15 @@ def readTypeDistanceMetricRecord raise InternalError, 'Unexpected variant tag for TypeDistanceMetricRecord' end - - - + + + # The Enum type EncodingKind. def readTypeEncodingKind variant = unpack_from 4, 'l>' - + if variant == 1 return EncodingKind::RAW end @@ -9728,15 +9996,15 @@ def readTypeEncodingKind raise InternalError, 'Unexpected variant tag for TypeEncodingKind' end - - - + + + # The Enum type FullRebuildReasonKindRecord. def readTypeFullRebuildReasonKindRecord variant = unpack_from 4, 'l>' - + if variant == 1 return FullRebuildReasonKindRecord::DELTA_RECORDS end @@ -9753,15 +10021,15 @@ def readTypeFullRebuildReasonKindRecord raise InternalError, 'Unexpected variant tag for TypeFullRebuildReasonKindRecord' end - - - + + + # The Enum type HnswRoutingVectorEncodingRecord. def readTypeHnswRoutingVectorEncodingRecord variant = unpack_from 4, 'l>' - + if variant == 1 return HnswRoutingVectorEncodingRecord::FULL_F32 end @@ -9769,15 +10037,15 @@ def readTypeHnswRoutingVectorEncodingRecord raise InternalError, 'Unexpected variant tag for TypeHnswRoutingVectorEncodingRecord' end - - - + + + # The Enum type IndexProjectionRecord. def readTypeIndexProjectionRecord variant = unpack_from 4, 'l>' - + if variant == 1 return IndexProjectionRecord::KEYS_ONLY end @@ -9791,15 +10059,15 @@ def readTypeIndexProjectionRecord raise InternalError, 'Unexpected variant tag for TypeIndexProjectionRecord' end - - - + + + # The Enum type IndexedUpdateKind. def readTypeIndexedUpdateKind variant = unpack_from 4, 'l>' - + if variant == 1 return IndexedUpdateKind::APPLIED end @@ -9813,15 +10081,15 @@ def readTypeIndexedUpdateKind raise InternalError, 'Unexpected variant tag for TypeIndexedUpdateKind' end - - - + + + # The Enum type MapUpdateKind. def readTypeMapUpdateKind variant = unpack_from 4, 'l>' - + if variant == 1 return MapUpdateKind::APPLIED end @@ -9835,15 +10103,15 @@ def readTypeMapUpdateKind raise InternalError, 'Unexpected variant tag for TypeMapUpdateKind' end - - - + + + # The Enum type MergeFallbackReasonKind. def readTypeMergeFallbackReasonKind variant = unpack_from 4, 'l>' - + if variant == 1 return MergeFallbackReasonKind::MISSING_ROOT end @@ -9866,15 +10134,15 @@ def readTypeMergeFallbackReasonKind raise InternalError, 'Unexpected variant tag for TypeMergeFallbackReasonKind' end - - - + + + # The Enum type MergeFastPathKind. def readTypeMergeFastPathKind variant = unpack_from 4, 'l>' - + if variant == 1 return MergeFastPathKind::BRANCHES_EQUAL end @@ -9888,15 +10156,15 @@ def readTypeMergeFastPathKind raise InternalError, 'Unexpected variant tag for TypeMergeFastPathKind' end - - - + + + # The Enum type MergeReuseReasonKind. def readTypeMergeReuseReasonKind variant = unpack_from 4, 'l>' - + if variant == 1 return MergeReuseReasonKind::BRANCHES_EQUAL end @@ -9919,15 +10187,15 @@ def readTypeMergeReuseReasonKind raise InternalError, 'Unexpected variant tag for TypeMergeReuseReasonKind' end - - - + + + # The Enum type MergeTraceEventKind. def readTypeMergeTraceEventKind variant = unpack_from 4, 'l>' - + if variant == 1 return MergeTraceEventKind::FAST_PATH end @@ -9956,15 +10224,15 @@ def readTypeMergeTraceEventKind raise InternalError, 'Unexpected variant tag for TypeMergeTraceEventKind' end - - - + + + # The Enum type MergeTraceResolutionKind. def readTypeMergeTraceResolutionKind variant = unpack_from 4, 'l>' - + if variant == 1 return MergeTraceResolutionKind::VALUE end @@ -9978,15 +10246,15 @@ def readTypeMergeTraceResolutionKind raise InternalError, 'Unexpected variant tag for TypeMergeTraceResolutionKind' end - - - + + + # The Enum type MergeTraceStageKind. def readTypeMergeTraceStageKind variant = unpack_from 4, 'l>' - + if variant == 1 return MergeTraceStageKind::STRUCTURAL end @@ -9997,15 +10265,15 @@ def readTypeMergeTraceStageKind raise InternalError, 'Unexpected variant tag for TypeMergeTraceStageKind' end - - - + + + # The Enum type MutationKind. def readTypeMutationKind variant = unpack_from 4, 'l>' - + if variant == 1 return MutationKind::UPSERT end @@ -10016,15 +10284,15 @@ def readTypeMutationKind raise InternalError, 'Unexpected variant tag for TypeMutationKind' end - - - + + + # The Enum type NamedRootRetentionKind. def readTypeNamedRootRetentionKind variant = unpack_from 4, 'l>' - + if variant == 1 return NamedRootRetentionKind::ALL end @@ -10044,17 +10312,17 @@ def readTypeNamedRootRetentionKind raise InternalError, 'Unexpected variant tag for TypeNamedRootRetentionKind' end - - - + + + # The Error type ProllyBindingError def readTypeProllyBindingError variant = unpack_from 4, 'l>' - + if variant == 1 return ProllyBindingError::InvalidArgument.new( readString() @@ -10105,15 +10373,15 @@ def readTypeProllyBindingError raise InternalError, 'Unexpected variant tag for TypeProllyBindingError' end - - - + + + # The Enum type ProximityFilterKind. def readTypeProximityFilterKind variant = unpack_from 4, 'l>' - + if variant == 1 return ProximityFilterKind::ALL end @@ -10130,15 +10398,15 @@ def readTypeProximityFilterKind raise InternalError, 'Unexpected variant tag for TypeProximityFilterKind' end - - - + + + # The Enum type ProximitySearchClaimKindRecord. def readTypeProximitySearchClaimKindRecord variant = unpack_from 4, 'l>' - + if variant == 1 return ProximitySearchClaimKindRecord::EXACT_L2_OPTIMAL end @@ -10149,15 +10417,15 @@ def readTypeProximitySearchClaimKindRecord raise InternalError, 'Unexpected variant tag for TypeProximitySearchClaimKindRecord' end - - - + + + # The Enum type QueryKernelRecord. def readTypeQueryKernelRecord variant = unpack_from 4, 'l>' - + if variant == 1 return QueryKernelRecord::SCALAR_DETERMINISTIC end @@ -10171,15 +10439,15 @@ def readTypeQueryKernelRecord raise InternalError, 'Unexpected variant tag for TypeQueryKernelRecord' end - - - + + + # The Enum type ResolutionKind. def readTypeResolutionKind variant = unpack_from 4, 'l>' - + if variant == 1 return ResolutionKind::VALUE end @@ -10193,15 +10461,15 @@ def readTypeResolutionKind raise InternalError, 'Unexpected variant tag for TypeResolutionKind' end - - - + + + # The Enum type SearchBackendRecord. def readTypeSearchBackendRecord variant = unpack_from 4, 'l>' - + if variant == 1 return SearchBackendRecord::NATIVE end @@ -10217,19 +10485,22 @@ def readTypeSearchBackendRecord if variant == 5 return SearchBackendRecord::AUTO end + if variant == 6 + return SearchBackendRecord::TURBO_QUANTIZED + end raise InternalError, 'Unexpected variant tag for TypeSearchBackendRecord' end - - - + + + # The Enum type SearchCompletionRecord. def readTypeSearchCompletionRecord variant = unpack_from 4, 'l>' - + if variant == 1 return SearchCompletionRecord::EXACT end @@ -10249,15 +10520,15 @@ def readTypeSearchCompletionRecord raise InternalError, 'Unexpected variant tag for TypeSearchCompletionRecord' end - - - + + + # The Enum type SearchPolicyKind. def readTypeSearchPolicyKind variant = unpack_from 4, 'l>' - + if variant == 1 return SearchPolicyKind::EXACT end @@ -10271,15 +10542,15 @@ def readTypeSearchPolicyKind raise InternalError, 'Unexpected variant tag for TypeSearchPolicyKind' end - - - + + + # The Enum type SnapshotNamespaceKind. def readTypeSnapshotNamespaceKind variant = unpack_from 4, 'l>' - + if variant == 1 return SnapshotNamespaceKind::BRANCH end @@ -10296,15 +10567,15 @@ def readTypeSnapshotNamespaceKind raise InternalError, 'Unexpected variant tag for TypeSnapshotNamespaceKind' end - - - + + + # The Enum type StructuralDiffMarkerKind. def readTypeStructuralDiffMarkerKind variant = unpack_from 4, 'l>' - + if variant == 1 return StructuralDiffMarkerKind::COMPARE end @@ -10318,15 +10589,15 @@ def readTypeStructuralDiffMarkerKind raise InternalError, 'Unexpected variant tag for TypeStructuralDiffMarkerKind' end - - - + + + # The Enum type TreeDebugNodeStatusKind. def readTypeTreeDebugNodeStatusKind variant = unpack_from 4, 'l>' - + if variant == 1 return TreeDebugNodeStatusKind::SHARED end @@ -10340,15 +10611,15 @@ def readTypeTreeDebugNodeStatusKind raise InternalError, 'Unexpected variant tag for TypeTreeDebugNodeStatusKind' end - - - + + + # The Enum type ValueRefKind. def readTypeValueRefKind variant = unpack_from 4, 'l>' - + if variant == 1 return ValueRefKind::INLINE end @@ -10359,7 +10630,7 @@ def readTypeValueRefKind raise InternalError, 'Unexpected variant tag for TypeValueRefKind' end - + # The Optional type for u16. @@ -10529,6 +10800,20 @@ def readOptionalTypeBindingProximitySearchRuntime end end + # The Optional type for TypeBindingTurboQuantizer. + + def readOptionalTypeBindingTurboQuantizer + flag = unpack_from 1, 'c' + + if flag == 0 + return nil + elsif flag == 1 + return readTypeBindingTurboQuantizer + else + raise InternalError, 'Unexpected flag byte for OptionalTypeBindingTurboQuantizer' + end + end + # The Optional type for TypeProllyReadSession. def readOptionalTypeProllyReadSession @@ -10893,6 +11178,20 @@ def readOptionalTypeTreeRecord end end + # The Optional type for TypeTurboQuantizationBuildStatsRecord. + + def readOptionalTypeTurboQuantizationBuildStatsRecord + flag = unpack_from 1, 'c' + + if flag == 0 + return nil + elsif flag == 1 + return readTypeTurboQuantizationBuildStatsRecord + else + raise InternalError, 'Unexpected flag byte for OptionalTypeTurboQuantizationBuildStatsRecord' + end + end + # The Optional type for TypeValueRefRecord. def readOptionalTypeValueRefRecord @@ -11725,7 +12024,7 @@ def readSequenceOptionalbytes items end - + def unpack_from(size, format) raise InternalError, 'read past end of rust buffer' if @offset + size > @rbuf.len @@ -11742,7 +12041,7 @@ def unpack_from(size, format) end private_constant :RustBufferStream - + # Helper for structured writing of values into a RustBuffer. class RustBufferBuilder def initialize @@ -11958,6 +12257,13 @@ def write_TypeBindingSecondaryIndexSnapshot(obj) pack_into(8, 'Q>', handle) end + # The Object type BindingTurboQuantizer. + + def write_TypeBindingTurboQuantizer(obj) + handle = BindingTurboQuantizer.uniffi_lower obj + pack_into(8, 'Q>', handle) + end + # The Object type BindingVersionedMap. def write_TypeBindingVersionedMap(obj) @@ -12249,10 +12555,12 @@ def write_TypeCompositeBuildOrRebuildOutcomeRecord(v) self.write_OptionalTypeBindingCompositeAccelerator(v.composite) self.write_OptionalTypeBindingHnswIndex(v.hnsw) self.write_OptionalTypeBindingProductQuantizer(v.pq) + self.write_OptionalTypeBindingTurboQuantizer(v.turboquant) self.write_SequenceTypeFullRebuildReasonRecord(v.reasons) self.write_TypeCompositeBuildStatsRecord(v.composite_stats) self.write_OptionalTypeHnswBuildStatsRecord(v.hnsw_stats) self.write_OptionalTypeProductQuantizationBuildStatsRecord(v.pq_stats) + self.write_OptionalTypeTurboQuantizationBuildStatsRecord(v.turboquant_stats) end # The Record type CompositeBuildOutcomeRecord. @@ -12284,6 +12592,8 @@ def write_TypeCompositeRebuildOptionsRecord(v) self.write_TypeHnswBuildLimitsRecord(v.hnsw_limits) self.write_U64(v.pq_worker_threads) self.write_TypeProductQuantizationBuildLimitsRecord(v.pq_limits) + self.write_U64(v.turboquant_worker_threads) + self.write_TypeTurboQuantizationBuildLimitsRecord(v.turboquant_limits) end # The Record type ConfigRecord. @@ -13174,6 +13484,7 @@ def write_TypeProximitySearchRequestRecord(v) self.write_TypeSearchBackendRecord(v.backend) self.write_Optionalu32(v.hnsw_ef_search) self.write_Optionalu16(v.pq_rerank_multiplier) + self.write_Optionalu16(v.turboquant_rerank_multiplier) end # The Record type ProximitySearchResultRecord. @@ -13194,6 +13505,7 @@ def write_TypeProximitySearchRuntimePolicyRecord(v) self.write_U64(v.authoritative_max_bytes) self.write_U64(v.hnsw_max_bytes) self.write_U64(v.pq_max_bytes) + self.write_U64(v.turboquant_max_bytes) end # The Record type ProximitySearchRuntimeStatsRecord. @@ -13783,6 +14095,59 @@ def write_TypeTreeStatsRecord(v) self.write_U64(v.total_values_size_bytes) end + # The Record type TurboQuantizationBuildLimitsRecord. + + def write_TypeTurboQuantizationBuildLimitsRecord(v) + self.write_Optionalu64(v.max_records) + self.write_Optionalu64(v.max_input_bytes) + self.write_Optionalu64(v.max_temporary_bytes) + self.write_Optionalu64(v.max_transform_operations) + self.write_Optionalu64(v.max_encoded_output_bytes) + self.write_Optionalu64(v.max_worker_threads) + end + + # The Record type TurboQuantizationBuildResultRecord. + + def write_TypeTurboQuantizationBuildResultRecord(v) + self.write_TypeBindingTurboQuantizer(v.index) + self.write_TypeTurboQuantizationBuildStatsRecord(v.stats) + end + + # The Record type TurboQuantizationBuildStatsRecord. + + def write_TypeTurboQuantizationBuildStatsRecord(v) + self.write_U64(v.encoded_vectors) + self.write_U64(v.zero_vectors) + self.write_U64(v.transformed_components) + self.write_U64(v.butterfly_operations) + self.write_U64(v.input_bytes) + self.write_U64(v.encoded_output_bytes) + self.write_U64(v.peak_temporary_bytes) + end + + # The Record type TurboQuantizationConfigRecord. + + def write_TypeTurboQuantizationConfigRecord(v) + self.write_U8(v.bit_width) + self.write_U32(v.rerank_multiplier) + self.write_U64(v.seed) + end + + # The Record type TurboQuantizationQualityRecord. + + def write_TypeTurboQuantizationQualityRecord(v) + self.write_F64(v.mean_squared_error) + self.write_F64(v.maximum_squared_error) + end + + # The Record type TurboQuantizationVerificationRecord. + + def write_TypeTurboQuantizationVerificationRecord(v) + self.write_U64(v.encoded_vectors) + self.write_U64(v.zero_vectors) + self.write_TypeTurboQuantizationQualityRecord(v.quality) + end + # The Record type TypedContentObjectRecord. def write_TypeTypedContentObjectRecord(v) @@ -13872,247 +14237,247 @@ def write_TypeWriteStatsRecord(v) def write_TypeAdaptiveQualityRecord(v) pack_into(4, 'l>', v) end - + # The Enum type CatalogAcceleratorKindRecord. def write_TypeCatalogAcceleratorKindRecord(v) pack_into(4, 'l>', v) end - + # The Enum type CompositeBaseKindRecord. def write_TypeCompositeBaseKindRecord(v) pack_into(4, 'l>', v) end - + # The Enum type CompositeBuildOrRebuildKindRecord. def write_TypeCompositeBuildOrRebuildKindRecord(v) pack_into(4, 'l>', v) end - + # The Enum type ContentObjectKindRecord. def write_TypeContentObjectKindRecord(v) pack_into(4, 'l>', v) end - + # The Enum type CrdtDeletePolicyKind. def write_TypeCrdtDeletePolicyKind(v) pack_into(4, 'l>', v) end - + # The Enum type CrdtMergeStrategyKind. def write_TypeCrdtMergeStrategyKind(v) pack_into(4, 'l>', v) end - + # The Enum type CrdtResolutionKind. def write_TypeCrdtResolutionKind(v) pack_into(4, 'l>', v) end - + # The Enum type DiffKind. def write_TypeDiffKind(v) pack_into(4, 'l>', v) end - + # The Enum type DistanceMetricRecord. def write_TypeDistanceMetricRecord(v) pack_into(4, 'l>', v) end - + # The Enum type EncodingKind. def write_TypeEncodingKind(v) pack_into(4, 'l>', v) end - + # The Enum type FullRebuildReasonKindRecord. def write_TypeFullRebuildReasonKindRecord(v) pack_into(4, 'l>', v) end - + # The Enum type HnswRoutingVectorEncodingRecord. def write_TypeHnswRoutingVectorEncodingRecord(v) pack_into(4, 'l>', v) end - + # The Enum type IndexProjectionRecord. def write_TypeIndexProjectionRecord(v) pack_into(4, 'l>', v) end - + # The Enum type IndexedUpdateKind. def write_TypeIndexedUpdateKind(v) pack_into(4, 'l>', v) end - + # The Enum type MapUpdateKind. def write_TypeMapUpdateKind(v) pack_into(4, 'l>', v) end - + # The Enum type MergeFallbackReasonKind. def write_TypeMergeFallbackReasonKind(v) pack_into(4, 'l>', v) end - + # The Enum type MergeFastPathKind. def write_TypeMergeFastPathKind(v) pack_into(4, 'l>', v) end - + # The Enum type MergeReuseReasonKind. def write_TypeMergeReuseReasonKind(v) pack_into(4, 'l>', v) end - + # The Enum type MergeTraceEventKind. def write_TypeMergeTraceEventKind(v) pack_into(4, 'l>', v) end - + # The Enum type MergeTraceResolutionKind. def write_TypeMergeTraceResolutionKind(v) pack_into(4, 'l>', v) end - + # The Enum type MergeTraceStageKind. def write_TypeMergeTraceStageKind(v) pack_into(4, 'l>', v) end - + # The Enum type MutationKind. def write_TypeMutationKind(v) pack_into(4, 'l>', v) end - + # The Enum type NamedRootRetentionKind. def write_TypeNamedRootRetentionKind(v) pack_into(4, 'l>', v) end - - + + # The Enum type ProximityFilterKind. def write_TypeProximityFilterKind(v) pack_into(4, 'l>', v) end - + # The Enum type ProximitySearchClaimKindRecord. def write_TypeProximitySearchClaimKindRecord(v) pack_into(4, 'l>', v) end - + # The Enum type QueryKernelRecord. def write_TypeQueryKernelRecord(v) pack_into(4, 'l>', v) end - + # The Enum type ResolutionKind. def write_TypeResolutionKind(v) pack_into(4, 'l>', v) end - + # The Enum type SearchBackendRecord. def write_TypeSearchBackendRecord(v) pack_into(4, 'l>', v) end - + # The Enum type SearchCompletionRecord. def write_TypeSearchCompletionRecord(v) pack_into(4, 'l>', v) end - + # The Enum type SearchPolicyKind. def write_TypeSearchPolicyKind(v) pack_into(4, 'l>', v) end - + # The Enum type SnapshotNamespaceKind. def write_TypeSnapshotNamespaceKind(v) pack_into(4, 'l>', v) end - + # The Enum type StructuralDiffMarkerKind. def write_TypeStructuralDiffMarkerKind(v) pack_into(4, 'l>', v) end - + # The Enum type TreeDebugNodeStatusKind. def write_TypeTreeDebugNodeStatusKind(v) pack_into(4, 'l>', v) end - + # The Enum type ValueRefKind. def write_TypeValueRefKind(v) pack_into(4, 'l>', v) end - + # The Optional type for u16. @@ -14246,6 +14611,17 @@ def write_OptionalTypeBindingProximitySearchRuntime(v) end end + # The Optional type for TypeBindingTurboQuantizer. + + def write_OptionalTypeBindingTurboQuantizer(v) + if v.nil? + pack_into(1, 'c', 0) + else + pack_into(1, 'c', 1) + self.write_TypeBindingTurboQuantizer(v) + end + end + # The Optional type for TypeProllyReadSession. def write_OptionalTypeProllyReadSession(v) @@ -14532,6 +14908,17 @@ def write_OptionalTypeTreeRecord(v) end end + # The Optional type for TypeTurboQuantizationBuildStatsRecord. + + def write_OptionalTypeTurboQuantizationBuildStatsRecord(v) + if v.nil? + pack_into(1, 'c', 0) + else + pack_into(1, 'c', 1) + self.write_TypeTurboQuantizationBuildStatsRecord(v) + end + end + # The Optional type for TypeValueRefRecord. def write_OptionalTypeValueRefRecord(v) @@ -15070,7 +15457,7 @@ def write_SequenceOptionalbytes(items) end end - + private @@ -15138,7 +15525,7 @@ def initialize(reason) end attr_reader :reason - + def to_s "#{self.class.name}(reason=#{@reason.inspect})" @@ -15151,7 +15538,7 @@ def initialize(reason) end attr_reader :reason - + def to_s "#{self.class.name}(reason=#{@reason.inspect})" @@ -15164,7 +15551,7 @@ def initialize(reason) end attr_reader :reason - + def to_s "#{self.class.name}(reason=#{@reason.inspect})" @@ -15177,7 +15564,7 @@ def initialize(reason) end attr_reader :reason - + def to_s "#{self.class.name}(reason=#{@reason.inspect})" @@ -15190,7 +15577,7 @@ def initialize(reason) end attr_reader :reason - + def to_s "#{self.class.name}(reason=#{@reason.inspect})" @@ -15203,7 +15590,7 @@ def initialize(reason) end attr_reader :reason - + def to_s "#{self.class.name}(reason=#{@reason.inspect})" @@ -15216,7 +15603,7 @@ def initialize(reason) end attr_reader :reason - + def to_s "#{self.class.name}(reason=#{@reason.inspect})" @@ -15232,6 +15619,7 @@ def initialize(code, retry_advice, reason) attr_reader :code, :retry_advice, :reason + def to_s "#{self.class.name}(code=#{@code.inspect}, retry_advice=#{@retry_advice.inspect}, reason=#{@reason.inspect})" end @@ -15243,7 +15631,7 @@ def initialize(reason) end attr_reader :reason - + def to_s "#{self.class.name}(reason=#{@reason.inspect})" @@ -15380,9 +15768,9 @@ def self.rust_call_with_error(error_module, fn_name, *args) module UniFFILib extend FFI::Library - + ffi_lib ENV.fetch('PROLLY_BINDINGS_LIBRARY', 'prolly_bindings') - + attach_function :uniffi_prolly_bindings_fn_clone_conflictvisitorcallback, [:uint64, RustCallStatus.by_ref], @@ -16510,7 +16898,7 @@ module UniFFILib [:uint64, RustCallStatus.by_ref], :void attach_function :uniffi_prolly_bindings_fn_method_bindingproximitymap_build_accelerator_catalog, - [:uint64, RustBuffer.by_value, RustBuffer.by_value, RustBuffer.by_value, RustCallStatus.by_ref], + [:uint64, RustBuffer.by_value, RustBuffer.by_value, RustBuffer.by_value, RustBuffer.by_value, RustCallStatus.by_ref], :uint64 attach_function :uniffi_prolly_bindings_fn_method_bindingproximitymap_build_composite_hnsw, [:uint64, :uint64, :uint64, RustBuffer.by_value, RustBuffer.by_value, RustCallStatus.by_ref], @@ -16518,6 +16906,9 @@ module UniFFILib attach_function :uniffi_prolly_bindings_fn_method_bindingproximitymap_build_composite_pq, [:uint64, :uint64, :uint64, RustBuffer.by_value, RustBuffer.by_value, RustCallStatus.by_ref], RustBuffer.by_value + attach_function :uniffi_prolly_bindings_fn_method_bindingproximitymap_build_composite_turboquant, + [:uint64, :uint64, :uint64, RustBuffer.by_value, RustBuffer.by_value, RustCallStatus.by_ref], + RustBuffer.by_value attach_function :uniffi_prolly_bindings_fn_method_bindingproximitymap_build_hnsw, [:uint64, RustBuffer.by_value, RustBuffer.by_value, RustCallStatus.by_ref], RustBuffer.by_value @@ -16527,9 +16918,15 @@ module UniFFILib attach_function :uniffi_prolly_bindings_fn_method_bindingproximitymap_build_or_rebuild_composite_pq, [:uint64, :uint64, :uint64, RustBuffer.by_value, RustBuffer.by_value, RustBuffer.by_value, RustCallStatus.by_ref], RustBuffer.by_value + attach_function :uniffi_prolly_bindings_fn_method_bindingproximitymap_build_or_rebuild_composite_turboquant, + [:uint64, :uint64, :uint64, RustBuffer.by_value, RustBuffer.by_value, RustBuffer.by_value, RustCallStatus.by_ref], + RustBuffer.by_value attach_function :uniffi_prolly_bindings_fn_method_bindingproximitymap_build_pq, [:uint64, RustBuffer.by_value, :uint64, RustBuffer.by_value, RustCallStatus.by_ref], RustBuffer.by_value + attach_function :uniffi_prolly_bindings_fn_method_bindingproximitymap_build_turboquant, + [:uint64, RustBuffer.by_value, :uint64, RustBuffer.by_value, RustCallStatus.by_ref], + RustBuffer.by_value attach_function :uniffi_prolly_bindings_fn_method_bindingproximitymap_clear_content_cache, [:uint64, RustCallStatus.by_ref], :void @@ -16563,6 +16960,9 @@ module UniFFILib attach_function :uniffi_prolly_bindings_fn_method_bindingproximitymap_load_pq, [:uint64, RustBuffer.by_value, RustCallStatus.by_ref], :uint64 + attach_function :uniffi_prolly_bindings_fn_method_bindingproximitymap_load_turboquant, + [:uint64, RustBuffer.by_value, RustCallStatus.by_ref], + :uint64 attach_function :uniffi_prolly_bindings_fn_method_bindingproximitymap_mutate, [:uint64, RustBuffer.by_value, RustCallStatus.by_ref], RustBuffer.by_value @@ -16650,6 +17050,39 @@ module UniFFILib attach_function :uniffi_prolly_bindings_fn_method_bindingproximitysearchruntime_stats, [:uint64, RustCallStatus.by_ref], RustBuffer.by_value + attach_function :uniffi_prolly_bindings_fn_clone_bindingturboquantizer, + [:uint64, RustCallStatus.by_ref], + :uint64 + attach_function :uniffi_prolly_bindings_fn_free_bindingturboquantizer, + [:uint64, RustCallStatus.by_ref], + :void + attach_function :uniffi_prolly_bindings_fn_method_bindingturboquantizer_config, + [:uint64, RustCallStatus.by_ref], + RustBuffer.by_value + attach_function :uniffi_prolly_bindings_fn_method_bindingturboquantizer_manifest, + [:uint64, RustCallStatus.by_ref], + RustBuffer.by_value + attach_function :uniffi_prolly_bindings_fn_method_bindingturboquantizer_prove_search, + [:uint64, :uint64, RustBuffer.by_value, RustBuffer.by_value, RustCallStatus.by_ref], + :uint64 + attach_function :uniffi_prolly_bindings_fn_method_bindingturboquantizer_quality, + [:uint64, RustCallStatus.by_ref], + RustBuffer.by_value + attach_function :uniffi_prolly_bindings_fn_method_bindingturboquantizer_search, + [:uint64, :uint64, RustBuffer.by_value, RustCallStatus.by_ref], + RustBuffer.by_value + attach_function :uniffi_prolly_bindings_fn_method_bindingturboquantizer_search_cancellable, + [:uint64, :uint64, RustBuffer.by_value, RustBuffer.by_value, :uint64, RustCallStatus.by_ref], + RustBuffer.by_value + attach_function :uniffi_prolly_bindings_fn_method_bindingturboquantizer_search_with_runtime, + [:uint64, :uint64, RustBuffer.by_value, :uint64, RustCallStatus.by_ref], + RustBuffer.by_value + attach_function :uniffi_prolly_bindings_fn_method_bindingturboquantizer_source_descriptor, + [:uint64, RustCallStatus.by_ref], + RustBuffer.by_value + attach_function :uniffi_prolly_bindings_fn_method_bindingturboquantizer_verify, + [:uint64, :uint64, RustCallStatus.by_ref], + RustBuffer.by_value attach_function :uniffi_prolly_bindings_fn_clone_proximityrecordvisitorcallback, [:uint64, RustCallStatus.by_ref], :uint64 @@ -17529,6 +17962,12 @@ module UniFFILib attach_function :uniffi_prolly_bindings_fn_func_default_proximity_search_runtime_policy, [RustCallStatus.by_ref], RustBuffer.by_value + attach_function :uniffi_prolly_bindings_fn_func_default_turboquant_build_limits, + [RustCallStatus.by_ref], + RustBuffer.by_value + attach_function :uniffi_prolly_bindings_fn_func_default_turboquant_config, + [RustCallStatus.by_ref], + RustBuffer.by_value attach_function :uniffi_prolly_bindings_fn_func_exact_proximity_search_request, [RustBuffer.by_value, :uint64, RustCallStatus.by_ref], RustBuffer.by_value @@ -17955,6 +18394,12 @@ module UniFFILib attach_function :uniffi_prolly_bindings_checksum_func_default_proximity_search_runtime_policy, [RustCallStatus.by_ref], :uint16 + attach_function :uniffi_prolly_bindings_checksum_func_default_turboquant_build_limits, + [RustCallStatus.by_ref], + :uint16 + attach_function :uniffi_prolly_bindings_checksum_func_default_turboquant_config, + [RustCallStatus.by_ref], + :uint16 attach_function :uniffi_prolly_bindings_checksum_func_exact_proximity_search_request, [RustCallStatus.by_ref], :uint16 @@ -18891,6 +19336,9 @@ module UniFFILib attach_function :uniffi_prolly_bindings_checksum_method_bindingproximitymap_build_composite_pq, [RustCallStatus.by_ref], :uint16 + attach_function :uniffi_prolly_bindings_checksum_method_bindingproximitymap_build_composite_turboquant, + [RustCallStatus.by_ref], + :uint16 attach_function :uniffi_prolly_bindings_checksum_method_bindingproximitymap_build_hnsw, [RustCallStatus.by_ref], :uint16 @@ -18900,9 +19348,15 @@ module UniFFILib attach_function :uniffi_prolly_bindings_checksum_method_bindingproximitymap_build_or_rebuild_composite_pq, [RustCallStatus.by_ref], :uint16 + attach_function :uniffi_prolly_bindings_checksum_method_bindingproximitymap_build_or_rebuild_composite_turboquant, + [RustCallStatus.by_ref], + :uint16 attach_function :uniffi_prolly_bindings_checksum_method_bindingproximitymap_build_pq, [RustCallStatus.by_ref], :uint16 + attach_function :uniffi_prolly_bindings_checksum_method_bindingproximitymap_build_turboquant, + [RustCallStatus.by_ref], + :uint16 attach_function :uniffi_prolly_bindings_checksum_method_bindingproximitymap_clear_content_cache, [RustCallStatus.by_ref], :uint16 @@ -18936,6 +19390,9 @@ module UniFFILib attach_function :uniffi_prolly_bindings_checksum_method_bindingproximitymap_load_pq, [RustCallStatus.by_ref], :uint16 + attach_function :uniffi_prolly_bindings_checksum_method_bindingproximitymap_load_turboquant, + [RustCallStatus.by_ref], + :uint16 attach_function :uniffi_prolly_bindings_checksum_method_bindingproximitymap_mutate, [RustCallStatus.by_ref], :uint16 @@ -19005,6 +19462,33 @@ module UniFFILib attach_function :uniffi_prolly_bindings_checksum_method_bindingproximitysearchruntime_stats, [RustCallStatus.by_ref], :uint16 + attach_function :uniffi_prolly_bindings_checksum_method_bindingturboquantizer_config, + [RustCallStatus.by_ref], + :uint16 + attach_function :uniffi_prolly_bindings_checksum_method_bindingturboquantizer_manifest, + [RustCallStatus.by_ref], + :uint16 + attach_function :uniffi_prolly_bindings_checksum_method_bindingturboquantizer_prove_search, + [RustCallStatus.by_ref], + :uint16 + attach_function :uniffi_prolly_bindings_checksum_method_bindingturboquantizer_quality, + [RustCallStatus.by_ref], + :uint16 + attach_function :uniffi_prolly_bindings_checksum_method_bindingturboquantizer_search, + [RustCallStatus.by_ref], + :uint16 + attach_function :uniffi_prolly_bindings_checksum_method_bindingturboquantizer_search_cancellable, + [RustCallStatus.by_ref], + :uint16 + attach_function :uniffi_prolly_bindings_checksum_method_bindingturboquantizer_search_with_runtime, + [RustCallStatus.by_ref], + :uint16 + attach_function :uniffi_prolly_bindings_checksum_method_bindingturboquantizer_source_descriptor, + [RustCallStatus.by_ref], + :uint16 + attach_function :uniffi_prolly_bindings_checksum_method_bindingturboquantizer_verify, + [RustCallStatus.by_ref], + :uint16 attach_function :uniffi_prolly_bindings_checksum_method_proximityrecordvisitorcallback_visit, [RustCallStatus.by_ref], :uint16 @@ -19476,72 +19960,72 @@ module UniFFILib attach_function :ffi_prolly_bindings_uniffi_contract_version, [RustCallStatus.by_ref], :uint32 - + end # Public interface members begin here. - - - + + + class CrdtDeletePolicyKind DELETE_WINS = 1 UPDATE_WINS = 2 - + end - - - + + + class CrdtMergeStrategyKind LAST_WRITER_WINS = 1 MULTI_VALUE = 2 - + end - - - + + + class CrdtResolutionKind VALUE = 1 DELETE = 2 - + end - - - + + + class DiffKind ADDED = 1 REMOVED = 2 CHANGED = 3 - + end - - - + + + class EncodingKind RAW = 1 CBOR = 2 JSON = 3 CUSTOM = 4 - + end - - - + + + class MergeFallbackReasonKind MISSING_ROOT = 1 @@ -19550,25 +20034,25 @@ class MergeFallbackReasonKind CHILD_FALLBACK = 4 DELETE_RESOLUTION = 5 DIFF_BATCH = 6 - + end - - - + + + class MergeFastPathKind BRANCHES_EQUAL = 1 LEFT_UNCHANGED = 2 RIGHT_UNCHANGED = 3 - + end - - - + + + class MergeReuseReasonKind BRANCHES_EQUAL = 1 @@ -19577,13 +20061,13 @@ class MergeReuseReasonKind UNCHANGED_AFTER_MERGE = 4 MATCHES_LEFT = 5 MATCHES_RIGHT = 6 - + end - - - + + + class MergeTraceEventKind FAST_PATH = 1 @@ -19594,47 +20078,47 @@ class MergeTraceEventKind FALLBACK = 6 DIFF_TRAVERSAL = 7 BATCH_MERGE = 8 - + end - - - + + + class MergeTraceResolutionKind VALUE = 1 DELETE = 2 UNRESOLVED = 3 - + end - - - + + + class MergeTraceStageKind STRUCTURAL = 1 BATCH = 2 - + end - - - + + + class MutationKind UPSERT = 1 DELETE = 2 - + end - - - + + + class NamedRootRetentionKind ALL = 1 @@ -19642,146 +20126,149 @@ class NamedRootRetentionKind PREFIX = 3 NEWEST_BY_NAME = 4 UPDATED_SINCE = 5 - + end - - - - + + + + class ResolutionKind VALUE = 1 DELETE = 2 UNRESOLVED = 3 - + end - - - + + + class SnapshotNamespaceKind BRANCH = 1 TAG = 2 CHECKPOINT = 3 CUSTOM = 4 - + end - - - + + + class StructuralDiffMarkerKind COMPARE = 1 ADDED = 2 REMOVED = 3 - + end - - - + + + class TreeDebugNodeStatusKind SHARED = 1 LEFT_ONLY = 2 RIGHT_ONLY = 3 - + end - - - + + + class ValueRefKind INLINE = 1 BLOB = 2 - + end - - - + + + class IndexProjectionRecord KEYS_ONLY = 1 INCLUDE = 2 ALL = 3 - + end - - - + + + class IndexedUpdateKind APPLIED = 1 UNCHANGED = 2 CONFLICT = 3 - + end - - - + + + class AdaptiveQualityRecord FAST = 1 BALANCED = 2 HIGH_RECALL = 3 - + end - - - + + + class CatalogAcceleratorKindRecord HNSW = 1 PRODUCT_QUANTIZED = 2 COMPOSITE = 3 - + TURBO_QUANTIZED = 4 + end - - - + + + class CompositeBaseKindRecord HNSW = 1 PRODUCT_QUANTIZED = 2 - + TURBO_QUANTIZED = 3 + end - - - + + + class CompositeBuildOrRebuildKindRecord COMPOSITE = 1 NO_ACCELERATOR_REQUIRED = 2 HNSW_REBUILT = 3 PRODUCT_QUANTIZED_REBUILT = 4 - + TURBO_QUANTIZED_REBUILT = 5 + end - - - + + + class ContentObjectKindRecord ORDERED_NODE = 1 @@ -19796,84 +20283,85 @@ class ContentObjectKindRecord HNSW_PAGE = 10 COMPOSITE_ACCELERATOR = 11 ACCELERATOR_CATALOG = 12 - + TURBO_QUANTIZATION = 13 + end - - - + + + class DistanceMetricRecord L2_SQUARED = 1 COSINE = 2 INNER_PRODUCT = 3 - + end - - - + + + class FullRebuildReasonKindRecord DELTA_RECORDS = 1 SHADOW_RECORDS = 2 DELTA_RATIO = 3 SHADOW_RATIO = 4 - + end - - - + + + class HnswRoutingVectorEncodingRecord FULL_F32 = 1 - + end - - - + + + class ProximityFilterKind ALL = 1 KEY_RANGE = 2 PREFIX = 3 ELIGIBLE_KEYS = 4 - + end - - - + + + class ProximitySearchClaimKindRecord EXACT_L2_OPTIMAL = 1 HONEST_EXECUTION = 2 - + end - - - + + + class QueryKernelRecord SCALAR_DETERMINISTIC = 1 SIMD_DETERMINISTIC = 2 AUTO_DETERMINISTIC = 3 - + end - - - + + + class SearchBackendRecord NATIVE = 1 @@ -19881,13 +20369,14 @@ class SearchBackendRecord HNSW = 3 COMPOSITE = 4 AUTO = 5 - + TURBO_QUANTIZED = 6 + end - - - + + + class SearchCompletionRecord EXACT = 1 @@ -19895,35 +20384,35 @@ class SearchCompletionRecord BUDGET_EXHAUSTED = 3 CANCELLED = 4 DEADLINE_EXCEEDED = 5 - + end - - - + + + class SearchPolicyKind EXACT = 1 FIXED_BUDGET = 2 ADAPTIVE = 3 - + end - - - + + + class MapUpdateKind APPLIED = 1 UNCHANGED = 2 CONFLICT = 3 - + end - + # Record type AuthenticatedProofBundleVerificationRecord class AuthenticatedProofBundleVerificationRecord attr_reader :valid, :envelope, :proof, :proof_error @@ -19952,7 +20441,7 @@ def ==(other) true end end - + # Record type AuthenticatedProofEnvelopeRecord class AuthenticatedProofEnvelopeRecord attr_reader :algorithm, :key_id, :proof_bundle, :context, :issued_at_millis, :expires_at_millis, :nonce, :signature @@ -19997,7 +20486,7 @@ def ==(other) true end end - + # Record type AuthenticatedProofEnvelopeVerificationRecord class AuthenticatedProofEnvelopeVerificationRecord attr_reader :valid, :signature_valid, :time_valid, :not_yet_valid, :expired, :algorithm, :key_id, :proof_bundle, :context, :issued_at_millis, :expires_at_millis, :nonce @@ -20058,7 +20547,7 @@ def ==(other) true end end - + # Record type BatchApplyResultRecord class BatchApplyResultRecord attr_reader :tree, :stats @@ -20079,7 +20568,7 @@ def ==(other) true end end - + # Record type BatchApplyStatsRecord class BatchApplyStatsRecord attr_reader :input_mutations, :effective_mutations, :preprocess_input_sorted, :entries_streamed, :nodes_read, :written_nodes, :nodes_reused, :bytes_read, :written_bytes, :resync_distance_entries, :resync_distance_nodes, :used_key_stable_fast_path, :used_batched_value_update_path, :parallel_width, :parallel_tasks, :structural_islands, :coalesced_islands @@ -20160,7 +20649,7 @@ def ==(other) true end end - + # Record type BlobGcPlanRecord class BlobGcPlanRecord attr_reader :reachability, :candidate_blobs, :reclaimable_blobs, :reclaimable_blob_count, :reclaimable_blob_bytes, :missing_candidates @@ -20197,7 +20686,7 @@ def ==(other) true end end - + # Record type BlobGcReachabilityRecord class BlobGcReachabilityRecord attr_reader :live_blobs, :live_blob_count, :live_blob_bytes, :scanned_nodes, :scanned_values @@ -20230,7 +20719,7 @@ def ==(other) true end end - + # Record type BlobGcSweepRecord class BlobGcSweepRecord attr_reader :plan, :deleted_blobs, :deleted_blob_bytes @@ -20255,7 +20744,7 @@ def ==(other) true end end - + # Record type BlobRefRecord class BlobRefRecord attr_reader :cid, :len @@ -20276,7 +20765,7 @@ def ==(other) true end end - + # Record type CacheStatsRecord class CacheStatsRecord attr_reader :cached_nodes, :cached_bytes, :pinned_nodes, :pinned_bytes @@ -20305,7 +20794,7 @@ def ==(other) true end end - + # Record type ChangedSpanHintRecord class ChangedSpanHintRecord attr_reader :base_root, :changed_root, :spans @@ -20330,7 +20819,7 @@ def ==(other) true end end - + # Record type ChangedSpanRecord class ChangedSpanRecord attr_reader :start, :_end @@ -20351,7 +20840,7 @@ def ==(other) true end end - + # Record type ConfigRecord class ConfigRecord attr_reader :min_chunk_size, :max_chunk_size, :chunking_factor, :hash_seed, :encoding, :node_cache_max_nodes, :node_cache_max_bytes, :format_bytes @@ -20396,7 +20885,7 @@ def ==(other) true end end - + # Record type ConflictPageRecord class ConflictPageRecord attr_reader :conflicts, :next_cursor @@ -20417,7 +20906,7 @@ def ==(other) true end end - + # Record type ConflictRecord class ConflictRecord attr_reader :key, :base, :left, :right @@ -20446,7 +20935,7 @@ def ==(other) true end end - + # Record type CrdtConfigRecord class CrdtConfigRecord attr_reader :strategy, :delete_policy @@ -20467,7 +20956,7 @@ def ==(other) true end end - + # Record type CrdtResolutionRecord class CrdtResolutionRecord attr_reader :kind, :value @@ -20488,7 +20977,7 @@ def ==(other) true end end - + # Record type CursorWindowRecord class CursorWindowRecord attr_reader :position_key, :position_value, :found, :entries, :next_cursor @@ -20521,7 +21010,7 @@ def ==(other) true end end - + # Record type DiffPageProofRecord class DiffPageProofRecord attr_reader :base, :other, :lookahead_base, :lookahead_other, :requested_end, :limit @@ -20558,7 +21047,7 @@ def ==(other) true end end - + # Record type DiffPageProofVerificationRecord class DiffPageProofVerificationRecord attr_reader :valid, :base_valid, :other_valid, :lookahead_valid, :base_root, :other_root, :after, :requested_end, :proof_end, :limit, :diffs, :next_cursor @@ -20619,7 +21108,7 @@ def ==(other) true end end - + # Record type DiffPageRecord class DiffPageRecord attr_reader :diffs, :next_cursor @@ -20640,7 +21129,7 @@ def ==(other) true end end - + # Record type DiffRecord class DiffRecord attr_reader :kind, :key, :value, :old_value, :new_value @@ -20673,7 +21162,7 @@ def ==(other) true end end - + # Record type DiffTraversalStatsRecord class DiffTraversalStatsRecord attr_reader :compared_nodes, :reused_subtrees, :added_subtrees, :removed_subtrees, :collected_fallbacks, :emitted_diffs @@ -20710,7 +21199,7 @@ def ==(other) true end end - + # Record type EncodingRecord class EncodingRecord attr_reader :kind, :custom_name @@ -20731,7 +21220,7 @@ def ==(other) true end end - + # Record type EntryRecord class EntryRecord attr_reader :key, :value @@ -20752,7 +21241,7 @@ def ==(other) true end end - + # Record type GcPlanRecord class GcPlanRecord attr_reader :reachability, :candidate_nodes, :reclaimable_cids, :reclaimable_nodes, :reclaimable_bytes, :missing_candidates @@ -20789,7 +21278,7 @@ def ==(other) true end end - + # Record type GcReachabilityRecord class GcReachabilityRecord attr_reader :live_cids, :live_nodes, :live_bytes, :leaf_nodes, :internal_nodes @@ -20822,7 +21311,7 @@ def ==(other) true end end - + # Record type GcSweepRecord class GcSweepRecord attr_reader :plan, :deleted_nodes, :deleted_bytes @@ -20847,7 +21336,7 @@ def ==(other) true end end - + # Record type HostStoreBatchGetResultRecord class HostStoreBatchGetResultRecord attr_reader :values, :error @@ -20868,7 +21357,7 @@ def ==(other) true end end - + # Record type HostStoreBoolResultRecord class HostStoreBoolResultRecord attr_reader :value, :error @@ -20889,7 +21378,7 @@ def ==(other) true end end - + # Record type HostStoreBytesResultRecord class HostStoreBytesResultRecord attr_reader :value, :error @@ -20910,7 +21399,7 @@ def ==(other) true end end - + # Record type HostStoreListBytesResultRecord class HostStoreListBytesResultRecord attr_reader :values, :error @@ -20931,7 +21420,7 @@ def ==(other) true end end - + # Record type HostStoreListRootsResultRecord class HostStoreListRootsResultRecord attr_reader :values, :error @@ -20952,7 +21441,7 @@ def ==(other) true end end - + # Record type HostStoreNamedRootManifestRecord class HostStoreNamedRootManifestRecord attr_reader :name, :manifest @@ -20973,7 +21462,7 @@ def ==(other) true end end - + # Record type HostStoreRootCasResultRecord class HostStoreRootCasResultRecord attr_reader :applied, :current, :error @@ -20998,7 +21487,7 @@ def ==(other) true end end - + # Record type HostStoreRootResultRecord class HostStoreRootResultRecord attr_reader :value, :error @@ -21019,7 +21508,7 @@ def ==(other) true end end - + # Record type HostStoreUnitResultRecord class HostStoreUnitResultRecord attr_reader :error @@ -21036,7 +21525,7 @@ def ==(other) true end end - + # Record type JsonDocumentRecord class JsonDocumentRecord attr_reader :json @@ -21053,7 +21542,7 @@ def ==(other) true end end - + # Record type KeyProofRecord class KeyProofRecord attr_reader :root, :key, :path @@ -21078,7 +21567,7 @@ def ==(other) true end end - + # Record type KeyProofVerificationRecord class KeyProofVerificationRecord attr_reader :valid, :exists, :absence, :root, :key, :value @@ -21115,7 +21604,7 @@ def ==(other) true end end - + # Record type LargeValueConfigRecord class LargeValueConfigRecord attr_reader :inline_threshold @@ -21132,7 +21621,7 @@ def ==(other) true end end - + # Record type MergeExplanationRecord class MergeExplanationRecord attr_reader :result, :error, :trace_json, :trace @@ -21161,7 +21650,7 @@ def ==(other) true end end - + # Record type MergeTraceEventRecord class MergeTraceEventRecord attr_reader :kind, :fast_path, :cid, :reuse_reason, :level, :entries, :first_key, :last_key, :stage, :key, :resolution, :fallback_reason, :diff_stats, :right_changes, :mutations, :append_only @@ -21238,7 +21727,7 @@ def ==(other) true end end - + # Record type MergeTraceRecord class MergeTraceRecord attr_reader :events @@ -21255,7 +21744,7 @@ def ==(other) true end end - + # Record type MetricsRecord class MetricsRecord attr_reader :node_cache_hits, :node_cache_misses, :node_cache_evictions, :nodes_read, :bytes_read, :nodes_written, :bytes_written, :store_get_calls, :store_batch_get_calls, :store_batch_get_keys, :store_put_calls, :store_batch_put_calls, :store_batch_put_nodes @@ -21320,7 +21809,7 @@ def ==(other) true end end - + # Record type MissingNodeCopyRecord class MissingNodeCopyRecord attr_reader :plan, :copied_nodes, :copied_bytes @@ -21345,7 +21834,7 @@ def ==(other) true end end - + # Record type MissingNodePlanRecord class MissingNodePlanRecord attr_reader :required_cids, :required_nodes, :required_bytes, :missing_cids, :missing_nodes, :missing_bytes @@ -21382,7 +21871,7 @@ def ==(other) true end end - + # Record type MultiKeyProofRecord class MultiKeyProofRecord attr_reader :root, :keys, :path @@ -21407,7 +21896,7 @@ def ==(other) true end end - + # Record type MultiKeyProofVerificationRecord class MultiKeyProofVerificationRecord attr_reader :valid, :root, :results @@ -21432,7 +21921,7 @@ def ==(other) true end end - + # Record type MutationRecord class MutationRecord attr_reader :kind, :key, :value @@ -21457,7 +21946,7 @@ def ==(other) true end end - + # Record type NamedRootManifestRecord class NamedRootManifestRecord attr_reader :name, :manifest @@ -21478,7 +21967,7 @@ def ==(other) true end end - + # Record type NamedRootRecord class NamedRootRecord attr_reader :name, :tree @@ -21499,7 +21988,7 @@ def ==(other) true end end - + # Record type NamedRootRetentionRecord class NamedRootRetentionRecord attr_reader :kind, :names, :prefix, :count, :min_updated_at_millis @@ -21532,7 +22021,7 @@ def ==(other) true end end - + # Record type NamedRootSelectionRecord class NamedRootSelectionRecord attr_reader :roots, :missing_names @@ -21553,7 +22042,7 @@ def ==(other) true end end - + # Record type NamedRootUpdateRecord class NamedRootUpdateRecord attr_reader :applied, :conflict, :current @@ -21578,7 +22067,7 @@ def ==(other) true end end - + # Record type NodeRecord class NodeRecord attr_reader :keys, :vals, :child_counts, :leaf, :level, :min_chunk_size, :max_chunk_size, :chunking_factor, :hash_seed, :encoding, :format_bytes @@ -21635,7 +22124,7 @@ def ==(other) true end end - + # Record type ParallelConfigRecord class ParallelConfigRecord attr_reader :max_threads, :parallelism_threshold @@ -21656,7 +22145,7 @@ def ==(other) true end end - + # Record type ProofBundleSummaryRecord class ProofBundleSummaryRecord attr_reader :version, :kind, :root, :other_root, :key_count, :path_node_count, :start, :_end, :after, :requested_end, :limit, :has_lookahead @@ -21717,7 +22206,7 @@ def ==(other) true end end - + # Record type ProofBundleVerificationRecord class ProofBundleVerificationRecord attr_reader :summary, :valid, :exists_count, :absence_count, :entry_count, :diff_count, :next_cursor @@ -21758,7 +22247,7 @@ def ==(other) true end end - + # Record type ProvedDiffPageRecord class ProvedDiffPageRecord attr_reader :page, :proof @@ -21779,7 +22268,7 @@ def ==(other) true end end - + # Record type ProvedRangePageRecord class ProvedRangePageRecord attr_reader :page, :proof @@ -21800,7 +22289,7 @@ def ==(other) true end end - + # Record type RangeBoundsRecord class RangeBoundsRecord attr_reader :start, :_end @@ -21821,7 +22310,7 @@ def ==(other) true end end - + # Record type RangeCursorRecord class RangeCursorRecord attr_reader :after_key @@ -21838,7 +22327,7 @@ def ==(other) true end end - + # Record type RangePageProofRecord class RangePageProofRecord attr_reader :root, :after, :_end, :path @@ -21867,7 +22356,7 @@ def ==(other) true end end - + # Record type RangePageProofVerificationRecord class RangePageProofVerificationRecord attr_reader :valid, :root, :after, :_end, :entries @@ -21900,7 +22389,7 @@ def ==(other) true end end - + # Record type RangePageRecord class RangePageRecord attr_reader :entries, :next_cursor @@ -21921,7 +22410,7 @@ def ==(other) true end end - + # Record type RangeProofRecord class RangeProofRecord attr_reader :root, :start, :_end, :path @@ -21950,7 +22439,7 @@ def ==(other) true end end - + # Record type RangeProofVerificationRecord class RangeProofVerificationRecord attr_reader :valid, :root, :start, :_end, :entries @@ -21983,7 +22472,7 @@ def ==(other) true end end - + # Record type ResolutionRecord class ResolutionRecord attr_reader :kind, :value @@ -22004,7 +22493,7 @@ def ==(other) true end end - + # Record type ReverseCursorRecord class ReverseCursorRecord attr_reader :before_key @@ -22021,7 +22510,7 @@ def ==(other) true end end - + # Record type ReversePageRecord class ReversePageRecord attr_reader :entries, :next_cursor @@ -22042,7 +22531,7 @@ def ==(other) true end end - + # Record type RootManifestRecord class RootManifestRecord attr_reader :tree, :created_at_millis, :updated_at_millis @@ -22067,7 +22556,7 @@ def ==(other) true end end - + # Record type ScanOutcomeRecord class ScanOutcomeRecord attr_reader :visited, :stopped @@ -22088,7 +22577,7 @@ def ==(other) true end end - + # Record type SnapshotBundleNodeRecord class SnapshotBundleNodeRecord attr_reader :cid, :bytes @@ -22109,7 +22598,7 @@ def ==(other) true end end - + # Record type SnapshotBundleRecord class SnapshotBundleRecord attr_reader :format_version, :tree, :nodes @@ -22134,7 +22623,7 @@ def ==(other) true end end - + # Record type SnapshotBundleSummaryRecord class SnapshotBundleSummaryRecord attr_reader :format_version, :root, :node_count, :byte_count, :min_node_bytes, :max_node_bytes @@ -22171,7 +22660,7 @@ def ==(other) true end end - + # Record type SnapshotBundleVerificationRecord class SnapshotBundleVerificationRecord attr_reader :valid, :summary, :reachable_nodes, :reachable_bytes, :missing_cids, :extra_cids @@ -22208,7 +22697,7 @@ def ==(other) true end end - + # Record type SnapshotNamespaceRecord class SnapshotNamespaceRecord attr_reader :kind, :custom_prefix @@ -22229,7 +22718,7 @@ def ==(other) true end end - + # Record type SnapshotRecord class SnapshotRecord attr_reader :id, :name, :tree, :created_at_millis, :updated_at_millis @@ -22262,7 +22751,7 @@ def ==(other) true end end - + # Record type SnapshotSelectionRecord class SnapshotSelectionRecord attr_reader :snapshots, :missing_ids @@ -22283,7 +22772,7 @@ def ==(other) true end end - + # Record type StatsComparisonRecord class StatsComparisonRecord attr_reader :before, :after, :absolute, :percentage @@ -22312,7 +22801,7 @@ def ==(other) true end end - + # Record type StatsDiffRecord class StatsDiffRecord attr_reader :num_nodes_diff, :num_leaves_diff, :num_internal_nodes_diff, :tree_height_diff, :total_key_value_pairs_diff, :total_tree_size_bytes_diff, :avg_node_size_bytes_diff, :min_node_size_bytes_diff, :max_node_size_bytes_diff, :avg_entries_per_node_diff, :avg_fanout_diff, :min_fanout_diff, :max_fanout_diff, :avg_fill_factor_diff, :avg_leaf_fill_factor_diff, :avg_internal_fill_factor_diff, :avg_key_size_bytes_diff, :avg_value_size_bytes_diff, :min_key_size_bytes_diff, :max_key_size_bytes_diff, :min_value_size_bytes_diff, :max_value_size_bytes_diff, :total_keys_size_bytes_diff, :total_values_size_bytes_diff @@ -22421,7 +22910,7 @@ def ==(other) true end end - + # Record type StatsPercentageChangeRecord class StatsPercentageChangeRecord attr_reader :num_nodes_pct, :num_leaves_pct, :num_internal_nodes_pct, :tree_height_pct, :total_key_value_pairs_pct, :total_tree_size_bytes_pct, :avg_node_size_bytes_pct, :min_node_size_bytes_pct, :max_node_size_bytes_pct, :avg_entries_per_node_pct, :avg_fanout_pct, :min_fanout_pct, :max_fanout_pct, :avg_fill_factor_pct, :avg_leaf_fill_factor_pct, :avg_internal_fill_factor_pct, :avg_key_size_bytes_pct, :avg_value_size_bytes_pct, :min_key_size_bytes_pct, :max_key_size_bytes_pct, :min_value_size_bytes_pct, :max_value_size_bytes_pct, :total_keys_size_bytes_pct, :total_values_size_bytes_pct @@ -22530,7 +23019,7 @@ def ==(other) true end end - + # Record type StructuralDiffCursorRecord class StructuralDiffCursorRecord attr_reader :base_root, :other_root, :markers, :pending @@ -22559,7 +23048,7 @@ def ==(other) true end end - + # Record type StructuralDiffMarkerRecord class StructuralDiffMarkerRecord attr_reader :kind, :base_cid, :other_cid, :span_end, :cid @@ -22592,7 +23081,7 @@ def ==(other) true end end - + # Record type StructuralDiffPageRecord class StructuralDiffPageRecord attr_reader :diffs, :next_cursor_json, :stats, :next_cursor @@ -22621,7 +23110,7 @@ def ==(other) true end end - + # Record type TimestampedValueRecord class TimestampedValueRecord attr_reader :value, :timestamp @@ -22642,7 +23131,7 @@ def ==(other) true end end - + # Record type TombstoneMetadataRecord class TombstoneMetadataRecord attr_reader :key, :value @@ -22663,7 +23152,7 @@ def ==(other) true end end - + # Record type TombstoneRecord class TombstoneRecord attr_reader :actor, :timestamp_millis, :causal_metadata @@ -22688,7 +23177,7 @@ def ==(other) true end end - + # Record type TransactionConflictRecord class TransactionConflictRecord attr_reader :name, :expected, :current @@ -22713,7 +23202,7 @@ def ==(other) true end end - + # Record type TransactionUpdateRecord class TransactionUpdateRecord attr_reader :applied, :conflict, :nodes_written, :roots_written, :conflict_detail @@ -22746,7 +23235,7 @@ def ==(other) true end end - + # Record type TreeDebugComparedNodeRecord class TreeDebugComparedNodeRecord attr_reader :status, :node @@ -22767,7 +23256,7 @@ def ==(other) true end end - + # Record type TreeDebugComparisonLevelRecord class TreeDebugComparisonLevelRecord attr_reader :level, :shared_nodes, :left_only_nodes, :right_only_nodes, :shared_bytes, :left_only_bytes, :right_only_bytes, :nodes @@ -22812,7 +23301,7 @@ def ==(other) true end end - + # Record type TreeDebugComparisonRecord class TreeDebugComparisonRecord attr_reader :shared_nodes, :left_only_nodes, :right_only_nodes, :shared_bytes, :left_only_bytes, :right_only_bytes, :levels @@ -22853,7 +23342,7 @@ def ==(other) true end end - + # Record type TreeDebugLevelRecord class TreeDebugLevelRecord attr_reader :level, :nodes @@ -22874,7 +23363,7 @@ def ==(other) true end end - + # Record type TreeDebugNodeRecord class TreeDebugNodeRecord attr_reader :cid, :leaf, :level, :entry_count, :max_entries, :fill_factor, :encoded_bytes, :first_key, :last_key @@ -22923,7 +23412,7 @@ def ==(other) true end end - + # Record type TreeDebugViewRecord class TreeDebugViewRecord attr_reader :levels @@ -22940,7 +23429,7 @@ def ==(other) true end end - + # Record type TreeRecord class TreeRecord attr_reader :root, :config @@ -22961,7 +23450,7 @@ def ==(other) true end end - + # Record type TreeStatsLevelF64Record class TreeStatsLevelF64Record attr_reader :level, :value @@ -22982,7 +23471,7 @@ def ==(other) true end end - + # Record type TreeStatsLevelU64Record class TreeStatsLevelU64Record attr_reader :level, :value @@ -23003,7 +23492,7 @@ def ==(other) true end end - + # Record type TreeStatsRecord class TreeStatsRecord attr_reader :num_nodes, :num_leaves, :num_internal_nodes, :tree_height, :total_key_value_pairs, :total_tree_size_bytes, :avg_node_size_bytes, :min_node_size_bytes, :max_node_size_bytes, :avg_entries_per_node, :nodes_per_level, :avg_node_size_per_level, :avg_entries_per_level, :min_entries_per_level, :max_entries_per_level, :avg_fanout, :min_fanout, :max_fanout, :avg_fill_factor, :avg_leaf_fill_factor, :avg_internal_fill_factor, :avg_key_size_bytes, :avg_value_size_bytes, :min_key_size_bytes, :max_key_size_bytes, :min_value_size_bytes, :max_value_size_bytes, :total_keys_size_bytes, :total_values_size_bytes @@ -23132,7 +23621,7 @@ def ==(other) true end end - + # Record type ValueRefRecord class ValueRefRecord attr_reader :kind, :value, :blob @@ -23157,7 +23646,7 @@ def ==(other) true end end - + # Record type VersionedValueRecord class VersionedValueRecord attr_reader :schema, :version, :encoding, :payload @@ -23186,7 +23675,7 @@ def ==(other) true end end - + # Record type WriteResultRecord class WriteResultRecord attr_reader :tree, :stats @@ -23207,7 +23696,7 @@ def ==(other) true end end - + # Record type WriteStatsRecord class WriteStatsRecord attr_reader :input_mutations, :effective_mutations, :entries_streamed, :nodes_read, :nodes_written, :nodes_reused, :bytes_read, :bytes_written, :resync_distance_entries, :resync_distance_nodes, :used_key_stable_fast_path, :used_batched_value_update_path, :parallel_width, :parallel_tasks, :structural_islands, :coalesced_islands @@ -23284,7 +23773,7 @@ def ==(other) true end end - + # Record type BytesListResultRecord class BytesListResultRecord attr_reader :values, :error @@ -23305,7 +23794,7 @@ def ==(other) true end end - + # Record type NamedBytesListResultRecord class NamedBytesListResultRecord attr_reader :values, :error @@ -23326,7 +23815,7 @@ def ==(other) true end end - + # Record type NamedBytesRecord class NamedBytesRecord attr_reader :name, :value @@ -23347,7 +23836,7 @@ def ==(other) true end end - + # Record type NodeMutationRecord class NodeMutationRecord attr_reader :key, :value @@ -23368,7 +23857,7 @@ def ==(other) true end end - + # Record type OptionalBytesListResultRecord class OptionalBytesListResultRecord attr_reader :values, :error @@ -23389,7 +23878,7 @@ def ==(other) true end end - + # Record type OptionalBytesRecord class OptionalBytesRecord attr_reader :present, :value @@ -23410,7 +23899,7 @@ def ==(other) true end end - + # Record type OptionalBytesResultRecord class OptionalBytesResultRecord attr_reader :value, :error @@ -23431,7 +23920,7 @@ def ==(other) true end end - + # Record type RootCasResultRecord class RootCasResultRecord attr_reader :applied, :current, :error @@ -23456,7 +23945,7 @@ def ==(other) true end end - + # Record type RootConditionRecord class RootConditionRecord attr_reader :name, :expected @@ -23477,7 +23966,7 @@ def ==(other) true end end - + # Record type RootWriteRecord class RootWriteRecord attr_reader :name, :replacement @@ -23498,7 +23987,7 @@ def ==(other) true end end - + # Record type StoreCapabilitiesRecord class StoreCapabilitiesRecord attr_reader :native_batch_reads, :atomic_batch_writes, :node_scan, :hints, :atomic_nodes_and_hint, :root_scan, :root_compare_and_swap, :transactions, :read_parallelism @@ -23547,7 +24036,7 @@ def ==(other) true end end - + # Record type StoreDescriptorRecord class StoreDescriptorRecord attr_reader :protocol_major, :adapter_name, :provider, :schema_version, :capabilities, :limits @@ -23584,7 +24073,7 @@ def ==(other) true end end - + # Record type StoreDescriptorResultRecord class StoreDescriptorResultRecord attr_reader :value, :error @@ -23605,7 +24094,7 @@ def ==(other) true end end - + # Record type StoreErrorRecord class StoreErrorRecord attr_reader :code, :message, :retryable, :provider_code @@ -23634,7 +24123,7 @@ def ==(other) true end end - + # Record type StoreLimitsRecord class StoreLimitsRecord attr_reader :max_batch_read_items, :max_batch_write_items, :max_transaction_operations, :max_node_bytes @@ -23663,7 +24152,7 @@ def ==(other) true end end - + # Record type StoreTransactionConflictRecord class StoreTransactionConflictRecord attr_reader :name, :expected, :current @@ -23688,7 +24177,7 @@ def ==(other) true end end - + # Record type TransactionResultRecord class TransactionResultRecord attr_reader :applied, :conflict, :error @@ -23713,7 +24202,7 @@ def ==(other) true end end - + # Record type UnitResultRecord class UnitResultRecord attr_reader :error @@ -23730,7 +24219,7 @@ def ==(other) true end end - + # Record type ActiveIndexHealthRecord class ActiveIndexHealthRecord attr_reader :name, :generation, :fingerprint, :projection, :index_version @@ -23763,7 +24252,7 @@ def ==(other) true end end - + # Record type IndexBuildResultRecord class IndexBuildResultRecord attr_reader :source_version, :index_version, :state_version, :generation, :entries, :attempts, :activated @@ -23804,7 +24293,7 @@ def ==(other) true end end - + # Record type IndexEntryRecord class IndexEntryRecord attr_reader :term, :projection @@ -23825,7 +24314,7 @@ def ==(other) true end end - + # Record type IndexMatchRecord class IndexMatchRecord attr_reader :term, :primary_key, :projection @@ -23850,7 +24339,7 @@ def ==(other) true end end - + # Record type IndexPageRecord class IndexPageRecord attr_reader :matches, :next_cursor @@ -23871,7 +24360,7 @@ def ==(other) true end end - + # Record type IndexVerificationRecord class IndexVerificationRecord attr_reader :name, :source_version, :expected_index_version, :actual_index_version, :expected_entries, :actual_entries, :semantic_differences, :valid, :canonical @@ -23920,7 +24409,7 @@ def ==(other) true end end - + # Record type IndexedMapHealthRecord class IndexedMapHealthRecord attr_reader :source_map_id, :source_version, :state_version, :active_indexes, :closure_valid, :retained_snapshots, :durable_pins @@ -23961,7 +24450,7 @@ def ==(other) true end end - + # Record type IndexedMapMetricsRecord class IndexedMapMetricsRecord attr_reader :normalized_source_mutations, :records_extracted, :terms_emitted, :projected_bytes, :physical_upserts, :physical_deletes, :unchanged_emissions_skipped, :retries, :build_attempts, :verification_outcomes, :retained_roots @@ -24018,7 +24507,7 @@ def ==(other) true end end - + # Record type IndexedRetentionRecord class IndexedRetentionRecord attr_reader :retained_source_versions, :removed_source_versions, :retained_index_versions, :removed_index_versions, :removed_state_versions, :removed_snapshot_records, :removed_named_roots @@ -24059,7 +24548,7 @@ def ==(other) true end end - + # Record type IndexedSnapshotIdRecord class IndexedSnapshotIdRecord attr_reader :snapshot @@ -24076,7 +24565,7 @@ def ==(other) true end end - + # Record type IndexedSourceRecord class IndexedSourceRecord attr_reader :term, :primary_key, :projection, :source_value @@ -24105,7 +24594,7 @@ def ==(other) true end end - + # Record type IndexedUpdateRecord class IndexedUpdateRecord attr_reader :kind, :previous_source_version, :current @@ -24130,7 +24619,7 @@ def ==(other) true end end - + # Record type IndexedVersionRecord class IndexedVersionRecord attr_reader :source_version, :state_version, :index_count @@ -24155,7 +24644,7 @@ def ==(other) true end end - + # Record type SecondaryIndexLimitsRecord class SecondaryIndexLimitsRecord attr_reader :max_term_bytes, :max_projection_bytes, :max_all_value_bytes, :max_terms_per_record, :max_projected_bytes_per_record, :max_derived_mutations_per_write, :max_projected_bytes_per_write, :max_indexes, :build_page_size, :max_temporary_sort_bytes, :max_bundle_nodes, :max_bundle_bytes, :max_verification_entries, :max_write_retries, :max_build_retries @@ -24228,7 +24717,7 @@ def ==(other) true end end - + # Record type AcceleratorCatalogEntryRecord class AcceleratorCatalogEntryRecord attr_reader :kind, :configuration_fingerprint, :manifest @@ -24253,7 +24742,7 @@ def ==(other) true end end - + # Record type CompositeAcceleratorConfigRecord class CompositeAcceleratorConfigRecord attr_reader :max_delta_records, :max_shadow_records, :max_delta_ratio_ppm, :max_shadow_ratio_ppm, :base_overfetch_multiplier @@ -24286,7 +24775,7 @@ def ==(other) true end end - + # Record type CompositeBuildLimitsRecord class CompositeBuildLimitsRecord attr_reader :max_diff_entries, :max_owned_bytes, :max_encoded_output_bytes, :max_distance_evaluations @@ -24315,20 +24804,22 @@ def ==(other) true end end - + # Record type CompositeBuildOrRebuildOutcomeRecord class CompositeBuildOrRebuildOutcomeRecord - attr_reader :kind, :composite, :hnsw, :pq, :reasons, :composite_stats, :hnsw_stats, :pq_stats + attr_reader :kind, :composite, :hnsw, :pq, :turboquant, :reasons, :composite_stats, :hnsw_stats, :pq_stats, :turboquant_stats - def initialize(kind:, composite:, hnsw:, pq:, reasons:, composite_stats:, hnsw_stats:, pq_stats:) + def initialize(kind:, composite:, hnsw:, pq:, turboquant:, reasons:, composite_stats:, hnsw_stats:, pq_stats:, turboquant_stats:) @kind = kind @composite = composite @hnsw = hnsw @pq = pq + @turboquant = turboquant @reasons = reasons @composite_stats = composite_stats @hnsw_stats = hnsw_stats @pq_stats = pq_stats + @turboquant_stats = turboquant_stats end def ==(other) @@ -24344,6 +24835,9 @@ def ==(other) if @pq != other.pq return false end + if @turboquant != other.turboquant + return false + end if @reasons != other.reasons return false end @@ -24356,11 +24850,14 @@ def ==(other) if @pq_stats != other.pq_stats return false end + if @turboquant_stats != other.turboquant_stats + return false + end true end end - + # Record type CompositeBuildOutcomeRecord class CompositeBuildOutcomeRecord attr_reader :accelerator, :reasons, :stats @@ -24385,7 +24882,7 @@ def ==(other) true end end - + # Record type CompositeBuildStatsRecord class CompositeBuildStatsRecord attr_reader :diff_entries, :inserted_records, :vector_updated_records, :value_only_records, :deleted_records, :delta_records, :shadow_records, :owned_bytes_peak, :encoded_output_bytes, :distance_evaluations @@ -24438,15 +24935,17 @@ def ==(other) true end end - + # Record type CompositeRebuildOptionsRecord class CompositeRebuildOptionsRecord - attr_reader :hnsw_limits, :pq_worker_threads, :pq_limits + attr_reader :hnsw_limits, :pq_worker_threads, :pq_limits, :turboquant_worker_threads, :turboquant_limits - def initialize(hnsw_limits:, pq_worker_threads:, pq_limits:) + def initialize(hnsw_limits:, pq_worker_threads:, pq_limits:, turboquant_worker_threads:, turboquant_limits:) @hnsw_limits = hnsw_limits @pq_worker_threads = pq_worker_threads @pq_limits = pq_limits + @turboquant_worker_threads = turboquant_worker_threads + @turboquant_limits = turboquant_limits end def ==(other) @@ -24459,11 +24958,17 @@ def ==(other) if @pq_limits != other.pq_limits return false end + if @turboquant_worker_threads != other.turboquant_worker_threads + return false + end + if @turboquant_limits != other.turboquant_limits + return false + end true end end - + # Record type ContentGraphLimitsRecord class ContentGraphLimitsRecord attr_reader :max_objects, :max_depth, :max_bytes, :max_references_per_object @@ -24492,7 +24997,7 @@ def ==(other) true end end - + # Record type ExactProximityRecordRecord class ExactProximityRecordRecord attr_reader :vector, :value @@ -24513,7 +25018,7 @@ def ==(other) true end end - + # Record type FullRebuildReasonRecord class FullRebuildReasonRecord attr_reader :kind, :actual, :maximum @@ -24538,7 +25043,7 @@ def ==(other) true end end - + # Record type HnswBuildLimitsRecord class HnswBuildLimitsRecord attr_reader :max_records, :max_owned_bytes, :max_distance_evaluations, :worker_threads, :max_encoded_graph_bytes @@ -24571,7 +25076,7 @@ def ==(other) true end end - + # Record type HnswBuildResultRecord class HnswBuildResultRecord attr_reader :index, :stats @@ -24592,7 +25097,7 @@ def ==(other) true end end - + # Record type HnswBuildStatsRecord class HnswBuildStatsRecord attr_reader :records, :distance_evaluations, :directed_edges, :maximum_level, :owned_bytes, :encoded_graph_bytes @@ -24629,7 +25134,7 @@ def ==(other) true end end - + # Record type HnswConfigRecord class HnswConfigRecord attr_reader :max_connections, :ef_construction, :ef_search, :level_bits, :overfetch_multiplier, :seed, :routing_vector_encoding @@ -24670,7 +25175,7 @@ def ==(other) true end end - + # Record type ProductQuantizationBuildLimitsRecord class ProductQuantizationBuildLimitsRecord attr_reader :max_training_vectors, :max_training_bytes, :max_temporary_code_bytes, :max_distance_evaluations, :max_encoded_output_bytes, :max_worker_threads @@ -24707,7 +25212,7 @@ def ==(other) true end end - + # Record type ProductQuantizationBuildResultRecord class ProductQuantizationBuildResultRecord attr_reader :index, :stats @@ -24728,7 +25233,7 @@ def ==(other) true end end - + # Record type ProductQuantizationBuildStatsRecord class ProductQuantizationBuildStatsRecord attr_reader :training_distance_evaluations, :encoding_distance_evaluations, :encoded_vectors, :training_vectors, :training_bytes, :encoded_output_bytes @@ -24765,7 +25270,7 @@ def ==(other) true end end - + # Record type ProductQuantizationConfigRecord class ProductQuantizationConfigRecord attr_reader :subquantizers, :centroids_per_subquantizer, :training_iterations, :rerank_multiplier, :seed, :max_training_vectors @@ -24802,7 +25307,7 @@ def ==(other) true end end - + # Record type ProductQuantizationQualityRecord class ProductQuantizationQualityRecord attr_reader :mean_squared_error, :maximum_squared_error @@ -24823,7 +25328,7 @@ def ==(other) true end end - + # Record type ProximityConfigRecord class ProximityConfigRecord attr_reader :dimensions, :metric, :log_chunk_size, :level_hash_seed, :min_page_bytes, :target_page_bytes, :max_page_bytes, :overflow_hash_seed, :inline_threshold_bytes, :scalar_quantization_group_size @@ -24876,7 +25381,7 @@ def ==(other) true end end - + # Record type ProximityFilterRecord class ProximityFilterRecord attr_reader :kind, :start, :range_end, :prefix, :eligible_keys @@ -24909,7 +25414,7 @@ def ==(other) true end end - + # Record type ProximityMembershipProofRecord class ProximityMembershipProofRecord attr_reader :descriptor, :descriptor_bytes, :directory_proof, :record_bytes @@ -24938,7 +25443,7 @@ def ==(other) true end end - + # Record type ProximityMembershipVerificationRecord class ProximityMembershipVerificationRecord attr_reader :descriptor, :key, :record @@ -24963,7 +25468,7 @@ def ==(other) true end end - + # Record type ProximityMutationRecord class ProximityMutationRecord attr_reader :key, :vector, :value @@ -24988,7 +25493,7 @@ def ==(other) true end end - + # Record type ProximityMutationResultRecord class ProximityMutationResultRecord attr_reader :map, :stats @@ -25009,7 +25514,7 @@ def ==(other) true end end - + # Record type ProximityMutationStatsRecord class ProximityMutationStatsRecord attr_reader :directory_entries_scanned, :directory_nodes_read, :directory_nodes_rebuilt, :directory_nodes_written, :directory_nodes_reused, :directory_levels_rebuilt, :directory_right_edge_rebuilt, :nodes_read, :nodes_written, :nodes_reused, :records_rebuilt, :distance_evaluations, :full_proximity_rebuild @@ -25074,7 +25579,7 @@ def ==(other) true end end - + # Record type ProximityNeighborRecord class ProximityNeighborRecord attr_reader :key, :value, :distance @@ -25099,7 +25604,7 @@ def ==(other) true end end - + # Record type ProximityRecordRecord class ProximityRecordRecord attr_reader :key, :vector, :value @@ -25124,7 +25629,7 @@ def ==(other) true end end - + # Record type ProximitySearchClaimRecord class ProximitySearchClaimRecord attr_reader :kind, :terminal_lower_bound @@ -25145,12 +25650,12 @@ def ==(other) true end end - + # Record type ProximitySearchRequestRecord class ProximitySearchRequestRecord - attr_reader :query, :k, :policy, :adaptive_quality, :budget, :filter, :kernel, :backend, :hnsw_ef_search, :pq_rerank_multiplier + attr_reader :query, :k, :policy, :adaptive_quality, :budget, :filter, :kernel, :backend, :hnsw_ef_search, :pq_rerank_multiplier, :turboquant_rerank_multiplier - def initialize(query:, k:, policy:, adaptive_quality:, budget:, filter:, kernel:, backend:, hnsw_ef_search:, pq_rerank_multiplier:) + def initialize(query:, k:, policy:, adaptive_quality:, budget:, filter:, kernel:, backend:, hnsw_ef_search:, pq_rerank_multiplier:, turboquant_rerank_multiplier:) @query = query @k = k @policy = policy @@ -25161,6 +25666,7 @@ def initialize(query:, k:, policy:, adaptive_quality:, budget:, filter:, kernel: @backend = backend @hnsw_ef_search = hnsw_ef_search @pq_rerank_multiplier = pq_rerank_multiplier + @turboquant_rerank_multiplier = turboquant_rerank_multiplier end def ==(other) @@ -25194,11 +25700,14 @@ def ==(other) if @pq_rerank_multiplier != other.pq_rerank_multiplier return false end + if @turboquant_rerank_multiplier != other.turboquant_rerank_multiplier + return false + end true end end - + # Record type ProximitySearchResultRecord class ProximitySearchResultRecord attr_reader :neighbors, :stats, :completion, :backend, :plan_format_version @@ -25231,17 +25740,18 @@ def ==(other) true end end - + # Record type ProximitySearchRuntimePolicyRecord class ProximitySearchRuntimePolicyRecord - attr_reader :max_entries, :max_bytes, :authoritative_max_bytes, :hnsw_max_bytes, :pq_max_bytes + attr_reader :max_entries, :max_bytes, :authoritative_max_bytes, :hnsw_max_bytes, :pq_max_bytes, :turboquant_max_bytes - def initialize(max_entries:, max_bytes:, authoritative_max_bytes:, hnsw_max_bytes:, pq_max_bytes:) + def initialize(max_entries:, max_bytes:, authoritative_max_bytes:, hnsw_max_bytes:, pq_max_bytes:, turboquant_max_bytes:) @max_entries = max_entries @max_bytes = max_bytes @authoritative_max_bytes = authoritative_max_bytes @hnsw_max_bytes = hnsw_max_bytes @pq_max_bytes = pq_max_bytes + @turboquant_max_bytes = turboquant_max_bytes end def ==(other) @@ -25260,11 +25770,14 @@ def ==(other) if @pq_max_bytes != other.pq_max_bytes return false end + if @turboquant_max_bytes != other.turboquant_max_bytes + return false + end true end end - + # Record type ProximitySearchRuntimeStatsRecord class ProximitySearchRuntimeStatsRecord attr_reader :physical_reads, :physical_bytes_read @@ -25285,7 +25798,7 @@ def ==(other) true end end - + # Record type ProximitySearchStatsRecord class ProximitySearchStatsRecord attr_reader :levels_visited, :nodes_read, :bytes_read, :physical_bytes_read, :committed_bytes, :distance_evaluations, :quantized_distance_evaluations, :reranked_candidates, :frontier_peak, :candidate_handles_peak, :candidate_retained_bytes_peak @@ -25342,7 +25855,7 @@ def ==(other) true end end - + # Record type ProximitySearchVerificationRecord class ProximitySearchVerificationRecord attr_reader :result, :claim, :replayed_events @@ -25367,7 +25880,7 @@ def ==(other) true end end - + # Record type ProximityStructuralProofRecord class ProximityStructuralProofRecord attr_reader :descriptor, :objects @@ -25388,7 +25901,7 @@ def ==(other) true end end - + # Record type ProximityStructuralVerificationRecord class ProximityStructuralVerificationRecord attr_reader :descriptor, :object_count, :summary @@ -25413,7 +25926,7 @@ def ==(other) true end end - + # Record type ProximityVerificationRecord class ProximityVerificationRecord attr_reader :record_count, :proximity_node_count, :external_vector_count, :quantized_node_count, :scalar_quantizer_count, :overflow_page_count, :overflow_directory_count, :maximum_level, :maximum_node_bytes, :distance_checks @@ -25466,7 +25979,7 @@ def ==(other) true end end - + # Record type SearchBudgetRecord class SearchBudgetRecord attr_reader :max_nodes, :max_committed_bytes, :max_distance_evaluations, :max_frontier_entries @@ -25495,156 +26008,326 @@ def ==(other) true end end - - # Record type TypedContentObjectRecord -class TypedContentObjectRecord - attr_reader :kind, :cid, :dimensions, :bytes, :depth - def initialize(kind:, cid:, dimensions:, bytes:, depth:) - @kind = kind - @cid = cid - @dimensions = dimensions - @bytes = bytes - @depth = depth + # Record type TurboQuantizationBuildLimitsRecord +class TurboQuantizationBuildLimitsRecord + attr_reader :max_records, :max_input_bytes, :max_temporary_bytes, :max_transform_operations, :max_encoded_output_bytes, :max_worker_threads + + def initialize(max_records:, max_input_bytes:, max_temporary_bytes:, max_transform_operations:, max_encoded_output_bytes:, max_worker_threads:) + @max_records = max_records + @max_input_bytes = max_input_bytes + @max_temporary_bytes = max_temporary_bytes + @max_transform_operations = max_transform_operations + @max_encoded_output_bytes = max_encoded_output_bytes + @max_worker_threads = max_worker_threads end def ==(other) - if @kind != other.kind + if @max_records != other.max_records return false end - if @cid != other.cid + if @max_input_bytes != other.max_input_bytes return false end - if @dimensions != other.dimensions + if @max_temporary_bytes != other.max_temporary_bytes return false end - if @bytes != other.bytes + if @max_transform_operations != other.max_transform_operations return false end - if @depth != other.depth + if @max_encoded_output_bytes != other.max_encoded_output_bytes + return false + end + if @max_worker_threads != other.max_worker_threads return false end true end end - - # Record type MapCatalogVerificationRecord -class MapCatalogVerificationRecord - attr_reader :head, :version_count, :reachable_nodes, :reachable_bytes - def initialize(head:, version_count:, reachable_nodes:, reachable_bytes:) - @head = head - @version_count = version_count - @reachable_nodes = reachable_nodes - @reachable_bytes = reachable_bytes + # Record type TurboQuantizationBuildResultRecord +class TurboQuantizationBuildResultRecord + attr_reader :index, :stats + + def initialize(index:, stats:) + @index = index + @stats = stats end def ==(other) - if @head != other.head - return false - end - if @version_count != other.version_count - return false - end - if @reachable_nodes != other.reachable_nodes + if @index != other.index return false end - if @reachable_bytes != other.reachable_bytes + if @stats != other.stats return false end true end end - - # Record type MapChangeEventRecord -class MapChangeEventRecord - attr_reader :previous, :current, :diffs - def initialize(previous:, current:, diffs:) - @previous = previous - @current = current - @diffs = diffs + # Record type TurboQuantizationBuildStatsRecord +class TurboQuantizationBuildStatsRecord + attr_reader :encoded_vectors, :zero_vectors, :transformed_components, :butterfly_operations, :input_bytes, :encoded_output_bytes, :peak_temporary_bytes + + def initialize(encoded_vectors:, zero_vectors:, transformed_components:, butterfly_operations:, input_bytes:, encoded_output_bytes:, peak_temporary_bytes:) + @encoded_vectors = encoded_vectors + @zero_vectors = zero_vectors + @transformed_components = transformed_components + @butterfly_operations = butterfly_operations + @input_bytes = input_bytes + @encoded_output_bytes = encoded_output_bytes + @peak_temporary_bytes = peak_temporary_bytes end def ==(other) - if @previous != other.previous + if @encoded_vectors != other.encoded_vectors return false end - if @current != other.current + if @zero_vectors != other.zero_vectors return false end - if @diffs != other.diffs + if @transformed_components != other.transformed_components + return false + end + if @butterfly_operations != other.butterfly_operations + return false + end + if @input_bytes != other.input_bytes + return false + end + if @encoded_output_bytes != other.encoded_output_bytes + return false + end + if @peak_temporary_bytes != other.peak_temporary_bytes return false end true end end - - # Record type MapUpdateRecord -class MapUpdateRecord - attr_reader :kind, :previous, :current - def initialize(kind:, previous:, current:) - @kind = kind - @previous = previous - @current = current + # Record type TurboQuantizationConfigRecord +class TurboQuantizationConfigRecord + attr_reader :bit_width, :rerank_multiplier, :seed + + def initialize(bit_width:, rerank_multiplier:, seed:) + @bit_width = bit_width + @rerank_multiplier = rerank_multiplier + @seed = seed end def ==(other) - if @kind != other.kind + if @bit_width != other.bit_width return false end - if @previous != other.previous + if @rerank_multiplier != other.rerank_multiplier return false end - if @current != other.current + if @seed != other.seed return false end true end end - - # Record type MapVersionRecord -class MapVersionRecord - attr_reader :id, :tree, :created_at_millis, :is_head - def initialize(id:, tree:, created_at_millis:, is_head:) - @id = id - @tree = tree - @created_at_millis = created_at_millis - @is_head = is_head + # Record type TurboQuantizationQualityRecord +class TurboQuantizationQualityRecord + attr_reader :mean_squared_error, :maximum_squared_error + + def initialize(mean_squared_error:, maximum_squared_error:) + @mean_squared_error = mean_squared_error + @maximum_squared_error = maximum_squared_error end def ==(other) - if @id != other.id - return false - end - if @tree != other.tree - return false - end - if @created_at_millis != other.created_at_millis + if @mean_squared_error != other.mean_squared_error return false end - if @is_head != other.is_head + if @maximum_squared_error != other.maximum_squared_error return false end true end end - - # Record type VersionPruneRecord -class VersionPruneRecord - attr_reader :retained, :removed - def initialize(retained:, removed:) - @retained = retained - @removed = removed - end + # Record type TurboQuantizationVerificationRecord +class TurboQuantizationVerificationRecord + attr_reader :encoded_vectors, :zero_vectors, :quality + + def initialize(encoded_vectors:, zero_vectors:, quality:) + @encoded_vectors = encoded_vectors + @zero_vectors = zero_vectors + @quality = quality + end + + def ==(other) + if @encoded_vectors != other.encoded_vectors + return false + end + if @zero_vectors != other.zero_vectors + return false + end + if @quality != other.quality + return false + end + + true + end +end + + # Record type TypedContentObjectRecord +class TypedContentObjectRecord + attr_reader :kind, :cid, :dimensions, :bytes, :depth + + def initialize(kind:, cid:, dimensions:, bytes:, depth:) + @kind = kind + @cid = cid + @dimensions = dimensions + @bytes = bytes + @depth = depth + end + + def ==(other) + if @kind != other.kind + return false + end + if @cid != other.cid + return false + end + if @dimensions != other.dimensions + return false + end + if @bytes != other.bytes + return false + end + if @depth != other.depth + return false + end + + true + end +end + + # Record type MapCatalogVerificationRecord +class MapCatalogVerificationRecord + attr_reader :head, :version_count, :reachable_nodes, :reachable_bytes + + def initialize(head:, version_count:, reachable_nodes:, reachable_bytes:) + @head = head + @version_count = version_count + @reachable_nodes = reachable_nodes + @reachable_bytes = reachable_bytes + end + + def ==(other) + if @head != other.head + return false + end + if @version_count != other.version_count + return false + end + if @reachable_nodes != other.reachable_nodes + return false + end + if @reachable_bytes != other.reachable_bytes + return false + end + + true + end +end + + # Record type MapChangeEventRecord +class MapChangeEventRecord + attr_reader :previous, :current, :diffs + + def initialize(previous:, current:, diffs:) + @previous = previous + @current = current + @diffs = diffs + end + + def ==(other) + if @previous != other.previous + return false + end + if @current != other.current + return false + end + if @diffs != other.diffs + return false + end + + true + end +end + + # Record type MapUpdateRecord +class MapUpdateRecord + attr_reader :kind, :previous, :current + + def initialize(kind:, previous:, current:) + @kind = kind + @previous = previous + @current = current + end + + def ==(other) + if @kind != other.kind + return false + end + if @previous != other.previous + return false + end + if @current != other.current + return false + end + + true + end +end + + # Record type MapVersionRecord +class MapVersionRecord + attr_reader :id, :tree, :created_at_millis, :is_head + + def initialize(id:, tree:, created_at_millis:, is_head:) + @id = id + @tree = tree + @created_at_millis = created_at_millis + @is_head = is_head + end + + def ==(other) + if @id != other.id + return false + end + if @tree != other.tree + return false + end + if @created_at_millis != other.created_at_millis + return false + end + if @is_head != other.is_head + return false + end + + true + end +end + + # Record type VersionPruneRecord +class VersionPruneRecord + attr_reader :retained, :removed + + def initialize(retained:, removed:) + @retained = retained + @removed = removed + end def ==(other) if @retained != other.retained @@ -25657,7 +26340,7 @@ def ==(other) true end end - + # Record type VersionedMapBatchResultRecord class VersionedMapBatchResultRecord attr_reader :version, :stats @@ -25678,7 +26361,7 @@ def ==(other) true end end - + # Record type VersionedTransactionCommitRecord class VersionedTransactionCommitRecord attr_reader :applied, :versions, :conflict_map_id, :conflict_current @@ -25707,7 +26390,7 @@ def ==(other) true end end - + # Record type NodeEntryRecord class NodeEntryRecord attr_reader :key, :value @@ -25797,120 +26480,120 @@ def ==(other) end - - + + def self.authenticated_proof_envelope_from_bytes(bytes) bytes = Prolly::uniffi_bytes(bytes) - - + + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_func_authenticated_proof_envelope_from_bytes,RustBuffer.allocFromBytes(bytes)) return result.consumeIntoTypeAuthenticatedProofEnvelopeRecord end - - + + def self.authenticated_proof_envelope_to_bytes(envelope) envelope = envelope RustBuffer.check_lower_TypeAuthenticatedProofEnvelopeRecord(envelope) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_func_authenticated_proof_envelope_to_bytes,RustBuffer.alloc_from_TypeAuthenticatedProofEnvelopeRecord(envelope)) return result.consumeIntoBytes end - - + + def self.blob_ref_validate_bytes(reference, bytes) reference = reference RustBuffer.check_lower_TypeBlobRefRecord(reference) - + bytes = Prolly::uniffi_bytes(bytes) - - + + Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_func_blob_ref_validate_bytes,RustBuffer.alloc_from_TypeBlobRefRecord(reference),RustBuffer.allocFromBytes(bytes)) end - - + + def self.changed_span(start, range_end) start = Prolly::uniffi_bytes(start) - - + + range_end = (range_end ? Prolly::uniffi_bytes(range_end) : nil) RustBuffer.check_lower_Optionalbytes(range_end) - + result = Prolly.rust_call(:uniffi_prolly_bindings_fn_func_changed_span,RustBuffer.allocFromBytes(start),RustBuffer.alloc_from_Optionalbytes(range_end)) return result.consumeIntoTypeChangedSpanRecord end - - + + def self.changed_span_for_prefix(prefix) prefix = Prolly::uniffi_bytes(prefix) - - + + result = Prolly.rust_call(:uniffi_prolly_bindings_fn_func_changed_span_for_prefix,RustBuffer.allocFromBytes(prefix)) return result.consumeIntoTypeChangedSpanRecord end - - + + def self.changed_span_from_key(key) key = Prolly::uniffi_bytes(key) - - + + result = Prolly.rust_call(:uniffi_prolly_bindings_fn_func_changed_span_from_key,RustBuffer.allocFromBytes(key)) return result.consumeIntoTypeChangedSpanRecord end - - + + def self.cid_from_bytes(bytes) bytes = Prolly::uniffi_bytes(bytes) - - + + result = Prolly.rust_call(:uniffi_prolly_bindings_fn_func_cid_from_bytes,RustBuffer.allocFromBytes(bytes)) return result.consumeIntoBytes end - - + + def self.crdt_config_lww(delete_policy) delete_policy = delete_policy RustBuffer.check_lower_TypeCrdtDeletePolicyKind(delete_policy) - + result = Prolly.rust_call(:uniffi_prolly_bindings_fn_func_crdt_config_lww,RustBuffer.alloc_from_TypeCrdtDeletePolicyKind(delete_policy)) return result.consumeIntoTypeCrdtConfigRecord end - - + + def self.crdt_config_multi_value(delete_policy) delete_policy = delete_policy RustBuffer.check_lower_TypeCrdtDeletePolicyKind(delete_policy) - + result = Prolly.rust_call(:uniffi_prolly_bindings_fn_func_crdt_config_multi_value,RustBuffer.alloc_from_TypeCrdtDeletePolicyKind(delete_policy)) return result.consumeIntoTypeCrdtConfigRecord end - - + + def self.crdt_resolution_delete() result = Prolly.rust_call(:uniffi_prolly_bindings_fn_func_crdt_resolution_delete,) @@ -25918,44 +26601,44 @@ def self.crdt_resolution_delete() end - - + + def self.crdt_resolution_value(value) value = Prolly::uniffi_bytes(value) - - + + result = Prolly.rust_call(:uniffi_prolly_bindings_fn_func_crdt_resolution_value,RustBuffer.allocFromBytes(value)) return result.consumeIntoTypeCrdtResolutionRecord end - - + + def self.debug_key(key) key = Prolly::uniffi_bytes(key) - - + + result = Prolly.rust_call(:uniffi_prolly_bindings_fn_func_debug_key,RustBuffer.allocFromBytes(key)) return result.consumeIntoString end - - + + def self.decode_segments(key) key = Prolly::uniffi_bytes(key) - - + + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_func_decode_segments,RustBuffer.allocFromBytes(key)) return result.consumeIntoSequencebytes end - - + + def self.default_config() result = Prolly.rust_call(:uniffi_prolly_bindings_fn_func_default_config,) @@ -25963,8 +26646,8 @@ def self.default_config() end - - + + def self.default_large_value_config() result = Prolly.rust_call(:uniffi_prolly_bindings_fn_func_default_large_value_config,) @@ -25972,8 +26655,8 @@ def self.default_large_value_config() end - - + + def self.default_parallel_config() result = Prolly.rust_call(:uniffi_prolly_bindings_fn_func_default_parallel_config,) @@ -25981,56 +26664,56 @@ def self.default_parallel_config() end - - + + def self.delete_mutation(key) key = Prolly::uniffi_bytes(key) - - + + result = Prolly.rust_call(:uniffi_prolly_bindings_fn_func_delete_mutation,RustBuffer.allocFromBytes(key)) return result.consumeIntoTypeMutationRecord end - - + + def self.diff_page_proof_from_bytes(bytes) bytes = Prolly::uniffi_bytes(bytes) - - + + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_func_diff_page_proof_from_bytes,RustBuffer.allocFromBytes(bytes)) return result.consumeIntoTypeDiffPageProofRecord end - - + + def self.diff_page_proof_to_bytes(proof) proof = proof RustBuffer.check_lower_TypeDiffPageProofRecord(proof) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_func_diff_page_proof_to_bytes,RustBuffer.alloc_from_TypeDiffPageProofRecord(proof)) return result.consumeIntoBytes end - - + + def self.encode_segment(segment) segment = Prolly::uniffi_bytes(segment) - - + + result = Prolly.rust_call(:uniffi_prolly_bindings_fn_func_encode_segment,RustBuffer.allocFromBytes(segment)) return result.consumeIntoBytes end - - + + def self.encoding_cbor() result = Prolly.rust_call(:uniffi_prolly_bindings_fn_func_encoding_cbor,) @@ -26038,20 +26721,20 @@ def self.encoding_cbor() end - - + + def self.encoding_custom(name) name = Prolly::uniffi_utf8(name) - - + + result = Prolly.rust_call(:uniffi_prolly_bindings_fn_func_encoding_custom,RustBuffer.allocFromString(name)) return result.consumeIntoTypeEncodingRecord end - - + + def self.encoding_json() result = Prolly.rust_call(:uniffi_prolly_bindings_fn_func_encoding_json,) @@ -26059,8 +26742,8 @@ def self.encoding_json() end - - + + def self.encoding_raw() result = Prolly.rust_call(:uniffi_prolly_bindings_fn_func_encoding_raw,) @@ -26068,293 +26751,293 @@ def self.encoding_raw() end - - + + def self.i128_key(value) value = Prolly::uniffi_utf8(value) - - + + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_func_i128_key,RustBuffer.allocFromString(value)) return result.consumeIntoBytes end - - + + def self.i64_key(value) value = Prolly::uniffi_in_range(value, "i64", -2**63, 2**63) - - + + result = Prolly.rust_call(:uniffi_prolly_bindings_fn_func_i64_key,value) return result.consumeIntoBytes end - - + + def self.inspect_proof_bundle(bytes) bytes = Prolly::uniffi_bytes(bytes) - - + + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_func_inspect_proof_bundle,RustBuffer.allocFromBytes(bytes)) return result.consumeIntoTypeProofBundleSummaryRecord end - - + + def self.is_tombstone_value(bytes) bytes = Prolly::uniffi_bytes(bytes) - - + + result = Prolly.rust_call(:uniffi_prolly_bindings_fn_func_is_tombstone_value,RustBuffer.allocFromBytes(bytes)) return 1 == result end - - + + def self.key_from_prefixed_segments(prefix, segments) prefix = Prolly::uniffi_bytes(prefix) - - + + segments = segments.map { |v| Prolly::uniffi_bytes(v) } RustBuffer.check_lower_Sequencebytes(segments) - + result = Prolly.rust_call(:uniffi_prolly_bindings_fn_func_key_from_prefixed_segments,RustBuffer.allocFromBytes(prefix),RustBuffer.alloc_from_Sequencebytes(segments)) return result.consumeIntoBytes end - - + + def self.key_from_segments(segments) segments = segments.map { |v| Prolly::uniffi_bytes(v) } RustBuffer.check_lower_Sequencebytes(segments) - + result = Prolly.rust_call(:uniffi_prolly_bindings_fn_func_key_from_segments,RustBuffer.alloc_from_Sequencebytes(segments)) return result.consumeIntoBytes end - - + + def self.key_proof_from_bytes(bytes) bytes = Prolly::uniffi_bytes(bytes) - - + + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_func_key_proof_from_bytes,RustBuffer.allocFromBytes(bytes)) return result.consumeIntoTypeKeyProofRecord end - - + + def self.key_proof_from_node_bytes(root, key, path_node_bytes) root = (root ? Prolly::uniffi_bytes(root) : nil) RustBuffer.check_lower_Optionalbytes(root) - + key = Prolly::uniffi_bytes(key) - - + + path_node_bytes = path_node_bytes.map { |v| Prolly::uniffi_bytes(v) } RustBuffer.check_lower_Sequencebytes(path_node_bytes) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_func_key_proof_from_node_bytes,RustBuffer.alloc_from_Optionalbytes(root),RustBuffer.allocFromBytes(key),RustBuffer.alloc_from_Sequencebytes(path_node_bytes)) return result.consumeIntoTypeKeyProofRecord end - - + + def self.key_proof_path_node_bytes(proof) proof = proof RustBuffer.check_lower_TypeKeyProofRecord(proof) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_func_key_proof_path_node_bytes,RustBuffer.alloc_from_TypeKeyProofRecord(proof)) return result.consumeIntoSequencebytes end - - + + def self.key_proof_to_bytes(proof) proof = proof RustBuffer.check_lower_TypeKeyProofRecord(proof) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_func_key_proof_to_bytes,RustBuffer.alloc_from_TypeKeyProofRecord(proof)) return result.consumeIntoBytes end - - + + def self.large_value_config(inline_threshold) inline_threshold = Prolly::uniffi_in_range(inline_threshold, "u64", 0, 2**64) - - + + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_func_large_value_config,inline_threshold) return result.consumeIntoTypeLargeValueConfigRecord end - - + + def self.multi_key_proof_from_bytes(bytes) bytes = Prolly::uniffi_bytes(bytes) - - + + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_func_multi_key_proof_from_bytes,RustBuffer.allocFromBytes(bytes)) return result.consumeIntoTypeMultiKeyProofRecord end - - + + def self.multi_key_proof_from_node_bytes(root, keys, path_node_bytes) root = (root ? Prolly::uniffi_bytes(root) : nil) RustBuffer.check_lower_Optionalbytes(root) - + keys = keys.map { |v| Prolly::uniffi_bytes(v) } RustBuffer.check_lower_Sequencebytes(keys) - + path_node_bytes = path_node_bytes.map { |v| Prolly::uniffi_bytes(v) } RustBuffer.check_lower_Sequencebytes(path_node_bytes) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_func_multi_key_proof_from_node_bytes,RustBuffer.alloc_from_Optionalbytes(root),RustBuffer.alloc_from_Sequencebytes(keys),RustBuffer.alloc_from_Sequencebytes(path_node_bytes)) return result.consumeIntoTypeMultiKeyProofRecord end - - + + def self.multi_key_proof_path_node_bytes(proof) proof = proof RustBuffer.check_lower_TypeMultiKeyProofRecord(proof) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_func_multi_key_proof_path_node_bytes,RustBuffer.alloc_from_TypeMultiKeyProofRecord(proof)) return result.consumeIntoSequencebytes end - - + + def self.multi_key_proof_to_bytes(proof) proof = proof RustBuffer.check_lower_TypeMultiKeyProofRecord(proof) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_func_multi_key_proof_to_bytes,RustBuffer.alloc_from_TypeMultiKeyProofRecord(proof)) return result.consumeIntoBytes end - - + + def self.multi_value_set_from_bytes(bytes) bytes = Prolly::uniffi_bytes(bytes) - - + + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_func_multi_value_set_from_bytes,RustBuffer.allocFromBytes(bytes)) return result.consumeIntoSequencebytes end - - + + def self.multi_value_set_merge(left, right) left = left.map { |v| Prolly::uniffi_bytes(v) } RustBuffer.check_lower_Sequencebytes(left) - + right = right.map { |v| Prolly::uniffi_bytes(v) } RustBuffer.check_lower_Sequencebytes(right) - + result = Prolly.rust_call(:uniffi_prolly_bindings_fn_func_multi_value_set_merge,RustBuffer.alloc_from_Sequencebytes(left),RustBuffer.alloc_from_Sequencebytes(right)) return result.consumeIntoSequencebytes end - - + + def self.multi_value_set_to_bytes(values) values = values.map { |v| Prolly::uniffi_bytes(v) } RustBuffer.check_lower_Sequencebytes(values) - + result = Prolly.rust_call(:uniffi_prolly_bindings_fn_func_multi_value_set_to_bytes,RustBuffer.alloc_from_Sequencebytes(values)) return result.consumeIntoBytes end - - + + def self.node_cid(node) node = node RustBuffer.check_lower_TypeNodeRecord(node) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_func_node_cid,RustBuffer.alloc_from_TypeNodeRecord(node)) return result.consumeIntoBytes end - - + + def self.node_from_bytes(bytes) bytes = Prolly::uniffi_bytes(bytes) - - + + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_func_node_from_bytes,RustBuffer.allocFromBytes(bytes)) return result.consumeIntoTypeNodeRecord end - - + + def self.node_to_bytes(node) node = node RustBuffer.check_lower_TypeNodeRecord(node) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_func_node_to_bytes,RustBuffer.alloc_from_TypeNodeRecord(node)) return result.consumeIntoBytes end - - + + def self.parallel_config(max_threads, parallelism_threshold) max_threads = Prolly::uniffi_in_range(max_threads, "u64", 0, 2**64) - - + + parallelism_threshold = Prolly::uniffi_in_range(parallelism_threshold, "u64", 0, 2**64) - - + + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_func_parallel_config,max_threads,parallelism_threshold) return result.consumeIntoTypeParallelConfigRecord end - - + + def self.parallel_config_sequential() result = Prolly.rust_call(:uniffi_prolly_bindings_fn_func_parallel_config_sequential,) @@ -26362,44 +27045,44 @@ def self.parallel_config_sequential() end - - + + def self.prefix_end(prefix) prefix = Prolly::uniffi_bytes(prefix) - - + + result = Prolly.rust_call(:uniffi_prolly_bindings_fn_func_prefix_end,RustBuffer.allocFromBytes(prefix)) return result.consumeIntoOptionalbytes end - - + + def self.prefix_range(prefix) prefix = Prolly::uniffi_bytes(prefix) - - + + result = Prolly.rust_call(:uniffi_prolly_bindings_fn_func_prefix_range,RustBuffer.allocFromBytes(prefix)) return result.consumeIntoTypeRangeBoundsRecord end - - + + def self.range_cursor_after_key(key) key = Prolly::uniffi_bytes(key) - - + + result = Prolly.rust_call(:uniffi_prolly_bindings_fn_func_range_cursor_after_key,RustBuffer.allocFromBytes(key)) return result.consumeIntoTypeRangeCursorRecord end - - + + def self.range_cursor_start() result = Prolly.rust_call(:uniffi_prolly_bindings_fn_func_range_cursor_start,) @@ -26407,122 +27090,122 @@ def self.range_cursor_start() end - - + + def self.range_page_proof_from_bytes(bytes) bytes = Prolly::uniffi_bytes(bytes) - - + + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_func_range_page_proof_from_bytes,RustBuffer.allocFromBytes(bytes)) return result.consumeIntoTypeRangePageProofRecord end - - + + def self.range_page_proof_from_node_bytes(root, after, range_end, path_node_bytes) root = (root ? Prolly::uniffi_bytes(root) : nil) RustBuffer.check_lower_Optionalbytes(root) - + after = (after ? Prolly::uniffi_bytes(after) : nil) RustBuffer.check_lower_Optionalbytes(after) - + range_end = (range_end ? Prolly::uniffi_bytes(range_end) : nil) RustBuffer.check_lower_Optionalbytes(range_end) - + path_node_bytes = path_node_bytes.map { |v| Prolly::uniffi_bytes(v) } RustBuffer.check_lower_Sequencebytes(path_node_bytes) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_func_range_page_proof_from_node_bytes,RustBuffer.alloc_from_Optionalbytes(root),RustBuffer.alloc_from_Optionalbytes(after),RustBuffer.alloc_from_Optionalbytes(range_end),RustBuffer.alloc_from_Sequencebytes(path_node_bytes)) return result.consumeIntoTypeRangePageProofRecord end - - + + def self.range_page_proof_path_node_bytes(proof) proof = proof RustBuffer.check_lower_TypeRangePageProofRecord(proof) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_func_range_page_proof_path_node_bytes,RustBuffer.alloc_from_TypeRangePageProofRecord(proof)) return result.consumeIntoSequencebytes end - - + + def self.range_page_proof_to_bytes(proof) proof = proof RustBuffer.check_lower_TypeRangePageProofRecord(proof) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_func_range_page_proof_to_bytes,RustBuffer.alloc_from_TypeRangePageProofRecord(proof)) return result.consumeIntoBytes end - - + + def self.range_proof_from_bytes(bytes) bytes = Prolly::uniffi_bytes(bytes) - - + + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_func_range_proof_from_bytes,RustBuffer.allocFromBytes(bytes)) return result.consumeIntoTypeRangeProofRecord end - - + + def self.range_proof_from_node_bytes(root, start, range_end, path_node_bytes) root = (root ? Prolly::uniffi_bytes(root) : nil) RustBuffer.check_lower_Optionalbytes(root) - + start = Prolly::uniffi_bytes(start) - - + + range_end = (range_end ? Prolly::uniffi_bytes(range_end) : nil) RustBuffer.check_lower_Optionalbytes(range_end) - + path_node_bytes = path_node_bytes.map { |v| Prolly::uniffi_bytes(v) } RustBuffer.check_lower_Sequencebytes(path_node_bytes) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_func_range_proof_from_node_bytes,RustBuffer.alloc_from_Optionalbytes(root),RustBuffer.allocFromBytes(start),RustBuffer.alloc_from_Optionalbytes(range_end),RustBuffer.alloc_from_Sequencebytes(path_node_bytes)) return result.consumeIntoTypeRangeProofRecord end - - + + def self.range_proof_path_node_bytes(proof) proof = proof RustBuffer.check_lower_TypeRangeProofRecord(proof) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_func_range_proof_path_node_bytes,RustBuffer.alloc_from_TypeRangeProofRecord(proof)) return result.consumeIntoSequencebytes end - - + + def self.range_proof_to_bytes(proof) proof = proof RustBuffer.check_lower_TypeRangeProofRecord(proof) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_func_range_proof_to_bytes,RustBuffer.alloc_from_TypeRangeProofRecord(proof)) return result.consumeIntoBytes end - - + + def self.resolution_delete() result = Prolly.rust_call(:uniffi_prolly_bindings_fn_func_resolution_delete,) @@ -26530,8 +27213,8 @@ def self.resolution_delete() end - - + + def self.resolution_unresolved() result = Prolly.rust_call(:uniffi_prolly_bindings_fn_func_resolution_unresolved,) @@ -26539,68 +27222,68 @@ def self.resolution_unresolved() end - - + + def self.resolution_value(value) value = Prolly::uniffi_bytes(value) - - + + result = Prolly.rust_call(:uniffi_prolly_bindings_fn_func_resolution_value,RustBuffer.allocFromBytes(value)) return result.consumeIntoTypeResolutionRecord end - - + + def self.resolve_delete_wins(conflict) conflict = conflict RustBuffer.check_lower_TypeConflictRecord(conflict) - + result = Prolly.rust_call(:uniffi_prolly_bindings_fn_func_resolve_delete_wins,RustBuffer.alloc_from_TypeConflictRecord(conflict)) return result.consumeIntoTypeResolutionRecord end - - + + def self.resolve_prefer_left(conflict) conflict = conflict RustBuffer.check_lower_TypeConflictRecord(conflict) - + result = Prolly.rust_call(:uniffi_prolly_bindings_fn_func_resolve_prefer_left,RustBuffer.alloc_from_TypeConflictRecord(conflict)) return result.consumeIntoTypeResolutionRecord end - - + + def self.resolve_prefer_right(conflict) conflict = conflict RustBuffer.check_lower_TypeConflictRecord(conflict) - + result = Prolly.rust_call(:uniffi_prolly_bindings_fn_func_resolve_prefer_right,RustBuffer.alloc_from_TypeConflictRecord(conflict)) return result.consumeIntoTypeResolutionRecord end - - + + def self.resolve_update_wins(conflict) conflict = conflict RustBuffer.check_lower_TypeConflictRecord(conflict) - + result = Prolly.rust_call(:uniffi_prolly_bindings_fn_func_resolve_update_wins,RustBuffer.alloc_from_TypeConflictRecord(conflict)) return result.consumeIntoTypeResolutionRecord end - - + + def self.retain_all_named_roots() result = Prolly.rust_call(:uniffi_prolly_bindings_fn_func_retain_all_named_roots,) @@ -26608,74 +27291,74 @@ def self.retain_all_named_roots() end - - + + def self.retain_exact_named_roots(names) names = names.map { |v| Prolly::uniffi_bytes(v) } RustBuffer.check_lower_Sequencebytes(names) - + result = Prolly.rust_call(:uniffi_prolly_bindings_fn_func_retain_exact_named_roots,RustBuffer.alloc_from_Sequencebytes(names)) return result.consumeIntoTypeNamedRootRetentionRecord end - - + + def self.retain_named_root_prefix(prefix) prefix = Prolly::uniffi_bytes(prefix) - - + + result = Prolly.rust_call(:uniffi_prolly_bindings_fn_func_retain_named_root_prefix,RustBuffer.allocFromBytes(prefix)) return result.consumeIntoTypeNamedRootRetentionRecord end - - + + def self.retain_named_roots_updated_since(prefix, min_updated_at_millis) prefix = Prolly::uniffi_bytes(prefix) - - + + min_updated_at_millis = Prolly::uniffi_in_range(min_updated_at_millis, "u64", 0, 2**64) - - + + result = Prolly.rust_call(:uniffi_prolly_bindings_fn_func_retain_named_roots_updated_since,RustBuffer.allocFromBytes(prefix),min_updated_at_millis) return result.consumeIntoTypeNamedRootRetentionRecord end - - + + def self.retain_newest_named_roots(prefix, count) prefix = Prolly::uniffi_bytes(prefix) - - + + count = Prolly::uniffi_in_range(count, "u64", 0, 2**64) - - + + result = Prolly.rust_call(:uniffi_prolly_bindings_fn_func_retain_newest_named_roots,RustBuffer.allocFromBytes(prefix),count) return result.consumeIntoTypeNamedRootRetentionRecord end - - + + def self.reverse_cursor_before_key(key) key = Prolly::uniffi_bytes(key) - - + + result = Prolly.rust_call(:uniffi_prolly_bindings_fn_func_reverse_cursor_before_key,RustBuffer.allocFromBytes(key)) return result.consumeIntoTypeReverseCursorRecord end - - + + def self.reverse_cursor_end() result = Prolly.rust_call(:uniffi_prolly_bindings_fn_func_reverse_cursor_end,) @@ -26683,149 +27366,149 @@ def self.reverse_cursor_end() end - - + + def self.root_manifest_from_bytes(bytes) bytes = Prolly::uniffi_bytes(bytes) - - + + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_func_root_manifest_from_bytes,RustBuffer.allocFromBytes(bytes)) return result.consumeIntoTypeRootManifestRecord end - - + + def self.root_manifest_to_bytes(record) record = record RustBuffer.check_lower_TypeRootManifestRecord(record) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_func_root_manifest_to_bytes,RustBuffer.alloc_from_TypeRootManifestRecord(record)) return result.consumeIntoBytes end - - + + def self.sign_proof_bundle_hmac_sha256(proof_bundle, key_id, secret, context, issued_at_millis, expires_at_millis, nonce) proof_bundle = Prolly::uniffi_bytes(proof_bundle) - - + + key_id = Prolly::uniffi_bytes(key_id) - - + + secret = Prolly::uniffi_bytes(secret) - - + + context = Prolly::uniffi_bytes(context) - - + + issued_at_millis = (issued_at_millis ? Prolly::uniffi_in_range(issued_at_millis, "u64", 0, 2**64) : nil) RustBuffer.check_lower_Optionalu64(issued_at_millis) - + expires_at_millis = (expires_at_millis ? Prolly::uniffi_in_range(expires_at_millis, "u64", 0, 2**64) : nil) RustBuffer.check_lower_Optionalu64(expires_at_millis) - + nonce = Prolly::uniffi_bytes(nonce) - - + + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_func_sign_proof_bundle_hmac_sha256,RustBuffer.allocFromBytes(proof_bundle),RustBuffer.allocFromBytes(key_id),RustBuffer.allocFromBytes(secret),RustBuffer.allocFromBytes(context),RustBuffer.alloc_from_Optionalu64(issued_at_millis),RustBuffer.alloc_from_Optionalu64(expires_at_millis),RustBuffer.allocFromBytes(nonce)) return result.consumeIntoTypeAuthenticatedProofEnvelopeRecord end - - + + def self.snapshot_bundle_digest(record) record = record RustBuffer.check_lower_TypeSnapshotBundleRecord(record) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_func_snapshot_bundle_digest,RustBuffer.alloc_from_TypeSnapshotBundleRecord(record)) return result.consumeIntoBytes end - - + + def self.snapshot_bundle_digest_bytes(bytes) bytes = Prolly::uniffi_bytes(bytes) - - + + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_func_snapshot_bundle_digest_bytes,RustBuffer.allocFromBytes(bytes)) return result.consumeIntoBytes end - - + + def self.snapshot_bundle_from_bytes(bytes) bytes = Prolly::uniffi_bytes(bytes) - - + + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_func_snapshot_bundle_from_bytes,RustBuffer.allocFromBytes(bytes)) return result.consumeIntoTypeSnapshotBundleRecord end - - + + def self.snapshot_bundle_summary(record) record = record RustBuffer.check_lower_TypeSnapshotBundleRecord(record) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_func_snapshot_bundle_summary,RustBuffer.alloc_from_TypeSnapshotBundleRecord(record)) return result.consumeIntoTypeSnapshotBundleSummaryRecord end - - + + def self.snapshot_bundle_summary_from_bytes(bytes) bytes = Prolly::uniffi_bytes(bytes) - - + + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_func_snapshot_bundle_summary_from_bytes,RustBuffer.allocFromBytes(bytes)) return result.consumeIntoTypeSnapshotBundleSummaryRecord end - - + + def self.snapshot_bundle_to_bytes(record) record = record RustBuffer.check_lower_TypeSnapshotBundleRecord(record) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_func_snapshot_bundle_to_bytes,RustBuffer.alloc_from_TypeSnapshotBundleRecord(record)) return result.consumeIntoBytes end - - + + def self.snapshot_id_from_name(namespace, name) namespace = namespace RustBuffer.check_lower_TypeSnapshotNamespaceRecord(namespace) - + name = Prolly::uniffi_bytes(name) - - + + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_func_snapshot_id_from_name,RustBuffer.alloc_from_TypeSnapshotNamespaceRecord(namespace),RustBuffer.allocFromBytes(name)) return result.consumeIntoOptionalbytes end - - + + def self.snapshot_namespace_branch() result = Prolly.rust_call(:uniffi_prolly_bindings_fn_func_snapshot_namespace_branch,) @@ -26833,8 +27516,8 @@ def self.snapshot_namespace_branch() end - - + + def self.snapshot_namespace_checkpoint() result = Prolly.rust_call(:uniffi_prolly_bindings_fn_func_snapshot_namespace_checkpoint,) @@ -26842,20 +27525,20 @@ def self.snapshot_namespace_checkpoint() end - - + + def self.snapshot_namespace_custom(prefix) prefix = Prolly::uniffi_bytes(prefix) - - + + result = Prolly.rust_call(:uniffi_prolly_bindings_fn_func_snapshot_namespace_custom,RustBuffer.allocFromBytes(prefix)) return result.consumeIntoTypeSnapshotNamespaceRecord end - - + + def self.snapshot_namespace_tag() result = Prolly.rust_call(:uniffi_prolly_bindings_fn_func_snapshot_namespace_tag,) @@ -26863,511 +27546,511 @@ def self.snapshot_namespace_tag() end - - + + def self.snapshot_root_name(namespace, id) namespace = namespace RustBuffer.check_lower_TypeSnapshotNamespaceRecord(namespace) - + id = Prolly::uniffi_bytes(id) - - + + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_func_snapshot_root_name,RustBuffer.alloc_from_TypeSnapshotNamespaceRecord(namespace),RustBuffer.allocFromBytes(id)) return result.consumeIntoBytes end - - + + def self.timestamp_millis_key(value) value = Prolly::uniffi_in_range(value, "u64", 0, 2**64) - - + + result = Prolly.rust_call(:uniffi_prolly_bindings_fn_func_timestamp_millis_key,value) return result.consumeIntoBytes end - - + + def self.timestamped_value_from_bytes(bytes) bytes = Prolly::uniffi_bytes(bytes) - - + + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_func_timestamped_value_from_bytes,RustBuffer.allocFromBytes(bytes)) return result.consumeIntoTypeTimestampedValueRecord end - - + + def self.timestamped_value_now(value) value = Prolly::uniffi_bytes(value) - - + + result = Prolly.rust_call(:uniffi_prolly_bindings_fn_func_timestamped_value_now,RustBuffer.allocFromBytes(value)) return result.consumeIntoTypeTimestampedValueRecord end - - + + def self.timestamped_value_to_bytes(record) record = record RustBuffer.check_lower_TypeTimestampedValueRecord(record) - + result = Prolly.rust_call(:uniffi_prolly_bindings_fn_func_timestamped_value_to_bytes,RustBuffer.alloc_from_TypeTimestampedValueRecord(record)) return result.consumeIntoBytes end - - + + def self.tombstone_compaction_mutation(key, stored_value) key = Prolly::uniffi_bytes(key) - - + + stored_value = Prolly::uniffi_bytes(stored_value) - - + + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_func_tombstone_compaction_mutation,RustBuffer.allocFromBytes(key),RustBuffer.allocFromBytes(stored_value)) return result.consumeIntoOptionalTypeMutationRecord end - - + + def self.tombstone_from_bytes(bytes) bytes = Prolly::uniffi_bytes(bytes) - - + + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_func_tombstone_from_bytes,RustBuffer.allocFromBytes(bytes)) return result.consumeIntoTypeTombstoneRecord end - - + + def self.tombstone_from_stored_bytes(bytes) bytes = Prolly::uniffi_bytes(bytes) - - + + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_func_tombstone_from_stored_bytes,RustBuffer.allocFromBytes(bytes)) return result.consumeIntoOptionalTypeTombstoneRecord end - - + + def self.tombstone_to_bytes(record) record = record RustBuffer.check_lower_TypeTombstoneRecord(record) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_func_tombstone_to_bytes,RustBuffer.alloc_from_TypeTombstoneRecord(record)) return result.consumeIntoBytes end - - + + def self.tombstone_upsert_mutation(key, tombstone) key = Prolly::uniffi_bytes(key) - - + + tombstone = tombstone RustBuffer.check_lower_TypeTombstoneRecord(tombstone) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_func_tombstone_upsert_mutation,RustBuffer.allocFromBytes(key),RustBuffer.alloc_from_TypeTombstoneRecord(tombstone)) return result.consumeIntoTypeMutationRecord end - - + + def self.tree_config(min_chunk_size, max_chunk_size, chunking_factor, hash_seed, encoding, node_cache_max_nodes, node_cache_max_bytes) min_chunk_size = Prolly::uniffi_in_range(min_chunk_size, "u64", 0, 2**64) - - + + max_chunk_size = Prolly::uniffi_in_range(max_chunk_size, "u64", 0, 2**64) - - + + chunking_factor = Prolly::uniffi_in_range(chunking_factor, "u32", 0, 2**32) - - + + hash_seed = Prolly::uniffi_in_range(hash_seed, "u64", 0, 2**64) - - + + encoding = encoding RustBuffer.check_lower_TypeEncodingRecord(encoding) - + node_cache_max_nodes = (node_cache_max_nodes ? Prolly::uniffi_in_range(node_cache_max_nodes, "u64", 0, 2**64) : nil) RustBuffer.check_lower_Optionalu64(node_cache_max_nodes) - + node_cache_max_bytes = (node_cache_max_bytes ? Prolly::uniffi_in_range(node_cache_max_bytes, "u64", 0, 2**64) : nil) RustBuffer.check_lower_Optionalu64(node_cache_max_bytes) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_func_tree_config,min_chunk_size,max_chunk_size,chunking_factor,hash_seed,RustBuffer.alloc_from_TypeEncodingRecord(encoding),RustBuffer.alloc_from_Optionalu64(node_cache_max_nodes),RustBuffer.alloc_from_Optionalu64(node_cache_max_bytes)) return result.consumeIntoTypeConfigRecord end - - + + def self.tree_config_from_format_bytes(format_bytes, node_cache_max_nodes, node_cache_max_bytes) format_bytes = Prolly::uniffi_bytes(format_bytes) - - + + node_cache_max_nodes = (node_cache_max_nodes ? Prolly::uniffi_in_range(node_cache_max_nodes, "u64", 0, 2**64) : nil) RustBuffer.check_lower_Optionalu64(node_cache_max_nodes) - + node_cache_max_bytes = (node_cache_max_bytes ? Prolly::uniffi_in_range(node_cache_max_bytes, "u64", 0, 2**64) : nil) RustBuffer.check_lower_Optionalu64(node_cache_max_bytes) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_func_tree_config_from_format_bytes,RustBuffer.allocFromBytes(format_bytes),RustBuffer.alloc_from_Optionalu64(node_cache_max_nodes),RustBuffer.alloc_from_Optionalu64(node_cache_max_bytes)) return result.consumeIntoTypeConfigRecord end - - + + def self.u128_key(value) value = Prolly::uniffi_utf8(value) - - + + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_func_u128_key,RustBuffer.allocFromString(value)) return result.consumeIntoBytes end - - + + def self.u64_key(value) value = Prolly::uniffi_in_range(value, "u64", 0, 2**64) - - + + result = Prolly.rust_call(:uniffi_prolly_bindings_fn_func_u64_key,value) return result.consumeIntoBytes end - - + + def self.upsert_mutation(key, value) key = Prolly::uniffi_bytes(key) - - + + value = Prolly::uniffi_bytes(value) - - + + result = Prolly.rust_call(:uniffi_prolly_bindings_fn_func_upsert_mutation,RustBuffer.allocFromBytes(key),RustBuffer.allocFromBytes(value)) return result.consumeIntoTypeMutationRecord end - - + + def self.value_ref_from_bytes(bytes) bytes = Prolly::uniffi_bytes(bytes) - - + + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_func_value_ref_from_bytes,RustBuffer.allocFromBytes(bytes)) return result.consumeIntoTypeValueRefRecord end - - + + def self.value_ref_from_stored_bytes(bytes) bytes = Prolly::uniffi_bytes(bytes) - - + + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_func_value_ref_from_stored_bytes,RustBuffer.allocFromBytes(bytes)) return result.consumeIntoTypeValueRefRecord end - - + + def self.value_ref_inline_requires_escape(value) value = Prolly::uniffi_bytes(value) - - + + result = Prolly.rust_call(:uniffi_prolly_bindings_fn_func_value_ref_inline_requires_escape,RustBuffer.allocFromBytes(value)) return 1 == result end - - + + def self.value_ref_to_bytes(record) record = record RustBuffer.check_lower_TypeValueRefRecord(record) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_func_value_ref_to_bytes,RustBuffer.alloc_from_TypeValueRefRecord(record)) return result.consumeIntoBytes end - - + + def self.verify_authenticated_proof_bundle(envelope_bytes, secret, now_millis) envelope_bytes = Prolly::uniffi_bytes(envelope_bytes) - - + + secret = Prolly::uniffi_bytes(secret) - - + + now_millis = (now_millis ? Prolly::uniffi_in_range(now_millis, "u64", 0, 2**64) : nil) RustBuffer.check_lower_Optionalu64(now_millis) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_func_verify_authenticated_proof_bundle,RustBuffer.allocFromBytes(envelope_bytes),RustBuffer.allocFromBytes(secret),RustBuffer.alloc_from_Optionalu64(now_millis)) return result.consumeIntoTypeAuthenticatedProofBundleVerificationRecord end - - + + def self.verify_authenticated_proof_envelope(envelope, secret, now_millis) envelope = envelope RustBuffer.check_lower_TypeAuthenticatedProofEnvelopeRecord(envelope) - + secret = Prolly::uniffi_bytes(secret) - - + + now_millis = (now_millis ? Prolly::uniffi_in_range(now_millis, "u64", 0, 2**64) : nil) RustBuffer.check_lower_Optionalu64(now_millis) - + result = Prolly.rust_call(:uniffi_prolly_bindings_fn_func_verify_authenticated_proof_envelope,RustBuffer.alloc_from_TypeAuthenticatedProofEnvelopeRecord(envelope),RustBuffer.allocFromBytes(secret),RustBuffer.alloc_from_Optionalu64(now_millis)) return result.consumeIntoTypeAuthenticatedProofEnvelopeVerificationRecord end - - + + def self.verify_diff_page_proof(proof) proof = proof RustBuffer.check_lower_TypeDiffPageProofRecord(proof) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_func_verify_diff_page_proof,RustBuffer.alloc_from_TypeDiffPageProofRecord(proof)) return result.consumeIntoTypeDiffPageProofVerificationRecord end - - + + def self.verify_key_proof(proof) proof = proof RustBuffer.check_lower_TypeKeyProofRecord(proof) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_func_verify_key_proof,RustBuffer.alloc_from_TypeKeyProofRecord(proof)) return result.consumeIntoTypeKeyProofVerificationRecord end - - + + def self.verify_multi_key_proof(proof) proof = proof RustBuffer.check_lower_TypeMultiKeyProofRecord(proof) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_func_verify_multi_key_proof,RustBuffer.alloc_from_TypeMultiKeyProofRecord(proof)) return result.consumeIntoTypeMultiKeyProofVerificationRecord end - - + + def self.verify_proof_bundle(bytes) bytes = Prolly::uniffi_bytes(bytes) - - + + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_func_verify_proof_bundle,RustBuffer.allocFromBytes(bytes)) return result.consumeIntoTypeProofBundleVerificationRecord end - - + + def self.verify_range_page_proof(proof) proof = proof RustBuffer.check_lower_TypeRangePageProofRecord(proof) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_func_verify_range_page_proof,RustBuffer.alloc_from_TypeRangePageProofRecord(proof)) return result.consumeIntoTypeRangePageProofVerificationRecord end - - + + def self.verify_range_proof(proof) proof = proof RustBuffer.check_lower_TypeRangeProofRecord(proof) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_func_verify_range_proof,RustBuffer.alloc_from_TypeRangeProofRecord(proof)) return result.consumeIntoTypeRangeProofVerificationRecord end - - + + def self.verify_snapshot_bundle(record) record = record RustBuffer.check_lower_TypeSnapshotBundleRecord(record) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_func_verify_snapshot_bundle,RustBuffer.alloc_from_TypeSnapshotBundleRecord(record)) return result.consumeIntoTypeSnapshotBundleVerificationRecord end - - + + def self.verify_snapshot_bundle_bytes(bytes) bytes = Prolly::uniffi_bytes(bytes) - - + + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_func_verify_snapshot_bundle_bytes,RustBuffer.allocFromBytes(bytes)) return result.consumeIntoTypeSnapshotBundleVerificationRecord end - - + + def self.versioned_value_bytes_matches_schema(bytes, schema, version) bytes = Prolly::uniffi_bytes(bytes) - - + + schema = Prolly::uniffi_utf8(schema) - - + + version = Prolly::uniffi_in_range(version, "u64", 0, 2**64) - - + + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_func_versioned_value_bytes_matches_schema,RustBuffer.allocFromBytes(bytes),RustBuffer.allocFromString(schema),version) return 1 == result end - - + + def self.versioned_value_bytes_require_schema(bytes, schema, version) bytes = Prolly::uniffi_bytes(bytes) - - + + schema = Prolly::uniffi_utf8(schema) - - + + version = Prolly::uniffi_in_range(version, "u64", 0, 2**64) - - + + Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_func_versioned_value_bytes_require_schema,RustBuffer.allocFromBytes(bytes),RustBuffer.allocFromString(schema),version) end - - + + def self.versioned_value_from_bytes(bytes) bytes = Prolly::uniffi_bytes(bytes) - - + + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_func_versioned_value_from_bytes,RustBuffer.allocFromBytes(bytes)) return result.consumeIntoTypeVersionedValueRecord end - - + + def self.versioned_value_matches_schema(record, schema, version) record = record RustBuffer.check_lower_TypeVersionedValueRecord(record) - + schema = Prolly::uniffi_utf8(schema) - - + + version = Prolly::uniffi_in_range(version, "u64", 0, 2**64) - - + + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_func_versioned_value_matches_schema,RustBuffer.alloc_from_TypeVersionedValueRecord(record),RustBuffer.allocFromString(schema),version) return 1 == result end - - + + def self.versioned_value_require_schema(record, schema, version) record = record RustBuffer.check_lower_TypeVersionedValueRecord(record) - + schema = Prolly::uniffi_utf8(schema) - - + + version = Prolly::uniffi_in_range(version, "u64", 0, 2**64) - - + + Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_func_versioned_value_require_schema,RustBuffer.alloc_from_TypeVersionedValueRecord(record),RustBuffer.allocFromString(schema),version) end - - + + def self.versioned_value_to_bytes(record) record = record RustBuffer.check_lower_TypeVersionedValueRecord(record) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_func_versioned_value_to_bytes,RustBuffer.alloc_from_TypeVersionedValueRecord(record)) return result.consumeIntoBytes end - - + + def self.open_remote_prolly_engine(store, config) store = store (ForeignRemoteStore.uniffi_check_lower store) - + config = config RustBuffer.check_lower_TypeConfigRecord(config) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_func_open_remote_prolly_engine,(ForeignRemoteStore.uniffi_lower store),RustBuffer.alloc_from_TypeConfigRecord(config)) return AsyncProllyEngine.uniffi_allocate(result) end - - + + def self.default_secondary_index_limits() result = Prolly.rust_call(:uniffi_prolly_bindings_fn_func_default_secondary_index_limits,) @@ -27375,8 +28058,8 @@ def self.default_secondary_index_limits() end - - + + def self.default_composite_accelerator_config() result = Prolly.rust_call(:uniffi_prolly_bindings_fn_func_default_composite_accelerator_config,) @@ -27384,8 +28067,8 @@ def self.default_composite_accelerator_config() end - - + + def self.default_composite_build_limits() result = Prolly.rust_call(:uniffi_prolly_bindings_fn_func_default_composite_build_limits,) @@ -27393,8 +28076,8 @@ def self.default_composite_build_limits() end - - + + def self.default_composite_rebuild_options() result = Prolly.rust_call(:uniffi_prolly_bindings_fn_func_default_composite_rebuild_options,) @@ -27402,8 +28085,8 @@ def self.default_composite_rebuild_options() end - - + + def self.default_content_graph_limits() result = Prolly.rust_call(:uniffi_prolly_bindings_fn_func_default_content_graph_limits,) @@ -27411,8 +28094,8 @@ def self.default_content_graph_limits() end - - + + def self.default_hnsw_build_limits() result = Prolly.rust_call(:uniffi_prolly_bindings_fn_func_default_hnsw_build_limits,) @@ -27420,8 +28103,8 @@ def self.default_hnsw_build_limits() end - - + + def self.default_hnsw_config() result = Prolly.rust_call(:uniffi_prolly_bindings_fn_func_default_hnsw_config,) @@ -27429,8 +28112,8 @@ def self.default_hnsw_config() end - - + + def self.default_pq_build_limits() result = Prolly.rust_call(:uniffi_prolly_bindings_fn_func_default_pq_build_limits,) @@ -27438,8 +28121,8 @@ def self.default_pq_build_limits() end - - + + def self.default_pq_config() result = Prolly.rust_call(:uniffi_prolly_bindings_fn_func_default_pq_config,) @@ -27447,20 +28130,20 @@ def self.default_pq_config() end - - + + def self.default_proximity_config(dimensions) dimensions = Prolly::uniffi_in_range(dimensions, "u32", 0, 2**32) - - + + result = Prolly.rust_call(:uniffi_prolly_bindings_fn_func_default_proximity_config,dimensions) return result.consumeIntoTypeProximityConfigRecord end - - + + def self.default_proximity_search_runtime_policy() result = Prolly.rust_call(:uniffi_prolly_bindings_fn_func_default_proximity_search_runtime_policy,) @@ -27468,55 +28151,73 @@ def self.default_proximity_search_runtime_policy() end - - + + + +def self.default_turboquant_build_limits() + result = Prolly.rust_call(:uniffi_prolly_bindings_fn_func_default_turboquant_build_limits,) + return result.consumeIntoTypeTurboQuantizationBuildLimitsRecord +end + + + + + +def self.default_turboquant_config() + result = Prolly.rust_call(:uniffi_prolly_bindings_fn_func_default_turboquant_config,) + return result.consumeIntoTypeTurboQuantizationConfigRecord +end + + + + def self.exact_proximity_search_request(query, k) query = query RustBuffer.check_lower_Sequencef32(query) - + k = Prolly::uniffi_in_range(k, "u64", 0, 2**64) - - + + result = Prolly.rust_call(:uniffi_prolly_bindings_fn_func_exact_proximity_search_request,RustBuffer.alloc_from_Sequencef32(query),k) return result.consumeIntoTypeProximitySearchRequestRecord end - - + + def self.verify_proximity_membership_proof(proof, expected_descriptor) proof = proof RustBuffer.check_lower_TypeProximityMembershipProofRecord(proof) - + expected_descriptor = (expected_descriptor ? Prolly::uniffi_bytes(expected_descriptor) : nil) RustBuffer.check_lower_Optionalbytes(expected_descriptor) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_func_verify_proximity_membership_proof,RustBuffer.alloc_from_TypeProximityMembershipProofRecord(proof),RustBuffer.alloc_from_Optionalbytes(expected_descriptor)) return result.consumeIntoTypeProximityMembershipVerificationRecord end - - + + def self.verify_proximity_structure_proof(proof, expected_descriptor, limits) proof = proof RustBuffer.check_lower_TypeProximityStructuralProofRecord(proof) - + expected_descriptor = (expected_descriptor ? Prolly::uniffi_bytes(expected_descriptor) : nil) RustBuffer.check_lower_Optionalbytes(expected_descriptor) - + limits = limits RustBuffer.check_lower_TypeContentGraphLimitsRecord(limits) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_func_verify_proximity_structure_proof,RustBuffer.alloc_from_TypeProximityStructuralProofRecord(proof),RustBuffer.alloc_from_Optionalbytes(expected_descriptor),RustBuffer.alloc_from_TypeContentGraphLimitsRecord(limits)) return result.consumeIntoTypeProximityStructuralVerificationRecord end - + def self.normalize_publication_origin_code(code) @@ -27530,7 +28231,7 @@ def self.normalize_publication_origin_code(code) - + class ConflictVisitorCallback # A private helper for initializing instances of the class from a raw handle, @@ -27574,7 +28275,7 @@ def self.uniffi_lower(inst) return inst.uniffi_clone_handle() end - + def visit(conflict) conflict = conflict @@ -27582,9 +28283,9 @@ def visit(conflict) result = Prolly.rust_call(:uniffi_prolly_bindings_fn_method_conflictvisitorcallback_visit,uniffi_clone_handle(),RustBuffer.alloc_from_TypeConflictRecord(conflict)) return 1 == result end - + end - + class CrdtResolverCallback # A private helper for initializing instances of the class from a raw handle, @@ -27628,7 +28329,7 @@ def self.uniffi_lower(inst) return inst.uniffi_clone_handle() end - + def resolve(conflict) conflict = conflict @@ -27636,9 +28337,9 @@ def resolve(conflict) result = Prolly.rust_call(:uniffi_prolly_bindings_fn_method_crdtresolvercallback_resolve,uniffi_clone_handle(),RustBuffer.alloc_from_TypeConflictRecord(conflict)) return result.consumeIntoTypeCrdtResolutionRecord end - + end - + class DiffVisitorCallback # A private helper for initializing instances of the class from a raw handle, @@ -27682,7 +28383,7 @@ def self.uniffi_lower(inst) return inst.uniffi_clone_handle() end - + def visit(diff) diff = diff @@ -27690,9 +28391,9 @@ def visit(diff) result = Prolly.rust_call(:uniffi_prolly_bindings_fn_method_diffvisitorcallback_visit,uniffi_clone_handle(),RustBuffer.alloc_from_TypeDiffRecord(diff)) return 1 == result end - + end - + class EntryVisitorCallback # A private helper for initializing instances of the class from a raw handle, @@ -27736,7 +28437,7 @@ def self.uniffi_lower(inst) return inst.uniffi_clone_handle() end - + def visit(entry) entry = entry @@ -27744,9 +28445,9 @@ def visit(entry) result = Prolly.rust_call(:uniffi_prolly_bindings_fn_method_entryvisitorcallback_visit,uniffi_clone_handle(),RustBuffer.alloc_from_TypeEntryRecord(entry)) return 1 == result end - + end - + class HostStoreCallback # A private helper for initializing instances of the class from a raw handle, @@ -27790,25 +28491,25 @@ def self.uniffi_lower(inst) return inst.uniffi_clone_handle() end - + def get(key) key = Prolly::uniffi_bytes(key) - + result = Prolly.rust_call(:uniffi_prolly_bindings_fn_method_hoststorecallback_get,uniffi_clone_handle(),RustBuffer.allocFromBytes(key)) return result.consumeIntoTypeHostStoreBytesResultRecord end def put(key, value) key = Prolly::uniffi_bytes(key) - + value = Prolly::uniffi_bytes(value) - + result = Prolly.rust_call(:uniffi_prolly_bindings_fn_method_hoststorecallback_put,uniffi_clone_handle(),RustBuffer.allocFromBytes(key),RustBuffer.allocFromBytes(value)) return result.consumeIntoTypeHostStoreUnitResultRecord end def delete(key) key = Prolly::uniffi_bytes(key) - + result = Prolly.rust_call(:uniffi_prolly_bindings_fn_method_hoststorecallback_delete,uniffi_clone_handle(),RustBuffer.allocFromBytes(key)) return result.consumeIntoTypeHostStoreUnitResultRecord end @@ -27840,19 +28541,19 @@ def supports_hints() end def get_hint(namespace, key) namespace = Prolly::uniffi_bytes(namespace) - + key = Prolly::uniffi_bytes(key) - + result = Prolly.rust_call(:uniffi_prolly_bindings_fn_method_hoststorecallback_get_hint,uniffi_clone_handle(),RustBuffer.allocFromBytes(namespace),RustBuffer.allocFromBytes(key)) return result.consumeIntoTypeHostStoreBytesResultRecord end def put_hint(namespace, key, value) namespace = Prolly::uniffi_bytes(namespace) - + key = Prolly::uniffi_bytes(key) - + value = Prolly::uniffi_bytes(value) - + result = Prolly.rust_call(:uniffi_prolly_bindings_fn_method_hoststorecallback_put_hint,uniffi_clone_handle(),RustBuffer.allocFromBytes(namespace),RustBuffer.allocFromBytes(key),RustBuffer.allocFromBytes(value)) return result.consumeIntoTypeHostStoreUnitResultRecord end @@ -27862,13 +28563,13 @@ def list_node_cids() end def get_root(name) name = Prolly::uniffi_bytes(name) - + result = Prolly.rust_call(:uniffi_prolly_bindings_fn_method_hoststorecallback_get_root,uniffi_clone_handle(),RustBuffer.allocFromBytes(name)) return result.consumeIntoTypeHostStoreRootResultRecord end def put_root(name, manifest) name = Prolly::uniffi_bytes(name) - + manifest = manifest RustBuffer.check_lower_TypeRootManifestRecord(manifest) result = Prolly.rust_call(:uniffi_prolly_bindings_fn_method_hoststorecallback_put_root,uniffi_clone_handle(),RustBuffer.allocFromBytes(name),RustBuffer.alloc_from_TypeRootManifestRecord(manifest)) @@ -27876,13 +28577,13 @@ def put_root(name, manifest) end def delete_root(name) name = Prolly::uniffi_bytes(name) - + result = Prolly.rust_call(:uniffi_prolly_bindings_fn_method_hoststorecallback_delete_root,uniffi_clone_handle(),RustBuffer.allocFromBytes(name)) return result.consumeIntoTypeHostStoreUnitResultRecord end def compare_and_swap_root(name, expected, replacement) name = Prolly::uniffi_bytes(name) - + expected = (expected ? expected : nil) RustBuffer.check_lower_OptionalTypeRootManifestRecord(expected) replacement = (replacement ? replacement : nil) @@ -27894,9 +28595,9 @@ def list_roots() result = Prolly.rust_call(:uniffi_prolly_bindings_fn_method_hoststorecallback_list_roots,uniffi_clone_handle(),) return result.consumeIntoTypeHostStoreListRootsResultRecord end - + end - + class MergePolicyRegistry # A private helper for initializing instances of the class from a raw handle, @@ -27945,7 +28646,7 @@ def initialize() ObjectSpace.define_finalizer(self, self.class.uniffi_define_finalizer_by_handle(handle, self.object_id)) end - + def has_default() result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_mergepolicyregistry_has_default,uniffi_clone_handle(),) @@ -27961,51 +28662,51 @@ def len() end def push_exact_resolver(key, resolver) key = Prolly::uniffi_bytes(key) - + resolver = resolver (MergeResolverCallback.uniffi_check_lower resolver) Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_mergepolicyregistry_push_exact_resolver,uniffi_clone_handle(),RustBuffer.allocFromBytes(key),(MergeResolverCallback.uniffi_lower resolver)) end - + def push_exact_resolver_name(key, name) key = Prolly::uniffi_bytes(key) - + name = Prolly::uniffi_utf8(name) - + Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_mergepolicyregistry_push_exact_resolver_name,uniffi_clone_handle(),RustBuffer.allocFromBytes(key),RustBuffer.allocFromString(name)) end - + def push_prefix_resolver(prefix, resolver) prefix = Prolly::uniffi_bytes(prefix) - + resolver = resolver (MergeResolverCallback.uniffi_check_lower resolver) Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_mergepolicyregistry_push_prefix_resolver,uniffi_clone_handle(),RustBuffer.allocFromBytes(prefix),(MergeResolverCallback.uniffi_lower resolver)) end - + def push_prefix_resolver_name(prefix, name) prefix = Prolly::uniffi_bytes(prefix) - + name = Prolly::uniffi_utf8(name) - + Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_mergepolicyregistry_push_prefix_resolver_name,uniffi_clone_handle(),RustBuffer.allocFromBytes(prefix),RustBuffer.allocFromString(name)) end - + def set_default_resolver(resolver) resolver = resolver (MergeResolverCallback.uniffi_check_lower resolver) Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_mergepolicyregistry_set_default_resolver,uniffi_clone_handle(),(MergeResolverCallback.uniffi_lower resolver)) end - + def set_default_resolver_name(name) name = Prolly::uniffi_utf8(name) - + Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_mergepolicyregistry_set_default_resolver_name,uniffi_clone_handle(),RustBuffer.allocFromString(name)) end - - + + end - + class MergeResolverCallback # A private helper for initializing instances of the class from a raw handle, @@ -28049,7 +28750,7 @@ def self.uniffi_lower(inst) return inst.uniffi_clone_handle() end - + def resolve(conflict) conflict = conflict @@ -28057,9 +28758,9 @@ def resolve(conflict) result = Prolly.rust_call(:uniffi_prolly_bindings_fn_method_mergeresolvercallback_resolve,uniffi_clone_handle(),RustBuffer.alloc_from_TypeConflictRecord(conflict)) return result.consumeIntoTypeResolutionRecord end - + end - + class ProllyBlobStore # A private helper for initializing instances of the class from a raw handle, @@ -28105,7 +28806,7 @@ def self.uniffi_lower(inst) def self.file(path) path = Prolly::uniffi_utf8(path) - + # Call the (fallible) function before creating any half-baked object instances. # Lightly yucky way to bypass the usual "initialize" logic # and just create a new instance with the required handle. @@ -28117,7 +28818,7 @@ def self.memory() # and just create a new instance with the required handle. return uniffi_allocate(Prolly.rust_call(:uniffi_prolly_bindings_fn_constructor_prollyblobstore_memory,)) end - + def blob_count() result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_prollyblobstore_blob_count,uniffi_clone_handle(),) @@ -28128,7 +28829,7 @@ def delete_blob(reference) RustBuffer.check_lower_TypeBlobRefRecord(reference) Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_prollyblobstore_delete_blob,uniffi_clone_handle(),RustBuffer.alloc_from_TypeBlobRefRecord(reference)) end - + def get_blob(reference) reference = reference RustBuffer.check_lower_TypeBlobRefRecord(reference) @@ -28141,13 +28842,13 @@ def list_blob_refs() end def put_blob(bytes) bytes = Prolly::uniffi_bytes(bytes) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_prollyblobstore_put_blob,uniffi_clone_handle(),RustBuffer.allocFromBytes(bytes)) return result.consumeIntoTypeBlobRefRecord end - + end - + class ProllyEngine # A private helper for initializing instances of the class from a raw handle, @@ -28203,7 +28904,7 @@ def self.custom_store(callback, config) end def self.file(path, config) path = Prolly::uniffi_utf8(path) - + config = config RustBuffer.check_lower_TypeConfigRecord(config) # Call the (fallible) function before creating any half-baked object instances. @@ -28221,7 +28922,7 @@ def self.memory(config) end def self.sqlite(path, config) path = Prolly::uniffi_utf8(path) - + config = config RustBuffer.check_lower_TypeConfigRecord(config) # Call the (fallible) function before creating any half-baked object instances. @@ -28237,7 +28938,7 @@ def self.sqlite_in_memory(config) # and just create a new instance with the required handle. return uniffi_allocate(Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_constructor_prollyengine_sqlite_in_memory,RustBuffer.alloc_from_TypeConfigRecord(config))) end - + def append_batch(tree, mutations) tree = tree @@ -28308,7 +29009,7 @@ def cache_stats() def clear_cache() Prolly.rust_call(:uniffi_prolly_bindings_fn_method_prollyengine_clear_cache,uniffi_clone_handle(),) end - + def collect_stats(tree) tree = tree RustBuffer.check_lower_TypeTreeRecord(tree) @@ -28323,7 +29024,7 @@ def collect_stats_json(tree) end def compare_and_swap_named_root(name, expected, replacement) name = Prolly::uniffi_bytes(name) - + expected = (expected ? expected : nil) RustBuffer.check_lower_OptionalTypeTreeRecord(expected) replacement = (replacement ? replacement : nil) @@ -28333,13 +29034,13 @@ def compare_and_swap_named_root(name, expected, replacement) end def compare_and_swap_named_root_at_millis(name, expected, replacement, timestamp_millis) name = Prolly::uniffi_bytes(name) - + expected = (expected ? expected : nil) RustBuffer.check_lower_OptionalTypeTreeRecord(expected) replacement = (replacement ? replacement : nil) RustBuffer.check_lower_OptionalTypeTreeRecord(replacement) timestamp_millis = Prolly::uniffi_in_range(timestamp_millis, "u64", 0, 2**64) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_prollyengine_compare_and_swap_named_root_at_millis,uniffi_clone_handle(),RustBuffer.allocFromBytes(name),RustBuffer.alloc_from_OptionalTypeTreeRecord(expected),RustBuffer.alloc_from_OptionalTypeTreeRecord(replacement),timestamp_millis) return result.consumeIntoTypeNamedRootUpdateRecord end @@ -28347,7 +29048,7 @@ def compare_and_swap_snapshot(namespace, id, expected, replacement) namespace = namespace RustBuffer.check_lower_TypeSnapshotNamespaceRecord(namespace) id = Prolly::uniffi_bytes(id) - + expected = (expected ? expected : nil) RustBuffer.check_lower_OptionalTypeTreeRecord(expected) replacement = (replacement ? replacement : nil) @@ -28359,13 +29060,13 @@ def compare_and_swap_snapshot_at_millis(namespace, id, expected, replacement, ti namespace = namespace RustBuffer.check_lower_TypeSnapshotNamespaceRecord(namespace) id = Prolly::uniffi_bytes(id) - + expected = (expected ? expected : nil) RustBuffer.check_lower_OptionalTypeTreeRecord(expected) replacement = (replacement ? replacement : nil) RustBuffer.check_lower_OptionalTypeTreeRecord(replacement) timestamp_millis = Prolly::uniffi_in_range(timestamp_millis, "u64", 0, 2**64) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_prollyengine_compare_and_swap_snapshot_at_millis,uniffi_clone_handle(),RustBuffer.alloc_from_TypeSnapshotNamespaceRecord(namespace),RustBuffer.allocFromBytes(id),RustBuffer.alloc_from_OptionalTypeTreeRecord(expected),RustBuffer.alloc_from_OptionalTypeTreeRecord(replacement),timestamp_millis) return result.consumeIntoTypeNamedRootUpdateRecord end @@ -28379,7 +29080,7 @@ def conflict_page(base, left, right, cursor, limit) cursor = (cursor ? cursor : nil) RustBuffer.check_lower_OptionalTypeRangeCursorRecord(cursor) limit = Prolly::uniffi_in_range(limit, "u64", 0, 2**64) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_prollyengine_conflict_page,uniffi_clone_handle(),RustBuffer.alloc_from_TypeTreeRecord(base),RustBuffer.alloc_from_TypeTreeRecord(left),RustBuffer.alloc_from_TypeTreeRecord(right),RustBuffer.alloc_from_OptionalTypeRangeCursorRecord(cursor),limit) return result.consumeIntoTypeConflictPageRecord end @@ -28425,11 +29126,11 @@ def cursor_window(tree, key, range_end, limit) tree = tree RustBuffer.check_lower_TypeTreeRecord(tree) key = Prolly::uniffi_bytes(key) - + range_end = (range_end ? Prolly::uniffi_bytes(range_end) : nil) RustBuffer.check_lower_Optionalbytes(range_end) limit = Prolly::uniffi_in_range(limit, "u64", 0, 2**64) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_prollyengine_cursor_window,uniffi_clone_handle(),RustBuffer.alloc_from_TypeTreeRecord(tree),RustBuffer.allocFromBytes(key),RustBuffer.alloc_from_Optionalbytes(range_end),limit) return result.consumeIntoTypeCursorWindowRecord end @@ -28479,23 +29180,23 @@ def delete(tree, key) tree = tree RustBuffer.check_lower_TypeTreeRecord(tree) key = Prolly::uniffi_bytes(key) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_prollyengine_delete,uniffi_clone_handle(),RustBuffer.alloc_from_TypeTreeRecord(tree),RustBuffer.allocFromBytes(key)) return result.consumeIntoTypeTreeRecord end def delete_named_root(name) name = Prolly::uniffi_bytes(name) - + Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_prollyengine_delete_named_root,uniffi_clone_handle(),RustBuffer.allocFromBytes(name)) end - + def delete_range(tree, start, range_end) tree = tree RustBuffer.check_lower_TypeTreeRecord(tree) start = Prolly::uniffi_bytes(start) - + range_end = Prolly::uniffi_bytes(range_end) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_prollyengine_delete_range,uniffi_clone_handle(),RustBuffer.alloc_from_TypeTreeRecord(tree),RustBuffer.allocFromBytes(start),RustBuffer.allocFromBytes(range_end)) return result.consumeIntoTypeTreeRecord end @@ -28503,9 +29204,9 @@ def delete_range_with_stats(tree, start, range_end) tree = tree RustBuffer.check_lower_TypeTreeRecord(tree) start = Prolly::uniffi_bytes(start) - + range_end = Prolly::uniffi_bytes(range_end) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_prollyengine_delete_range_with_stats,uniffi_clone_handle(),RustBuffer.alloc_from_TypeTreeRecord(tree),RustBuffer.allocFromBytes(start),RustBuffer.allocFromBytes(range_end)) return result.consumeIntoTypeWriteResultRecord end @@ -28513,10 +29214,10 @@ def delete_snapshot(namespace, id) namespace = namespace RustBuffer.check_lower_TypeSnapshotNamespaceRecord(namespace) id = Prolly::uniffi_bytes(id) - + Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_prollyengine_delete_snapshot,uniffi_clone_handle(),RustBuffer.alloc_from_TypeSnapshotNamespaceRecord(namespace),RustBuffer.allocFromBytes(id)) end - + def diff(base, other) base = base RustBuffer.check_lower_TypeTreeRecord(base) @@ -28547,7 +29248,7 @@ def diff_page(base, other, cursor, range_end, limit) range_end = (range_end ? Prolly::uniffi_bytes(range_end) : nil) RustBuffer.check_lower_Optionalbytes(range_end) limit = Prolly::uniffi_in_range(limit, "u64", 0, 2**64) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_prollyengine_diff_page,uniffi_clone_handle(),RustBuffer.alloc_from_TypeTreeRecord(base),RustBuffer.alloc_from_TypeTreeRecord(other),RustBuffer.alloc_from_OptionalTypeRangeCursorRecord(cursor),RustBuffer.alloc_from_Optionalbytes(range_end),limit) return result.consumeIntoTypeDiffPageRecord end @@ -28567,7 +29268,7 @@ def get(tree, key) tree = tree RustBuffer.check_lower_TypeTreeRecord(tree) key = Prolly::uniffi_bytes(key) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_prollyengine_get,uniffi_clone_handle(),RustBuffer.alloc_from_TypeTreeRecord(tree),RustBuffer.allocFromBytes(key)) return result.consumeIntoOptionalbytes end @@ -28577,7 +29278,7 @@ def get_large_value(blob_store, tree, key) tree = tree RustBuffer.check_lower_TypeTreeRecord(tree) key = Prolly::uniffi_bytes(key) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_prollyengine_get_large_value,uniffi_clone_handle(),(ProllyBlobStore.uniffi_lower blob_store),RustBuffer.alloc_from_TypeTreeRecord(tree),RustBuffer.allocFromBytes(key)) return result.consumeIntoOptionalbytes end @@ -28593,7 +29294,7 @@ def get_value_ref(tree, key) tree = tree RustBuffer.check_lower_TypeTreeRecord(tree) key = Prolly::uniffi_bytes(key) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_prollyengine_get_value_ref,uniffi_clone_handle(),RustBuffer.alloc_from_TypeTreeRecord(tree),RustBuffer.allocFromBytes(key)) return result.consumeIntoOptionalTypeValueRefRecord end @@ -28601,7 +29302,7 @@ def hydrate_prefix_path_hint(tree, prefix) tree = tree RustBuffer.check_lower_TypeTreeRecord(tree) prefix = Prolly::uniffi_bytes(prefix) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_prollyengine_hydrate_prefix_path_hint,uniffi_clone_handle(),RustBuffer.alloc_from_TypeTreeRecord(tree),RustBuffer.allocFromBytes(prefix)) return 1 == result end @@ -28613,7 +29314,7 @@ def import_snapshot(bundle) end def indexed_map(id, registry) id = Prolly::uniffi_bytes(id) - + registry = registry (BindingIndexRegistry.uniffi_check_lower registry) result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_prollyengine_indexed_map,uniffi_clone_handle(),RustBuffer.allocFromBytes(id),(BindingIndexRegistry.uniffi_lower registry)) @@ -28653,7 +29354,7 @@ def load_changed_spans_hint(base, changed) end def load_named_root(name) name = Prolly::uniffi_bytes(name) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_prollyengine_load_named_root,uniffi_clone_handle(),RustBuffer.allocFromBytes(name)) return result.consumeIntoOptionalTypeTreeRecord end @@ -28665,7 +29366,7 @@ def load_named_roots(names) end def load_proximity_map(descriptor) descriptor = Prolly::uniffi_bytes(descriptor) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_prollyengine_load_proximity_map,uniffi_clone_handle(),RustBuffer.allocFromBytes(descriptor)) return BindingProximityMap.uniffi_allocate(result) end @@ -28679,7 +29380,7 @@ def load_snapshot(namespace, id) namespace = namespace RustBuffer.check_lower_TypeSnapshotNamespaceRecord(namespace) id = Prolly::uniffi_bytes(id) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_prollyengine_load_snapshot,uniffi_clone_handle(),RustBuffer.alloc_from_TypeSnapshotNamespaceRecord(namespace),RustBuffer.allocFromBytes(id)) return result.consumeIntoOptionalTypeTreeRecord end @@ -28695,7 +29396,7 @@ def lower_bound(tree, key) tree = tree RustBuffer.check_lower_TypeTreeRecord(tree) key = Prolly::uniffi_bytes(key) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_prollyengine_lower_bound,uniffi_clone_handle(),RustBuffer.alloc_from_TypeTreeRecord(tree),RustBuffer.allocFromBytes(key)) return result.consumeIntoOptionalTypeEntryRecord end @@ -28767,7 +29468,7 @@ def merge_prefix(base, left, right, prefix, resolver) right = right RustBuffer.check_lower_TypeTreeRecord(right) prefix = Prolly::uniffi_bytes(prefix) - + resolver = (resolver ? Prolly::uniffi_utf8(resolver) : nil) RustBuffer.check_lower_Optionalstring(resolver) result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_prollyengine_merge_prefix,uniffi_clone_handle(),RustBuffer.alloc_from_TypeTreeRecord(base),RustBuffer.alloc_from_TypeTreeRecord(left),RustBuffer.alloc_from_TypeTreeRecord(right),RustBuffer.allocFromBytes(prefix),RustBuffer.alloc_from_Optionalstring(resolver)) @@ -28781,7 +29482,7 @@ def merge_prefix_with_policy(base, left, right, prefix, policy) right = right RustBuffer.check_lower_TypeTreeRecord(right) prefix = Prolly::uniffi_bytes(prefix) - + policy = policy (MergePolicyRegistry.uniffi_check_lower policy) result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_prollyengine_merge_prefix_with_policy,uniffi_clone_handle(),RustBuffer.alloc_from_TypeTreeRecord(base),RustBuffer.alloc_from_TypeTreeRecord(left),RustBuffer.alloc_from_TypeTreeRecord(right),RustBuffer.allocFromBytes(prefix),(MergePolicyRegistry.uniffi_lower policy)) @@ -28795,7 +29496,7 @@ def merge_prefix_with_resolver(base, left, right, prefix, resolver) right = right RustBuffer.check_lower_TypeTreeRecord(right) prefix = Prolly::uniffi_bytes(prefix) - + resolver = resolver (MergeResolverCallback.uniffi_check_lower resolver) result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_prollyengine_merge_prefix_with_resolver,uniffi_clone_handle(),RustBuffer.alloc_from_TypeTreeRecord(base),RustBuffer.alloc_from_TypeTreeRecord(left),RustBuffer.alloc_from_TypeTreeRecord(right),RustBuffer.allocFromBytes(prefix),(MergeResolverCallback.uniffi_lower resolver)) @@ -28809,7 +29510,7 @@ def merge_range(base, left, right, start, range_end, resolver) right = right RustBuffer.check_lower_TypeTreeRecord(right) start = Prolly::uniffi_bytes(start) - + range_end = (range_end ? Prolly::uniffi_bytes(range_end) : nil) RustBuffer.check_lower_Optionalbytes(range_end) resolver = (resolver ? Prolly::uniffi_utf8(resolver) : nil) @@ -28825,7 +29526,7 @@ def merge_range_with_policy(base, left, right, start, range_end, policy) right = right RustBuffer.check_lower_TypeTreeRecord(right) start = Prolly::uniffi_bytes(start) - + range_end = (range_end ? Prolly::uniffi_bytes(range_end) : nil) RustBuffer.check_lower_Optionalbytes(range_end) policy = policy @@ -28841,7 +29542,7 @@ def merge_range_with_resolver(base, left, right, start, range_end, resolver) right = right RustBuffer.check_lower_TypeTreeRecord(right) start = Prolly::uniffi_bytes(start) - + range_end = (range_end ? Prolly::uniffi_bytes(range_end) : nil) RustBuffer.check_lower_Optionalbytes(range_end) resolver = resolver @@ -28901,7 +29602,7 @@ def pin_tree_path(tree, key) tree = tree RustBuffer.check_lower_TypeTreeRecord(tree) key = Prolly::uniffi_bytes(key) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_prollyengine_pin_tree_path,uniffi_clone_handle(),RustBuffer.alloc_from_TypeTreeRecord(tree),RustBuffer.allocFromBytes(key)) return result.to_i end @@ -28961,7 +29662,7 @@ def prefix(tree, prefix) tree = tree RustBuffer.check_lower_TypeTreeRecord(tree) prefix = Prolly::uniffi_bytes(prefix) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_prollyengine_prefix,uniffi_clone_handle(),RustBuffer.alloc_from_TypeTreeRecord(tree),RustBuffer.allocFromBytes(prefix)) return result.consumeIntoSequenceTypeEntryRecord end @@ -28969,11 +29670,11 @@ def prefix_page(tree, prefix, cursor, limit) tree = tree RustBuffer.check_lower_TypeTreeRecord(tree) prefix = Prolly::uniffi_bytes(prefix) - + cursor = (cursor ? cursor : nil) RustBuffer.check_lower_OptionalTypeRangeCursorRecord(cursor) limit = Prolly::uniffi_in_range(limit, "u64", 0, 2**64) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_prollyengine_prefix_page,uniffi_clone_handle(),RustBuffer.alloc_from_TypeTreeRecord(tree),RustBuffer.allocFromBytes(prefix),RustBuffer.alloc_from_OptionalTypeRangeCursorRecord(cursor),limit) return result.consumeIntoTypeRangePageRecord end @@ -28981,11 +29682,11 @@ def prefix_reverse_page(tree, prefix, cursor, limit) tree = tree RustBuffer.check_lower_TypeTreeRecord(tree) prefix = Prolly::uniffi_bytes(prefix) - + cursor = (cursor ? cursor : nil) RustBuffer.check_lower_OptionalTypeReverseCursorRecord(cursor) limit = Prolly::uniffi_in_range(limit, "u64", 0, 2**64) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_prollyengine_prefix_reverse_page,uniffi_clone_handle(),RustBuffer.alloc_from_TypeTreeRecord(tree),RustBuffer.allocFromBytes(prefix),RustBuffer.alloc_from_OptionalTypeReverseCursorRecord(cursor),limit) return result.consumeIntoTypeReversePageRecord end @@ -28999,7 +29700,7 @@ def prove_diff_page(base, other, cursor, range_end, limit) range_end = (range_end ? Prolly::uniffi_bytes(range_end) : nil) RustBuffer.check_lower_Optionalbytes(range_end) limit = Prolly::uniffi_in_range(limit, "u64", 0, 2**64) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_prollyengine_prove_diff_page,uniffi_clone_handle(),RustBuffer.alloc_from_TypeTreeRecord(base),RustBuffer.alloc_from_TypeTreeRecord(other),RustBuffer.alloc_from_OptionalTypeRangeCursorRecord(cursor),RustBuffer.alloc_from_Optionalbytes(range_end),limit) return result.consumeIntoTypeProvedDiffPageRecord end @@ -29007,7 +29708,7 @@ def prove_key(tree, key) tree = tree RustBuffer.check_lower_TypeTreeRecord(tree) key = Prolly::uniffi_bytes(key) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_prollyengine_prove_key,uniffi_clone_handle(),RustBuffer.alloc_from_TypeTreeRecord(tree),RustBuffer.allocFromBytes(key)) return result.consumeIntoTypeKeyProofRecord end @@ -29023,7 +29724,7 @@ def prove_prefix(tree, prefix) tree = tree RustBuffer.check_lower_TypeTreeRecord(tree) prefix = Prolly::uniffi_bytes(prefix) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_prollyengine_prove_prefix,uniffi_clone_handle(),RustBuffer.alloc_from_TypeTreeRecord(tree),RustBuffer.allocFromBytes(prefix)) return result.consumeIntoTypeRangeProofRecord end @@ -29031,7 +29732,7 @@ def prove_range(tree, start, range_end) tree = tree RustBuffer.check_lower_TypeTreeRecord(tree) start = Prolly::uniffi_bytes(start) - + range_end = (range_end ? Prolly::uniffi_bytes(range_end) : nil) RustBuffer.check_lower_Optionalbytes(range_end) result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_prollyengine_prove_range,uniffi_clone_handle(),RustBuffer.alloc_from_TypeTreeRecord(tree),RustBuffer.allocFromBytes(start),RustBuffer.alloc_from_Optionalbytes(range_end)) @@ -29045,7 +29746,7 @@ def prove_range_page(tree, cursor, range_end, limit) range_end = (range_end ? Prolly::uniffi_bytes(range_end) : nil) RustBuffer.check_lower_Optionalbytes(range_end) limit = Prolly::uniffi_in_range(limit, "u64", 0, 2**64) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_prollyengine_prove_range_page,uniffi_clone_handle(),RustBuffer.alloc_from_TypeTreeRecord(tree),RustBuffer.alloc_from_OptionalTypeRangeCursorRecord(cursor),RustBuffer.alloc_from_Optionalbytes(range_end),limit) return result.consumeIntoTypeProvedRangePageRecord end @@ -29067,27 +29768,27 @@ def publish_changed_spans_hint(base, changed, spans) end def publish_named_root(name, tree) name = Prolly::uniffi_bytes(name) - + tree = tree RustBuffer.check_lower_TypeTreeRecord(tree) Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_prollyengine_publish_named_root,uniffi_clone_handle(),RustBuffer.allocFromBytes(name),RustBuffer.alloc_from_TypeTreeRecord(tree)) end - + def publish_named_root_at_millis(name, tree, timestamp_millis) name = Prolly::uniffi_bytes(name) - + tree = tree RustBuffer.check_lower_TypeTreeRecord(tree) timestamp_millis = Prolly::uniffi_in_range(timestamp_millis, "u64", 0, 2**64) - + Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_prollyengine_publish_named_root_at_millis,uniffi_clone_handle(),RustBuffer.allocFromBytes(name),RustBuffer.alloc_from_TypeTreeRecord(tree),timestamp_millis) end - + def publish_prefix_path_hint(tree, prefix) tree = tree RustBuffer.check_lower_TypeTreeRecord(tree) prefix = Prolly::uniffi_bytes(prefix) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_prollyengine_publish_prefix_path_hint,uniffi_clone_handle(),RustBuffer.alloc_from_TypeTreeRecord(tree),RustBuffer.allocFromBytes(prefix)) return 1 == result end @@ -29095,31 +29796,31 @@ def publish_snapshot(namespace, id, tree) namespace = namespace RustBuffer.check_lower_TypeSnapshotNamespaceRecord(namespace) id = Prolly::uniffi_bytes(id) - + tree = tree RustBuffer.check_lower_TypeTreeRecord(tree) Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_prollyengine_publish_snapshot,uniffi_clone_handle(),RustBuffer.alloc_from_TypeSnapshotNamespaceRecord(namespace),RustBuffer.allocFromBytes(id),RustBuffer.alloc_from_TypeTreeRecord(tree)) end - + def publish_snapshot_at_millis(namespace, id, tree, timestamp_millis) namespace = namespace RustBuffer.check_lower_TypeSnapshotNamespaceRecord(namespace) id = Prolly::uniffi_bytes(id) - + tree = tree RustBuffer.check_lower_TypeTreeRecord(tree) timestamp_millis = Prolly::uniffi_in_range(timestamp_millis, "u64", 0, 2**64) - + Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_prollyengine_publish_snapshot_at_millis,uniffi_clone_handle(),RustBuffer.alloc_from_TypeSnapshotNamespaceRecord(namespace),RustBuffer.allocFromBytes(id),RustBuffer.alloc_from_TypeTreeRecord(tree),timestamp_millis) end - + def put(tree, key, value) tree = tree RustBuffer.check_lower_TypeTreeRecord(tree) key = Prolly::uniffi_bytes(key) - + value = Prolly::uniffi_bytes(value) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_prollyengine_put,uniffi_clone_handle(),RustBuffer.alloc_from_TypeTreeRecord(tree),RustBuffer.allocFromBytes(key),RustBuffer.allocFromBytes(value)) return result.consumeIntoTypeTreeRecord end @@ -29129,9 +29830,9 @@ def put_large_value(blob_store, tree, key, value, config) tree = tree RustBuffer.check_lower_TypeTreeRecord(tree) key = Prolly::uniffi_bytes(key) - + value = Prolly::uniffi_bytes(value) - + config = config RustBuffer.check_lower_TypeLargeValueConfigRecord(config) result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_prollyengine_put_large_value,uniffi_clone_handle(),(ProllyBlobStore.uniffi_lower blob_store),RustBuffer.alloc_from_TypeTreeRecord(tree),RustBuffer.allocFromBytes(key),RustBuffer.allocFromBytes(value),RustBuffer.alloc_from_TypeLargeValueConfigRecord(config)) @@ -29141,7 +29842,7 @@ def range(tree, start, range_end) tree = tree RustBuffer.check_lower_TypeTreeRecord(tree) start = Prolly::uniffi_bytes(start) - + range_end = (range_end ? Prolly::uniffi_bytes(range_end) : nil) RustBuffer.check_lower_Optionalbytes(range_end) result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_prollyengine_range,uniffi_clone_handle(),RustBuffer.alloc_from_TypeTreeRecord(tree),RustBuffer.allocFromBytes(start),RustBuffer.alloc_from_Optionalbytes(range_end)) @@ -29151,7 +29852,7 @@ def range_after(tree, after_key, range_end) tree = tree RustBuffer.check_lower_TypeTreeRecord(tree) after_key = Prolly::uniffi_bytes(after_key) - + range_end = (range_end ? Prolly::uniffi_bytes(range_end) : nil) RustBuffer.check_lower_Optionalbytes(range_end) result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_prollyengine_range_after,uniffi_clone_handle(),RustBuffer.alloc_from_TypeTreeRecord(tree),RustBuffer.allocFromBytes(after_key),RustBuffer.alloc_from_Optionalbytes(range_end)) @@ -29163,7 +29864,7 @@ def range_diff(base, other, start, range_end) other = other RustBuffer.check_lower_TypeTreeRecord(other) start = Prolly::uniffi_bytes(start) - + range_end = (range_end ? Prolly::uniffi_bytes(range_end) : nil) RustBuffer.check_lower_Optionalbytes(range_end) result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_prollyengine_range_diff,uniffi_clone_handle(),RustBuffer.alloc_from_TypeTreeRecord(base),RustBuffer.alloc_from_TypeTreeRecord(other),RustBuffer.allocFromBytes(start),RustBuffer.alloc_from_Optionalbytes(range_end)) @@ -29187,7 +29888,7 @@ def range_page(tree, cursor, range_end, limit) range_end = (range_end ? Prolly::uniffi_bytes(range_end) : nil) RustBuffer.check_lower_Optionalbytes(range_end) limit = Prolly::uniffi_in_range(limit, "u64", 0, 2**64) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_prollyengine_range_page,uniffi_clone_handle(),RustBuffer.alloc_from_TypeTreeRecord(tree),RustBuffer.alloc_from_OptionalTypeRangeCursorRecord(cursor),RustBuffer.alloc_from_Optionalbytes(range_end),limit) return result.consumeIntoTypeRangePageRecord end @@ -29200,16 +29901,16 @@ def read_session(tree) def reset_metrics() Prolly.rust_call(:uniffi_prolly_bindings_fn_method_prollyengine_reset_metrics,uniffi_clone_handle(),) end - + def reverse_page(tree, cursor, start, limit) tree = tree RustBuffer.check_lower_TypeTreeRecord(tree) cursor = (cursor ? cursor : nil) RustBuffer.check_lower_OptionalTypeReverseCursorRecord(cursor) start = Prolly::uniffi_bytes(start) - + limit = Prolly::uniffi_in_range(limit, "u64", 0, 2**64) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_prollyengine_reverse_page,uniffi_clone_handle(),RustBuffer.alloc_from_TypeTreeRecord(tree),RustBuffer.alloc_from_OptionalTypeReverseCursorRecord(cursor),RustBuffer.allocFromBytes(start),limit) return result.consumeIntoTypeReversePageRecord end @@ -29239,7 +29940,7 @@ def scan_prefix(tree, prefix, visitor) tree = tree RustBuffer.check_lower_TypeTreeRecord(tree) prefix = Prolly::uniffi_bytes(prefix) - + visitor = visitor (EntryVisitorCallback.uniffi_check_lower visitor) result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_prollyengine_scan_prefix,uniffi_clone_handle(),RustBuffer.alloc_from_TypeTreeRecord(tree),RustBuffer.allocFromBytes(prefix),(EntryVisitorCallback.uniffi_lower visitor)) @@ -29249,7 +29950,7 @@ def scan_prefix_reverse(tree, prefix, visitor) tree = tree RustBuffer.check_lower_TypeTreeRecord(tree) prefix = Prolly::uniffi_bytes(prefix) - + visitor = visitor (EntryVisitorCallback.uniffi_check_lower visitor) result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_prollyengine_scan_prefix_reverse,uniffi_clone_handle(),RustBuffer.alloc_from_TypeTreeRecord(tree),RustBuffer.allocFromBytes(prefix),(EntryVisitorCallback.uniffi_lower visitor)) @@ -29259,7 +29960,7 @@ def scan_range(tree, start, range_end, visitor) tree = tree RustBuffer.check_lower_TypeTreeRecord(tree) start = Prolly::uniffi_bytes(start) - + range_end = (range_end ? Prolly::uniffi_bytes(range_end) : nil) RustBuffer.check_lower_Optionalbytes(range_end) visitor = visitor @@ -29273,7 +29974,7 @@ def scan_range_diff(base, other, start, range_end, visitor) other = other RustBuffer.check_lower_TypeTreeRecord(other) start = Prolly::uniffi_bytes(start) - + range_end = (range_end ? Prolly::uniffi_bytes(range_end) : nil) RustBuffer.check_lower_Optionalbytes(range_end) visitor = visitor @@ -29285,7 +29986,7 @@ def scan_range_reverse(tree, start, range_end, visitor) tree = tree RustBuffer.check_lower_TypeTreeRecord(tree) start = Prolly::uniffi_bytes(start) - + range_end = (range_end ? Prolly::uniffi_bytes(range_end) : nil) RustBuffer.check_lower_Optionalbytes(range_end) visitor = visitor @@ -29317,7 +30018,7 @@ def structural_diff_page(base, other, cursor_json, limit) cursor_json = (cursor_json ? Prolly::uniffi_utf8(cursor_json) : nil) RustBuffer.check_lower_Optionalstring(cursor_json) limit = Prolly::uniffi_in_range(limit, "u64", 0, 2**64) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_prollyengine_structural_diff_page,uniffi_clone_handle(),RustBuffer.alloc_from_TypeTreeRecord(base),RustBuffer.alloc_from_TypeTreeRecord(other),RustBuffer.alloc_from_Optionalstring(cursor_json),limit) return result.consumeIntoTypeStructuralDiffPageRecord end @@ -29329,7 +30030,7 @@ def structural_diff_page_with_cursor(base, other, cursor, limit) cursor = (cursor ? cursor : nil) RustBuffer.check_lower_OptionalTypeStructuralDiffCursorRecord(cursor) limit = Prolly::uniffi_in_range(limit, "u64", 0, 2**64) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_prollyengine_structural_diff_page_with_cursor,uniffi_clone_handle(),RustBuffer.alloc_from_TypeTreeRecord(base),RustBuffer.alloc_from_TypeTreeRecord(other),RustBuffer.alloc_from_OptionalTypeStructuralDiffCursorRecord(cursor),limit) return result.consumeIntoTypeStructuralDiffPageRecord end @@ -29379,19 +30080,19 @@ def upper_bound(tree, key) tree = tree RustBuffer.check_lower_TypeTreeRecord(tree) key = Prolly::uniffi_bytes(key) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_prollyengine_upper_bound,uniffi_clone_handle(),RustBuffer.alloc_from_TypeTreeRecord(tree),RustBuffer.allocFromBytes(key)) return result.consumeIntoOptionalTypeEntryRecord end def versioned_map(id) id = Prolly::uniffi_bytes(id) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_prollyengine_versioned_map,uniffi_clone_handle(),RustBuffer.allocFromBytes(id)) return BindingVersionedMap.uniffi_allocate(result) end - + end - + class ProllyReadSession # A private helper for initializing instances of the class from a raw handle, @@ -29435,7 +30136,7 @@ def self.uniffi_lower(inst) return inst.uniffi_clone_handle() end - + def fast_handle() result = Prolly.rust_call(:uniffi_prolly_bindings_fn_method_prollyreadsession_fast_handle,uniffi_clone_handle(),) @@ -29443,7 +30144,7 @@ def fast_handle() end def get(key) key = Prolly::uniffi_bytes(key) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_prollyreadsession_get,uniffi_clone_handle(),RustBuffer.allocFromBytes(key)) return result.consumeIntoOptionalbytes end @@ -29465,7 +30166,7 @@ def scan_conflicts(left, right, visitor) end def scan_range(start, range_end, visitor) start = Prolly::uniffi_bytes(start) - + range_end = (range_end ? Prolly::uniffi_bytes(range_end) : nil) RustBuffer.check_lower_Optionalbytes(range_end) visitor = visitor @@ -29477,7 +30178,7 @@ def scan_range_diff(other, start, range_end, visitor) other = other (ProllyReadSession.uniffi_check_lower other) start = Prolly::uniffi_bytes(start) - + range_end = (range_end ? Prolly::uniffi_bytes(range_end) : nil) RustBuffer.check_lower_Optionalbytes(range_end) visitor = visitor @@ -29485,9 +30186,9 @@ def scan_range_diff(other, start, range_end, visitor) result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_prollyreadsession_scan_range_diff,uniffi_clone_handle(),(ProllyReadSession.uniffi_lower other),RustBuffer.allocFromBytes(start),RustBuffer.alloc_from_Optionalbytes(range_end),(DiffVisitorCallback.uniffi_lower visitor)) return result.consumeIntoTypeScanOutcomeRecord end - + end - + class ProllyTransaction # A private helper for initializing instances of the class from a raw handle, @@ -29531,7 +30232,7 @@ def self.uniffi_lower(inst) return inst.uniffi_clone_handle() end - + def batch(tree, mutations) tree = tree @@ -29547,7 +30248,7 @@ def commit() end def compare_and_swap_named_root(name, expected, replacement) name = Prolly::uniffi_bytes(name) - + expected = (expected ? expected : nil) RustBuffer.check_lower_OptionalTypeTreeRecord(expected) replacement = (replacement ? replacement : nil) @@ -29563,55 +30264,55 @@ def delete(tree, key) tree = tree RustBuffer.check_lower_TypeTreeRecord(tree) key = Prolly::uniffi_bytes(key) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_prollytransaction_delete,uniffi_clone_handle(),RustBuffer.alloc_from_TypeTreeRecord(tree),RustBuffer.allocFromBytes(key)) return result.consumeIntoTypeTreeRecord end def delete_named_root(name) name = Prolly::uniffi_bytes(name) - + Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_prollytransaction_delete_named_root,uniffi_clone_handle(),RustBuffer.allocFromBytes(name)) end - + def get(tree, key) tree = tree RustBuffer.check_lower_TypeTreeRecord(tree) key = Prolly::uniffi_bytes(key) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_prollytransaction_get,uniffi_clone_handle(),RustBuffer.alloc_from_TypeTreeRecord(tree),RustBuffer.allocFromBytes(key)) return result.consumeIntoOptionalbytes end def load_named_root(name) name = Prolly::uniffi_bytes(name) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_prollytransaction_load_named_root,uniffi_clone_handle(),RustBuffer.allocFromBytes(name)) return result.consumeIntoOptionalTypeTreeRecord end def publish_named_root(name, tree) name = Prolly::uniffi_bytes(name) - + tree = tree RustBuffer.check_lower_TypeTreeRecord(tree) Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_prollytransaction_publish_named_root,uniffi_clone_handle(),RustBuffer.allocFromBytes(name),RustBuffer.alloc_from_TypeTreeRecord(tree)) end - + def put(tree, key, value) tree = tree RustBuffer.check_lower_TypeTreeRecord(tree) key = Prolly::uniffi_bytes(key) - + value = Prolly::uniffi_bytes(value) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_prollytransaction_put,uniffi_clone_handle(),RustBuffer.alloc_from_TypeTreeRecord(tree),RustBuffer.allocFromBytes(key),RustBuffer.allocFromBytes(value)) return result.consumeIntoTypeTreeRecord end def rollback() Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_prollytransaction_rollback,uniffi_clone_handle(),) end - - + + end - + class AsyncProllyEngine # A private helper for initializing instances of the class from a raw handle, @@ -29664,7 +30365,7 @@ def initialize(store, config) ObjectSpace.define_finalizer(self, self.class.uniffi_define_finalizer_by_handle(handle, self.object_id)) end - + def batch(tree, mutations) tree = tree @@ -29686,7 +30387,7 @@ def collect_stats(tree) end def compare_and_swap_named_root(name, expected, replacement) name = Prolly::uniffi_bytes(name) - + expected = (expected ? expected : nil) RustBuffer.check_lower_OptionalTypeTreeRecord(expected) replacement = (replacement ? replacement : nil) @@ -29702,16 +30403,16 @@ def delete(tree, key) tree = tree RustBuffer.check_lower_TypeTreeRecord(tree) key = Prolly::uniffi_bytes(key) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_asyncprollyengine_delete,uniffi_clone_handle(),RustBuffer.alloc_from_TypeTreeRecord(tree),RustBuffer.allocFromBytes(key)) return result.consumeIntoTypeTreeRecord end def delete_named_root(name) name = Prolly::uniffi_bytes(name) - + Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_asyncprollyengine_delete_named_root,uniffi_clone_handle(),RustBuffer.allocFromBytes(name)) end - + def diff(base, other) base = base RustBuffer.check_lower_TypeTreeRecord(base) @@ -29724,7 +30425,7 @@ def get(tree, key) tree = tree RustBuffer.check_lower_TypeTreeRecord(tree) key = Prolly::uniffi_bytes(key) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_asyncprollyengine_get,uniffi_clone_handle(),RustBuffer.alloc_from_TypeTreeRecord(tree),RustBuffer.allocFromBytes(key)) return result.consumeIntoOptionalbytes end @@ -29742,7 +30443,7 @@ def list_named_roots() end def load_named_root(name) name = Prolly::uniffi_bytes(name) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_asyncprollyengine_load_named_root,uniffi_clone_handle(),RustBuffer.allocFromBytes(name)) return result.consumeIntoOptionalTypeTreeRecord end @@ -29762,35 +30463,35 @@ def prefix(tree, prefix) tree = tree RustBuffer.check_lower_TypeTreeRecord(tree) prefix = Prolly::uniffi_bytes(prefix) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_asyncprollyengine_prefix,uniffi_clone_handle(),RustBuffer.alloc_from_TypeTreeRecord(tree),RustBuffer.allocFromBytes(prefix)) return result.consumeIntoSequenceTypeEntryRecord end def publish_named_root(name, tree) name = Prolly::uniffi_bytes(name) - + tree = tree RustBuffer.check_lower_TypeTreeRecord(tree) Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_asyncprollyengine_publish_named_root,uniffi_clone_handle(),RustBuffer.allocFromBytes(name),RustBuffer.alloc_from_TypeTreeRecord(tree)) end - + def publish_named_root_at_millis(name, tree, timestamp_millis) name = Prolly::uniffi_bytes(name) - + tree = tree RustBuffer.check_lower_TypeTreeRecord(tree) timestamp_millis = Prolly::uniffi_in_range(timestamp_millis, "u64", 0, 2**64) - + Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_asyncprollyengine_publish_named_root_at_millis,uniffi_clone_handle(),RustBuffer.allocFromBytes(name),RustBuffer.alloc_from_TypeTreeRecord(tree),timestamp_millis) end - + def put(tree, key, value) tree = tree RustBuffer.check_lower_TypeTreeRecord(tree) key = Prolly::uniffi_bytes(key) - + value = Prolly::uniffi_bytes(value) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_asyncprollyengine_put,uniffi_clone_handle(),RustBuffer.alloc_from_TypeTreeRecord(tree),RustBuffer.allocFromBytes(key),RustBuffer.allocFromBytes(value)) return result.consumeIntoTypeTreeRecord end @@ -29798,7 +30499,7 @@ def range(tree, start, _end) tree = tree RustBuffer.check_lower_TypeTreeRecord(tree) start = Prolly::uniffi_bytes(start) - + _end = (_end ? Prolly::uniffi_bytes(_end) : nil) RustBuffer.check_lower_Optionalbytes(_end) result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_asyncprollyengine_range,uniffi_clone_handle(),RustBuffer.alloc_from_TypeTreeRecord(tree),RustBuffer.allocFromBytes(start),RustBuffer.alloc_from_Optionalbytes(_end)) @@ -29812,13 +30513,13 @@ def range_page(tree, cursor, _end, limit) _end = (_end ? Prolly::uniffi_bytes(_end) : nil) RustBuffer.check_lower_Optionalbytes(_end) limit = Prolly::uniffi_in_range(limit, "u64", 0, 2**64) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_asyncprollyengine_range_page,uniffi_clone_handle(),RustBuffer.alloc_from_TypeTreeRecord(tree),RustBuffer.alloc_from_OptionalTypeRangeCursorRecord(cursor),RustBuffer.alloc_from_Optionalbytes(_end),limit) return result.consumeIntoTypeRangePageRecord end - + end - + class AsyncProllyTransaction # A private helper for initializing instances of the class from a raw handle, @@ -29862,7 +30563,7 @@ def self.uniffi_lower(inst) return inst.uniffi_clone_handle() end - + def batch(tree, mutations) tree = tree @@ -29878,7 +30579,7 @@ def commit() end def compare_and_swap_named_root(name, expected, replacement) name = Prolly::uniffi_bytes(name) - + expected = (expected ? expected : nil) RustBuffer.check_lower_OptionalTypeTreeRecord(expected) replacement = (replacement ? replacement : nil) @@ -29894,65 +30595,65 @@ def delete(tree, key) tree = tree RustBuffer.check_lower_TypeTreeRecord(tree) key = Prolly::uniffi_bytes(key) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_asyncprollytransaction_delete,uniffi_clone_handle(),RustBuffer.alloc_from_TypeTreeRecord(tree),RustBuffer.allocFromBytes(key)) return result.consumeIntoTypeTreeRecord end def delete_named_root(name) name = Prolly::uniffi_bytes(name) - + Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_asyncprollytransaction_delete_named_root,uniffi_clone_handle(),RustBuffer.allocFromBytes(name)) end - + def get(tree, key) tree = tree RustBuffer.check_lower_TypeTreeRecord(tree) key = Prolly::uniffi_bytes(key) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_asyncprollytransaction_get,uniffi_clone_handle(),RustBuffer.alloc_from_TypeTreeRecord(tree),RustBuffer.allocFromBytes(key)) return result.consumeIntoOptionalbytes end def load_named_root(name) name = Prolly::uniffi_bytes(name) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_asyncprollytransaction_load_named_root,uniffi_clone_handle(),RustBuffer.allocFromBytes(name)) return result.consumeIntoOptionalTypeTreeRecord end def publish_named_root(name, tree) name = Prolly::uniffi_bytes(name) - + tree = tree RustBuffer.check_lower_TypeTreeRecord(tree) Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_asyncprollytransaction_publish_named_root,uniffi_clone_handle(),RustBuffer.allocFromBytes(name),RustBuffer.alloc_from_TypeTreeRecord(tree)) end - + def publish_named_root_at_millis(name, tree, timestamp_millis) name = Prolly::uniffi_bytes(name) - + tree = tree RustBuffer.check_lower_TypeTreeRecord(tree) timestamp_millis = Prolly::uniffi_in_range(timestamp_millis, "u64", 0, 2**64) - + Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_asyncprollytransaction_publish_named_root_at_millis,uniffi_clone_handle(),RustBuffer.allocFromBytes(name),RustBuffer.alloc_from_TypeTreeRecord(tree),timestamp_millis) end - + def put(tree, key, value) tree = tree RustBuffer.check_lower_TypeTreeRecord(tree) key = Prolly::uniffi_bytes(key) - + value = Prolly::uniffi_bytes(value) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_asyncprollytransaction_put,uniffi_clone_handle(),RustBuffer.alloc_from_TypeTreeRecord(tree),RustBuffer.allocFromBytes(key),RustBuffer.allocFromBytes(value)) return result.consumeIntoTypeTreeRecord end def rollback() Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_asyncprollytransaction_rollback,uniffi_clone_handle(),) end - - + + end - + class ForeignRemoteStore # A private helper for initializing instances of the class from a raw handle, @@ -29996,7 +30697,7 @@ def self.uniffi_lower(inst) return inst.uniffi_clone_handle() end - + def descriptor() result = Prolly.rust_call(:uniffi_prolly_bindings_fn_method_foreignremotestore_descriptor,uniffi_clone_handle(),) @@ -30004,21 +30705,21 @@ def descriptor() end def get_node(cid) cid = Prolly::uniffi_bytes(cid) - + result = Prolly.rust_call(:uniffi_prolly_bindings_fn_method_foreignremotestore_get_node,uniffi_clone_handle(),RustBuffer.allocFromBytes(cid)) return result.consumeIntoTypeOptionalBytesResultRecord end def put_node(cid, value) cid = Prolly::uniffi_bytes(cid) - + value = Prolly::uniffi_bytes(value) - + result = Prolly.rust_call(:uniffi_prolly_bindings_fn_method_foreignremotestore_put_node,uniffi_clone_handle(),RustBuffer.allocFromBytes(cid),RustBuffer.allocFromBytes(value)) return result.consumeIntoTypeUnitResultRecord end def delete_node(cid) cid = Prolly::uniffi_bytes(cid) - + result = Prolly.rust_call(:uniffi_prolly_bindings_fn_method_foreignremotestore_delete_node,uniffi_clone_handle(),RustBuffer.allocFromBytes(cid)) return result.consumeIntoTypeUnitResultRecord end @@ -30046,19 +30747,19 @@ def list_node_cids() end def get_hint(namespace, key) namespace = Prolly::uniffi_bytes(namespace) - + key = Prolly::uniffi_bytes(key) - + result = Prolly.rust_call(:uniffi_prolly_bindings_fn_method_foreignremotestore_get_hint,uniffi_clone_handle(),RustBuffer.allocFromBytes(namespace),RustBuffer.allocFromBytes(key)) return result.consumeIntoTypeOptionalBytesResultRecord end def put_hint(namespace, key, value) namespace = Prolly::uniffi_bytes(namespace) - + key = Prolly::uniffi_bytes(key) - + value = Prolly::uniffi_bytes(value) - + result = Prolly.rust_call(:uniffi_prolly_bindings_fn_method_foreignremotestore_put_hint,uniffi_clone_handle(),RustBuffer.allocFromBytes(namespace),RustBuffer.allocFromBytes(key),RustBuffer.allocFromBytes(value)) return result.consumeIntoTypeUnitResultRecord end @@ -30066,37 +30767,37 @@ def batch_put_nodes_with_hint(nodes, namespace, key, value) nodes = nodes RustBuffer.check_lower_SequenceTypeNodeEntryRecord(nodes) namespace = Prolly::uniffi_bytes(namespace) - + key = Prolly::uniffi_bytes(key) - + value = Prolly::uniffi_bytes(value) - + result = Prolly.rust_call(:uniffi_prolly_bindings_fn_method_foreignremotestore_batch_put_nodes_with_hint,uniffi_clone_handle(),RustBuffer.alloc_from_SequenceTypeNodeEntryRecord(nodes),RustBuffer.allocFromBytes(namespace),RustBuffer.allocFromBytes(key),RustBuffer.allocFromBytes(value)) return result.consumeIntoTypeUnitResultRecord end def get_root_manifest(name) name = Prolly::uniffi_bytes(name) - + result = Prolly.rust_call(:uniffi_prolly_bindings_fn_method_foreignremotestore_get_root_manifest,uniffi_clone_handle(),RustBuffer.allocFromBytes(name)) return result.consumeIntoTypeOptionalBytesResultRecord end def put_root_manifest(name, manifest) name = Prolly::uniffi_bytes(name) - + manifest = Prolly::uniffi_bytes(manifest) - + result = Prolly.rust_call(:uniffi_prolly_bindings_fn_method_foreignremotestore_put_root_manifest,uniffi_clone_handle(),RustBuffer.allocFromBytes(name),RustBuffer.allocFromBytes(manifest)) return result.consumeIntoTypeUnitResultRecord end def delete_root_manifest(name) name = Prolly::uniffi_bytes(name) - + result = Prolly.rust_call(:uniffi_prolly_bindings_fn_method_foreignremotestore_delete_root_manifest,uniffi_clone_handle(),RustBuffer.allocFromBytes(name)) return result.consumeIntoTypeUnitResultRecord end def compare_and_swap_root_manifest(name, expected, new) name = Prolly::uniffi_bytes(name) - + expected = expected RustBuffer.check_lower_TypeOptionalBytesRecord(expected) new = new @@ -30118,9 +30819,9 @@ def commit_transaction(nodes, conditions, roots) result = Prolly.rust_call(:uniffi_prolly_bindings_fn_method_foreignremotestore_commit_transaction,uniffi_clone_handle(),RustBuffer.alloc_from_SequenceTypeNodeMutationRecord(nodes),RustBuffer.alloc_from_SequenceTypeRootConditionRecord(conditions),RustBuffer.alloc_from_SequenceTypeRootWriteRecord(roots)) return result.consumeIntoTypeTransactionResultRecord end - + end - + class BindingIndexRegistry # A private helper for initializing instances of the class from a raw handle, @@ -30169,7 +30870,7 @@ def initialize() ObjectSpace.define_finalizer(self, self.class.uniffi_define_finalizer_by_handle(handle, self.object_id)) end - + def len() result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingindexregistry_len,uniffi_clone_handle(),) @@ -30177,11 +30878,11 @@ def len() end def register(name, generation, extractor_id, projection, limits, extractor) name = Prolly::uniffi_bytes(name) - + generation = Prolly::uniffi_in_range(generation, "u64", 0, 2**64) - + extractor_id = Prolly::uniffi_utf8(extractor_id) - + projection = projection RustBuffer.check_lower_TypeIndexProjectionRecord(projection) limits = (limits ? limits : nil) @@ -30190,10 +30891,10 @@ def register(name, generation, extractor_id, projection, limits, extractor) (SecondaryIndexExtractorCallback.uniffi_check_lower extractor) Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingindexregistry_register,uniffi_clone_handle(),RustBuffer.allocFromBytes(name),generation,RustBuffer.allocFromString(extractor_id),RustBuffer.alloc_from_TypeIndexProjectionRecord(projection),RustBuffer.alloc_from_OptionalTypeSecondaryIndexLimitsRecord(limits),(SecondaryIndexExtractorCallback.uniffi_lower extractor)) end - - + + end - + class BindingIndexedMap # A private helper for initializing instances of the class from a raw handle, @@ -30240,7 +30941,7 @@ def initialize(engine, id, registry) engine = engine (ProllyEngine.uniffi_check_lower engine) id = Prolly::uniffi_bytes(id) - + registry = registry (BindingIndexRegistry.uniffi_check_lower registry) handle = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_constructor_bindingindexedmap_new,(ProllyEngine.uniffi_lower engine),RustBuffer.allocFromBytes(id),(BindingIndexRegistry.uniffi_lower registry)) @@ -30248,7 +30949,7 @@ def initialize(engine, id, registry) ObjectSpace.define_finalizer(self, self.class.uniffi_define_finalizer_by_handle(handle, self.object_id)) end - + def apply(mutations) mutations = mutations @@ -30266,19 +30967,19 @@ def apply_if(expected_source, mutations) end def deactivate_index(name) name = Prolly::uniffi_bytes(name) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingindexedmap_deactivate_index,uniffi_clone_handle(),RustBuffer.allocFromBytes(name)) return result.consumeIntoTypeIndexedVersionRecord end def delete(key) key = Prolly::uniffi_bytes(key) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingindexedmap_delete,uniffi_clone_handle(),RustBuffer.allocFromBytes(key)) return result.consumeIntoTypeIndexedVersionRecord end def ensure_index(name) name = Prolly::uniffi_bytes(name) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingindexedmap_ensure_index,uniffi_clone_handle(),RustBuffer.allocFromBytes(name)) return result.consumeIntoTypeIndexBuildResultRecord end @@ -30292,7 +30993,7 @@ def fast_handle() end def get(key) key = Prolly::uniffi_bytes(key) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingindexedmap_get,uniffi_clone_handle(),RustBuffer.allocFromBytes(key)) return result.consumeIntoOptionalbytes end @@ -30306,7 +31007,7 @@ def id() end def import_current(bundle, expected_source) bundle = Prolly::uniffi_bytes(bundle) - + expected_source = (expected_source ? Prolly::uniffi_bytes(expected_source) : nil) RustBuffer.check_lower_Optionalbytes(expected_source) result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingindexedmap_import_current,uniffi_clone_handle(),RustBuffer.allocFromBytes(bundle),RustBuffer.alloc_from_Optionalbytes(expected_source)) @@ -30314,7 +31015,7 @@ def import_current(bundle, expected_source) end def keep_last(count) count = Prolly::uniffi_in_range(count, "u64", 0, 2**64) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingindexedmap_keep_last,uniffi_clone_handle(),count) return result.consumeIntoTypeIndexedRetentionRecord end @@ -30328,27 +31029,27 @@ def plan_gc() end def put(key, value) key = Prolly::uniffi_bytes(key) - + value = Prolly::uniffi_bytes(value) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingindexedmap_put,uniffi_clone_handle(),RustBuffer.allocFromBytes(key),RustBuffer.allocFromBytes(value)) return result.consumeIntoTypeIndexedVersionRecord end def repair_index(name, source_version) name = Prolly::uniffi_bytes(name) - + source_version = Prolly::uniffi_bytes(source_version) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingindexedmap_repair_index,uniffi_clone_handle(),RustBuffer.allocFromBytes(name),RustBuffer.allocFromBytes(source_version)) return result.consumeIntoTypeIndexVerificationRecord end def replace_index(name, generation, extractor_id, projection, limits, extractor) name = Prolly::uniffi_bytes(name) - + generation = Prolly::uniffi_in_range(generation, "u64", 0, 2**64) - + extractor_id = Prolly::uniffi_utf8(extractor_id) - + projection = projection RustBuffer.check_lower_TypeIndexProjectionRecord(projection) limits = (limits ? limits : nil) @@ -30364,7 +31065,7 @@ def snapshot() end def snapshot_at(source_version) source_version = Prolly::uniffi_bytes(source_version) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingindexedmap_snapshot_at,uniffi_clone_handle(),RustBuffer.allocFromBytes(source_version)) return BindingIndexedSnapshot.uniffi_allocate(result) end @@ -30376,21 +31077,21 @@ def snapshot_by_id(snapshot_id) end def verify_all(source_version) source_version = Prolly::uniffi_bytes(source_version) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingindexedmap_verify_all,uniffi_clone_handle(),RustBuffer.allocFromBytes(source_version)) return result.consumeIntoSequenceTypeIndexVerificationRecord end def verify_index(name, source_version) name = Prolly::uniffi_bytes(name) - + source_version = Prolly::uniffi_bytes(source_version) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingindexedmap_verify_index,uniffi_clone_handle(),RustBuffer.allocFromBytes(name),RustBuffer.allocFromBytes(source_version)) return result.consumeIntoTypeIndexVerificationRecord end - + end - + class BindingIndexedSnapshot # A private helper for initializing instances of the class from a raw handle, @@ -30434,7 +31135,7 @@ def self.uniffi_lower(inst) return inst.uniffi_clone_handle() end - + def id() result = Prolly.rust_call(:uniffi_prolly_bindings_fn_method_bindingindexedsnapshot_id,uniffi_clone_handle(),) @@ -30442,13 +31143,13 @@ def id() end def index(name) name = Prolly::uniffi_bytes(name) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingindexedsnapshot_index,uniffi_clone_handle(),RustBuffer.allocFromBytes(name)) return BindingSecondaryIndexSnapshot.uniffi_allocate(result) end - + end - + class BindingSecondaryIndexSnapshot # A private helper for initializing instances of the class from a raw handle, @@ -30492,31 +31193,31 @@ def self.uniffi_lower(inst) return inst.uniffi_clone_handle() end - + def exact(term) term = Prolly::uniffi_bytes(term) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingsecondaryindexsnapshot_exact,uniffi_clone_handle(),RustBuffer.allocFromBytes(term)) return result.consumeIntoSequenceTypeIndexMatchRecord end def exact_page(term, cursor, limit) term = Prolly::uniffi_bytes(term) - + cursor = (cursor ? Prolly::uniffi_bytes(cursor) : nil) RustBuffer.check_lower_Optionalbytes(cursor) limit = Prolly::uniffi_in_range(limit, "u64", 0, 2**64) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingsecondaryindexsnapshot_exact_page,uniffi_clone_handle(),RustBuffer.allocFromBytes(term),RustBuffer.alloc_from_Optionalbytes(cursor),limit) return result.consumeIntoTypeIndexPageRecord end def exact_reverse_page(term, cursor, limit) term = Prolly::uniffi_bytes(term) - + cursor = (cursor ? Prolly::uniffi_bytes(cursor) : nil) RustBuffer.check_lower_Optionalbytes(cursor) limit = Prolly::uniffi_in_range(limit, "u64", 0, 2**64) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingsecondaryindexsnapshot_exact_reverse_page,uniffi_clone_handle(),RustBuffer.allocFromBytes(term),RustBuffer.alloc_from_Optionalbytes(cursor),limit) return result.consumeIntoTypeIndexPageRecord end @@ -30530,33 +31231,33 @@ def name() end def prefix(prefix) prefix = Prolly::uniffi_bytes(prefix) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingsecondaryindexsnapshot_prefix,uniffi_clone_handle(),RustBuffer.allocFromBytes(prefix)) return result.consumeIntoSequenceTypeIndexMatchRecord end def prefix_page(prefix, cursor, limit) prefix = Prolly::uniffi_bytes(prefix) - + cursor = (cursor ? Prolly::uniffi_bytes(cursor) : nil) RustBuffer.check_lower_Optionalbytes(cursor) limit = Prolly::uniffi_in_range(limit, "u64", 0, 2**64) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingsecondaryindexsnapshot_prefix_page,uniffi_clone_handle(),RustBuffer.allocFromBytes(prefix),RustBuffer.alloc_from_Optionalbytes(cursor),limit) return result.consumeIntoTypeIndexPageRecord end def prefix_reverse_page(prefix, cursor, limit) prefix = Prolly::uniffi_bytes(prefix) - + cursor = (cursor ? Prolly::uniffi_bytes(cursor) : nil) RustBuffer.check_lower_Optionalbytes(cursor) limit = Prolly::uniffi_in_range(limit, "u64", 0, 2**64) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingsecondaryindexsnapshot_prefix_reverse_page,uniffi_clone_handle(),RustBuffer.allocFromBytes(prefix),RustBuffer.alloc_from_Optionalbytes(cursor),limit) return result.consumeIntoTypeIndexPageRecord end def range(start, range_end) start = Prolly::uniffi_bytes(start) - + range_end = (range_end ? Prolly::uniffi_bytes(range_end) : nil) RustBuffer.check_lower_Optionalbytes(range_end) result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingsecondaryindexsnapshot_range,uniffi_clone_handle(),RustBuffer.allocFromBytes(start),RustBuffer.alloc_from_Optionalbytes(range_end)) @@ -30564,37 +31265,37 @@ def range(start, range_end) end def range_page(start, range_end, cursor, limit) start = Prolly::uniffi_bytes(start) - + range_end = (range_end ? Prolly::uniffi_bytes(range_end) : nil) RustBuffer.check_lower_Optionalbytes(range_end) cursor = (cursor ? Prolly::uniffi_bytes(cursor) : nil) RustBuffer.check_lower_Optionalbytes(cursor) limit = Prolly::uniffi_in_range(limit, "u64", 0, 2**64) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingsecondaryindexsnapshot_range_page,uniffi_clone_handle(),RustBuffer.allocFromBytes(start),RustBuffer.alloc_from_Optionalbytes(range_end),RustBuffer.alloc_from_Optionalbytes(cursor),limit) return result.consumeIntoTypeIndexPageRecord end def range_reverse_page(start, range_end, cursor, limit) start = Prolly::uniffi_bytes(start) - + range_end = (range_end ? Prolly::uniffi_bytes(range_end) : nil) RustBuffer.check_lower_Optionalbytes(range_end) cursor = (cursor ? Prolly::uniffi_bytes(cursor) : nil) RustBuffer.check_lower_Optionalbytes(cursor) limit = Prolly::uniffi_in_range(limit, "u64", 0, 2**64) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingsecondaryindexsnapshot_range_reverse_page,uniffi_clone_handle(),RustBuffer.allocFromBytes(start),RustBuffer.alloc_from_Optionalbytes(range_end),RustBuffer.alloc_from_Optionalbytes(cursor),limit) return result.consumeIntoTypeIndexPageRecord end def records(term) term = Prolly::uniffi_bytes(term) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingsecondaryindexsnapshot_records,uniffi_clone_handle(),RustBuffer.allocFromBytes(term)) return result.consumeIntoSequenceTypeIndexedSourceRecord end - + end - + class SecondaryIndexExtractorCallback # A private helper for initializing instances of the class from a raw handle, @@ -30638,19 +31339,19 @@ def self.uniffi_lower(inst) return inst.uniffi_clone_handle() end - + def extract(primary_key, source_value) primary_key = Prolly::uniffi_bytes(primary_key) - + source_value = Prolly::uniffi_bytes(source_value) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_secondaryindexextractorcallback_extract,uniffi_clone_handle(),RustBuffer.allocFromBytes(primary_key),RustBuffer.allocFromBytes(source_value)) return result.consumeIntoSequenceTypeIndexEntryRecord end - + end - + class BindingAcceleratorCatalog # A private helper for initializing instances of the class from a raw handle, @@ -30694,7 +31395,7 @@ def self.uniffi_lower(inst) return inst.uniffi_clone_handle() end - + def entries() result = Prolly.rust_call(:uniffi_prolly_bindings_fn_method_bindingacceleratorcatalog_entries,uniffi_clone_handle(),) @@ -30748,9 +31449,9 @@ def source_descriptor() result = Prolly.rust_call(:uniffi_prolly_bindings_fn_method_bindingacceleratorcatalog_source_descriptor,uniffi_clone_handle(),) return result.consumeIntoBytes end - + end - + class BindingCompositeAccelerator # A private helper for initializing instances of the class from a raw handle, @@ -30794,7 +31495,7 @@ def self.uniffi_lower(inst) return inst.uniffi_clone_handle() end - + def base_kind() result = Prolly.rust_call(:uniffi_prolly_bindings_fn_method_bindingcompositeaccelerator_base_kind,uniffi_clone_handle(),) @@ -30868,9 +31569,9 @@ def shadow_count() result = Prolly.rust_call(:uniffi_prolly_bindings_fn_method_bindingcompositeaccelerator_shadow_count,uniffi_clone_handle(),) return result.to_i end - + end - + class BindingHnswIndex # A private helper for initializing instances of the class from a raw handle, @@ -30914,7 +31615,7 @@ def self.uniffi_lower(inst) return inst.uniffi_clone_handle() end - + def config() result = Prolly.rust_call(:uniffi_prolly_bindings_fn_method_bindinghnswindex_config,uniffi_clone_handle(),) @@ -30972,9 +31673,9 @@ def source_descriptor() result = Prolly.rust_call(:uniffi_prolly_bindings_fn_method_bindinghnswindex_source_descriptor,uniffi_clone_handle(),) return result.consumeIntoBytes end - + end - + class BindingProductQuantizer # A private helper for initializing instances of the class from a raw handle, @@ -31018,7 +31719,7 @@ def self.uniffi_lower(inst) return inst.uniffi_clone_handle() end - + def config() result = Prolly.rust_call(:uniffi_prolly_bindings_fn_method_bindingproductquantizer_config,uniffi_clone_handle(),) @@ -31076,9 +31777,9 @@ def source_descriptor() result = Prolly.rust_call(:uniffi_prolly_bindings_fn_method_bindingproductquantizer_source_descriptor,uniffi_clone_handle(),) return result.consumeIntoBytes end - + end - + class BindingProximityCancellationToken # A private helper for initializing instances of the class from a raw handle, @@ -31127,19 +31828,19 @@ def initialize() ObjectSpace.define_finalizer(self, self.class.uniffi_define_finalizer_by_handle(handle, self.object_id)) end - + def cancel() Prolly.rust_call(:uniffi_prolly_bindings_fn_method_bindingproximitycancellationtoken_cancel,uniffi_clone_handle(),) end - + def is_cancelled() result = Prolly.rust_call(:uniffi_prolly_bindings_fn_method_bindingproximitycancellationtoken_is_cancelled,uniffi_clone_handle(),) return 1 == result end - + end - + class BindingProximityMap # A private helper for initializing instances of the class from a raw handle, @@ -31183,16 +31884,18 @@ def self.uniffi_lower(inst) return inst.uniffi_clone_handle() end - - def build_accelerator_catalog(hnsw, pq, composite) + + def build_accelerator_catalog(hnsw, pq, turboquant, composite) hnsw = (hnsw ? hnsw : nil) RustBuffer.check_lower_OptionalTypeBindingHnswIndex(hnsw) pq = (pq ? pq : nil) RustBuffer.check_lower_OptionalTypeBindingProductQuantizer(pq) + turboquant = (turboquant ? turboquant : nil) + RustBuffer.check_lower_OptionalTypeBindingTurboQuantizer(turboquant) composite = (composite ? composite : nil) RustBuffer.check_lower_OptionalTypeBindingCompositeAccelerator(composite) - result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingproximitymap_build_accelerator_catalog,uniffi_clone_handle(),RustBuffer.alloc_from_OptionalTypeBindingHnswIndex(hnsw),RustBuffer.alloc_from_OptionalTypeBindingProductQuantizer(pq),RustBuffer.alloc_from_OptionalTypeBindingCompositeAccelerator(composite)) + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingproximitymap_build_accelerator_catalog,uniffi_clone_handle(),RustBuffer.alloc_from_OptionalTypeBindingHnswIndex(hnsw),RustBuffer.alloc_from_OptionalTypeBindingProductQuantizer(pq),RustBuffer.alloc_from_OptionalTypeBindingTurboQuantizer(turboquant),RustBuffer.alloc_from_OptionalTypeBindingCompositeAccelerator(composite)) return BindingAcceleratorCatalog.uniffi_allocate(result) end def build_composite_hnsw(base_map, base, config, limits) @@ -31219,6 +31922,18 @@ def build_composite_pq(base_map, base, config, limits) result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingproximitymap_build_composite_pq,uniffi_clone_handle(),(BindingProximityMap.uniffi_lower base_map),(BindingProductQuantizer.uniffi_lower base),RustBuffer.alloc_from_TypeCompositeAcceleratorConfigRecord(config),RustBuffer.alloc_from_TypeCompositeBuildLimitsRecord(limits)) return result.consumeIntoTypeCompositeBuildOutcomeRecord end + def build_composite_turboquant(base_map, base, config, limits) + base_map = base_map + (BindingProximityMap.uniffi_check_lower base_map) + base = base + (BindingTurboQuantizer.uniffi_check_lower base) + config = config + RustBuffer.check_lower_TypeCompositeAcceleratorConfigRecord(config) + limits = limits + RustBuffer.check_lower_TypeCompositeBuildLimitsRecord(limits) + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingproximitymap_build_composite_turboquant,uniffi_clone_handle(),(BindingProximityMap.uniffi_lower base_map),(BindingTurboQuantizer.uniffi_lower base),RustBuffer.alloc_from_TypeCompositeAcceleratorConfigRecord(config),RustBuffer.alloc_from_TypeCompositeBuildLimitsRecord(limits)) + return result.consumeIntoTypeCompositeBuildOutcomeRecord + end def build_hnsw(config, limits) config = config RustBuffer.check_lower_TypeHnswConfigRecord(config) @@ -31255,27 +31970,51 @@ def build_or_rebuild_composite_pq(base_map, base, config, limits, rebuild) result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingproximitymap_build_or_rebuild_composite_pq,uniffi_clone_handle(),(BindingProximityMap.uniffi_lower base_map),(BindingProductQuantizer.uniffi_lower base),RustBuffer.alloc_from_TypeCompositeAcceleratorConfigRecord(config),RustBuffer.alloc_from_TypeCompositeBuildLimitsRecord(limits),RustBuffer.alloc_from_TypeCompositeRebuildOptionsRecord(rebuild)) return result.consumeIntoTypeCompositeBuildOrRebuildOutcomeRecord end + def build_or_rebuild_composite_turboquant(base_map, base, config, limits, rebuild) + base_map = base_map + (BindingProximityMap.uniffi_check_lower base_map) + base = base + (BindingTurboQuantizer.uniffi_check_lower base) + config = config + RustBuffer.check_lower_TypeCompositeAcceleratorConfigRecord(config) + limits = limits + RustBuffer.check_lower_TypeCompositeBuildLimitsRecord(limits) + rebuild = rebuild + RustBuffer.check_lower_TypeCompositeRebuildOptionsRecord(rebuild) + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingproximitymap_build_or_rebuild_composite_turboquant,uniffi_clone_handle(),(BindingProximityMap.uniffi_lower base_map),(BindingTurboQuantizer.uniffi_lower base),RustBuffer.alloc_from_TypeCompositeAcceleratorConfigRecord(config),RustBuffer.alloc_from_TypeCompositeBuildLimitsRecord(limits),RustBuffer.alloc_from_TypeCompositeRebuildOptionsRecord(rebuild)) + return result.consumeIntoTypeCompositeBuildOrRebuildOutcomeRecord + end def build_pq(config, worker_threads, limits) config = config RustBuffer.check_lower_TypeProductQuantizationConfigRecord(config) worker_threads = Prolly::uniffi_in_range(worker_threads, "u64", 0, 2**64) - + limits = limits RustBuffer.check_lower_TypeProductQuantizationBuildLimitsRecord(limits) result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingproximitymap_build_pq,uniffi_clone_handle(),RustBuffer.alloc_from_TypeProductQuantizationConfigRecord(config),worker_threads,RustBuffer.alloc_from_TypeProductQuantizationBuildLimitsRecord(limits)) return result.consumeIntoTypeProductQuantizationBuildResultRecord end + def build_turboquant(config, worker_threads, limits) + config = config + RustBuffer.check_lower_TypeTurboQuantizationConfigRecord(config) + worker_threads = Prolly::uniffi_in_range(worker_threads, "u64", 0, 2**64) + + limits = limits + RustBuffer.check_lower_TypeTurboQuantizationBuildLimitsRecord(limits) + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingproximitymap_build_turboquant,uniffi_clone_handle(),RustBuffer.alloc_from_TypeTurboQuantizationConfigRecord(config),worker_threads,RustBuffer.alloc_from_TypeTurboQuantizationBuildLimitsRecord(limits)) + return result.consumeIntoTypeTurboQuantizationBuildResultRecord + end def clear_content_cache() Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingproximitymap_clear_content_cache,uniffi_clone_handle(),) end - + def config() result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingproximitymap_config,uniffi_clone_handle(),) return result.consumeIntoTypeProximityConfigRecord end def contains_key(key) key = Prolly::uniffi_bytes(key) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingproximitymap_contains_key,uniffi_clone_handle(),RustBuffer.allocFromBytes(key)) return 1 == result end @@ -31293,34 +32032,40 @@ def fast_handle() end def get(key) key = Prolly::uniffi_bytes(key) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingproximitymap_get,uniffi_clone_handle(),RustBuffer.allocFromBytes(key)) return result.consumeIntoOptionalTypeExactProximityRecordRecord end def load_accelerator_catalog(manifest) manifest = Prolly::uniffi_bytes(manifest) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingproximitymap_load_accelerator_catalog,uniffi_clone_handle(),RustBuffer.allocFromBytes(manifest)) return BindingAcceleratorCatalog.uniffi_allocate(result) end def load_composite(manifest) manifest = Prolly::uniffi_bytes(manifest) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingproximitymap_load_composite,uniffi_clone_handle(),RustBuffer.allocFromBytes(manifest)) return BindingCompositeAccelerator.uniffi_allocate(result) end def load_hnsw(manifest) manifest = Prolly::uniffi_bytes(manifest) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingproximitymap_load_hnsw,uniffi_clone_handle(),RustBuffer.allocFromBytes(manifest)) return BindingHnswIndex.uniffi_allocate(result) end def load_pq(manifest) manifest = Prolly::uniffi_bytes(manifest) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingproximitymap_load_pq,uniffi_clone_handle(),RustBuffer.allocFromBytes(manifest)) return BindingProductQuantizer.uniffi_allocate(result) end + def load_turboquant(manifest) + manifest = Prolly::uniffi_bytes(manifest) + + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingproximitymap_load_turboquant,uniffi_clone_handle(),RustBuffer.allocFromBytes(manifest)) + return BindingTurboQuantizer.uniffi_allocate(result) + end def mutate(mutations) mutations = mutations RustBuffer.check_lower_SequenceTypeProximityMutationRecord(mutations) @@ -31329,7 +32074,7 @@ def mutate(mutations) end def prove_membership(key) key = Prolly::uniffi_bytes(key) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingproximitymap_prove_membership,uniffi_clone_handle(),RustBuffer.allocFromBytes(key)) return result.consumeIntoTypeProximityMembershipProofRecord end @@ -31391,9 +32136,9 @@ def verify() result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingproximitymap_verify,uniffi_clone_handle(),) return result.consumeIntoTypeProximityVerificationRecord end - + end - + class BindingProximityReadSession # A private helper for initializing instances of the class from a raw handle, @@ -31437,11 +32182,11 @@ def self.uniffi_lower(inst) return inst.uniffi_clone_handle() end - + def contains_key(key) key = Prolly::uniffi_bytes(key) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingproximityreadsession_contains_key,uniffi_clone_handle(),RustBuffer.allocFromBytes(key)) return 1 == result end @@ -31451,7 +32196,7 @@ def fast_handle() end def get(key) key = Prolly::uniffi_bytes(key) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingproximityreadsession_get,uniffi_clone_handle(),RustBuffer.allocFromBytes(key)) return result.consumeIntoOptionalTypeExactProximityRecordRecord end @@ -31485,9 +32230,9 @@ def search_with_runtime(request, runtime) result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingproximityreadsession_search_with_runtime,uniffi_clone_handle(),RustBuffer.alloc_from_TypeProximitySearchRequestRecord(request),(BindingProximitySearchRuntime.uniffi_lower runtime)) return result.consumeIntoTypeProximitySearchResultRecord end - + end - + class BindingProximitySearchProof # A private helper for initializing instances of the class from a raw handle, @@ -31531,7 +32276,7 @@ def self.uniffi_lower(inst) return inst.uniffi_clone_handle() end - + def source_descriptor() result = Prolly.rust_call(:uniffi_prolly_bindings_fn_method_bindingproximitysearchproof_source_descriptor,uniffi_clone_handle(),) @@ -31545,9 +32290,9 @@ def verify(expected_descriptor, limits) result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingproximitysearchproof_verify,uniffi_clone_handle(),RustBuffer.alloc_from_Optionalbytes(expected_descriptor),RustBuffer.alloc_from_TypeContentGraphLimitsRecord(limits)) return result.consumeIntoTypeProximitySearchVerificationRecord end - + end - + class BindingProximitySearchRuntime # A private helper for initializing instances of the class from a raw handle, @@ -31591,12 +32336,12 @@ def self.uniffi_lower(inst) return inst.uniffi_clone_handle() end - + def clear() Prolly.rust_call(:uniffi_prolly_bindings_fn_method_bindingproximitysearchruntime_clear,uniffi_clone_handle(),) end - + def policy() result = Prolly.rust_call(:uniffi_prolly_bindings_fn_method_bindingproximitysearchruntime_policy,uniffi_clone_handle(),) return result.consumeIntoTypeProximitySearchRuntimePolicyRecord @@ -31605,9 +32350,119 @@ def stats() result = Prolly.rust_call(:uniffi_prolly_bindings_fn_method_bindingproximitysearchruntime_stats,uniffi_clone_handle(),) return result.consumeIntoTypeProximitySearchRuntimeStatsRecord end - + +end + + class BindingTurboQuantizer + + # A private helper for initializing instances of the class from a raw handle, + # bypassing any initialization logic and ensuring they are GC'd properly. + def self.uniffi_allocate(handle) + inst = allocate + inst.instance_variable_set :@handle, handle + ObjectSpace.define_finalizer(inst, uniffi_define_finalizer_by_handle(handle, inst.object_id)) + return inst + end + + # A private helper for registering an object finalizer. + # N.B. it's important that this does not capture a reference + # to the actual instance, only its underlying handle. + def self.uniffi_define_finalizer_by_handle(handle, object_id) + Proc.new do |_id| + Prolly.rust_call( + :uniffi_prolly_bindings_fn_free_bindingturboquantizer, + handle + ) + end + end + + # A private helper for lowering instances into a raw handle. + # This does an explicit typecheck, because accidentally lowering a different type of + # object in a place where this type is expected, could lead to memory unsafety. + def self.uniffi_check_lower(inst) + if not inst.is_a? self + raise TypeError.new "Expected a BindingTurboQuantizer instance, got #{inst}" + end + end + + def uniffi_clone_handle() + return Prolly.rust_call( + :uniffi_prolly_bindings_fn_clone_bindingturboquantizer, + @handle + ) + end + + def self.uniffi_lower(inst) + return inst.uniffi_clone_handle() + end + + + + def config() + result = Prolly.rust_call(:uniffi_prolly_bindings_fn_method_bindingturboquantizer_config,uniffi_clone_handle(),) + return result.consumeIntoTypeTurboQuantizationConfigRecord + end + def manifest() + result = Prolly.rust_call(:uniffi_prolly_bindings_fn_method_bindingturboquantizer_manifest,uniffi_clone_handle(),) + return result.consumeIntoBytes + end + def prove_search(map, request, limits) + map = map + (BindingProximityMap.uniffi_check_lower map) + request = request + RustBuffer.check_lower_TypeProximitySearchRequestRecord(request) + limits = limits + RustBuffer.check_lower_TypeContentGraphLimitsRecord(limits) + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingturboquantizer_prove_search,uniffi_clone_handle(),(BindingProximityMap.uniffi_lower map),RustBuffer.alloc_from_TypeProximitySearchRequestRecord(request),RustBuffer.alloc_from_TypeContentGraphLimitsRecord(limits)) + return BindingProximitySearchProof.uniffi_allocate(result) + end + def quality() + result = Prolly.rust_call(:uniffi_prolly_bindings_fn_method_bindingturboquantizer_quality,uniffi_clone_handle(),) + return result.consumeIntoTypeTurboQuantizationQualityRecord + end + def search(map, request) + map = map + (BindingProximityMap.uniffi_check_lower map) + request = request + RustBuffer.check_lower_TypeProximitySearchRequestRecord(request) + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingturboquantizer_search,uniffi_clone_handle(),(BindingProximityMap.uniffi_lower map),RustBuffer.alloc_from_TypeProximitySearchRequestRecord(request)) + return result.consumeIntoTypeProximitySearchResultRecord + end + def search_cancellable(map, request, runtime, cancellation) + map = map + (BindingProximityMap.uniffi_check_lower map) + request = request + RustBuffer.check_lower_TypeProximitySearchRequestRecord(request) + runtime = (runtime ? runtime : nil) + RustBuffer.check_lower_OptionalTypeBindingProximitySearchRuntime(runtime) + cancellation = cancellation + (BindingProximityCancellationToken.uniffi_check_lower cancellation) + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingturboquantizer_search_cancellable,uniffi_clone_handle(),(BindingProximityMap.uniffi_lower map),RustBuffer.alloc_from_TypeProximitySearchRequestRecord(request),RustBuffer.alloc_from_OptionalTypeBindingProximitySearchRuntime(runtime),(BindingProximityCancellationToken.uniffi_lower cancellation)) + return result.consumeIntoTypeProximitySearchResultRecord + end + def search_with_runtime(map, request, runtime) + map = map + (BindingProximityMap.uniffi_check_lower map) + request = request + RustBuffer.check_lower_TypeProximitySearchRequestRecord(request) + runtime = runtime + (BindingProximitySearchRuntime.uniffi_check_lower runtime) + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingturboquantizer_search_with_runtime,uniffi_clone_handle(),(BindingProximityMap.uniffi_lower map),RustBuffer.alloc_from_TypeProximitySearchRequestRecord(request),(BindingProximitySearchRuntime.uniffi_lower runtime)) + return result.consumeIntoTypeProximitySearchResultRecord + end + def source_descriptor() + result = Prolly.rust_call(:uniffi_prolly_bindings_fn_method_bindingturboquantizer_source_descriptor,uniffi_clone_handle(),) + return result.consumeIntoBytes + end + def verify(map) + map = map + (BindingProximityMap.uniffi_check_lower map) + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingturboquantizer_verify,uniffi_clone_handle(),(BindingProximityMap.uniffi_lower map)) + return result.consumeIntoTypeTurboQuantizationVerificationRecord + end + end - + class ProximityRecordVisitorCallback # A private helper for initializing instances of the class from a raw handle, @@ -31651,7 +32506,7 @@ def self.uniffi_lower(inst) return inst.uniffi_clone_handle() end - + def visit(record) record = record @@ -31659,9 +32514,9 @@ def visit(record) result = Prolly.rust_call(:uniffi_prolly_bindings_fn_method_proximityrecordvisitorcallback_visit,uniffi_clone_handle(),RustBuffer.alloc_from_TypeProximityRecordRecord(record)) return 1 == result end - + end - + class BindingMapComparison # A private helper for initializing instances of the class from a raw handle, @@ -31705,7 +32560,7 @@ def self.uniffi_lower(inst) return inst.uniffi_clone_handle() end - + def base() result = Prolly.rust_call(:uniffi_prolly_bindings_fn_method_bindingmapcomparison_base,uniffi_clone_handle(),) @@ -31729,7 +32584,7 @@ def diff_page(cursor, range_end, limit) range_end = (range_end ? Prolly::uniffi_bytes(range_end) : nil) RustBuffer.check_lower_Optionalbytes(range_end) limit = Prolly::uniffi_in_range(limit, "u64", 0, 2**64) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingmapcomparison_diff_page,uniffi_clone_handle(),RustBuffer.alloc_from_OptionalTypeRangeCursorRecord(cursor),RustBuffer.alloc_from_Optionalbytes(range_end),limit) return result.consumeIntoTypeDiffPageRecord end @@ -31739,7 +32594,7 @@ def prove_diff_page(cursor, range_end, limit) range_end = (range_end ? Prolly::uniffi_bytes(range_end) : nil) RustBuffer.check_lower_Optionalbytes(range_end) limit = Prolly::uniffi_in_range(limit, "u64", 0, 2**64) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingmapcomparison_prove_diff_page,uniffi_clone_handle(),RustBuffer.alloc_from_OptionalTypeRangeCursorRecord(cursor),RustBuffer.alloc_from_Optionalbytes(range_end),limit) return result.consumeIntoTypeProvedDiffPageRecord end @@ -31763,7 +32618,7 @@ def structural_diff_page(cursor, limit) cursor = (cursor ? cursor : nil) RustBuffer.check_lower_OptionalTypeStructuralDiffCursorRecord(cursor) limit = Prolly::uniffi_in_range(limit, "u64", 0, 2**64) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingmapcomparison_structural_diff_page,uniffi_clone_handle(),RustBuffer.alloc_from_OptionalTypeStructuralDiffCursorRecord(cursor),limit) return result.consumeIntoTypeStructuralDiffPageRecord end @@ -31771,9 +32626,9 @@ def target() result = Prolly.rust_call(:uniffi_prolly_bindings_fn_method_bindingmapcomparison_target,uniffi_clone_handle(),) return result.consumeIntoTypeMapVersionRecord end - + end - + class BindingMapMerge # A private helper for initializing instances of the class from a raw handle, @@ -31817,7 +32672,7 @@ def self.uniffi_lower(inst) return inst.uniffi_clone_handle() end - + def base() result = Prolly.rust_call(:uniffi_prolly_bindings_fn_method_bindingmapmerge_base,uniffi_clone_handle(),) @@ -31831,7 +32686,7 @@ def conflict_page(cursor, limit) cursor = (cursor ? cursor : nil) RustBuffer.check_lower_OptionalTypeRangeCursorRecord(cursor) limit = Prolly::uniffi_in_range(limit, "u64", 0, 2**64) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingmapmerge_conflict_page,uniffi_clone_handle(),RustBuffer.alloc_from_OptionalTypeRangeCursorRecord(cursor),limit) return result.consumeIntoTypeConflictPageRecord end @@ -31887,9 +32742,9 @@ def scan_conflicts(visitor) result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingmapmerge_scan_conflicts,uniffi_clone_handle(),(ConflictVisitorCallback.uniffi_lower visitor)) return result.consumeIntoTypeScanOutcomeRecord end - + end - + class BindingMapSnapshot # A private helper for initializing instances of the class from a raw handle, @@ -31933,11 +32788,11 @@ def self.uniffi_lower(inst) return inst.uniffi_clone_handle() end - + def contains_key(key) key = Prolly::uniffi_bytes(key) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingmapsnapshot_contains_key,uniffi_clone_handle(),RustBuffer.allocFromBytes(key)) return 1 == result end @@ -31949,11 +32804,11 @@ def copy_missing_nodes(destination) end def cursor_window(key, range_end, limit) key = Prolly::uniffi_bytes(key) - + range_end = (range_end ? Prolly::uniffi_bytes(range_end) : nil) RustBuffer.check_lower_Optionalbytes(range_end) limit = Prolly::uniffi_in_range(limit, "u64", 0, 2**64) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingmapsnapshot_cursor_window,uniffi_clone_handle(),RustBuffer.allocFromBytes(key),RustBuffer.alloc_from_Optionalbytes(range_end),limit) return result.consumeIntoTypeCursorWindowRecord end @@ -31971,7 +32826,7 @@ def first_entry() end def get(key) key = Prolly::uniffi_bytes(key) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingmapsnapshot_get,uniffi_clone_handle(),RustBuffer.allocFromBytes(key)) return result.consumeIntoOptionalbytes end @@ -31983,13 +32838,13 @@ def get_many(keys) end def get_value_ref(key) key = Prolly::uniffi_bytes(key) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingmapsnapshot_get_value_ref,uniffi_clone_handle(),RustBuffer.allocFromBytes(key)) return result.consumeIntoOptionalTypeValueRefRecord end def hydrate_prefix_hint(prefix) prefix = Prolly::uniffi_bytes(prefix) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingmapsnapshot_hydrate_prefix_hint,uniffi_clone_handle(),RustBuffer.allocFromBytes(prefix)) return 1 == result end @@ -32003,13 +32858,13 @@ def last_entry() end def lower_bound(key) key = Prolly::uniffi_bytes(key) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingmapsnapshot_lower_bound,uniffi_clone_handle(),RustBuffer.allocFromBytes(key)) return result.consumeIntoOptionalTypeEntryRecord end def pin_path(key) key = Prolly::uniffi_bytes(key) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingmapsnapshot_pin_path,uniffi_clone_handle(),RustBuffer.allocFromBytes(key)) return result.to_i end @@ -32025,33 +32880,33 @@ def plan_missing_nodes(destination) end def prefix(prefix) prefix = Prolly::uniffi_bytes(prefix) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingmapsnapshot_prefix,uniffi_clone_handle(),RustBuffer.allocFromBytes(prefix)) return result.consumeIntoSequenceTypeEntryRecord end def prefix_page(prefix, cursor, limit) prefix = Prolly::uniffi_bytes(prefix) - + cursor = (cursor ? cursor : nil) RustBuffer.check_lower_OptionalTypeRangeCursorRecord(cursor) limit = Prolly::uniffi_in_range(limit, "u64", 0, 2**64) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingmapsnapshot_prefix_page,uniffi_clone_handle(),RustBuffer.allocFromBytes(prefix),RustBuffer.alloc_from_OptionalTypeRangeCursorRecord(cursor),limit) return result.consumeIntoTypeRangePageRecord end def prefix_reverse_page(prefix, cursor, limit) prefix = Prolly::uniffi_bytes(prefix) - + cursor = (cursor ? cursor : nil) RustBuffer.check_lower_OptionalTypeReverseCursorRecord(cursor) limit = Prolly::uniffi_in_range(limit, "u64", 0, 2**64) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingmapsnapshot_prefix_reverse_page,uniffi_clone_handle(),RustBuffer.allocFromBytes(prefix),RustBuffer.alloc_from_OptionalTypeReverseCursorRecord(cursor),limit) return result.consumeIntoTypeReversePageRecord end def prove_key(key) key = Prolly::uniffi_bytes(key) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingmapsnapshot_prove_key,uniffi_clone_handle(),RustBuffer.allocFromBytes(key)) return result.consumeIntoTypeKeyProofRecord end @@ -32063,13 +32918,13 @@ def prove_keys(keys) end def prove_prefix(prefix) prefix = Prolly::uniffi_bytes(prefix) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingmapsnapshot_prove_prefix,uniffi_clone_handle(),RustBuffer.allocFromBytes(prefix)) return result.consumeIntoTypeRangeProofRecord end def prove_range(start, range_end) start = Prolly::uniffi_bytes(start) - + range_end = (range_end ? Prolly::uniffi_bytes(range_end) : nil) RustBuffer.check_lower_Optionalbytes(range_end) result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingmapsnapshot_prove_range,uniffi_clone_handle(),RustBuffer.allocFromBytes(start),RustBuffer.alloc_from_Optionalbytes(range_end)) @@ -32081,13 +32936,13 @@ def prove_range_page(cursor, range_end, limit) range_end = (range_end ? Prolly::uniffi_bytes(range_end) : nil) RustBuffer.check_lower_Optionalbytes(range_end) limit = Prolly::uniffi_in_range(limit, "u64", 0, 2**64) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingmapsnapshot_prove_range_page,uniffi_clone_handle(),RustBuffer.alloc_from_OptionalTypeRangeCursorRecord(cursor),RustBuffer.alloc_from_Optionalbytes(range_end),limit) return result.consumeIntoTypeProvedRangePageRecord end def publish_prefix_hint(prefix) prefix = Prolly::uniffi_bytes(prefix) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingmapsnapshot_publish_prefix_hint,uniffi_clone_handle(),RustBuffer.allocFromBytes(prefix)) return 1 == result end @@ -32099,7 +32954,7 @@ def push_to(destination) end def range(start, range_end) start = Prolly::uniffi_bytes(start) - + range_end = (range_end ? Prolly::uniffi_bytes(range_end) : nil) RustBuffer.check_lower_Optionalbytes(range_end) result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingmapsnapshot_range,uniffi_clone_handle(),RustBuffer.allocFromBytes(start),RustBuffer.alloc_from_Optionalbytes(range_end)) @@ -32111,7 +32966,7 @@ def range_page(cursor, range_end, limit) range_end = (range_end ? Prolly::uniffi_bytes(range_end) : nil) RustBuffer.check_lower_Optionalbytes(range_end) limit = Prolly::uniffi_in_range(limit, "u64", 0, 2**64) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingmapsnapshot_range_page,uniffi_clone_handle(),RustBuffer.alloc_from_OptionalTypeRangeCursorRecord(cursor),RustBuffer.alloc_from_Optionalbytes(range_end),limit) return result.consumeIntoTypeRangePageRecord end @@ -32123,15 +32978,15 @@ def reverse_page(cursor, start, limit) cursor = (cursor ? cursor : nil) RustBuffer.check_lower_OptionalTypeReverseCursorRecord(cursor) start = Prolly::uniffi_bytes(start) - + limit = Prolly::uniffi_in_range(limit, "u64", 0, 2**64) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingmapsnapshot_reverse_page,uniffi_clone_handle(),RustBuffer.alloc_from_OptionalTypeReverseCursorRecord(cursor),RustBuffer.allocFromBytes(start),limit) return result.consumeIntoTypeReversePageRecord end def scan_prefix(prefix, visitor) prefix = Prolly::uniffi_bytes(prefix) - + visitor = visitor (EntryVisitorCallback.uniffi_check_lower visitor) result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingmapsnapshot_scan_prefix,uniffi_clone_handle(),RustBuffer.allocFromBytes(prefix),(EntryVisitorCallback.uniffi_lower visitor)) @@ -32139,7 +32994,7 @@ def scan_prefix(prefix, visitor) end def scan_range(start, range_end, visitor) start = Prolly::uniffi_bytes(start) - + range_end = (range_end ? Prolly::uniffi_bytes(range_end) : nil) RustBuffer.check_lower_Optionalbytes(range_end) visitor = visitor @@ -32157,7 +33012,7 @@ def tree() end def upper_bound(key) key = Prolly::uniffi_bytes(key) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingmapsnapshot_upper_bound,uniffi_clone_handle(),RustBuffer.allocFromBytes(key)) return result.consumeIntoOptionalTypeEntryRecord end @@ -32165,9 +33020,9 @@ def version() result = Prolly.rust_call(:uniffi_prolly_bindings_fn_method_bindingmapsnapshot_version,uniffi_clone_handle(),) return result.consumeIntoTypeMapVersionRecord end - + end - + class BindingMapSubscription # A private helper for initializing instances of the class from a raw handle, @@ -32211,7 +33066,7 @@ def self.uniffi_lower(inst) return inst.uniffi_clone_handle() end - + def last_seen() result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingmapsubscription_last_seen,uniffi_clone_handle(),) @@ -32221,9 +33076,9 @@ def poll() result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingmapsubscription_poll,uniffi_clone_handle(),) return result.consumeIntoOptionalTypeMapChangeEventRecord end - + end - + class BindingVersionedMap # A private helper for initializing instances of the class from a raw handle, @@ -32270,13 +33125,13 @@ def initialize(engine, id) engine = engine (ProllyEngine.uniffi_check_lower engine) id = Prolly::uniffi_bytes(id) - + handle = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_constructor_bindingversionedmap_new,(ProllyEngine.uniffi_lower engine),RustBuffer.allocFromBytes(id)) @handle = handle ObjectSpace.define_finalizer(self, self.class.uniffi_define_finalizer_by_handle(handle, self.object_id)) end - + def append(mutations) mutations = mutations @@ -32294,7 +33149,7 @@ def apply_at_millis(mutations, timestamp_millis) mutations = mutations RustBuffer.check_lower_SequenceTypeMutationRecord(mutations) timestamp_millis = Prolly::uniffi_in_range(timestamp_millis, "u64", 0, 2**64) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingversionedmap_apply_at_millis,uniffi_clone_handle(),RustBuffer.alloc_from_SequenceTypeMutationRecord(mutations),timestamp_millis) return result.consumeIntoTypeMapVersionRecord end @@ -32312,7 +33167,7 @@ def apply_if_at_millis(expected, mutations, timestamp_millis) mutations = mutations RustBuffer.check_lower_SequenceTypeMutationRecord(mutations) timestamp_millis = Prolly::uniffi_in_range(timestamp_millis, "u64", 0, 2**64) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingversionedmap_apply_if_at_millis,uniffi_clone_handle(),RustBuffer.alloc_from_Optionalbytes(expected),RustBuffer.alloc_from_SequenceTypeMutationRecord(mutations),timestamp_millis) return result.consumeIntoTypeMapUpdateRecord end @@ -32322,33 +33177,33 @@ def backup() end def changes_since(base) base = Prolly::uniffi_bytes(base) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingversionedmap_changes_since,uniffi_clone_handle(),RustBuffer.allocFromBytes(base)) return result.consumeIntoSequenceTypeDiffRecord end def compare(base, target) base = Prolly::uniffi_bytes(base) - + target = Prolly::uniffi_bytes(target) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingversionedmap_compare,uniffi_clone_handle(),RustBuffer.allocFromBytes(base),RustBuffer.allocFromBytes(target)) return BindingMapComparison.uniffi_allocate(result) end def compare_to_head(base) base = Prolly::uniffi_bytes(base) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingversionedmap_compare_to_head,uniffi_clone_handle(),RustBuffer.allocFromBytes(base)) return BindingMapComparison.uniffi_allocate(result) end def contains_key(key) key = Prolly::uniffi_bytes(key) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingversionedmap_contains_key,uniffi_clone_handle(),RustBuffer.allocFromBytes(key)) return 1 == result end def delete(key) key = Prolly::uniffi_bytes(key) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingversionedmap_delete,uniffi_clone_handle(),RustBuffer.allocFromBytes(key)) return result.consumeIntoTypeMapVersionRecord end @@ -32356,15 +33211,15 @@ def delete_if(expected, key) expected = (expected ? Prolly::uniffi_bytes(expected) : nil) RustBuffer.check_lower_Optionalbytes(expected) key = Prolly::uniffi_bytes(key) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingversionedmap_delete_if,uniffi_clone_handle(),RustBuffer.alloc_from_Optionalbytes(expected),RustBuffer.allocFromBytes(key)) return result.consumeIntoTypeMapUpdateRecord end def diff(base, target) base = Prolly::uniffi_bytes(base) - + target = Prolly::uniffi_bytes(target) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingversionedmap_diff,uniffi_clone_handle(),RustBuffer.allocFromBytes(base),RustBuffer.allocFromBytes(target)) return result.consumeIntoSequenceTypeDiffRecord end @@ -32384,15 +33239,15 @@ def edit_if(expected, mutations) end def get(key) key = Prolly::uniffi_bytes(key) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingversionedmap_get,uniffi_clone_handle(),RustBuffer.allocFromBytes(key)) return result.consumeIntoOptionalbytes end def get_at(id, key) id = Prolly::uniffi_bytes(id) - + key = Prolly::uniffi_bytes(key) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingversionedmap_get_at,uniffi_clone_handle(),RustBuffer.allocFromBytes(id),RustBuffer.allocFromBytes(key)) return result.consumeIntoOptionalbytes end @@ -32400,7 +33255,7 @@ def get_large_value(blob_store, key) blob_store = blob_store (ProllyBlobStore.uniffi_check_lower blob_store) key = Prolly::uniffi_bytes(key) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingversionedmap_get_large_value,uniffi_clone_handle(),(ProllyBlobStore.uniffi_lower blob_store),RustBuffer.allocFromBytes(key)) return result.consumeIntoOptionalbytes end @@ -32412,7 +33267,7 @@ def get_many(keys) end def get_many_at(id, keys) id = Prolly::uniffi_bytes(id) - + keys = keys.map { |v| Prolly::uniffi_bytes(v) } RustBuffer.check_lower_Sequencebytes(keys) result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingversionedmap_get_many_at,uniffi_clone_handle(),RustBuffer.allocFromBytes(id),RustBuffer.alloc_from_Sequencebytes(keys)) @@ -32420,15 +33275,15 @@ def get_many_at(id, keys) end def get_value_ref(key) key = Prolly::uniffi_bytes(key) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingversionedmap_get_value_ref,uniffi_clone_handle(),RustBuffer.allocFromBytes(key)) return result.consumeIntoOptionalTypeValueRefRecord end def get_value_ref_at(id, key) id = Prolly::uniffi_bytes(id) - + key = Prolly::uniffi_bytes(key) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingversionedmap_get_value_ref_at,uniffi_clone_handle(),RustBuffer.allocFromBytes(id),RustBuffer.allocFromBytes(key)) return result.consumeIntoOptionalTypeValueRefRecord end @@ -32458,7 +33313,7 @@ def import_as_head_at_millis(bundle, timestamp_millis) bundle = bundle RustBuffer.check_lower_TypeSnapshotBundleRecord(bundle) timestamp_millis = Prolly::uniffi_in_range(timestamp_millis, "u64", 0, 2**64) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingversionedmap_import_as_head_at_millis,uniffi_clone_handle(),RustBuffer.alloc_from_TypeSnapshotBundleRecord(bundle),timestamp_millis) return result.consumeIntoTypeMapVersionRecord end @@ -32478,21 +33333,21 @@ def is_initialized() end def keep_for(max_age_millis) max_age_millis = Prolly::uniffi_in_range(max_age_millis, "u64", 0, 2**64) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingversionedmap_keep_for,uniffi_clone_handle(),max_age_millis) return result.consumeIntoTypeVersionPruneRecord end def keep_for_at(now_millis, max_age_millis) now_millis = Prolly::uniffi_in_range(now_millis, "u64", 0, 2**64) - + max_age_millis = Prolly::uniffi_in_range(max_age_millis, "u64", 0, 2**64) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingversionedmap_keep_for_at,uniffi_clone_handle(),now_millis,max_age_millis) return result.consumeIntoTypeVersionPruneRecord end def keep_last(count) count = Prolly::uniffi_in_range(count, "u64", 0, 2**64) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingversionedmap_keep_last,uniffi_clone_handle(),count) return result.consumeIntoTypeVersionPruneRecord end @@ -32522,59 +33377,59 @@ def plan_gc() end def prefix(prefix) prefix = Prolly::uniffi_bytes(prefix) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingversionedmap_prefix,uniffi_clone_handle(),RustBuffer.allocFromBytes(prefix)) return result.consumeIntoSequenceTypeEntryRecord end def prefix_at(id, prefix) id = Prolly::uniffi_bytes(id) - + prefix = Prolly::uniffi_bytes(prefix) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingversionedmap_prefix_at,uniffi_clone_handle(),RustBuffer.allocFromBytes(id),RustBuffer.allocFromBytes(prefix)) return result.consumeIntoSequenceTypeEntryRecord end def prefix_page(prefix, cursor, limit) prefix = Prolly::uniffi_bytes(prefix) - + cursor = (cursor ? cursor : nil) RustBuffer.check_lower_OptionalTypeRangeCursorRecord(cursor) limit = Prolly::uniffi_in_range(limit, "u64", 0, 2**64) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingversionedmap_prefix_page,uniffi_clone_handle(),RustBuffer.allocFromBytes(prefix),RustBuffer.alloc_from_OptionalTypeRangeCursorRecord(cursor),limit) return result.consumeIntoTypeRangePageRecord end def prefix_page_at(id, prefix, cursor, limit) id = Prolly::uniffi_bytes(id) - + prefix = Prolly::uniffi_bytes(prefix) - + cursor = (cursor ? cursor : nil) RustBuffer.check_lower_OptionalTypeRangeCursorRecord(cursor) limit = Prolly::uniffi_in_range(limit, "u64", 0, 2**64) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingversionedmap_prefix_page_at,uniffi_clone_handle(),RustBuffer.allocFromBytes(id),RustBuffer.allocFromBytes(prefix),RustBuffer.alloc_from_OptionalTypeRangeCursorRecord(cursor),limit) return result.consumeIntoTypeRangePageRecord end def prepare_merge(base, candidate) base = Prolly::uniffi_bytes(base) - + candidate = Prolly::uniffi_bytes(candidate) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingversionedmap_prepare_merge,uniffi_clone_handle(),RustBuffer.allocFromBytes(base),RustBuffer.allocFromBytes(candidate)) return BindingMapMerge.uniffi_allocate(result) end def prune_versions(keep_latest) keep_latest = Prolly::uniffi_in_range(keep_latest, "u64", 0, 2**64) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingversionedmap_prune_versions,uniffi_clone_handle(),keep_latest) return result.consumeIntoTypeVersionPruneRecord end def put(key, value) key = Prolly::uniffi_bytes(key) - + value = Prolly::uniffi_bytes(value) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingversionedmap_put,uniffi_clone_handle(),RustBuffer.allocFromBytes(key),RustBuffer.allocFromBytes(value)) return result.consumeIntoTypeMapVersionRecord end @@ -32582,9 +33437,9 @@ def put_if(expected, key, value) expected = (expected ? Prolly::uniffi_bytes(expected) : nil) RustBuffer.check_lower_Optionalbytes(expected) key = Prolly::uniffi_bytes(key) - + value = Prolly::uniffi_bytes(value) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingversionedmap_put_if,uniffi_clone_handle(),RustBuffer.alloc_from_Optionalbytes(expected),RustBuffer.allocFromBytes(key),RustBuffer.allocFromBytes(value)) return result.consumeIntoTypeMapUpdateRecord end @@ -32592,9 +33447,9 @@ def put_large_value(blob_store, key, value, config) blob_store = blob_store (ProllyBlobStore.uniffi_check_lower blob_store) key = Prolly::uniffi_bytes(key) - + value = Prolly::uniffi_bytes(value) - + config = config RustBuffer.check_lower_TypeLargeValueConfigRecord(config) result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingversionedmap_put_large_value,uniffi_clone_handle(),(ProllyBlobStore.uniffi_lower blob_store),RustBuffer.allocFromBytes(key),RustBuffer.allocFromBytes(value),RustBuffer.alloc_from_TypeLargeValueConfigRecord(config)) @@ -32606,9 +33461,9 @@ def put_large_value_if(blob_store, expected, key, value, config) expected = (expected ? Prolly::uniffi_bytes(expected) : nil) RustBuffer.check_lower_Optionalbytes(expected) key = Prolly::uniffi_bytes(key) - + value = Prolly::uniffi_bytes(value) - + config = config RustBuffer.check_lower_TypeLargeValueConfigRecord(config) result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingversionedmap_put_large_value_if,uniffi_clone_handle(),(ProllyBlobStore.uniffi_lower blob_store),RustBuffer.alloc_from_Optionalbytes(expected),RustBuffer.allocFromBytes(key),RustBuffer.allocFromBytes(value),RustBuffer.alloc_from_TypeLargeValueConfigRecord(config)) @@ -32616,7 +33471,7 @@ def put_large_value_if(blob_store, expected, key, value, config) end def range(start, range_end) start = Prolly::uniffi_bytes(start) - + range_end = (range_end ? Prolly::uniffi_bytes(range_end) : nil) RustBuffer.check_lower_Optionalbytes(range_end) result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingversionedmap_range,uniffi_clone_handle(),RustBuffer.allocFromBytes(start),RustBuffer.alloc_from_Optionalbytes(range_end)) @@ -32624,9 +33479,9 @@ def range(start, range_end) end def range_at(id, start, range_end) id = Prolly::uniffi_bytes(id) - + start = Prolly::uniffi_bytes(start) - + range_end = (range_end ? Prolly::uniffi_bytes(range_end) : nil) RustBuffer.check_lower_Optionalbytes(range_end) result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingversionedmap_range_at,uniffi_clone_handle(),RustBuffer.allocFromBytes(id),RustBuffer.allocFromBytes(start),RustBuffer.alloc_from_Optionalbytes(range_end)) @@ -32638,19 +33493,19 @@ def range_page(cursor, range_end, limit) range_end = (range_end ? Prolly::uniffi_bytes(range_end) : nil) RustBuffer.check_lower_Optionalbytes(range_end) limit = Prolly::uniffi_in_range(limit, "u64", 0, 2**64) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingversionedmap_range_page,uniffi_clone_handle(),RustBuffer.alloc_from_OptionalTypeRangeCursorRecord(cursor),RustBuffer.alloc_from_Optionalbytes(range_end),limit) return result.consumeIntoTypeRangePageRecord end def range_page_at(id, cursor, range_end, limit) id = Prolly::uniffi_bytes(id) - + cursor = (cursor ? cursor : nil) RustBuffer.check_lower_OptionalTypeRangeCursorRecord(cursor) range_end = (range_end ? Prolly::uniffi_bytes(range_end) : nil) RustBuffer.check_lower_Optionalbytes(range_end) limit = Prolly::uniffi_in_range(limit, "u64", 0, 2**64) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingversionedmap_range_page_at,uniffi_clone_handle(),RustBuffer.allocFromBytes(id),RustBuffer.alloc_from_OptionalTypeRangeCursorRecord(cursor),RustBuffer.alloc_from_Optionalbytes(range_end),limit) return result.consumeIntoTypeRangePageRecord end @@ -32684,7 +33539,7 @@ def rebuild_sorted_if(expected, entries) end def restore_backup(bytes) bytes = Prolly::uniffi_bytes(bytes) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingversionedmap_restore_backup,uniffi_clone_handle(),RustBuffer.allocFromBytes(bytes)) return result.consumeIntoTypeMapVersionRecord end @@ -32694,13 +33549,13 @@ def retention_policy() end def rollback_to(id) id = Prolly::uniffi_bytes(id) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingversionedmap_rollback_to,uniffi_clone_handle(),RustBuffer.allocFromBytes(id)) return result.consumeIntoTypeMapVersionRecord end def scan_prefix(prefix, visitor) prefix = Prolly::uniffi_bytes(prefix) - + visitor = visitor (EntryVisitorCallback.uniffi_check_lower visitor) result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingversionedmap_scan_prefix,uniffi_clone_handle(),RustBuffer.allocFromBytes(prefix),(EntryVisitorCallback.uniffi_lower visitor)) @@ -32708,9 +33563,9 @@ def scan_prefix(prefix, visitor) end def scan_prefix_at(id, prefix, visitor) id = Prolly::uniffi_bytes(id) - + prefix = Prolly::uniffi_bytes(prefix) - + visitor = visitor (EntryVisitorCallback.uniffi_check_lower visitor) result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingversionedmap_scan_prefix_at,uniffi_clone_handle(),RustBuffer.allocFromBytes(id),RustBuffer.allocFromBytes(prefix),(EntryVisitorCallback.uniffi_lower visitor)) @@ -32718,7 +33573,7 @@ def scan_prefix_at(id, prefix, visitor) end def scan_range(start, range_end, visitor) start = Prolly::uniffi_bytes(start) - + range_end = (range_end ? Prolly::uniffi_bytes(range_end) : nil) RustBuffer.check_lower_Optionalbytes(range_end) visitor = visitor @@ -32728,9 +33583,9 @@ def scan_range(start, range_end, visitor) end def scan_range_at(id, start, range_end, visitor) id = Prolly::uniffi_bytes(id) - + start = Prolly::uniffi_bytes(start) - + range_end = (range_end ? Prolly::uniffi_bytes(range_end) : nil) RustBuffer.check_lower_Optionalbytes(range_end) visitor = visitor @@ -32744,7 +33599,7 @@ def snapshot() end def snapshot_at(id) id = Prolly::uniffi_bytes(id) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingversionedmap_snapshot_at,uniffi_clone_handle(),RustBuffer.allocFromBytes(id)) return result.consumeIntoOptionalTypeBindingMapSnapshot end @@ -32774,7 +33629,7 @@ def verify_catalog() end def version(id) id = Prolly::uniffi_bytes(id) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingversionedmap_version,uniffi_clone_handle(),RustBuffer.allocFromBytes(id)) return result.consumeIntoOptionalTypeMapVersionRecord end @@ -32786,9 +33641,9 @@ def versions_prefix() result = Prolly.rust_call(:uniffi_prolly_bindings_fn_method_bindingversionedmap_versions_prefix,uniffi_clone_handle(),) return result.consumeIntoBytes end - + end - + class BindingVersionedTransaction # A private helper for initializing instances of the class from a raw handle, @@ -32832,11 +33687,11 @@ def self.uniffi_lower(inst) return inst.uniffi_clone_handle() end - + def apply(map_id, mutations) map_id = Prolly::uniffi_bytes(map_id) - + mutations = mutations RustBuffer.check_lower_SequenceTypeMutationRecord(mutations) result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingversionedtransaction_apply,uniffi_clone_handle(),RustBuffer.allocFromBytes(map_id),RustBuffer.alloc_from_SequenceTypeMutationRecord(mutations)) @@ -32844,7 +33699,7 @@ def apply(map_id, mutations) end def apply_if(map_id, expected, mutations) map_id = Prolly::uniffi_bytes(map_id) - + expected = (expected ? Prolly::uniffi_bytes(expected) : nil) RustBuffer.check_lower_Optionalbytes(expected) mutations = mutations @@ -32858,41 +33713,41 @@ def commit() end def delete(map_id, key) map_id = Prolly::uniffi_bytes(map_id) - + key = Prolly::uniffi_bytes(key) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingversionedtransaction_delete,uniffi_clone_handle(),RustBuffer.allocFromBytes(map_id),RustBuffer.allocFromBytes(key)) return result.consumeIntoTypeMapVersionRecord end def get(map_id, key) map_id = Prolly::uniffi_bytes(map_id) - + key = Prolly::uniffi_bytes(key) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingversionedtransaction_get,uniffi_clone_handle(),RustBuffer.allocFromBytes(map_id),RustBuffer.allocFromBytes(key)) return result.consumeIntoOptionalbytes end def head(map_id) map_id = Prolly::uniffi_bytes(map_id) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingversionedtransaction_head,uniffi_clone_handle(),RustBuffer.allocFromBytes(map_id)) return result.consumeIntoOptionalTypeMapVersionRecord end def put(map_id, key, value) map_id = Prolly::uniffi_bytes(map_id) - + key = Prolly::uniffi_bytes(key) - + value = Prolly::uniffi_bytes(value) - + result = Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingversionedtransaction_put,uniffi_clone_handle(),RustBuffer.allocFromBytes(map_id),RustBuffer.allocFromBytes(key),RustBuffer.allocFromBytes(value)) return result.consumeIntoTypeMapVersionRecord end def rollback() Prolly.rust_call_with_error(ProllyBindingError,:uniffi_prolly_bindings_fn_method_bindingversionedtransaction_rollback,uniffi_clone_handle(),) end - - + + end - + end diff --git a/bindings/ruby/test/all_tests.rb b/bindings/ruby/test/all_tests.rb new file mode 100644 index 00000000..727ff530 --- /dev/null +++ b/bindings/ruby/test/all_tests.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +require 'rbconfig' + +# Run the procedural wire/engine smoke contract and the Minitest portable API +# contract (including TurboQuant) in separate processes. This also guarantees +# that UniFFI finalizers from one suite finish before the next suite starts. +library = File.expand_path('../lib', __dir__) +%w[prolly_smoke_test.rb portable_parity_test.rb].each do |test| + command = [RbConfig.ruby, "-I#{library}", File.expand_path(test, __dir__)] + abort "Ruby binding test failed: #{test}" unless system(*command) +end diff --git a/bindings/ruby/test/portable_parity_test.rb b/bindings/ruby/test/portable_parity_test.rb index 1ce30d63..c355c414 100644 --- a/bindings/ruby/test/portable_parity_test.rb +++ b/bindings/ruby/test/portable_parity_test.rb @@ -152,7 +152,8 @@ def test_composite_and_catalog_lifecycle_is_portable_and_bounded filter: exact.filter, kernel: exact.kernel, backend: Prolly::SearchBackendRecord::COMPOSITE, hnsw_ef_search: exact.hnsw_ef_search, - pq_rerank_multiplier: exact.pq_rerank_multiplier + pq_rerank_multiplier: exact.pq_rerank_multiplier, + turboquant_rerank_multiplier: exact.turboquant_rerank_multiplier ) built.accelerator.use do |composite| assert_equal Prolly::CompositeBaseKindRecord::HNSW, composite.base_kind @@ -231,7 +232,8 @@ def test_product_quantizer_lifecycle_is_portable_and_bounded kernel: exact.kernel, backend: Prolly::SearchBackendRecord::PRODUCT_QUANTIZED, hnsw_ef_search: exact.hnsw_ef_search, - pq_rerank_multiplier: exact.pq_rerank_multiplier + pq_rerank_multiplier: exact.pq_rerank_multiplier, + turboquant_rerank_multiplier: exact.turboquant_rerank_multiplier ) built.index.use do |index| assert_equal config, index.config @@ -260,6 +262,104 @@ def test_product_quantizer_lifecycle_is_portable_and_bounded end end + def test_turboquantizer_lifecycle_is_portable_and_verified + Prolly::Engine.memory.use do |engine| + proximity = engine.build_proximity( + dimensions: 8, + records: 16.times.map do |index| + Prolly::ProximityRecord.new( + key: format('turbo-%02d', index).b, + vector: [index.to_f, (index % 3).to_f, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0], + value: format('value-%02d', index).b + ) + end + ) + config = Prolly::TurboQuantizationConfigRecord.new( + bit_width: 4, + rerank_multiplier: 4, + seed: (1 << 64) - 1 + ) + built = proximity.build_turboquant(config: config, worker_threads: 2) + assert_equal 16, built.stats.encoded_vectors + exact = Prolly.exact_proximity_search_request( + [0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0], 3 + ) + request = Prolly::ProximitySearchRequestRecord.new( + query: exact.query, + k: exact.k, + policy: Prolly::SearchPolicyKind::FIXED_BUDGET, + adaptive_quality: exact.adaptive_quality, + budget: exact.budget, + filter: exact.filter, + kernel: exact.kernel, + backend: Prolly::SearchBackendRecord::TURBO_QUANTIZED, + hnsw_ef_search: exact.hnsw_ef_search, + pq_rerank_multiplier: exact.pq_rerank_multiplier, + turboquant_rerank_multiplier: exact.turboquant_rerank_multiplier + ) + built.index.use do |index| + assert_equal config, index.config + assert_equal proximity.descriptor, index.source_descriptor + assert_equal 16, index.verify(proximity).encoded_vectors + result = index.search(proximity, request) + assert_equal Prolly::SearchBackendRecord::TURBO_QUANTIZED, result.backend + assert_equal 'turbo-00'.b, result.neighbors.first.key + assert_operator result.stats.distance_evaluations, :>, 0 + Prolly::ProximityCancellationToken.new.use do |cancellation| + cancellation.cancel + cancelled = index.search_cancellable( + proximity, request, cancellation: cancellation + ) + assert_equal Prolly::SearchCompletionRecord::CANCELLED, cancelled.completion + assert_empty cancelled.neighbors + end + manifest = index.manifest + index.prove_search(proximity, request).use do |proof| + assert_equal Prolly::SearchBackendRecord::TURBO_QUANTIZED, + proof.verify(proximity.descriptor).result.backend + end + proximity.build_accelerator_catalog(turboquant: index).use do |catalog| + assert_equal Prolly::CatalogAcceleratorKindRecord::TURBO_QUANTIZED, + catalog.entries.first.kind + assert_equal Prolly::SearchBackendRecord::TURBO_QUANTIZED, + catalog.search(proximity, request).backend + end + current, = proximity.mutate([ + Prolly::ProximityMutationRecord.new( + key: 'turbo-00'.b, + vector: [0.25, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0], + value: 'updated'.b + ) + ]) + built_composite = current.build_composite_turboquant(proximity, index) + refute_nil built_composite.accelerator + built_composite.accelerator.use do |composite| + assert_equal Prolly::CompositeBaseKindRecord::TURBO_QUANTIZED, + composite.base_kind + composite_request = Prolly::ProximitySearchRequestRecord.new( + query: request.query, + k: request.k, + policy: request.policy, + adaptive_quality: request.adaptive_quality, + budget: request.budget, + filter: request.filter, + kernel: request.kernel, + backend: Prolly::SearchBackendRecord::COMPOSITE, + hnsw_ef_search: request.hnsw_ef_search, + pq_rerank_multiplier: request.pq_rerank_multiplier, + turboquant_rerank_multiplier: request.turboquant_rerank_multiplier + ) + assert_equal Prolly::SearchBackendRecord::COMPOSITE, + composite.search(current, composite_request).backend + end + current.close + proximity.load_turboquant(manifest).use do |loaded| + assert_equal manifest, loaded.manifest + end + end + end + end + def test_hnsw_accelerator_lifecycle_is_portable Prolly::Engine.memory.use do |engine| proximity = engine.build_proximity( @@ -285,7 +385,8 @@ def test_hnsw_accelerator_lifecycle_is_portable kernel: exact.kernel, backend: Prolly::SearchBackendRecord::HNSW, hnsw_ef_search: exact.hnsw_ef_search, - pq_rerank_multiplier: exact.pq_rerank_multiplier + pq_rerank_multiplier: exact.pq_rerank_multiplier, + turboquant_rerank_multiplier: exact.turboquant_rerank_multiplier ) built.index.use do |index| assert index.canonical? @@ -336,7 +437,8 @@ def test_proximity_rich_search_request_is_shared_by_map_session_and_proof kernel: Prolly::QueryKernelRecord::SCALAR_DETERMINISTIC, backend: Prolly::SearchBackendRecord::AUTO, hnsw_ef_search: nil, - pq_rerank_multiplier: nil + pq_rerank_multiplier: nil, + turboquant_rerank_multiplier: nil ) result = proximity.search(request) diff --git a/bindings/swift/COOKBOOK.md b/bindings/swift/COOKBOOK.md index fc3657ff..eef2bda6 100644 --- a/bindings/swift/COOKBOOK.md +++ b/bindings/swift/COOKBOOK.md @@ -41,3 +41,43 @@ Cursor-resumed diffs use the same `RangeCursorRecord` shape as range pages: `prolly-vector-sidecar`, `prolly-provenance-values`, `prolly-materialized-view`, `prolly-filesystem-snapshot`, and `prolly-durable-sqlite`. + +## Build And Force A TurboQuant RAG Sidecar + +TurboQuant is a disposable routing sidecar. The proximity map remains +authoritative and every retained candidate is reranked from its full-precision +vector. Keep the backend explicit until qualification enables `Auto`. + +```swift +import Foundation + +try Engine.withMemory { engine in + let records = (0..<32).map { index in + ProximityRecord( + key: Data(String(format: "chunk/%02d", index).utf8), + vector: [Float(index), Float(index % 3), 0, 1, 2, 3, 4, 5], + value: Data(String(format: "document-%02d", index).utf8) + ) + } + let proximity = try engine.buildProximity(dimensions: 8, records: records) + defer { proximity.close() } + + let built = try proximity.buildTurboquant(workerThreads: 2) + var request = exactProximitySearchRequest( + query: [0, 0, 0, 1, 2, 3, 4, 5], k: 3 + ) + request.policy = .fixedBudget + request.backend = .turboQuantized + + let index = built.index + let verification = try index.verify(proximity) + precondition(verification.encodedVectors == UInt64(records.count)) + let result = try index.search(proximity, request: request) + precondition(result.backend == .turboQuantized) + let manifest = index.manifest + index.close() + + let reopened = try proximity.loadTurboquant(manifest) + reopened.close() +} +``` diff --git a/bindings/swift/Sources/Prolly/prolly.swift b/bindings/swift/Sources/Prolly/prolly.swift index 78c7bdb2..7ff72199 100644 --- a/bindings/swift/Sources/Prolly/prolly.swift +++ b/bindings/swift/Sources/Prolly/prolly.swift @@ -352,7 +352,7 @@ private func uniffiTraitInterfaceCallWithError( callStatus.pointee.errorBuf = FfiConverterString.lower(String(describing: error)) } } -// Initial value and increment amount for handles. +// Initial value and increment amount for handles. // These ensure that SWIFT handles always have the lowest bit set fileprivate let UNIFFI_HANDLEMAP_INITIAL: UInt64 = 1 fileprivate let UNIFFI_HANDLEMAP_DELTA: UInt64 = 2 @@ -637,45 +637,45 @@ fileprivate struct FfiConverterData: FfiConverterRustBuffer { public protocol AsyncProllyEngineProtocol: AnyObject, Sendable { - + func batch(tree: TreeRecord, mutations: [MutationRecord]) async throws -> TreeRecord - + func beginTransaction() async throws -> AsyncProllyTransaction - + func collectStats(tree: TreeRecord) async throws -> TreeStatsRecord - + func compareAndSwapNamedRoot(name: Data, expected: TreeRecord?, replacement: TreeRecord?) async throws -> NamedRootUpdateRecord - + func create() -> TreeRecord - + func delete(tree: TreeRecord, key: Data) async throws -> TreeRecord - - func deleteNamedRoot(name: Data) async throws - + + func deleteNamedRoot(name: Data) async throws + func diff(base: TreeRecord, other: TreeRecord) async throws -> [DiffRecord] - + func get(tree: TreeRecord, key: Data) async throws -> Data? - + func getMany(tree: TreeRecord, keys: [Data]) async throws -> [Data?] - + func listNamedRoots() async throws -> [NamedRootRecord] - + func loadNamedRoot(name: Data) async throws -> TreeRecord? - + func merge(base: TreeRecord, left: TreeRecord, right: TreeRecord, resolver: String?) async throws -> TreeRecord - + func prefix(tree: TreeRecord, prefix: Data) async throws -> [EntryRecord] - - func publishNamedRoot(name: Data, tree: TreeRecord) async throws - - func publishNamedRootAtMillis(name: Data, tree: TreeRecord, timestampMillis: UInt64) async throws - + + func publishNamedRoot(name: Data, tree: TreeRecord) async throws + + func publishNamedRootAtMillis(name: Data, tree: TreeRecord, timestampMillis: UInt64) async throws + func put(tree: TreeRecord, key: Data, value: Data) async throws -> TreeRecord - + func range(tree: TreeRecord, start: Data, end: Data?) async throws -> [EntryRecord] - + func rangePage(tree: TreeRecord, cursor: RangeCursorRecord?, end: Data?, limit: UInt64) async throws -> RangePageRecord - + } open class AsyncProllyEngine: AsyncProllyEngineProtocol, @unchecked Sendable { fileprivate let handle: UInt64 @@ -729,7 +729,7 @@ public convenience init(store: ForeignRemoteStore, config: ConfigRecord)async th liftFunc: FfiConverterTypeAsyncProllyEngine_lift, errorHandler: FfiConverterTypeProllyBindingError_lift ) - + .uniffiCloneHandle() self.init(unsafeFromHandle: handle) } @@ -743,9 +743,9 @@ public convenience init(store: ForeignRemoteStore, config: ConfigRecord)async th try! rustCall { uniffi_prolly_bindings_fn_free_asyncprollyengine(handle, $0) } } - - + + open func batch(tree: TreeRecord, mutations: [MutationRecord])async throws -> TreeRecord { return try await uniffiRustCallAsync( @@ -762,14 +762,14 @@ open func batch(tree: TreeRecord, mutations: [MutationRecord])async throws -> T errorHandler: FfiConverterTypeProllyBindingError_lift ) } - + open func beginTransaction()async throws -> AsyncProllyTransaction { return try await uniffiRustCallAsync( rustFutureFunc: { uniffi_prolly_bindings_fn_method_asyncprollyengine_begin_transaction( self.uniffiCloneHandle() - + ) }, pollFunc: ffi_prolly_bindings_rust_future_poll_u64, @@ -779,7 +779,7 @@ open func beginTransaction()async throws -> AsyncProllyTransaction { errorHandler: FfiConverterTypeProllyBindingError_lift ) } - + open func collectStats(tree: TreeRecord)async throws -> TreeStatsRecord { return try await uniffiRustCallAsync( @@ -796,7 +796,7 @@ open func collectStats(tree: TreeRecord)async throws -> TreeStatsRecord { errorHandler: FfiConverterTypeProllyBindingError_lift ) } - + open func compareAndSwapNamedRoot(name: Data, expected: TreeRecord?, replacement: TreeRecord?)async throws -> NamedRootUpdateRecord { return try await uniffiRustCallAsync( @@ -813,7 +813,7 @@ open func compareAndSwapNamedRoot(name: Data, expected: TreeRecord?, replacement errorHandler: FfiConverterTypeProllyBindingError_lift ) } - + open func create() -> TreeRecord { return try! FfiConverterTypeTreeRecord_lift(try! rustCall() { uniffi_prolly_bindings_fn_method_asyncprollyengine_create( @@ -821,7 +821,7 @@ open func create() -> TreeRecord { ) }) } - + open func delete(tree: TreeRecord, key: Data)async throws -> TreeRecord { return try await uniffiRustCallAsync( @@ -838,7 +838,7 @@ open func delete(tree: TreeRecord, key: Data)async throws -> TreeRecord { errorHandler: FfiConverterTypeProllyBindingError_lift ) } - + open func deleteNamedRoot(name: Data)async throws { return try await uniffiRustCallAsync( @@ -855,7 +855,7 @@ open func deleteNamedRoot(name: Data)async throws { errorHandler: FfiConverterTypeProllyBindingError_lift ) } - + open func diff(base: TreeRecord, other: TreeRecord)async throws -> [DiffRecord] { return try await uniffiRustCallAsync( @@ -872,7 +872,7 @@ open func diff(base: TreeRecord, other: TreeRecord)async throws -> [DiffRecord] errorHandler: FfiConverterTypeProllyBindingError_lift ) } - + open func get(tree: TreeRecord, key: Data)async throws -> Data? { return try await uniffiRustCallAsync( @@ -889,7 +889,7 @@ open func get(tree: TreeRecord, key: Data)async throws -> Data? { errorHandler: FfiConverterTypeProllyBindingError_lift ) } - + open func getMany(tree: TreeRecord, keys: [Data])async throws -> [Data?] { return try await uniffiRustCallAsync( @@ -906,14 +906,14 @@ open func getMany(tree: TreeRecord, keys: [Data])async throws -> [Data?] { errorHandler: FfiConverterTypeProllyBindingError_lift ) } - + open func listNamedRoots()async throws -> [NamedRootRecord] { return try await uniffiRustCallAsync( rustFutureFunc: { uniffi_prolly_bindings_fn_method_asyncprollyengine_list_named_roots( self.uniffiCloneHandle() - + ) }, pollFunc: ffi_prolly_bindings_rust_future_poll_rust_buffer, @@ -923,7 +923,7 @@ open func listNamedRoots()async throws -> [NamedRootRecord] { errorHandler: FfiConverterTypeProllyBindingError_lift ) } - + open func loadNamedRoot(name: Data)async throws -> TreeRecord? { return try await uniffiRustCallAsync( @@ -940,7 +940,7 @@ open func loadNamedRoot(name: Data)async throws -> TreeRecord? { errorHandler: FfiConverterTypeProllyBindingError_lift ) } - + open func merge(base: TreeRecord, left: TreeRecord, right: TreeRecord, resolver: String?)async throws -> TreeRecord { return try await uniffiRustCallAsync( @@ -957,7 +957,7 @@ open func merge(base: TreeRecord, left: TreeRecord, right: TreeRecord, resolver: errorHandler: FfiConverterTypeProllyBindingError_lift ) } - + open func prefix(tree: TreeRecord, prefix: Data)async throws -> [EntryRecord] { return try await uniffiRustCallAsync( @@ -974,7 +974,7 @@ open func prefix(tree: TreeRecord, prefix: Data)async throws -> [EntryRecord] errorHandler: FfiConverterTypeProllyBindingError_lift ) } - + open func publishNamedRoot(name: Data, tree: TreeRecord)async throws { return try await uniffiRustCallAsync( @@ -991,7 +991,7 @@ open func publishNamedRoot(name: Data, tree: TreeRecord)async throws { errorHandler: FfiConverterTypeProllyBindingError_lift ) } - + open func publishNamedRootAtMillis(name: Data, tree: TreeRecord, timestampMillis: UInt64)async throws { return try await uniffiRustCallAsync( @@ -1008,7 +1008,7 @@ open func publishNamedRootAtMillis(name: Data, tree: TreeRecord, timestampMillis errorHandler: FfiConverterTypeProllyBindingError_lift ) } - + open func put(tree: TreeRecord, key: Data, value: Data)async throws -> TreeRecord { return try await uniffiRustCallAsync( @@ -1025,7 +1025,7 @@ open func put(tree: TreeRecord, key: Data, value: Data)async throws -> TreeReco errorHandler: FfiConverterTypeProllyBindingError_lift ) } - + open func range(tree: TreeRecord, start: Data, end: Data?)async throws -> [EntryRecord] { return try await uniffiRustCallAsync( @@ -1042,7 +1042,7 @@ open func range(tree: TreeRecord, start: Data, end: Data?)async throws -> [Entr errorHandler: FfiConverterTypeProllyBindingError_lift ) } - + open func rangePage(tree: TreeRecord, cursor: RangeCursorRecord?, end: Data?, limit: UInt64)async throws -> RangePageRecord { return try await uniffiRustCallAsync( @@ -1059,9 +1059,9 @@ open func rangePage(tree: TreeRecord, cursor: RangeCursorRecord?, end: Data?, li errorHandler: FfiConverterTypeProllyBindingError_lift ) } - - + + } @@ -1111,31 +1111,31 @@ public func FfiConverterTypeAsyncProllyEngine_lower(_ value: AsyncProllyEngine) public protocol AsyncProllyTransactionProtocol: AnyObject, Sendable { - + func batch(tree: TreeRecord, mutations: [MutationRecord]) async throws -> TreeRecord - + func commit() async throws -> TransactionUpdateRecord - + func compareAndSwapNamedRoot(name: Data, expected: TreeRecord?, replacement: TreeRecord?) async throws -> NamedRootUpdateRecord - + func create() async throws -> TreeRecord - + func delete(tree: TreeRecord, key: Data) async throws -> TreeRecord - - func deleteNamedRoot(name: Data) async throws - + + func deleteNamedRoot(name: Data) async throws + func get(tree: TreeRecord, key: Data) async throws -> Data? - + func loadNamedRoot(name: Data) async throws -> TreeRecord? - - func publishNamedRoot(name: Data, tree: TreeRecord) async throws - - func publishNamedRootAtMillis(name: Data, tree: TreeRecord, timestampMillis: UInt64) async throws - + + func publishNamedRoot(name: Data, tree: TreeRecord) async throws + + func publishNamedRootAtMillis(name: Data, tree: TreeRecord, timestampMillis: UInt64) async throws + func put(tree: TreeRecord, key: Data, value: Data) async throws -> TreeRecord - - func rollback() async throws - + + func rollback() async throws + } open class AsyncProllyTransaction: AsyncProllyTransactionProtocol, @unchecked Sendable { fileprivate let handle: UInt64 @@ -1187,9 +1187,9 @@ open class AsyncProllyTransaction: AsyncProllyTransactionProtocol, @unchecked Se try! rustCall { uniffi_prolly_bindings_fn_free_asyncprollytransaction(handle, $0) } } - - + + open func batch(tree: TreeRecord, mutations: [MutationRecord])async throws -> TreeRecord { return try await uniffiRustCallAsync( @@ -1206,14 +1206,14 @@ open func batch(tree: TreeRecord, mutations: [MutationRecord])async throws -> T errorHandler: FfiConverterTypeProllyBindingError_lift ) } - + open func commit()async throws -> TransactionUpdateRecord { return try await uniffiRustCallAsync( rustFutureFunc: { uniffi_prolly_bindings_fn_method_asyncprollytransaction_commit( self.uniffiCloneHandle() - + ) }, pollFunc: ffi_prolly_bindings_rust_future_poll_rust_buffer, @@ -1223,7 +1223,7 @@ open func commit()async throws -> TransactionUpdateRecord { errorHandler: FfiConverterTypeProllyBindingError_lift ) } - + open func compareAndSwapNamedRoot(name: Data, expected: TreeRecord?, replacement: TreeRecord?)async throws -> NamedRootUpdateRecord { return try await uniffiRustCallAsync( @@ -1240,14 +1240,14 @@ open func compareAndSwapNamedRoot(name: Data, expected: TreeRecord?, replacement errorHandler: FfiConverterTypeProllyBindingError_lift ) } - + open func create()async throws -> TreeRecord { return try await uniffiRustCallAsync( rustFutureFunc: { uniffi_prolly_bindings_fn_method_asyncprollytransaction_create( self.uniffiCloneHandle() - + ) }, pollFunc: ffi_prolly_bindings_rust_future_poll_rust_buffer, @@ -1257,7 +1257,7 @@ open func create()async throws -> TreeRecord { errorHandler: FfiConverterTypeProllyBindingError_lift ) } - + open func delete(tree: TreeRecord, key: Data)async throws -> TreeRecord { return try await uniffiRustCallAsync( @@ -1274,7 +1274,7 @@ open func delete(tree: TreeRecord, key: Data)async throws -> TreeRecord { errorHandler: FfiConverterTypeProllyBindingError_lift ) } - + open func deleteNamedRoot(name: Data)async throws { return try await uniffiRustCallAsync( @@ -1291,7 +1291,7 @@ open func deleteNamedRoot(name: Data)async throws { errorHandler: FfiConverterTypeProllyBindingError_lift ) } - + open func get(tree: TreeRecord, key: Data)async throws -> Data? { return try await uniffiRustCallAsync( @@ -1308,7 +1308,7 @@ open func get(tree: TreeRecord, key: Data)async throws -> Data? { errorHandler: FfiConverterTypeProllyBindingError_lift ) } - + open func loadNamedRoot(name: Data)async throws -> TreeRecord? { return try await uniffiRustCallAsync( @@ -1325,7 +1325,7 @@ open func loadNamedRoot(name: Data)async throws -> TreeRecord? { errorHandler: FfiConverterTypeProllyBindingError_lift ) } - + open func publishNamedRoot(name: Data, tree: TreeRecord)async throws { return try await uniffiRustCallAsync( @@ -1342,7 +1342,7 @@ open func publishNamedRoot(name: Data, tree: TreeRecord)async throws { errorHandler: FfiConverterTypeProllyBindingError_lift ) } - + open func publishNamedRootAtMillis(name: Data, tree: TreeRecord, timestampMillis: UInt64)async throws { return try await uniffiRustCallAsync( @@ -1359,7 +1359,7 @@ open func publishNamedRootAtMillis(name: Data, tree: TreeRecord, timestampMillis errorHandler: FfiConverterTypeProllyBindingError_lift ) } - + open func put(tree: TreeRecord, key: Data, value: Data)async throws -> TreeRecord { return try await uniffiRustCallAsync( @@ -1376,14 +1376,14 @@ open func put(tree: TreeRecord, key: Data, value: Data)async throws -> TreeReco errorHandler: FfiConverterTypeProllyBindingError_lift ) } - + open func rollback()async throws { return try await uniffiRustCallAsync( rustFutureFunc: { uniffi_prolly_bindings_fn_method_asyncprollytransaction_rollback( self.uniffiCloneHandle() - + ) }, pollFunc: ffi_prolly_bindings_rust_future_poll_void, @@ -1393,9 +1393,9 @@ open func rollback()async throws { errorHandler: FfiConverterTypeProllyBindingError_lift ) } - - + + } @@ -1445,21 +1445,21 @@ public func FfiConverterTypeAsyncProllyTransaction_lower(_ value: AsyncProllyTra public protocol BindingAcceleratorCatalogProtocol: AnyObject, Sendable { - + func entries() -> [AcceleratorCatalogEntryRecord] - + func manifest() -> Data - + func proveSearch(map: BindingProximityMap, request: ProximitySearchRequestRecord, limits: ContentGraphLimitsRecord) throws -> BindingProximitySearchProof - + func search(map: BindingProximityMap, request: ProximitySearchRequestRecord) throws -> ProximitySearchResultRecord - + func searchCancellable(map: BindingProximityMap, request: ProximitySearchRequestRecord, runtime: BindingProximitySearchRuntime?, cancellation: BindingProximityCancellationToken) throws -> ProximitySearchResultRecord - + func searchWithRuntime(map: BindingProximityMap, request: ProximitySearchRequestRecord, runtime: BindingProximitySearchRuntime) throws -> ProximitySearchResultRecord - + func sourceDescriptor() -> Data - + } open class BindingAcceleratorCatalog: BindingAcceleratorCatalogProtocol, @unchecked Sendable { fileprivate let handle: UInt64 @@ -1511,9 +1511,9 @@ open class BindingAcceleratorCatalog: BindingAcceleratorCatalogProtocol, @unchec try! rustCall { uniffi_prolly_bindings_fn_free_bindingacceleratorcatalog(handle, $0) } } - - + + open func entries() -> [AcceleratorCatalogEntryRecord] { return try! FfiConverterSequenceTypeAcceleratorCatalogEntryRecord.lift(try! rustCall() { uniffi_prolly_bindings_fn_method_bindingacceleratorcatalog_entries( @@ -1521,7 +1521,7 @@ open func entries() -> [AcceleratorCatalogEntryRecord] { ) }) } - + open func manifest() -> Data { return try! FfiConverterData.lift(try! rustCall() { uniffi_prolly_bindings_fn_method_bindingacceleratorcatalog_manifest( @@ -1529,7 +1529,7 @@ open func manifest() -> Data { ) }) } - + open func proveSearch(map: BindingProximityMap, request: ProximitySearchRequestRecord, limits: ContentGraphLimitsRecord)throws -> BindingProximitySearchProof { return try FfiConverterTypeBindingProximitySearchProof_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingacceleratorcatalog_prove_search( @@ -1540,7 +1540,7 @@ open func proveSearch(map: BindingProximityMap, request: ProximitySearchRequestR ) }) } - + open func search(map: BindingProximityMap, request: ProximitySearchRequestRecord)throws -> ProximitySearchResultRecord { return try FfiConverterTypeProximitySearchResultRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingacceleratorcatalog_search( @@ -1550,7 +1550,7 @@ open func search(map: BindingProximityMap, request: ProximitySearchRequestRecord ) }) } - + open func searchCancellable(map: BindingProximityMap, request: ProximitySearchRequestRecord, runtime: BindingProximitySearchRuntime?, cancellation: BindingProximityCancellationToken)throws -> ProximitySearchResultRecord { return try FfiConverterTypeProximitySearchResultRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingacceleratorcatalog_search_cancellable( @@ -1562,7 +1562,7 @@ open func searchCancellable(map: BindingProximityMap, request: ProximitySearchRe ) }) } - + open func searchWithRuntime(map: BindingProximityMap, request: ProximitySearchRequestRecord, runtime: BindingProximitySearchRuntime)throws -> ProximitySearchResultRecord { return try FfiConverterTypeProximitySearchResultRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingacceleratorcatalog_search_with_runtime( @@ -1573,7 +1573,7 @@ open func searchWithRuntime(map: BindingProximityMap, request: ProximitySearchRe ) }) } - + open func sourceDescriptor() -> Data { return try! FfiConverterData.lift(try! rustCall() { uniffi_prolly_bindings_fn_method_bindingacceleratorcatalog_source_descriptor( @@ -1581,9 +1581,9 @@ open func sourceDescriptor() -> Data { ) }) } - - + + } @@ -1633,31 +1633,31 @@ public func FfiConverterTypeBindingAcceleratorCatalog_lower(_ value: BindingAcce public protocol BindingCompositeAcceleratorProtocol: AnyObject, Sendable { - + func baseKind() -> CompositeBaseKindRecord - + func baseSourceDescriptor() -> Data - + func buildStats() -> CompositeBuildStatsRecord - + func config() -> CompositeAcceleratorConfigRecord - + func currentSourceDescriptor() -> Data - + func deltaCount() -> UInt64 - + func manifest() -> Data - + func proveSearch(map: BindingProximityMap, request: ProximitySearchRequestRecord, limits: ContentGraphLimitsRecord) throws -> BindingProximitySearchProof - + func search(map: BindingProximityMap, request: ProximitySearchRequestRecord) throws -> ProximitySearchResultRecord - + func searchCancellable(map: BindingProximityMap, request: ProximitySearchRequestRecord, runtime: BindingProximitySearchRuntime?, cancellation: BindingProximityCancellationToken) throws -> ProximitySearchResultRecord - + func searchWithRuntime(map: BindingProximityMap, request: ProximitySearchRequestRecord, runtime: BindingProximitySearchRuntime) throws -> ProximitySearchResultRecord - + func shadowCount() -> UInt64 - + } open class BindingCompositeAccelerator: BindingCompositeAcceleratorProtocol, @unchecked Sendable { fileprivate let handle: UInt64 @@ -1709,9 +1709,9 @@ open class BindingCompositeAccelerator: BindingCompositeAcceleratorProtocol, @un try! rustCall { uniffi_prolly_bindings_fn_free_bindingcompositeaccelerator(handle, $0) } } - - + + open func baseKind() -> CompositeBaseKindRecord { return try! FfiConverterTypeCompositeBaseKindRecord_lift(try! rustCall() { uniffi_prolly_bindings_fn_method_bindingcompositeaccelerator_base_kind( @@ -1719,7 +1719,7 @@ open func baseKind() -> CompositeBaseKindRecord { ) }) } - + open func baseSourceDescriptor() -> Data { return try! FfiConverterData.lift(try! rustCall() { uniffi_prolly_bindings_fn_method_bindingcompositeaccelerator_base_source_descriptor( @@ -1727,7 +1727,7 @@ open func baseSourceDescriptor() -> Data { ) }) } - + open func buildStats() -> CompositeBuildStatsRecord { return try! FfiConverterTypeCompositeBuildStatsRecord_lift(try! rustCall() { uniffi_prolly_bindings_fn_method_bindingcompositeaccelerator_build_stats( @@ -1735,7 +1735,7 @@ open func buildStats() -> CompositeBuildStatsRecord { ) }) } - + open func config() -> CompositeAcceleratorConfigRecord { return try! FfiConverterTypeCompositeAcceleratorConfigRecord_lift(try! rustCall() { uniffi_prolly_bindings_fn_method_bindingcompositeaccelerator_config( @@ -1743,7 +1743,7 @@ open func config() -> CompositeAcceleratorConfigRecord { ) }) } - + open func currentSourceDescriptor() -> Data { return try! FfiConverterData.lift(try! rustCall() { uniffi_prolly_bindings_fn_method_bindingcompositeaccelerator_current_source_descriptor( @@ -1751,7 +1751,7 @@ open func currentSourceDescriptor() -> Data { ) }) } - + open func deltaCount() -> UInt64 { return try! FfiConverterUInt64.lift(try! rustCall() { uniffi_prolly_bindings_fn_method_bindingcompositeaccelerator_delta_count( @@ -1759,7 +1759,7 @@ open func deltaCount() -> UInt64 { ) }) } - + open func manifest() -> Data { return try! FfiConverterData.lift(try! rustCall() { uniffi_prolly_bindings_fn_method_bindingcompositeaccelerator_manifest( @@ -1767,7 +1767,7 @@ open func manifest() -> Data { ) }) } - + open func proveSearch(map: BindingProximityMap, request: ProximitySearchRequestRecord, limits: ContentGraphLimitsRecord)throws -> BindingProximitySearchProof { return try FfiConverterTypeBindingProximitySearchProof_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingcompositeaccelerator_prove_search( @@ -1778,7 +1778,7 @@ open func proveSearch(map: BindingProximityMap, request: ProximitySearchRequestR ) }) } - + open func search(map: BindingProximityMap, request: ProximitySearchRequestRecord)throws -> ProximitySearchResultRecord { return try FfiConverterTypeProximitySearchResultRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingcompositeaccelerator_search( @@ -1788,7 +1788,7 @@ open func search(map: BindingProximityMap, request: ProximitySearchRequestRecord ) }) } - + open func searchCancellable(map: BindingProximityMap, request: ProximitySearchRequestRecord, runtime: BindingProximitySearchRuntime?, cancellation: BindingProximityCancellationToken)throws -> ProximitySearchResultRecord { return try FfiConverterTypeProximitySearchResultRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingcompositeaccelerator_search_cancellable( @@ -1800,7 +1800,7 @@ open func searchCancellable(map: BindingProximityMap, request: ProximitySearchRe ) }) } - + open func searchWithRuntime(map: BindingProximityMap, request: ProximitySearchRequestRecord, runtime: BindingProximitySearchRuntime)throws -> ProximitySearchResultRecord { return try FfiConverterTypeProximitySearchResultRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingcompositeaccelerator_search_with_runtime( @@ -1811,7 +1811,7 @@ open func searchWithRuntime(map: BindingProximityMap, request: ProximitySearchRe ) }) } - + open func shadowCount() -> UInt64 { return try! FfiConverterUInt64.lift(try! rustCall() { uniffi_prolly_bindings_fn_method_bindingcompositeaccelerator_shadow_count( @@ -1819,9 +1819,9 @@ open func shadowCount() -> UInt64 { ) }) } - - + + } @@ -1871,23 +1871,23 @@ public func FfiConverterTypeBindingCompositeAccelerator_lower(_ value: BindingCo public protocol BindingHnswIndexProtocol: AnyObject, Sendable { - + func config() -> HnswConfigRecord - + func isCanonical() -> Bool - + func manifest() -> Data - + func proveSearch(map: BindingProximityMap, request: ProximitySearchRequestRecord, limits: ContentGraphLimitsRecord) throws -> BindingProximitySearchProof - + func search(map: BindingProximityMap, request: ProximitySearchRequestRecord) throws -> ProximitySearchResultRecord - + func searchCancellable(map: BindingProximityMap, request: ProximitySearchRequestRecord, runtime: BindingProximitySearchRuntime?, cancellation: BindingProximityCancellationToken) throws -> ProximitySearchResultRecord - + func searchWithRuntime(map: BindingProximityMap, request: ProximitySearchRequestRecord, runtime: BindingProximitySearchRuntime) throws -> ProximitySearchResultRecord - + func sourceDescriptor() -> Data - + } open class BindingHnswIndex: BindingHnswIndexProtocol, @unchecked Sendable { fileprivate let handle: UInt64 @@ -1939,9 +1939,9 @@ open class BindingHnswIndex: BindingHnswIndexProtocol, @unchecked Sendable { try! rustCall { uniffi_prolly_bindings_fn_free_bindinghnswindex(handle, $0) } } - - + + open func config() -> HnswConfigRecord { return try! FfiConverterTypeHnswConfigRecord_lift(try! rustCall() { uniffi_prolly_bindings_fn_method_bindinghnswindex_config( @@ -1949,7 +1949,7 @@ open func config() -> HnswConfigRecord { ) }) } - + open func isCanonical() -> Bool { return try! FfiConverterBool.lift(try! rustCall() { uniffi_prolly_bindings_fn_method_bindinghnswindex_is_canonical( @@ -1957,7 +1957,7 @@ open func isCanonical() -> Bool { ) }) } - + open func manifest() -> Data { return try! FfiConverterData.lift(try! rustCall() { uniffi_prolly_bindings_fn_method_bindinghnswindex_manifest( @@ -1965,7 +1965,7 @@ open func manifest() -> Data { ) }) } - + open func proveSearch(map: BindingProximityMap, request: ProximitySearchRequestRecord, limits: ContentGraphLimitsRecord)throws -> BindingProximitySearchProof { return try FfiConverterTypeBindingProximitySearchProof_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindinghnswindex_prove_search( @@ -1976,7 +1976,7 @@ open func proveSearch(map: BindingProximityMap, request: ProximitySearchRequestR ) }) } - + open func search(map: BindingProximityMap, request: ProximitySearchRequestRecord)throws -> ProximitySearchResultRecord { return try FfiConverterTypeProximitySearchResultRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindinghnswindex_search( @@ -1986,7 +1986,7 @@ open func search(map: BindingProximityMap, request: ProximitySearchRequestRecord ) }) } - + open func searchCancellable(map: BindingProximityMap, request: ProximitySearchRequestRecord, runtime: BindingProximitySearchRuntime?, cancellation: BindingProximityCancellationToken)throws -> ProximitySearchResultRecord { return try FfiConverterTypeProximitySearchResultRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindinghnswindex_search_cancellable( @@ -1998,7 +1998,7 @@ open func searchCancellable(map: BindingProximityMap, request: ProximitySearchRe ) }) } - + open func searchWithRuntime(map: BindingProximityMap, request: ProximitySearchRequestRecord, runtime: BindingProximitySearchRuntime)throws -> ProximitySearchResultRecord { return try FfiConverterTypeProximitySearchResultRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindinghnswindex_search_with_runtime( @@ -2009,7 +2009,7 @@ open func searchWithRuntime(map: BindingProximityMap, request: ProximitySearchRe ) }) } - + open func sourceDescriptor() -> Data { return try! FfiConverterData.lift(try! rustCall() { uniffi_prolly_bindings_fn_method_bindinghnswindex_source_descriptor( @@ -2017,9 +2017,9 @@ open func sourceDescriptor() -> Data { ) }) } - - + + } @@ -2069,11 +2069,11 @@ public func FfiConverterTypeBindingHnswIndex_lower(_ value: BindingHnswIndex) -> public protocol BindingIndexRegistryProtocol: AnyObject, Sendable { - + func len() throws -> UInt64 - - func register(name: Data, generation: UInt64, extractorId: String, projection: IndexProjectionRecord, limits: SecondaryIndexLimitsRecord?, extractor: SecondaryIndexExtractorCallback) throws - + + func register(name: Data, generation: UInt64, extractorId: String, projection: IndexProjectionRecord, limits: SecondaryIndexLimitsRecord?, extractor: SecondaryIndexExtractorCallback) throws + } open class BindingIndexRegistry: BindingIndexRegistryProtocol, @unchecked Sendable { fileprivate let handle: UInt64 @@ -2132,9 +2132,9 @@ public convenience init() { try! rustCall { uniffi_prolly_bindings_fn_free_bindingindexregistry(handle, $0) } } - - + + open func len()throws -> UInt64 { return try FfiConverterUInt64.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingindexregistry_len( @@ -2142,7 +2142,7 @@ open func len()throws -> UInt64 { ) }) } - + open func register(name: Data, generation: UInt64, extractorId: String, projection: IndexProjectionRecord, limits: SecondaryIndexLimitsRecord?, extractor: SecondaryIndexExtractorCallback)throws {try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingindexregistry_register( self.uniffiCloneHandle(), @@ -2155,9 +2155,9 @@ open func register(name: Data, generation: UInt64, extractorId: String, projecti ) } } - - + + } @@ -2207,51 +2207,51 @@ public func FfiConverterTypeBindingIndexRegistry_lower(_ value: BindingIndexRegi public protocol BindingIndexedMapProtocol: AnyObject, Sendable { - + func apply(mutations: [MutationRecord]) throws -> IndexedVersionRecord - + func applyIf(expectedSource: Data?, mutations: [MutationRecord]) throws -> IndexedUpdateRecord - + func deactivateIndex(name: Data) throws -> IndexedVersionRecord - + func delete(key: Data) throws -> IndexedVersionRecord - + func ensureIndex(name: Data) throws -> IndexBuildResultRecord - + func exportCurrent() throws -> Data - + func fastHandle() -> UInt64 - + func get(key: Data) throws -> Data? - + func health() throws -> IndexedMapHealthRecord - + func id() -> Data - + func importCurrent(bundle: Data, expectedSource: Data?) throws -> IndexedVersionRecord - + func keepLast(count: UInt64) throws -> IndexedRetentionRecord - + func metrics() throws -> IndexedMapMetricsRecord - + func planGc() throws -> GcPlanRecord - + func put(key: Data, value: Data) throws -> IndexedVersionRecord - + func repairIndex(name: Data, sourceVersion: Data) throws -> IndexVerificationRecord - + func replaceIndex(name: Data, generation: UInt64, extractorId: String, projection: IndexProjectionRecord, limits: SecondaryIndexLimitsRecord?, extractor: SecondaryIndexExtractorCallback) throws -> IndexBuildResultRecord - + func snapshot() throws -> BindingIndexedSnapshot - + func snapshotAt(sourceVersion: Data) throws -> BindingIndexedSnapshot - + func snapshotById(snapshotId: IndexedSnapshotIdRecord) throws -> BindingIndexedSnapshot - + func verifyAll(sourceVersion: Data) throws -> [IndexVerificationRecord] - + func verifyIndex(name: Data, sourceVersion: Data) throws -> IndexVerificationRecord - + } open class BindingIndexedMap: BindingIndexedMapProtocol, @unchecked Sendable { fileprivate let handle: UInt64 @@ -2313,9 +2313,9 @@ public convenience init(engine: ProllyEngine, id: Data, registry: BindingIndexRe try! rustCall { uniffi_prolly_bindings_fn_free_bindingindexedmap(handle, $0) } } - - + + open func apply(mutations: [MutationRecord])throws -> IndexedVersionRecord { return try FfiConverterTypeIndexedVersionRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingindexedmap_apply( @@ -2324,7 +2324,7 @@ open func apply(mutations: [MutationRecord])throws -> IndexedVersionRecord { ) }) } - + open func applyIf(expectedSource: Data?, mutations: [MutationRecord])throws -> IndexedUpdateRecord { return try FfiConverterTypeIndexedUpdateRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingindexedmap_apply_if( @@ -2334,7 +2334,7 @@ open func applyIf(expectedSource: Data?, mutations: [MutationRecord])throws -> ) }) } - + open func deactivateIndex(name: Data)throws -> IndexedVersionRecord { return try FfiConverterTypeIndexedVersionRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingindexedmap_deactivate_index( @@ -2343,7 +2343,7 @@ open func deactivateIndex(name: Data)throws -> IndexedVersionRecord { ) }) } - + open func delete(key: Data)throws -> IndexedVersionRecord { return try FfiConverterTypeIndexedVersionRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingindexedmap_delete( @@ -2352,7 +2352,7 @@ open func delete(key: Data)throws -> IndexedVersionRecord { ) }) } - + open func ensureIndex(name: Data)throws -> IndexBuildResultRecord { return try FfiConverterTypeIndexBuildResultRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingindexedmap_ensure_index( @@ -2361,7 +2361,7 @@ open func ensureIndex(name: Data)throws -> IndexBuildResultRecord { ) }) } - + open func exportCurrent()throws -> Data { return try FfiConverterData.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingindexedmap_export_current( @@ -2369,7 +2369,7 @@ open func exportCurrent()throws -> Data { ) }) } - + open func fastHandle() -> UInt64 { return try! FfiConverterUInt64.lift(try! rustCall() { uniffi_prolly_bindings_fn_method_bindingindexedmap_fast_handle( @@ -2377,7 +2377,7 @@ open func fastHandle() -> UInt64 { ) }) } - + open func get(key: Data)throws -> Data? { return try FfiConverterOptionData.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingindexedmap_get( @@ -2386,7 +2386,7 @@ open func get(key: Data)throws -> Data? { ) }) } - + open func health()throws -> IndexedMapHealthRecord { return try FfiConverterTypeIndexedMapHealthRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingindexedmap_health( @@ -2394,7 +2394,7 @@ open func health()throws -> IndexedMapHealthRecord { ) }) } - + open func id() -> Data { return try! FfiConverterData.lift(try! rustCall() { uniffi_prolly_bindings_fn_method_bindingindexedmap_id( @@ -2402,7 +2402,7 @@ open func id() -> Data { ) }) } - + open func importCurrent(bundle: Data, expectedSource: Data?)throws -> IndexedVersionRecord { return try FfiConverterTypeIndexedVersionRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingindexedmap_import_current( @@ -2412,7 +2412,7 @@ open func importCurrent(bundle: Data, expectedSource: Data?)throws -> IndexedVe ) }) } - + open func keepLast(count: UInt64)throws -> IndexedRetentionRecord { return try FfiConverterTypeIndexedRetentionRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingindexedmap_keep_last( @@ -2421,7 +2421,7 @@ open func keepLast(count: UInt64)throws -> IndexedRetentionRecord { ) }) } - + open func metrics()throws -> IndexedMapMetricsRecord { return try FfiConverterTypeIndexedMapMetricsRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingindexedmap_metrics( @@ -2429,7 +2429,7 @@ open func metrics()throws -> IndexedMapMetricsRecord { ) }) } - + open func planGc()throws -> GcPlanRecord { return try FfiConverterTypeGcPlanRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingindexedmap_plan_gc( @@ -2437,7 +2437,7 @@ open func planGc()throws -> GcPlanRecord { ) }) } - + open func put(key: Data, value: Data)throws -> IndexedVersionRecord { return try FfiConverterTypeIndexedVersionRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingindexedmap_put( @@ -2447,7 +2447,7 @@ open func put(key: Data, value: Data)throws -> IndexedVersionRecord { ) }) } - + open func repairIndex(name: Data, sourceVersion: Data)throws -> IndexVerificationRecord { return try FfiConverterTypeIndexVerificationRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingindexedmap_repair_index( @@ -2457,7 +2457,7 @@ open func repairIndex(name: Data, sourceVersion: Data)throws -> IndexVerificati ) }) } - + open func replaceIndex(name: Data, generation: UInt64, extractorId: String, projection: IndexProjectionRecord, limits: SecondaryIndexLimitsRecord?, extractor: SecondaryIndexExtractorCallback)throws -> IndexBuildResultRecord { return try FfiConverterTypeIndexBuildResultRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingindexedmap_replace_index( @@ -2471,7 +2471,7 @@ open func replaceIndex(name: Data, generation: UInt64, extractorId: String, proj ) }) } - + open func snapshot()throws -> BindingIndexedSnapshot { return try FfiConverterTypeBindingIndexedSnapshot_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingindexedmap_snapshot( @@ -2479,7 +2479,7 @@ open func snapshot()throws -> BindingIndexedSnapshot { ) }) } - + open func snapshotAt(sourceVersion: Data)throws -> BindingIndexedSnapshot { return try FfiConverterTypeBindingIndexedSnapshot_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingindexedmap_snapshot_at( @@ -2488,7 +2488,7 @@ open func snapshotAt(sourceVersion: Data)throws -> BindingIndexedSnapshot { ) }) } - + open func snapshotById(snapshotId: IndexedSnapshotIdRecord)throws -> BindingIndexedSnapshot { return try FfiConverterTypeBindingIndexedSnapshot_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingindexedmap_snapshot_by_id( @@ -2497,7 +2497,7 @@ open func snapshotById(snapshotId: IndexedSnapshotIdRecord)throws -> BindingInd ) }) } - + open func verifyAll(sourceVersion: Data)throws -> [IndexVerificationRecord] { return try FfiConverterSequenceTypeIndexVerificationRecord.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingindexedmap_verify_all( @@ -2506,7 +2506,7 @@ open func verifyAll(sourceVersion: Data)throws -> [IndexVerificationRecord] { ) }) } - + open func verifyIndex(name: Data, sourceVersion: Data)throws -> IndexVerificationRecord { return try FfiConverterTypeIndexVerificationRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingindexedmap_verify_index( @@ -2516,9 +2516,9 @@ open func verifyIndex(name: Data, sourceVersion: Data)throws -> IndexVerificati ) }) } - - + + } @@ -2568,11 +2568,11 @@ public func FfiConverterTypeBindingIndexedMap_lower(_ value: BindingIndexedMap) public protocol BindingIndexedSnapshotProtocol: AnyObject, Sendable { - + func id() -> IndexedSnapshotIdRecord - + func index(name: Data) throws -> BindingSecondaryIndexSnapshot - + } open class BindingIndexedSnapshot: BindingIndexedSnapshotProtocol, @unchecked Sendable { fileprivate let handle: UInt64 @@ -2624,9 +2624,9 @@ open class BindingIndexedSnapshot: BindingIndexedSnapshotProtocol, @unchecked Se try! rustCall { uniffi_prolly_bindings_fn_free_bindingindexedsnapshot(handle, $0) } } - - + + open func id() -> IndexedSnapshotIdRecord { return try! FfiConverterTypeIndexedSnapshotIdRecord_lift(try! rustCall() { uniffi_prolly_bindings_fn_method_bindingindexedsnapshot_id( @@ -2634,7 +2634,7 @@ open func id() -> IndexedSnapshotIdRecord { ) }) } - + open func index(name: Data)throws -> BindingSecondaryIndexSnapshot { return try FfiConverterTypeBindingSecondaryIndexSnapshot_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingindexedsnapshot_index( @@ -2643,9 +2643,9 @@ open func index(name: Data)throws -> BindingSecondaryIndexSnapshot { ) }) } - - + + } @@ -2698,29 +2698,29 @@ public func FfiConverterTypeBindingIndexedSnapshot_lower(_ value: BindingIndexed * Owned version-pinned comparison. It never re-resolves head. */ public protocol BindingMapComparisonProtocol: AnyObject, Sendable { - + func base() -> MapVersionRecord - + func changedSpans() throws -> ChangedSpanHintRecord? - + func debugView() throws -> TreeDebugComparisonRecord - + func diff() throws -> [DiffRecord] - + func diffPage(cursor: RangeCursorRecord?, rangeEnd: Data?, limit: UInt64) throws -> DiffPageRecord - + func proveDiffPage(cursor: RangeCursorRecord?, rangeEnd: Data?, limit: UInt64) throws -> ProvedDiffPageRecord - + func publishChangedSpans(spans: [ChangedSpanRecord]) throws -> Bool - + func scanDiff(visitor: DiffVisitorCallback) throws -> ScanOutcomeRecord - + func stats() throws -> StatsComparisonRecord - + func structuralDiffPage(cursor: StructuralDiffCursorRecord?, limit: UInt64) throws -> StructuralDiffPageRecord - + func target() -> MapVersionRecord - + } /** * Owned version-pinned comparison. It never re-resolves head. @@ -2775,9 +2775,9 @@ open class BindingMapComparison: BindingMapComparisonProtocol, @unchecked Sendab try! rustCall { uniffi_prolly_bindings_fn_free_bindingmapcomparison(handle, $0) } } - - + + open func base() -> MapVersionRecord { return try! FfiConverterTypeMapVersionRecord_lift(try! rustCall() { uniffi_prolly_bindings_fn_method_bindingmapcomparison_base( @@ -2785,7 +2785,7 @@ open func base() -> MapVersionRecord { ) }) } - + open func changedSpans()throws -> ChangedSpanHintRecord? { return try FfiConverterOptionTypeChangedSpanHintRecord.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingmapcomparison_changed_spans( @@ -2793,7 +2793,7 @@ open func changedSpans()throws -> ChangedSpanHintRecord? { ) }) } - + open func debugView()throws -> TreeDebugComparisonRecord { return try FfiConverterTypeTreeDebugComparisonRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingmapcomparison_debug_view( @@ -2801,7 +2801,7 @@ open func debugView()throws -> TreeDebugComparisonRecord { ) }) } - + open func diff()throws -> [DiffRecord] { return try FfiConverterSequenceTypeDiffRecord.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingmapcomparison_diff( @@ -2809,7 +2809,7 @@ open func diff()throws -> [DiffRecord] { ) }) } - + open func diffPage(cursor: RangeCursorRecord?, rangeEnd: Data?, limit: UInt64)throws -> DiffPageRecord { return try FfiConverterTypeDiffPageRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingmapcomparison_diff_page( @@ -2820,7 +2820,7 @@ open func diffPage(cursor: RangeCursorRecord?, rangeEnd: Data?, limit: UInt64)th ) }) } - + open func proveDiffPage(cursor: RangeCursorRecord?, rangeEnd: Data?, limit: UInt64)throws -> ProvedDiffPageRecord { return try FfiConverterTypeProvedDiffPageRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingmapcomparison_prove_diff_page( @@ -2831,7 +2831,7 @@ open func proveDiffPage(cursor: RangeCursorRecord?, rangeEnd: Data?, limit: UInt ) }) } - + open func publishChangedSpans(spans: [ChangedSpanRecord])throws -> Bool { return try FfiConverterBool.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingmapcomparison_publish_changed_spans( @@ -2840,7 +2840,7 @@ open func publishChangedSpans(spans: [ChangedSpanRecord])throws -> Bool { ) }) } - + open func scanDiff(visitor: DiffVisitorCallback)throws -> ScanOutcomeRecord { return try FfiConverterTypeScanOutcomeRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingmapcomparison_scan_diff( @@ -2849,7 +2849,7 @@ open func scanDiff(visitor: DiffVisitorCallback)throws -> ScanOutcomeRecord { ) }) } - + open func stats()throws -> StatsComparisonRecord { return try FfiConverterTypeStatsComparisonRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingmapcomparison_stats( @@ -2857,7 +2857,7 @@ open func stats()throws -> StatsComparisonRecord { ) }) } - + open func structuralDiffPage(cursor: StructuralDiffCursorRecord?, limit: UInt64)throws -> StructuralDiffPageRecord { return try FfiConverterTypeStructuralDiffPageRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingmapcomparison_structural_diff_page( @@ -2867,7 +2867,7 @@ open func structuralDiffPage(cursor: StructuralDiffCursorRecord?, limit: UInt64) ) }) } - + open func target() -> MapVersionRecord { return try! FfiConverterTypeMapVersionRecord_lift(try! rustCall() { uniffi_prolly_bindings_fn_method_bindingmapcomparison_target( @@ -2875,9 +2875,9 @@ open func target() -> MapVersionRecord { ) }) } - - + + } @@ -2930,34 +2930,34 @@ public func FfiConverterTypeBindingMapComparison_lower(_ value: BindingMapCompar * Three-way merge pinned to a concrete base, head, and candidate. */ public protocol BindingMapMergeProtocol: AnyObject, Sendable { - + func base() -> MapVersionRecord - + func candidate() -> MapVersionRecord - + func conflictPage(cursor: RangeCursorRecord?, limit: UInt64) throws -> ConflictPageRecord - + func crdtMerge(config: CrdtConfigRecord) throws -> TreeRecord - + func crdtMergeExplain(config: CrdtConfigRecord) throws -> MergeExplanationRecord - + func head() -> MapVersionRecord - + func merge(resolver: String?) throws -> TreeRecord - + func mergeWithPolicy(policy: MergePolicyRegistry) throws -> TreeRecord - + /** * Publish only if the head pinned when this object was created is still current. */ func publish(resolver: String?) throws -> MapUpdateRecord - + func publishCrdt(config: CrdtConfigRecord) throws -> MapUpdateRecord - + func publishWithPolicy(policy: MergePolicyRegistry) throws -> MapUpdateRecord - + func scanConflicts(visitor: ConflictVisitorCallback) throws -> ScanOutcomeRecord - + } /** * Three-way merge pinned to a concrete base, head, and candidate. @@ -3012,9 +3012,9 @@ open class BindingMapMerge: BindingMapMergeProtocol, @unchecked Sendable { try! rustCall { uniffi_prolly_bindings_fn_free_bindingmapmerge(handle, $0) } } - - + + open func base() -> MapVersionRecord { return try! FfiConverterTypeMapVersionRecord_lift(try! rustCall() { uniffi_prolly_bindings_fn_method_bindingmapmerge_base( @@ -3022,7 +3022,7 @@ open func base() -> MapVersionRecord { ) }) } - + open func candidate() -> MapVersionRecord { return try! FfiConverterTypeMapVersionRecord_lift(try! rustCall() { uniffi_prolly_bindings_fn_method_bindingmapmerge_candidate( @@ -3030,7 +3030,7 @@ open func candidate() -> MapVersionRecord { ) }) } - + open func conflictPage(cursor: RangeCursorRecord?, limit: UInt64)throws -> ConflictPageRecord { return try FfiConverterTypeConflictPageRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingmapmerge_conflict_page( @@ -3040,7 +3040,7 @@ open func conflictPage(cursor: RangeCursorRecord?, limit: UInt64)throws -> Conf ) }) } - + open func crdtMerge(config: CrdtConfigRecord)throws -> TreeRecord { return try FfiConverterTypeTreeRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingmapmerge_crdt_merge( @@ -3049,7 +3049,7 @@ open func crdtMerge(config: CrdtConfigRecord)throws -> TreeRecord { ) }) } - + open func crdtMergeExplain(config: CrdtConfigRecord)throws -> MergeExplanationRecord { return try FfiConverterTypeMergeExplanationRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingmapmerge_crdt_merge_explain( @@ -3058,7 +3058,7 @@ open func crdtMergeExplain(config: CrdtConfigRecord)throws -> MergeExplanationR ) }) } - + open func head() -> MapVersionRecord { return try! FfiConverterTypeMapVersionRecord_lift(try! rustCall() { uniffi_prolly_bindings_fn_method_bindingmapmerge_head( @@ -3066,7 +3066,7 @@ open func head() -> MapVersionRecord { ) }) } - + open func merge(resolver: String?)throws -> TreeRecord { return try FfiConverterTypeTreeRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingmapmerge_merge( @@ -3075,7 +3075,7 @@ open func merge(resolver: String?)throws -> TreeRecord { ) }) } - + open func mergeWithPolicy(policy: MergePolicyRegistry)throws -> TreeRecord { return try FfiConverterTypeTreeRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingmapmerge_merge_with_policy( @@ -3084,7 +3084,7 @@ open func mergeWithPolicy(policy: MergePolicyRegistry)throws -> TreeRecord { ) }) } - + /** * Publish only if the head pinned when this object was created is still current. */ @@ -3096,7 +3096,7 @@ open func publish(resolver: String?)throws -> MapUpdateRecord { ) }) } - + open func publishCrdt(config: CrdtConfigRecord)throws -> MapUpdateRecord { return try FfiConverterTypeMapUpdateRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingmapmerge_publish_crdt( @@ -3105,7 +3105,7 @@ open func publishCrdt(config: CrdtConfigRecord)throws -> MapUpdateRecord { ) }) } - + open func publishWithPolicy(policy: MergePolicyRegistry)throws -> MapUpdateRecord { return try FfiConverterTypeMapUpdateRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingmapmerge_publish_with_policy( @@ -3114,7 +3114,7 @@ open func publishWithPolicy(policy: MergePolicyRegistry)throws -> MapUpdateReco ) }) } - + open func scanConflicts(visitor: ConflictVisitorCallback)throws -> ScanOutcomeRecord { return try FfiConverterTypeScanOutcomeRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingmapmerge_scan_conflicts( @@ -3123,9 +3123,9 @@ open func scanConflicts(visitor: ConflictVisitorCallback)throws -> ScanOutcomeR ) }) } - - + + } @@ -3178,83 +3178,83 @@ public func FfiConverterTypeBindingMapMerge_lower(_ value: BindingMapMerge) -> U * Owned immutable snapshot that remains valid while the managed head advances. */ public protocol BindingMapSnapshotProtocol: AnyObject, Sendable { - + func containsKey(key: Data) throws -> Bool - + func copyMissingNodes(destination: ProllyEngine) throws -> MissingNodeCopyRecord - + func cursorWindow(key: Data, rangeEnd: Data?, limit: UInt64) throws -> CursorWindowRecord - + func debugView() throws -> TreeDebugViewRecord - + func export() throws -> SnapshotBundleRecord - + func firstEntry() throws -> EntryRecord? - + func get(key: Data) throws -> Data? - + func getMany(keys: [Data]) throws -> [Data?] - + func getValueRef(key: Data) throws -> ValueRefRecord? - + func hydratePrefixHint(prefix: Data) throws -> Bool - + func id() -> Data - + func lastEntry() throws -> EntryRecord? - + func lowerBound(key: Data) throws -> EntryRecord? - + func pinPath(key: Data) throws -> UInt64 - + func pinRoot() throws -> UInt64 - + func planMissingNodes(destination: ProllyEngine) throws -> MissingNodePlanRecord - + func prefix(prefix: Data) throws -> [EntryRecord] - + func prefixPage(prefix: Data, cursor: RangeCursorRecord?, limit: UInt64) throws -> RangePageRecord - + func prefixReversePage(prefix: Data, cursor: ReverseCursorRecord?, limit: UInt64) throws -> ReversePageRecord - + func proveKey(key: Data) throws -> KeyProofRecord - + func proveKeys(keys: [Data]) throws -> MultiKeyProofRecord - + func provePrefix(prefix: Data) throws -> RangeProofRecord - + func proveRange(start: Data, rangeEnd: Data?) throws -> RangeProofRecord - + func proveRangePage(cursor: RangeCursorRecord?, rangeEnd: Data?, limit: UInt64) throws -> ProvedRangePageRecord - + func publishPrefixHint(prefix: Data) throws -> Bool - + func pushTo(destination: BindingVersionedMap) throws -> MapVersionRecord - + func range(start: Data, rangeEnd: Data?) throws -> [EntryRecord] - + func rangePage(cursor: RangeCursorRecord?, rangeEnd: Data?, limit: UInt64) throws -> RangePageRecord - + /** * Bind this snapshot to a reusable session. Native adapters use the * packed borrowed-read ABI from this session on performance-sensitive paths. */ func readSession() throws -> ProllyReadSession - + func reversePage(cursor: ReverseCursorRecord?, start: Data, limit: UInt64) throws -> ReversePageRecord - + func scanPrefix(prefix: Data, visitor: EntryVisitorCallback) throws -> ScanOutcomeRecord - + func scanRange(start: Data, rangeEnd: Data?, visitor: EntryVisitorCallback) throws -> ScanOutcomeRecord - + func stats() throws -> TreeStatsRecord - + func tree() -> TreeRecord - + func upperBound(key: Data) throws -> EntryRecord? - + func version() -> MapVersionRecord - + } /** * Owned immutable snapshot that remains valid while the managed head advances. @@ -3309,9 +3309,9 @@ open class BindingMapSnapshot: BindingMapSnapshotProtocol, @unchecked Sendable { try! rustCall { uniffi_prolly_bindings_fn_free_bindingmapsnapshot(handle, $0) } } - - + + open func containsKey(key: Data)throws -> Bool { return try FfiConverterBool.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingmapsnapshot_contains_key( @@ -3320,7 +3320,7 @@ open func containsKey(key: Data)throws -> Bool { ) }) } - + open func copyMissingNodes(destination: ProllyEngine)throws -> MissingNodeCopyRecord { return try FfiConverterTypeMissingNodeCopyRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingmapsnapshot_copy_missing_nodes( @@ -3329,7 +3329,7 @@ open func copyMissingNodes(destination: ProllyEngine)throws -> MissingNodeCopyR ) }) } - + open func cursorWindow(key: Data, rangeEnd: Data?, limit: UInt64)throws -> CursorWindowRecord { return try FfiConverterTypeCursorWindowRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingmapsnapshot_cursor_window( @@ -3340,7 +3340,7 @@ open func cursorWindow(key: Data, rangeEnd: Data?, limit: UInt64)throws -> Curs ) }) } - + open func debugView()throws -> TreeDebugViewRecord { return try FfiConverterTypeTreeDebugViewRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingmapsnapshot_debug_view( @@ -3348,7 +3348,7 @@ open func debugView()throws -> TreeDebugViewRecord { ) }) } - + open func export()throws -> SnapshotBundleRecord { return try FfiConverterTypeSnapshotBundleRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingmapsnapshot_export( @@ -3356,7 +3356,7 @@ open func export()throws -> SnapshotBundleRecord { ) }) } - + open func firstEntry()throws -> EntryRecord? { return try FfiConverterOptionTypeEntryRecord.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingmapsnapshot_first_entry( @@ -3364,7 +3364,7 @@ open func firstEntry()throws -> EntryRecord? { ) }) } - + open func get(key: Data)throws -> Data? { return try FfiConverterOptionData.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingmapsnapshot_get( @@ -3373,7 +3373,7 @@ open func get(key: Data)throws -> Data? { ) }) } - + open func getMany(keys: [Data])throws -> [Data?] { return try FfiConverterSequenceOptionData.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingmapsnapshot_get_many( @@ -3382,7 +3382,7 @@ open func getMany(keys: [Data])throws -> [Data?] { ) }) } - + open func getValueRef(key: Data)throws -> ValueRefRecord? { return try FfiConverterOptionTypeValueRefRecord.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingmapsnapshot_get_value_ref( @@ -3391,7 +3391,7 @@ open func getValueRef(key: Data)throws -> ValueRefRecord? { ) }) } - + open func hydratePrefixHint(prefix: Data)throws -> Bool { return try FfiConverterBool.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingmapsnapshot_hydrate_prefix_hint( @@ -3400,7 +3400,7 @@ open func hydratePrefixHint(prefix: Data)throws -> Bool { ) }) } - + open func id() -> Data { return try! FfiConverterData.lift(try! rustCall() { uniffi_prolly_bindings_fn_method_bindingmapsnapshot_id( @@ -3408,7 +3408,7 @@ open func id() -> Data { ) }) } - + open func lastEntry()throws -> EntryRecord? { return try FfiConverterOptionTypeEntryRecord.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingmapsnapshot_last_entry( @@ -3416,7 +3416,7 @@ open func lastEntry()throws -> EntryRecord? { ) }) } - + open func lowerBound(key: Data)throws -> EntryRecord? { return try FfiConverterOptionTypeEntryRecord.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingmapsnapshot_lower_bound( @@ -3425,7 +3425,7 @@ open func lowerBound(key: Data)throws -> EntryRecord? { ) }) } - + open func pinPath(key: Data)throws -> UInt64 { return try FfiConverterUInt64.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingmapsnapshot_pin_path( @@ -3434,7 +3434,7 @@ open func pinPath(key: Data)throws -> UInt64 { ) }) } - + open func pinRoot()throws -> UInt64 { return try FfiConverterUInt64.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingmapsnapshot_pin_root( @@ -3442,7 +3442,7 @@ open func pinRoot()throws -> UInt64 { ) }) } - + open func planMissingNodes(destination: ProllyEngine)throws -> MissingNodePlanRecord { return try FfiConverterTypeMissingNodePlanRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingmapsnapshot_plan_missing_nodes( @@ -3451,7 +3451,7 @@ open func planMissingNodes(destination: ProllyEngine)throws -> MissingNodePlanR ) }) } - + open func prefix(prefix: Data)throws -> [EntryRecord] { return try FfiConverterSequenceTypeEntryRecord.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingmapsnapshot_prefix( @@ -3460,7 +3460,7 @@ open func prefix(prefix: Data)throws -> [EntryRecord] { ) }) } - + open func prefixPage(prefix: Data, cursor: RangeCursorRecord?, limit: UInt64)throws -> RangePageRecord { return try FfiConverterTypeRangePageRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingmapsnapshot_prefix_page( @@ -3471,7 +3471,7 @@ open func prefixPage(prefix: Data, cursor: RangeCursorRecord?, limit: UInt64)thr ) }) } - + open func prefixReversePage(prefix: Data, cursor: ReverseCursorRecord?, limit: UInt64)throws -> ReversePageRecord { return try FfiConverterTypeReversePageRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingmapsnapshot_prefix_reverse_page( @@ -3482,7 +3482,7 @@ open func prefixReversePage(prefix: Data, cursor: ReverseCursorRecord?, limit: U ) }) } - + open func proveKey(key: Data)throws -> KeyProofRecord { return try FfiConverterTypeKeyProofRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingmapsnapshot_prove_key( @@ -3491,7 +3491,7 @@ open func proveKey(key: Data)throws -> KeyProofRecord { ) }) } - + open func proveKeys(keys: [Data])throws -> MultiKeyProofRecord { return try FfiConverterTypeMultiKeyProofRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingmapsnapshot_prove_keys( @@ -3500,7 +3500,7 @@ open func proveKeys(keys: [Data])throws -> MultiKeyProofRecord { ) }) } - + open func provePrefix(prefix: Data)throws -> RangeProofRecord { return try FfiConverterTypeRangeProofRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingmapsnapshot_prove_prefix( @@ -3509,7 +3509,7 @@ open func provePrefix(prefix: Data)throws -> RangeProofRecord { ) }) } - + open func proveRange(start: Data, rangeEnd: Data?)throws -> RangeProofRecord { return try FfiConverterTypeRangeProofRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingmapsnapshot_prove_range( @@ -3519,7 +3519,7 @@ open func proveRange(start: Data, rangeEnd: Data?)throws -> RangeProofRecord { ) }) } - + open func proveRangePage(cursor: RangeCursorRecord?, rangeEnd: Data?, limit: UInt64)throws -> ProvedRangePageRecord { return try FfiConverterTypeProvedRangePageRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingmapsnapshot_prove_range_page( @@ -3530,7 +3530,7 @@ open func proveRangePage(cursor: RangeCursorRecord?, rangeEnd: Data?, limit: UIn ) }) } - + open func publishPrefixHint(prefix: Data)throws -> Bool { return try FfiConverterBool.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingmapsnapshot_publish_prefix_hint( @@ -3539,7 +3539,7 @@ open func publishPrefixHint(prefix: Data)throws -> Bool { ) }) } - + open func pushTo(destination: BindingVersionedMap)throws -> MapVersionRecord { return try FfiConverterTypeMapVersionRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingmapsnapshot_push_to( @@ -3548,7 +3548,7 @@ open func pushTo(destination: BindingVersionedMap)throws -> MapVersionRecord { ) }) } - + open func range(start: Data, rangeEnd: Data?)throws -> [EntryRecord] { return try FfiConverterSequenceTypeEntryRecord.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingmapsnapshot_range( @@ -3558,7 +3558,7 @@ open func range(start: Data, rangeEnd: Data?)throws -> [EntryRecord] { ) }) } - + open func rangePage(cursor: RangeCursorRecord?, rangeEnd: Data?, limit: UInt64)throws -> RangePageRecord { return try FfiConverterTypeRangePageRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingmapsnapshot_range_page( @@ -3569,7 +3569,7 @@ open func rangePage(cursor: RangeCursorRecord?, rangeEnd: Data?, limit: UInt64)t ) }) } - + /** * Bind this snapshot to a reusable session. Native adapters use the * packed borrowed-read ABI from this session on performance-sensitive paths. @@ -3581,7 +3581,7 @@ open func readSession()throws -> ProllyReadSession { ) }) } - + open func reversePage(cursor: ReverseCursorRecord?, start: Data, limit: UInt64)throws -> ReversePageRecord { return try FfiConverterTypeReversePageRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingmapsnapshot_reverse_page( @@ -3592,7 +3592,7 @@ open func reversePage(cursor: ReverseCursorRecord?, start: Data, limit: UInt64)t ) }) } - + open func scanPrefix(prefix: Data, visitor: EntryVisitorCallback)throws -> ScanOutcomeRecord { return try FfiConverterTypeScanOutcomeRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingmapsnapshot_scan_prefix( @@ -3602,7 +3602,7 @@ open func scanPrefix(prefix: Data, visitor: EntryVisitorCallback)throws -> Scan ) }) } - + open func scanRange(start: Data, rangeEnd: Data?, visitor: EntryVisitorCallback)throws -> ScanOutcomeRecord { return try FfiConverterTypeScanOutcomeRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingmapsnapshot_scan_range( @@ -3613,7 +3613,7 @@ open func scanRange(start: Data, rangeEnd: Data?, visitor: EntryVisitorCallback) ) }) } - + open func stats()throws -> TreeStatsRecord { return try FfiConverterTypeTreeStatsRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingmapsnapshot_stats( @@ -3621,7 +3621,7 @@ open func stats()throws -> TreeStatsRecord { ) }) } - + open func tree() -> TreeRecord { return try! FfiConverterTypeTreeRecord_lift(try! rustCall() { uniffi_prolly_bindings_fn_method_bindingmapsnapshot_tree( @@ -3629,7 +3629,7 @@ open func tree() -> TreeRecord { ) }) } - + open func upperBound(key: Data)throws -> EntryRecord? { return try FfiConverterOptionTypeEntryRecord.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingmapsnapshot_upper_bound( @@ -3638,7 +3638,7 @@ open func upperBound(key: Data)throws -> EntryRecord? { ) }) } - + open func version() -> MapVersionRecord { return try! FfiConverterTypeMapVersionRecord_lift(try! rustCall() { uniffi_prolly_bindings_fn_method_bindingmapsnapshot_version( @@ -3646,9 +3646,9 @@ open func version() -> MapVersionRecord { ) }) } - - + + } @@ -3701,11 +3701,11 @@ public func FfiConverterTypeBindingMapSnapshot_lower(_ value: BindingMapSnapshot * Resumable polling subscription with portable owned state. */ public protocol BindingMapSubscriptionProtocol: AnyObject, Sendable { - + func lastSeen() throws -> Data? - + func poll() throws -> MapChangeEventRecord? - + } /** * Resumable polling subscription with portable owned state. @@ -3760,9 +3760,9 @@ open class BindingMapSubscription: BindingMapSubscriptionProtocol, @unchecked Se try! rustCall { uniffi_prolly_bindings_fn_free_bindingmapsubscription(handle, $0) } } - - + + open func lastSeen()throws -> Data? { return try FfiConverterOptionData.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingmapsubscription_last_seen( @@ -3770,7 +3770,7 @@ open func lastSeen()throws -> Data? { ) }) } - + open func poll()throws -> MapChangeEventRecord? { return try FfiConverterOptionTypeMapChangeEventRecord.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingmapsubscription_poll( @@ -3778,9 +3778,9 @@ open func poll()throws -> MapChangeEventRecord? { ) }) } - - + + } @@ -3830,23 +3830,23 @@ public func FfiConverterTypeBindingMapSubscription_lower(_ value: BindingMapSubs public protocol BindingProductQuantizerProtocol: AnyObject, Sendable { - + func config() -> ProductQuantizationConfigRecord - + func manifest() -> Data - + func proveSearch(map: BindingProximityMap, request: ProximitySearchRequestRecord, limits: ContentGraphLimitsRecord) throws -> BindingProximitySearchProof - + func quality() -> ProductQuantizationQualityRecord - + func search(map: BindingProximityMap, request: ProximitySearchRequestRecord) throws -> ProximitySearchResultRecord - + func searchCancellable(map: BindingProximityMap, request: ProximitySearchRequestRecord, runtime: BindingProximitySearchRuntime?, cancellation: BindingProximityCancellationToken) throws -> ProximitySearchResultRecord - + func searchWithRuntime(map: BindingProximityMap, request: ProximitySearchRequestRecord, runtime: BindingProximitySearchRuntime) throws -> ProximitySearchResultRecord - + func sourceDescriptor() -> Data - + } open class BindingProductQuantizer: BindingProductQuantizerProtocol, @unchecked Sendable { fileprivate let handle: UInt64 @@ -3898,9 +3898,9 @@ open class BindingProductQuantizer: BindingProductQuantizerProtocol, @unchecked try! rustCall { uniffi_prolly_bindings_fn_free_bindingproductquantizer(handle, $0) } } - - + + open func config() -> ProductQuantizationConfigRecord { return try! FfiConverterTypeProductQuantizationConfigRecord_lift(try! rustCall() { uniffi_prolly_bindings_fn_method_bindingproductquantizer_config( @@ -3908,7 +3908,7 @@ open func config() -> ProductQuantizationConfigRecord { ) }) } - + open func manifest() -> Data { return try! FfiConverterData.lift(try! rustCall() { uniffi_prolly_bindings_fn_method_bindingproductquantizer_manifest( @@ -3916,7 +3916,7 @@ open func manifest() -> Data { ) }) } - + open func proveSearch(map: BindingProximityMap, request: ProximitySearchRequestRecord, limits: ContentGraphLimitsRecord)throws -> BindingProximitySearchProof { return try FfiConverterTypeBindingProximitySearchProof_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingproductquantizer_prove_search( @@ -3927,7 +3927,7 @@ open func proveSearch(map: BindingProximityMap, request: ProximitySearchRequestR ) }) } - + open func quality() -> ProductQuantizationQualityRecord { return try! FfiConverterTypeProductQuantizationQualityRecord_lift(try! rustCall() { uniffi_prolly_bindings_fn_method_bindingproductquantizer_quality( @@ -3935,7 +3935,7 @@ open func quality() -> ProductQuantizationQualityRecord { ) }) } - + open func search(map: BindingProximityMap, request: ProximitySearchRequestRecord)throws -> ProximitySearchResultRecord { return try FfiConverterTypeProximitySearchResultRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingproductquantizer_search( @@ -3945,7 +3945,7 @@ open func search(map: BindingProximityMap, request: ProximitySearchRequestRecord ) }) } - + open func searchCancellable(map: BindingProximityMap, request: ProximitySearchRequestRecord, runtime: BindingProximitySearchRuntime?, cancellation: BindingProximityCancellationToken)throws -> ProximitySearchResultRecord { return try FfiConverterTypeProximitySearchResultRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingproductquantizer_search_cancellable( @@ -3957,7 +3957,7 @@ open func searchCancellable(map: BindingProximityMap, request: ProximitySearchRe ) }) } - + open func searchWithRuntime(map: BindingProximityMap, request: ProximitySearchRequestRecord, runtime: BindingProximitySearchRuntime)throws -> ProximitySearchResultRecord { return try FfiConverterTypeProximitySearchResultRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingproductquantizer_search_with_runtime( @@ -3968,7 +3968,7 @@ open func searchWithRuntime(map: BindingProximityMap, request: ProximitySearchRe ) }) } - + open func sourceDescriptor() -> Data { return try! FfiConverterData.lift(try! rustCall() { uniffi_prolly_bindings_fn_method_bindingproductquantizer_source_descriptor( @@ -3976,9 +3976,9 @@ open func sourceDescriptor() -> Data { ) }) } - - + + } @@ -4028,11 +4028,11 @@ public func FfiConverterTypeBindingProductQuantizer_lower(_ value: BindingProduc public protocol BindingProximityCancellationTokenProtocol: AnyObject, Sendable { - - func cancel() - + + func cancel() + func isCancelled() -> Bool - + } open class BindingProximityCancellationToken: BindingProximityCancellationTokenProtocol, @unchecked Sendable { fileprivate let handle: UInt64 @@ -4091,16 +4091,16 @@ public convenience init() { try! rustCall { uniffi_prolly_bindings_fn_free_bindingproximitycancellationtoken(handle, $0) } } - - + + open func cancel() {try! rustCall() { uniffi_prolly_bindings_fn_method_bindingproximitycancellationtoken_cancel( self.uniffiCloneHandle(),$0 ) } } - + open func isCancelled() -> Bool { return try! FfiConverterBool.lift(try! rustCall() { uniffi_prolly_bindings_fn_method_bindingproximitycancellationtoken_is_cancelled( @@ -4108,9 +4108,9 @@ open func isCancelled() -> Bool { ) }) } - - + + } @@ -4160,65 +4160,73 @@ public func FfiConverterTypeBindingProximityCancellationToken_lower(_ value: Bin public protocol BindingProximityMapProtocol: AnyObject, Sendable { - - func buildAcceleratorCatalog(hnsw: BindingHnswIndex?, pq: BindingProductQuantizer?, composite: BindingCompositeAccelerator?) throws -> BindingAcceleratorCatalog - + + func buildAcceleratorCatalog(hnsw: BindingHnswIndex?, pq: BindingProductQuantizer?, turboquant: BindingTurboQuantizer?, composite: BindingCompositeAccelerator?) throws -> BindingAcceleratorCatalog + func buildCompositeHnsw(baseMap: BindingProximityMap, base: BindingHnswIndex, config: CompositeAcceleratorConfigRecord, limits: CompositeBuildLimitsRecord) throws -> CompositeBuildOutcomeRecord - + func buildCompositePq(baseMap: BindingProximityMap, base: BindingProductQuantizer, config: CompositeAcceleratorConfigRecord, limits: CompositeBuildLimitsRecord) throws -> CompositeBuildOutcomeRecord - + + func buildCompositeTurboquant(baseMap: BindingProximityMap, base: BindingTurboQuantizer, config: CompositeAcceleratorConfigRecord, limits: CompositeBuildLimitsRecord) throws -> CompositeBuildOutcomeRecord + func buildHnsw(config: HnswConfigRecord, limits: HnswBuildLimitsRecord) throws -> HnswBuildResultRecord - + func buildOrRebuildCompositeHnsw(baseMap: BindingProximityMap, base: BindingHnswIndex, config: CompositeAcceleratorConfigRecord, limits: CompositeBuildLimitsRecord, rebuild: CompositeRebuildOptionsRecord) throws -> CompositeBuildOrRebuildOutcomeRecord - + func buildOrRebuildCompositePq(baseMap: BindingProximityMap, base: BindingProductQuantizer, config: CompositeAcceleratorConfigRecord, limits: CompositeBuildLimitsRecord, rebuild: CompositeRebuildOptionsRecord) throws -> CompositeBuildOrRebuildOutcomeRecord - + + func buildOrRebuildCompositeTurboquant(baseMap: BindingProximityMap, base: BindingTurboQuantizer, config: CompositeAcceleratorConfigRecord, limits: CompositeBuildLimitsRecord, rebuild: CompositeRebuildOptionsRecord) throws -> CompositeBuildOrRebuildOutcomeRecord + func buildPq(config: ProductQuantizationConfigRecord, workerThreads: UInt64, limits: ProductQuantizationBuildLimitsRecord) throws -> ProductQuantizationBuildResultRecord - - func clearContentCache() throws - + + func buildTurboquant(config: TurboQuantizationConfigRecord, workerThreads: UInt64, limits: TurboQuantizationBuildLimitsRecord) throws -> TurboQuantizationBuildResultRecord + + func clearContentCache() throws + func config() throws -> ProximityConfigRecord - + func containsKey(key: Data) throws -> Bool - + func count() throws -> UInt64 - + func descriptor() -> Data - + func fastHandle() -> UInt64 - + func get(key: Data) throws -> ExactProximityRecordRecord? - + func loadAcceleratorCatalog(manifest: Data) throws -> BindingAcceleratorCatalog - + func loadComposite(manifest: Data) throws -> BindingCompositeAccelerator - + func loadHnsw(manifest: Data) throws -> BindingHnswIndex - + func loadPq(manifest: Data) throws -> BindingProductQuantizer - + + func loadTurboquant(manifest: Data) throws -> BindingTurboQuantizer + func mutate(mutations: [ProximityMutationRecord]) throws -> ProximityMutationResultRecord - + func proveMembership(key: Data) throws -> ProximityMembershipProofRecord - + func proveSearch(request: ProximitySearchRequestRecord, limits: ContentGraphLimitsRecord) throws -> BindingProximitySearchProof - + func proveStructure(limits: ContentGraphLimitsRecord) throws -> ProximityStructuralProofRecord - + func readSession() throws -> BindingProximityReadSession - + func rebuild(mutations: [ProximityMutationRecord]) throws -> BindingProximityMap - + func scanRecords(visitor: ProximityRecordVisitorCallback) throws -> UInt64 - + func search(request: ProximitySearchRequestRecord) throws -> ProximitySearchResultRecord - + func searchCancellable(request: ProximitySearchRequestRecord, runtime: BindingProximitySearchRuntime?, cancellation: BindingProximityCancellationToken) throws -> ProximitySearchResultRecord - + func searchWithRuntime(request: ProximitySearchRequestRecord, runtime: BindingProximitySearchRuntime) throws -> ProximitySearchResultRecord - + func verify() throws -> ProximityVerificationRecord - + } open class BindingProximityMap: BindingProximityMapProtocol, @unchecked Sendable { fileprivate let handle: UInt64 @@ -4270,20 +4278,21 @@ open class BindingProximityMap: BindingProximityMapProtocol, @unchecked Sendable try! rustCall { uniffi_prolly_bindings_fn_free_bindingproximitymap(handle, $0) } } - - -open func buildAcceleratorCatalog(hnsw: BindingHnswIndex?, pq: BindingProductQuantizer?, composite: BindingCompositeAccelerator?)throws -> BindingAcceleratorCatalog { + + +open func buildAcceleratorCatalog(hnsw: BindingHnswIndex?, pq: BindingProductQuantizer?, turboquant: BindingTurboQuantizer?, composite: BindingCompositeAccelerator?)throws -> BindingAcceleratorCatalog { return try FfiConverterTypeBindingAcceleratorCatalog_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingproximitymap_build_accelerator_catalog( self.uniffiCloneHandle(), FfiConverterOptionTypeBindingHnswIndex.lower(hnsw), FfiConverterOptionTypeBindingProductQuantizer.lower(pq), + FfiConverterOptionTypeBindingTurboQuantizer.lower(turboquant), FfiConverterOptionTypeBindingCompositeAccelerator.lower(composite),$0 ) }) } - + open func buildCompositeHnsw(baseMap: BindingProximityMap, base: BindingHnswIndex, config: CompositeAcceleratorConfigRecord, limits: CompositeBuildLimitsRecord)throws -> CompositeBuildOutcomeRecord { return try FfiConverterTypeCompositeBuildOutcomeRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingproximitymap_build_composite_hnsw( @@ -4295,7 +4304,7 @@ open func buildCompositeHnsw(baseMap: BindingProximityMap, base: BindingHnswInde ) }) } - + open func buildCompositePq(baseMap: BindingProximityMap, base: BindingProductQuantizer, config: CompositeAcceleratorConfigRecord, limits: CompositeBuildLimitsRecord)throws -> CompositeBuildOutcomeRecord { return try FfiConverterTypeCompositeBuildOutcomeRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingproximitymap_build_composite_pq( @@ -4307,7 +4316,19 @@ open func buildCompositePq(baseMap: BindingProximityMap, base: BindingProductQua ) }) } - + +open func buildCompositeTurboquant(baseMap: BindingProximityMap, base: BindingTurboQuantizer, config: CompositeAcceleratorConfigRecord, limits: CompositeBuildLimitsRecord)throws -> CompositeBuildOutcomeRecord { + return try FfiConverterTypeCompositeBuildOutcomeRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { + uniffi_prolly_bindings_fn_method_bindingproximitymap_build_composite_turboquant( + self.uniffiCloneHandle(), + FfiConverterTypeBindingProximityMap_lower(baseMap), + FfiConverterTypeBindingTurboQuantizer_lower(base), + FfiConverterTypeCompositeAcceleratorConfigRecord_lower(config), + FfiConverterTypeCompositeBuildLimitsRecord_lower(limits),$0 + ) +}) +} + open func buildHnsw(config: HnswConfigRecord, limits: HnswBuildLimitsRecord)throws -> HnswBuildResultRecord { return try FfiConverterTypeHnswBuildResultRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingproximitymap_build_hnsw( @@ -4317,7 +4338,7 @@ open func buildHnsw(config: HnswConfigRecord, limits: HnswBuildLimitsRecord)thro ) }) } - + open func buildOrRebuildCompositeHnsw(baseMap: BindingProximityMap, base: BindingHnswIndex, config: CompositeAcceleratorConfigRecord, limits: CompositeBuildLimitsRecord, rebuild: CompositeRebuildOptionsRecord)throws -> CompositeBuildOrRebuildOutcomeRecord { return try FfiConverterTypeCompositeBuildOrRebuildOutcomeRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingproximitymap_build_or_rebuild_composite_hnsw( @@ -4330,7 +4351,7 @@ open func buildOrRebuildCompositeHnsw(baseMap: BindingProximityMap, base: Bindin ) }) } - + open func buildOrRebuildCompositePq(baseMap: BindingProximityMap, base: BindingProductQuantizer, config: CompositeAcceleratorConfigRecord, limits: CompositeBuildLimitsRecord, rebuild: CompositeRebuildOptionsRecord)throws -> CompositeBuildOrRebuildOutcomeRecord { return try FfiConverterTypeCompositeBuildOrRebuildOutcomeRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingproximitymap_build_or_rebuild_composite_pq( @@ -4343,7 +4364,20 @@ open func buildOrRebuildCompositePq(baseMap: BindingProximityMap, base: BindingP ) }) } - + +open func buildOrRebuildCompositeTurboquant(baseMap: BindingProximityMap, base: BindingTurboQuantizer, config: CompositeAcceleratorConfigRecord, limits: CompositeBuildLimitsRecord, rebuild: CompositeRebuildOptionsRecord)throws -> CompositeBuildOrRebuildOutcomeRecord { + return try FfiConverterTypeCompositeBuildOrRebuildOutcomeRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { + uniffi_prolly_bindings_fn_method_bindingproximitymap_build_or_rebuild_composite_turboquant( + self.uniffiCloneHandle(), + FfiConverterTypeBindingProximityMap_lower(baseMap), + FfiConverterTypeBindingTurboQuantizer_lower(base), + FfiConverterTypeCompositeAcceleratorConfigRecord_lower(config), + FfiConverterTypeCompositeBuildLimitsRecord_lower(limits), + FfiConverterTypeCompositeRebuildOptionsRecord_lower(rebuild),$0 + ) +}) +} + open func buildPq(config: ProductQuantizationConfigRecord, workerThreads: UInt64, limits: ProductQuantizationBuildLimitsRecord)throws -> ProductQuantizationBuildResultRecord { return try FfiConverterTypeProductQuantizationBuildResultRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingproximitymap_build_pq( @@ -4354,14 +4388,25 @@ open func buildPq(config: ProductQuantizationConfigRecord, workerThreads: UInt64 ) }) } - + +open func buildTurboquant(config: TurboQuantizationConfigRecord, workerThreads: UInt64, limits: TurboQuantizationBuildLimitsRecord)throws -> TurboQuantizationBuildResultRecord { + return try FfiConverterTypeTurboQuantizationBuildResultRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { + uniffi_prolly_bindings_fn_method_bindingproximitymap_build_turboquant( + self.uniffiCloneHandle(), + FfiConverterTypeTurboQuantizationConfigRecord_lower(config), + FfiConverterUInt64.lower(workerThreads), + FfiConverterTypeTurboQuantizationBuildLimitsRecord_lower(limits),$0 + ) +}) +} + open func clearContentCache()throws {try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingproximitymap_clear_content_cache( self.uniffiCloneHandle(),$0 ) } } - + open func config()throws -> ProximityConfigRecord { return try FfiConverterTypeProximityConfigRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingproximitymap_config( @@ -4369,7 +4414,7 @@ open func config()throws -> ProximityConfigRecord { ) }) } - + open func containsKey(key: Data)throws -> Bool { return try FfiConverterBool.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingproximitymap_contains_key( @@ -4378,7 +4423,7 @@ open func containsKey(key: Data)throws -> Bool { ) }) } - + open func count()throws -> UInt64 { return try FfiConverterUInt64.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingproximitymap_count( @@ -4386,7 +4431,7 @@ open func count()throws -> UInt64 { ) }) } - + open func descriptor() -> Data { return try! FfiConverterData.lift(try! rustCall() { uniffi_prolly_bindings_fn_method_bindingproximitymap_descriptor( @@ -4394,7 +4439,7 @@ open func descriptor() -> Data { ) }) } - + open func fastHandle() -> UInt64 { return try! FfiConverterUInt64.lift(try! rustCall() { uniffi_prolly_bindings_fn_method_bindingproximitymap_fast_handle( @@ -4402,7 +4447,7 @@ open func fastHandle() -> UInt64 { ) }) } - + open func get(key: Data)throws -> ExactProximityRecordRecord? { return try FfiConverterOptionTypeExactProximityRecordRecord.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingproximitymap_get( @@ -4411,7 +4456,7 @@ open func get(key: Data)throws -> ExactProximityRecordRecord? { ) }) } - + open func loadAcceleratorCatalog(manifest: Data)throws -> BindingAcceleratorCatalog { return try FfiConverterTypeBindingAcceleratorCatalog_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingproximitymap_load_accelerator_catalog( @@ -4420,7 +4465,7 @@ open func loadAcceleratorCatalog(manifest: Data)throws -> BindingAcceleratorCat ) }) } - + open func loadComposite(manifest: Data)throws -> BindingCompositeAccelerator { return try FfiConverterTypeBindingCompositeAccelerator_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingproximitymap_load_composite( @@ -4429,7 +4474,7 @@ open func loadComposite(manifest: Data)throws -> BindingCompositeAccelerator { ) }) } - + open func loadHnsw(manifest: Data)throws -> BindingHnswIndex { return try FfiConverterTypeBindingHnswIndex_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingproximitymap_load_hnsw( @@ -4438,7 +4483,7 @@ open func loadHnsw(manifest: Data)throws -> BindingHnswIndex { ) }) } - + open func loadPq(manifest: Data)throws -> BindingProductQuantizer { return try FfiConverterTypeBindingProductQuantizer_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingproximitymap_load_pq( @@ -4447,7 +4492,16 @@ open func loadPq(manifest: Data)throws -> BindingProductQuantizer { ) }) } - + +open func loadTurboquant(manifest: Data)throws -> BindingTurboQuantizer { + return try FfiConverterTypeBindingTurboQuantizer_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { + uniffi_prolly_bindings_fn_method_bindingproximitymap_load_turboquant( + self.uniffiCloneHandle(), + FfiConverterData.lower(manifest),$0 + ) +}) +} + open func mutate(mutations: [ProximityMutationRecord])throws -> ProximityMutationResultRecord { return try FfiConverterTypeProximityMutationResultRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingproximitymap_mutate( @@ -4456,7 +4510,7 @@ open func mutate(mutations: [ProximityMutationRecord])throws -> ProximityMutati ) }) } - + open func proveMembership(key: Data)throws -> ProximityMembershipProofRecord { return try FfiConverterTypeProximityMembershipProofRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingproximitymap_prove_membership( @@ -4465,7 +4519,7 @@ open func proveMembership(key: Data)throws -> ProximityMembershipProofRecord { ) }) } - + open func proveSearch(request: ProximitySearchRequestRecord, limits: ContentGraphLimitsRecord)throws -> BindingProximitySearchProof { return try FfiConverterTypeBindingProximitySearchProof_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingproximitymap_prove_search( @@ -4475,7 +4529,7 @@ open func proveSearch(request: ProximitySearchRequestRecord, limits: ContentGrap ) }) } - + open func proveStructure(limits: ContentGraphLimitsRecord)throws -> ProximityStructuralProofRecord { return try FfiConverterTypeProximityStructuralProofRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingproximitymap_prove_structure( @@ -4484,7 +4538,7 @@ open func proveStructure(limits: ContentGraphLimitsRecord)throws -> ProximitySt ) }) } - + open func readSession()throws -> BindingProximityReadSession { return try FfiConverterTypeBindingProximityReadSession_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingproximitymap_read_session( @@ -4492,7 +4546,7 @@ open func readSession()throws -> BindingProximityReadSession { ) }) } - + open func rebuild(mutations: [ProximityMutationRecord])throws -> BindingProximityMap { return try FfiConverterTypeBindingProximityMap_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingproximitymap_rebuild( @@ -4501,7 +4555,7 @@ open func rebuild(mutations: [ProximityMutationRecord])throws -> BindingProximi ) }) } - + open func scanRecords(visitor: ProximityRecordVisitorCallback)throws -> UInt64 { return try FfiConverterUInt64.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingproximitymap_scan_records( @@ -4510,7 +4564,7 @@ open func scanRecords(visitor: ProximityRecordVisitorCallback)throws -> UInt64 ) }) } - + open func search(request: ProximitySearchRequestRecord)throws -> ProximitySearchResultRecord { return try FfiConverterTypeProximitySearchResultRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingproximitymap_search( @@ -4519,7 +4573,7 @@ open func search(request: ProximitySearchRequestRecord)throws -> ProximitySearc ) }) } - + open func searchCancellable(request: ProximitySearchRequestRecord, runtime: BindingProximitySearchRuntime?, cancellation: BindingProximityCancellationToken)throws -> ProximitySearchResultRecord { return try FfiConverterTypeProximitySearchResultRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingproximitymap_search_cancellable( @@ -4530,7 +4584,7 @@ open func searchCancellable(request: ProximitySearchRequestRecord, runtime: Bind ) }) } - + open func searchWithRuntime(request: ProximitySearchRequestRecord, runtime: BindingProximitySearchRuntime)throws -> ProximitySearchResultRecord { return try FfiConverterTypeProximitySearchResultRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingproximitymap_search_with_runtime( @@ -4540,7 +4594,7 @@ open func searchWithRuntime(request: ProximitySearchRequestRecord, runtime: Bind ) }) } - + open func verify()throws -> ProximityVerificationRecord { return try FfiConverterTypeProximityVerificationRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingproximitymap_verify( @@ -4548,9 +4602,9 @@ open func verify()throws -> ProximityVerificationRecord { ) }) } - - + + } @@ -4600,21 +4654,21 @@ public func FfiConverterTypeBindingProximityMap_lower(_ value: BindingProximityM public protocol BindingProximityReadSessionProtocol: AnyObject, Sendable { - + func containsKey(key: Data) throws -> Bool - + func fastHandle() -> UInt64 - + func get(key: Data) throws -> ExactProximityRecordRecord? - + func scanRecords(visitor: ProximityRecordVisitorCallback) throws -> UInt64 - + func search(request: ProximitySearchRequestRecord) throws -> ProximitySearchResultRecord - + func searchCancellable(request: ProximitySearchRequestRecord, runtime: BindingProximitySearchRuntime?, cancellation: BindingProximityCancellationToken) throws -> ProximitySearchResultRecord - + func searchWithRuntime(request: ProximitySearchRequestRecord, runtime: BindingProximitySearchRuntime) throws -> ProximitySearchResultRecord - + } open class BindingProximityReadSession: BindingProximityReadSessionProtocol, @unchecked Sendable { fileprivate let handle: UInt64 @@ -4666,9 +4720,9 @@ open class BindingProximityReadSession: BindingProximityReadSessionProtocol, @un try! rustCall { uniffi_prolly_bindings_fn_free_bindingproximityreadsession(handle, $0) } } - - + + open func containsKey(key: Data)throws -> Bool { return try FfiConverterBool.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingproximityreadsession_contains_key( @@ -4677,7 +4731,7 @@ open func containsKey(key: Data)throws -> Bool { ) }) } - + open func fastHandle() -> UInt64 { return try! FfiConverterUInt64.lift(try! rustCall() { uniffi_prolly_bindings_fn_method_bindingproximityreadsession_fast_handle( @@ -4685,7 +4739,7 @@ open func fastHandle() -> UInt64 { ) }) } - + open func get(key: Data)throws -> ExactProximityRecordRecord? { return try FfiConverterOptionTypeExactProximityRecordRecord.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingproximityreadsession_get( @@ -4694,7 +4748,7 @@ open func get(key: Data)throws -> ExactProximityRecordRecord? { ) }) } - + open func scanRecords(visitor: ProximityRecordVisitorCallback)throws -> UInt64 { return try FfiConverterUInt64.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingproximityreadsession_scan_records( @@ -4703,7 +4757,7 @@ open func scanRecords(visitor: ProximityRecordVisitorCallback)throws -> UInt64 ) }) } - + open func search(request: ProximitySearchRequestRecord)throws -> ProximitySearchResultRecord { return try FfiConverterTypeProximitySearchResultRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingproximityreadsession_search( @@ -4712,7 +4766,7 @@ open func search(request: ProximitySearchRequestRecord)throws -> ProximitySearc ) }) } - + open func searchCancellable(request: ProximitySearchRequestRecord, runtime: BindingProximitySearchRuntime?, cancellation: BindingProximityCancellationToken)throws -> ProximitySearchResultRecord { return try FfiConverterTypeProximitySearchResultRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingproximityreadsession_search_cancellable( @@ -4723,7 +4777,7 @@ open func searchCancellable(request: ProximitySearchRequestRecord, runtime: Bind ) }) } - + open func searchWithRuntime(request: ProximitySearchRequestRecord, runtime: BindingProximitySearchRuntime)throws -> ProximitySearchResultRecord { return try FfiConverterTypeProximitySearchResultRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingproximityreadsession_search_with_runtime( @@ -4733,9 +4787,9 @@ open func searchWithRuntime(request: ProximitySearchRequestRecord, runtime: Bind ) }) } - - + + } @@ -4785,11 +4839,11 @@ public func FfiConverterTypeBindingProximityReadSession_lower(_ value: BindingPr public protocol BindingProximitySearchProofProtocol: AnyObject, Sendable { - + func sourceDescriptor() -> Data - + func verify(expectedDescriptor: Data?, limits: ContentGraphLimitsRecord) throws -> ProximitySearchVerificationRecord - + } open class BindingProximitySearchProof: BindingProximitySearchProofProtocol, @unchecked Sendable { fileprivate let handle: UInt64 @@ -4841,9 +4895,9 @@ open class BindingProximitySearchProof: BindingProximitySearchProofProtocol, @un try! rustCall { uniffi_prolly_bindings_fn_free_bindingproximitysearchproof(handle, $0) } } - - + + open func sourceDescriptor() -> Data { return try! FfiConverterData.lift(try! rustCall() { uniffi_prolly_bindings_fn_method_bindingproximitysearchproof_source_descriptor( @@ -4851,7 +4905,7 @@ open func sourceDescriptor() -> Data { ) }) } - + open func verify(expectedDescriptor: Data?, limits: ContentGraphLimitsRecord)throws -> ProximitySearchVerificationRecord { return try FfiConverterTypeProximitySearchVerificationRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingproximitysearchproof_verify( @@ -4861,9 +4915,9 @@ open func verify(expectedDescriptor: Data?, limits: ContentGraphLimitsRecord)thr ) }) } - - + + } @@ -4913,13 +4967,13 @@ public func FfiConverterTypeBindingProximitySearchProof_lower(_ value: BindingPr public protocol BindingProximitySearchRuntimeProtocol: AnyObject, Sendable { - - func clear() - + + func clear() + func policy() -> ProximitySearchRuntimePolicyRecord - + func stats() -> ProximitySearchRuntimeStatsRecord - + } open class BindingProximitySearchRuntime: BindingProximitySearchRuntimeProtocol, @unchecked Sendable { fileprivate let handle: UInt64 @@ -4971,16 +5025,16 @@ open class BindingProximitySearchRuntime: BindingProximitySearchRuntimeProtocol, try! rustCall { uniffi_prolly_bindings_fn_free_bindingproximitysearchruntime(handle, $0) } } - - + + open func clear() {try! rustCall() { uniffi_prolly_bindings_fn_method_bindingproximitysearchruntime_clear( self.uniffiCloneHandle(),$0 ) } } - + open func policy() -> ProximitySearchRuntimePolicyRecord { return try! FfiConverterTypeProximitySearchRuntimePolicyRecord_lift(try! rustCall() { uniffi_prolly_bindings_fn_method_bindingproximitysearchruntime_policy( @@ -4988,7 +5042,7 @@ open func policy() -> ProximitySearchRuntimePolicyRecord { ) }) } - + open func stats() -> ProximitySearchRuntimeStatsRecord { return try! FfiConverterTypeProximitySearchRuntimeStatsRecord_lift(try! rustCall() { uniffi_prolly_bindings_fn_method_bindingproximitysearchruntime_stats( @@ -4996,9 +5050,9 @@ open func stats() -> ProximitySearchRuntimeStatsRecord { ) }) } - - + + } @@ -5048,31 +5102,31 @@ public func FfiConverterTypeBindingProximitySearchRuntime_lower(_ value: Binding public protocol BindingSecondaryIndexSnapshotProtocol: AnyObject, Sendable { - + func exact(term: Data) throws -> [IndexMatchRecord] - + func exactPage(term: Data, cursor: Data?, limit: UInt64) throws -> IndexPageRecord - + func exactReversePage(term: Data, cursor: Data?, limit: UInt64) throws -> IndexPageRecord - + func fastHandle() -> UInt64 - + func name() -> Data - + func prefix(prefix: Data) throws -> [IndexMatchRecord] - + func prefixPage(prefix: Data, cursor: Data?, limit: UInt64) throws -> IndexPageRecord - + func prefixReversePage(prefix: Data, cursor: Data?, limit: UInt64) throws -> IndexPageRecord - + func range(start: Data, rangeEnd: Data?) throws -> [IndexMatchRecord] - + func rangePage(start: Data, rangeEnd: Data?, cursor: Data?, limit: UInt64) throws -> IndexPageRecord - + func rangeReversePage(start: Data, rangeEnd: Data?, cursor: Data?, limit: UInt64) throws -> IndexPageRecord - + func records(term: Data) throws -> [IndexedSourceRecord] - + } open class BindingSecondaryIndexSnapshot: BindingSecondaryIndexSnapshotProtocol, @unchecked Sendable { fileprivate let handle: UInt64 @@ -5124,9 +5178,9 @@ open class BindingSecondaryIndexSnapshot: BindingSecondaryIndexSnapshotProtocol, try! rustCall { uniffi_prolly_bindings_fn_free_bindingsecondaryindexsnapshot(handle, $0) } } - - + + open func exact(term: Data)throws -> [IndexMatchRecord] { return try FfiConverterSequenceTypeIndexMatchRecord.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingsecondaryindexsnapshot_exact( @@ -5135,7 +5189,7 @@ open func exact(term: Data)throws -> [IndexMatchRecord] { ) }) } - + open func exactPage(term: Data, cursor: Data?, limit: UInt64)throws -> IndexPageRecord { return try FfiConverterTypeIndexPageRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingsecondaryindexsnapshot_exact_page( @@ -5146,7 +5200,7 @@ open func exactPage(term: Data, cursor: Data?, limit: UInt64)throws -> IndexPag ) }) } - + open func exactReversePage(term: Data, cursor: Data?, limit: UInt64)throws -> IndexPageRecord { return try FfiConverterTypeIndexPageRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingsecondaryindexsnapshot_exact_reverse_page( @@ -5157,7 +5211,7 @@ open func exactReversePage(term: Data, cursor: Data?, limit: UInt64)throws -> I ) }) } - + open func fastHandle() -> UInt64 { return try! FfiConverterUInt64.lift(try! rustCall() { uniffi_prolly_bindings_fn_method_bindingsecondaryindexsnapshot_fast_handle( @@ -5165,7 +5219,7 @@ open func fastHandle() -> UInt64 { ) }) } - + open func name() -> Data { return try! FfiConverterData.lift(try! rustCall() { uniffi_prolly_bindings_fn_method_bindingsecondaryindexsnapshot_name( @@ -5173,7 +5227,7 @@ open func name() -> Data { ) }) } - + open func prefix(prefix: Data)throws -> [IndexMatchRecord] { return try FfiConverterSequenceTypeIndexMatchRecord.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingsecondaryindexsnapshot_prefix( @@ -5182,7 +5236,7 @@ open func prefix(prefix: Data)throws -> [IndexMatchRecord] { ) }) } - + open func prefixPage(prefix: Data, cursor: Data?, limit: UInt64)throws -> IndexPageRecord { return try FfiConverterTypeIndexPageRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingsecondaryindexsnapshot_prefix_page( @@ -5193,7 +5247,7 @@ open func prefixPage(prefix: Data, cursor: Data?, limit: UInt64)throws -> Index ) }) } - + open func prefixReversePage(prefix: Data, cursor: Data?, limit: UInt64)throws -> IndexPageRecord { return try FfiConverterTypeIndexPageRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingsecondaryindexsnapshot_prefix_reverse_page( @@ -5204,7 +5258,7 @@ open func prefixReversePage(prefix: Data, cursor: Data?, limit: UInt64)throws - ) }) } - + open func range(start: Data, rangeEnd: Data?)throws -> [IndexMatchRecord] { return try FfiConverterSequenceTypeIndexMatchRecord.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingsecondaryindexsnapshot_range( @@ -5214,7 +5268,7 @@ open func range(start: Data, rangeEnd: Data?)throws -> [IndexMatchRecord] { ) }) } - + open func rangePage(start: Data, rangeEnd: Data?, cursor: Data?, limit: UInt64)throws -> IndexPageRecord { return try FfiConverterTypeIndexPageRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingsecondaryindexsnapshot_range_page( @@ -5226,7 +5280,7 @@ open func rangePage(start: Data, rangeEnd: Data?, cursor: Data?, limit: UInt64)t ) }) } - + open func rangeReversePage(start: Data, rangeEnd: Data?, cursor: Data?, limit: UInt64)throws -> IndexPageRecord { return try FfiConverterTypeIndexPageRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingsecondaryindexsnapshot_range_reverse_page( @@ -5238,7 +5292,7 @@ open func rangeReversePage(start: Data, rangeEnd: Data?, cursor: Data?, limit: U ) }) } - + open func records(term: Data)throws -> [IndexedSourceRecord] { return try FfiConverterSequenceTypeIndexedSourceRecord.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingsecondaryindexsnapshot_records( @@ -5247,9 +5301,9 @@ open func records(term: Data)throws -> [IndexedSourceRecord] { ) }) } - - + + } @@ -5298,162 +5352,28 @@ public func FfiConverterTypeBindingSecondaryIndexSnapshot_lower(_ value: Binding -/** - * Application-facing managed map with version history and optimistic updates. - */ -public protocol BindingVersionedMapProtocol: AnyObject, Sendable { - - func append(mutations: [MutationRecord]) throws -> MapVersionRecord - - func apply(mutations: [MutationRecord]) throws -> MapVersionRecord - - func applyAtMillis(mutations: [MutationRecord], timestampMillis: UInt64) throws -> MapVersionRecord - - func applyIf(expected: Data?, mutations: [MutationRecord]) throws -> MapUpdateRecord - - func applyIfAtMillis(expected: Data?, mutations: [MutationRecord], timestampMillis: UInt64) throws -> MapUpdateRecord - - func backup() throws -> Data - - func changesSince(base: Data) throws -> [DiffRecord] - - func compare(base: Data, target: Data) throws -> BindingMapComparison - - func compareToHead(base: Data) throws -> BindingMapComparison - - func containsKey(key: Data) throws -> Bool - - func delete(key: Data) throws -> MapVersionRecord - - func deleteIf(expected: Data?, key: Data) throws -> MapUpdateRecord - - func diff(base: Data, target: Data) throws -> [DiffRecord] - - func edit(mutations: [MutationRecord]) throws -> MapVersionRecord - - func editIf(expected: Data?, mutations: [MutationRecord]) throws -> MapUpdateRecord - - func get(key: Data) throws -> Data? - - func getAt(id: Data, key: Data) throws -> Data? - - func getLargeValue(blobStore: ProllyBlobStore, key: Data) throws -> Data? - - func getMany(keys: [Data]) throws -> [Data?] - - func getManyAt(id: Data, keys: [Data]) throws -> [Data?] - - func getValueRef(key: Data) throws -> ValueRefRecord? - - func getValueRefAt(id: Data, key: Data) throws -> ValueRefRecord? - - func head() throws -> MapVersionRecord? - - func headId() throws -> Data? - - func headName() -> Data - - func id() -> Data - - func importAsHead(bundle: SnapshotBundleRecord) throws -> MapVersionRecord - - func importAsHeadAtMillis(bundle: SnapshotBundleRecord, timestampMillis: UInt64) throws -> MapVersionRecord - - func initialize() throws -> MapVersionRecord - - func initializeSorted(entries: [EntryRecord]) throws -> MapUpdateRecord - - func isInitialized() throws -> Bool - - func keepFor(maxAgeMillis: UInt64) throws -> VersionPruneRecord - - func keepForAt(nowMillis: UInt64, maxAgeMillis: UInt64) throws -> VersionPruneRecord - - func keepLast(count: UInt64) throws -> VersionPruneRecord - - func keepVersions(ids: [Data]) throws -> VersionPruneRecord - - func parallelApply(mutations: [MutationRecord], config: ParallelConfigRecord) throws -> VersionedMapBatchResultRecord - - func planBlobGc(blobStore: ProllyBlobStore) throws -> BlobGcPlanRecord - - func planGc() throws -> GcPlanRecord - - func prefix(prefix: Data) throws -> [EntryRecord] - - func prefixAt(id: Data, prefix: Data) throws -> [EntryRecord] - - func prefixPage(prefix: Data, cursor: RangeCursorRecord?, limit: UInt64) throws -> RangePageRecord - - func prefixPageAt(id: Data, prefix: Data, cursor: RangeCursorRecord?, limit: UInt64) throws -> RangePageRecord - - func prepareMerge(base: Data, candidate: Data) throws -> BindingMapMerge - - func pruneVersions(keepLatest: UInt64) throws -> VersionPruneRecord - - func put(key: Data, value: Data) throws -> MapVersionRecord - - func putIf(expected: Data?, key: Data, value: Data) throws -> MapUpdateRecord - - func putLargeValue(blobStore: ProllyBlobStore, key: Data, value: Data, config: LargeValueConfigRecord) throws -> MapVersionRecord - - func putLargeValueIf(blobStore: ProllyBlobStore, expected: Data?, key: Data, value: Data, config: LargeValueConfigRecord) throws -> MapUpdateRecord - - func range(start: Data, rangeEnd: Data?) throws -> [EntryRecord] - - func rangeAt(id: Data, start: Data, rangeEnd: Data?) throws -> [EntryRecord] - - func rangePage(cursor: RangeCursorRecord?, rangeEnd: Data?, limit: UInt64) throws -> RangePageRecord - - func rangePageAt(id: Data, cursor: RangeCursorRecord?, rangeEnd: Data?, limit: UInt64) throws -> RangePageRecord - - func readSession() throws -> ProllyReadSession? - - func rebuildFromEntriesIf(expected: Data?, entries: [EntryRecord]) throws -> MapUpdateRecord - - func rebuildFromIterIf(expected: Data?, entries: [EntryRecord]) throws -> MapUpdateRecord - - func rebuildSortedIf(expected: Data?, entries: [EntryRecord]) throws -> MapUpdateRecord - - func restoreBackup(bytes: Data) throws -> MapVersionRecord - - func retentionPolicy() -> NamedRootRetentionRecord - - func rollbackTo(id: Data) throws -> MapVersionRecord - - func scanPrefix(prefix: Data, visitor: EntryVisitorCallback) throws -> ScanOutcomeRecord - - func scanPrefixAt(id: Data, prefix: Data, visitor: EntryVisitorCallback) throws -> ScanOutcomeRecord - - func scanRange(start: Data, rangeEnd: Data?, visitor: EntryVisitorCallback) throws -> ScanOutcomeRecord - - func scanRangeAt(id: Data, start: Data, rangeEnd: Data?, visitor: EntryVisitorCallback) throws -> ScanOutcomeRecord - - func snapshot() throws -> BindingMapSnapshot? - - func snapshotAt(id: Data) throws -> BindingMapSnapshot? - - func subscribe() throws -> BindingMapSubscription - - func subscribeFrom(lastSeen: Data?) throws -> BindingMapSubscription - - func sweepBlobGc(blobStore: ProllyBlobStore) throws -> BlobGcSweepRecord - - func sweepGc() throws -> GcSweepRecord - - func verifyCatalog() throws -> MapCatalogVerificationRecord - - func version(id: Data) throws -> MapVersionRecord? - - func versions() throws -> [MapVersionRecord] - - func versionsPrefix() -> Data - +public protocol BindingTurboQuantizerProtocol: AnyObject, Sendable { + + func config() -> TurboQuantizationConfigRecord + + func manifest() -> Data + + func proveSearch(map: BindingProximityMap, request: ProximitySearchRequestRecord, limits: ContentGraphLimitsRecord) throws -> BindingProximitySearchProof + + func quality() -> TurboQuantizationQualityRecord + + func search(map: BindingProximityMap, request: ProximitySearchRequestRecord) throws -> ProximitySearchResultRecord + + func searchCancellable(map: BindingProximityMap, request: ProximitySearchRequestRecord, runtime: BindingProximitySearchRuntime?, cancellation: BindingProximityCancellationToken) throws -> ProximitySearchResultRecord + + func searchWithRuntime(map: BindingProximityMap, request: ProximitySearchRequestRecord, runtime: BindingProximitySearchRuntime) throws -> ProximitySearchResultRecord + + func sourceDescriptor() -> Data + + func verify(map: BindingProximityMap) throws -> TurboQuantizationVerificationRecord + } -/** - * Application-facing managed map with version history and optimistic updates. - */ -open class BindingVersionedMap: BindingVersionedMapProtocol, @unchecked Sendable { +open class BindingTurboQuantizer: BindingTurboQuantizerProtocol, @unchecked Sendable { fileprivate let handle: UInt64 /// Used to instantiate a [FFIObject] without an actual handle, for fakes in tests, mostly. @@ -5490,18 +5410,9 @@ open class BindingVersionedMap: BindingVersionedMapProtocol, @unchecked Sendable @_documentation(visibility: private) #endif public func uniffiCloneHandle() -> UInt64 { - return try! rustCall { uniffi_prolly_bindings_fn_clone_bindingversionedmap(self.handle, $0) } + return try! rustCall { uniffi_prolly_bindings_fn_clone_bindingturboquantizer(self.handle, $0) } } -public convenience init(engine: ProllyEngine, id: Data)throws { - let handle = - try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { - uniffi_prolly_bindings_fn_constructor_bindingversionedmap_new( - FfiConverterTypeProllyEngine_lower(engine), - FfiConverterData.lower(id),$0 - ) -} - self.init(unsafeFromHandle: handle) -} + // No primary constructor declared for this class. deinit { if handle == 0 { @@ -5509,144 +5420,496 @@ public convenience init(engine: ProllyEngine, id: Data)throws { return } - try! rustCall { uniffi_prolly_bindings_fn_free_bindingversionedmap(handle, $0) } + try! rustCall { uniffi_prolly_bindings_fn_free_bindingturboquantizer(handle, $0) } } - - -open func append(mutations: [MutationRecord])throws -> MapVersionRecord { - return try FfiConverterTypeMapVersionRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { - uniffi_prolly_bindings_fn_method_bindingversionedmap_append( - self.uniffiCloneHandle(), - FfiConverterSequenceTypeMutationRecord.lower(mutations),$0 - ) -}) -} - -open func apply(mutations: [MutationRecord])throws -> MapVersionRecord { - return try FfiConverterTypeMapVersionRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { - uniffi_prolly_bindings_fn_method_bindingversionedmap_apply( - self.uniffiCloneHandle(), - FfiConverterSequenceTypeMutationRecord.lower(mutations),$0 - ) -}) -} - -open func applyAtMillis(mutations: [MutationRecord], timestampMillis: UInt64)throws -> MapVersionRecord { - return try FfiConverterTypeMapVersionRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { - uniffi_prolly_bindings_fn_method_bindingversionedmap_apply_at_millis( - self.uniffiCloneHandle(), - FfiConverterSequenceTypeMutationRecord.lower(mutations), - FfiConverterUInt64.lower(timestampMillis),$0 - ) -}) -} - -open func applyIf(expected: Data?, mutations: [MutationRecord])throws -> MapUpdateRecord { - return try FfiConverterTypeMapUpdateRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { - uniffi_prolly_bindings_fn_method_bindingversionedmap_apply_if( - self.uniffiCloneHandle(), - FfiConverterOptionData.lower(expected), - FfiConverterSequenceTypeMutationRecord.lower(mutations),$0 - ) -}) -} - -open func applyIfAtMillis(expected: Data?, mutations: [MutationRecord], timestampMillis: UInt64)throws -> MapUpdateRecord { - return try FfiConverterTypeMapUpdateRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { - uniffi_prolly_bindings_fn_method_bindingversionedmap_apply_if_at_millis( - self.uniffiCloneHandle(), - FfiConverterOptionData.lower(expected), - FfiConverterSequenceTypeMutationRecord.lower(mutations), - FfiConverterUInt64.lower(timestampMillis),$0 + + +open func config() -> TurboQuantizationConfigRecord { + return try! FfiConverterTypeTurboQuantizationConfigRecord_lift(try! rustCall() { + uniffi_prolly_bindings_fn_method_bindingturboquantizer_config( + self.uniffiCloneHandle(),$0 ) }) } - -open func backup()throws -> Data { - return try FfiConverterData.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { - uniffi_prolly_bindings_fn_method_bindingversionedmap_backup( + +open func manifest() -> Data { + return try! FfiConverterData.lift(try! rustCall() { + uniffi_prolly_bindings_fn_method_bindingturboquantizer_manifest( self.uniffiCloneHandle(),$0 ) }) } - -open func changesSince(base: Data)throws -> [DiffRecord] { - return try FfiConverterSequenceTypeDiffRecord.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { - uniffi_prolly_bindings_fn_method_bindingversionedmap_changes_since( + +open func proveSearch(map: BindingProximityMap, request: ProximitySearchRequestRecord, limits: ContentGraphLimitsRecord)throws -> BindingProximitySearchProof { + return try FfiConverterTypeBindingProximitySearchProof_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { + uniffi_prolly_bindings_fn_method_bindingturboquantizer_prove_search( self.uniffiCloneHandle(), - FfiConverterData.lower(base),$0 + FfiConverterTypeBindingProximityMap_lower(map), + FfiConverterTypeProximitySearchRequestRecord_lower(request), + FfiConverterTypeContentGraphLimitsRecord_lower(limits),$0 ) }) } - -open func compare(base: Data, target: Data)throws -> BindingMapComparison { - return try FfiConverterTypeBindingMapComparison_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { - uniffi_prolly_bindings_fn_method_bindingversionedmap_compare( - self.uniffiCloneHandle(), - FfiConverterData.lower(base), - FfiConverterData.lower(target),$0 + +open func quality() -> TurboQuantizationQualityRecord { + return try! FfiConverterTypeTurboQuantizationQualityRecord_lift(try! rustCall() { + uniffi_prolly_bindings_fn_method_bindingturboquantizer_quality( + self.uniffiCloneHandle(),$0 ) }) } - -open func compareToHead(base: Data)throws -> BindingMapComparison { - return try FfiConverterTypeBindingMapComparison_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { - uniffi_prolly_bindings_fn_method_bindingversionedmap_compare_to_head( + +open func search(map: BindingProximityMap, request: ProximitySearchRequestRecord)throws -> ProximitySearchResultRecord { + return try FfiConverterTypeProximitySearchResultRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { + uniffi_prolly_bindings_fn_method_bindingturboquantizer_search( self.uniffiCloneHandle(), - FfiConverterData.lower(base),$0 + FfiConverterTypeBindingProximityMap_lower(map), + FfiConverterTypeProximitySearchRequestRecord_lower(request),$0 ) }) } - -open func containsKey(key: Data)throws -> Bool { - return try FfiConverterBool.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { - uniffi_prolly_bindings_fn_method_bindingversionedmap_contains_key( + +open func searchCancellable(map: BindingProximityMap, request: ProximitySearchRequestRecord, runtime: BindingProximitySearchRuntime?, cancellation: BindingProximityCancellationToken)throws -> ProximitySearchResultRecord { + return try FfiConverterTypeProximitySearchResultRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { + uniffi_prolly_bindings_fn_method_bindingturboquantizer_search_cancellable( self.uniffiCloneHandle(), - FfiConverterData.lower(key),$0 + FfiConverterTypeBindingProximityMap_lower(map), + FfiConverterTypeProximitySearchRequestRecord_lower(request), + FfiConverterOptionTypeBindingProximitySearchRuntime.lower(runtime), + FfiConverterTypeBindingProximityCancellationToken_lower(cancellation),$0 ) }) } - -open func delete(key: Data)throws -> MapVersionRecord { - return try FfiConverterTypeMapVersionRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { - uniffi_prolly_bindings_fn_method_bindingversionedmap_delete( + +open func searchWithRuntime(map: BindingProximityMap, request: ProximitySearchRequestRecord, runtime: BindingProximitySearchRuntime)throws -> ProximitySearchResultRecord { + return try FfiConverterTypeProximitySearchResultRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { + uniffi_prolly_bindings_fn_method_bindingturboquantizer_search_with_runtime( self.uniffiCloneHandle(), - FfiConverterData.lower(key),$0 + FfiConverterTypeBindingProximityMap_lower(map), + FfiConverterTypeProximitySearchRequestRecord_lower(request), + FfiConverterTypeBindingProximitySearchRuntime_lower(runtime),$0 ) }) } - -open func deleteIf(expected: Data?, key: Data)throws -> MapUpdateRecord { - return try FfiConverterTypeMapUpdateRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { - uniffi_prolly_bindings_fn_method_bindingversionedmap_delete_if( - self.uniffiCloneHandle(), - FfiConverterOptionData.lower(expected), - FfiConverterData.lower(key),$0 + +open func sourceDescriptor() -> Data { + return try! FfiConverterData.lift(try! rustCall() { + uniffi_prolly_bindings_fn_method_bindingturboquantizer_source_descriptor( + self.uniffiCloneHandle(),$0 ) }) } - -open func diff(base: Data, target: Data)throws -> [DiffRecord] { - return try FfiConverterSequenceTypeDiffRecord.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { - uniffi_prolly_bindings_fn_method_bindingversionedmap_diff( + +open func verify(map: BindingProximityMap)throws -> TurboQuantizationVerificationRecord { + return try FfiConverterTypeTurboQuantizationVerificationRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { + uniffi_prolly_bindings_fn_method_bindingturboquantizer_verify( self.uniffiCloneHandle(), - FfiConverterData.lower(base), - FfiConverterData.lower(target),$0 + FfiConverterTypeBindingProximityMap_lower(map),$0 ) }) } - -open func edit(mutations: [MutationRecord])throws -> MapVersionRecord { - return try FfiConverterTypeMapVersionRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { - uniffi_prolly_bindings_fn_method_bindingversionedmap_edit( - self.uniffiCloneHandle(), - FfiConverterSequenceTypeMutationRecord.lower(mutations),$0 - ) -}) + + + } - + + +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +public struct FfiConverterTypeBindingTurboQuantizer: FfiConverter { + typealias FfiType = UInt64 + typealias SwiftType = BindingTurboQuantizer + + public static func lift(_ handle: UInt64) throws -> BindingTurboQuantizer { + return BindingTurboQuantizer(unsafeFromHandle: handle) + } + + public static func lower(_ value: BindingTurboQuantizer) -> UInt64 { + return value.uniffiCloneHandle() + } + + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> BindingTurboQuantizer { + let handle: UInt64 = try readInt(&buf) + return try lift(handle) + } + + public static func write(_ value: BindingTurboQuantizer, into buf: inout [UInt8]) { + writeInt(&buf, lower(value)) + } +} + + +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +public func FfiConverterTypeBindingTurboQuantizer_lift(_ handle: UInt64) throws -> BindingTurboQuantizer { + return try FfiConverterTypeBindingTurboQuantizer.lift(handle) +} + +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +public func FfiConverterTypeBindingTurboQuantizer_lower(_ value: BindingTurboQuantizer) -> UInt64 { + return FfiConverterTypeBindingTurboQuantizer.lower(value) +} + + + + + + +/** + * Application-facing managed map with version history and optimistic updates. + */ +public protocol BindingVersionedMapProtocol: AnyObject, Sendable { + + func append(mutations: [MutationRecord]) throws -> MapVersionRecord + + func apply(mutations: [MutationRecord]) throws -> MapVersionRecord + + func applyAtMillis(mutations: [MutationRecord], timestampMillis: UInt64) throws -> MapVersionRecord + + func applyIf(expected: Data?, mutations: [MutationRecord]) throws -> MapUpdateRecord + + func applyIfAtMillis(expected: Data?, mutations: [MutationRecord], timestampMillis: UInt64) throws -> MapUpdateRecord + + func backup() throws -> Data + + func changesSince(base: Data) throws -> [DiffRecord] + + func compare(base: Data, target: Data) throws -> BindingMapComparison + + func compareToHead(base: Data) throws -> BindingMapComparison + + func containsKey(key: Data) throws -> Bool + + func delete(key: Data) throws -> MapVersionRecord + + func deleteIf(expected: Data?, key: Data) throws -> MapUpdateRecord + + func diff(base: Data, target: Data) throws -> [DiffRecord] + + func edit(mutations: [MutationRecord]) throws -> MapVersionRecord + + func editIf(expected: Data?, mutations: [MutationRecord]) throws -> MapUpdateRecord + + func get(key: Data) throws -> Data? + + func getAt(id: Data, key: Data) throws -> Data? + + func getLargeValue(blobStore: ProllyBlobStore, key: Data) throws -> Data? + + func getMany(keys: [Data]) throws -> [Data?] + + func getManyAt(id: Data, keys: [Data]) throws -> [Data?] + + func getValueRef(key: Data) throws -> ValueRefRecord? + + func getValueRefAt(id: Data, key: Data) throws -> ValueRefRecord? + + func head() throws -> MapVersionRecord? + + func headId() throws -> Data? + + func headName() -> Data + + func id() -> Data + + func importAsHead(bundle: SnapshotBundleRecord) throws -> MapVersionRecord + + func importAsHeadAtMillis(bundle: SnapshotBundleRecord, timestampMillis: UInt64) throws -> MapVersionRecord + + func initialize() throws -> MapVersionRecord + + func initializeSorted(entries: [EntryRecord]) throws -> MapUpdateRecord + + func isInitialized() throws -> Bool + + func keepFor(maxAgeMillis: UInt64) throws -> VersionPruneRecord + + func keepForAt(nowMillis: UInt64, maxAgeMillis: UInt64) throws -> VersionPruneRecord + + func keepLast(count: UInt64) throws -> VersionPruneRecord + + func keepVersions(ids: [Data]) throws -> VersionPruneRecord + + func parallelApply(mutations: [MutationRecord], config: ParallelConfigRecord) throws -> VersionedMapBatchResultRecord + + func planBlobGc(blobStore: ProllyBlobStore) throws -> BlobGcPlanRecord + + func planGc() throws -> GcPlanRecord + + func prefix(prefix: Data) throws -> [EntryRecord] + + func prefixAt(id: Data, prefix: Data) throws -> [EntryRecord] + + func prefixPage(prefix: Data, cursor: RangeCursorRecord?, limit: UInt64) throws -> RangePageRecord + + func prefixPageAt(id: Data, prefix: Data, cursor: RangeCursorRecord?, limit: UInt64) throws -> RangePageRecord + + func prepareMerge(base: Data, candidate: Data) throws -> BindingMapMerge + + func pruneVersions(keepLatest: UInt64) throws -> VersionPruneRecord + + func put(key: Data, value: Data) throws -> MapVersionRecord + + func putIf(expected: Data?, key: Data, value: Data) throws -> MapUpdateRecord + + func putLargeValue(blobStore: ProllyBlobStore, key: Data, value: Data, config: LargeValueConfigRecord) throws -> MapVersionRecord + + func putLargeValueIf(blobStore: ProllyBlobStore, expected: Data?, key: Data, value: Data, config: LargeValueConfigRecord) throws -> MapUpdateRecord + + func range(start: Data, rangeEnd: Data?) throws -> [EntryRecord] + + func rangeAt(id: Data, start: Data, rangeEnd: Data?) throws -> [EntryRecord] + + func rangePage(cursor: RangeCursorRecord?, rangeEnd: Data?, limit: UInt64) throws -> RangePageRecord + + func rangePageAt(id: Data, cursor: RangeCursorRecord?, rangeEnd: Data?, limit: UInt64) throws -> RangePageRecord + + func readSession() throws -> ProllyReadSession? + + func rebuildFromEntriesIf(expected: Data?, entries: [EntryRecord]) throws -> MapUpdateRecord + + func rebuildFromIterIf(expected: Data?, entries: [EntryRecord]) throws -> MapUpdateRecord + + func rebuildSortedIf(expected: Data?, entries: [EntryRecord]) throws -> MapUpdateRecord + + func restoreBackup(bytes: Data) throws -> MapVersionRecord + + func retentionPolicy() -> NamedRootRetentionRecord + + func rollbackTo(id: Data) throws -> MapVersionRecord + + func scanPrefix(prefix: Data, visitor: EntryVisitorCallback) throws -> ScanOutcomeRecord + + func scanPrefixAt(id: Data, prefix: Data, visitor: EntryVisitorCallback) throws -> ScanOutcomeRecord + + func scanRange(start: Data, rangeEnd: Data?, visitor: EntryVisitorCallback) throws -> ScanOutcomeRecord + + func scanRangeAt(id: Data, start: Data, rangeEnd: Data?, visitor: EntryVisitorCallback) throws -> ScanOutcomeRecord + + func snapshot() throws -> BindingMapSnapshot? + + func snapshotAt(id: Data) throws -> BindingMapSnapshot? + + func subscribe() throws -> BindingMapSubscription + + func subscribeFrom(lastSeen: Data?) throws -> BindingMapSubscription + + func sweepBlobGc(blobStore: ProllyBlobStore) throws -> BlobGcSweepRecord + + func sweepGc() throws -> GcSweepRecord + + func verifyCatalog() throws -> MapCatalogVerificationRecord + + func version(id: Data) throws -> MapVersionRecord? + + func versions() throws -> [MapVersionRecord] + + func versionsPrefix() -> Data + +} +/** + * Application-facing managed map with version history and optimistic updates. + */ +open class BindingVersionedMap: BindingVersionedMapProtocol, @unchecked Sendable { + fileprivate let handle: UInt64 + + /// Used to instantiate a [FFIObject] without an actual handle, for fakes in tests, mostly. +#if swift(>=5.8) + @_documentation(visibility: private) +#endif + public struct NoHandle { + public init() {} + } + + // TODO: We'd like this to be `private` but for Swifty reasons, + // we can't implement `FfiConverter` without making this `required` and we can't + // make it `required` without making it `public`. +#if swift(>=5.8) + @_documentation(visibility: private) +#endif + required public init(unsafeFromHandle handle: UInt64) { + self.handle = handle + } + + // This constructor can be used to instantiate a fake object. + // - Parameter noHandle: Placeholder value so we can have a constructor separate from the default empty one that may be implemented for classes extending [FFIObject]. + // + // - Warning: + // Any object instantiated with this constructor cannot be passed to an actual Rust-backed object. Since there isn't a backing handle the FFI lower functions will crash. +#if swift(>=5.8) + @_documentation(visibility: private) +#endif + public init(noHandle: NoHandle) { + self.handle = 0 + } + +#if swift(>=5.8) + @_documentation(visibility: private) +#endif + public func uniffiCloneHandle() -> UInt64 { + return try! rustCall { uniffi_prolly_bindings_fn_clone_bindingversionedmap(self.handle, $0) } + } +public convenience init(engine: ProllyEngine, id: Data)throws { + let handle = + try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { + uniffi_prolly_bindings_fn_constructor_bindingversionedmap_new( + FfiConverterTypeProllyEngine_lower(engine), + FfiConverterData.lower(id),$0 + ) +} + self.init(unsafeFromHandle: handle) +} + + deinit { + if handle == 0 { + // Mock objects have handle=0 don't try to free them + return + } + + try! rustCall { uniffi_prolly_bindings_fn_free_bindingversionedmap(handle, $0) } + } + + + + +open func append(mutations: [MutationRecord])throws -> MapVersionRecord { + return try FfiConverterTypeMapVersionRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { + uniffi_prolly_bindings_fn_method_bindingversionedmap_append( + self.uniffiCloneHandle(), + FfiConverterSequenceTypeMutationRecord.lower(mutations),$0 + ) +}) +} + +open func apply(mutations: [MutationRecord])throws -> MapVersionRecord { + return try FfiConverterTypeMapVersionRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { + uniffi_prolly_bindings_fn_method_bindingversionedmap_apply( + self.uniffiCloneHandle(), + FfiConverterSequenceTypeMutationRecord.lower(mutations),$0 + ) +}) +} + +open func applyAtMillis(mutations: [MutationRecord], timestampMillis: UInt64)throws -> MapVersionRecord { + return try FfiConverterTypeMapVersionRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { + uniffi_prolly_bindings_fn_method_bindingversionedmap_apply_at_millis( + self.uniffiCloneHandle(), + FfiConverterSequenceTypeMutationRecord.lower(mutations), + FfiConverterUInt64.lower(timestampMillis),$0 + ) +}) +} + +open func applyIf(expected: Data?, mutations: [MutationRecord])throws -> MapUpdateRecord { + return try FfiConverterTypeMapUpdateRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { + uniffi_prolly_bindings_fn_method_bindingversionedmap_apply_if( + self.uniffiCloneHandle(), + FfiConverterOptionData.lower(expected), + FfiConverterSequenceTypeMutationRecord.lower(mutations),$0 + ) +}) +} + +open func applyIfAtMillis(expected: Data?, mutations: [MutationRecord], timestampMillis: UInt64)throws -> MapUpdateRecord { + return try FfiConverterTypeMapUpdateRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { + uniffi_prolly_bindings_fn_method_bindingversionedmap_apply_if_at_millis( + self.uniffiCloneHandle(), + FfiConverterOptionData.lower(expected), + FfiConverterSequenceTypeMutationRecord.lower(mutations), + FfiConverterUInt64.lower(timestampMillis),$0 + ) +}) +} + +open func backup()throws -> Data { + return try FfiConverterData.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { + uniffi_prolly_bindings_fn_method_bindingversionedmap_backup( + self.uniffiCloneHandle(),$0 + ) +}) +} + +open func changesSince(base: Data)throws -> [DiffRecord] { + return try FfiConverterSequenceTypeDiffRecord.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { + uniffi_prolly_bindings_fn_method_bindingversionedmap_changes_since( + self.uniffiCloneHandle(), + FfiConverterData.lower(base),$0 + ) +}) +} + +open func compare(base: Data, target: Data)throws -> BindingMapComparison { + return try FfiConverterTypeBindingMapComparison_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { + uniffi_prolly_bindings_fn_method_bindingversionedmap_compare( + self.uniffiCloneHandle(), + FfiConverterData.lower(base), + FfiConverterData.lower(target),$0 + ) +}) +} + +open func compareToHead(base: Data)throws -> BindingMapComparison { + return try FfiConverterTypeBindingMapComparison_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { + uniffi_prolly_bindings_fn_method_bindingversionedmap_compare_to_head( + self.uniffiCloneHandle(), + FfiConverterData.lower(base),$0 + ) +}) +} + +open func containsKey(key: Data)throws -> Bool { + return try FfiConverterBool.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { + uniffi_prolly_bindings_fn_method_bindingversionedmap_contains_key( + self.uniffiCloneHandle(), + FfiConverterData.lower(key),$0 + ) +}) +} + +open func delete(key: Data)throws -> MapVersionRecord { + return try FfiConverterTypeMapVersionRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { + uniffi_prolly_bindings_fn_method_bindingversionedmap_delete( + self.uniffiCloneHandle(), + FfiConverterData.lower(key),$0 + ) +}) +} + +open func deleteIf(expected: Data?, key: Data)throws -> MapUpdateRecord { + return try FfiConverterTypeMapUpdateRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { + uniffi_prolly_bindings_fn_method_bindingversionedmap_delete_if( + self.uniffiCloneHandle(), + FfiConverterOptionData.lower(expected), + FfiConverterData.lower(key),$0 + ) +}) +} + +open func diff(base: Data, target: Data)throws -> [DiffRecord] { + return try FfiConverterSequenceTypeDiffRecord.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { + uniffi_prolly_bindings_fn_method_bindingversionedmap_diff( + self.uniffiCloneHandle(), + FfiConverterData.lower(base), + FfiConverterData.lower(target),$0 + ) +}) +} + +open func edit(mutations: [MutationRecord])throws -> MapVersionRecord { + return try FfiConverterTypeMapVersionRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { + uniffi_prolly_bindings_fn_method_bindingversionedmap_edit( + self.uniffiCloneHandle(), + FfiConverterSequenceTypeMutationRecord.lower(mutations),$0 + ) +}) +} + open func editIf(expected: Data?, mutations: [MutationRecord])throws -> MapUpdateRecord { return try FfiConverterTypeMapUpdateRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingversionedmap_edit_if( @@ -5656,7 +5919,7 @@ open func editIf(expected: Data?, mutations: [MutationRecord])throws -> MapUpda ) }) } - + open func get(key: Data)throws -> Data? { return try FfiConverterOptionData.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingversionedmap_get( @@ -5665,7 +5928,7 @@ open func get(key: Data)throws -> Data? { ) }) } - + open func getAt(id: Data, key: Data)throws -> Data? { return try FfiConverterOptionData.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingversionedmap_get_at( @@ -5675,7 +5938,7 @@ open func getAt(id: Data, key: Data)throws -> Data? { ) }) } - + open func getLargeValue(blobStore: ProllyBlobStore, key: Data)throws -> Data? { return try FfiConverterOptionData.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingversionedmap_get_large_value( @@ -5685,7 +5948,7 @@ open func getLargeValue(blobStore: ProllyBlobStore, key: Data)throws -> Data? ) }) } - + open func getMany(keys: [Data])throws -> [Data?] { return try FfiConverterSequenceOptionData.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingversionedmap_get_many( @@ -5694,7 +5957,7 @@ open func getMany(keys: [Data])throws -> [Data?] { ) }) } - + open func getManyAt(id: Data, keys: [Data])throws -> [Data?] { return try FfiConverterSequenceOptionData.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingversionedmap_get_many_at( @@ -5704,7 +5967,7 @@ open func getManyAt(id: Data, keys: [Data])throws -> [Data?] { ) }) } - + open func getValueRef(key: Data)throws -> ValueRefRecord? { return try FfiConverterOptionTypeValueRefRecord.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingversionedmap_get_value_ref( @@ -5713,7 +5976,7 @@ open func getValueRef(key: Data)throws -> ValueRefRecord? { ) }) } - + open func getValueRefAt(id: Data, key: Data)throws -> ValueRefRecord? { return try FfiConverterOptionTypeValueRefRecord.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingversionedmap_get_value_ref_at( @@ -5723,7 +5986,7 @@ open func getValueRefAt(id: Data, key: Data)throws -> ValueRefRecord? { ) }) } - + open func head()throws -> MapVersionRecord? { return try FfiConverterOptionTypeMapVersionRecord.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingversionedmap_head( @@ -5731,7 +5994,7 @@ open func head()throws -> MapVersionRecord? { ) }) } - + open func headId()throws -> Data? { return try FfiConverterOptionData.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingversionedmap_head_id( @@ -5739,7 +6002,7 @@ open func headId()throws -> Data? { ) }) } - + open func headName() -> Data { return try! FfiConverterData.lift(try! rustCall() { uniffi_prolly_bindings_fn_method_bindingversionedmap_head_name( @@ -5747,7 +6010,7 @@ open func headName() -> Data { ) }) } - + open func id() -> Data { return try! FfiConverterData.lift(try! rustCall() { uniffi_prolly_bindings_fn_method_bindingversionedmap_id( @@ -5755,7 +6018,7 @@ open func id() -> Data { ) }) } - + open func importAsHead(bundle: SnapshotBundleRecord)throws -> MapVersionRecord { return try FfiConverterTypeMapVersionRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingversionedmap_import_as_head( @@ -5764,7 +6027,7 @@ open func importAsHead(bundle: SnapshotBundleRecord)throws -> MapVersionRecord ) }) } - + open func importAsHeadAtMillis(bundle: SnapshotBundleRecord, timestampMillis: UInt64)throws -> MapVersionRecord { return try FfiConverterTypeMapVersionRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingversionedmap_import_as_head_at_millis( @@ -5774,7 +6037,7 @@ open func importAsHeadAtMillis(bundle: SnapshotBundleRecord, timestampMillis: UI ) }) } - + open func initialize()throws -> MapVersionRecord { return try FfiConverterTypeMapVersionRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingversionedmap_initialize( @@ -5782,7 +6045,7 @@ open func initialize()throws -> MapVersionRecord { ) }) } - + open func initializeSorted(entries: [EntryRecord])throws -> MapUpdateRecord { return try FfiConverterTypeMapUpdateRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingversionedmap_initialize_sorted( @@ -5791,7 +6054,7 @@ open func initializeSorted(entries: [EntryRecord])throws -> MapUpdateRecord { ) }) } - + open func isInitialized()throws -> Bool { return try FfiConverterBool.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingversionedmap_is_initialized( @@ -5799,7 +6062,7 @@ open func isInitialized()throws -> Bool { ) }) } - + open func keepFor(maxAgeMillis: UInt64)throws -> VersionPruneRecord { return try FfiConverterTypeVersionPruneRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingversionedmap_keep_for( @@ -5808,7 +6071,7 @@ open func keepFor(maxAgeMillis: UInt64)throws -> VersionPruneRecord { ) }) } - + open func keepForAt(nowMillis: UInt64, maxAgeMillis: UInt64)throws -> VersionPruneRecord { return try FfiConverterTypeVersionPruneRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingversionedmap_keep_for_at( @@ -5818,7 +6081,7 @@ open func keepForAt(nowMillis: UInt64, maxAgeMillis: UInt64)throws -> VersionPr ) }) } - + open func keepLast(count: UInt64)throws -> VersionPruneRecord { return try FfiConverterTypeVersionPruneRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingversionedmap_keep_last( @@ -5827,7 +6090,7 @@ open func keepLast(count: UInt64)throws -> VersionPruneRecord { ) }) } - + open func keepVersions(ids: [Data])throws -> VersionPruneRecord { return try FfiConverterTypeVersionPruneRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingversionedmap_keep_versions( @@ -5836,7 +6099,7 @@ open func keepVersions(ids: [Data])throws -> VersionPruneRecord { ) }) } - + open func parallelApply(mutations: [MutationRecord], config: ParallelConfigRecord)throws -> VersionedMapBatchResultRecord { return try FfiConverterTypeVersionedMapBatchResultRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingversionedmap_parallel_apply( @@ -5846,7 +6109,7 @@ open func parallelApply(mutations: [MutationRecord], config: ParallelConfigRecor ) }) } - + open func planBlobGc(blobStore: ProllyBlobStore)throws -> BlobGcPlanRecord { return try FfiConverterTypeBlobGcPlanRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingversionedmap_plan_blob_gc( @@ -5855,7 +6118,7 @@ open func planBlobGc(blobStore: ProllyBlobStore)throws -> BlobGcPlanRecord { ) }) } - + open func planGc()throws -> GcPlanRecord { return try FfiConverterTypeGcPlanRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingversionedmap_plan_gc( @@ -5863,7 +6126,7 @@ open func planGc()throws -> GcPlanRecord { ) }) } - + open func prefix(prefix: Data)throws -> [EntryRecord] { return try FfiConverterSequenceTypeEntryRecord.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingversionedmap_prefix( @@ -5872,7 +6135,7 @@ open func prefix(prefix: Data)throws -> [EntryRecord] { ) }) } - + open func prefixAt(id: Data, prefix: Data)throws -> [EntryRecord] { return try FfiConverterSequenceTypeEntryRecord.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingversionedmap_prefix_at( @@ -5882,7 +6145,7 @@ open func prefixAt(id: Data, prefix: Data)throws -> [EntryRecord] { ) }) } - + open func prefixPage(prefix: Data, cursor: RangeCursorRecord?, limit: UInt64)throws -> RangePageRecord { return try FfiConverterTypeRangePageRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingversionedmap_prefix_page( @@ -5893,7 +6156,7 @@ open func prefixPage(prefix: Data, cursor: RangeCursorRecord?, limit: UInt64)thr ) }) } - + open func prefixPageAt(id: Data, prefix: Data, cursor: RangeCursorRecord?, limit: UInt64)throws -> RangePageRecord { return try FfiConverterTypeRangePageRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingversionedmap_prefix_page_at( @@ -5905,7 +6168,7 @@ open func prefixPageAt(id: Data, prefix: Data, cursor: RangeCursorRecord?, limit ) }) } - + open func prepareMerge(base: Data, candidate: Data)throws -> BindingMapMerge { return try FfiConverterTypeBindingMapMerge_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingversionedmap_prepare_merge( @@ -5915,7 +6178,7 @@ open func prepareMerge(base: Data, candidate: Data)throws -> BindingMapMerge { ) }) } - + open func pruneVersions(keepLatest: UInt64)throws -> VersionPruneRecord { return try FfiConverterTypeVersionPruneRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingversionedmap_prune_versions( @@ -5924,7 +6187,7 @@ open func pruneVersions(keepLatest: UInt64)throws -> VersionPruneRecord { ) }) } - + open func put(key: Data, value: Data)throws -> MapVersionRecord { return try FfiConverterTypeMapVersionRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingversionedmap_put( @@ -5934,7 +6197,7 @@ open func put(key: Data, value: Data)throws -> MapVersionRecord { ) }) } - + open func putIf(expected: Data?, key: Data, value: Data)throws -> MapUpdateRecord { return try FfiConverterTypeMapUpdateRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingversionedmap_put_if( @@ -5945,7 +6208,7 @@ open func putIf(expected: Data?, key: Data, value: Data)throws -> MapUpdateReco ) }) } - + open func putLargeValue(blobStore: ProllyBlobStore, key: Data, value: Data, config: LargeValueConfigRecord)throws -> MapVersionRecord { return try FfiConverterTypeMapVersionRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingversionedmap_put_large_value( @@ -5957,7 +6220,7 @@ open func putLargeValue(blobStore: ProllyBlobStore, key: Data, value: Data, conf ) }) } - + open func putLargeValueIf(blobStore: ProllyBlobStore, expected: Data?, key: Data, value: Data, config: LargeValueConfigRecord)throws -> MapUpdateRecord { return try FfiConverterTypeMapUpdateRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingversionedmap_put_large_value_if( @@ -5970,7 +6233,7 @@ open func putLargeValueIf(blobStore: ProllyBlobStore, expected: Data?, key: Data ) }) } - + open func range(start: Data, rangeEnd: Data?)throws -> [EntryRecord] { return try FfiConverterSequenceTypeEntryRecord.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingversionedmap_range( @@ -5980,7 +6243,7 @@ open func range(start: Data, rangeEnd: Data?)throws -> [EntryRecord] { ) }) } - + open func rangeAt(id: Data, start: Data, rangeEnd: Data?)throws -> [EntryRecord] { return try FfiConverterSequenceTypeEntryRecord.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingversionedmap_range_at( @@ -5991,7 +6254,7 @@ open func rangeAt(id: Data, start: Data, rangeEnd: Data?)throws -> [EntryRecord ) }) } - + open func rangePage(cursor: RangeCursorRecord?, rangeEnd: Data?, limit: UInt64)throws -> RangePageRecord { return try FfiConverterTypeRangePageRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingversionedmap_range_page( @@ -6002,7 +6265,7 @@ open func rangePage(cursor: RangeCursorRecord?, rangeEnd: Data?, limit: UInt64)t ) }) } - + open func rangePageAt(id: Data, cursor: RangeCursorRecord?, rangeEnd: Data?, limit: UInt64)throws -> RangePageRecord { return try FfiConverterTypeRangePageRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingversionedmap_range_page_at( @@ -6014,7 +6277,7 @@ open func rangePageAt(id: Data, cursor: RangeCursorRecord?, rangeEnd: Data?, lim ) }) } - + open func readSession()throws -> ProllyReadSession? { return try FfiConverterOptionTypeProllyReadSession.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingversionedmap_read_session( @@ -6022,7 +6285,7 @@ open func readSession()throws -> ProllyReadSession? { ) }) } - + open func rebuildFromEntriesIf(expected: Data?, entries: [EntryRecord])throws -> MapUpdateRecord { return try FfiConverterTypeMapUpdateRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingversionedmap_rebuild_from_entries_if( @@ -6032,7 +6295,7 @@ open func rebuildFromEntriesIf(expected: Data?, entries: [EntryRecord])throws - ) }) } - + open func rebuildFromIterIf(expected: Data?, entries: [EntryRecord])throws -> MapUpdateRecord { return try FfiConverterTypeMapUpdateRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingversionedmap_rebuild_from_iter_if( @@ -6042,7 +6305,7 @@ open func rebuildFromIterIf(expected: Data?, entries: [EntryRecord])throws -> M ) }) } - + open func rebuildSortedIf(expected: Data?, entries: [EntryRecord])throws -> MapUpdateRecord { return try FfiConverterTypeMapUpdateRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingversionedmap_rebuild_sorted_if( @@ -6052,7 +6315,7 @@ open func rebuildSortedIf(expected: Data?, entries: [EntryRecord])throws -> Map ) }) } - + open func restoreBackup(bytes: Data)throws -> MapVersionRecord { return try FfiConverterTypeMapVersionRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingversionedmap_restore_backup( @@ -6061,7 +6324,7 @@ open func restoreBackup(bytes: Data)throws -> MapVersionRecord { ) }) } - + open func retentionPolicy() -> NamedRootRetentionRecord { return try! FfiConverterTypeNamedRootRetentionRecord_lift(try! rustCall() { uniffi_prolly_bindings_fn_method_bindingversionedmap_retention_policy( @@ -6069,7 +6332,7 @@ open func retentionPolicy() -> NamedRootRetentionRecord { ) }) } - + open func rollbackTo(id: Data)throws -> MapVersionRecord { return try FfiConverterTypeMapVersionRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingversionedmap_rollback_to( @@ -6078,7 +6341,7 @@ open func rollbackTo(id: Data)throws -> MapVersionRecord { ) }) } - + open func scanPrefix(prefix: Data, visitor: EntryVisitorCallback)throws -> ScanOutcomeRecord { return try FfiConverterTypeScanOutcomeRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingversionedmap_scan_prefix( @@ -6088,7 +6351,7 @@ open func scanPrefix(prefix: Data, visitor: EntryVisitorCallback)throws -> Scan ) }) } - + open func scanPrefixAt(id: Data, prefix: Data, visitor: EntryVisitorCallback)throws -> ScanOutcomeRecord { return try FfiConverterTypeScanOutcomeRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingversionedmap_scan_prefix_at( @@ -6099,7 +6362,7 @@ open func scanPrefixAt(id: Data, prefix: Data, visitor: EntryVisitorCallback)thr ) }) } - + open func scanRange(start: Data, rangeEnd: Data?, visitor: EntryVisitorCallback)throws -> ScanOutcomeRecord { return try FfiConverterTypeScanOutcomeRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingversionedmap_scan_range( @@ -6110,7 +6373,7 @@ open func scanRange(start: Data, rangeEnd: Data?, visitor: EntryVisitorCallback) ) }) } - + open func scanRangeAt(id: Data, start: Data, rangeEnd: Data?, visitor: EntryVisitorCallback)throws -> ScanOutcomeRecord { return try FfiConverterTypeScanOutcomeRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingversionedmap_scan_range_at( @@ -6122,7 +6385,7 @@ open func scanRangeAt(id: Data, start: Data, rangeEnd: Data?, visitor: EntryVisi ) }) } - + open func snapshot()throws -> BindingMapSnapshot? { return try FfiConverterOptionTypeBindingMapSnapshot.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingversionedmap_snapshot( @@ -6130,7 +6393,7 @@ open func snapshot()throws -> BindingMapSnapshot? { ) }) } - + open func snapshotAt(id: Data)throws -> BindingMapSnapshot? { return try FfiConverterOptionTypeBindingMapSnapshot.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingversionedmap_snapshot_at( @@ -6139,7 +6402,7 @@ open func snapshotAt(id: Data)throws -> BindingMapSnapshot? { ) }) } - + open func subscribe()throws -> BindingMapSubscription { return try FfiConverterTypeBindingMapSubscription_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingversionedmap_subscribe( @@ -6147,7 +6410,7 @@ open func subscribe()throws -> BindingMapSubscription { ) }) } - + open func subscribeFrom(lastSeen: Data?)throws -> BindingMapSubscription { return try FfiConverterTypeBindingMapSubscription_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingversionedmap_subscribe_from( @@ -6156,7 +6419,7 @@ open func subscribeFrom(lastSeen: Data?)throws -> BindingMapSubscription { ) }) } - + open func sweepBlobGc(blobStore: ProllyBlobStore)throws -> BlobGcSweepRecord { return try FfiConverterTypeBlobGcSweepRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingversionedmap_sweep_blob_gc( @@ -6165,7 +6428,7 @@ open func sweepBlobGc(blobStore: ProllyBlobStore)throws -> BlobGcSweepRecord { ) }) } - + open func sweepGc()throws -> GcSweepRecord { return try FfiConverterTypeGcSweepRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingversionedmap_sweep_gc( @@ -6173,7 +6436,7 @@ open func sweepGc()throws -> GcSweepRecord { ) }) } - + open func verifyCatalog()throws -> MapCatalogVerificationRecord { return try FfiConverterTypeMapCatalogVerificationRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingversionedmap_verify_catalog( @@ -6181,7 +6444,7 @@ open func verifyCatalog()throws -> MapCatalogVerificationRecord { ) }) } - + open func version(id: Data)throws -> MapVersionRecord? { return try FfiConverterOptionTypeMapVersionRecord.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingversionedmap_version( @@ -6190,7 +6453,7 @@ open func version(id: Data)throws -> MapVersionRecord? { ) }) } - + open func versions()throws -> [MapVersionRecord] { return try FfiConverterSequenceTypeMapVersionRecord.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingversionedmap_versions( @@ -6198,7 +6461,7 @@ open func versions()throws -> [MapVersionRecord] { ) }) } - + open func versionsPrefix() -> Data { return try! FfiConverterData.lift(try! rustCall() { uniffi_prolly_bindings_fn_method_bindingversionedmap_versions_prefix( @@ -6206,9 +6469,9 @@ open func versionsPrefix() -> Data { ) }) } - - + + } @@ -6263,23 +6526,23 @@ public func FfiConverterTypeBindingVersionedMap_lower(_ value: BindingVersionedM * `VersionedMapsTransaction` at commit. */ public protocol BindingVersionedTransactionProtocol: AnyObject, Sendable { - + func apply(mapId: Data, mutations: [MutationRecord]) throws -> MapVersionRecord - + func applyIf(mapId: Data, expected: Data?, mutations: [MutationRecord]) throws -> MapUpdateRecord - + func commit() throws -> VersionedTransactionCommitRecord - + func delete(mapId: Data, key: Data) throws -> MapVersionRecord - + func get(mapId: Data, key: Data) throws -> Data? - + func head(mapId: Data) throws -> MapVersionRecord? - + func put(mapId: Data, key: Data, value: Data) throws -> MapVersionRecord - - func rollback() throws - + + func rollback() throws + } /** * Host-friendly atomic multi-map transaction. Mutations are accumulated in @@ -6336,9 +6599,9 @@ open class BindingVersionedTransaction: BindingVersionedTransactionProtocol, @un try! rustCall { uniffi_prolly_bindings_fn_free_bindingversionedtransaction(handle, $0) } } - - + + open func apply(mapId: Data, mutations: [MutationRecord])throws -> MapVersionRecord { return try FfiConverterTypeMapVersionRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingversionedtransaction_apply( @@ -6348,7 +6611,7 @@ open func apply(mapId: Data, mutations: [MutationRecord])throws -> MapVersionRe ) }) } - + open func applyIf(mapId: Data, expected: Data?, mutations: [MutationRecord])throws -> MapUpdateRecord { return try FfiConverterTypeMapUpdateRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingversionedtransaction_apply_if( @@ -6359,7 +6622,7 @@ open func applyIf(mapId: Data, expected: Data?, mutations: [MutationRecord])thro ) }) } - + open func commit()throws -> VersionedTransactionCommitRecord { return try FfiConverterTypeVersionedTransactionCommitRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingversionedtransaction_commit( @@ -6367,7 +6630,7 @@ open func commit()throws -> VersionedTransactionCommitRecord { ) }) } - + open func delete(mapId: Data, key: Data)throws -> MapVersionRecord { return try FfiConverterTypeMapVersionRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingversionedtransaction_delete( @@ -6377,7 +6640,7 @@ open func delete(mapId: Data, key: Data)throws -> MapVersionRecord { ) }) } - + open func get(mapId: Data, key: Data)throws -> Data? { return try FfiConverterOptionData.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingversionedtransaction_get( @@ -6387,7 +6650,7 @@ open func get(mapId: Data, key: Data)throws -> Data? { ) }) } - + open func head(mapId: Data)throws -> MapVersionRecord? { return try FfiConverterOptionTypeMapVersionRecord.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingversionedtransaction_head( @@ -6396,7 +6659,7 @@ open func head(mapId: Data)throws -> MapVersionRecord? { ) }) } - + open func put(mapId: Data, key: Data, value: Data)throws -> MapVersionRecord { return try FfiConverterTypeMapVersionRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingversionedtransaction_put( @@ -6407,16 +6670,16 @@ open func put(mapId: Data, key: Data, value: Data)throws -> MapVersionRecord { ) }) } - + open func rollback()throws {try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_bindingversionedtransaction_rollback( self.uniffiCloneHandle(),$0 ) } } - - + + } @@ -6466,12 +6729,12 @@ public func FfiConverterTypeBindingVersionedTransaction_lower(_ value: BindingVe public protocol ConflictVisitorCallback: AnyObject, Sendable { - + /** * Return `true` to continue or `false` to stop after this conflict. */ func visit(conflict: ConflictRecord) -> Bool - + } open class ConflictVisitorCallbackImpl: ConflictVisitorCallback, @unchecked Sendable { fileprivate let handle: UInt64 @@ -6523,9 +6786,9 @@ open class ConflictVisitorCallbackImpl: ConflictVisitorCallback, @unchecked Send try! rustCall { uniffi_prolly_bindings_fn_free_conflictvisitorcallback(handle, $0) } } - - + + /** * Return `true` to continue or `false` to stop after this conflict. */ @@ -6537,9 +6800,9 @@ open func visit(conflict: ConflictRecord) -> Bool { ) }) } - - + + } @@ -6583,7 +6846,7 @@ fileprivate struct UniffiCallbackInterfaceConflictVisitorCallback { ) } - + let writeReturn = { uniffiOutReturn.pointee = FfiConverterBool.lower($0) } uniffiTraitInterfaceCall( callStatus: uniffiCallStatus, @@ -6659,9 +6922,9 @@ public func FfiConverterTypeConflictVisitorCallback_lower(_ value: ConflictVisit public protocol CrdtResolverCallback: AnyObject, Sendable { - + func resolve(conflict: ConflictRecord) -> CrdtResolutionRecord - + } open class CrdtResolverCallbackImpl: CrdtResolverCallback, @unchecked Sendable { fileprivate let handle: UInt64 @@ -6713,9 +6976,9 @@ open class CrdtResolverCallbackImpl: CrdtResolverCallback, @unchecked Sendable { try! rustCall { uniffi_prolly_bindings_fn_free_crdtresolvercallback(handle, $0) } } - - + + open func resolve(conflict: ConflictRecord) -> CrdtResolutionRecord { return try! FfiConverterTypeCrdtResolutionRecord_lift(try! rustCall() { uniffi_prolly_bindings_fn_method_crdtresolvercallback_resolve( @@ -6724,9 +6987,9 @@ open func resolve(conflict: ConflictRecord) -> CrdtResolutionRecord { ) }) } - - + + } @@ -6770,7 +7033,7 @@ fileprivate struct UniffiCallbackInterfaceCrdtResolverCallback { ) } - + let writeReturn = { uniffiOutReturn.pointee = FfiConverterTypeCrdtResolutionRecord_lower($0) } uniffiTraitInterfaceCall( callStatus: uniffiCallStatus, @@ -6846,12 +7109,12 @@ public func FfiConverterTypeCrdtResolverCallback_lower(_ value: CrdtResolverCall public protocol DiffVisitorCallback: AnyObject, Sendable { - + /** * Return `true` to continue or `false` to stop after this diff. */ func visit(diff: DiffRecord) -> Bool - + } open class DiffVisitorCallbackImpl: DiffVisitorCallback, @unchecked Sendable { fileprivate let handle: UInt64 @@ -6903,9 +7166,9 @@ open class DiffVisitorCallbackImpl: DiffVisitorCallback, @unchecked Sendable { try! rustCall { uniffi_prolly_bindings_fn_free_diffvisitorcallback(handle, $0) } } - - + + /** * Return `true` to continue or `false` to stop after this diff. */ @@ -6917,9 +7180,9 @@ open func visit(diff: DiffRecord) -> Bool { ) }) } - - + + } @@ -6963,7 +7226,7 @@ fileprivate struct UniffiCallbackInterfaceDiffVisitorCallback { ) } - + let writeReturn = { uniffiOutReturn.pointee = FfiConverterBool.lower($0) } uniffiTraitInterfaceCall( callStatus: uniffiCallStatus, @@ -7039,12 +7302,12 @@ public func FfiConverterTypeDiffVisitorCallback_lower(_ value: DiffVisitorCallba public protocol EntryVisitorCallback: AnyObject, Sendable { - + /** * Return `true` to continue or `false` to stop after this entry. */ func visit(entry: EntryRecord) -> Bool - + } open class EntryVisitorCallbackImpl: EntryVisitorCallback, @unchecked Sendable { fileprivate let handle: UInt64 @@ -7096,9 +7359,9 @@ open class EntryVisitorCallbackImpl: EntryVisitorCallback, @unchecked Sendable { try! rustCall { uniffi_prolly_bindings_fn_free_entryvisitorcallback(handle, $0) } } - - + + /** * Return `true` to continue or `false` to stop after this entry. */ @@ -7110,9 +7373,9 @@ open func visit(entry: EntryRecord) -> Bool { ) }) } - - + + } @@ -7156,7 +7419,7 @@ fileprivate struct UniffiCallbackInterfaceEntryVisitorCallback { ) } - + let writeReturn = { uniffiOutReturn.pointee = FfiConverterBool.lower($0) } uniffiTraitInterfaceCall( callStatus: uniffiCallStatus, @@ -7232,41 +7495,41 @@ public func FfiConverterTypeEntryVisitorCallback_lower(_ value: EntryVisitorCall public protocol ForeignRemoteStore: AnyObject, Sendable { - + func descriptor() async -> StoreDescriptorResultRecord - + func getNode(cid: Data) async -> OptionalBytesResultRecord - + func putNode(cid: Data, value: Data) async -> UnitResultRecord - + func deleteNode(cid: Data) async -> UnitResultRecord - + func batchNodes(ops: [NodeMutationRecord]) async -> UnitResultRecord - + func publishNodes(publication: NodePublicationRecord) async -> UnitResultRecord func batchGetNodesOrdered(cids: [Data]) async -> OptionalBytesListResultRecord - + func listNodeCids() async -> BytesListResultRecord - + func getHint(namespace: Data, key: Data) async -> OptionalBytesResultRecord - + func putHint(namespace: Data, key: Data, value: Data) async -> UnitResultRecord - + func batchPutNodesWithHint(nodes: [NodeEntryRecord], namespace: Data, key: Data, value: Data) async -> UnitResultRecord - + func getRootManifest(name: Data) async -> OptionalBytesResultRecord - + func putRootManifest(name: Data, manifest: Data) async -> UnitResultRecord - + func deleteRootManifest(name: Data) async -> UnitResultRecord - + func compareAndSwapRootManifest(name: Data, expected: OptionalBytesRecord, new: OptionalBytesRecord) async -> RootCasResultRecord - + func listRootManifests() async -> NamedBytesListResultRecord - + func commitTransaction(nodes: [NodeMutationRecord], conditions: [RootConditionRecord], roots: [RootWriteRecord]) async -> TransactionResultRecord - + } open class ForeignRemoteStoreImpl: ForeignRemoteStore, @unchecked Sendable { fileprivate let handle: UInt64 @@ -7318,16 +7581,16 @@ open class ForeignRemoteStoreImpl: ForeignRemoteStore, @unchecked Sendable { try! rustCall { uniffi_prolly_bindings_fn_free_foreignremotestore(handle, $0) } } - - + + open func descriptor()async -> StoreDescriptorResultRecord { return try! await uniffiRustCallAsync( rustFutureFunc: { uniffi_prolly_bindings_fn_method_foreignremotestore_descriptor( self.uniffiCloneHandle() - + ) }, pollFunc: ffi_prolly_bindings_rust_future_poll_rust_buffer, @@ -7335,10 +7598,10 @@ open func descriptor()async -> StoreDescriptorResultRecord { freeFunc: ffi_prolly_bindings_rust_future_free_rust_buffer, liftFunc: FfiConverterTypeStoreDescriptorResultRecord_lift, errorHandler: nil - + ) } - + open func getNode(cid: Data)async -> OptionalBytesResultRecord { return try! await uniffiRustCallAsync( @@ -7353,10 +7616,10 @@ open func getNode(cid: Data)async -> OptionalBytesResultRecord { freeFunc: ffi_prolly_bindings_rust_future_free_rust_buffer, liftFunc: FfiConverterTypeOptionalBytesResultRecord_lift, errorHandler: nil - + ) } - + open func putNode(cid: Data, value: Data)async -> UnitResultRecord { return try! await uniffiRustCallAsync( @@ -7371,10 +7634,10 @@ open func putNode(cid: Data, value: Data)async -> UnitResultRecord { freeFunc: ffi_prolly_bindings_rust_future_free_rust_buffer, liftFunc: FfiConverterTypeUnitResultRecord_lift, errorHandler: nil - + ) } - + open func deleteNode(cid: Data)async -> UnitResultRecord { return try! await uniffiRustCallAsync( @@ -7389,10 +7652,10 @@ open func deleteNode(cid: Data)async -> UnitResultRecord { freeFunc: ffi_prolly_bindings_rust_future_free_rust_buffer, liftFunc: FfiConverterTypeUnitResultRecord_lift, errorHandler: nil - + ) } - + open func batchNodes(ops: [NodeMutationRecord])async -> UnitResultRecord { return try! await uniffiRustCallAsync( @@ -7407,10 +7670,10 @@ open func batchNodes(ops: [NodeMutationRecord])async -> UnitResultRecord { freeFunc: ffi_prolly_bindings_rust_future_free_rust_buffer, liftFunc: FfiConverterTypeUnitResultRecord_lift, errorHandler: nil - + ) } - + open func publishNodes(publication: NodePublicationRecord)async -> UnitResultRecord { return try! await uniffiRustCallAsync( @@ -7443,17 +7706,17 @@ open func batchGetNodesOrdered(cids: [Data])async -> OptionalBytesListResultRec freeFunc: ffi_prolly_bindings_rust_future_free_rust_buffer, liftFunc: FfiConverterTypeOptionalBytesListResultRecord_lift, errorHandler: nil - + ) } - + open func listNodeCids()async -> BytesListResultRecord { return try! await uniffiRustCallAsync( rustFutureFunc: { uniffi_prolly_bindings_fn_method_foreignremotestore_list_node_cids( self.uniffiCloneHandle() - + ) }, pollFunc: ffi_prolly_bindings_rust_future_poll_rust_buffer, @@ -7461,10 +7724,10 @@ open func listNodeCids()async -> BytesListResultRecord { freeFunc: ffi_prolly_bindings_rust_future_free_rust_buffer, liftFunc: FfiConverterTypeBytesListResultRecord_lift, errorHandler: nil - + ) } - + open func getHint(namespace: Data, key: Data)async -> OptionalBytesResultRecord { return try! await uniffiRustCallAsync( @@ -7479,10 +7742,10 @@ open func getHint(namespace: Data, key: Data)async -> OptionalBytesResultRecord freeFunc: ffi_prolly_bindings_rust_future_free_rust_buffer, liftFunc: FfiConverterTypeOptionalBytesResultRecord_lift, errorHandler: nil - + ) } - + open func putHint(namespace: Data, key: Data, value: Data)async -> UnitResultRecord { return try! await uniffiRustCallAsync( @@ -7497,10 +7760,10 @@ open func putHint(namespace: Data, key: Data, value: Data)async -> UnitResultRe freeFunc: ffi_prolly_bindings_rust_future_free_rust_buffer, liftFunc: FfiConverterTypeUnitResultRecord_lift, errorHandler: nil - + ) } - + open func batchPutNodesWithHint(nodes: [NodeEntryRecord], namespace: Data, key: Data, value: Data)async -> UnitResultRecord { return try! await uniffiRustCallAsync( @@ -7515,10 +7778,10 @@ open func batchPutNodesWithHint(nodes: [NodeEntryRecord], namespace: Data, key: freeFunc: ffi_prolly_bindings_rust_future_free_rust_buffer, liftFunc: FfiConverterTypeUnitResultRecord_lift, errorHandler: nil - + ) } - + open func getRootManifest(name: Data)async -> OptionalBytesResultRecord { return try! await uniffiRustCallAsync( @@ -7533,10 +7796,10 @@ open func getRootManifest(name: Data)async -> OptionalBytesResultRecord { freeFunc: ffi_prolly_bindings_rust_future_free_rust_buffer, liftFunc: FfiConverterTypeOptionalBytesResultRecord_lift, errorHandler: nil - + ) } - + open func putRootManifest(name: Data, manifest: Data)async -> UnitResultRecord { return try! await uniffiRustCallAsync( @@ -7551,10 +7814,10 @@ open func putRootManifest(name: Data, manifest: Data)async -> UnitResultRecord freeFunc: ffi_prolly_bindings_rust_future_free_rust_buffer, liftFunc: FfiConverterTypeUnitResultRecord_lift, errorHandler: nil - + ) } - + open func deleteRootManifest(name: Data)async -> UnitResultRecord { return try! await uniffiRustCallAsync( @@ -7569,10 +7832,10 @@ open func deleteRootManifest(name: Data)async -> UnitResultRecord { freeFunc: ffi_prolly_bindings_rust_future_free_rust_buffer, liftFunc: FfiConverterTypeUnitResultRecord_lift, errorHandler: nil - + ) } - + open func compareAndSwapRootManifest(name: Data, expected: OptionalBytesRecord, new: OptionalBytesRecord)async -> RootCasResultRecord { return try! await uniffiRustCallAsync( @@ -7587,17 +7850,17 @@ open func compareAndSwapRootManifest(name: Data, expected: OptionalBytesRecord, freeFunc: ffi_prolly_bindings_rust_future_free_rust_buffer, liftFunc: FfiConverterTypeRootCasResultRecord_lift, errorHandler: nil - + ) } - + open func listRootManifests()async -> NamedBytesListResultRecord { return try! await uniffiRustCallAsync( rustFutureFunc: { uniffi_prolly_bindings_fn_method_foreignremotestore_list_root_manifests( self.uniffiCloneHandle() - + ) }, pollFunc: ffi_prolly_bindings_rust_future_poll_rust_buffer, @@ -7605,10 +7868,10 @@ open func listRootManifests()async -> NamedBytesListResultRecord { freeFunc: ffi_prolly_bindings_rust_future_free_rust_buffer, liftFunc: FfiConverterTypeNamedBytesListResultRecord_lift, errorHandler: nil - + ) } - + open func commitTransaction(nodes: [NodeMutationRecord], conditions: [RootConditionRecord], roots: [RootWriteRecord])async -> TransactionResultRecord { return try! await uniffiRustCallAsync( @@ -7623,12 +7886,12 @@ open func commitTransaction(nodes: [NodeMutationRecord], conditions: [RootCondit freeFunc: ffi_prolly_bindings_rust_future_free_rust_buffer, liftFunc: FfiConverterTypeTransactionResultRecord_lift, errorHandler: nil - + ) } - - + + } @@ -8456,39 +8719,39 @@ public func FfiConverterTypeForeignRemoteStore_lower(_ value: ForeignRemoteStore public protocol HostStoreCallback: AnyObject, Sendable { - + func get(key: Data) -> HostStoreBytesResultRecord - + func put(key: Data, value: Data) -> HostStoreUnitResultRecord - + func delete(key: Data) -> HostStoreUnitResultRecord - + func batch(ops: [MutationRecord]) -> HostStoreUnitResultRecord - + func publishNodes(publication: NodePublicationRecord) -> HostStoreUnitResultRecord func batchGetOrdered(keys: [Data]) -> HostStoreBatchGetResultRecord - + func prefersBatchReads() -> HostStoreBoolResultRecord - + func supportsHints() -> HostStoreBoolResultRecord - + func getHint(namespace: Data, key: Data) -> HostStoreBytesResultRecord - + func putHint(namespace: Data, key: Data, value: Data) -> HostStoreUnitResultRecord - + func listNodeCids() -> HostStoreListBytesResultRecord - + func getRoot(name: Data) -> HostStoreRootResultRecord - + func putRoot(name: Data, manifest: RootManifestRecord) -> HostStoreUnitResultRecord - + func deleteRoot(name: Data) -> HostStoreUnitResultRecord - + func compareAndSwapRoot(name: Data, expected: RootManifestRecord?, replacement: RootManifestRecord?) -> HostStoreRootCasResultRecord - + func listRoots() -> HostStoreListRootsResultRecord - + } open class HostStoreCallbackImpl: HostStoreCallback, @unchecked Sendable { fileprivate let handle: UInt64 @@ -8540,9 +8803,9 @@ open class HostStoreCallbackImpl: HostStoreCallback, @unchecked Sendable { try! rustCall { uniffi_prolly_bindings_fn_free_hoststorecallback(handle, $0) } } - - + + open func get(key: Data) -> HostStoreBytesResultRecord { return try! FfiConverterTypeHostStoreBytesResultRecord_lift(try! rustCall() { uniffi_prolly_bindings_fn_method_hoststorecallback_get( @@ -8551,7 +8814,7 @@ open func get(key: Data) -> HostStoreBytesResultRecord { ) }) } - + open func put(key: Data, value: Data) -> HostStoreUnitResultRecord { return try! FfiConverterTypeHostStoreUnitResultRecord_lift(try! rustCall() { uniffi_prolly_bindings_fn_method_hoststorecallback_put( @@ -8561,7 +8824,7 @@ open func put(key: Data, value: Data) -> HostStoreUnitResultRecord { ) }) } - + open func delete(key: Data) -> HostStoreUnitResultRecord { return try! FfiConverterTypeHostStoreUnitResultRecord_lift(try! rustCall() { uniffi_prolly_bindings_fn_method_hoststorecallback_delete( @@ -8570,7 +8833,7 @@ open func delete(key: Data) -> HostStoreUnitResultRecord { ) }) } - + open func batch(ops: [MutationRecord]) -> HostStoreUnitResultRecord { return try! FfiConverterTypeHostStoreUnitResultRecord_lift(try! rustCall() { uniffi_prolly_bindings_fn_method_hoststorecallback_batch( @@ -8579,7 +8842,7 @@ open func batch(ops: [MutationRecord]) -> HostStoreUnitResultRecord { ) }) } - + open func publishNodes(publication: NodePublicationRecord) -> HostStoreUnitResultRecord { return try! FfiConverterTypeHostStoreUnitResultRecord_lift(try! rustCall() { uniffi_prolly_bindings_fn_method_hoststorecallback_publish_nodes( @@ -8597,7 +8860,7 @@ open func batchGetOrdered(keys: [Data]) -> HostStoreBatchGetResultRecord { ) }) } - + open func prefersBatchReads() -> HostStoreBoolResultRecord { return try! FfiConverterTypeHostStoreBoolResultRecord_lift(try! rustCall() { uniffi_prolly_bindings_fn_method_hoststorecallback_prefers_batch_reads( @@ -8605,7 +8868,7 @@ open func prefersBatchReads() -> HostStoreBoolResultRecord { ) }) } - + open func supportsHints() -> HostStoreBoolResultRecord { return try! FfiConverterTypeHostStoreBoolResultRecord_lift(try! rustCall() { uniffi_prolly_bindings_fn_method_hoststorecallback_supports_hints( @@ -8613,7 +8876,7 @@ open func supportsHints() -> HostStoreBoolResultRecord { ) }) } - + open func getHint(namespace: Data, key: Data) -> HostStoreBytesResultRecord { return try! FfiConverterTypeHostStoreBytesResultRecord_lift(try! rustCall() { uniffi_prolly_bindings_fn_method_hoststorecallback_get_hint( @@ -8623,7 +8886,7 @@ open func getHint(namespace: Data, key: Data) -> HostStoreBytesResultRecord { ) }) } - + open func putHint(namespace: Data, key: Data, value: Data) -> HostStoreUnitResultRecord { return try! FfiConverterTypeHostStoreUnitResultRecord_lift(try! rustCall() { uniffi_prolly_bindings_fn_method_hoststorecallback_put_hint( @@ -8634,7 +8897,7 @@ open func putHint(namespace: Data, key: Data, value: Data) -> HostStoreUnitResul ) }) } - + open func listNodeCids() -> HostStoreListBytesResultRecord { return try! FfiConverterTypeHostStoreListBytesResultRecord_lift(try! rustCall() { uniffi_prolly_bindings_fn_method_hoststorecallback_list_node_cids( @@ -8642,7 +8905,7 @@ open func listNodeCids() -> HostStoreListBytesResultRecord { ) }) } - + open func getRoot(name: Data) -> HostStoreRootResultRecord { return try! FfiConverterTypeHostStoreRootResultRecord_lift(try! rustCall() { uniffi_prolly_bindings_fn_method_hoststorecallback_get_root( @@ -8651,7 +8914,7 @@ open func getRoot(name: Data) -> HostStoreRootResultRecord { ) }) } - + open func putRoot(name: Data, manifest: RootManifestRecord) -> HostStoreUnitResultRecord { return try! FfiConverterTypeHostStoreUnitResultRecord_lift(try! rustCall() { uniffi_prolly_bindings_fn_method_hoststorecallback_put_root( @@ -8661,7 +8924,7 @@ open func putRoot(name: Data, manifest: RootManifestRecord) -> HostStoreUnitResu ) }) } - + open func deleteRoot(name: Data) -> HostStoreUnitResultRecord { return try! FfiConverterTypeHostStoreUnitResultRecord_lift(try! rustCall() { uniffi_prolly_bindings_fn_method_hoststorecallback_delete_root( @@ -8670,7 +8933,7 @@ open func deleteRoot(name: Data) -> HostStoreUnitResultRecord { ) }) } - + open func compareAndSwapRoot(name: Data, expected: RootManifestRecord?, replacement: RootManifestRecord?) -> HostStoreRootCasResultRecord { return try! FfiConverterTypeHostStoreRootCasResultRecord_lift(try! rustCall() { uniffi_prolly_bindings_fn_method_hoststorecallback_compare_and_swap_root( @@ -8681,7 +8944,7 @@ open func compareAndSwapRoot(name: Data, expected: RootManifestRecord?, replacem ) }) } - + open func listRoots() -> HostStoreListRootsResultRecord { return try! FfiConverterTypeHostStoreListRootsResultRecord_lift(try! rustCall() { uniffi_prolly_bindings_fn_method_hoststorecallback_list_roots( @@ -8689,9 +8952,9 @@ open func listRoots() -> HostStoreListRootsResultRecord { ) }) } - - + + } @@ -8735,7 +8998,7 @@ fileprivate struct UniffiCallbackInterfaceHostStoreCallback { ) } - + let writeReturn = { uniffiOutReturn.pointee = FfiConverterTypeHostStoreBytesResultRecord_lower($0) } uniffiTraitInterfaceCall( callStatus: uniffiCallStatus, @@ -8761,7 +9024,7 @@ fileprivate struct UniffiCallbackInterfaceHostStoreCallback { ) } - + let writeReturn = { uniffiOutReturn.pointee = FfiConverterTypeHostStoreUnitResultRecord_lower($0) } uniffiTraitInterfaceCall( callStatus: uniffiCallStatus, @@ -8785,7 +9048,7 @@ fileprivate struct UniffiCallbackInterfaceHostStoreCallback { ) } - + let writeReturn = { uniffiOutReturn.pointee = FfiConverterTypeHostStoreUnitResultRecord_lower($0) } uniffiTraitInterfaceCall( callStatus: uniffiCallStatus, @@ -8809,7 +9072,7 @@ fileprivate struct UniffiCallbackInterfaceHostStoreCallback { ) } - + let writeReturn = { uniffiOutReturn.pointee = FfiConverterTypeHostStoreUnitResultRecord_lower($0) } uniffiTraitInterfaceCall( callStatus: uniffiCallStatus, @@ -8857,7 +9120,7 @@ fileprivate struct UniffiCallbackInterfaceHostStoreCallback { ) } - + let writeReturn = { uniffiOutReturn.pointee = FfiConverterTypeHostStoreBatchGetResultRecord_lower($0) } uniffiTraitInterfaceCall( callStatus: uniffiCallStatus, @@ -8879,7 +9142,7 @@ fileprivate struct UniffiCallbackInterfaceHostStoreCallback { ) } - + let writeReturn = { uniffiOutReturn.pointee = FfiConverterTypeHostStoreBoolResultRecord_lower($0) } uniffiTraitInterfaceCall( callStatus: uniffiCallStatus, @@ -8901,7 +9164,7 @@ fileprivate struct UniffiCallbackInterfaceHostStoreCallback { ) } - + let writeReturn = { uniffiOutReturn.pointee = FfiConverterTypeHostStoreBoolResultRecord_lower($0) } uniffiTraitInterfaceCall( callStatus: uniffiCallStatus, @@ -8927,7 +9190,7 @@ fileprivate struct UniffiCallbackInterfaceHostStoreCallback { ) } - + let writeReturn = { uniffiOutReturn.pointee = FfiConverterTypeHostStoreBytesResultRecord_lower($0) } uniffiTraitInterfaceCall( callStatus: uniffiCallStatus, @@ -8955,7 +9218,7 @@ fileprivate struct UniffiCallbackInterfaceHostStoreCallback { ) } - + let writeReturn = { uniffiOutReturn.pointee = FfiConverterTypeHostStoreUnitResultRecord_lower($0) } uniffiTraitInterfaceCall( callStatus: uniffiCallStatus, @@ -8977,7 +9240,7 @@ fileprivate struct UniffiCallbackInterfaceHostStoreCallback { ) } - + let writeReturn = { uniffiOutReturn.pointee = FfiConverterTypeHostStoreListBytesResultRecord_lower($0) } uniffiTraitInterfaceCall( callStatus: uniffiCallStatus, @@ -9001,7 +9264,7 @@ fileprivate struct UniffiCallbackInterfaceHostStoreCallback { ) } - + let writeReturn = { uniffiOutReturn.pointee = FfiConverterTypeHostStoreRootResultRecord_lower($0) } uniffiTraitInterfaceCall( callStatus: uniffiCallStatus, @@ -9027,7 +9290,7 @@ fileprivate struct UniffiCallbackInterfaceHostStoreCallback { ) } - + let writeReturn = { uniffiOutReturn.pointee = FfiConverterTypeHostStoreUnitResultRecord_lower($0) } uniffiTraitInterfaceCall( callStatus: uniffiCallStatus, @@ -9051,7 +9314,7 @@ fileprivate struct UniffiCallbackInterfaceHostStoreCallback { ) } - + let writeReturn = { uniffiOutReturn.pointee = FfiConverterTypeHostStoreUnitResultRecord_lower($0) } uniffiTraitInterfaceCall( callStatus: uniffiCallStatus, @@ -9079,7 +9342,7 @@ fileprivate struct UniffiCallbackInterfaceHostStoreCallback { ) } - + let writeReturn = { uniffiOutReturn.pointee = FfiConverterTypeHostStoreRootCasResultRecord_lower($0) } uniffiTraitInterfaceCall( callStatus: uniffiCallStatus, @@ -9101,7 +9364,7 @@ fileprivate struct UniffiCallbackInterfaceHostStoreCallback { ) } - + let writeReturn = { uniffiOutReturn.pointee = FfiConverterTypeHostStoreListRootsResultRecord_lower($0) } uniffiTraitInterfaceCall( callStatus: uniffiCallStatus, @@ -9177,25 +9440,25 @@ public func FfiConverterTypeHostStoreCallback_lower(_ value: HostStoreCallback) public protocol MergePolicyRegistryProtocol: AnyObject, Sendable { - + func hasDefault() throws -> Bool - + func isEmpty() throws -> Bool - + func len() throws -> UInt64 - - func pushExactResolver(key: Data, resolver: MergeResolverCallback) throws - - func pushExactResolverName(key: Data, name: String) throws - - func pushPrefixResolver(prefix: Data, resolver: MergeResolverCallback) throws - - func pushPrefixResolverName(prefix: Data, name: String) throws - - func setDefaultResolver(resolver: MergeResolverCallback) throws - - func setDefaultResolverName(name: String) throws - + + func pushExactResolver(key: Data, resolver: MergeResolverCallback) throws + + func pushExactResolverName(key: Data, name: String) throws + + func pushPrefixResolver(prefix: Data, resolver: MergeResolverCallback) throws + + func pushPrefixResolverName(prefix: Data, name: String) throws + + func setDefaultResolver(resolver: MergeResolverCallback) throws + + func setDefaultResolverName(name: String) throws + } open class MergePolicyRegistry: MergePolicyRegistryProtocol, @unchecked Sendable { fileprivate let handle: UInt64 @@ -9254,9 +9517,9 @@ public convenience init() { try! rustCall { uniffi_prolly_bindings_fn_free_mergepolicyregistry(handle, $0) } } - - + + open func hasDefault()throws -> Bool { return try FfiConverterBool.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_mergepolicyregistry_has_default( @@ -9264,7 +9527,7 @@ open func hasDefault()throws -> Bool { ) }) } - + open func isEmpty()throws -> Bool { return try FfiConverterBool.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_mergepolicyregistry_is_empty( @@ -9272,7 +9535,7 @@ open func isEmpty()throws -> Bool { ) }) } - + open func len()throws -> UInt64 { return try FfiConverterUInt64.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_mergepolicyregistry_len( @@ -9280,7 +9543,7 @@ open func len()throws -> UInt64 { ) }) } - + open func pushExactResolver(key: Data, resolver: MergeResolverCallback)throws {try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_mergepolicyregistry_push_exact_resolver( self.uniffiCloneHandle(), @@ -9289,7 +9552,7 @@ open func pushExactResolver(key: Data, resolver: MergeResolverCallback)throws ) } } - + open func pushExactResolverName(key: Data, name: String)throws {try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_mergepolicyregistry_push_exact_resolver_name( self.uniffiCloneHandle(), @@ -9298,7 +9561,7 @@ open func pushExactResolverName(key: Data, name: String)throws {try rustCallWi ) } } - + open func pushPrefixResolver(prefix: Data, resolver: MergeResolverCallback)throws {try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_mergepolicyregistry_push_prefix_resolver( self.uniffiCloneHandle(), @@ -9307,7 +9570,7 @@ open func pushPrefixResolver(prefix: Data, resolver: MergeResolverCallback)throw ) } } - + open func pushPrefixResolverName(prefix: Data, name: String)throws {try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_mergepolicyregistry_push_prefix_resolver_name( self.uniffiCloneHandle(), @@ -9316,7 +9579,7 @@ open func pushPrefixResolverName(prefix: Data, name: String)throws {try rustCa ) } } - + open func setDefaultResolver(resolver: MergeResolverCallback)throws {try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_mergepolicyregistry_set_default_resolver( self.uniffiCloneHandle(), @@ -9324,7 +9587,7 @@ open func setDefaultResolver(resolver: MergeResolverCallback)throws {try rustC ) } } - + open func setDefaultResolverName(name: String)throws {try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_mergepolicyregistry_set_default_resolver_name( self.uniffiCloneHandle(), @@ -9332,9 +9595,9 @@ open func setDefaultResolverName(name: String)throws {try rustCallWithError(Ff ) } } - - + + } @@ -9384,9 +9647,9 @@ public func FfiConverterTypeMergePolicyRegistry_lower(_ value: MergePolicyRegist public protocol MergeResolverCallback: AnyObject, Sendable { - + func resolve(conflict: ConflictRecord) -> ResolutionRecord - + } open class MergeResolverCallbackImpl: MergeResolverCallback, @unchecked Sendable { fileprivate let handle: UInt64 @@ -9438,9 +9701,9 @@ open class MergeResolverCallbackImpl: MergeResolverCallback, @unchecked Sendable try! rustCall { uniffi_prolly_bindings_fn_free_mergeresolvercallback(handle, $0) } } - - + + open func resolve(conflict: ConflictRecord) -> ResolutionRecord { return try! FfiConverterTypeResolutionRecord_lift(try! rustCall() { uniffi_prolly_bindings_fn_method_mergeresolvercallback_resolve( @@ -9449,9 +9712,9 @@ open func resolve(conflict: ConflictRecord) -> ResolutionRecord { ) }) } - - + + } @@ -9495,7 +9758,7 @@ fileprivate struct UniffiCallbackInterfaceMergeResolverCallback { ) } - + let writeReturn = { uniffiOutReturn.pointee = FfiConverterTypeResolutionRecord_lower($0) } uniffiTraitInterfaceCall( callStatus: uniffiCallStatus, @@ -9571,17 +9834,17 @@ public func FfiConverterTypeMergeResolverCallback_lower(_ value: MergeResolverCa public protocol ProllyBlobStoreProtocol: AnyObject, Sendable { - + func blobCount() throws -> UInt64 - - func deleteBlob(reference: BlobRefRecord) throws - + + func deleteBlob(reference: BlobRefRecord) throws + func getBlob(reference: BlobRefRecord) throws -> Data? - + func listBlobRefs() throws -> [BlobRefRecord] - + func putBlob(bytes: Data) throws -> BlobRefRecord - + } open class ProllyBlobStore: ProllyBlobStoreProtocol, @unchecked Sendable { fileprivate let handle: UInt64 @@ -9633,7 +9896,7 @@ open class ProllyBlobStore: ProllyBlobStoreProtocol, @unchecked Sendable { try! rustCall { uniffi_prolly_bindings_fn_free_prollyblobstore(handle, $0) } } - + public static func file(path: String)throws -> ProllyBlobStore { return try FfiConverterTypeProllyBlobStore_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_constructor_prollyblobstore_file( @@ -9641,16 +9904,16 @@ public static func file(path: String)throws -> ProllyBlobStore { ) }) } - + public static func memory() -> ProllyBlobStore { return try! FfiConverterTypeProllyBlobStore_lift(try! rustCall() { uniffi_prolly_bindings_fn_constructor_prollyblobstore_memory($0 ) }) } - - + + open func blobCount()throws -> UInt64 { return try FfiConverterUInt64.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyblobstore_blob_count( @@ -9658,7 +9921,7 @@ open func blobCount()throws -> UInt64 { ) }) } - + open func deleteBlob(reference: BlobRefRecord)throws {try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyblobstore_delete_blob( self.uniffiCloneHandle(), @@ -9666,7 +9929,7 @@ open func deleteBlob(reference: BlobRefRecord)throws {try rustCallWithError(Ff ) } } - + open func getBlob(reference: BlobRefRecord)throws -> Data? { return try FfiConverterOptionData.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyblobstore_get_blob( @@ -9675,7 +9938,7 @@ open func getBlob(reference: BlobRefRecord)throws -> Data? { ) }) } - + open func listBlobRefs()throws -> [BlobRefRecord] { return try FfiConverterSequenceTypeBlobRefRecord.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyblobstore_list_blob_refs( @@ -9683,7 +9946,7 @@ open func listBlobRefs()throws -> [BlobRefRecord] { ) }) } - + open func putBlob(bytes: Data)throws -> BlobRefRecord { return try FfiConverterTypeBlobRefRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyblobstore_put_blob( @@ -9692,9 +9955,9 @@ open func putBlob(bytes: Data)throws -> BlobRefRecord { ) }) } - - + + } @@ -9744,318 +10007,318 @@ public func FfiConverterTypeProllyBlobStore_lower(_ value: ProllyBlobStore) -> U public protocol ProllyEngineProtocol: AnyObject, Sendable { - + func appendBatch(tree: TreeRecord, mutations: [MutationRecord]) throws -> TreeRecord - + func appendBatchWithStats(tree: TreeRecord, mutations: [MutationRecord]) throws -> BatchApplyResultRecord - + func batch(tree: TreeRecord, mutations: [MutationRecord]) throws -> TreeRecord - + func batchWithStats(tree: TreeRecord, mutations: [MutationRecord]) throws -> BatchApplyResultRecord - + func beginTransaction() throws -> ProllyTransaction - + func beginVersionedTransaction() throws -> BindingVersionedTransaction - + func buildFromEntries(entries: [EntryRecord]) throws -> TreeRecord - + func buildFromSortedEntries(entries: [EntryRecord]) throws -> TreeRecord - + /** * Canonically build one immutable proximity map and return its * descriptor-bound application handle. */ func buildProximityMap(config: ProximityConfigRecord, records: [ProximityRecordRecord], threads: UInt64?) throws -> BindingProximityMap - + func cacheStats() throws -> CacheStatsRecord - - func clearCache() - + + func clearCache() + func collectStats(tree: TreeRecord) throws -> TreeStatsRecord - + func collectStatsJson(tree: TreeRecord) throws -> JsonDocumentRecord - + func compareAndSwapNamedRoot(name: Data, expected: TreeRecord?, replacement: TreeRecord?) throws -> NamedRootUpdateRecord - + func compareAndSwapNamedRootAtMillis(name: Data, expected: TreeRecord?, replacement: TreeRecord?, timestampMillis: UInt64) throws -> NamedRootUpdateRecord - + func compareAndSwapSnapshot(namespace: SnapshotNamespaceRecord, id: Data, expected: TreeRecord?, replacement: TreeRecord?) throws -> NamedRootUpdateRecord - + func compareAndSwapSnapshotAtMillis(namespace: SnapshotNamespaceRecord, id: Data, expected: TreeRecord?, replacement: TreeRecord?, timestampMillis: UInt64) throws -> NamedRootUpdateRecord - + func conflictPage(base: TreeRecord, left: TreeRecord, right: TreeRecord, cursor: RangeCursorRecord?, limit: UInt64) throws -> ConflictPageRecord - + func copyMissingNodes(tree: TreeRecord, destination: ProllyEngine) throws -> MissingNodeCopyRecord - + func crdtMerge(base: TreeRecord, left: TreeRecord, right: TreeRecord, config: CrdtConfigRecord) throws -> TreeRecord - + func crdtMergeWithResolver(base: TreeRecord, left: TreeRecord, right: TreeRecord, deletePolicy: CrdtDeletePolicyKind, resolver: CrdtResolverCallback) throws -> TreeRecord - + func create() -> TreeRecord - + func cursorWindow(tree: TreeRecord, key: Data, rangeEnd: Data?, limit: UInt64) throws -> CursorWindowRecord - + func debugCompareTrees(left: TreeRecord, right: TreeRecord) throws -> TreeDebugComparisonRecord - + func debugCompareTreesJson(left: TreeRecord, right: TreeRecord) throws -> JsonDocumentRecord - + func debugCompareTreesText(left: TreeRecord, right: TreeRecord) throws -> String - + func debugTree(tree: TreeRecord) throws -> TreeDebugViewRecord - + func debugTreeJson(tree: TreeRecord) throws -> JsonDocumentRecord - + func debugTreeText(tree: TreeRecord) throws -> String - + func delete(tree: TreeRecord, key: Data) throws -> TreeRecord - - func deleteNamedRoot(name: Data) throws - + + func deleteNamedRoot(name: Data) throws + /** * Delete every raw-byte key in the half-open range `[start, end)`. */ func deleteRange(tree: TreeRecord, start: Data, rangeEnd: Data) throws -> TreeRecord - + /** * Delete every raw-byte key in `[start, end)` and return write statistics. */ func deleteRangeWithStats(tree: TreeRecord, start: Data, rangeEnd: Data) throws -> WriteResultRecord - - func deleteSnapshot(namespace: SnapshotNamespaceRecord, id: Data) throws - + + func deleteSnapshot(namespace: SnapshotNamespaceRecord, id: Data) throws + func diff(base: TreeRecord, other: TreeRecord) throws -> [DiffRecord] - + func diffFromCursor(base: TreeRecord, other: TreeRecord, cursor: RangeCursorRecord?, rangeEnd: Data?) throws -> [DiffRecord] - + func diffPage(base: TreeRecord, other: TreeRecord, cursor: RangeCursorRecord?, rangeEnd: Data?, limit: UInt64) throws -> DiffPageRecord - + func exportSnapshot(tree: TreeRecord) throws -> SnapshotBundleRecord - + func firstEntry(tree: TreeRecord) throws -> EntryRecord? - + func get(tree: TreeRecord, key: Data) throws -> Data? - + func getLargeValue(blobStore: ProllyBlobStore, tree: TreeRecord, key: Data) throws -> Data? - + func getMany(tree: TreeRecord, keys: [Data]) throws -> [Data?] - + func getValueRef(tree: TreeRecord, key: Data) throws -> ValueRefRecord? - + func hydratePrefixPathHint(tree: TreeRecord, prefix: Data) throws -> Bool - + func importSnapshot(bundle: SnapshotBundleRecord) throws -> TreeRecord - + /** * Open an application-facing indexed map using a frozen snapshot of the * supplied extractor registry. */ func indexedMap(id: Data, registry: BindingIndexRegistry) throws -> BindingIndexedMap - + func lastEntry(tree: TreeRecord) throws -> EntryRecord? - + func listNamedRootManifests() throws -> [NamedRootManifestRecord] - + func listNamedRoots() throws -> [NamedRootRecord] - + func listNodeCids() throws -> [Data] - + func listSnapshots(namespace: SnapshotNamespaceRecord) throws -> [SnapshotRecord] - + func loadChangedSpansHint(base: TreeRecord, changed: TreeRecord) throws -> ChangedSpanHintRecord? - + func loadNamedRoot(name: Data) throws -> TreeRecord? - + func loadNamedRoots(names: [Data]) throws -> NamedRootSelectionRecord - + /** * Reopen and validate an immutable proximity descriptor from this * engine's content store. */ func loadProximityMap(descriptor: Data) throws -> BindingProximityMap - + func loadRetainedNamedRoots(retention: NamedRootRetentionRecord) throws -> NamedRootSelectionRecord - + func loadSnapshot(namespace: SnapshotNamespaceRecord, id: Data) throws -> TreeRecord? - + func loadSnapshots(namespace: SnapshotNamespaceRecord, ids: [Data]) throws -> SnapshotSelectionRecord - + func lowerBound(tree: TreeRecord, key: Data) throws -> EntryRecord? - + func markReachable(roots: [TreeRecord]) throws -> GcReachabilityRecord - + func markReachableBlobs(roots: [TreeRecord]) throws -> BlobGcReachabilityRecord - + func merge(base: TreeRecord, left: TreeRecord, right: TreeRecord, resolver: String?) throws -> TreeRecord - + func mergeExplain(base: TreeRecord, left: TreeRecord, right: TreeRecord, resolver: String?) throws -> MergeExplanationRecord - + func mergeExplainWithPolicy(base: TreeRecord, left: TreeRecord, right: TreeRecord, policy: MergePolicyRegistry) throws -> MergeExplanationRecord - + func mergeExplainWithResolver(base: TreeRecord, left: TreeRecord, right: TreeRecord, resolver: MergeResolverCallback) throws -> MergeExplanationRecord - + func mergePrefix(base: TreeRecord, left: TreeRecord, right: TreeRecord, prefix: Data, resolver: String?) throws -> TreeRecord - + func mergePrefixWithPolicy(base: TreeRecord, left: TreeRecord, right: TreeRecord, prefix: Data, policy: MergePolicyRegistry) throws -> TreeRecord - + func mergePrefixWithResolver(base: TreeRecord, left: TreeRecord, right: TreeRecord, prefix: Data, resolver: MergeResolverCallback) throws -> TreeRecord - + func mergeRange(base: TreeRecord, left: TreeRecord, right: TreeRecord, start: Data, rangeEnd: Data?, resolver: String?) throws -> TreeRecord - + func mergeRangeWithPolicy(base: TreeRecord, left: TreeRecord, right: TreeRecord, start: Data, rangeEnd: Data?, policy: MergePolicyRegistry) throws -> TreeRecord - + func mergeRangeWithResolver(base: TreeRecord, left: TreeRecord, right: TreeRecord, start: Data, rangeEnd: Data?, resolver: MergeResolverCallback) throws -> TreeRecord - + func mergeWithPolicy(base: TreeRecord, left: TreeRecord, right: TreeRecord, policy: MergePolicyRegistry) throws -> TreeRecord - + func mergeWithResolver(base: TreeRecord, left: TreeRecord, right: TreeRecord, resolver: MergeResolverCallback) throws -> TreeRecord - + func metrics() -> MetricsRecord - + func parallelBatch(tree: TreeRecord, mutations: [MutationRecord], config: ParallelConfigRecord) throws -> TreeRecord - + func parallelBatchWithStats(tree: TreeRecord, mutations: [MutationRecord], config: ParallelConfigRecord) throws -> BatchApplyResultRecord - + func pinTreePath(tree: TreeRecord, key: Data) throws -> UInt64 - + func pinTreeRoot(tree: TreeRecord) throws -> UInt64 - + func planBlobGc(blobStore: ProllyBlobStore, roots: [TreeRecord], candidateBlobs: [BlobRefRecord]) throws -> BlobGcPlanRecord - + func planBlobStoreGc(blobStore: ProllyBlobStore, roots: [TreeRecord]) throws -> BlobGcPlanRecord - + func planGc(roots: [TreeRecord], candidateCids: [Data]) throws -> GcPlanRecord - + func planMissingNodes(tree: TreeRecord, destination: ProllyEngine) throws -> MissingNodePlanRecord - + func planStoreGc(roots: [TreeRecord]) throws -> GcPlanRecord - + func planStoreGcForRetention(retention: NamedRootRetentionRecord) throws -> GcPlanRecord - + func prefix(tree: TreeRecord, prefix: Data) throws -> [EntryRecord] - + func prefixPage(tree: TreeRecord, prefix: Data, cursor: RangeCursorRecord?, limit: UInt64) throws -> RangePageRecord - + func prefixReversePage(tree: TreeRecord, prefix: Data, cursor: ReverseCursorRecord?, limit: UInt64) throws -> ReversePageRecord - + func proveDiffPage(base: TreeRecord, other: TreeRecord, cursor: RangeCursorRecord?, rangeEnd: Data?, limit: UInt64) throws -> ProvedDiffPageRecord - + func proveKey(tree: TreeRecord, key: Data) throws -> KeyProofRecord - + func proveKeys(tree: TreeRecord, keys: [Data]) throws -> MultiKeyProofRecord - + func provePrefix(tree: TreeRecord, prefix: Data) throws -> RangeProofRecord - + func proveRange(tree: TreeRecord, start: Data, rangeEnd: Data?) throws -> RangeProofRecord - + func proveRangePage(tree: TreeRecord, cursor: RangeCursorRecord?, rangeEnd: Data?, limit: UInt64) throws -> ProvedRangePageRecord - + /** * Create an engine-bound, reusable proximity search runtime. Reusing this * object across searches preserves validated content-cache entries and * exposes cumulative physical I/O counters. */ func proximitySearchRuntime(policy: ProximitySearchRuntimePolicyRecord) throws -> BindingProximitySearchRuntime - + func publishChangedSpansHint(base: TreeRecord, changed: TreeRecord, spans: [ChangedSpanRecord]) throws -> Bool - - func publishNamedRoot(name: Data, tree: TreeRecord) throws - - func publishNamedRootAtMillis(name: Data, tree: TreeRecord, timestampMillis: UInt64) throws - + + func publishNamedRoot(name: Data, tree: TreeRecord) throws + + func publishNamedRootAtMillis(name: Data, tree: TreeRecord, timestampMillis: UInt64) throws + func publishPrefixPathHint(tree: TreeRecord, prefix: Data) throws -> Bool - - func publishSnapshot(namespace: SnapshotNamespaceRecord, id: Data, tree: TreeRecord) throws - - func publishSnapshotAtMillis(namespace: SnapshotNamespaceRecord, id: Data, tree: TreeRecord, timestampMillis: UInt64) throws - + + func publishSnapshot(namespace: SnapshotNamespaceRecord, id: Data, tree: TreeRecord) throws + + func publishSnapshotAtMillis(namespace: SnapshotNamespaceRecord, id: Data, tree: TreeRecord, timestampMillis: UInt64) throws + func put(tree: TreeRecord, key: Data, value: Data) throws -> TreeRecord - + func putLargeValue(blobStore: ProllyBlobStore, tree: TreeRecord, key: Data, value: Data, config: LargeValueConfigRecord) throws -> TreeRecord - + func range(tree: TreeRecord, start: Data, rangeEnd: Data?) throws -> [EntryRecord] - + func rangeAfter(tree: TreeRecord, afterKey: Data, rangeEnd: Data?) throws -> [EntryRecord] - + func rangeDiff(base: TreeRecord, other: TreeRecord, start: Data, rangeEnd: Data?) throws -> [DiffRecord] - + func rangeFromCursor(tree: TreeRecord, cursor: RangeCursorRecord?, rangeEnd: Data?) throws -> [EntryRecord] - + func rangePage(tree: TreeRecord, cursor: RangeCursorRecord?, rangeEnd: Data?, limit: UInt64) throws -> RangePageRecord - + /** * Bind one immutable tree to a reusable read object. Foreign callers that * issue repeated reads should prefer this over retransmitting `TreeRecord` * on every operation. */ func readSession(tree: TreeRecord) throws -> ProllyReadSession - - func resetMetrics() - + + func resetMetrics() + func reversePage(tree: TreeRecord, cursor: ReverseCursorRecord?, start: Data, limit: UInt64) throws -> ReversePageRecord - + /** * Stream genuine three-way conflicts without allocating a complete list. */ func scanConflicts(base: TreeRecord, left: TreeRecord, right: TreeRecord, visitor: ConflictVisitorCallback) throws -> ScanOutcomeRecord - + /** * Stream structural differences without first allocating a complete list. */ func scanDiff(base: TreeRecord, other: TreeRecord, visitor: DiffVisitorCallback) throws -> ScanOutcomeRecord - + /** * Stream all entries with `prefix` through the borrowed Rust traversal. */ func scanPrefix(tree: TreeRecord, prefix: Data, visitor: EntryVisitorCallback) throws -> ScanOutcomeRecord - + /** * Stream a prefix in descending key order. */ func scanPrefixReverse(tree: TreeRecord, prefix: Data, visitor: EntryVisitorCallback) throws -> ScanOutcomeRecord - + /** * Stream a half-open range through the borrowed Rust traversal. */ func scanRange(tree: TreeRecord, start: Data, rangeEnd: Data?, visitor: EntryVisitorCallback) throws -> ScanOutcomeRecord - + /** * Stream structural differences whose keys fall in `[start, end)`. */ func scanRangeDiff(base: TreeRecord, other: TreeRecord, start: Data, rangeEnd: Data?, visitor: DiffVisitorCallback) throws -> ScanOutcomeRecord - + /** * Stream a half-open range in descending key order. */ func scanRangeReverse(tree: TreeRecord, start: Data, rangeEnd: Data?, visitor: EntryVisitorCallback) throws -> ScanOutcomeRecord - + func statsDiff(before: TreeRecord, after: TreeRecord) throws -> StatsComparisonRecord - + func statsDiffJson(before: TreeRecord, after: TreeRecord) throws -> JsonDocumentRecord - + func structuralDiffPage(base: TreeRecord, other: TreeRecord, cursorJson: String?, limit: UInt64) throws -> StructuralDiffPageRecord - + func structuralDiffPageWithCursor(base: TreeRecord, other: TreeRecord, cursor: StructuralDiffCursorRecord?, limit: UInt64) throws -> StructuralDiffPageRecord - + func sweepBlobGc(blobStore: ProllyBlobStore, roots: [TreeRecord], candidateBlobs: [BlobRefRecord]) throws -> BlobGcSweepRecord - + func sweepBlobStoreGc(blobStore: ProllyBlobStore, roots: [TreeRecord]) throws -> BlobGcSweepRecord - + func sweepGc(roots: [TreeRecord], candidateCids: [Data]) throws -> GcSweepRecord - + func sweepStoreGc(roots: [TreeRecord]) throws -> GcSweepRecord - + func sweepStoreGcForRetention(retention: NamedRootRetentionRecord) throws -> GcSweepRecord - + func unpinAllCacheNodes() throws -> UInt64 - + func upperBound(tree: TreeRecord, key: Data) throws -> EntryRecord? - + /** * Open an application-facing managed map. The returned object shares the * underlying engine and may outlive this particular foreign handle. */ func versionedMap(id: Data) throws -> BindingVersionedMap - + } open class ProllyEngine: ProllyEngineProtocol, @unchecked Sendable { fileprivate let handle: UInt64 @@ -10107,7 +10370,7 @@ open class ProllyEngine: ProllyEngineProtocol, @unchecked Sendable { try! rustCall { uniffi_prolly_bindings_fn_free_prollyengine(handle, $0) } } - + public static func customStore(callback: HostStoreCallback, config: ConfigRecord)throws -> ProllyEngine { return try FfiConverterTypeProllyEngine_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_constructor_prollyengine_custom_store( @@ -10116,7 +10379,7 @@ public static func customStore(callback: HostStoreCallback, config: ConfigRecord ) }) } - + public static func file(path: String, config: ConfigRecord)throws -> ProllyEngine { return try FfiConverterTypeProllyEngine_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_constructor_prollyengine_file( @@ -10125,7 +10388,7 @@ public static func file(path: String, config: ConfigRecord)throws -> ProllyEngi ) }) } - + public static func memory(config: ConfigRecord)throws -> ProllyEngine { return try FfiConverterTypeProllyEngine_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_constructor_prollyengine_memory( @@ -10133,7 +10396,7 @@ public static func memory(config: ConfigRecord)throws -> ProllyEngine { ) }) } - + public static func sqlite(path: String, config: ConfigRecord)throws -> ProllyEngine { return try FfiConverterTypeProllyEngine_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_constructor_prollyengine_sqlite( @@ -10142,7 +10405,7 @@ public static func sqlite(path: String, config: ConfigRecord)throws -> ProllyEn ) }) } - + public static func sqliteInMemory(config: ConfigRecord)throws -> ProllyEngine { return try FfiConverterTypeProllyEngine_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_constructor_prollyengine_sqlite_in_memory( @@ -10150,9 +10413,9 @@ public static func sqliteInMemory(config: ConfigRecord)throws -> ProllyEngine ) }) } - - + + open func appendBatch(tree: TreeRecord, mutations: [MutationRecord])throws -> TreeRecord { return try FfiConverterTypeTreeRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_append_batch( @@ -10162,7 +10425,7 @@ open func appendBatch(tree: TreeRecord, mutations: [MutationRecord])throws -> T ) }) } - + open func appendBatchWithStats(tree: TreeRecord, mutations: [MutationRecord])throws -> BatchApplyResultRecord { return try FfiConverterTypeBatchApplyResultRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_append_batch_with_stats( @@ -10172,7 +10435,7 @@ open func appendBatchWithStats(tree: TreeRecord, mutations: [MutationRecord])thr ) }) } - + open func batch(tree: TreeRecord, mutations: [MutationRecord])throws -> TreeRecord { return try FfiConverterTypeTreeRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_batch( @@ -10182,7 +10445,7 @@ open func batch(tree: TreeRecord, mutations: [MutationRecord])throws -> TreeRec ) }) } - + open func batchWithStats(tree: TreeRecord, mutations: [MutationRecord])throws -> BatchApplyResultRecord { return try FfiConverterTypeBatchApplyResultRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_batch_with_stats( @@ -10192,7 +10455,7 @@ open func batchWithStats(tree: TreeRecord, mutations: [MutationRecord])throws - ) }) } - + open func beginTransaction()throws -> ProllyTransaction { return try FfiConverterTypeProllyTransaction_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_begin_transaction( @@ -10200,7 +10463,7 @@ open func beginTransaction()throws -> ProllyTransaction { ) }) } - + open func beginVersionedTransaction()throws -> BindingVersionedTransaction { return try FfiConverterTypeBindingVersionedTransaction_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_begin_versioned_transaction( @@ -10208,7 +10471,7 @@ open func beginVersionedTransaction()throws -> BindingVersionedTransaction { ) }) } - + open func buildFromEntries(entries: [EntryRecord])throws -> TreeRecord { return try FfiConverterTypeTreeRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_build_from_entries( @@ -10217,7 +10480,7 @@ open func buildFromEntries(entries: [EntryRecord])throws -> TreeRecord { ) }) } - + open func buildFromSortedEntries(entries: [EntryRecord])throws -> TreeRecord { return try FfiConverterTypeTreeRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_build_from_sorted_entries( @@ -10226,7 +10489,7 @@ open func buildFromSortedEntries(entries: [EntryRecord])throws -> TreeRecord { ) }) } - + /** * Canonically build one immutable proximity map and return its * descriptor-bound application handle. @@ -10241,7 +10504,7 @@ open func buildProximityMap(config: ProximityConfigRecord, records: [ProximityRe ) }) } - + open func cacheStats()throws -> CacheStatsRecord { return try FfiConverterTypeCacheStatsRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_cache_stats( @@ -10249,14 +10512,14 @@ open func cacheStats()throws -> CacheStatsRecord { ) }) } - + open func clearCache() {try! rustCall() { uniffi_prolly_bindings_fn_method_prollyengine_clear_cache( self.uniffiCloneHandle(),$0 ) } } - + open func collectStats(tree: TreeRecord)throws -> TreeStatsRecord { return try FfiConverterTypeTreeStatsRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_collect_stats( @@ -10265,7 +10528,7 @@ open func collectStats(tree: TreeRecord)throws -> TreeStatsRecord { ) }) } - + open func collectStatsJson(tree: TreeRecord)throws -> JsonDocumentRecord { return try FfiConverterTypeJsonDocumentRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_collect_stats_json( @@ -10274,7 +10537,7 @@ open func collectStatsJson(tree: TreeRecord)throws -> JsonDocumentRecord { ) }) } - + open func compareAndSwapNamedRoot(name: Data, expected: TreeRecord?, replacement: TreeRecord?)throws -> NamedRootUpdateRecord { return try FfiConverterTypeNamedRootUpdateRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_compare_and_swap_named_root( @@ -10285,7 +10548,7 @@ open func compareAndSwapNamedRoot(name: Data, expected: TreeRecord?, replacement ) }) } - + open func compareAndSwapNamedRootAtMillis(name: Data, expected: TreeRecord?, replacement: TreeRecord?, timestampMillis: UInt64)throws -> NamedRootUpdateRecord { return try FfiConverterTypeNamedRootUpdateRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_compare_and_swap_named_root_at_millis( @@ -10297,7 +10560,7 @@ open func compareAndSwapNamedRootAtMillis(name: Data, expected: TreeRecord?, rep ) }) } - + open func compareAndSwapSnapshot(namespace: SnapshotNamespaceRecord, id: Data, expected: TreeRecord?, replacement: TreeRecord?)throws -> NamedRootUpdateRecord { return try FfiConverterTypeNamedRootUpdateRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_compare_and_swap_snapshot( @@ -10309,7 +10572,7 @@ open func compareAndSwapSnapshot(namespace: SnapshotNamespaceRecord, id: Data, e ) }) } - + open func compareAndSwapSnapshotAtMillis(namespace: SnapshotNamespaceRecord, id: Data, expected: TreeRecord?, replacement: TreeRecord?, timestampMillis: UInt64)throws -> NamedRootUpdateRecord { return try FfiConverterTypeNamedRootUpdateRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_compare_and_swap_snapshot_at_millis( @@ -10322,7 +10585,7 @@ open func compareAndSwapSnapshotAtMillis(namespace: SnapshotNamespaceRecord, id: ) }) } - + open func conflictPage(base: TreeRecord, left: TreeRecord, right: TreeRecord, cursor: RangeCursorRecord?, limit: UInt64)throws -> ConflictPageRecord { return try FfiConverterTypeConflictPageRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_conflict_page( @@ -10335,7 +10598,7 @@ open func conflictPage(base: TreeRecord, left: TreeRecord, right: TreeRecord, cu ) }) } - + open func copyMissingNodes(tree: TreeRecord, destination: ProllyEngine)throws -> MissingNodeCopyRecord { return try FfiConverterTypeMissingNodeCopyRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_copy_missing_nodes( @@ -10345,7 +10608,7 @@ open func copyMissingNodes(tree: TreeRecord, destination: ProllyEngine)throws - ) }) } - + open func crdtMerge(base: TreeRecord, left: TreeRecord, right: TreeRecord, config: CrdtConfigRecord)throws -> TreeRecord { return try FfiConverterTypeTreeRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_crdt_merge( @@ -10357,7 +10620,7 @@ open func crdtMerge(base: TreeRecord, left: TreeRecord, right: TreeRecord, confi ) }) } - + open func crdtMergeWithResolver(base: TreeRecord, left: TreeRecord, right: TreeRecord, deletePolicy: CrdtDeletePolicyKind, resolver: CrdtResolverCallback)throws -> TreeRecord { return try FfiConverterTypeTreeRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_crdt_merge_with_resolver( @@ -10370,7 +10633,7 @@ open func crdtMergeWithResolver(base: TreeRecord, left: TreeRecord, right: TreeR ) }) } - + open func create() -> TreeRecord { return try! FfiConverterTypeTreeRecord_lift(try! rustCall() { uniffi_prolly_bindings_fn_method_prollyengine_create( @@ -10378,7 +10641,7 @@ open func create() -> TreeRecord { ) }) } - + open func cursorWindow(tree: TreeRecord, key: Data, rangeEnd: Data?, limit: UInt64)throws -> CursorWindowRecord { return try FfiConverterTypeCursorWindowRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_cursor_window( @@ -10390,7 +10653,7 @@ open func cursorWindow(tree: TreeRecord, key: Data, rangeEnd: Data?, limit: UInt ) }) } - + open func debugCompareTrees(left: TreeRecord, right: TreeRecord)throws -> TreeDebugComparisonRecord { return try FfiConverterTypeTreeDebugComparisonRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_debug_compare_trees( @@ -10400,7 +10663,7 @@ open func debugCompareTrees(left: TreeRecord, right: TreeRecord)throws -> TreeD ) }) } - + open func debugCompareTreesJson(left: TreeRecord, right: TreeRecord)throws -> JsonDocumentRecord { return try FfiConverterTypeJsonDocumentRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_debug_compare_trees_json( @@ -10410,7 +10673,7 @@ open func debugCompareTreesJson(left: TreeRecord, right: TreeRecord)throws -> J ) }) } - + open func debugCompareTreesText(left: TreeRecord, right: TreeRecord)throws -> String { return try FfiConverterString.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_debug_compare_trees_text( @@ -10420,7 +10683,7 @@ open func debugCompareTreesText(left: TreeRecord, right: TreeRecord)throws -> S ) }) } - + open func debugTree(tree: TreeRecord)throws -> TreeDebugViewRecord { return try FfiConverterTypeTreeDebugViewRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_debug_tree( @@ -10429,7 +10692,7 @@ open func debugTree(tree: TreeRecord)throws -> TreeDebugViewRecord { ) }) } - + open func debugTreeJson(tree: TreeRecord)throws -> JsonDocumentRecord { return try FfiConverterTypeJsonDocumentRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_debug_tree_json( @@ -10438,7 +10701,7 @@ open func debugTreeJson(tree: TreeRecord)throws -> JsonDocumentRecord { ) }) } - + open func debugTreeText(tree: TreeRecord)throws -> String { return try FfiConverterString.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_debug_tree_text( @@ -10447,7 +10710,7 @@ open func debugTreeText(tree: TreeRecord)throws -> String { ) }) } - + open func delete(tree: TreeRecord, key: Data)throws -> TreeRecord { return try FfiConverterTypeTreeRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_delete( @@ -10457,7 +10720,7 @@ open func delete(tree: TreeRecord, key: Data)throws -> TreeRecord { ) }) } - + open func deleteNamedRoot(name: Data)throws {try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_delete_named_root( self.uniffiCloneHandle(), @@ -10465,7 +10728,7 @@ open func deleteNamedRoot(name: Data)throws {try rustCallWithError(FfiConverte ) } } - + /** * Delete every raw-byte key in the half-open range `[start, end)`. */ @@ -10479,7 +10742,7 @@ open func deleteRange(tree: TreeRecord, start: Data, rangeEnd: Data)throws -> T ) }) } - + /** * Delete every raw-byte key in `[start, end)` and return write statistics. */ @@ -10493,7 +10756,7 @@ open func deleteRangeWithStats(tree: TreeRecord, start: Data, rangeEnd: Data)thr ) }) } - + open func deleteSnapshot(namespace: SnapshotNamespaceRecord, id: Data)throws {try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_delete_snapshot( self.uniffiCloneHandle(), @@ -10502,7 +10765,7 @@ open func deleteSnapshot(namespace: SnapshotNamespaceRecord, id: Data)throws { ) } } - + open func diff(base: TreeRecord, other: TreeRecord)throws -> [DiffRecord] { return try FfiConverterSequenceTypeDiffRecord.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_diff( @@ -10512,7 +10775,7 @@ open func diff(base: TreeRecord, other: TreeRecord)throws -> [DiffRecord] { ) }) } - + open func diffFromCursor(base: TreeRecord, other: TreeRecord, cursor: RangeCursorRecord?, rangeEnd: Data?)throws -> [DiffRecord] { return try FfiConverterSequenceTypeDiffRecord.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_diff_from_cursor( @@ -10524,7 +10787,7 @@ open func diffFromCursor(base: TreeRecord, other: TreeRecord, cursor: RangeCurso ) }) } - + open func diffPage(base: TreeRecord, other: TreeRecord, cursor: RangeCursorRecord?, rangeEnd: Data?, limit: UInt64)throws -> DiffPageRecord { return try FfiConverterTypeDiffPageRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_diff_page( @@ -10537,7 +10800,7 @@ open func diffPage(base: TreeRecord, other: TreeRecord, cursor: RangeCursorRecor ) }) } - + open func exportSnapshot(tree: TreeRecord)throws -> SnapshotBundleRecord { return try FfiConverterTypeSnapshotBundleRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_export_snapshot( @@ -10546,7 +10809,7 @@ open func exportSnapshot(tree: TreeRecord)throws -> SnapshotBundleRecord { ) }) } - + open func firstEntry(tree: TreeRecord)throws -> EntryRecord? { return try FfiConverterOptionTypeEntryRecord.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_first_entry( @@ -10555,7 +10818,7 @@ open func firstEntry(tree: TreeRecord)throws -> EntryRecord? { ) }) } - + open func get(tree: TreeRecord, key: Data)throws -> Data? { return try FfiConverterOptionData.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_get( @@ -10565,7 +10828,7 @@ open func get(tree: TreeRecord, key: Data)throws -> Data? { ) }) } - + open func getLargeValue(blobStore: ProllyBlobStore, tree: TreeRecord, key: Data)throws -> Data? { return try FfiConverterOptionData.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_get_large_value( @@ -10576,7 +10839,7 @@ open func getLargeValue(blobStore: ProllyBlobStore, tree: TreeRecord, key: Data) ) }) } - + open func getMany(tree: TreeRecord, keys: [Data])throws -> [Data?] { return try FfiConverterSequenceOptionData.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_get_many( @@ -10586,7 +10849,7 @@ open func getMany(tree: TreeRecord, keys: [Data])throws -> [Data?] { ) }) } - + open func getValueRef(tree: TreeRecord, key: Data)throws -> ValueRefRecord? { return try FfiConverterOptionTypeValueRefRecord.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_get_value_ref( @@ -10596,7 +10859,7 @@ open func getValueRef(tree: TreeRecord, key: Data)throws -> ValueRefRecord? { ) }) } - + open func hydratePrefixPathHint(tree: TreeRecord, prefix: Data)throws -> Bool { return try FfiConverterBool.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_hydrate_prefix_path_hint( @@ -10606,7 +10869,7 @@ open func hydratePrefixPathHint(tree: TreeRecord, prefix: Data)throws -> Bool ) }) } - + open func importSnapshot(bundle: SnapshotBundleRecord)throws -> TreeRecord { return try FfiConverterTypeTreeRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_import_snapshot( @@ -10615,7 +10878,7 @@ open func importSnapshot(bundle: SnapshotBundleRecord)throws -> TreeRecord { ) }) } - + /** * Open an application-facing indexed map using a frozen snapshot of the * supplied extractor registry. @@ -10629,7 +10892,7 @@ open func indexedMap(id: Data, registry: BindingIndexRegistry)throws -> Binding ) }) } - + open func lastEntry(tree: TreeRecord)throws -> EntryRecord? { return try FfiConverterOptionTypeEntryRecord.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_last_entry( @@ -10638,7 +10901,7 @@ open func lastEntry(tree: TreeRecord)throws -> EntryRecord? { ) }) } - + open func listNamedRootManifests()throws -> [NamedRootManifestRecord] { return try FfiConverterSequenceTypeNamedRootManifestRecord.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_list_named_root_manifests( @@ -10646,7 +10909,7 @@ open func listNamedRootManifests()throws -> [NamedRootManifestRecord] { ) }) } - + open func listNamedRoots()throws -> [NamedRootRecord] { return try FfiConverterSequenceTypeNamedRootRecord.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_list_named_roots( @@ -10654,7 +10917,7 @@ open func listNamedRoots()throws -> [NamedRootRecord] { ) }) } - + open func listNodeCids()throws -> [Data] { return try FfiConverterSequenceData.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_list_node_cids( @@ -10662,7 +10925,7 @@ open func listNodeCids()throws -> [Data] { ) }) } - + open func listSnapshots(namespace: SnapshotNamespaceRecord)throws -> [SnapshotRecord] { return try FfiConverterSequenceTypeSnapshotRecord.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_list_snapshots( @@ -10671,7 +10934,7 @@ open func listSnapshots(namespace: SnapshotNamespaceRecord)throws -> [SnapshotR ) }) } - + open func loadChangedSpansHint(base: TreeRecord, changed: TreeRecord)throws -> ChangedSpanHintRecord? { return try FfiConverterOptionTypeChangedSpanHintRecord.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_load_changed_spans_hint( @@ -10681,7 +10944,7 @@ open func loadChangedSpansHint(base: TreeRecord, changed: TreeRecord)throws -> ) }) } - + open func loadNamedRoot(name: Data)throws -> TreeRecord? { return try FfiConverterOptionTypeTreeRecord.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_load_named_root( @@ -10690,7 +10953,7 @@ open func loadNamedRoot(name: Data)throws -> TreeRecord? { ) }) } - + open func loadNamedRoots(names: [Data])throws -> NamedRootSelectionRecord { return try FfiConverterTypeNamedRootSelectionRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_load_named_roots( @@ -10699,7 +10962,7 @@ open func loadNamedRoots(names: [Data])throws -> NamedRootSelectionRecord { ) }) } - + /** * Reopen and validate an immutable proximity descriptor from this * engine's content store. @@ -10712,7 +10975,7 @@ open func loadProximityMap(descriptor: Data)throws -> BindingProximityMap { ) }) } - + open func loadRetainedNamedRoots(retention: NamedRootRetentionRecord)throws -> NamedRootSelectionRecord { return try FfiConverterTypeNamedRootSelectionRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_load_retained_named_roots( @@ -10721,7 +10984,7 @@ open func loadRetainedNamedRoots(retention: NamedRootRetentionRecord)throws -> ) }) } - + open func loadSnapshot(namespace: SnapshotNamespaceRecord, id: Data)throws -> TreeRecord? { return try FfiConverterOptionTypeTreeRecord.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_load_snapshot( @@ -10731,7 +10994,7 @@ open func loadSnapshot(namespace: SnapshotNamespaceRecord, id: Data)throws -> T ) }) } - + open func loadSnapshots(namespace: SnapshotNamespaceRecord, ids: [Data])throws -> SnapshotSelectionRecord { return try FfiConverterTypeSnapshotSelectionRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_load_snapshots( @@ -10741,7 +11004,7 @@ open func loadSnapshots(namespace: SnapshotNamespaceRecord, ids: [Data])throws ) }) } - + open func lowerBound(tree: TreeRecord, key: Data)throws -> EntryRecord? { return try FfiConverterOptionTypeEntryRecord.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_lower_bound( @@ -10751,7 +11014,7 @@ open func lowerBound(tree: TreeRecord, key: Data)throws -> EntryRecord? { ) }) } - + open func markReachable(roots: [TreeRecord])throws -> GcReachabilityRecord { return try FfiConverterTypeGcReachabilityRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_mark_reachable( @@ -10760,7 +11023,7 @@ open func markReachable(roots: [TreeRecord])throws -> GcReachabilityRecord { ) }) } - + open func markReachableBlobs(roots: [TreeRecord])throws -> BlobGcReachabilityRecord { return try FfiConverterTypeBlobGcReachabilityRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_mark_reachable_blobs( @@ -10769,7 +11032,7 @@ open func markReachableBlobs(roots: [TreeRecord])throws -> BlobGcReachabilityRe ) }) } - + open func merge(base: TreeRecord, left: TreeRecord, right: TreeRecord, resolver: String?)throws -> TreeRecord { return try FfiConverterTypeTreeRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_merge( @@ -10781,7 +11044,7 @@ open func merge(base: TreeRecord, left: TreeRecord, right: TreeRecord, resolver: ) }) } - + open func mergeExplain(base: TreeRecord, left: TreeRecord, right: TreeRecord, resolver: String?)throws -> MergeExplanationRecord { return try FfiConverterTypeMergeExplanationRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_merge_explain( @@ -10793,7 +11056,7 @@ open func mergeExplain(base: TreeRecord, left: TreeRecord, right: TreeRecord, re ) }) } - + open func mergeExplainWithPolicy(base: TreeRecord, left: TreeRecord, right: TreeRecord, policy: MergePolicyRegistry)throws -> MergeExplanationRecord { return try FfiConverterTypeMergeExplanationRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_merge_explain_with_policy( @@ -10805,7 +11068,7 @@ open func mergeExplainWithPolicy(base: TreeRecord, left: TreeRecord, right: Tree ) }) } - + open func mergeExplainWithResolver(base: TreeRecord, left: TreeRecord, right: TreeRecord, resolver: MergeResolverCallback)throws -> MergeExplanationRecord { return try FfiConverterTypeMergeExplanationRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_merge_explain_with_resolver( @@ -10817,7 +11080,7 @@ open func mergeExplainWithResolver(base: TreeRecord, left: TreeRecord, right: Tr ) }) } - + open func mergePrefix(base: TreeRecord, left: TreeRecord, right: TreeRecord, prefix: Data, resolver: String?)throws -> TreeRecord { return try FfiConverterTypeTreeRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_merge_prefix( @@ -10830,7 +11093,7 @@ open func mergePrefix(base: TreeRecord, left: TreeRecord, right: TreeRecord, pre ) }) } - + open func mergePrefixWithPolicy(base: TreeRecord, left: TreeRecord, right: TreeRecord, prefix: Data, policy: MergePolicyRegistry)throws -> TreeRecord { return try FfiConverterTypeTreeRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_merge_prefix_with_policy( @@ -10843,7 +11106,7 @@ open func mergePrefixWithPolicy(base: TreeRecord, left: TreeRecord, right: TreeR ) }) } - + open func mergePrefixWithResolver(base: TreeRecord, left: TreeRecord, right: TreeRecord, prefix: Data, resolver: MergeResolverCallback)throws -> TreeRecord { return try FfiConverterTypeTreeRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_merge_prefix_with_resolver( @@ -10856,7 +11119,7 @@ open func mergePrefixWithResolver(base: TreeRecord, left: TreeRecord, right: Tre ) }) } - + open func mergeRange(base: TreeRecord, left: TreeRecord, right: TreeRecord, start: Data, rangeEnd: Data?, resolver: String?)throws -> TreeRecord { return try FfiConverterTypeTreeRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_merge_range( @@ -10870,7 +11133,7 @@ open func mergeRange(base: TreeRecord, left: TreeRecord, right: TreeRecord, star ) }) } - + open func mergeRangeWithPolicy(base: TreeRecord, left: TreeRecord, right: TreeRecord, start: Data, rangeEnd: Data?, policy: MergePolicyRegistry)throws -> TreeRecord { return try FfiConverterTypeTreeRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_merge_range_with_policy( @@ -10884,7 +11147,7 @@ open func mergeRangeWithPolicy(base: TreeRecord, left: TreeRecord, right: TreeRe ) }) } - + open func mergeRangeWithResolver(base: TreeRecord, left: TreeRecord, right: TreeRecord, start: Data, rangeEnd: Data?, resolver: MergeResolverCallback)throws -> TreeRecord { return try FfiConverterTypeTreeRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_merge_range_with_resolver( @@ -10898,7 +11161,7 @@ open func mergeRangeWithResolver(base: TreeRecord, left: TreeRecord, right: Tree ) }) } - + open func mergeWithPolicy(base: TreeRecord, left: TreeRecord, right: TreeRecord, policy: MergePolicyRegistry)throws -> TreeRecord { return try FfiConverterTypeTreeRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_merge_with_policy( @@ -10910,7 +11173,7 @@ open func mergeWithPolicy(base: TreeRecord, left: TreeRecord, right: TreeRecord, ) }) } - + open func mergeWithResolver(base: TreeRecord, left: TreeRecord, right: TreeRecord, resolver: MergeResolverCallback)throws -> TreeRecord { return try FfiConverterTypeTreeRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_merge_with_resolver( @@ -10922,7 +11185,7 @@ open func mergeWithResolver(base: TreeRecord, left: TreeRecord, right: TreeRecor ) }) } - + open func metrics() -> MetricsRecord { return try! FfiConverterTypeMetricsRecord_lift(try! rustCall() { uniffi_prolly_bindings_fn_method_prollyengine_metrics( @@ -10930,7 +11193,7 @@ open func metrics() -> MetricsRecord { ) }) } - + open func parallelBatch(tree: TreeRecord, mutations: [MutationRecord], config: ParallelConfigRecord)throws -> TreeRecord { return try FfiConverterTypeTreeRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_parallel_batch( @@ -10941,7 +11204,7 @@ open func parallelBatch(tree: TreeRecord, mutations: [MutationRecord], config: P ) }) } - + open func parallelBatchWithStats(tree: TreeRecord, mutations: [MutationRecord], config: ParallelConfigRecord)throws -> BatchApplyResultRecord { return try FfiConverterTypeBatchApplyResultRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_parallel_batch_with_stats( @@ -10952,7 +11215,7 @@ open func parallelBatchWithStats(tree: TreeRecord, mutations: [MutationRecord], ) }) } - + open func pinTreePath(tree: TreeRecord, key: Data)throws -> UInt64 { return try FfiConverterUInt64.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_pin_tree_path( @@ -10962,7 +11225,7 @@ open func pinTreePath(tree: TreeRecord, key: Data)throws -> UInt64 { ) }) } - + open func pinTreeRoot(tree: TreeRecord)throws -> UInt64 { return try FfiConverterUInt64.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_pin_tree_root( @@ -10971,7 +11234,7 @@ open func pinTreeRoot(tree: TreeRecord)throws -> UInt64 { ) }) } - + open func planBlobGc(blobStore: ProllyBlobStore, roots: [TreeRecord], candidateBlobs: [BlobRefRecord])throws -> BlobGcPlanRecord { return try FfiConverterTypeBlobGcPlanRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_plan_blob_gc( @@ -10982,7 +11245,7 @@ open func planBlobGc(blobStore: ProllyBlobStore, roots: [TreeRecord], candidateB ) }) } - + open func planBlobStoreGc(blobStore: ProllyBlobStore, roots: [TreeRecord])throws -> BlobGcPlanRecord { return try FfiConverterTypeBlobGcPlanRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_plan_blob_store_gc( @@ -10992,7 +11255,7 @@ open func planBlobStoreGc(blobStore: ProllyBlobStore, roots: [TreeRecord])throws ) }) } - + open func planGc(roots: [TreeRecord], candidateCids: [Data])throws -> GcPlanRecord { return try FfiConverterTypeGcPlanRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_plan_gc( @@ -11002,7 +11265,7 @@ open func planGc(roots: [TreeRecord], candidateCids: [Data])throws -> GcPlanRec ) }) } - + open func planMissingNodes(tree: TreeRecord, destination: ProllyEngine)throws -> MissingNodePlanRecord { return try FfiConverterTypeMissingNodePlanRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_plan_missing_nodes( @@ -11012,7 +11275,7 @@ open func planMissingNodes(tree: TreeRecord, destination: ProllyEngine)throws - ) }) } - + open func planStoreGc(roots: [TreeRecord])throws -> GcPlanRecord { return try FfiConverterTypeGcPlanRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_plan_store_gc( @@ -11021,7 +11284,7 @@ open func planStoreGc(roots: [TreeRecord])throws -> GcPlanRecord { ) }) } - + open func planStoreGcForRetention(retention: NamedRootRetentionRecord)throws -> GcPlanRecord { return try FfiConverterTypeGcPlanRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_plan_store_gc_for_retention( @@ -11030,7 +11293,7 @@ open func planStoreGcForRetention(retention: NamedRootRetentionRecord)throws -> ) }) } - + open func prefix(tree: TreeRecord, prefix: Data)throws -> [EntryRecord] { return try FfiConverterSequenceTypeEntryRecord.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_prefix( @@ -11040,7 +11303,7 @@ open func prefix(tree: TreeRecord, prefix: Data)throws -> [EntryRecord] { ) }) } - + open func prefixPage(tree: TreeRecord, prefix: Data, cursor: RangeCursorRecord?, limit: UInt64)throws -> RangePageRecord { return try FfiConverterTypeRangePageRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_prefix_page( @@ -11052,7 +11315,7 @@ open func prefixPage(tree: TreeRecord, prefix: Data, cursor: RangeCursorRecord?, ) }) } - + open func prefixReversePage(tree: TreeRecord, prefix: Data, cursor: ReverseCursorRecord?, limit: UInt64)throws -> ReversePageRecord { return try FfiConverterTypeReversePageRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_prefix_reverse_page( @@ -11064,7 +11327,7 @@ open func prefixReversePage(tree: TreeRecord, prefix: Data, cursor: ReverseCurso ) }) } - + open func proveDiffPage(base: TreeRecord, other: TreeRecord, cursor: RangeCursorRecord?, rangeEnd: Data?, limit: UInt64)throws -> ProvedDiffPageRecord { return try FfiConverterTypeProvedDiffPageRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_prove_diff_page( @@ -11077,7 +11340,7 @@ open func proveDiffPage(base: TreeRecord, other: TreeRecord, cursor: RangeCursor ) }) } - + open func proveKey(tree: TreeRecord, key: Data)throws -> KeyProofRecord { return try FfiConverterTypeKeyProofRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_prove_key( @@ -11087,7 +11350,7 @@ open func proveKey(tree: TreeRecord, key: Data)throws -> KeyProofRecord { ) }) } - + open func proveKeys(tree: TreeRecord, keys: [Data])throws -> MultiKeyProofRecord { return try FfiConverterTypeMultiKeyProofRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_prove_keys( @@ -11097,7 +11360,7 @@ open func proveKeys(tree: TreeRecord, keys: [Data])throws -> MultiKeyProofRecor ) }) } - + open func provePrefix(tree: TreeRecord, prefix: Data)throws -> RangeProofRecord { return try FfiConverterTypeRangeProofRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_prove_prefix( @@ -11107,7 +11370,7 @@ open func provePrefix(tree: TreeRecord, prefix: Data)throws -> RangeProofRecord ) }) } - + open func proveRange(tree: TreeRecord, start: Data, rangeEnd: Data?)throws -> RangeProofRecord { return try FfiConverterTypeRangeProofRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_prove_range( @@ -11118,7 +11381,7 @@ open func proveRange(tree: TreeRecord, start: Data, rangeEnd: Data?)throws -> R ) }) } - + open func proveRangePage(tree: TreeRecord, cursor: RangeCursorRecord?, rangeEnd: Data?, limit: UInt64)throws -> ProvedRangePageRecord { return try FfiConverterTypeProvedRangePageRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_prove_range_page( @@ -11130,7 +11393,7 @@ open func proveRangePage(tree: TreeRecord, cursor: RangeCursorRecord?, rangeEnd: ) }) } - + /** * Create an engine-bound, reusable proximity search runtime. Reusing this * object across searches preserves validated content-cache entries and @@ -11144,7 +11407,7 @@ open func proximitySearchRuntime(policy: ProximitySearchRuntimePolicyRecord)thro ) }) } - + open func publishChangedSpansHint(base: TreeRecord, changed: TreeRecord, spans: [ChangedSpanRecord])throws -> Bool { return try FfiConverterBool.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_publish_changed_spans_hint( @@ -11155,7 +11418,7 @@ open func publishChangedSpansHint(base: TreeRecord, changed: TreeRecord, spans: ) }) } - + open func publishNamedRoot(name: Data, tree: TreeRecord)throws {try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_publish_named_root( self.uniffiCloneHandle(), @@ -11164,7 +11427,7 @@ open func publishNamedRoot(name: Data, tree: TreeRecord)throws {try rustCallWi ) } } - + open func publishNamedRootAtMillis(name: Data, tree: TreeRecord, timestampMillis: UInt64)throws {try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_publish_named_root_at_millis( self.uniffiCloneHandle(), @@ -11174,7 +11437,7 @@ open func publishNamedRootAtMillis(name: Data, tree: TreeRecord, timestampMillis ) } } - + open func publishPrefixPathHint(tree: TreeRecord, prefix: Data)throws -> Bool { return try FfiConverterBool.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_publish_prefix_path_hint( @@ -11184,7 +11447,7 @@ open func publishPrefixPathHint(tree: TreeRecord, prefix: Data)throws -> Bool ) }) } - + open func publishSnapshot(namespace: SnapshotNamespaceRecord, id: Data, tree: TreeRecord)throws {try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_publish_snapshot( self.uniffiCloneHandle(), @@ -11194,7 +11457,7 @@ open func publishSnapshot(namespace: SnapshotNamespaceRecord, id: Data, tree: Tr ) } } - + open func publishSnapshotAtMillis(namespace: SnapshotNamespaceRecord, id: Data, tree: TreeRecord, timestampMillis: UInt64)throws {try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_publish_snapshot_at_millis( self.uniffiCloneHandle(), @@ -11205,7 +11468,7 @@ open func publishSnapshotAtMillis(namespace: SnapshotNamespaceRecord, id: Data, ) } } - + open func put(tree: TreeRecord, key: Data, value: Data)throws -> TreeRecord { return try FfiConverterTypeTreeRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_put( @@ -11216,7 +11479,7 @@ open func put(tree: TreeRecord, key: Data, value: Data)throws -> TreeRecord { ) }) } - + open func putLargeValue(blobStore: ProllyBlobStore, tree: TreeRecord, key: Data, value: Data, config: LargeValueConfigRecord)throws -> TreeRecord { return try FfiConverterTypeTreeRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_put_large_value( @@ -11229,7 +11492,7 @@ open func putLargeValue(blobStore: ProllyBlobStore, tree: TreeRecord, key: Data, ) }) } - + open func range(tree: TreeRecord, start: Data, rangeEnd: Data?)throws -> [EntryRecord] { return try FfiConverterSequenceTypeEntryRecord.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_range( @@ -11240,7 +11503,7 @@ open func range(tree: TreeRecord, start: Data, rangeEnd: Data?)throws -> [Entry ) }) } - + open func rangeAfter(tree: TreeRecord, afterKey: Data, rangeEnd: Data?)throws -> [EntryRecord] { return try FfiConverterSequenceTypeEntryRecord.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_range_after( @@ -11251,7 +11514,7 @@ open func rangeAfter(tree: TreeRecord, afterKey: Data, rangeEnd: Data?)throws - ) }) } - + open func rangeDiff(base: TreeRecord, other: TreeRecord, start: Data, rangeEnd: Data?)throws -> [DiffRecord] { return try FfiConverterSequenceTypeDiffRecord.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_range_diff( @@ -11263,7 +11526,7 @@ open func rangeDiff(base: TreeRecord, other: TreeRecord, start: Data, rangeEnd: ) }) } - + open func rangeFromCursor(tree: TreeRecord, cursor: RangeCursorRecord?, rangeEnd: Data?)throws -> [EntryRecord] { return try FfiConverterSequenceTypeEntryRecord.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_range_from_cursor( @@ -11274,7 +11537,7 @@ open func rangeFromCursor(tree: TreeRecord, cursor: RangeCursorRecord?, rangeEnd ) }) } - + open func rangePage(tree: TreeRecord, cursor: RangeCursorRecord?, rangeEnd: Data?, limit: UInt64)throws -> RangePageRecord { return try FfiConverterTypeRangePageRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_range_page( @@ -11286,7 +11549,7 @@ open func rangePage(tree: TreeRecord, cursor: RangeCursorRecord?, rangeEnd: Data ) }) } - + /** * Bind one immutable tree to a reusable read object. Foreign callers that * issue repeated reads should prefer this over retransmitting `TreeRecord` @@ -11300,14 +11563,14 @@ open func readSession(tree: TreeRecord)throws -> ProllyReadSession { ) }) } - + open func resetMetrics() {try! rustCall() { uniffi_prolly_bindings_fn_method_prollyengine_reset_metrics( self.uniffiCloneHandle(),$0 ) } } - + open func reversePage(tree: TreeRecord, cursor: ReverseCursorRecord?, start: Data, limit: UInt64)throws -> ReversePageRecord { return try FfiConverterTypeReversePageRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_reverse_page( @@ -11319,7 +11582,7 @@ open func reversePage(tree: TreeRecord, cursor: ReverseCursorRecord?, start: Dat ) }) } - + /** * Stream genuine three-way conflicts without allocating a complete list. */ @@ -11334,7 +11597,7 @@ open func scanConflicts(base: TreeRecord, left: TreeRecord, right: TreeRecord, v ) }) } - + /** * Stream structural differences without first allocating a complete list. */ @@ -11348,7 +11611,7 @@ open func scanDiff(base: TreeRecord, other: TreeRecord, visitor: DiffVisitorCall ) }) } - + /** * Stream all entries with `prefix` through the borrowed Rust traversal. */ @@ -11362,7 +11625,7 @@ open func scanPrefix(tree: TreeRecord, prefix: Data, visitor: EntryVisitorCallba ) }) } - + /** * Stream a prefix in descending key order. */ @@ -11376,7 +11639,7 @@ open func scanPrefixReverse(tree: TreeRecord, prefix: Data, visitor: EntryVisito ) }) } - + /** * Stream a half-open range through the borrowed Rust traversal. */ @@ -11391,7 +11654,7 @@ open func scanRange(tree: TreeRecord, start: Data, rangeEnd: Data?, visitor: Ent ) }) } - + /** * Stream structural differences whose keys fall in `[start, end)`. */ @@ -11407,7 +11670,7 @@ open func scanRangeDiff(base: TreeRecord, other: TreeRecord, start: Data, rangeE ) }) } - + /** * Stream a half-open range in descending key order. */ @@ -11422,7 +11685,7 @@ open func scanRangeReverse(tree: TreeRecord, start: Data, rangeEnd: Data?, visit ) }) } - + open func statsDiff(before: TreeRecord, after: TreeRecord)throws -> StatsComparisonRecord { return try FfiConverterTypeStatsComparisonRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_stats_diff( @@ -11432,7 +11695,7 @@ open func statsDiff(before: TreeRecord, after: TreeRecord)throws -> StatsCompar ) }) } - + open func statsDiffJson(before: TreeRecord, after: TreeRecord)throws -> JsonDocumentRecord { return try FfiConverterTypeJsonDocumentRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_stats_diff_json( @@ -11442,7 +11705,7 @@ open func statsDiffJson(before: TreeRecord, after: TreeRecord)throws -> JsonDoc ) }) } - + open func structuralDiffPage(base: TreeRecord, other: TreeRecord, cursorJson: String?, limit: UInt64)throws -> StructuralDiffPageRecord { return try FfiConverterTypeStructuralDiffPageRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_structural_diff_page( @@ -11454,7 +11717,7 @@ open func structuralDiffPage(base: TreeRecord, other: TreeRecord, cursorJson: St ) }) } - + open func structuralDiffPageWithCursor(base: TreeRecord, other: TreeRecord, cursor: StructuralDiffCursorRecord?, limit: UInt64)throws -> StructuralDiffPageRecord { return try FfiConverterTypeStructuralDiffPageRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_structural_diff_page_with_cursor( @@ -11466,7 +11729,7 @@ open func structuralDiffPageWithCursor(base: TreeRecord, other: TreeRecord, curs ) }) } - + open func sweepBlobGc(blobStore: ProllyBlobStore, roots: [TreeRecord], candidateBlobs: [BlobRefRecord])throws -> BlobGcSweepRecord { return try FfiConverterTypeBlobGcSweepRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_sweep_blob_gc( @@ -11477,7 +11740,7 @@ open func sweepBlobGc(blobStore: ProllyBlobStore, roots: [TreeRecord], candidate ) }) } - + open func sweepBlobStoreGc(blobStore: ProllyBlobStore, roots: [TreeRecord])throws -> BlobGcSweepRecord { return try FfiConverterTypeBlobGcSweepRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_sweep_blob_store_gc( @@ -11487,7 +11750,7 @@ open func sweepBlobStoreGc(blobStore: ProllyBlobStore, roots: [TreeRecord])throw ) }) } - + open func sweepGc(roots: [TreeRecord], candidateCids: [Data])throws -> GcSweepRecord { return try FfiConverterTypeGcSweepRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_sweep_gc( @@ -11497,7 +11760,7 @@ open func sweepGc(roots: [TreeRecord], candidateCids: [Data])throws -> GcSweepR ) }) } - + open func sweepStoreGc(roots: [TreeRecord])throws -> GcSweepRecord { return try FfiConverterTypeGcSweepRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_sweep_store_gc( @@ -11506,7 +11769,7 @@ open func sweepStoreGc(roots: [TreeRecord])throws -> GcSweepRecord { ) }) } - + open func sweepStoreGcForRetention(retention: NamedRootRetentionRecord)throws -> GcSweepRecord { return try FfiConverterTypeGcSweepRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_sweep_store_gc_for_retention( @@ -11515,7 +11778,7 @@ open func sweepStoreGcForRetention(retention: NamedRootRetentionRecord)throws - ) }) } - + open func unpinAllCacheNodes()throws -> UInt64 { return try FfiConverterUInt64.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_unpin_all_cache_nodes( @@ -11523,7 +11786,7 @@ open func unpinAllCacheNodes()throws -> UInt64 { ) }) } - + open func upperBound(tree: TreeRecord, key: Data)throws -> EntryRecord? { return try FfiConverterOptionTypeEntryRecord.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollyengine_upper_bound( @@ -11533,7 +11796,7 @@ open func upperBound(tree: TreeRecord, key: Data)throws -> EntryRecord? { ) }) } - + /** * Open an application-facing managed map. The returned object shares the * underlying engine and may outlive this particular foreign handle. @@ -11546,9 +11809,9 @@ open func versionedMap(id: Data)throws -> BindingVersionedMap { ) }) } - - + + } @@ -11602,40 +11865,40 @@ public func FfiConverterTypeProllyEngine_lower(_ value: ProllyEngine) -> UInt64 * repeated foreign-language reads. */ public protocol ProllyReadSessionProtocol: AnyObject, Sendable { - + /** * Internal opaque transport handle used by handwritten native adapters. * The handle resolves only while this UniFFI object is alive. */ func fastHandle() -> UInt64 - + /** * Return an owned value while reusing the decoded tree bound to this * session. This is the portable UniFFI session API. */ func get(key: Data) throws -> Data? - + /** * Batch point reads while serializing the key set and result only once. */ func getMany(keys: [Data]) throws -> [Data?] - + /** * Stream genuine three-way conflicts. The receiver is the merge base. */ func scanConflicts(left: ProllyReadSession, right: ProllyReadSession, visitor: ConflictVisitorCallback) throws -> ScanOutcomeRecord - + /** * Stream a half-open range without retransmitting the tree on every * operation. Callback records remain owned for compatibility. */ func scanRange(start: Data, rangeEnd: Data?, visitor: EntryVisitorCallback) throws -> ScanOutcomeRecord - + /** * Stream structural differences against another root-bound session. */ func scanRangeDiff(other: ProllyReadSession, start: Data, rangeEnd: Data?, visitor: DiffVisitorCallback) throws -> ScanOutcomeRecord - + } /** * A root-bound read object that amortizes tree decoding and ownership across @@ -11691,9 +11954,9 @@ open class ProllyReadSession: ProllyReadSessionProtocol, @unchecked Sendable { try! rustCall { uniffi_prolly_bindings_fn_free_prollyreadsession(handle, $0) } } - - + + /** * Internal opaque transport handle used by handwritten native adapters. * The handle resolves only while this UniFFI object is alive. @@ -11705,7 +11968,7 @@ open func fastHandle() -> UInt64 { ) }) } - + /** * Return an owned value while reusing the decoded tree bound to this * session. This is the portable UniFFI session API. @@ -11718,7 +11981,7 @@ open func get(key: Data)throws -> Data? { ) }) } - + /** * Batch point reads while serializing the key set and result only once. */ @@ -11730,7 +11993,7 @@ open func getMany(keys: [Data])throws -> [Data?] { ) }) } - + /** * Stream genuine three-way conflicts. The receiver is the merge base. */ @@ -11744,7 +12007,7 @@ open func scanConflicts(left: ProllyReadSession, right: ProllyReadSession, visit ) }) } - + /** * Stream a half-open range without retransmitting the tree on every * operation. Callback records remain owned for compatibility. @@ -11759,7 +12022,7 @@ open func scanRange(start: Data, rangeEnd: Data?, visitor: EntryVisitorCallback) ) }) } - + /** * Stream structural differences against another root-bound session. */ @@ -11774,9 +12037,9 @@ open func scanRangeDiff(other: ProllyReadSession, start: Data, rangeEnd: Data?, ) }) } - - + + } @@ -11826,29 +12089,29 @@ public func FfiConverterTypeProllyReadSession_lower(_ value: ProllyReadSession) public protocol ProllyTransactionProtocol: AnyObject, Sendable { - + func batch(tree: TreeRecord, mutations: [MutationRecord]) throws -> TreeRecord - + func commit() throws -> TransactionUpdateRecord - + func compareAndSwapNamedRoot(name: Data, expected: TreeRecord?, replacement: TreeRecord?) throws -> NamedRootUpdateRecord - + func create() throws -> TreeRecord - + func delete(tree: TreeRecord, key: Data) throws -> TreeRecord - - func deleteNamedRoot(name: Data) throws - + + func deleteNamedRoot(name: Data) throws + func get(tree: TreeRecord, key: Data) throws -> Data? - + func loadNamedRoot(name: Data) throws -> TreeRecord? - - func publishNamedRoot(name: Data, tree: TreeRecord) throws - + + func publishNamedRoot(name: Data, tree: TreeRecord) throws + func put(tree: TreeRecord, key: Data, value: Data) throws -> TreeRecord - - func rollback() throws - + + func rollback() throws + } open class ProllyTransaction: ProllyTransactionProtocol, @unchecked Sendable { fileprivate let handle: UInt64 @@ -11900,9 +12163,9 @@ open class ProllyTransaction: ProllyTransactionProtocol, @unchecked Sendable { try! rustCall { uniffi_prolly_bindings_fn_free_prollytransaction(handle, $0) } } - - + + open func batch(tree: TreeRecord, mutations: [MutationRecord])throws -> TreeRecord { return try FfiConverterTypeTreeRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollytransaction_batch( @@ -11912,7 +12175,7 @@ open func batch(tree: TreeRecord, mutations: [MutationRecord])throws -> TreeRec ) }) } - + open func commit()throws -> TransactionUpdateRecord { return try FfiConverterTypeTransactionUpdateRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollytransaction_commit( @@ -11920,7 +12183,7 @@ open func commit()throws -> TransactionUpdateRecord { ) }) } - + open func compareAndSwapNamedRoot(name: Data, expected: TreeRecord?, replacement: TreeRecord?)throws -> NamedRootUpdateRecord { return try FfiConverterTypeNamedRootUpdateRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollytransaction_compare_and_swap_named_root( @@ -11931,7 +12194,7 @@ open func compareAndSwapNamedRoot(name: Data, expected: TreeRecord?, replacement ) }) } - + open func create()throws -> TreeRecord { return try FfiConverterTypeTreeRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollytransaction_create( @@ -11939,7 +12202,7 @@ open func create()throws -> TreeRecord { ) }) } - + open func delete(tree: TreeRecord, key: Data)throws -> TreeRecord { return try FfiConverterTypeTreeRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollytransaction_delete( @@ -11949,7 +12212,7 @@ open func delete(tree: TreeRecord, key: Data)throws -> TreeRecord { ) }) } - + open func deleteNamedRoot(name: Data)throws {try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollytransaction_delete_named_root( self.uniffiCloneHandle(), @@ -11957,7 +12220,7 @@ open func deleteNamedRoot(name: Data)throws {try rustCallWithError(FfiConverte ) } } - + open func get(tree: TreeRecord, key: Data)throws -> Data? { return try FfiConverterOptionData.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollytransaction_get( @@ -11967,7 +12230,7 @@ open func get(tree: TreeRecord, key: Data)throws -> Data? { ) }) } - + open func loadNamedRoot(name: Data)throws -> TreeRecord? { return try FfiConverterOptionTypeTreeRecord.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollytransaction_load_named_root( @@ -11976,7 +12239,7 @@ open func loadNamedRoot(name: Data)throws -> TreeRecord? { ) }) } - + open func publishNamedRoot(name: Data, tree: TreeRecord)throws {try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollytransaction_publish_named_root( self.uniffiCloneHandle(), @@ -11985,7 +12248,7 @@ open func publishNamedRoot(name: Data, tree: TreeRecord)throws {try rustCallWi ) } } - + open func put(tree: TreeRecord, key: Data, value: Data)throws -> TreeRecord { return try FfiConverterTypeTreeRecord_lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollytransaction_put( @@ -11996,16 +12259,16 @@ open func put(tree: TreeRecord, key: Data, value: Data)throws -> TreeRecord { ) }) } - + open func rollback()throws {try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { uniffi_prolly_bindings_fn_method_prollytransaction_rollback( self.uniffiCloneHandle(),$0 ) } } - - + + } @@ -12014,22 +12277,209 @@ open func rollback()throws {try rustCallWithError(FfiConverterTypeProllyBindin #endif public struct FfiConverterTypeProllyTransaction: FfiConverter { typealias FfiType = UInt64 - typealias SwiftType = ProllyTransaction + typealias SwiftType = ProllyTransaction + + public static func lift(_ handle: UInt64) throws -> ProllyTransaction { + return ProllyTransaction(unsafeFromHandle: handle) + } + + public static func lower(_ value: ProllyTransaction) -> UInt64 { + return value.uniffiCloneHandle() + } + + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ProllyTransaction { + let handle: UInt64 = try readInt(&buf) + return try lift(handle) + } + + public static func write(_ value: ProllyTransaction, into buf: inout [UInt8]) { + writeInt(&buf, lower(value)) + } +} + + +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +public func FfiConverterTypeProllyTransaction_lift(_ handle: UInt64) throws -> ProllyTransaction { + return try FfiConverterTypeProllyTransaction.lift(handle) +} + +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +public func FfiConverterTypeProllyTransaction_lower(_ value: ProllyTransaction) -> UInt64 { + return FfiConverterTypeProllyTransaction.lower(value) +} + + + + + + +public protocol ProximityRecordVisitorCallback: AnyObject, Sendable { + + func visit(record: ProximityRecordRecord) -> Bool + +} +open class ProximityRecordVisitorCallbackImpl: ProximityRecordVisitorCallback, @unchecked Sendable { + fileprivate let handle: UInt64 + + /// Used to instantiate a [FFIObject] without an actual handle, for fakes in tests, mostly. +#if swift(>=5.8) + @_documentation(visibility: private) +#endif + public struct NoHandle { + public init() {} + } + + // TODO: We'd like this to be `private` but for Swifty reasons, + // we can't implement `FfiConverter` without making this `required` and we can't + // make it `required` without making it `public`. +#if swift(>=5.8) + @_documentation(visibility: private) +#endif + required public init(unsafeFromHandle handle: UInt64) { + self.handle = handle + } + + // This constructor can be used to instantiate a fake object. + // - Parameter noHandle: Placeholder value so we can have a constructor separate from the default empty one that may be implemented for classes extending [FFIObject]. + // + // - Warning: + // Any object instantiated with this constructor cannot be passed to an actual Rust-backed object. Since there isn't a backing handle the FFI lower functions will crash. +#if swift(>=5.8) + @_documentation(visibility: private) +#endif + public init(noHandle: NoHandle) { + self.handle = 0 + } + +#if swift(>=5.8) + @_documentation(visibility: private) +#endif + public func uniffiCloneHandle() -> UInt64 { + return try! rustCall { uniffi_prolly_bindings_fn_clone_proximityrecordvisitorcallback(self.handle, $0) } + } + // No primary constructor declared for this class. + + deinit { + if handle == 0 { + // Mock objects have handle=0 don't try to free them + return + } + + try! rustCall { uniffi_prolly_bindings_fn_free_proximityrecordvisitorcallback(handle, $0) } + } + + + + +open func visit(record: ProximityRecordRecord) -> Bool { + return try! FfiConverterBool.lift(try! rustCall() { + uniffi_prolly_bindings_fn_method_proximityrecordvisitorcallback_visit( + self.uniffiCloneHandle(), + FfiConverterTypeProximityRecordRecord_lower(record),$0 + ) +}) +} + + + +} + + + +// Put the implementation in a struct so we don't pollute the top-level namespace +fileprivate struct UniffiCallbackInterfaceProximityRecordVisitorCallback { + + // Create the VTable using a series of closures. + // Swift automatically converts these into C callback functions. + // + // This creates 1-element array, since this seems to be the only way to construct a const + // pointer that we can pass to the Rust code. + static let vtable: [UniffiVTableCallbackInterfaceProximityRecordVisitorCallback] = [UniffiVTableCallbackInterfaceProximityRecordVisitorCallback( + uniffiFree: { (uniffiHandle: UInt64) -> () in + do { + try FfiConverterTypeProximityRecordVisitorCallback.handleMap.remove(handle: uniffiHandle) + } catch { + print("Uniffi callback interface ProximityRecordVisitorCallback: handle missing in uniffiFree") + } + }, + uniffiClone: { (uniffiHandle: UInt64) -> UInt64 in + do { + return try FfiConverterTypeProximityRecordVisitorCallback.handleMap.clone(handle: uniffiHandle) + } catch { + fatalError("Uniffi callback interface ProximityRecordVisitorCallback: handle missing in uniffiClone") + } + }, + visit: { ( + uniffiHandle: UInt64, + record: RustBuffer, + uniffiOutReturn: UnsafeMutablePointer, + uniffiCallStatus: UnsafeMutablePointer + ) in + let makeCall = { + () throws -> Bool in + guard let uniffiObj = try? FfiConverterTypeProximityRecordVisitorCallback.handleMap.get(handle: uniffiHandle) else { + throw UniffiInternalError.unexpectedStaleHandle + } + return uniffiObj.visit( + record: try FfiConverterTypeProximityRecordRecord_lift(record) + ) + } + + + let writeReturn = { uniffiOutReturn.pointee = FfiConverterBool.lower($0) } + uniffiTraitInterfaceCall( + callStatus: uniffiCallStatus, + makeCall: makeCall, + writeReturn: writeReturn + ) + } + )] +} + +private func uniffiCallbackInitProximityRecordVisitorCallback() { + uniffi_prolly_bindings_fn_init_callback_vtable_proximityrecordvisitorcallback(UniffiCallbackInterfaceProximityRecordVisitorCallback.vtable) +} + +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +public struct FfiConverterTypeProximityRecordVisitorCallback: FfiConverter { + fileprivate static let handleMap = UniffiHandleMap() + + typealias FfiType = UInt64 + typealias SwiftType = ProximityRecordVisitorCallback - public static func lift(_ handle: UInt64) throws -> ProllyTransaction { - return ProllyTransaction(unsafeFromHandle: handle) + public static func lift(_ handle: UInt64) throws -> ProximityRecordVisitorCallback { + if ((handle & 1) == 0) { + // Rust-generated handle, construct a new class that uses the handle to implement the + // interface + return ProximityRecordVisitorCallbackImpl(unsafeFromHandle: handle) + } else { + // Swift-generated handle, get the object from the handle map + return try handleMap.remove(handle: handle) + } } - public static func lower(_ value: ProllyTransaction) -> UInt64 { - return value.uniffiCloneHandle() + public static func lower(_ value: ProximityRecordVisitorCallback) -> UInt64 { + if let rustImpl = value as? ProximityRecordVisitorCallbackImpl { + // Rust-implemented object. Clone the handle and return it + return rustImpl.uniffiCloneHandle() + } else { + // Swift object, generate a new vtable handle and return that. + return handleMap.insert(obj: value) + } } - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ProllyTransaction { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ProximityRecordVisitorCallback { let handle: UInt64 = try readInt(&buf) return try lift(handle) } - public static func write(_ value: ProllyTransaction, into buf: inout [UInt8]) { + public static func write(_ value: ProximityRecordVisitorCallback, into buf: inout [UInt8]) { writeInt(&buf, lower(value)) } } @@ -12038,15 +12488,15 @@ public struct FfiConverterTypeProllyTransaction: FfiConverter { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeProllyTransaction_lift(_ handle: UInt64) throws -> ProllyTransaction { - return try FfiConverterTypeProllyTransaction.lift(handle) +public func FfiConverterTypeProximityRecordVisitorCallback_lift(_ handle: UInt64) throws -> ProximityRecordVisitorCallback { + return try FfiConverterTypeProximityRecordVisitorCallback.lift(handle) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeProllyTransaction_lower(_ value: ProllyTransaction) -> UInt64 { - return FfiConverterTypeProllyTransaction.lower(value) +public func FfiConverterTypeProximityRecordVisitorCallback_lower(_ value: ProximityRecordVisitorCallback) -> UInt64 { + return FfiConverterTypeProximityRecordVisitorCallback.lower(value) } @@ -12054,12 +12504,12 @@ public func FfiConverterTypeProllyTransaction_lower(_ value: ProllyTransaction) -public protocol ProximityRecordVisitorCallback: AnyObject, Sendable { - - func visit(record: ProximityRecordRecord) -> Bool - +public protocol SecondaryIndexExtractorCallback: AnyObject, Sendable { + + func extract(primaryKey: Data, sourceValue: Data) throws -> [IndexEntryRecord] + } -open class ProximityRecordVisitorCallbackImpl: ProximityRecordVisitorCallback, @unchecked Sendable { +open class SecondaryIndexExtractorCallbackImpl: SecondaryIndexExtractorCallback, @unchecked Sendable { fileprivate let handle: UInt64 /// Used to instantiate a [FFIObject] without an actual handle, for fakes in tests, mostly. @@ -12096,7 +12546,7 @@ open class ProximityRecordVisitorCallbackImpl: ProximityRecordVisitorCallback, @ @_documentation(visibility: private) #endif public func uniffiCloneHandle() -> UInt64 { - return try! rustCall { uniffi_prolly_bindings_fn_clone_proximityrecordvisitorcallback(self.handle, $0) } + return try! rustCall { uniffi_prolly_bindings_fn_clone_secondaryindexextractorcallback(self.handle, $0) } } // No primary constructor declared for this class. @@ -12106,118 +12556,310 @@ open class ProximityRecordVisitorCallbackImpl: ProximityRecordVisitorCallback, @ return } - try! rustCall { uniffi_prolly_bindings_fn_free_proximityrecordvisitorcallback(handle, $0) } + try! rustCall { uniffi_prolly_bindings_fn_free_secondaryindexextractorcallback(handle, $0) } } - - -open func visit(record: ProximityRecordRecord) -> Bool { - return try! FfiConverterBool.lift(try! rustCall() { - uniffi_prolly_bindings_fn_method_proximityrecordvisitorcallback_visit( + + +open func extract(primaryKey: Data, sourceValue: Data)throws -> [IndexEntryRecord] { + return try FfiConverterSequenceTypeIndexEntryRecord.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { + uniffi_prolly_bindings_fn_method_secondaryindexextractorcallback_extract( self.uniffiCloneHandle(), - FfiConverterTypeProximityRecordRecord_lower(record),$0 + FfiConverterData.lower(primaryKey), + FfiConverterData.lower(sourceValue),$0 ) }) } - - + + } // Put the implementation in a struct so we don't pollute the top-level namespace -fileprivate struct UniffiCallbackInterfaceProximityRecordVisitorCallback { +fileprivate struct UniffiCallbackInterfaceSecondaryIndexExtractorCallback { // Create the VTable using a series of closures. // Swift automatically converts these into C callback functions. // // This creates 1-element array, since this seems to be the only way to construct a const // pointer that we can pass to the Rust code. - static let vtable: [UniffiVTableCallbackInterfaceProximityRecordVisitorCallback] = [UniffiVTableCallbackInterfaceProximityRecordVisitorCallback( + static let vtable: [UniffiVTableCallbackInterfaceSecondaryIndexExtractorCallback] = [UniffiVTableCallbackInterfaceSecondaryIndexExtractorCallback( uniffiFree: { (uniffiHandle: UInt64) -> () in do { - try FfiConverterTypeProximityRecordVisitorCallback.handleMap.remove(handle: uniffiHandle) + try FfiConverterTypeSecondaryIndexExtractorCallback.handleMap.remove(handle: uniffiHandle) } catch { - print("Uniffi callback interface ProximityRecordVisitorCallback: handle missing in uniffiFree") + print("Uniffi callback interface SecondaryIndexExtractorCallback: handle missing in uniffiFree") } }, uniffiClone: { (uniffiHandle: UInt64) -> UInt64 in do { - return try FfiConverterTypeProximityRecordVisitorCallback.handleMap.clone(handle: uniffiHandle) + return try FfiConverterTypeSecondaryIndexExtractorCallback.handleMap.clone(handle: uniffiHandle) } catch { - fatalError("Uniffi callback interface ProximityRecordVisitorCallback: handle missing in uniffiClone") + fatalError("Uniffi callback interface SecondaryIndexExtractorCallback: handle missing in uniffiClone") } }, - visit: { ( + extract: { ( uniffiHandle: UInt64, - record: RustBuffer, - uniffiOutReturn: UnsafeMutablePointer, + primaryKey: RustBuffer, + sourceValue: RustBuffer, + uniffiOutReturn: UnsafeMutablePointer, uniffiCallStatus: UnsafeMutablePointer ) in let makeCall = { - () throws -> Bool in - guard let uniffiObj = try? FfiConverterTypeProximityRecordVisitorCallback.handleMap.get(handle: uniffiHandle) else { + () throws -> [IndexEntryRecord] in + guard let uniffiObj = try? FfiConverterTypeSecondaryIndexExtractorCallback.handleMap.get(handle: uniffiHandle) else { throw UniffiInternalError.unexpectedStaleHandle } - return uniffiObj.visit( - record: try FfiConverterTypeProximityRecordRecord_lift(record) + return try uniffiObj.extract( + primaryKey: try FfiConverterData.lift(primaryKey), + sourceValue: try FfiConverterData.lift(sourceValue) ) } - - let writeReturn = { uniffiOutReturn.pointee = FfiConverterBool.lower($0) } - uniffiTraitInterfaceCall( + + let writeReturn = { uniffiOutReturn.pointee = FfiConverterSequenceTypeIndexEntryRecord.lower($0) } + uniffiTraitInterfaceCallWithError( callStatus: uniffiCallStatus, makeCall: makeCall, - writeReturn: writeReturn + writeReturn: writeReturn, + lowerError: FfiConverterTypeProllyBindingError_lower ) } )] } -private func uniffiCallbackInitProximityRecordVisitorCallback() { - uniffi_prolly_bindings_fn_init_callback_vtable_proximityrecordvisitorcallback(UniffiCallbackInterfaceProximityRecordVisitorCallback.vtable) +private func uniffiCallbackInitSecondaryIndexExtractorCallback() { + uniffi_prolly_bindings_fn_init_callback_vtable_secondaryindexextractorcallback(UniffiCallbackInterfaceSecondaryIndexExtractorCallback.vtable) +} + +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +public struct FfiConverterTypeSecondaryIndexExtractorCallback: FfiConverter { + fileprivate static let handleMap = UniffiHandleMap() + + typealias FfiType = UInt64 + typealias SwiftType = SecondaryIndexExtractorCallback + + public static func lift(_ handle: UInt64) throws -> SecondaryIndexExtractorCallback { + if ((handle & 1) == 0) { + // Rust-generated handle, construct a new class that uses the handle to implement the + // interface + return SecondaryIndexExtractorCallbackImpl(unsafeFromHandle: handle) + } else { + // Swift-generated handle, get the object from the handle map + return try handleMap.remove(handle: handle) + } + } + + public static func lower(_ value: SecondaryIndexExtractorCallback) -> UInt64 { + if let rustImpl = value as? SecondaryIndexExtractorCallbackImpl { + // Rust-implemented object. Clone the handle and return it + return rustImpl.uniffiCloneHandle() + } else { + // Swift object, generate a new vtable handle and return that. + return handleMap.insert(obj: value) + } + } + + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> SecondaryIndexExtractorCallback { + let handle: UInt64 = try readInt(&buf) + return try lift(handle) + } + + public static func write(_ value: SecondaryIndexExtractorCallback, into buf: inout [UInt8]) { + writeInt(&buf, lower(value)) + } +} + + +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +public func FfiConverterTypeSecondaryIndexExtractorCallback_lift(_ handle: UInt64) throws -> SecondaryIndexExtractorCallback { + return try FfiConverterTypeSecondaryIndexExtractorCallback.lift(handle) +} + +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +public func FfiConverterTypeSecondaryIndexExtractorCallback_lower(_ value: SecondaryIndexExtractorCallback) -> UInt64 { + return FfiConverterTypeSecondaryIndexExtractorCallback.lower(value) +} + + + + +public struct AcceleratorCatalogEntryRecord: Equatable, Hashable { + public var kind: CatalogAcceleratorKindRecord + public var configurationFingerprint: Data + public var manifest: Data + + // Default memberwise initializers are never public by default, so we + // declare one manually. + public init(kind: CatalogAcceleratorKindRecord, configurationFingerprint: Data, manifest: Data) { + self.kind = kind + self.configurationFingerprint = configurationFingerprint + self.manifest = manifest + } + + + + +} + +#if compiler(>=6) +extension AcceleratorCatalogEntryRecord: Sendable {} +#endif + +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +public struct FfiConverterTypeAcceleratorCatalogEntryRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> AcceleratorCatalogEntryRecord { + return + try AcceleratorCatalogEntryRecord( + kind: FfiConverterTypeCatalogAcceleratorKindRecord.read(from: &buf), + configurationFingerprint: FfiConverterData.read(from: &buf), + manifest: FfiConverterData.read(from: &buf) + ) + } + + public static func write(_ value: AcceleratorCatalogEntryRecord, into buf: inout [UInt8]) { + FfiConverterTypeCatalogAcceleratorKindRecord.write(value.kind, into: &buf) + FfiConverterData.write(value.configurationFingerprint, into: &buf) + FfiConverterData.write(value.manifest, into: &buf) + } +} + + +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +public func FfiConverterTypeAcceleratorCatalogEntryRecord_lift(_ buf: RustBuffer) throws -> AcceleratorCatalogEntryRecord { + return try FfiConverterTypeAcceleratorCatalogEntryRecord.lift(buf) +} + +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +public func FfiConverterTypeAcceleratorCatalogEntryRecord_lower(_ value: AcceleratorCatalogEntryRecord) -> RustBuffer { + return FfiConverterTypeAcceleratorCatalogEntryRecord.lower(value) +} + + +public struct ActiveIndexHealthRecord: Equatable, Hashable { + public var name: Data + public var generation: UInt64 + public var fingerprint: Data + public var projection: IndexProjectionRecord + public var indexVersion: Data + + // Default memberwise initializers are never public by default, so we + // declare one manually. + public init(name: Data, generation: UInt64, fingerprint: Data, projection: IndexProjectionRecord, indexVersion: Data) { + self.name = name + self.generation = generation + self.fingerprint = fingerprint + self.projection = projection + self.indexVersion = indexVersion + } + + + + +} + +#if compiler(>=6) +extension ActiveIndexHealthRecord: Sendable {} +#endif + +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +public struct FfiConverterTypeActiveIndexHealthRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ActiveIndexHealthRecord { + return + try ActiveIndexHealthRecord( + name: FfiConverterData.read(from: &buf), + generation: FfiConverterUInt64.read(from: &buf), + fingerprint: FfiConverterData.read(from: &buf), + projection: FfiConverterTypeIndexProjectionRecord.read(from: &buf), + indexVersion: FfiConverterData.read(from: &buf) + ) + } + + public static func write(_ value: ActiveIndexHealthRecord, into buf: inout [UInt8]) { + FfiConverterData.write(value.name, into: &buf) + FfiConverterUInt64.write(value.generation, into: &buf) + FfiConverterData.write(value.fingerprint, into: &buf) + FfiConverterTypeIndexProjectionRecord.write(value.projection, into: &buf) + FfiConverterData.write(value.indexVersion, into: &buf) + } +} + + +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +public func FfiConverterTypeActiveIndexHealthRecord_lift(_ buf: RustBuffer) throws -> ActiveIndexHealthRecord { + return try FfiConverterTypeActiveIndexHealthRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeProximityRecordVisitorCallback: FfiConverter { - fileprivate static let handleMap = UniffiHandleMap() +public func FfiConverterTypeActiveIndexHealthRecord_lower(_ value: ActiveIndexHealthRecord) -> RustBuffer { + return FfiConverterTypeActiveIndexHealthRecord.lower(value) +} - typealias FfiType = UInt64 - typealias SwiftType = ProximityRecordVisitorCallback - public static func lift(_ handle: UInt64) throws -> ProximityRecordVisitorCallback { - if ((handle & 1) == 0) { - // Rust-generated handle, construct a new class that uses the handle to implement the - // interface - return ProximityRecordVisitorCallbackImpl(unsafeFromHandle: handle) - } else { - // Swift-generated handle, get the object from the handle map - return try handleMap.remove(handle: handle) - } - } +public struct AuthenticatedProofBundleVerificationRecord: Equatable, Hashable { + public var valid: Bool + public var envelope: AuthenticatedProofEnvelopeVerificationRecord + public var proof: ProofBundleVerificationRecord? + public var proofError: String? - public static func lower(_ value: ProximityRecordVisitorCallback) -> UInt64 { - if let rustImpl = value as? ProximityRecordVisitorCallbackImpl { - // Rust-implemented object. Clone the handle and return it - return rustImpl.uniffiCloneHandle() - } else { - // Swift object, generate a new vtable handle and return that. - return handleMap.insert(obj: value) - } + // Default memberwise initializers are never public by default, so we + // declare one manually. + public init(valid: Bool, envelope: AuthenticatedProofEnvelopeVerificationRecord, proof: ProofBundleVerificationRecord?, proofError: String?) { + self.valid = valid + self.envelope = envelope + self.proof = proof + self.proofError = proofError } - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ProximityRecordVisitorCallback { - let handle: UInt64 = try readInt(&buf) - return try lift(handle) + + + +} + +#if compiler(>=6) +extension AuthenticatedProofBundleVerificationRecord: Sendable {} +#endif + +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +public struct FfiConverterTypeAuthenticatedProofBundleVerificationRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> AuthenticatedProofBundleVerificationRecord { + return + try AuthenticatedProofBundleVerificationRecord( + valid: FfiConverterBool.read(from: &buf), + envelope: FfiConverterTypeAuthenticatedProofEnvelopeVerificationRecord.read(from: &buf), + proof: FfiConverterOptionTypeProofBundleVerificationRecord.read(from: &buf), + proofError: FfiConverterOptionString.read(from: &buf) + ) } - public static func write(_ value: ProximityRecordVisitorCallback, into buf: inout [UInt8]) { - writeInt(&buf, lower(value)) + public static func write(_ value: AuthenticatedProofBundleVerificationRecord, into buf: inout [UInt8]) { + FfiConverterBool.write(value.valid, into: &buf) + FfiConverterTypeAuthenticatedProofEnvelopeVerificationRecord.write(value.envelope, into: &buf) + FfiConverterOptionTypeProofBundleVerificationRecord.write(value.proof, into: &buf) + FfiConverterOptionString.write(value.proofError, into: &buf) } } @@ -12225,190 +12867,225 @@ public struct FfiConverterTypeProximityRecordVisitorCallback: FfiConverter { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeProximityRecordVisitorCallback_lift(_ handle: UInt64) throws -> ProximityRecordVisitorCallback { - return try FfiConverterTypeProximityRecordVisitorCallback.lift(handle) +public func FfiConverterTypeAuthenticatedProofBundleVerificationRecord_lift(_ buf: RustBuffer) throws -> AuthenticatedProofBundleVerificationRecord { + return try FfiConverterTypeAuthenticatedProofBundleVerificationRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeProximityRecordVisitorCallback_lower(_ value: ProximityRecordVisitorCallback) -> UInt64 { - return FfiConverterTypeProximityRecordVisitorCallback.lower(value) +public func FfiConverterTypeAuthenticatedProofBundleVerificationRecord_lower(_ value: AuthenticatedProofBundleVerificationRecord) -> RustBuffer { + return FfiConverterTypeAuthenticatedProofBundleVerificationRecord.lower(value) } +public struct AuthenticatedProofEnvelopeRecord: Equatable, Hashable { + public var algorithm: String + public var keyId: Data + public var proofBundle: Data + public var context: Data + public var issuedAtMillis: UInt64? + public var expiresAtMillis: UInt64? + public var nonce: Data + public var signature: Data + + // Default memberwise initializers are never public by default, so we + // declare one manually. + public init(algorithm: String, keyId: Data, proofBundle: Data, context: Data, issuedAtMillis: UInt64?, expiresAtMillis: UInt64?, nonce: Data, signature: Data) { + self.algorithm = algorithm + self.keyId = keyId + self.proofBundle = proofBundle + self.context = context + self.issuedAtMillis = issuedAtMillis + self.expiresAtMillis = expiresAtMillis + self.nonce = nonce + self.signature = signature + } -public protocol SecondaryIndexExtractorCallback: AnyObject, Sendable { - - func extract(primaryKey: Data, sourceValue: Data) throws -> [IndexEntryRecord] - } -open class SecondaryIndexExtractorCallbackImpl: SecondaryIndexExtractorCallback, @unchecked Sendable { - fileprivate let handle: UInt64 - /// Used to instantiate a [FFIObject] without an actual handle, for fakes in tests, mostly. -#if swift(>=5.8) - @_documentation(visibility: private) +#if compiler(>=6) +extension AuthenticatedProofEnvelopeRecord: Sendable {} #endif - public struct NoHandle { - public init() {} - } - // TODO: We'd like this to be `private` but for Swifty reasons, - // we can't implement `FfiConverter` without making this `required` and we can't - // make it `required` without making it `public`. #if swift(>=5.8) - @_documentation(visibility: private) +@_documentation(visibility: private) #endif - required public init(unsafeFromHandle handle: UInt64) { - self.handle = handle +public struct FfiConverterTypeAuthenticatedProofEnvelopeRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> AuthenticatedProofEnvelopeRecord { + return + try AuthenticatedProofEnvelopeRecord( + algorithm: FfiConverterString.read(from: &buf), + keyId: FfiConverterData.read(from: &buf), + proofBundle: FfiConverterData.read(from: &buf), + context: FfiConverterData.read(from: &buf), + issuedAtMillis: FfiConverterOptionUInt64.read(from: &buf), + expiresAtMillis: FfiConverterOptionUInt64.read(from: &buf), + nonce: FfiConverterData.read(from: &buf), + signature: FfiConverterData.read(from: &buf) + ) } - // This constructor can be used to instantiate a fake object. - // - Parameter noHandle: Placeholder value so we can have a constructor separate from the default empty one that may be implemented for classes extending [FFIObject]. - // - // - Warning: - // Any object instantiated with this constructor cannot be passed to an actual Rust-backed object. Since there isn't a backing handle the FFI lower functions will crash. + public static func write(_ value: AuthenticatedProofEnvelopeRecord, into buf: inout [UInt8]) { + FfiConverterString.write(value.algorithm, into: &buf) + FfiConverterData.write(value.keyId, into: &buf) + FfiConverterData.write(value.proofBundle, into: &buf) + FfiConverterData.write(value.context, into: &buf) + FfiConverterOptionUInt64.write(value.issuedAtMillis, into: &buf) + FfiConverterOptionUInt64.write(value.expiresAtMillis, into: &buf) + FfiConverterData.write(value.nonce, into: &buf) + FfiConverterData.write(value.signature, into: &buf) + } +} + + #if swift(>=5.8) - @_documentation(visibility: private) +@_documentation(visibility: private) #endif - public init(noHandle: NoHandle) { - self.handle = 0 - } +public func FfiConverterTypeAuthenticatedProofEnvelopeRecord_lift(_ buf: RustBuffer) throws -> AuthenticatedProofEnvelopeRecord { + return try FfiConverterTypeAuthenticatedProofEnvelopeRecord.lift(buf) +} #if swift(>=5.8) - @_documentation(visibility: private) +@_documentation(visibility: private) #endif - public func uniffiCloneHandle() -> UInt64 { - return try! rustCall { uniffi_prolly_bindings_fn_clone_secondaryindexextractorcallback(self.handle, $0) } - } - // No primary constructor declared for this class. +public func FfiConverterTypeAuthenticatedProofEnvelopeRecord_lower(_ value: AuthenticatedProofEnvelopeRecord) -> RustBuffer { + return FfiConverterTypeAuthenticatedProofEnvelopeRecord.lower(value) +} - deinit { - if handle == 0 { - // Mock objects have handle=0 don't try to free them - return - } - try! rustCall { uniffi_prolly_bindings_fn_free_secondaryindexextractorcallback(handle, $0) } - } +public struct AuthenticatedProofEnvelopeVerificationRecord: Equatable, Hashable { + public var valid: Bool + public var signatureValid: Bool + public var timeValid: Bool + public var notYetValid: Bool + public var expired: Bool + public var algorithm: String + public var keyId: Data + public var proofBundle: Data + public var context: Data + public var issuedAtMillis: UInt64? + public var expiresAtMillis: UInt64? + public var nonce: Data - + // Default memberwise initializers are never public by default, so we + // declare one manually. + public init(valid: Bool, signatureValid: Bool, timeValid: Bool, notYetValid: Bool, expired: Bool, algorithm: String, keyId: Data, proofBundle: Data, context: Data, issuedAtMillis: UInt64?, expiresAtMillis: UInt64?, nonce: Data) { + self.valid = valid + self.signatureValid = signatureValid + self.timeValid = timeValid + self.notYetValid = notYetValid + self.expired = expired + self.algorithm = algorithm + self.keyId = keyId + self.proofBundle = proofBundle + self.context = context + self.issuedAtMillis = issuedAtMillis + self.expiresAtMillis = expiresAtMillis + self.nonce = nonce + } - -open func extract(primaryKey: Data, sourceValue: Data)throws -> [IndexEntryRecord] { - return try FfiConverterSequenceTypeIndexEntryRecord.lift(try rustCallWithError(FfiConverterTypeProllyBindingError_lift) { - uniffi_prolly_bindings_fn_method_secondaryindexextractorcallback_extract( - self.uniffiCloneHandle(), - FfiConverterData.lower(primaryKey), - FfiConverterData.lower(sourceValue),$0 - ) -}) -} - - -} +} -// Put the implementation in a struct so we don't pollute the top-level namespace -fileprivate struct UniffiCallbackInterfaceSecondaryIndexExtractorCallback { +#if compiler(>=6) +extension AuthenticatedProofEnvelopeVerificationRecord: Sendable {} +#endif - // Create the VTable using a series of closures. - // Swift automatically converts these into C callback functions. - // - // This creates 1-element array, since this seems to be the only way to construct a const - // pointer that we can pass to the Rust code. - static let vtable: [UniffiVTableCallbackInterfaceSecondaryIndexExtractorCallback] = [UniffiVTableCallbackInterfaceSecondaryIndexExtractorCallback( - uniffiFree: { (uniffiHandle: UInt64) -> () in - do { - try FfiConverterTypeSecondaryIndexExtractorCallback.handleMap.remove(handle: uniffiHandle) - } catch { - print("Uniffi callback interface SecondaryIndexExtractorCallback: handle missing in uniffiFree") - } - }, - uniffiClone: { (uniffiHandle: UInt64) -> UInt64 in - do { - return try FfiConverterTypeSecondaryIndexExtractorCallback.handleMap.clone(handle: uniffiHandle) - } catch { - fatalError("Uniffi callback interface SecondaryIndexExtractorCallback: handle missing in uniffiClone") - } - }, - extract: { ( - uniffiHandle: UInt64, - primaryKey: RustBuffer, - sourceValue: RustBuffer, - uniffiOutReturn: UnsafeMutablePointer, - uniffiCallStatus: UnsafeMutablePointer - ) in - let makeCall = { - () throws -> [IndexEntryRecord] in - guard let uniffiObj = try? FfiConverterTypeSecondaryIndexExtractorCallback.handleMap.get(handle: uniffiHandle) else { - throw UniffiInternalError.unexpectedStaleHandle - } - return try uniffiObj.extract( - primaryKey: try FfiConverterData.lift(primaryKey), - sourceValue: try FfiConverterData.lift(sourceValue) - ) - } +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +public struct FfiConverterTypeAuthenticatedProofEnvelopeVerificationRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> AuthenticatedProofEnvelopeVerificationRecord { + return + try AuthenticatedProofEnvelopeVerificationRecord( + valid: FfiConverterBool.read(from: &buf), + signatureValid: FfiConverterBool.read(from: &buf), + timeValid: FfiConverterBool.read(from: &buf), + notYetValid: FfiConverterBool.read(from: &buf), + expired: FfiConverterBool.read(from: &buf), + algorithm: FfiConverterString.read(from: &buf), + keyId: FfiConverterData.read(from: &buf), + proofBundle: FfiConverterData.read(from: &buf), + context: FfiConverterData.read(from: &buf), + issuedAtMillis: FfiConverterOptionUInt64.read(from: &buf), + expiresAtMillis: FfiConverterOptionUInt64.read(from: &buf), + nonce: FfiConverterData.read(from: &buf) + ) + } - - let writeReturn = { uniffiOutReturn.pointee = FfiConverterSequenceTypeIndexEntryRecord.lower($0) } - uniffiTraitInterfaceCallWithError( - callStatus: uniffiCallStatus, - makeCall: makeCall, - writeReturn: writeReturn, - lowerError: FfiConverterTypeProllyBindingError_lower - ) - } - )] + public static func write(_ value: AuthenticatedProofEnvelopeVerificationRecord, into buf: inout [UInt8]) { + FfiConverterBool.write(value.valid, into: &buf) + FfiConverterBool.write(value.signatureValid, into: &buf) + FfiConverterBool.write(value.timeValid, into: &buf) + FfiConverterBool.write(value.notYetValid, into: &buf) + FfiConverterBool.write(value.expired, into: &buf) + FfiConverterString.write(value.algorithm, into: &buf) + FfiConverterData.write(value.keyId, into: &buf) + FfiConverterData.write(value.proofBundle, into: &buf) + FfiConverterData.write(value.context, into: &buf) + FfiConverterOptionUInt64.write(value.issuedAtMillis, into: &buf) + FfiConverterOptionUInt64.write(value.expiresAtMillis, into: &buf) + FfiConverterData.write(value.nonce, into: &buf) + } } -private func uniffiCallbackInitSecondaryIndexExtractorCallback() { - uniffi_prolly_bindings_fn_init_callback_vtable_secondaryindexextractorcallback(UniffiCallbackInterfaceSecondaryIndexExtractorCallback.vtable) + +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +public func FfiConverterTypeAuthenticatedProofEnvelopeVerificationRecord_lift(_ buf: RustBuffer) throws -> AuthenticatedProofEnvelopeVerificationRecord { + return try FfiConverterTypeAuthenticatedProofEnvelopeVerificationRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeSecondaryIndexExtractorCallback: FfiConverter { - fileprivate static let handleMap = UniffiHandleMap() +public func FfiConverterTypeAuthenticatedProofEnvelopeVerificationRecord_lower(_ value: AuthenticatedProofEnvelopeVerificationRecord) -> RustBuffer { + return FfiConverterTypeAuthenticatedProofEnvelopeVerificationRecord.lower(value) +} - typealias FfiType = UInt64 - typealias SwiftType = SecondaryIndexExtractorCallback - public static func lift(_ handle: UInt64) throws -> SecondaryIndexExtractorCallback { - if ((handle & 1) == 0) { - // Rust-generated handle, construct a new class that uses the handle to implement the - // interface - return SecondaryIndexExtractorCallbackImpl(unsafeFromHandle: handle) - } else { - // Swift-generated handle, get the object from the handle map - return try handleMap.remove(handle: handle) - } - } +public struct BatchApplyResultRecord: Equatable, Hashable { + public var tree: TreeRecord + public var stats: BatchApplyStatsRecord - public static func lower(_ value: SecondaryIndexExtractorCallback) -> UInt64 { - if let rustImpl = value as? SecondaryIndexExtractorCallbackImpl { - // Rust-implemented object. Clone the handle and return it - return rustImpl.uniffiCloneHandle() - } else { - // Swift object, generate a new vtable handle and return that. - return handleMap.insert(obj: value) - } + // Default memberwise initializers are never public by default, so we + // declare one manually. + public init(tree: TreeRecord, stats: BatchApplyStatsRecord) { + self.tree = tree + self.stats = stats } - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> SecondaryIndexExtractorCallback { - let handle: UInt64 = try readInt(&buf) - return try lift(handle) + + + +} + +#if compiler(>=6) +extension BatchApplyResultRecord: Sendable {} +#endif + +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +public struct FfiConverterTypeBatchApplyResultRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> BatchApplyResultRecord { + return + try BatchApplyResultRecord( + tree: FfiConverterTypeTreeRecord.read(from: &buf), + stats: FfiConverterTypeBatchApplyStatsRecord.read(from: &buf) + ) } - public static func write(_ value: SecondaryIndexExtractorCallback, into buf: inout [UInt8]) { - writeInt(&buf, lower(value)) + public static func write(_ value: BatchApplyResultRecord, into buf: inout [UInt8]) { + FfiConverterTypeTreeRecord.write(value.tree, into: &buf) + FfiConverterTypeBatchApplyStatsRecord.write(value.stats, into: &buf) } } @@ -12416,59 +13093,113 @@ public struct FfiConverterTypeSecondaryIndexExtractorCallback: FfiConverter { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeSecondaryIndexExtractorCallback_lift(_ handle: UInt64) throws -> SecondaryIndexExtractorCallback { - return try FfiConverterTypeSecondaryIndexExtractorCallback.lift(handle) +public func FfiConverterTypeBatchApplyResultRecord_lift(_ buf: RustBuffer) throws -> BatchApplyResultRecord { + return try FfiConverterTypeBatchApplyResultRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeSecondaryIndexExtractorCallback_lower(_ value: SecondaryIndexExtractorCallback) -> UInt64 { - return FfiConverterTypeSecondaryIndexExtractorCallback.lower(value) +public func FfiConverterTypeBatchApplyResultRecord_lower(_ value: BatchApplyResultRecord) -> RustBuffer { + return FfiConverterTypeBatchApplyResultRecord.lower(value) } - - -public struct AcceleratorCatalogEntryRecord: Equatable, Hashable { - public var kind: CatalogAcceleratorKindRecord - public var configurationFingerprint: Data - public var manifest: Data +public struct BatchApplyStatsRecord: Equatable, Hashable { + public var inputMutations: UInt64 + public var effectiveMutations: UInt64 + public var preprocessInputSorted: Bool + public var entriesStreamed: UInt64 + public var nodesRead: UInt64 + public var writtenNodes: UInt64 + public var nodesReused: UInt64 + public var bytesRead: UInt64 + public var writtenBytes: UInt64 + public var resyncDistanceEntries: UInt64 + public var resyncDistanceNodes: UInt64 + public var usedKeyStableFastPath: Bool + public var usedBatchedValueUpdatePath: Bool + public var parallelWidth: UInt64 + public var parallelTasks: UInt64 + public var structuralIslands: UInt64 + public var coalescedIslands: UInt64 // Default memberwise initializers are never public by default, so we // declare one manually. - public init(kind: CatalogAcceleratorKindRecord, configurationFingerprint: Data, manifest: Data) { - self.kind = kind - self.configurationFingerprint = configurationFingerprint - self.manifest = manifest + public init(inputMutations: UInt64, effectiveMutations: UInt64, preprocessInputSorted: Bool, entriesStreamed: UInt64, nodesRead: UInt64, writtenNodes: UInt64, nodesReused: UInt64, bytesRead: UInt64, writtenBytes: UInt64, resyncDistanceEntries: UInt64, resyncDistanceNodes: UInt64, usedKeyStableFastPath: Bool, usedBatchedValueUpdatePath: Bool, parallelWidth: UInt64, parallelTasks: UInt64, structuralIslands: UInt64, coalescedIslands: UInt64) { + self.inputMutations = inputMutations + self.effectiveMutations = effectiveMutations + self.preprocessInputSorted = preprocessInputSorted + self.entriesStreamed = entriesStreamed + self.nodesRead = nodesRead + self.writtenNodes = writtenNodes + self.nodesReused = nodesReused + self.bytesRead = bytesRead + self.writtenBytes = writtenBytes + self.resyncDistanceEntries = resyncDistanceEntries + self.resyncDistanceNodes = resyncDistanceNodes + self.usedKeyStableFastPath = usedKeyStableFastPath + self.usedBatchedValueUpdatePath = usedBatchedValueUpdatePath + self.parallelWidth = parallelWidth + self.parallelTasks = parallelTasks + self.structuralIslands = structuralIslands + self.coalescedIslands = coalescedIslands } - - + + } #if compiler(>=6) -extension AcceleratorCatalogEntryRecord: Sendable {} +extension BatchApplyStatsRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeAcceleratorCatalogEntryRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> AcceleratorCatalogEntryRecord { +public struct FfiConverterTypeBatchApplyStatsRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> BatchApplyStatsRecord { return - try AcceleratorCatalogEntryRecord( - kind: FfiConverterTypeCatalogAcceleratorKindRecord.read(from: &buf), - configurationFingerprint: FfiConverterData.read(from: &buf), - manifest: FfiConverterData.read(from: &buf) + try BatchApplyStatsRecord( + inputMutations: FfiConverterUInt64.read(from: &buf), + effectiveMutations: FfiConverterUInt64.read(from: &buf), + preprocessInputSorted: FfiConverterBool.read(from: &buf), + entriesStreamed: FfiConverterUInt64.read(from: &buf), + nodesRead: FfiConverterUInt64.read(from: &buf), + writtenNodes: FfiConverterUInt64.read(from: &buf), + nodesReused: FfiConverterUInt64.read(from: &buf), + bytesRead: FfiConverterUInt64.read(from: &buf), + writtenBytes: FfiConverterUInt64.read(from: &buf), + resyncDistanceEntries: FfiConverterUInt64.read(from: &buf), + resyncDistanceNodes: FfiConverterUInt64.read(from: &buf), + usedKeyStableFastPath: FfiConverterBool.read(from: &buf), + usedBatchedValueUpdatePath: FfiConverterBool.read(from: &buf), + parallelWidth: FfiConverterUInt64.read(from: &buf), + parallelTasks: FfiConverterUInt64.read(from: &buf), + structuralIslands: FfiConverterUInt64.read(from: &buf), + coalescedIslands: FfiConverterUInt64.read(from: &buf) ) } - public static func write(_ value: AcceleratorCatalogEntryRecord, into buf: inout [UInt8]) { - FfiConverterTypeCatalogAcceleratorKindRecord.write(value.kind, into: &buf) - FfiConverterData.write(value.configurationFingerprint, into: &buf) - FfiConverterData.write(value.manifest, into: &buf) + public static func write(_ value: BatchApplyStatsRecord, into buf: inout [UInt8]) { + FfiConverterUInt64.write(value.inputMutations, into: &buf) + FfiConverterUInt64.write(value.effectiveMutations, into: &buf) + FfiConverterBool.write(value.preprocessInputSorted, into: &buf) + FfiConverterUInt64.write(value.entriesStreamed, into: &buf) + FfiConverterUInt64.write(value.nodesRead, into: &buf) + FfiConverterUInt64.write(value.writtenNodes, into: &buf) + FfiConverterUInt64.write(value.nodesReused, into: &buf) + FfiConverterUInt64.write(value.bytesRead, into: &buf) + FfiConverterUInt64.write(value.writtenBytes, into: &buf) + FfiConverterUInt64.write(value.resyncDistanceEntries, into: &buf) + FfiConverterUInt64.write(value.resyncDistanceNodes, into: &buf) + FfiConverterBool.write(value.usedKeyStableFastPath, into: &buf) + FfiConverterBool.write(value.usedBatchedValueUpdatePath, into: &buf) + FfiConverterUInt64.write(value.parallelWidth, into: &buf) + FfiConverterUInt64.write(value.parallelTasks, into: &buf) + FfiConverterUInt64.write(value.structuralIslands, into: &buf) + FfiConverterUInt64.write(value.coalescedIslands, into: &buf) } } @@ -12476,65 +13207,69 @@ public struct FfiConverterTypeAcceleratorCatalogEntryRecord: FfiConverterRustBuf #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeAcceleratorCatalogEntryRecord_lift(_ buf: RustBuffer) throws -> AcceleratorCatalogEntryRecord { - return try FfiConverterTypeAcceleratorCatalogEntryRecord.lift(buf) +public func FfiConverterTypeBatchApplyStatsRecord_lift(_ buf: RustBuffer) throws -> BatchApplyStatsRecord { + return try FfiConverterTypeBatchApplyStatsRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeAcceleratorCatalogEntryRecord_lower(_ value: AcceleratorCatalogEntryRecord) -> RustBuffer { - return FfiConverterTypeAcceleratorCatalogEntryRecord.lower(value) +public func FfiConverterTypeBatchApplyStatsRecord_lower(_ value: BatchApplyStatsRecord) -> RustBuffer { + return FfiConverterTypeBatchApplyStatsRecord.lower(value) } -public struct ActiveIndexHealthRecord: Equatable, Hashable { - public var name: Data - public var generation: UInt64 - public var fingerprint: Data - public var projection: IndexProjectionRecord - public var indexVersion: Data +public struct BlobGcPlanRecord: Equatable, Hashable { + public var reachability: BlobGcReachabilityRecord + public var candidateBlobs: UInt64 + public var reclaimableBlobs: [BlobRefRecord] + public var reclaimableBlobCount: UInt64 + public var reclaimableBlobBytes: UInt64 + public var missingCandidates: UInt64 // Default memberwise initializers are never public by default, so we // declare one manually. - public init(name: Data, generation: UInt64, fingerprint: Data, projection: IndexProjectionRecord, indexVersion: Data) { - self.name = name - self.generation = generation - self.fingerprint = fingerprint - self.projection = projection - self.indexVersion = indexVersion + public init(reachability: BlobGcReachabilityRecord, candidateBlobs: UInt64, reclaimableBlobs: [BlobRefRecord], reclaimableBlobCount: UInt64, reclaimableBlobBytes: UInt64, missingCandidates: UInt64) { + self.reachability = reachability + self.candidateBlobs = candidateBlobs + self.reclaimableBlobs = reclaimableBlobs + self.reclaimableBlobCount = reclaimableBlobCount + self.reclaimableBlobBytes = reclaimableBlobBytes + self.missingCandidates = missingCandidates } - - + + } #if compiler(>=6) -extension ActiveIndexHealthRecord: Sendable {} +extension BlobGcPlanRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeActiveIndexHealthRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ActiveIndexHealthRecord { +public struct FfiConverterTypeBlobGcPlanRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> BlobGcPlanRecord { return - try ActiveIndexHealthRecord( - name: FfiConverterData.read(from: &buf), - generation: FfiConverterUInt64.read(from: &buf), - fingerprint: FfiConverterData.read(from: &buf), - projection: FfiConverterTypeIndexProjectionRecord.read(from: &buf), - indexVersion: FfiConverterData.read(from: &buf) + try BlobGcPlanRecord( + reachability: FfiConverterTypeBlobGcReachabilityRecord.read(from: &buf), + candidateBlobs: FfiConverterUInt64.read(from: &buf), + reclaimableBlobs: FfiConverterSequenceTypeBlobRefRecord.read(from: &buf), + reclaimableBlobCount: FfiConverterUInt64.read(from: &buf), + reclaimableBlobBytes: FfiConverterUInt64.read(from: &buf), + missingCandidates: FfiConverterUInt64.read(from: &buf) ) } - public static func write(_ value: ActiveIndexHealthRecord, into buf: inout [UInt8]) { - FfiConverterData.write(value.name, into: &buf) - FfiConverterUInt64.write(value.generation, into: &buf) - FfiConverterData.write(value.fingerprint, into: &buf) - FfiConverterTypeIndexProjectionRecord.write(value.projection, into: &buf) - FfiConverterData.write(value.indexVersion, into: &buf) + public static func write(_ value: BlobGcPlanRecord, into buf: inout [UInt8]) { + FfiConverterTypeBlobGcReachabilityRecord.write(value.reachability, into: &buf) + FfiConverterUInt64.write(value.candidateBlobs, into: &buf) + FfiConverterSequenceTypeBlobRefRecord.write(value.reclaimableBlobs, into: &buf) + FfiConverterUInt64.write(value.reclaimableBlobCount, into: &buf) + FfiConverterUInt64.write(value.reclaimableBlobBytes, into: &buf) + FfiConverterUInt64.write(value.missingCandidates, into: &buf) } } @@ -12542,61 +13277,65 @@ public struct FfiConverterTypeActiveIndexHealthRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeActiveIndexHealthRecord_lift(_ buf: RustBuffer) throws -> ActiveIndexHealthRecord { - return try FfiConverterTypeActiveIndexHealthRecord.lift(buf) +public func FfiConverterTypeBlobGcPlanRecord_lift(_ buf: RustBuffer) throws -> BlobGcPlanRecord { + return try FfiConverterTypeBlobGcPlanRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeActiveIndexHealthRecord_lower(_ value: ActiveIndexHealthRecord) -> RustBuffer { - return FfiConverterTypeActiveIndexHealthRecord.lower(value) +public func FfiConverterTypeBlobGcPlanRecord_lower(_ value: BlobGcPlanRecord) -> RustBuffer { + return FfiConverterTypeBlobGcPlanRecord.lower(value) } -public struct AuthenticatedProofBundleVerificationRecord: Equatable, Hashable { - public var valid: Bool - public var envelope: AuthenticatedProofEnvelopeVerificationRecord - public var proof: ProofBundleVerificationRecord? - public var proofError: String? +public struct BlobGcReachabilityRecord: Equatable, Hashable { + public var liveBlobs: [BlobRefRecord] + public var liveBlobCount: UInt64 + public var liveBlobBytes: UInt64 + public var scannedNodes: UInt64 + public var scannedValues: UInt64 // Default memberwise initializers are never public by default, so we // declare one manually. - public init(valid: Bool, envelope: AuthenticatedProofEnvelopeVerificationRecord, proof: ProofBundleVerificationRecord?, proofError: String?) { - self.valid = valid - self.envelope = envelope - self.proof = proof - self.proofError = proofError + public init(liveBlobs: [BlobRefRecord], liveBlobCount: UInt64, liveBlobBytes: UInt64, scannedNodes: UInt64, scannedValues: UInt64) { + self.liveBlobs = liveBlobs + self.liveBlobCount = liveBlobCount + self.liveBlobBytes = liveBlobBytes + self.scannedNodes = scannedNodes + self.scannedValues = scannedValues } - - + + } #if compiler(>=6) -extension AuthenticatedProofBundleVerificationRecord: Sendable {} +extension BlobGcReachabilityRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeAuthenticatedProofBundleVerificationRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> AuthenticatedProofBundleVerificationRecord { +public struct FfiConverterTypeBlobGcReachabilityRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> BlobGcReachabilityRecord { return - try AuthenticatedProofBundleVerificationRecord( - valid: FfiConverterBool.read(from: &buf), - envelope: FfiConverterTypeAuthenticatedProofEnvelopeVerificationRecord.read(from: &buf), - proof: FfiConverterOptionTypeProofBundleVerificationRecord.read(from: &buf), - proofError: FfiConverterOptionString.read(from: &buf) + try BlobGcReachabilityRecord( + liveBlobs: FfiConverterSequenceTypeBlobRefRecord.read(from: &buf), + liveBlobCount: FfiConverterUInt64.read(from: &buf), + liveBlobBytes: FfiConverterUInt64.read(from: &buf), + scannedNodes: FfiConverterUInt64.read(from: &buf), + scannedValues: FfiConverterUInt64.read(from: &buf) ) } - public static func write(_ value: AuthenticatedProofBundleVerificationRecord, into buf: inout [UInt8]) { - FfiConverterBool.write(value.valid, into: &buf) - FfiConverterTypeAuthenticatedProofEnvelopeVerificationRecord.write(value.envelope, into: &buf) - FfiConverterOptionTypeProofBundleVerificationRecord.write(value.proof, into: &buf) - FfiConverterOptionString.write(value.proofError, into: &buf) + public static func write(_ value: BlobGcReachabilityRecord, into buf: inout [UInt8]) { + FfiConverterSequenceTypeBlobRefRecord.write(value.liveBlobs, into: &buf) + FfiConverterUInt64.write(value.liveBlobCount, into: &buf) + FfiConverterUInt64.write(value.liveBlobBytes, into: &buf) + FfiConverterUInt64.write(value.scannedNodes, into: &buf) + FfiConverterUInt64.write(value.scannedValues, into: &buf) } } @@ -12604,77 +13343,57 @@ public struct FfiConverterTypeAuthenticatedProofBundleVerificationRecord: FfiCon #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeAuthenticatedProofBundleVerificationRecord_lift(_ buf: RustBuffer) throws -> AuthenticatedProofBundleVerificationRecord { - return try FfiConverterTypeAuthenticatedProofBundleVerificationRecord.lift(buf) +public func FfiConverterTypeBlobGcReachabilityRecord_lift(_ buf: RustBuffer) throws -> BlobGcReachabilityRecord { + return try FfiConverterTypeBlobGcReachabilityRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeAuthenticatedProofBundleVerificationRecord_lower(_ value: AuthenticatedProofBundleVerificationRecord) -> RustBuffer { - return FfiConverterTypeAuthenticatedProofBundleVerificationRecord.lower(value) +public func FfiConverterTypeBlobGcReachabilityRecord_lower(_ value: BlobGcReachabilityRecord) -> RustBuffer { + return FfiConverterTypeBlobGcReachabilityRecord.lower(value) } -public struct AuthenticatedProofEnvelopeRecord: Equatable, Hashable { - public var algorithm: String - public var keyId: Data - public var proofBundle: Data - public var context: Data - public var issuedAtMillis: UInt64? - public var expiresAtMillis: UInt64? - public var nonce: Data - public var signature: Data +public struct BlobGcSweepRecord: Equatable, Hashable { + public var plan: BlobGcPlanRecord + public var deletedBlobs: UInt64 + public var deletedBlobBytes: UInt64 // Default memberwise initializers are never public by default, so we // declare one manually. - public init(algorithm: String, keyId: Data, proofBundle: Data, context: Data, issuedAtMillis: UInt64?, expiresAtMillis: UInt64?, nonce: Data, signature: Data) { - self.algorithm = algorithm - self.keyId = keyId - self.proofBundle = proofBundle - self.context = context - self.issuedAtMillis = issuedAtMillis - self.expiresAtMillis = expiresAtMillis - self.nonce = nonce - self.signature = signature + public init(plan: BlobGcPlanRecord, deletedBlobs: UInt64, deletedBlobBytes: UInt64) { + self.plan = plan + self.deletedBlobs = deletedBlobs + self.deletedBlobBytes = deletedBlobBytes } - - + + } #if compiler(>=6) -extension AuthenticatedProofEnvelopeRecord: Sendable {} +extension BlobGcSweepRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeAuthenticatedProofEnvelopeRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> AuthenticatedProofEnvelopeRecord { +public struct FfiConverterTypeBlobGcSweepRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> BlobGcSweepRecord { return - try AuthenticatedProofEnvelopeRecord( - algorithm: FfiConverterString.read(from: &buf), - keyId: FfiConverterData.read(from: &buf), - proofBundle: FfiConverterData.read(from: &buf), - context: FfiConverterData.read(from: &buf), - issuedAtMillis: FfiConverterOptionUInt64.read(from: &buf), - expiresAtMillis: FfiConverterOptionUInt64.read(from: &buf), - nonce: FfiConverterData.read(from: &buf), - signature: FfiConverterData.read(from: &buf) + try BlobGcSweepRecord( + plan: FfiConverterTypeBlobGcPlanRecord.read(from: &buf), + deletedBlobs: FfiConverterUInt64.read(from: &buf), + deletedBlobBytes: FfiConverterUInt64.read(from: &buf) ) } - public static func write(_ value: AuthenticatedProofEnvelopeRecord, into buf: inout [UInt8]) { - FfiConverterString.write(value.algorithm, into: &buf) - FfiConverterData.write(value.keyId, into: &buf) - FfiConverterData.write(value.proofBundle, into: &buf) - FfiConverterData.write(value.context, into: &buf) - FfiConverterOptionUInt64.write(value.issuedAtMillis, into: &buf) - FfiConverterOptionUInt64.write(value.expiresAtMillis, into: &buf) - FfiConverterData.write(value.nonce, into: &buf) - FfiConverterData.write(value.signature, into: &buf) + public static func write(_ value: BlobGcSweepRecord, into buf: inout [UInt8]) { + FfiConverterTypeBlobGcPlanRecord.write(value.plan, into: &buf) + FfiConverterUInt64.write(value.deletedBlobs, into: &buf) + FfiConverterUInt64.write(value.deletedBlobBytes, into: &buf) } } @@ -12682,93 +13401,53 @@ public struct FfiConverterTypeAuthenticatedProofEnvelopeRecord: FfiConverterRust #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeAuthenticatedProofEnvelopeRecord_lift(_ buf: RustBuffer) throws -> AuthenticatedProofEnvelopeRecord { - return try FfiConverterTypeAuthenticatedProofEnvelopeRecord.lift(buf) +public func FfiConverterTypeBlobGcSweepRecord_lift(_ buf: RustBuffer) throws -> BlobGcSweepRecord { + return try FfiConverterTypeBlobGcSweepRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeAuthenticatedProofEnvelopeRecord_lower(_ value: AuthenticatedProofEnvelopeRecord) -> RustBuffer { - return FfiConverterTypeAuthenticatedProofEnvelopeRecord.lower(value) +public func FfiConverterTypeBlobGcSweepRecord_lower(_ value: BlobGcSweepRecord) -> RustBuffer { + return FfiConverterTypeBlobGcSweepRecord.lower(value) } -public struct AuthenticatedProofEnvelopeVerificationRecord: Equatable, Hashable { - public var valid: Bool - public var signatureValid: Bool - public var timeValid: Bool - public var notYetValid: Bool - public var expired: Bool - public var algorithm: String - public var keyId: Data - public var proofBundle: Data - public var context: Data - public var issuedAtMillis: UInt64? - public var expiresAtMillis: UInt64? - public var nonce: Data +public struct BlobRefRecord: Equatable, Hashable { + public var cid: Data + public var len: UInt64 // Default memberwise initializers are never public by default, so we // declare one manually. - public init(valid: Bool, signatureValid: Bool, timeValid: Bool, notYetValid: Bool, expired: Bool, algorithm: String, keyId: Data, proofBundle: Data, context: Data, issuedAtMillis: UInt64?, expiresAtMillis: UInt64?, nonce: Data) { - self.valid = valid - self.signatureValid = signatureValid - self.timeValid = timeValid - self.notYetValid = notYetValid - self.expired = expired - self.algorithm = algorithm - self.keyId = keyId - self.proofBundle = proofBundle - self.context = context - self.issuedAtMillis = issuedAtMillis - self.expiresAtMillis = expiresAtMillis - self.nonce = nonce + public init(cid: Data, len: UInt64) { + self.cid = cid + self.len = len } - - + + } #if compiler(>=6) -extension AuthenticatedProofEnvelopeVerificationRecord: Sendable {} +extension BlobRefRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeAuthenticatedProofEnvelopeVerificationRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> AuthenticatedProofEnvelopeVerificationRecord { +public struct FfiConverterTypeBlobRefRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> BlobRefRecord { return - try AuthenticatedProofEnvelopeVerificationRecord( - valid: FfiConverterBool.read(from: &buf), - signatureValid: FfiConverterBool.read(from: &buf), - timeValid: FfiConverterBool.read(from: &buf), - notYetValid: FfiConverterBool.read(from: &buf), - expired: FfiConverterBool.read(from: &buf), - algorithm: FfiConverterString.read(from: &buf), - keyId: FfiConverterData.read(from: &buf), - proofBundle: FfiConverterData.read(from: &buf), - context: FfiConverterData.read(from: &buf), - issuedAtMillis: FfiConverterOptionUInt64.read(from: &buf), - expiresAtMillis: FfiConverterOptionUInt64.read(from: &buf), - nonce: FfiConverterData.read(from: &buf) + try BlobRefRecord( + cid: FfiConverterData.read(from: &buf), + len: FfiConverterUInt64.read(from: &buf) ) } - public static func write(_ value: AuthenticatedProofEnvelopeVerificationRecord, into buf: inout [UInt8]) { - FfiConverterBool.write(value.valid, into: &buf) - FfiConverterBool.write(value.signatureValid, into: &buf) - FfiConverterBool.write(value.timeValid, into: &buf) - FfiConverterBool.write(value.notYetValid, into: &buf) - FfiConverterBool.write(value.expired, into: &buf) - FfiConverterString.write(value.algorithm, into: &buf) - FfiConverterData.write(value.keyId, into: &buf) - FfiConverterData.write(value.proofBundle, into: &buf) - FfiConverterData.write(value.context, into: &buf) - FfiConverterOptionUInt64.write(value.issuedAtMillis, into: &buf) - FfiConverterOptionUInt64.write(value.expiresAtMillis, into: &buf) - FfiConverterData.write(value.nonce, into: &buf) + public static func write(_ value: BlobRefRecord, into buf: inout [UInt8]) { + FfiConverterData.write(value.cid, into: &buf) + FfiConverterUInt64.write(value.len, into: &buf) } } @@ -12776,167 +13455,115 @@ public struct FfiConverterTypeAuthenticatedProofEnvelopeVerificationRecord: FfiC #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeAuthenticatedProofEnvelopeVerificationRecord_lift(_ buf: RustBuffer) throws -> AuthenticatedProofEnvelopeVerificationRecord { - return try FfiConverterTypeAuthenticatedProofEnvelopeVerificationRecord.lift(buf) +public func FfiConverterTypeBlobRefRecord_lift(_ buf: RustBuffer) throws -> BlobRefRecord { + return try FfiConverterTypeBlobRefRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeAuthenticatedProofEnvelopeVerificationRecord_lower(_ value: AuthenticatedProofEnvelopeVerificationRecord) -> RustBuffer { - return FfiConverterTypeAuthenticatedProofEnvelopeVerificationRecord.lower(value) +public func FfiConverterTypeBlobRefRecord_lower(_ value: BlobRefRecord) -> RustBuffer { + return FfiConverterTypeBlobRefRecord.lower(value) } -public struct BatchApplyResultRecord: Equatable, Hashable { - public var tree: TreeRecord - public var stats: BatchApplyStatsRecord +public struct BytesListResultRecord: Equatable, Hashable { + public var values: [Data] + public var error: StoreErrorRecord? // Default memberwise initializers are never public by default, so we // declare one manually. - public init(tree: TreeRecord, stats: BatchApplyStatsRecord) { - self.tree = tree - self.stats = stats + public init(values: [Data], error: StoreErrorRecord?) { + self.values = values + self.error = error } - - + + } #if compiler(>=6) -extension BatchApplyResultRecord: Sendable {} +extension BytesListResultRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeBatchApplyResultRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> BatchApplyResultRecord { +public struct FfiConverterTypeBytesListResultRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> BytesListResultRecord { return - try BatchApplyResultRecord( - tree: FfiConverterTypeTreeRecord.read(from: &buf), - stats: FfiConverterTypeBatchApplyStatsRecord.read(from: &buf) + try BytesListResultRecord( + values: FfiConverterSequenceData.read(from: &buf), + error: FfiConverterOptionTypeStoreErrorRecord.read(from: &buf) ) } - public static func write(_ value: BatchApplyResultRecord, into buf: inout [UInt8]) { - FfiConverterTypeTreeRecord.write(value.tree, into: &buf) - FfiConverterTypeBatchApplyStatsRecord.write(value.stats, into: &buf) + public static func write(_ value: BytesListResultRecord, into buf: inout [UInt8]) { + FfiConverterSequenceData.write(value.values, into: &buf) + FfiConverterOptionTypeStoreErrorRecord.write(value.error, into: &buf) } } -#if swift(>=5.8) -@_documentation(visibility: private) -#endif -public func FfiConverterTypeBatchApplyResultRecord_lift(_ buf: RustBuffer) throws -> BatchApplyResultRecord { - return try FfiConverterTypeBatchApplyResultRecord.lift(buf) -} - -#if swift(>=5.8) -@_documentation(visibility: private) -#endif -public func FfiConverterTypeBatchApplyResultRecord_lower(_ value: BatchApplyResultRecord) -> RustBuffer { - return FfiConverterTypeBatchApplyResultRecord.lower(value) -} - - -public struct BatchApplyStatsRecord: Equatable, Hashable { - public var inputMutations: UInt64 - public var effectiveMutations: UInt64 - public var preprocessInputSorted: Bool - public var entriesStreamed: UInt64 - public var nodesRead: UInt64 - public var writtenNodes: UInt64 - public var nodesReused: UInt64 - public var bytesRead: UInt64 - public var writtenBytes: UInt64 - public var resyncDistanceEntries: UInt64 - public var resyncDistanceNodes: UInt64 - public var usedKeyStableFastPath: Bool - public var usedBatchedValueUpdatePath: Bool - public var parallelWidth: UInt64 - public var parallelTasks: UInt64 - public var structuralIslands: UInt64 - public var coalescedIslands: UInt64 - +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +public func FfiConverterTypeBytesListResultRecord_lift(_ buf: RustBuffer) throws -> BytesListResultRecord { + return try FfiConverterTypeBytesListResultRecord.lift(buf) +} + +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +public func FfiConverterTypeBytesListResultRecord_lower(_ value: BytesListResultRecord) -> RustBuffer { + return FfiConverterTypeBytesListResultRecord.lower(value) +} + + +public struct CacheStatsRecord: Equatable, Hashable { + public var cachedNodes: UInt64 + public var cachedBytes: UInt64 + public var pinnedNodes: UInt64 + public var pinnedBytes: UInt64 + // Default memberwise initializers are never public by default, so we // declare one manually. - public init(inputMutations: UInt64, effectiveMutations: UInt64, preprocessInputSorted: Bool, entriesStreamed: UInt64, nodesRead: UInt64, writtenNodes: UInt64, nodesReused: UInt64, bytesRead: UInt64, writtenBytes: UInt64, resyncDistanceEntries: UInt64, resyncDistanceNodes: UInt64, usedKeyStableFastPath: Bool, usedBatchedValueUpdatePath: Bool, parallelWidth: UInt64, parallelTasks: UInt64, structuralIslands: UInt64, coalescedIslands: UInt64) { - self.inputMutations = inputMutations - self.effectiveMutations = effectiveMutations - self.preprocessInputSorted = preprocessInputSorted - self.entriesStreamed = entriesStreamed - self.nodesRead = nodesRead - self.writtenNodes = writtenNodes - self.nodesReused = nodesReused - self.bytesRead = bytesRead - self.writtenBytes = writtenBytes - self.resyncDistanceEntries = resyncDistanceEntries - self.resyncDistanceNodes = resyncDistanceNodes - self.usedKeyStableFastPath = usedKeyStableFastPath - self.usedBatchedValueUpdatePath = usedBatchedValueUpdatePath - self.parallelWidth = parallelWidth - self.parallelTasks = parallelTasks - self.structuralIslands = structuralIslands - self.coalescedIslands = coalescedIslands + public init(cachedNodes: UInt64, cachedBytes: UInt64, pinnedNodes: UInt64, pinnedBytes: UInt64) { + self.cachedNodes = cachedNodes + self.cachedBytes = cachedBytes + self.pinnedNodes = pinnedNodes + self.pinnedBytes = pinnedBytes } - - + + } #if compiler(>=6) -extension BatchApplyStatsRecord: Sendable {} +extension CacheStatsRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeBatchApplyStatsRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> BatchApplyStatsRecord { +public struct FfiConverterTypeCacheStatsRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> CacheStatsRecord { return - try BatchApplyStatsRecord( - inputMutations: FfiConverterUInt64.read(from: &buf), - effectiveMutations: FfiConverterUInt64.read(from: &buf), - preprocessInputSorted: FfiConverterBool.read(from: &buf), - entriesStreamed: FfiConverterUInt64.read(from: &buf), - nodesRead: FfiConverterUInt64.read(from: &buf), - writtenNodes: FfiConverterUInt64.read(from: &buf), - nodesReused: FfiConverterUInt64.read(from: &buf), - bytesRead: FfiConverterUInt64.read(from: &buf), - writtenBytes: FfiConverterUInt64.read(from: &buf), - resyncDistanceEntries: FfiConverterUInt64.read(from: &buf), - resyncDistanceNodes: FfiConverterUInt64.read(from: &buf), - usedKeyStableFastPath: FfiConverterBool.read(from: &buf), - usedBatchedValueUpdatePath: FfiConverterBool.read(from: &buf), - parallelWidth: FfiConverterUInt64.read(from: &buf), - parallelTasks: FfiConverterUInt64.read(from: &buf), - structuralIslands: FfiConverterUInt64.read(from: &buf), - coalescedIslands: FfiConverterUInt64.read(from: &buf) + try CacheStatsRecord( + cachedNodes: FfiConverterUInt64.read(from: &buf), + cachedBytes: FfiConverterUInt64.read(from: &buf), + pinnedNodes: FfiConverterUInt64.read(from: &buf), + pinnedBytes: FfiConverterUInt64.read(from: &buf) ) } - public static func write(_ value: BatchApplyStatsRecord, into buf: inout [UInt8]) { - FfiConverterUInt64.write(value.inputMutations, into: &buf) - FfiConverterUInt64.write(value.effectiveMutations, into: &buf) - FfiConverterBool.write(value.preprocessInputSorted, into: &buf) - FfiConverterUInt64.write(value.entriesStreamed, into: &buf) - FfiConverterUInt64.write(value.nodesRead, into: &buf) - FfiConverterUInt64.write(value.writtenNodes, into: &buf) - FfiConverterUInt64.write(value.nodesReused, into: &buf) - FfiConverterUInt64.write(value.bytesRead, into: &buf) - FfiConverterUInt64.write(value.writtenBytes, into: &buf) - FfiConverterUInt64.write(value.resyncDistanceEntries, into: &buf) - FfiConverterUInt64.write(value.resyncDistanceNodes, into: &buf) - FfiConverterBool.write(value.usedKeyStableFastPath, into: &buf) - FfiConverterBool.write(value.usedBatchedValueUpdatePath, into: &buf) - FfiConverterUInt64.write(value.parallelWidth, into: &buf) - FfiConverterUInt64.write(value.parallelTasks, into: &buf) - FfiConverterUInt64.write(value.structuralIslands, into: &buf) - FfiConverterUInt64.write(value.coalescedIslands, into: &buf) + public static func write(_ value: CacheStatsRecord, into buf: inout [UInt8]) { + FfiConverterUInt64.write(value.cachedNodes, into: &buf) + FfiConverterUInt64.write(value.cachedBytes, into: &buf) + FfiConverterUInt64.write(value.pinnedNodes, into: &buf) + FfiConverterUInt64.write(value.pinnedBytes, into: &buf) } } @@ -12944,69 +13571,57 @@ public struct FfiConverterTypeBatchApplyStatsRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeBatchApplyStatsRecord_lift(_ buf: RustBuffer) throws -> BatchApplyStatsRecord { - return try FfiConverterTypeBatchApplyStatsRecord.lift(buf) +public func FfiConverterTypeCacheStatsRecord_lift(_ buf: RustBuffer) throws -> CacheStatsRecord { + return try FfiConverterTypeCacheStatsRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeBatchApplyStatsRecord_lower(_ value: BatchApplyStatsRecord) -> RustBuffer { - return FfiConverterTypeBatchApplyStatsRecord.lower(value) +public func FfiConverterTypeCacheStatsRecord_lower(_ value: CacheStatsRecord) -> RustBuffer { + return FfiConverterTypeCacheStatsRecord.lower(value) } -public struct BlobGcPlanRecord: Equatable, Hashable { - public var reachability: BlobGcReachabilityRecord - public var candidateBlobs: UInt64 - public var reclaimableBlobs: [BlobRefRecord] - public var reclaimableBlobCount: UInt64 - public var reclaimableBlobBytes: UInt64 - public var missingCandidates: UInt64 +public struct ChangedSpanHintRecord: Equatable, Hashable { + public var baseRoot: Data? + public var changedRoot: Data? + public var spans: [ChangedSpanRecord] // Default memberwise initializers are never public by default, so we // declare one manually. - public init(reachability: BlobGcReachabilityRecord, candidateBlobs: UInt64, reclaimableBlobs: [BlobRefRecord], reclaimableBlobCount: UInt64, reclaimableBlobBytes: UInt64, missingCandidates: UInt64) { - self.reachability = reachability - self.candidateBlobs = candidateBlobs - self.reclaimableBlobs = reclaimableBlobs - self.reclaimableBlobCount = reclaimableBlobCount - self.reclaimableBlobBytes = reclaimableBlobBytes - self.missingCandidates = missingCandidates + public init(baseRoot: Data?, changedRoot: Data?, spans: [ChangedSpanRecord]) { + self.baseRoot = baseRoot + self.changedRoot = changedRoot + self.spans = spans } - - + + } #if compiler(>=6) -extension BlobGcPlanRecord: Sendable {} +extension ChangedSpanHintRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeBlobGcPlanRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> BlobGcPlanRecord { +public struct FfiConverterTypeChangedSpanHintRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ChangedSpanHintRecord { return - try BlobGcPlanRecord( - reachability: FfiConverterTypeBlobGcReachabilityRecord.read(from: &buf), - candidateBlobs: FfiConverterUInt64.read(from: &buf), - reclaimableBlobs: FfiConverterSequenceTypeBlobRefRecord.read(from: &buf), - reclaimableBlobCount: FfiConverterUInt64.read(from: &buf), - reclaimableBlobBytes: FfiConverterUInt64.read(from: &buf), - missingCandidates: FfiConverterUInt64.read(from: &buf) + try ChangedSpanHintRecord( + baseRoot: FfiConverterOptionData.read(from: &buf), + changedRoot: FfiConverterOptionData.read(from: &buf), + spans: FfiConverterSequenceTypeChangedSpanRecord.read(from: &buf) ) } - public static func write(_ value: BlobGcPlanRecord, into buf: inout [UInt8]) { - FfiConverterTypeBlobGcReachabilityRecord.write(value.reachability, into: &buf) - FfiConverterUInt64.write(value.candidateBlobs, into: &buf) - FfiConverterSequenceTypeBlobRefRecord.write(value.reclaimableBlobs, into: &buf) - FfiConverterUInt64.write(value.reclaimableBlobCount, into: &buf) - FfiConverterUInt64.write(value.reclaimableBlobBytes, into: &buf) - FfiConverterUInt64.write(value.missingCandidates, into: &buf) + public static func write(_ value: ChangedSpanHintRecord, into buf: inout [UInt8]) { + FfiConverterOptionData.write(value.baseRoot, into: &buf) + FfiConverterOptionData.write(value.changedRoot, into: &buf) + FfiConverterSequenceTypeChangedSpanRecord.write(value.spans, into: &buf) } } @@ -13014,65 +13629,53 @@ public struct FfiConverterTypeBlobGcPlanRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeBlobGcPlanRecord_lift(_ buf: RustBuffer) throws -> BlobGcPlanRecord { - return try FfiConverterTypeBlobGcPlanRecord.lift(buf) +public func FfiConverterTypeChangedSpanHintRecord_lift(_ buf: RustBuffer) throws -> ChangedSpanHintRecord { + return try FfiConverterTypeChangedSpanHintRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeBlobGcPlanRecord_lower(_ value: BlobGcPlanRecord) -> RustBuffer { - return FfiConverterTypeBlobGcPlanRecord.lower(value) +public func FfiConverterTypeChangedSpanHintRecord_lower(_ value: ChangedSpanHintRecord) -> RustBuffer { + return FfiConverterTypeChangedSpanHintRecord.lower(value) } -public struct BlobGcReachabilityRecord: Equatable, Hashable { - public var liveBlobs: [BlobRefRecord] - public var liveBlobCount: UInt64 - public var liveBlobBytes: UInt64 - public var scannedNodes: UInt64 - public var scannedValues: UInt64 +public struct ChangedSpanRecord: Equatable, Hashable { + public var start: Data + public var end: Data? // Default memberwise initializers are never public by default, so we // declare one manually. - public init(liveBlobs: [BlobRefRecord], liveBlobCount: UInt64, liveBlobBytes: UInt64, scannedNodes: UInt64, scannedValues: UInt64) { - self.liveBlobs = liveBlobs - self.liveBlobCount = liveBlobCount - self.liveBlobBytes = liveBlobBytes - self.scannedNodes = scannedNodes - self.scannedValues = scannedValues + public init(start: Data, end: Data?) { + self.start = start + self.end = end } - - + + } #if compiler(>=6) -extension BlobGcReachabilityRecord: Sendable {} +extension ChangedSpanRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeBlobGcReachabilityRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> BlobGcReachabilityRecord { +public struct FfiConverterTypeChangedSpanRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ChangedSpanRecord { return - try BlobGcReachabilityRecord( - liveBlobs: FfiConverterSequenceTypeBlobRefRecord.read(from: &buf), - liveBlobCount: FfiConverterUInt64.read(from: &buf), - liveBlobBytes: FfiConverterUInt64.read(from: &buf), - scannedNodes: FfiConverterUInt64.read(from: &buf), - scannedValues: FfiConverterUInt64.read(from: &buf) + try ChangedSpanRecord( + start: FfiConverterData.read(from: &buf), + end: FfiConverterOptionData.read(from: &buf) ) } - public static func write(_ value: BlobGcReachabilityRecord, into buf: inout [UInt8]) { - FfiConverterSequenceTypeBlobRefRecord.write(value.liveBlobs, into: &buf) - FfiConverterUInt64.write(value.liveBlobCount, into: &buf) - FfiConverterUInt64.write(value.liveBlobBytes, into: &buf) - FfiConverterUInt64.write(value.scannedNodes, into: &buf) - FfiConverterUInt64.write(value.scannedValues, into: &buf) + public static func write(_ value: ChangedSpanRecord, into buf: inout [UInt8]) { + FfiConverterData.write(value.start, into: &buf) + FfiConverterOptionData.write(value.end, into: &buf) } } @@ -13080,57 +13683,65 @@ public struct FfiConverterTypeBlobGcReachabilityRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeBlobGcReachabilityRecord_lift(_ buf: RustBuffer) throws -> BlobGcReachabilityRecord { - return try FfiConverterTypeBlobGcReachabilityRecord.lift(buf) +public func FfiConverterTypeChangedSpanRecord_lift(_ buf: RustBuffer) throws -> ChangedSpanRecord { + return try FfiConverterTypeChangedSpanRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeBlobGcReachabilityRecord_lower(_ value: BlobGcReachabilityRecord) -> RustBuffer { - return FfiConverterTypeBlobGcReachabilityRecord.lower(value) +public func FfiConverterTypeChangedSpanRecord_lower(_ value: ChangedSpanRecord) -> RustBuffer { + return FfiConverterTypeChangedSpanRecord.lower(value) } -public struct BlobGcSweepRecord: Equatable, Hashable { - public var plan: BlobGcPlanRecord - public var deletedBlobs: UInt64 - public var deletedBlobBytes: UInt64 +public struct CompositeAcceleratorConfigRecord: Equatable, Hashable { + public var maxDeltaRecords: UInt64 + public var maxShadowRecords: UInt64 + public var maxDeltaRatioPpm: UInt32 + public var maxShadowRatioPpm: UInt32 + public var baseOverfetchMultiplier: UInt32 // Default memberwise initializers are never public by default, so we // declare one manually. - public init(plan: BlobGcPlanRecord, deletedBlobs: UInt64, deletedBlobBytes: UInt64) { - self.plan = plan - self.deletedBlobs = deletedBlobs - self.deletedBlobBytes = deletedBlobBytes + public init(maxDeltaRecords: UInt64, maxShadowRecords: UInt64, maxDeltaRatioPpm: UInt32, maxShadowRatioPpm: UInt32, baseOverfetchMultiplier: UInt32) { + self.maxDeltaRecords = maxDeltaRecords + self.maxShadowRecords = maxShadowRecords + self.maxDeltaRatioPpm = maxDeltaRatioPpm + self.maxShadowRatioPpm = maxShadowRatioPpm + self.baseOverfetchMultiplier = baseOverfetchMultiplier } - - + + } #if compiler(>=6) -extension BlobGcSweepRecord: Sendable {} +extension CompositeAcceleratorConfigRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeBlobGcSweepRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> BlobGcSweepRecord { +public struct FfiConverterTypeCompositeAcceleratorConfigRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> CompositeAcceleratorConfigRecord { return - try BlobGcSweepRecord( - plan: FfiConverterTypeBlobGcPlanRecord.read(from: &buf), - deletedBlobs: FfiConverterUInt64.read(from: &buf), - deletedBlobBytes: FfiConverterUInt64.read(from: &buf) + try CompositeAcceleratorConfigRecord( + maxDeltaRecords: FfiConverterUInt64.read(from: &buf), + maxShadowRecords: FfiConverterUInt64.read(from: &buf), + maxDeltaRatioPpm: FfiConverterUInt32.read(from: &buf), + maxShadowRatioPpm: FfiConverterUInt32.read(from: &buf), + baseOverfetchMultiplier: FfiConverterUInt32.read(from: &buf) ) } - public static func write(_ value: BlobGcSweepRecord, into buf: inout [UInt8]) { - FfiConverterTypeBlobGcPlanRecord.write(value.plan, into: &buf) - FfiConverterUInt64.write(value.deletedBlobs, into: &buf) - FfiConverterUInt64.write(value.deletedBlobBytes, into: &buf) + public static func write(_ value: CompositeAcceleratorConfigRecord, into buf: inout [UInt8]) { + FfiConverterUInt64.write(value.maxDeltaRecords, into: &buf) + FfiConverterUInt64.write(value.maxShadowRecords, into: &buf) + FfiConverterUInt32.write(value.maxDeltaRatioPpm, into: &buf) + FfiConverterUInt32.write(value.maxShadowRatioPpm, into: &buf) + FfiConverterUInt32.write(value.baseOverfetchMultiplier, into: &buf) } } @@ -13138,53 +13749,61 @@ public struct FfiConverterTypeBlobGcSweepRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeBlobGcSweepRecord_lift(_ buf: RustBuffer) throws -> BlobGcSweepRecord { - return try FfiConverterTypeBlobGcSweepRecord.lift(buf) +public func FfiConverterTypeCompositeAcceleratorConfigRecord_lift(_ buf: RustBuffer) throws -> CompositeAcceleratorConfigRecord { + return try FfiConverterTypeCompositeAcceleratorConfigRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeBlobGcSweepRecord_lower(_ value: BlobGcSweepRecord) -> RustBuffer { - return FfiConverterTypeBlobGcSweepRecord.lower(value) +public func FfiConverterTypeCompositeAcceleratorConfigRecord_lower(_ value: CompositeAcceleratorConfigRecord) -> RustBuffer { + return FfiConverterTypeCompositeAcceleratorConfigRecord.lower(value) } -public struct BlobRefRecord: Equatable, Hashable { - public var cid: Data - public var len: UInt64 +public struct CompositeBuildLimitsRecord: Equatable, Hashable { + public var maxDiffEntries: UInt64? + public var maxOwnedBytes: UInt64? + public var maxEncodedOutputBytes: UInt64? + public var maxDistanceEvaluations: UInt64? // Default memberwise initializers are never public by default, so we // declare one manually. - public init(cid: Data, len: UInt64) { - self.cid = cid - self.len = len + public init(maxDiffEntries: UInt64?, maxOwnedBytes: UInt64?, maxEncodedOutputBytes: UInt64?, maxDistanceEvaluations: UInt64?) { + self.maxDiffEntries = maxDiffEntries + self.maxOwnedBytes = maxOwnedBytes + self.maxEncodedOutputBytes = maxEncodedOutputBytes + self.maxDistanceEvaluations = maxDistanceEvaluations } - - + + } #if compiler(>=6) -extension BlobRefRecord: Sendable {} +extension CompositeBuildLimitsRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeBlobRefRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> BlobRefRecord { +public struct FfiConverterTypeCompositeBuildLimitsRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> CompositeBuildLimitsRecord { return - try BlobRefRecord( - cid: FfiConverterData.read(from: &buf), - len: FfiConverterUInt64.read(from: &buf) + try CompositeBuildLimitsRecord( + maxDiffEntries: FfiConverterOptionUInt64.read(from: &buf), + maxOwnedBytes: FfiConverterOptionUInt64.read(from: &buf), + maxEncodedOutputBytes: FfiConverterOptionUInt64.read(from: &buf), + maxDistanceEvaluations: FfiConverterOptionUInt64.read(from: &buf) ) } - public static func write(_ value: BlobRefRecord, into buf: inout [UInt8]) { - FfiConverterData.write(value.cid, into: &buf) - FfiConverterUInt64.write(value.len, into: &buf) + public static func write(_ value: CompositeBuildLimitsRecord, into buf: inout [UInt8]) { + FfiConverterOptionUInt64.write(value.maxDiffEntries, into: &buf) + FfiConverterOptionUInt64.write(value.maxOwnedBytes, into: &buf) + FfiConverterOptionUInt64.write(value.maxEncodedOutputBytes, into: &buf) + FfiConverterOptionUInt64.write(value.maxDistanceEvaluations, into: &buf) } } @@ -13192,53 +13811,85 @@ public struct FfiConverterTypeBlobRefRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeBlobRefRecord_lift(_ buf: RustBuffer) throws -> BlobRefRecord { - return try FfiConverterTypeBlobRefRecord.lift(buf) +public func FfiConverterTypeCompositeBuildLimitsRecord_lift(_ buf: RustBuffer) throws -> CompositeBuildLimitsRecord { + return try FfiConverterTypeCompositeBuildLimitsRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeBlobRefRecord_lower(_ value: BlobRefRecord) -> RustBuffer { - return FfiConverterTypeBlobRefRecord.lower(value) +public func FfiConverterTypeCompositeBuildLimitsRecord_lower(_ value: CompositeBuildLimitsRecord) -> RustBuffer { + return FfiConverterTypeCompositeBuildLimitsRecord.lower(value) } -public struct BytesListResultRecord: Equatable, Hashable { - public var values: [Data] - public var error: StoreErrorRecord? +public struct CompositeBuildOrRebuildOutcomeRecord { + public var kind: CompositeBuildOrRebuildKindRecord + public var composite: BindingCompositeAccelerator? + public var hnsw: BindingHnswIndex? + public var pq: BindingProductQuantizer? + public var turboquant: BindingTurboQuantizer? + public var reasons: [FullRebuildReasonRecord] + public var compositeStats: CompositeBuildStatsRecord + public var hnswStats: HnswBuildStatsRecord? + public var pqStats: ProductQuantizationBuildStatsRecord? + public var turboquantStats: TurboQuantizationBuildStatsRecord? // Default memberwise initializers are never public by default, so we // declare one manually. - public init(values: [Data], error: StoreErrorRecord?) { - self.values = values - self.error = error + public init(kind: CompositeBuildOrRebuildKindRecord, composite: BindingCompositeAccelerator?, hnsw: BindingHnswIndex?, pq: BindingProductQuantizer?, turboquant: BindingTurboQuantizer?, reasons: [FullRebuildReasonRecord], compositeStats: CompositeBuildStatsRecord, hnswStats: HnswBuildStatsRecord?, pqStats: ProductQuantizationBuildStatsRecord?, turboquantStats: TurboQuantizationBuildStatsRecord?) { + self.kind = kind + self.composite = composite + self.hnsw = hnsw + self.pq = pq + self.turboquant = turboquant + self.reasons = reasons + self.compositeStats = compositeStats + self.hnswStats = hnswStats + self.pqStats = pqStats + self.turboquantStats = turboquantStats } - - + + } #if compiler(>=6) -extension BytesListResultRecord: Sendable {} +extension CompositeBuildOrRebuildOutcomeRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeBytesListResultRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> BytesListResultRecord { +public struct FfiConverterTypeCompositeBuildOrRebuildOutcomeRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> CompositeBuildOrRebuildOutcomeRecord { return - try BytesListResultRecord( - values: FfiConverterSequenceData.read(from: &buf), - error: FfiConverterOptionTypeStoreErrorRecord.read(from: &buf) + try CompositeBuildOrRebuildOutcomeRecord( + kind: FfiConverterTypeCompositeBuildOrRebuildKindRecord.read(from: &buf), + composite: FfiConverterOptionTypeBindingCompositeAccelerator.read(from: &buf), + hnsw: FfiConverterOptionTypeBindingHnswIndex.read(from: &buf), + pq: FfiConverterOptionTypeBindingProductQuantizer.read(from: &buf), + turboquant: FfiConverterOptionTypeBindingTurboQuantizer.read(from: &buf), + reasons: FfiConverterSequenceTypeFullRebuildReasonRecord.read(from: &buf), + compositeStats: FfiConverterTypeCompositeBuildStatsRecord.read(from: &buf), + hnswStats: FfiConverterOptionTypeHnswBuildStatsRecord.read(from: &buf), + pqStats: FfiConverterOptionTypeProductQuantizationBuildStatsRecord.read(from: &buf), + turboquantStats: FfiConverterOptionTypeTurboQuantizationBuildStatsRecord.read(from: &buf) ) } - public static func write(_ value: BytesListResultRecord, into buf: inout [UInt8]) { - FfiConverterSequenceData.write(value.values, into: &buf) - FfiConverterOptionTypeStoreErrorRecord.write(value.error, into: &buf) + public static func write(_ value: CompositeBuildOrRebuildOutcomeRecord, into buf: inout [UInt8]) { + FfiConverterTypeCompositeBuildOrRebuildKindRecord.write(value.kind, into: &buf) + FfiConverterOptionTypeBindingCompositeAccelerator.write(value.composite, into: &buf) + FfiConverterOptionTypeBindingHnswIndex.write(value.hnsw, into: &buf) + FfiConverterOptionTypeBindingProductQuantizer.write(value.pq, into: &buf) + FfiConverterOptionTypeBindingTurboQuantizer.write(value.turboquant, into: &buf) + FfiConverterSequenceTypeFullRebuildReasonRecord.write(value.reasons, into: &buf) + FfiConverterTypeCompositeBuildStatsRecord.write(value.compositeStats, into: &buf) + FfiConverterOptionTypeHnswBuildStatsRecord.write(value.hnswStats, into: &buf) + FfiConverterOptionTypeProductQuantizationBuildStatsRecord.write(value.pqStats, into: &buf) + FfiConverterOptionTypeTurboQuantizationBuildStatsRecord.write(value.turboquantStats, into: &buf) } } @@ -13246,61 +13897,57 @@ public struct FfiConverterTypeBytesListResultRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeBytesListResultRecord_lift(_ buf: RustBuffer) throws -> BytesListResultRecord { - return try FfiConverterTypeBytesListResultRecord.lift(buf) +public func FfiConverterTypeCompositeBuildOrRebuildOutcomeRecord_lift(_ buf: RustBuffer) throws -> CompositeBuildOrRebuildOutcomeRecord { + return try FfiConverterTypeCompositeBuildOrRebuildOutcomeRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeBytesListResultRecord_lower(_ value: BytesListResultRecord) -> RustBuffer { - return FfiConverterTypeBytesListResultRecord.lower(value) +public func FfiConverterTypeCompositeBuildOrRebuildOutcomeRecord_lower(_ value: CompositeBuildOrRebuildOutcomeRecord) -> RustBuffer { + return FfiConverterTypeCompositeBuildOrRebuildOutcomeRecord.lower(value) } -public struct CacheStatsRecord: Equatable, Hashable { - public var cachedNodes: UInt64 - public var cachedBytes: UInt64 - public var pinnedNodes: UInt64 - public var pinnedBytes: UInt64 +public struct CompositeBuildOutcomeRecord { + public var accelerator: BindingCompositeAccelerator? + public var reasons: [FullRebuildReasonRecord] + public var stats: CompositeBuildStatsRecord // Default memberwise initializers are never public by default, so we // declare one manually. - public init(cachedNodes: UInt64, cachedBytes: UInt64, pinnedNodes: UInt64, pinnedBytes: UInt64) { - self.cachedNodes = cachedNodes - self.cachedBytes = cachedBytes - self.pinnedNodes = pinnedNodes - self.pinnedBytes = pinnedBytes + public init(accelerator: BindingCompositeAccelerator?, reasons: [FullRebuildReasonRecord], stats: CompositeBuildStatsRecord) { + self.accelerator = accelerator + self.reasons = reasons + self.stats = stats } - - + + } #if compiler(>=6) -extension CacheStatsRecord: Sendable {} +extension CompositeBuildOutcomeRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeCacheStatsRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> CacheStatsRecord { +public struct FfiConverterTypeCompositeBuildOutcomeRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> CompositeBuildOutcomeRecord { return - try CacheStatsRecord( - cachedNodes: FfiConverterUInt64.read(from: &buf), - cachedBytes: FfiConverterUInt64.read(from: &buf), - pinnedNodes: FfiConverterUInt64.read(from: &buf), - pinnedBytes: FfiConverterUInt64.read(from: &buf) + try CompositeBuildOutcomeRecord( + accelerator: FfiConverterOptionTypeBindingCompositeAccelerator.read(from: &buf), + reasons: FfiConverterSequenceTypeFullRebuildReasonRecord.read(from: &buf), + stats: FfiConverterTypeCompositeBuildStatsRecord.read(from: &buf) ) } - public static func write(_ value: CacheStatsRecord, into buf: inout [UInt8]) { - FfiConverterUInt64.write(value.cachedNodes, into: &buf) - FfiConverterUInt64.write(value.cachedBytes, into: &buf) - FfiConverterUInt64.write(value.pinnedNodes, into: &buf) - FfiConverterUInt64.write(value.pinnedBytes, into: &buf) + public static func write(_ value: CompositeBuildOutcomeRecord, into buf: inout [UInt8]) { + FfiConverterOptionTypeBindingCompositeAccelerator.write(value.accelerator, into: &buf) + FfiConverterSequenceTypeFullRebuildReasonRecord.write(value.reasons, into: &buf) + FfiConverterTypeCompositeBuildStatsRecord.write(value.stats, into: &buf) } } @@ -13308,57 +13955,85 @@ public struct FfiConverterTypeCacheStatsRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeCacheStatsRecord_lift(_ buf: RustBuffer) throws -> CacheStatsRecord { - return try FfiConverterTypeCacheStatsRecord.lift(buf) +public func FfiConverterTypeCompositeBuildOutcomeRecord_lift(_ buf: RustBuffer) throws -> CompositeBuildOutcomeRecord { + return try FfiConverterTypeCompositeBuildOutcomeRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeCacheStatsRecord_lower(_ value: CacheStatsRecord) -> RustBuffer { - return FfiConverterTypeCacheStatsRecord.lower(value) +public func FfiConverterTypeCompositeBuildOutcomeRecord_lower(_ value: CompositeBuildOutcomeRecord) -> RustBuffer { + return FfiConverterTypeCompositeBuildOutcomeRecord.lower(value) } -public struct ChangedSpanHintRecord: Equatable, Hashable { - public var baseRoot: Data? - public var changedRoot: Data? - public var spans: [ChangedSpanRecord] +public struct CompositeBuildStatsRecord: Equatable, Hashable { + public var diffEntries: UInt64 + public var insertedRecords: UInt64 + public var vectorUpdatedRecords: UInt64 + public var valueOnlyRecords: UInt64 + public var deletedRecords: UInt64 + public var deltaRecords: UInt64 + public var shadowRecords: UInt64 + public var ownedBytesPeak: UInt64 + public var encodedOutputBytes: UInt64 + public var distanceEvaluations: UInt64 // Default memberwise initializers are never public by default, so we // declare one manually. - public init(baseRoot: Data?, changedRoot: Data?, spans: [ChangedSpanRecord]) { - self.baseRoot = baseRoot - self.changedRoot = changedRoot - self.spans = spans + public init(diffEntries: UInt64, insertedRecords: UInt64, vectorUpdatedRecords: UInt64, valueOnlyRecords: UInt64, deletedRecords: UInt64, deltaRecords: UInt64, shadowRecords: UInt64, ownedBytesPeak: UInt64, encodedOutputBytes: UInt64, distanceEvaluations: UInt64) { + self.diffEntries = diffEntries + self.insertedRecords = insertedRecords + self.vectorUpdatedRecords = vectorUpdatedRecords + self.valueOnlyRecords = valueOnlyRecords + self.deletedRecords = deletedRecords + self.deltaRecords = deltaRecords + self.shadowRecords = shadowRecords + self.ownedBytesPeak = ownedBytesPeak + self.encodedOutputBytes = encodedOutputBytes + self.distanceEvaluations = distanceEvaluations } - - + + } #if compiler(>=6) -extension ChangedSpanHintRecord: Sendable {} +extension CompositeBuildStatsRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeChangedSpanHintRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ChangedSpanHintRecord { +public struct FfiConverterTypeCompositeBuildStatsRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> CompositeBuildStatsRecord { return - try ChangedSpanHintRecord( - baseRoot: FfiConverterOptionData.read(from: &buf), - changedRoot: FfiConverterOptionData.read(from: &buf), - spans: FfiConverterSequenceTypeChangedSpanRecord.read(from: &buf) + try CompositeBuildStatsRecord( + diffEntries: FfiConverterUInt64.read(from: &buf), + insertedRecords: FfiConverterUInt64.read(from: &buf), + vectorUpdatedRecords: FfiConverterUInt64.read(from: &buf), + valueOnlyRecords: FfiConverterUInt64.read(from: &buf), + deletedRecords: FfiConverterUInt64.read(from: &buf), + deltaRecords: FfiConverterUInt64.read(from: &buf), + shadowRecords: FfiConverterUInt64.read(from: &buf), + ownedBytesPeak: FfiConverterUInt64.read(from: &buf), + encodedOutputBytes: FfiConverterUInt64.read(from: &buf), + distanceEvaluations: FfiConverterUInt64.read(from: &buf) ) } - public static func write(_ value: ChangedSpanHintRecord, into buf: inout [UInt8]) { - FfiConverterOptionData.write(value.baseRoot, into: &buf) - FfiConverterOptionData.write(value.changedRoot, into: &buf) - FfiConverterSequenceTypeChangedSpanRecord.write(value.spans, into: &buf) + public static func write(_ value: CompositeBuildStatsRecord, into buf: inout [UInt8]) { + FfiConverterUInt64.write(value.diffEntries, into: &buf) + FfiConverterUInt64.write(value.insertedRecords, into: &buf) + FfiConverterUInt64.write(value.vectorUpdatedRecords, into: &buf) + FfiConverterUInt64.write(value.valueOnlyRecords, into: &buf) + FfiConverterUInt64.write(value.deletedRecords, into: &buf) + FfiConverterUInt64.write(value.deltaRecords, into: &buf) + FfiConverterUInt64.write(value.shadowRecords, into: &buf) + FfiConverterUInt64.write(value.ownedBytesPeak, into: &buf) + FfiConverterUInt64.write(value.encodedOutputBytes, into: &buf) + FfiConverterUInt64.write(value.distanceEvaluations, into: &buf) } } @@ -13366,53 +14041,65 @@ public struct FfiConverterTypeChangedSpanHintRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeChangedSpanHintRecord_lift(_ buf: RustBuffer) throws -> ChangedSpanHintRecord { - return try FfiConverterTypeChangedSpanHintRecord.lift(buf) +public func FfiConverterTypeCompositeBuildStatsRecord_lift(_ buf: RustBuffer) throws -> CompositeBuildStatsRecord { + return try FfiConverterTypeCompositeBuildStatsRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeChangedSpanHintRecord_lower(_ value: ChangedSpanHintRecord) -> RustBuffer { - return FfiConverterTypeChangedSpanHintRecord.lower(value) +public func FfiConverterTypeCompositeBuildStatsRecord_lower(_ value: CompositeBuildStatsRecord) -> RustBuffer { + return FfiConverterTypeCompositeBuildStatsRecord.lower(value) } -public struct ChangedSpanRecord: Equatable, Hashable { - public var start: Data - public var end: Data? +public struct CompositeRebuildOptionsRecord: Equatable, Hashable { + public var hnswLimits: HnswBuildLimitsRecord + public var pqWorkerThreads: UInt64 + public var pqLimits: ProductQuantizationBuildLimitsRecord + public var turboquantWorkerThreads: UInt64 + public var turboquantLimits: TurboQuantizationBuildLimitsRecord // Default memberwise initializers are never public by default, so we // declare one manually. - public init(start: Data, end: Data?) { - self.start = start - self.end = end + public init(hnswLimits: HnswBuildLimitsRecord, pqWorkerThreads: UInt64, pqLimits: ProductQuantizationBuildLimitsRecord, turboquantWorkerThreads: UInt64, turboquantLimits: TurboQuantizationBuildLimitsRecord) { + self.hnswLimits = hnswLimits + self.pqWorkerThreads = pqWorkerThreads + self.pqLimits = pqLimits + self.turboquantWorkerThreads = turboquantWorkerThreads + self.turboquantLimits = turboquantLimits } - - + + } #if compiler(>=6) -extension ChangedSpanRecord: Sendable {} +extension CompositeRebuildOptionsRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeChangedSpanRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ChangedSpanRecord { +public struct FfiConverterTypeCompositeRebuildOptionsRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> CompositeRebuildOptionsRecord { return - try ChangedSpanRecord( - start: FfiConverterData.read(from: &buf), - end: FfiConverterOptionData.read(from: &buf) + try CompositeRebuildOptionsRecord( + hnswLimits: FfiConverterTypeHnswBuildLimitsRecord.read(from: &buf), + pqWorkerThreads: FfiConverterUInt64.read(from: &buf), + pqLimits: FfiConverterTypeProductQuantizationBuildLimitsRecord.read(from: &buf), + turboquantWorkerThreads: FfiConverterUInt64.read(from: &buf), + turboquantLimits: FfiConverterTypeTurboQuantizationBuildLimitsRecord.read(from: &buf) ) } - public static func write(_ value: ChangedSpanRecord, into buf: inout [UInt8]) { - FfiConverterData.write(value.start, into: &buf) - FfiConverterOptionData.write(value.end, into: &buf) + public static func write(_ value: CompositeRebuildOptionsRecord, into buf: inout [UInt8]) { + FfiConverterTypeHnswBuildLimitsRecord.write(value.hnswLimits, into: &buf) + FfiConverterUInt64.write(value.pqWorkerThreads, into: &buf) + FfiConverterTypeProductQuantizationBuildLimitsRecord.write(value.pqLimits, into: &buf) + FfiConverterUInt64.write(value.turboquantWorkerThreads, into: &buf) + FfiConverterTypeTurboQuantizationBuildLimitsRecord.write(value.turboquantLimits, into: &buf) } } @@ -13420,65 +14107,77 @@ public struct FfiConverterTypeChangedSpanRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeChangedSpanRecord_lift(_ buf: RustBuffer) throws -> ChangedSpanRecord { - return try FfiConverterTypeChangedSpanRecord.lift(buf) +public func FfiConverterTypeCompositeRebuildOptionsRecord_lift(_ buf: RustBuffer) throws -> CompositeRebuildOptionsRecord { + return try FfiConverterTypeCompositeRebuildOptionsRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeChangedSpanRecord_lower(_ value: ChangedSpanRecord) -> RustBuffer { - return FfiConverterTypeChangedSpanRecord.lower(value) +public func FfiConverterTypeCompositeRebuildOptionsRecord_lower(_ value: CompositeRebuildOptionsRecord) -> RustBuffer { + return FfiConverterTypeCompositeRebuildOptionsRecord.lower(value) } -public struct CompositeAcceleratorConfigRecord: Equatable, Hashable { - public var maxDeltaRecords: UInt64 - public var maxShadowRecords: UInt64 - public var maxDeltaRatioPpm: UInt32 - public var maxShadowRatioPpm: UInt32 - public var baseOverfetchMultiplier: UInt32 +public struct ConfigRecord: Equatable, Hashable { + public var minChunkSize: UInt64 + public var maxChunkSize: UInt64 + public var chunkingFactor: UInt32 + public var hashSeed: UInt64 + public var encoding: EncodingRecord + public var nodeCacheMaxNodes: UInt64? + public var nodeCacheMaxBytes: UInt64? + public var formatBytes: Data? // Default memberwise initializers are never public by default, so we // declare one manually. - public init(maxDeltaRecords: UInt64, maxShadowRecords: UInt64, maxDeltaRatioPpm: UInt32, maxShadowRatioPpm: UInt32, baseOverfetchMultiplier: UInt32) { - self.maxDeltaRecords = maxDeltaRecords - self.maxShadowRecords = maxShadowRecords - self.maxDeltaRatioPpm = maxDeltaRatioPpm - self.maxShadowRatioPpm = maxShadowRatioPpm - self.baseOverfetchMultiplier = baseOverfetchMultiplier + public init(minChunkSize: UInt64, maxChunkSize: UInt64, chunkingFactor: UInt32, hashSeed: UInt64, encoding: EncodingRecord, nodeCacheMaxNodes: UInt64?, nodeCacheMaxBytes: UInt64?, formatBytes: Data?) { + self.minChunkSize = minChunkSize + self.maxChunkSize = maxChunkSize + self.chunkingFactor = chunkingFactor + self.hashSeed = hashSeed + self.encoding = encoding + self.nodeCacheMaxNodes = nodeCacheMaxNodes + self.nodeCacheMaxBytes = nodeCacheMaxBytes + self.formatBytes = formatBytes } - - + + } #if compiler(>=6) -extension CompositeAcceleratorConfigRecord: Sendable {} +extension ConfigRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeCompositeAcceleratorConfigRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> CompositeAcceleratorConfigRecord { +public struct FfiConverterTypeConfigRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ConfigRecord { return - try CompositeAcceleratorConfigRecord( - maxDeltaRecords: FfiConverterUInt64.read(from: &buf), - maxShadowRecords: FfiConverterUInt64.read(from: &buf), - maxDeltaRatioPpm: FfiConverterUInt32.read(from: &buf), - maxShadowRatioPpm: FfiConverterUInt32.read(from: &buf), - baseOverfetchMultiplier: FfiConverterUInt32.read(from: &buf) + try ConfigRecord( + minChunkSize: FfiConverterUInt64.read(from: &buf), + maxChunkSize: FfiConverterUInt64.read(from: &buf), + chunkingFactor: FfiConverterUInt32.read(from: &buf), + hashSeed: FfiConverterUInt64.read(from: &buf), + encoding: FfiConverterTypeEncodingRecord.read(from: &buf), + nodeCacheMaxNodes: FfiConverterOptionUInt64.read(from: &buf), + nodeCacheMaxBytes: FfiConverterOptionUInt64.read(from: &buf), + formatBytes: FfiConverterOptionData.read(from: &buf) ) } - public static func write(_ value: CompositeAcceleratorConfigRecord, into buf: inout [UInt8]) { - FfiConverterUInt64.write(value.maxDeltaRecords, into: &buf) - FfiConverterUInt64.write(value.maxShadowRecords, into: &buf) - FfiConverterUInt32.write(value.maxDeltaRatioPpm, into: &buf) - FfiConverterUInt32.write(value.maxShadowRatioPpm, into: &buf) - FfiConverterUInt32.write(value.baseOverfetchMultiplier, into: &buf) + public static func write(_ value: ConfigRecord, into buf: inout [UInt8]) { + FfiConverterUInt64.write(value.minChunkSize, into: &buf) + FfiConverterUInt64.write(value.maxChunkSize, into: &buf) + FfiConverterUInt32.write(value.chunkingFactor, into: &buf) + FfiConverterUInt64.write(value.hashSeed, into: &buf) + FfiConverterTypeEncodingRecord.write(value.encoding, into: &buf) + FfiConverterOptionUInt64.write(value.nodeCacheMaxNodes, into: &buf) + FfiConverterOptionUInt64.write(value.nodeCacheMaxBytes, into: &buf) + FfiConverterOptionData.write(value.formatBytes, into: &buf) } } @@ -13486,61 +14185,53 @@ public struct FfiConverterTypeCompositeAcceleratorConfigRecord: FfiConverterRust #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeCompositeAcceleratorConfigRecord_lift(_ buf: RustBuffer) throws -> CompositeAcceleratorConfigRecord { - return try FfiConverterTypeCompositeAcceleratorConfigRecord.lift(buf) +public func FfiConverterTypeConfigRecord_lift(_ buf: RustBuffer) throws -> ConfigRecord { + return try FfiConverterTypeConfigRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeCompositeAcceleratorConfigRecord_lower(_ value: CompositeAcceleratorConfigRecord) -> RustBuffer { - return FfiConverterTypeCompositeAcceleratorConfigRecord.lower(value) +public func FfiConverterTypeConfigRecord_lower(_ value: ConfigRecord) -> RustBuffer { + return FfiConverterTypeConfigRecord.lower(value) } -public struct CompositeBuildLimitsRecord: Equatable, Hashable { - public var maxDiffEntries: UInt64? - public var maxOwnedBytes: UInt64? - public var maxEncodedOutputBytes: UInt64? - public var maxDistanceEvaluations: UInt64? +public struct ConflictPageRecord: Equatable, Hashable { + public var conflicts: [ConflictRecord] + public var nextCursor: RangeCursorRecord? // Default memberwise initializers are never public by default, so we // declare one manually. - public init(maxDiffEntries: UInt64?, maxOwnedBytes: UInt64?, maxEncodedOutputBytes: UInt64?, maxDistanceEvaluations: UInt64?) { - self.maxDiffEntries = maxDiffEntries - self.maxOwnedBytes = maxOwnedBytes - self.maxEncodedOutputBytes = maxEncodedOutputBytes - self.maxDistanceEvaluations = maxDistanceEvaluations + public init(conflicts: [ConflictRecord], nextCursor: RangeCursorRecord?) { + self.conflicts = conflicts + self.nextCursor = nextCursor } - - + + } #if compiler(>=6) -extension CompositeBuildLimitsRecord: Sendable {} +extension ConflictPageRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeCompositeBuildLimitsRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> CompositeBuildLimitsRecord { +public struct FfiConverterTypeConflictPageRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ConflictPageRecord { return - try CompositeBuildLimitsRecord( - maxDiffEntries: FfiConverterOptionUInt64.read(from: &buf), - maxOwnedBytes: FfiConverterOptionUInt64.read(from: &buf), - maxEncodedOutputBytes: FfiConverterOptionUInt64.read(from: &buf), - maxDistanceEvaluations: FfiConverterOptionUInt64.read(from: &buf) + try ConflictPageRecord( + conflicts: FfiConverterSequenceTypeConflictRecord.read(from: &buf), + nextCursor: FfiConverterOptionTypeRangeCursorRecord.read(from: &buf) ) } - public static func write(_ value: CompositeBuildLimitsRecord, into buf: inout [UInt8]) { - FfiConverterOptionUInt64.write(value.maxDiffEntries, into: &buf) - FfiConverterOptionUInt64.write(value.maxOwnedBytes, into: &buf) - FfiConverterOptionUInt64.write(value.maxEncodedOutputBytes, into: &buf) - FfiConverterOptionUInt64.write(value.maxDistanceEvaluations, into: &buf) + public static func write(_ value: ConflictPageRecord, into buf: inout [UInt8]) { + FfiConverterSequenceTypeConflictRecord.write(value.conflicts, into: &buf) + FfiConverterOptionTypeRangeCursorRecord.write(value.nextCursor, into: &buf) } } @@ -13548,77 +14239,61 @@ public struct FfiConverterTypeCompositeBuildLimitsRecord: FfiConverterRustBuffer #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeCompositeBuildLimitsRecord_lift(_ buf: RustBuffer) throws -> CompositeBuildLimitsRecord { - return try FfiConverterTypeCompositeBuildLimitsRecord.lift(buf) +public func FfiConverterTypeConflictPageRecord_lift(_ buf: RustBuffer) throws -> ConflictPageRecord { + return try FfiConverterTypeConflictPageRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeCompositeBuildLimitsRecord_lower(_ value: CompositeBuildLimitsRecord) -> RustBuffer { - return FfiConverterTypeCompositeBuildLimitsRecord.lower(value) +public func FfiConverterTypeConflictPageRecord_lower(_ value: ConflictPageRecord) -> RustBuffer { + return FfiConverterTypeConflictPageRecord.lower(value) } -public struct CompositeBuildOrRebuildOutcomeRecord { - public var kind: CompositeBuildOrRebuildKindRecord - public var composite: BindingCompositeAccelerator? - public var hnsw: BindingHnswIndex? - public var pq: BindingProductQuantizer? - public var reasons: [FullRebuildReasonRecord] - public var compositeStats: CompositeBuildStatsRecord - public var hnswStats: HnswBuildStatsRecord? - public var pqStats: ProductQuantizationBuildStatsRecord? +public struct ConflictRecord: Equatable, Hashable { + public var key: Data + public var base: Data? + public var left: Data? + public var right: Data? // Default memberwise initializers are never public by default, so we // declare one manually. - public init(kind: CompositeBuildOrRebuildKindRecord, composite: BindingCompositeAccelerator?, hnsw: BindingHnswIndex?, pq: BindingProductQuantizer?, reasons: [FullRebuildReasonRecord], compositeStats: CompositeBuildStatsRecord, hnswStats: HnswBuildStatsRecord?, pqStats: ProductQuantizationBuildStatsRecord?) { - self.kind = kind - self.composite = composite - self.hnsw = hnsw - self.pq = pq - self.reasons = reasons - self.compositeStats = compositeStats - self.hnswStats = hnswStats - self.pqStats = pqStats + public init(key: Data, base: Data?, left: Data?, right: Data?) { + self.key = key + self.base = base + self.left = left + self.right = right } - - + + } #if compiler(>=6) -extension CompositeBuildOrRebuildOutcomeRecord: Sendable {} +extension ConflictRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeCompositeBuildOrRebuildOutcomeRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> CompositeBuildOrRebuildOutcomeRecord { +public struct FfiConverterTypeConflictRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ConflictRecord { return - try CompositeBuildOrRebuildOutcomeRecord( - kind: FfiConverterTypeCompositeBuildOrRebuildKindRecord.read(from: &buf), - composite: FfiConverterOptionTypeBindingCompositeAccelerator.read(from: &buf), - hnsw: FfiConverterOptionTypeBindingHnswIndex.read(from: &buf), - pq: FfiConverterOptionTypeBindingProductQuantizer.read(from: &buf), - reasons: FfiConverterSequenceTypeFullRebuildReasonRecord.read(from: &buf), - compositeStats: FfiConverterTypeCompositeBuildStatsRecord.read(from: &buf), - hnswStats: FfiConverterOptionTypeHnswBuildStatsRecord.read(from: &buf), - pqStats: FfiConverterOptionTypeProductQuantizationBuildStatsRecord.read(from: &buf) + try ConflictRecord( + key: FfiConverterData.read(from: &buf), + base: FfiConverterOptionData.read(from: &buf), + left: FfiConverterOptionData.read(from: &buf), + right: FfiConverterOptionData.read(from: &buf) ) } - public static func write(_ value: CompositeBuildOrRebuildOutcomeRecord, into buf: inout [UInt8]) { - FfiConverterTypeCompositeBuildOrRebuildKindRecord.write(value.kind, into: &buf) - FfiConverterOptionTypeBindingCompositeAccelerator.write(value.composite, into: &buf) - FfiConverterOptionTypeBindingHnswIndex.write(value.hnsw, into: &buf) - FfiConverterOptionTypeBindingProductQuantizer.write(value.pq, into: &buf) - FfiConverterSequenceTypeFullRebuildReasonRecord.write(value.reasons, into: &buf) - FfiConverterTypeCompositeBuildStatsRecord.write(value.compositeStats, into: &buf) - FfiConverterOptionTypeHnswBuildStatsRecord.write(value.hnswStats, into: &buf) - FfiConverterOptionTypeProductQuantizationBuildStatsRecord.write(value.pqStats, into: &buf) + public static func write(_ value: ConflictRecord, into buf: inout [UInt8]) { + FfiConverterData.write(value.key, into: &buf) + FfiConverterOptionData.write(value.base, into: &buf) + FfiConverterOptionData.write(value.left, into: &buf) + FfiConverterOptionData.write(value.right, into: &buf) } } @@ -13626,57 +14301,61 @@ public struct FfiConverterTypeCompositeBuildOrRebuildOutcomeRecord: FfiConverter #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeCompositeBuildOrRebuildOutcomeRecord_lift(_ buf: RustBuffer) throws -> CompositeBuildOrRebuildOutcomeRecord { - return try FfiConverterTypeCompositeBuildOrRebuildOutcomeRecord.lift(buf) +public func FfiConverterTypeConflictRecord_lift(_ buf: RustBuffer) throws -> ConflictRecord { + return try FfiConverterTypeConflictRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeCompositeBuildOrRebuildOutcomeRecord_lower(_ value: CompositeBuildOrRebuildOutcomeRecord) -> RustBuffer { - return FfiConverterTypeCompositeBuildOrRebuildOutcomeRecord.lower(value) +public func FfiConverterTypeConflictRecord_lower(_ value: ConflictRecord) -> RustBuffer { + return FfiConverterTypeConflictRecord.lower(value) } -public struct CompositeBuildOutcomeRecord { - public var accelerator: BindingCompositeAccelerator? - public var reasons: [FullRebuildReasonRecord] - public var stats: CompositeBuildStatsRecord +public struct ContentGraphLimitsRecord: Equatable, Hashable { + public var maxObjects: UInt64 + public var maxDepth: UInt64 + public var maxBytes: UInt64 + public var maxReferencesPerObject: UInt64 // Default memberwise initializers are never public by default, so we // declare one manually. - public init(accelerator: BindingCompositeAccelerator?, reasons: [FullRebuildReasonRecord], stats: CompositeBuildStatsRecord) { - self.accelerator = accelerator - self.reasons = reasons - self.stats = stats + public init(maxObjects: UInt64, maxDepth: UInt64, maxBytes: UInt64, maxReferencesPerObject: UInt64) { + self.maxObjects = maxObjects + self.maxDepth = maxDepth + self.maxBytes = maxBytes + self.maxReferencesPerObject = maxReferencesPerObject } - - + + } #if compiler(>=6) -extension CompositeBuildOutcomeRecord: Sendable {} +extension ContentGraphLimitsRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeCompositeBuildOutcomeRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> CompositeBuildOutcomeRecord { +public struct FfiConverterTypeContentGraphLimitsRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ContentGraphLimitsRecord { return - try CompositeBuildOutcomeRecord( - accelerator: FfiConverterOptionTypeBindingCompositeAccelerator.read(from: &buf), - reasons: FfiConverterSequenceTypeFullRebuildReasonRecord.read(from: &buf), - stats: FfiConverterTypeCompositeBuildStatsRecord.read(from: &buf) + try ContentGraphLimitsRecord( + maxObjects: FfiConverterUInt64.read(from: &buf), + maxDepth: FfiConverterUInt64.read(from: &buf), + maxBytes: FfiConverterUInt64.read(from: &buf), + maxReferencesPerObject: FfiConverterUInt64.read(from: &buf) ) } - public static func write(_ value: CompositeBuildOutcomeRecord, into buf: inout [UInt8]) { - FfiConverterOptionTypeBindingCompositeAccelerator.write(value.accelerator, into: &buf) - FfiConverterSequenceTypeFullRebuildReasonRecord.write(value.reasons, into: &buf) - FfiConverterTypeCompositeBuildStatsRecord.write(value.stats, into: &buf) + public static func write(_ value: ContentGraphLimitsRecord, into buf: inout [UInt8]) { + FfiConverterUInt64.write(value.maxObjects, into: &buf) + FfiConverterUInt64.write(value.maxDepth, into: &buf) + FfiConverterUInt64.write(value.maxBytes, into: &buf) + FfiConverterUInt64.write(value.maxReferencesPerObject, into: &buf) } } @@ -13684,85 +14363,53 @@ public struct FfiConverterTypeCompositeBuildOutcomeRecord: FfiConverterRustBuffe #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeCompositeBuildOutcomeRecord_lift(_ buf: RustBuffer) throws -> CompositeBuildOutcomeRecord { - return try FfiConverterTypeCompositeBuildOutcomeRecord.lift(buf) +public func FfiConverterTypeContentGraphLimitsRecord_lift(_ buf: RustBuffer) throws -> ContentGraphLimitsRecord { + return try FfiConverterTypeContentGraphLimitsRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeCompositeBuildOutcomeRecord_lower(_ value: CompositeBuildOutcomeRecord) -> RustBuffer { - return FfiConverterTypeCompositeBuildOutcomeRecord.lower(value) +public func FfiConverterTypeContentGraphLimitsRecord_lower(_ value: ContentGraphLimitsRecord) -> RustBuffer { + return FfiConverterTypeContentGraphLimitsRecord.lower(value) } -public struct CompositeBuildStatsRecord: Equatable, Hashable { - public var diffEntries: UInt64 - public var insertedRecords: UInt64 - public var vectorUpdatedRecords: UInt64 - public var valueOnlyRecords: UInt64 - public var deletedRecords: UInt64 - public var deltaRecords: UInt64 - public var shadowRecords: UInt64 - public var ownedBytesPeak: UInt64 - public var encodedOutputBytes: UInt64 - public var distanceEvaluations: UInt64 +public struct CrdtConfigRecord: Equatable, Hashable { + public var strategy: CrdtMergeStrategyKind + public var deletePolicy: CrdtDeletePolicyKind // Default memberwise initializers are never public by default, so we // declare one manually. - public init(diffEntries: UInt64, insertedRecords: UInt64, vectorUpdatedRecords: UInt64, valueOnlyRecords: UInt64, deletedRecords: UInt64, deltaRecords: UInt64, shadowRecords: UInt64, ownedBytesPeak: UInt64, encodedOutputBytes: UInt64, distanceEvaluations: UInt64) { - self.diffEntries = diffEntries - self.insertedRecords = insertedRecords - self.vectorUpdatedRecords = vectorUpdatedRecords - self.valueOnlyRecords = valueOnlyRecords - self.deletedRecords = deletedRecords - self.deltaRecords = deltaRecords - self.shadowRecords = shadowRecords - self.ownedBytesPeak = ownedBytesPeak - self.encodedOutputBytes = encodedOutputBytes - self.distanceEvaluations = distanceEvaluations + public init(strategy: CrdtMergeStrategyKind, deletePolicy: CrdtDeletePolicyKind) { + self.strategy = strategy + self.deletePolicy = deletePolicy } - - + + } #if compiler(>=6) -extension CompositeBuildStatsRecord: Sendable {} +extension CrdtConfigRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeCompositeBuildStatsRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> CompositeBuildStatsRecord { +public struct FfiConverterTypeCrdtConfigRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> CrdtConfigRecord { return - try CompositeBuildStatsRecord( - diffEntries: FfiConverterUInt64.read(from: &buf), - insertedRecords: FfiConverterUInt64.read(from: &buf), - vectorUpdatedRecords: FfiConverterUInt64.read(from: &buf), - valueOnlyRecords: FfiConverterUInt64.read(from: &buf), - deletedRecords: FfiConverterUInt64.read(from: &buf), - deltaRecords: FfiConverterUInt64.read(from: &buf), - shadowRecords: FfiConverterUInt64.read(from: &buf), - ownedBytesPeak: FfiConverterUInt64.read(from: &buf), - encodedOutputBytes: FfiConverterUInt64.read(from: &buf), - distanceEvaluations: FfiConverterUInt64.read(from: &buf) + try CrdtConfigRecord( + strategy: FfiConverterTypeCrdtMergeStrategyKind.read(from: &buf), + deletePolicy: FfiConverterTypeCrdtDeletePolicyKind.read(from: &buf) ) } - - public static func write(_ value: CompositeBuildStatsRecord, into buf: inout [UInt8]) { - FfiConverterUInt64.write(value.diffEntries, into: &buf) - FfiConverterUInt64.write(value.insertedRecords, into: &buf) - FfiConverterUInt64.write(value.vectorUpdatedRecords, into: &buf) - FfiConverterUInt64.write(value.valueOnlyRecords, into: &buf) - FfiConverterUInt64.write(value.deletedRecords, into: &buf) - FfiConverterUInt64.write(value.deltaRecords, into: &buf) - FfiConverterUInt64.write(value.shadowRecords, into: &buf) - FfiConverterUInt64.write(value.ownedBytesPeak, into: &buf) - FfiConverterUInt64.write(value.encodedOutputBytes, into: &buf) - FfiConverterUInt64.write(value.distanceEvaluations, into: &buf) + + public static func write(_ value: CrdtConfigRecord, into buf: inout [UInt8]) { + FfiConverterTypeCrdtMergeStrategyKind.write(value.strategy, into: &buf) + FfiConverterTypeCrdtDeletePolicyKind.write(value.deletePolicy, into: &buf) } } @@ -13770,57 +14417,53 @@ public struct FfiConverterTypeCompositeBuildStatsRecord: FfiConverterRustBuffer #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeCompositeBuildStatsRecord_lift(_ buf: RustBuffer) throws -> CompositeBuildStatsRecord { - return try FfiConverterTypeCompositeBuildStatsRecord.lift(buf) +public func FfiConverterTypeCrdtConfigRecord_lift(_ buf: RustBuffer) throws -> CrdtConfigRecord { + return try FfiConverterTypeCrdtConfigRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeCompositeBuildStatsRecord_lower(_ value: CompositeBuildStatsRecord) -> RustBuffer { - return FfiConverterTypeCompositeBuildStatsRecord.lower(value) +public func FfiConverterTypeCrdtConfigRecord_lower(_ value: CrdtConfigRecord) -> RustBuffer { + return FfiConverterTypeCrdtConfigRecord.lower(value) } -public struct CompositeRebuildOptionsRecord: Equatable, Hashable { - public var hnswLimits: HnswBuildLimitsRecord - public var pqWorkerThreads: UInt64 - public var pqLimits: ProductQuantizationBuildLimitsRecord +public struct CrdtResolutionRecord: Equatable, Hashable { + public var kind: CrdtResolutionKind + public var value: Data? // Default memberwise initializers are never public by default, so we // declare one manually. - public init(hnswLimits: HnswBuildLimitsRecord, pqWorkerThreads: UInt64, pqLimits: ProductQuantizationBuildLimitsRecord) { - self.hnswLimits = hnswLimits - self.pqWorkerThreads = pqWorkerThreads - self.pqLimits = pqLimits + public init(kind: CrdtResolutionKind, value: Data?) { + self.kind = kind + self.value = value } - - + + } #if compiler(>=6) -extension CompositeRebuildOptionsRecord: Sendable {} +extension CrdtResolutionRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeCompositeRebuildOptionsRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> CompositeRebuildOptionsRecord { +public struct FfiConverterTypeCrdtResolutionRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> CrdtResolutionRecord { return - try CompositeRebuildOptionsRecord( - hnswLimits: FfiConverterTypeHnswBuildLimitsRecord.read(from: &buf), - pqWorkerThreads: FfiConverterUInt64.read(from: &buf), - pqLimits: FfiConverterTypeProductQuantizationBuildLimitsRecord.read(from: &buf) + try CrdtResolutionRecord( + kind: FfiConverterTypeCrdtResolutionKind.read(from: &buf), + value: FfiConverterOptionData.read(from: &buf) ) } - public static func write(_ value: CompositeRebuildOptionsRecord, into buf: inout [UInt8]) { - FfiConverterTypeHnswBuildLimitsRecord.write(value.hnswLimits, into: &buf) - FfiConverterUInt64.write(value.pqWorkerThreads, into: &buf) - FfiConverterTypeProductQuantizationBuildLimitsRecord.write(value.pqLimits, into: &buf) + public static func write(_ value: CrdtResolutionRecord, into buf: inout [UInt8]) { + FfiConverterTypeCrdtResolutionKind.write(value.kind, into: &buf) + FfiConverterOptionData.write(value.value, into: &buf) } } @@ -13828,77 +14471,65 @@ public struct FfiConverterTypeCompositeRebuildOptionsRecord: FfiConverterRustBuf #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeCompositeRebuildOptionsRecord_lift(_ buf: RustBuffer) throws -> CompositeRebuildOptionsRecord { - return try FfiConverterTypeCompositeRebuildOptionsRecord.lift(buf) +public func FfiConverterTypeCrdtResolutionRecord_lift(_ buf: RustBuffer) throws -> CrdtResolutionRecord { + return try FfiConverterTypeCrdtResolutionRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeCompositeRebuildOptionsRecord_lower(_ value: CompositeRebuildOptionsRecord) -> RustBuffer { - return FfiConverterTypeCompositeRebuildOptionsRecord.lower(value) +public func FfiConverterTypeCrdtResolutionRecord_lower(_ value: CrdtResolutionRecord) -> RustBuffer { + return FfiConverterTypeCrdtResolutionRecord.lower(value) } -public struct ConfigRecord: Equatable, Hashable { - public var minChunkSize: UInt64 - public var maxChunkSize: UInt64 - public var chunkingFactor: UInt32 - public var hashSeed: UInt64 - public var encoding: EncodingRecord - public var nodeCacheMaxNodes: UInt64? - public var nodeCacheMaxBytes: UInt64? - public var formatBytes: Data? +public struct CursorWindowRecord: Equatable, Hashable { + public var positionKey: Data? + public var positionValue: Data? + public var found: Bool + public var entries: [EntryRecord] + public var nextCursor: RangeCursorRecord? // Default memberwise initializers are never public by default, so we // declare one manually. - public init(minChunkSize: UInt64, maxChunkSize: UInt64, chunkingFactor: UInt32, hashSeed: UInt64, encoding: EncodingRecord, nodeCacheMaxNodes: UInt64?, nodeCacheMaxBytes: UInt64?, formatBytes: Data?) { - self.minChunkSize = minChunkSize - self.maxChunkSize = maxChunkSize - self.chunkingFactor = chunkingFactor - self.hashSeed = hashSeed - self.encoding = encoding - self.nodeCacheMaxNodes = nodeCacheMaxNodes - self.nodeCacheMaxBytes = nodeCacheMaxBytes - self.formatBytes = formatBytes + public init(positionKey: Data?, positionValue: Data?, found: Bool, entries: [EntryRecord], nextCursor: RangeCursorRecord?) { + self.positionKey = positionKey + self.positionValue = positionValue + self.found = found + self.entries = entries + self.nextCursor = nextCursor } - - + + } #if compiler(>=6) -extension ConfigRecord: Sendable {} +extension CursorWindowRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeConfigRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ConfigRecord { +public struct FfiConverterTypeCursorWindowRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> CursorWindowRecord { return - try ConfigRecord( - minChunkSize: FfiConverterUInt64.read(from: &buf), - maxChunkSize: FfiConverterUInt64.read(from: &buf), - chunkingFactor: FfiConverterUInt32.read(from: &buf), - hashSeed: FfiConverterUInt64.read(from: &buf), - encoding: FfiConverterTypeEncodingRecord.read(from: &buf), - nodeCacheMaxNodes: FfiConverterOptionUInt64.read(from: &buf), - nodeCacheMaxBytes: FfiConverterOptionUInt64.read(from: &buf), - formatBytes: FfiConverterOptionData.read(from: &buf) + try CursorWindowRecord( + positionKey: FfiConverterOptionData.read(from: &buf), + positionValue: FfiConverterOptionData.read(from: &buf), + found: FfiConverterBool.read(from: &buf), + entries: FfiConverterSequenceTypeEntryRecord.read(from: &buf), + nextCursor: FfiConverterOptionTypeRangeCursorRecord.read(from: &buf) ) } - public static func write(_ value: ConfigRecord, into buf: inout [UInt8]) { - FfiConverterUInt64.write(value.minChunkSize, into: &buf) - FfiConverterUInt64.write(value.maxChunkSize, into: &buf) - FfiConverterUInt32.write(value.chunkingFactor, into: &buf) - FfiConverterUInt64.write(value.hashSeed, into: &buf) - FfiConverterTypeEncodingRecord.write(value.encoding, into: &buf) - FfiConverterOptionUInt64.write(value.nodeCacheMaxNodes, into: &buf) - FfiConverterOptionUInt64.write(value.nodeCacheMaxBytes, into: &buf) - FfiConverterOptionData.write(value.formatBytes, into: &buf) + public static func write(_ value: CursorWindowRecord, into buf: inout [UInt8]) { + FfiConverterOptionData.write(value.positionKey, into: &buf) + FfiConverterOptionData.write(value.positionValue, into: &buf) + FfiConverterBool.write(value.found, into: &buf) + FfiConverterSequenceTypeEntryRecord.write(value.entries, into: &buf) + FfiConverterOptionTypeRangeCursorRecord.write(value.nextCursor, into: &buf) } } @@ -13906,53 +14537,69 @@ public struct FfiConverterTypeConfigRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeConfigRecord_lift(_ buf: RustBuffer) throws -> ConfigRecord { - return try FfiConverterTypeConfigRecord.lift(buf) +public func FfiConverterTypeCursorWindowRecord_lift(_ buf: RustBuffer) throws -> CursorWindowRecord { + return try FfiConverterTypeCursorWindowRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeConfigRecord_lower(_ value: ConfigRecord) -> RustBuffer { - return FfiConverterTypeConfigRecord.lower(value) +public func FfiConverterTypeCursorWindowRecord_lower(_ value: CursorWindowRecord) -> RustBuffer { + return FfiConverterTypeCursorWindowRecord.lower(value) } -public struct ConflictPageRecord: Equatable, Hashable { - public var conflicts: [ConflictRecord] - public var nextCursor: RangeCursorRecord? +public struct DiffPageProofRecord: Equatable, Hashable { + public var base: RangePageProofRecord + public var other: RangePageProofRecord + public var lookaheadBase: KeyProofRecord? + public var lookaheadOther: KeyProofRecord? + public var requestedEnd: Data? + public var limit: UInt64 // Default memberwise initializers are never public by default, so we // declare one manually. - public init(conflicts: [ConflictRecord], nextCursor: RangeCursorRecord?) { - self.conflicts = conflicts - self.nextCursor = nextCursor + public init(base: RangePageProofRecord, other: RangePageProofRecord, lookaheadBase: KeyProofRecord?, lookaheadOther: KeyProofRecord?, requestedEnd: Data?, limit: UInt64) { + self.base = base + self.other = other + self.lookaheadBase = lookaheadBase + self.lookaheadOther = lookaheadOther + self.requestedEnd = requestedEnd + self.limit = limit } - - + + } #if compiler(>=6) -extension ConflictPageRecord: Sendable {} +extension DiffPageProofRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeConflictPageRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ConflictPageRecord { +public struct FfiConverterTypeDiffPageProofRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> DiffPageProofRecord { return - try ConflictPageRecord( - conflicts: FfiConverterSequenceTypeConflictRecord.read(from: &buf), - nextCursor: FfiConverterOptionTypeRangeCursorRecord.read(from: &buf) + try DiffPageProofRecord( + base: FfiConverterTypeRangePageProofRecord.read(from: &buf), + other: FfiConverterTypeRangePageProofRecord.read(from: &buf), + lookaheadBase: FfiConverterOptionTypeKeyProofRecord.read(from: &buf), + lookaheadOther: FfiConverterOptionTypeKeyProofRecord.read(from: &buf), + requestedEnd: FfiConverterOptionData.read(from: &buf), + limit: FfiConverterUInt64.read(from: &buf) ) } - public static func write(_ value: ConflictPageRecord, into buf: inout [UInt8]) { - FfiConverterSequenceTypeConflictRecord.write(value.conflicts, into: &buf) - FfiConverterOptionTypeRangeCursorRecord.write(value.nextCursor, into: &buf) + public static func write(_ value: DiffPageProofRecord, into buf: inout [UInt8]) { + FfiConverterTypeRangePageProofRecord.write(value.base, into: &buf) + FfiConverterTypeRangePageProofRecord.write(value.other, into: &buf) + FfiConverterOptionTypeKeyProofRecord.write(value.lookaheadBase, into: &buf) + FfiConverterOptionTypeKeyProofRecord.write(value.lookaheadOther, into: &buf) + FfiConverterOptionData.write(value.requestedEnd, into: &buf) + FfiConverterUInt64.write(value.limit, into: &buf) } } @@ -13960,61 +14607,93 @@ public struct FfiConverterTypeConflictPageRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeConflictPageRecord_lift(_ buf: RustBuffer) throws -> ConflictPageRecord { - return try FfiConverterTypeConflictPageRecord.lift(buf) +public func FfiConverterTypeDiffPageProofRecord_lift(_ buf: RustBuffer) throws -> DiffPageProofRecord { + return try FfiConverterTypeDiffPageProofRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeConflictPageRecord_lower(_ value: ConflictPageRecord) -> RustBuffer { - return FfiConverterTypeConflictPageRecord.lower(value) +public func FfiConverterTypeDiffPageProofRecord_lower(_ value: DiffPageProofRecord) -> RustBuffer { + return FfiConverterTypeDiffPageProofRecord.lower(value) } -public struct ConflictRecord: Equatable, Hashable { - public var key: Data - public var base: Data? - public var left: Data? - public var right: Data? +public struct DiffPageProofVerificationRecord: Equatable, Hashable { + public var valid: Bool + public var baseValid: Bool + public var otherValid: Bool + public var lookaheadValid: Bool + public var baseRoot: Data? + public var otherRoot: Data? + public var after: Data? + public var requestedEnd: Data? + public var proofEnd: Data? + public var limit: UInt64 + public var diffs: [DiffRecord] + public var nextCursor: RangeCursorRecord? // Default memberwise initializers are never public by default, so we // declare one manually. - public init(key: Data, base: Data?, left: Data?, right: Data?) { - self.key = key - self.base = base - self.left = left - self.right = right + public init(valid: Bool, baseValid: Bool, otherValid: Bool, lookaheadValid: Bool, baseRoot: Data?, otherRoot: Data?, after: Data?, requestedEnd: Data?, proofEnd: Data?, limit: UInt64, diffs: [DiffRecord], nextCursor: RangeCursorRecord?) { + self.valid = valid + self.baseValid = baseValid + self.otherValid = otherValid + self.lookaheadValid = lookaheadValid + self.baseRoot = baseRoot + self.otherRoot = otherRoot + self.after = after + self.requestedEnd = requestedEnd + self.proofEnd = proofEnd + self.limit = limit + self.diffs = diffs + self.nextCursor = nextCursor } - - + + } #if compiler(>=6) -extension ConflictRecord: Sendable {} +extension DiffPageProofVerificationRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeConflictRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ConflictRecord { +public struct FfiConverterTypeDiffPageProofVerificationRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> DiffPageProofVerificationRecord { return - try ConflictRecord( - key: FfiConverterData.read(from: &buf), - base: FfiConverterOptionData.read(from: &buf), - left: FfiConverterOptionData.read(from: &buf), - right: FfiConverterOptionData.read(from: &buf) + try DiffPageProofVerificationRecord( + valid: FfiConverterBool.read(from: &buf), + baseValid: FfiConverterBool.read(from: &buf), + otherValid: FfiConverterBool.read(from: &buf), + lookaheadValid: FfiConverterBool.read(from: &buf), + baseRoot: FfiConverterOptionData.read(from: &buf), + otherRoot: FfiConverterOptionData.read(from: &buf), + after: FfiConverterOptionData.read(from: &buf), + requestedEnd: FfiConverterOptionData.read(from: &buf), + proofEnd: FfiConverterOptionData.read(from: &buf), + limit: FfiConverterUInt64.read(from: &buf), + diffs: FfiConverterSequenceTypeDiffRecord.read(from: &buf), + nextCursor: FfiConverterOptionTypeRangeCursorRecord.read(from: &buf) ) } - public static func write(_ value: ConflictRecord, into buf: inout [UInt8]) { - FfiConverterData.write(value.key, into: &buf) - FfiConverterOptionData.write(value.base, into: &buf) - FfiConverterOptionData.write(value.left, into: &buf) - FfiConverterOptionData.write(value.right, into: &buf) + public static func write(_ value: DiffPageProofVerificationRecord, into buf: inout [UInt8]) { + FfiConverterBool.write(value.valid, into: &buf) + FfiConverterBool.write(value.baseValid, into: &buf) + FfiConverterBool.write(value.otherValid, into: &buf) + FfiConverterBool.write(value.lookaheadValid, into: &buf) + FfiConverterOptionData.write(value.baseRoot, into: &buf) + FfiConverterOptionData.write(value.otherRoot, into: &buf) + FfiConverterOptionData.write(value.after, into: &buf) + FfiConverterOptionData.write(value.requestedEnd, into: &buf) + FfiConverterOptionData.write(value.proofEnd, into: &buf) + FfiConverterUInt64.write(value.limit, into: &buf) + FfiConverterSequenceTypeDiffRecord.write(value.diffs, into: &buf) + FfiConverterOptionTypeRangeCursorRecord.write(value.nextCursor, into: &buf) } } @@ -14022,61 +14701,53 @@ public struct FfiConverterTypeConflictRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeConflictRecord_lift(_ buf: RustBuffer) throws -> ConflictRecord { - return try FfiConverterTypeConflictRecord.lift(buf) +public func FfiConverterTypeDiffPageProofVerificationRecord_lift(_ buf: RustBuffer) throws -> DiffPageProofVerificationRecord { + return try FfiConverterTypeDiffPageProofVerificationRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeConflictRecord_lower(_ value: ConflictRecord) -> RustBuffer { - return FfiConverterTypeConflictRecord.lower(value) +public func FfiConverterTypeDiffPageProofVerificationRecord_lower(_ value: DiffPageProofVerificationRecord) -> RustBuffer { + return FfiConverterTypeDiffPageProofVerificationRecord.lower(value) } -public struct ContentGraphLimitsRecord: Equatable, Hashable { - public var maxObjects: UInt64 - public var maxDepth: UInt64 - public var maxBytes: UInt64 - public var maxReferencesPerObject: UInt64 +public struct DiffPageRecord: Equatable, Hashable { + public var diffs: [DiffRecord] + public var nextCursor: RangeCursorRecord? // Default memberwise initializers are never public by default, so we // declare one manually. - public init(maxObjects: UInt64, maxDepth: UInt64, maxBytes: UInt64, maxReferencesPerObject: UInt64) { - self.maxObjects = maxObjects - self.maxDepth = maxDepth - self.maxBytes = maxBytes - self.maxReferencesPerObject = maxReferencesPerObject + public init(diffs: [DiffRecord], nextCursor: RangeCursorRecord?) { + self.diffs = diffs + self.nextCursor = nextCursor } - - + + } #if compiler(>=6) -extension ContentGraphLimitsRecord: Sendable {} +extension DiffPageRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeContentGraphLimitsRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ContentGraphLimitsRecord { +public struct FfiConverterTypeDiffPageRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> DiffPageRecord { return - try ContentGraphLimitsRecord( - maxObjects: FfiConverterUInt64.read(from: &buf), - maxDepth: FfiConverterUInt64.read(from: &buf), - maxBytes: FfiConverterUInt64.read(from: &buf), - maxReferencesPerObject: FfiConverterUInt64.read(from: &buf) + try DiffPageRecord( + diffs: FfiConverterSequenceTypeDiffRecord.read(from: &buf), + nextCursor: FfiConverterOptionTypeRangeCursorRecord.read(from: &buf) ) } - public static func write(_ value: ContentGraphLimitsRecord, into buf: inout [UInt8]) { - FfiConverterUInt64.write(value.maxObjects, into: &buf) - FfiConverterUInt64.write(value.maxDepth, into: &buf) - FfiConverterUInt64.write(value.maxBytes, into: &buf) - FfiConverterUInt64.write(value.maxReferencesPerObject, into: &buf) + public static func write(_ value: DiffPageRecord, into buf: inout [UInt8]) { + FfiConverterSequenceTypeDiffRecord.write(value.diffs, into: &buf) + FfiConverterOptionTypeRangeCursorRecord.write(value.nextCursor, into: &buf) } } @@ -14084,53 +14755,65 @@ public struct FfiConverterTypeContentGraphLimitsRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeContentGraphLimitsRecord_lift(_ buf: RustBuffer) throws -> ContentGraphLimitsRecord { - return try FfiConverterTypeContentGraphLimitsRecord.lift(buf) +public func FfiConverterTypeDiffPageRecord_lift(_ buf: RustBuffer) throws -> DiffPageRecord { + return try FfiConverterTypeDiffPageRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeContentGraphLimitsRecord_lower(_ value: ContentGraphLimitsRecord) -> RustBuffer { - return FfiConverterTypeContentGraphLimitsRecord.lower(value) +public func FfiConverterTypeDiffPageRecord_lower(_ value: DiffPageRecord) -> RustBuffer { + return FfiConverterTypeDiffPageRecord.lower(value) } -public struct CrdtConfigRecord: Equatable, Hashable { - public var strategy: CrdtMergeStrategyKind - public var deletePolicy: CrdtDeletePolicyKind +public struct DiffRecord: Equatable, Hashable { + public var kind: DiffKind + public var key: Data + public var value: Data? + public var oldValue: Data? + public var newValue: Data? // Default memberwise initializers are never public by default, so we // declare one manually. - public init(strategy: CrdtMergeStrategyKind, deletePolicy: CrdtDeletePolicyKind) { - self.strategy = strategy - self.deletePolicy = deletePolicy + public init(kind: DiffKind, key: Data, value: Data?, oldValue: Data?, newValue: Data?) { + self.kind = kind + self.key = key + self.value = value + self.oldValue = oldValue + self.newValue = newValue } - - + + } #if compiler(>=6) -extension CrdtConfigRecord: Sendable {} +extension DiffRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeCrdtConfigRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> CrdtConfigRecord { +public struct FfiConverterTypeDiffRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> DiffRecord { return - try CrdtConfigRecord( - strategy: FfiConverterTypeCrdtMergeStrategyKind.read(from: &buf), - deletePolicy: FfiConverterTypeCrdtDeletePolicyKind.read(from: &buf) + try DiffRecord( + kind: FfiConverterTypeDiffKind.read(from: &buf), + key: FfiConverterData.read(from: &buf), + value: FfiConverterOptionData.read(from: &buf), + oldValue: FfiConverterOptionData.read(from: &buf), + newValue: FfiConverterOptionData.read(from: &buf) ) } - public static func write(_ value: CrdtConfigRecord, into buf: inout [UInt8]) { - FfiConverterTypeCrdtMergeStrategyKind.write(value.strategy, into: &buf) - FfiConverterTypeCrdtDeletePolicyKind.write(value.deletePolicy, into: &buf) + public static func write(_ value: DiffRecord, into buf: inout [UInt8]) { + FfiConverterTypeDiffKind.write(value.kind, into: &buf) + FfiConverterData.write(value.key, into: &buf) + FfiConverterOptionData.write(value.value, into: &buf) + FfiConverterOptionData.write(value.oldValue, into: &buf) + FfiConverterOptionData.write(value.newValue, into: &buf) } } @@ -14138,53 +14821,69 @@ public struct FfiConverterTypeCrdtConfigRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeCrdtConfigRecord_lift(_ buf: RustBuffer) throws -> CrdtConfigRecord { - return try FfiConverterTypeCrdtConfigRecord.lift(buf) +public func FfiConverterTypeDiffRecord_lift(_ buf: RustBuffer) throws -> DiffRecord { + return try FfiConverterTypeDiffRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeCrdtConfigRecord_lower(_ value: CrdtConfigRecord) -> RustBuffer { - return FfiConverterTypeCrdtConfigRecord.lower(value) +public func FfiConverterTypeDiffRecord_lower(_ value: DiffRecord) -> RustBuffer { + return FfiConverterTypeDiffRecord.lower(value) } -public struct CrdtResolutionRecord: Equatable, Hashable { - public var kind: CrdtResolutionKind - public var value: Data? +public struct DiffTraversalStatsRecord: Equatable, Hashable { + public var comparedNodes: UInt64 + public var reusedSubtrees: UInt64 + public var addedSubtrees: UInt64 + public var removedSubtrees: UInt64 + public var collectedFallbacks: UInt64 + public var emittedDiffs: UInt64 // Default memberwise initializers are never public by default, so we // declare one manually. - public init(kind: CrdtResolutionKind, value: Data?) { - self.kind = kind - self.value = value + public init(comparedNodes: UInt64, reusedSubtrees: UInt64, addedSubtrees: UInt64, removedSubtrees: UInt64, collectedFallbacks: UInt64, emittedDiffs: UInt64) { + self.comparedNodes = comparedNodes + self.reusedSubtrees = reusedSubtrees + self.addedSubtrees = addedSubtrees + self.removedSubtrees = removedSubtrees + self.collectedFallbacks = collectedFallbacks + self.emittedDiffs = emittedDiffs } - - + + } #if compiler(>=6) -extension CrdtResolutionRecord: Sendable {} +extension DiffTraversalStatsRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeCrdtResolutionRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> CrdtResolutionRecord { +public struct FfiConverterTypeDiffTraversalStatsRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> DiffTraversalStatsRecord { return - try CrdtResolutionRecord( - kind: FfiConverterTypeCrdtResolutionKind.read(from: &buf), - value: FfiConverterOptionData.read(from: &buf) + try DiffTraversalStatsRecord( + comparedNodes: FfiConverterUInt64.read(from: &buf), + reusedSubtrees: FfiConverterUInt64.read(from: &buf), + addedSubtrees: FfiConverterUInt64.read(from: &buf), + removedSubtrees: FfiConverterUInt64.read(from: &buf), + collectedFallbacks: FfiConverterUInt64.read(from: &buf), + emittedDiffs: FfiConverterUInt64.read(from: &buf) ) } - public static func write(_ value: CrdtResolutionRecord, into buf: inout [UInt8]) { - FfiConverterTypeCrdtResolutionKind.write(value.kind, into: &buf) - FfiConverterOptionData.write(value.value, into: &buf) + public static func write(_ value: DiffTraversalStatsRecord, into buf: inout [UInt8]) { + FfiConverterUInt64.write(value.comparedNodes, into: &buf) + FfiConverterUInt64.write(value.reusedSubtrees, into: &buf) + FfiConverterUInt64.write(value.addedSubtrees, into: &buf) + FfiConverterUInt64.write(value.removedSubtrees, into: &buf) + FfiConverterUInt64.write(value.collectedFallbacks, into: &buf) + FfiConverterUInt64.write(value.emittedDiffs, into: &buf) } } @@ -14192,65 +14891,53 @@ public struct FfiConverterTypeCrdtResolutionRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeCrdtResolutionRecord_lift(_ buf: RustBuffer) throws -> CrdtResolutionRecord { - return try FfiConverterTypeCrdtResolutionRecord.lift(buf) +public func FfiConverterTypeDiffTraversalStatsRecord_lift(_ buf: RustBuffer) throws -> DiffTraversalStatsRecord { + return try FfiConverterTypeDiffTraversalStatsRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeCrdtResolutionRecord_lower(_ value: CrdtResolutionRecord) -> RustBuffer { - return FfiConverterTypeCrdtResolutionRecord.lower(value) +public func FfiConverterTypeDiffTraversalStatsRecord_lower(_ value: DiffTraversalStatsRecord) -> RustBuffer { + return FfiConverterTypeDiffTraversalStatsRecord.lower(value) } -public struct CursorWindowRecord: Equatable, Hashable { - public var positionKey: Data? - public var positionValue: Data? - public var found: Bool - public var entries: [EntryRecord] - public var nextCursor: RangeCursorRecord? +public struct EncodingRecord: Equatable, Hashable { + public var kind: EncodingKind + public var customName: String? // Default memberwise initializers are never public by default, so we // declare one manually. - public init(positionKey: Data?, positionValue: Data?, found: Bool, entries: [EntryRecord], nextCursor: RangeCursorRecord?) { - self.positionKey = positionKey - self.positionValue = positionValue - self.found = found - self.entries = entries - self.nextCursor = nextCursor + public init(kind: EncodingKind, customName: String?) { + self.kind = kind + self.customName = customName } - - + + } #if compiler(>=6) -extension CursorWindowRecord: Sendable {} +extension EncodingRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeCursorWindowRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> CursorWindowRecord { +public struct FfiConverterTypeEncodingRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> EncodingRecord { return - try CursorWindowRecord( - positionKey: FfiConverterOptionData.read(from: &buf), - positionValue: FfiConverterOptionData.read(from: &buf), - found: FfiConverterBool.read(from: &buf), - entries: FfiConverterSequenceTypeEntryRecord.read(from: &buf), - nextCursor: FfiConverterOptionTypeRangeCursorRecord.read(from: &buf) + try EncodingRecord( + kind: FfiConverterTypeEncodingKind.read(from: &buf), + customName: FfiConverterOptionString.read(from: &buf) ) } - public static func write(_ value: CursorWindowRecord, into buf: inout [UInt8]) { - FfiConverterOptionData.write(value.positionKey, into: &buf) - FfiConverterOptionData.write(value.positionValue, into: &buf) - FfiConverterBool.write(value.found, into: &buf) - FfiConverterSequenceTypeEntryRecord.write(value.entries, into: &buf) - FfiConverterOptionTypeRangeCursorRecord.write(value.nextCursor, into: &buf) + public static func write(_ value: EncodingRecord, into buf: inout [UInt8]) { + FfiConverterTypeEncodingKind.write(value.kind, into: &buf) + FfiConverterOptionString.write(value.customName, into: &buf) } } @@ -14258,69 +14945,53 @@ public struct FfiConverterTypeCursorWindowRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeCursorWindowRecord_lift(_ buf: RustBuffer) throws -> CursorWindowRecord { - return try FfiConverterTypeCursorWindowRecord.lift(buf) +public func FfiConverterTypeEncodingRecord_lift(_ buf: RustBuffer) throws -> EncodingRecord { + return try FfiConverterTypeEncodingRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeCursorWindowRecord_lower(_ value: CursorWindowRecord) -> RustBuffer { - return FfiConverterTypeCursorWindowRecord.lower(value) +public func FfiConverterTypeEncodingRecord_lower(_ value: EncodingRecord) -> RustBuffer { + return FfiConverterTypeEncodingRecord.lower(value) } -public struct DiffPageProofRecord: Equatable, Hashable { - public var base: RangePageProofRecord - public var other: RangePageProofRecord - public var lookaheadBase: KeyProofRecord? - public var lookaheadOther: KeyProofRecord? - public var requestedEnd: Data? - public var limit: UInt64 +public struct EntryRecord: Equatable, Hashable { + public var key: Data + public var value: Data // Default memberwise initializers are never public by default, so we // declare one manually. - public init(base: RangePageProofRecord, other: RangePageProofRecord, lookaheadBase: KeyProofRecord?, lookaheadOther: KeyProofRecord?, requestedEnd: Data?, limit: UInt64) { - self.base = base - self.other = other - self.lookaheadBase = lookaheadBase - self.lookaheadOther = lookaheadOther - self.requestedEnd = requestedEnd - self.limit = limit + public init(key: Data, value: Data) { + self.key = key + self.value = value } - - + + } #if compiler(>=6) -extension DiffPageProofRecord: Sendable {} +extension EntryRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeDiffPageProofRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> DiffPageProofRecord { +public struct FfiConverterTypeEntryRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> EntryRecord { return - try DiffPageProofRecord( - base: FfiConverterTypeRangePageProofRecord.read(from: &buf), - other: FfiConverterTypeRangePageProofRecord.read(from: &buf), - lookaheadBase: FfiConverterOptionTypeKeyProofRecord.read(from: &buf), - lookaheadOther: FfiConverterOptionTypeKeyProofRecord.read(from: &buf), - requestedEnd: FfiConverterOptionData.read(from: &buf), - limit: FfiConverterUInt64.read(from: &buf) + try EntryRecord( + key: FfiConverterData.read(from: &buf), + value: FfiConverterData.read(from: &buf) ) } - public static func write(_ value: DiffPageProofRecord, into buf: inout [UInt8]) { - FfiConverterTypeRangePageProofRecord.write(value.base, into: &buf) - FfiConverterTypeRangePageProofRecord.write(value.other, into: &buf) - FfiConverterOptionTypeKeyProofRecord.write(value.lookaheadBase, into: &buf) - FfiConverterOptionTypeKeyProofRecord.write(value.lookaheadOther, into: &buf) - FfiConverterOptionData.write(value.requestedEnd, into: &buf) - FfiConverterUInt64.write(value.limit, into: &buf) + public static func write(_ value: EntryRecord, into buf: inout [UInt8]) { + FfiConverterData.write(value.key, into: &buf) + FfiConverterData.write(value.value, into: &buf) } } @@ -14328,93 +14999,53 @@ public struct FfiConverterTypeDiffPageProofRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeDiffPageProofRecord_lift(_ buf: RustBuffer) throws -> DiffPageProofRecord { - return try FfiConverterTypeDiffPageProofRecord.lift(buf) +public func FfiConverterTypeEntryRecord_lift(_ buf: RustBuffer) throws -> EntryRecord { + return try FfiConverterTypeEntryRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeDiffPageProofRecord_lower(_ value: DiffPageProofRecord) -> RustBuffer { - return FfiConverterTypeDiffPageProofRecord.lower(value) +public func FfiConverterTypeEntryRecord_lower(_ value: EntryRecord) -> RustBuffer { + return FfiConverterTypeEntryRecord.lower(value) } -public struct DiffPageProofVerificationRecord: Equatable, Hashable { - public var valid: Bool - public var baseValid: Bool - public var otherValid: Bool - public var lookaheadValid: Bool - public var baseRoot: Data? - public var otherRoot: Data? - public var after: Data? - public var requestedEnd: Data? - public var proofEnd: Data? - public var limit: UInt64 - public var diffs: [DiffRecord] - public var nextCursor: RangeCursorRecord? +public struct ExactProximityRecordRecord: Equatable, Hashable { + public var vector: [Float] + public var value: Data // Default memberwise initializers are never public by default, so we // declare one manually. - public init(valid: Bool, baseValid: Bool, otherValid: Bool, lookaheadValid: Bool, baseRoot: Data?, otherRoot: Data?, after: Data?, requestedEnd: Data?, proofEnd: Data?, limit: UInt64, diffs: [DiffRecord], nextCursor: RangeCursorRecord?) { - self.valid = valid - self.baseValid = baseValid - self.otherValid = otherValid - self.lookaheadValid = lookaheadValid - self.baseRoot = baseRoot - self.otherRoot = otherRoot - self.after = after - self.requestedEnd = requestedEnd - self.proofEnd = proofEnd - self.limit = limit - self.diffs = diffs - self.nextCursor = nextCursor + public init(vector: [Float], value: Data) { + self.vector = vector + self.value = value } - - + + } #if compiler(>=6) -extension DiffPageProofVerificationRecord: Sendable {} +extension ExactProximityRecordRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeDiffPageProofVerificationRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> DiffPageProofVerificationRecord { +public struct FfiConverterTypeExactProximityRecordRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ExactProximityRecordRecord { return - try DiffPageProofVerificationRecord( - valid: FfiConverterBool.read(from: &buf), - baseValid: FfiConverterBool.read(from: &buf), - otherValid: FfiConverterBool.read(from: &buf), - lookaheadValid: FfiConverterBool.read(from: &buf), - baseRoot: FfiConverterOptionData.read(from: &buf), - otherRoot: FfiConverterOptionData.read(from: &buf), - after: FfiConverterOptionData.read(from: &buf), - requestedEnd: FfiConverterOptionData.read(from: &buf), - proofEnd: FfiConverterOptionData.read(from: &buf), - limit: FfiConverterUInt64.read(from: &buf), - diffs: FfiConverterSequenceTypeDiffRecord.read(from: &buf), - nextCursor: FfiConverterOptionTypeRangeCursorRecord.read(from: &buf) + try ExactProximityRecordRecord( + vector: FfiConverterSequenceFloat.read(from: &buf), + value: FfiConverterData.read(from: &buf) ) } - public static func write(_ value: DiffPageProofVerificationRecord, into buf: inout [UInt8]) { - FfiConverterBool.write(value.valid, into: &buf) - FfiConverterBool.write(value.baseValid, into: &buf) - FfiConverterBool.write(value.otherValid, into: &buf) - FfiConverterBool.write(value.lookaheadValid, into: &buf) - FfiConverterOptionData.write(value.baseRoot, into: &buf) - FfiConverterOptionData.write(value.otherRoot, into: &buf) - FfiConverterOptionData.write(value.after, into: &buf) - FfiConverterOptionData.write(value.requestedEnd, into: &buf) - FfiConverterOptionData.write(value.proofEnd, into: &buf) - FfiConverterUInt64.write(value.limit, into: &buf) - FfiConverterSequenceTypeDiffRecord.write(value.diffs, into: &buf) - FfiConverterOptionTypeRangeCursorRecord.write(value.nextCursor, into: &buf) + public static func write(_ value: ExactProximityRecordRecord, into buf: inout [UInt8]) { + FfiConverterSequenceFloat.write(value.vector, into: &buf) + FfiConverterData.write(value.value, into: &buf) } } @@ -14422,53 +15053,57 @@ public struct FfiConverterTypeDiffPageProofVerificationRecord: FfiConverterRustB #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeDiffPageProofVerificationRecord_lift(_ buf: RustBuffer) throws -> DiffPageProofVerificationRecord { - return try FfiConverterTypeDiffPageProofVerificationRecord.lift(buf) +public func FfiConverterTypeExactProximityRecordRecord_lift(_ buf: RustBuffer) throws -> ExactProximityRecordRecord { + return try FfiConverterTypeExactProximityRecordRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeDiffPageProofVerificationRecord_lower(_ value: DiffPageProofVerificationRecord) -> RustBuffer { - return FfiConverterTypeDiffPageProofVerificationRecord.lower(value) +public func FfiConverterTypeExactProximityRecordRecord_lower(_ value: ExactProximityRecordRecord) -> RustBuffer { + return FfiConverterTypeExactProximityRecordRecord.lower(value) } -public struct DiffPageRecord: Equatable, Hashable { - public var diffs: [DiffRecord] - public var nextCursor: RangeCursorRecord? +public struct FullRebuildReasonRecord: Equatable, Hashable { + public var kind: FullRebuildReasonKindRecord + public var actual: UInt64 + public var maximum: UInt64 // Default memberwise initializers are never public by default, so we // declare one manually. - public init(diffs: [DiffRecord], nextCursor: RangeCursorRecord?) { - self.diffs = diffs - self.nextCursor = nextCursor + public init(kind: FullRebuildReasonKindRecord, actual: UInt64, maximum: UInt64) { + self.kind = kind + self.actual = actual + self.maximum = maximum } - - + + } #if compiler(>=6) -extension DiffPageRecord: Sendable {} +extension FullRebuildReasonRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeDiffPageRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> DiffPageRecord { +public struct FfiConverterTypeFullRebuildReasonRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> FullRebuildReasonRecord { return - try DiffPageRecord( - diffs: FfiConverterSequenceTypeDiffRecord.read(from: &buf), - nextCursor: FfiConverterOptionTypeRangeCursorRecord.read(from: &buf) + try FullRebuildReasonRecord( + kind: FfiConverterTypeFullRebuildReasonKindRecord.read(from: &buf), + actual: FfiConverterUInt64.read(from: &buf), + maximum: FfiConverterUInt64.read(from: &buf) ) } - public static func write(_ value: DiffPageRecord, into buf: inout [UInt8]) { - FfiConverterSequenceTypeDiffRecord.write(value.diffs, into: &buf) - FfiConverterOptionTypeRangeCursorRecord.write(value.nextCursor, into: &buf) + public static func write(_ value: FullRebuildReasonRecord, into buf: inout [UInt8]) { + FfiConverterTypeFullRebuildReasonKindRecord.write(value.kind, into: &buf) + FfiConverterUInt64.write(value.actual, into: &buf) + FfiConverterUInt64.write(value.maximum, into: &buf) } } @@ -14476,65 +15111,69 @@ public struct FfiConverterTypeDiffPageRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeDiffPageRecord_lift(_ buf: RustBuffer) throws -> DiffPageRecord { - return try FfiConverterTypeDiffPageRecord.lift(buf) +public func FfiConverterTypeFullRebuildReasonRecord_lift(_ buf: RustBuffer) throws -> FullRebuildReasonRecord { + return try FfiConverterTypeFullRebuildReasonRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeDiffPageRecord_lower(_ value: DiffPageRecord) -> RustBuffer { - return FfiConverterTypeDiffPageRecord.lower(value) +public func FfiConverterTypeFullRebuildReasonRecord_lower(_ value: FullRebuildReasonRecord) -> RustBuffer { + return FfiConverterTypeFullRebuildReasonRecord.lower(value) } -public struct DiffRecord: Equatable, Hashable { - public var kind: DiffKind - public var key: Data - public var value: Data? - public var oldValue: Data? - public var newValue: Data? +public struct GcPlanRecord: Equatable, Hashable { + public var reachability: GcReachabilityRecord + public var candidateNodes: UInt64 + public var reclaimableCids: [Data] + public var reclaimableNodes: UInt64 + public var reclaimableBytes: UInt64 + public var missingCandidates: UInt64 // Default memberwise initializers are never public by default, so we // declare one manually. - public init(kind: DiffKind, key: Data, value: Data?, oldValue: Data?, newValue: Data?) { - self.kind = kind - self.key = key - self.value = value - self.oldValue = oldValue - self.newValue = newValue + public init(reachability: GcReachabilityRecord, candidateNodes: UInt64, reclaimableCids: [Data], reclaimableNodes: UInt64, reclaimableBytes: UInt64, missingCandidates: UInt64) { + self.reachability = reachability + self.candidateNodes = candidateNodes + self.reclaimableCids = reclaimableCids + self.reclaimableNodes = reclaimableNodes + self.reclaimableBytes = reclaimableBytes + self.missingCandidates = missingCandidates } - - + + } #if compiler(>=6) -extension DiffRecord: Sendable {} +extension GcPlanRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeDiffRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> DiffRecord { +public struct FfiConverterTypeGcPlanRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> GcPlanRecord { return - try DiffRecord( - kind: FfiConverterTypeDiffKind.read(from: &buf), - key: FfiConverterData.read(from: &buf), - value: FfiConverterOptionData.read(from: &buf), - oldValue: FfiConverterOptionData.read(from: &buf), - newValue: FfiConverterOptionData.read(from: &buf) + try GcPlanRecord( + reachability: FfiConverterTypeGcReachabilityRecord.read(from: &buf), + candidateNodes: FfiConverterUInt64.read(from: &buf), + reclaimableCids: FfiConverterSequenceData.read(from: &buf), + reclaimableNodes: FfiConverterUInt64.read(from: &buf), + reclaimableBytes: FfiConverterUInt64.read(from: &buf), + missingCandidates: FfiConverterUInt64.read(from: &buf) ) } - public static func write(_ value: DiffRecord, into buf: inout [UInt8]) { - FfiConverterTypeDiffKind.write(value.kind, into: &buf) - FfiConverterData.write(value.key, into: &buf) - FfiConverterOptionData.write(value.value, into: &buf) - FfiConverterOptionData.write(value.oldValue, into: &buf) - FfiConverterOptionData.write(value.newValue, into: &buf) + public static func write(_ value: GcPlanRecord, into buf: inout [UInt8]) { + FfiConverterTypeGcReachabilityRecord.write(value.reachability, into: &buf) + FfiConverterUInt64.write(value.candidateNodes, into: &buf) + FfiConverterSequenceData.write(value.reclaimableCids, into: &buf) + FfiConverterUInt64.write(value.reclaimableNodes, into: &buf) + FfiConverterUInt64.write(value.reclaimableBytes, into: &buf) + FfiConverterUInt64.write(value.missingCandidates, into: &buf) } } @@ -14542,69 +15181,65 @@ public struct FfiConverterTypeDiffRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeDiffRecord_lift(_ buf: RustBuffer) throws -> DiffRecord { - return try FfiConverterTypeDiffRecord.lift(buf) +public func FfiConverterTypeGcPlanRecord_lift(_ buf: RustBuffer) throws -> GcPlanRecord { + return try FfiConverterTypeGcPlanRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeDiffRecord_lower(_ value: DiffRecord) -> RustBuffer { - return FfiConverterTypeDiffRecord.lower(value) +public func FfiConverterTypeGcPlanRecord_lower(_ value: GcPlanRecord) -> RustBuffer { + return FfiConverterTypeGcPlanRecord.lower(value) } -public struct DiffTraversalStatsRecord: Equatable, Hashable { - public var comparedNodes: UInt64 - public var reusedSubtrees: UInt64 - public var addedSubtrees: UInt64 - public var removedSubtrees: UInt64 - public var collectedFallbacks: UInt64 - public var emittedDiffs: UInt64 +public struct GcReachabilityRecord: Equatable, Hashable { + public var liveCids: [Data] + public var liveNodes: UInt64 + public var liveBytes: UInt64 + public var leafNodes: UInt64 + public var internalNodes: UInt64 // Default memberwise initializers are never public by default, so we // declare one manually. - public init(comparedNodes: UInt64, reusedSubtrees: UInt64, addedSubtrees: UInt64, removedSubtrees: UInt64, collectedFallbacks: UInt64, emittedDiffs: UInt64) { - self.comparedNodes = comparedNodes - self.reusedSubtrees = reusedSubtrees - self.addedSubtrees = addedSubtrees - self.removedSubtrees = removedSubtrees - self.collectedFallbacks = collectedFallbacks - self.emittedDiffs = emittedDiffs + public init(liveCids: [Data], liveNodes: UInt64, liveBytes: UInt64, leafNodes: UInt64, internalNodes: UInt64) { + self.liveCids = liveCids + self.liveNodes = liveNodes + self.liveBytes = liveBytes + self.leafNodes = leafNodes + self.internalNodes = internalNodes } - - + + } #if compiler(>=6) -extension DiffTraversalStatsRecord: Sendable {} +extension GcReachabilityRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeDiffTraversalStatsRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> DiffTraversalStatsRecord { +public struct FfiConverterTypeGcReachabilityRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> GcReachabilityRecord { return - try DiffTraversalStatsRecord( - comparedNodes: FfiConverterUInt64.read(from: &buf), - reusedSubtrees: FfiConverterUInt64.read(from: &buf), - addedSubtrees: FfiConverterUInt64.read(from: &buf), - removedSubtrees: FfiConverterUInt64.read(from: &buf), - collectedFallbacks: FfiConverterUInt64.read(from: &buf), - emittedDiffs: FfiConverterUInt64.read(from: &buf) + try GcReachabilityRecord( + liveCids: FfiConverterSequenceData.read(from: &buf), + liveNodes: FfiConverterUInt64.read(from: &buf), + liveBytes: FfiConverterUInt64.read(from: &buf), + leafNodes: FfiConverterUInt64.read(from: &buf), + internalNodes: FfiConverterUInt64.read(from: &buf) ) } - public static func write(_ value: DiffTraversalStatsRecord, into buf: inout [UInt8]) { - FfiConverterUInt64.write(value.comparedNodes, into: &buf) - FfiConverterUInt64.write(value.reusedSubtrees, into: &buf) - FfiConverterUInt64.write(value.addedSubtrees, into: &buf) - FfiConverterUInt64.write(value.removedSubtrees, into: &buf) - FfiConverterUInt64.write(value.collectedFallbacks, into: &buf) - FfiConverterUInt64.write(value.emittedDiffs, into: &buf) + public static func write(_ value: GcReachabilityRecord, into buf: inout [UInt8]) { + FfiConverterSequenceData.write(value.liveCids, into: &buf) + FfiConverterUInt64.write(value.liveNodes, into: &buf) + FfiConverterUInt64.write(value.liveBytes, into: &buf) + FfiConverterUInt64.write(value.leafNodes, into: &buf) + FfiConverterUInt64.write(value.internalNodes, into: &buf) } } @@ -14612,53 +15247,57 @@ public struct FfiConverterTypeDiffTraversalStatsRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeDiffTraversalStatsRecord_lift(_ buf: RustBuffer) throws -> DiffTraversalStatsRecord { - return try FfiConverterTypeDiffTraversalStatsRecord.lift(buf) +public func FfiConverterTypeGcReachabilityRecord_lift(_ buf: RustBuffer) throws -> GcReachabilityRecord { + return try FfiConverterTypeGcReachabilityRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeDiffTraversalStatsRecord_lower(_ value: DiffTraversalStatsRecord) -> RustBuffer { - return FfiConverterTypeDiffTraversalStatsRecord.lower(value) +public func FfiConverterTypeGcReachabilityRecord_lower(_ value: GcReachabilityRecord) -> RustBuffer { + return FfiConverterTypeGcReachabilityRecord.lower(value) } -public struct EncodingRecord: Equatable, Hashable { - public var kind: EncodingKind - public var customName: String? +public struct GcSweepRecord: Equatable, Hashable { + public var plan: GcPlanRecord + public var deletedNodes: UInt64 + public var deletedBytes: UInt64 // Default memberwise initializers are never public by default, so we // declare one manually. - public init(kind: EncodingKind, customName: String?) { - self.kind = kind - self.customName = customName + public init(plan: GcPlanRecord, deletedNodes: UInt64, deletedBytes: UInt64) { + self.plan = plan + self.deletedNodes = deletedNodes + self.deletedBytes = deletedBytes } - - + + } #if compiler(>=6) -extension EncodingRecord: Sendable {} +extension GcSweepRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeEncodingRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> EncodingRecord { +public struct FfiConverterTypeGcSweepRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> GcSweepRecord { return - try EncodingRecord( - kind: FfiConverterTypeEncodingKind.read(from: &buf), - customName: FfiConverterOptionString.read(from: &buf) + try GcSweepRecord( + plan: FfiConverterTypeGcPlanRecord.read(from: &buf), + deletedNodes: FfiConverterUInt64.read(from: &buf), + deletedBytes: FfiConverterUInt64.read(from: &buf) ) } - public static func write(_ value: EncodingRecord, into buf: inout [UInt8]) { - FfiConverterTypeEncodingKind.write(value.kind, into: &buf) - FfiConverterOptionString.write(value.customName, into: &buf) + public static func write(_ value: GcSweepRecord, into buf: inout [UInt8]) { + FfiConverterTypeGcPlanRecord.write(value.plan, into: &buf) + FfiConverterUInt64.write(value.deletedNodes, into: &buf) + FfiConverterUInt64.write(value.deletedBytes, into: &buf) } } @@ -14666,53 +15305,65 @@ public struct FfiConverterTypeEncodingRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeEncodingRecord_lift(_ buf: RustBuffer) throws -> EncodingRecord { - return try FfiConverterTypeEncodingRecord.lift(buf) +public func FfiConverterTypeGcSweepRecord_lift(_ buf: RustBuffer) throws -> GcSweepRecord { + return try FfiConverterTypeGcSweepRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeEncodingRecord_lower(_ value: EncodingRecord) -> RustBuffer { - return FfiConverterTypeEncodingRecord.lower(value) +public func FfiConverterTypeGcSweepRecord_lower(_ value: GcSweepRecord) -> RustBuffer { + return FfiConverterTypeGcSweepRecord.lower(value) } -public struct EntryRecord: Equatable, Hashable { - public var key: Data - public var value: Data +public struct HnswBuildLimitsRecord: Equatable, Hashable { + public var maxRecords: UInt64? + public var maxOwnedBytes: UInt64? + public var maxDistanceEvaluations: UInt64? + public var workerThreads: UInt64 + public var maxEncodedGraphBytes: UInt64? // Default memberwise initializers are never public by default, so we // declare one manually. - public init(key: Data, value: Data) { - self.key = key - self.value = value + public init(maxRecords: UInt64?, maxOwnedBytes: UInt64?, maxDistanceEvaluations: UInt64?, workerThreads: UInt64, maxEncodedGraphBytes: UInt64?) { + self.maxRecords = maxRecords + self.maxOwnedBytes = maxOwnedBytes + self.maxDistanceEvaluations = maxDistanceEvaluations + self.workerThreads = workerThreads + self.maxEncodedGraphBytes = maxEncodedGraphBytes } - - + + } #if compiler(>=6) -extension EntryRecord: Sendable {} +extension HnswBuildLimitsRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeEntryRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> EntryRecord { +public struct FfiConverterTypeHnswBuildLimitsRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> HnswBuildLimitsRecord { return - try EntryRecord( - key: FfiConverterData.read(from: &buf), - value: FfiConverterData.read(from: &buf) + try HnswBuildLimitsRecord( + maxRecords: FfiConverterOptionUInt64.read(from: &buf), + maxOwnedBytes: FfiConverterOptionUInt64.read(from: &buf), + maxDistanceEvaluations: FfiConverterOptionUInt64.read(from: &buf), + workerThreads: FfiConverterUInt64.read(from: &buf), + maxEncodedGraphBytes: FfiConverterOptionUInt64.read(from: &buf) ) } - public static func write(_ value: EntryRecord, into buf: inout [UInt8]) { - FfiConverterData.write(value.key, into: &buf) - FfiConverterData.write(value.value, into: &buf) + public static func write(_ value: HnswBuildLimitsRecord, into buf: inout [UInt8]) { + FfiConverterOptionUInt64.write(value.maxRecords, into: &buf) + FfiConverterOptionUInt64.write(value.maxOwnedBytes, into: &buf) + FfiConverterOptionUInt64.write(value.maxDistanceEvaluations, into: &buf) + FfiConverterUInt64.write(value.workerThreads, into: &buf) + FfiConverterOptionUInt64.write(value.maxEncodedGraphBytes, into: &buf) } } @@ -14720,53 +15371,53 @@ public struct FfiConverterTypeEntryRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeEntryRecord_lift(_ buf: RustBuffer) throws -> EntryRecord { - return try FfiConverterTypeEntryRecord.lift(buf) +public func FfiConverterTypeHnswBuildLimitsRecord_lift(_ buf: RustBuffer) throws -> HnswBuildLimitsRecord { + return try FfiConverterTypeHnswBuildLimitsRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeEntryRecord_lower(_ value: EntryRecord) -> RustBuffer { - return FfiConverterTypeEntryRecord.lower(value) +public func FfiConverterTypeHnswBuildLimitsRecord_lower(_ value: HnswBuildLimitsRecord) -> RustBuffer { + return FfiConverterTypeHnswBuildLimitsRecord.lower(value) } -public struct ExactProximityRecordRecord: Equatable, Hashable { - public var vector: [Float] - public var value: Data +public struct HnswBuildResultRecord { + public var index: BindingHnswIndex + public var stats: HnswBuildStatsRecord // Default memberwise initializers are never public by default, so we // declare one manually. - public init(vector: [Float], value: Data) { - self.vector = vector - self.value = value + public init(index: BindingHnswIndex, stats: HnswBuildStatsRecord) { + self.index = index + self.stats = stats } - - + + } #if compiler(>=6) -extension ExactProximityRecordRecord: Sendable {} +extension HnswBuildResultRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeExactProximityRecordRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ExactProximityRecordRecord { +public struct FfiConverterTypeHnswBuildResultRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> HnswBuildResultRecord { return - try ExactProximityRecordRecord( - vector: FfiConverterSequenceFloat.read(from: &buf), - value: FfiConverterData.read(from: &buf) + try HnswBuildResultRecord( + index: FfiConverterTypeBindingHnswIndex.read(from: &buf), + stats: FfiConverterTypeHnswBuildStatsRecord.read(from: &buf) ) } - public static func write(_ value: ExactProximityRecordRecord, into buf: inout [UInt8]) { - FfiConverterSequenceFloat.write(value.vector, into: &buf) - FfiConverterData.write(value.value, into: &buf) + public static func write(_ value: HnswBuildResultRecord, into buf: inout [UInt8]) { + FfiConverterTypeBindingHnswIndex.write(value.index, into: &buf) + FfiConverterTypeHnswBuildStatsRecord.write(value.stats, into: &buf) } } @@ -14774,57 +15425,69 @@ public struct FfiConverterTypeExactProximityRecordRecord: FfiConverterRustBuffer #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeExactProximityRecordRecord_lift(_ buf: RustBuffer) throws -> ExactProximityRecordRecord { - return try FfiConverterTypeExactProximityRecordRecord.lift(buf) +public func FfiConverterTypeHnswBuildResultRecord_lift(_ buf: RustBuffer) throws -> HnswBuildResultRecord { + return try FfiConverterTypeHnswBuildResultRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeExactProximityRecordRecord_lower(_ value: ExactProximityRecordRecord) -> RustBuffer { - return FfiConverterTypeExactProximityRecordRecord.lower(value) +public func FfiConverterTypeHnswBuildResultRecord_lower(_ value: HnswBuildResultRecord) -> RustBuffer { + return FfiConverterTypeHnswBuildResultRecord.lower(value) } -public struct FullRebuildReasonRecord: Equatable, Hashable { - public var kind: FullRebuildReasonKindRecord - public var actual: UInt64 - public var maximum: UInt64 +public struct HnswBuildStatsRecord: Equatable, Hashable { + public var records: UInt64 + public var distanceEvaluations: UInt64 + public var directedEdges: UInt64 + public var maximumLevel: UInt8 + public var ownedBytes: UInt64 + public var encodedGraphBytes: UInt64 // Default memberwise initializers are never public by default, so we // declare one manually. - public init(kind: FullRebuildReasonKindRecord, actual: UInt64, maximum: UInt64) { - self.kind = kind - self.actual = actual - self.maximum = maximum + public init(records: UInt64, distanceEvaluations: UInt64, directedEdges: UInt64, maximumLevel: UInt8, ownedBytes: UInt64, encodedGraphBytes: UInt64) { + self.records = records + self.distanceEvaluations = distanceEvaluations + self.directedEdges = directedEdges + self.maximumLevel = maximumLevel + self.ownedBytes = ownedBytes + self.encodedGraphBytes = encodedGraphBytes } - - + + } #if compiler(>=6) -extension FullRebuildReasonRecord: Sendable {} +extension HnswBuildStatsRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeFullRebuildReasonRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> FullRebuildReasonRecord { +public struct FfiConverterTypeHnswBuildStatsRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> HnswBuildStatsRecord { return - try FullRebuildReasonRecord( - kind: FfiConverterTypeFullRebuildReasonKindRecord.read(from: &buf), - actual: FfiConverterUInt64.read(from: &buf), - maximum: FfiConverterUInt64.read(from: &buf) + try HnswBuildStatsRecord( + records: FfiConverterUInt64.read(from: &buf), + distanceEvaluations: FfiConverterUInt64.read(from: &buf), + directedEdges: FfiConverterUInt64.read(from: &buf), + maximumLevel: FfiConverterUInt8.read(from: &buf), + ownedBytes: FfiConverterUInt64.read(from: &buf), + encodedGraphBytes: FfiConverterUInt64.read(from: &buf) ) } - public static func write(_ value: FullRebuildReasonRecord, into buf: inout [UInt8]) { - FfiConverterTypeFullRebuildReasonKindRecord.write(value.kind, into: &buf) - FfiConverterUInt64.write(value.actual, into: &buf) - FfiConverterUInt64.write(value.maximum, into: &buf) + public static func write(_ value: HnswBuildStatsRecord, into buf: inout [UInt8]) { + FfiConverterUInt64.write(value.records, into: &buf) + FfiConverterUInt64.write(value.distanceEvaluations, into: &buf) + FfiConverterUInt64.write(value.directedEdges, into: &buf) + FfiConverterUInt8.write(value.maximumLevel, into: &buf) + FfiConverterUInt64.write(value.ownedBytes, into: &buf) + FfiConverterUInt64.write(value.encodedGraphBytes, into: &buf) } } @@ -14832,69 +15495,73 @@ public struct FfiConverterTypeFullRebuildReasonRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeFullRebuildReasonRecord_lift(_ buf: RustBuffer) throws -> FullRebuildReasonRecord { - return try FfiConverterTypeFullRebuildReasonRecord.lift(buf) +public func FfiConverterTypeHnswBuildStatsRecord_lift(_ buf: RustBuffer) throws -> HnswBuildStatsRecord { + return try FfiConverterTypeHnswBuildStatsRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeFullRebuildReasonRecord_lower(_ value: FullRebuildReasonRecord) -> RustBuffer { - return FfiConverterTypeFullRebuildReasonRecord.lower(value) +public func FfiConverterTypeHnswBuildStatsRecord_lower(_ value: HnswBuildStatsRecord) -> RustBuffer { + return FfiConverterTypeHnswBuildStatsRecord.lower(value) } -public struct GcPlanRecord: Equatable, Hashable { - public var reachability: GcReachabilityRecord - public var candidateNodes: UInt64 - public var reclaimableCids: [Data] - public var reclaimableNodes: UInt64 - public var reclaimableBytes: UInt64 - public var missingCandidates: UInt64 +public struct HnswConfigRecord: Equatable, Hashable { + public var maxConnections: UInt16 + public var efConstruction: UInt32 + public var efSearch: UInt32 + public var levelBits: UInt8 + public var overfetchMultiplier: UInt32 + public var seed: UInt64 + public var routingVectorEncoding: HnswRoutingVectorEncodingRecord // Default memberwise initializers are never public by default, so we // declare one manually. - public init(reachability: GcReachabilityRecord, candidateNodes: UInt64, reclaimableCids: [Data], reclaimableNodes: UInt64, reclaimableBytes: UInt64, missingCandidates: UInt64) { - self.reachability = reachability - self.candidateNodes = candidateNodes - self.reclaimableCids = reclaimableCids - self.reclaimableNodes = reclaimableNodes - self.reclaimableBytes = reclaimableBytes - self.missingCandidates = missingCandidates + public init(maxConnections: UInt16, efConstruction: UInt32, efSearch: UInt32, levelBits: UInt8, overfetchMultiplier: UInt32, seed: UInt64, routingVectorEncoding: HnswRoutingVectorEncodingRecord) { + self.maxConnections = maxConnections + self.efConstruction = efConstruction + self.efSearch = efSearch + self.levelBits = levelBits + self.overfetchMultiplier = overfetchMultiplier + self.seed = seed + self.routingVectorEncoding = routingVectorEncoding } - - + + } #if compiler(>=6) -extension GcPlanRecord: Sendable {} +extension HnswConfigRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeGcPlanRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> GcPlanRecord { +public struct FfiConverterTypeHnswConfigRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> HnswConfigRecord { return - try GcPlanRecord( - reachability: FfiConverterTypeGcReachabilityRecord.read(from: &buf), - candidateNodes: FfiConverterUInt64.read(from: &buf), - reclaimableCids: FfiConverterSequenceData.read(from: &buf), - reclaimableNodes: FfiConverterUInt64.read(from: &buf), - reclaimableBytes: FfiConverterUInt64.read(from: &buf), - missingCandidates: FfiConverterUInt64.read(from: &buf) + try HnswConfigRecord( + maxConnections: FfiConverterUInt16.read(from: &buf), + efConstruction: FfiConverterUInt32.read(from: &buf), + efSearch: FfiConverterUInt32.read(from: &buf), + levelBits: FfiConverterUInt8.read(from: &buf), + overfetchMultiplier: FfiConverterUInt32.read(from: &buf), + seed: FfiConverterUInt64.read(from: &buf), + routingVectorEncoding: FfiConverterTypeHnswRoutingVectorEncodingRecord.read(from: &buf) ) } - public static func write(_ value: GcPlanRecord, into buf: inout [UInt8]) { - FfiConverterTypeGcReachabilityRecord.write(value.reachability, into: &buf) - FfiConverterUInt64.write(value.candidateNodes, into: &buf) - FfiConverterSequenceData.write(value.reclaimableCids, into: &buf) - FfiConverterUInt64.write(value.reclaimableNodes, into: &buf) - FfiConverterUInt64.write(value.reclaimableBytes, into: &buf) - FfiConverterUInt64.write(value.missingCandidates, into: &buf) + public static func write(_ value: HnswConfigRecord, into buf: inout [UInt8]) { + FfiConverterUInt16.write(value.maxConnections, into: &buf) + FfiConverterUInt32.write(value.efConstruction, into: &buf) + FfiConverterUInt32.write(value.efSearch, into: &buf) + FfiConverterUInt8.write(value.levelBits, into: &buf) + FfiConverterUInt32.write(value.overfetchMultiplier, into: &buf) + FfiConverterUInt64.write(value.seed, into: &buf) + FfiConverterTypeHnswRoutingVectorEncodingRecord.write(value.routingVectorEncoding, into: &buf) } } @@ -14902,65 +15569,53 @@ public struct FfiConverterTypeGcPlanRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeGcPlanRecord_lift(_ buf: RustBuffer) throws -> GcPlanRecord { - return try FfiConverterTypeGcPlanRecord.lift(buf) +public func FfiConverterTypeHnswConfigRecord_lift(_ buf: RustBuffer) throws -> HnswConfigRecord { + return try FfiConverterTypeHnswConfigRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeGcPlanRecord_lower(_ value: GcPlanRecord) -> RustBuffer { - return FfiConverterTypeGcPlanRecord.lower(value) +public func FfiConverterTypeHnswConfigRecord_lower(_ value: HnswConfigRecord) -> RustBuffer { + return FfiConverterTypeHnswConfigRecord.lower(value) } -public struct GcReachabilityRecord: Equatable, Hashable { - public var liveCids: [Data] - public var liveNodes: UInt64 - public var liveBytes: UInt64 - public var leafNodes: UInt64 - public var internalNodes: UInt64 +public struct HostStoreBatchGetResultRecord: Equatable, Hashable { + public var values: [Data?] + public var error: String? // Default memberwise initializers are never public by default, so we // declare one manually. - public init(liveCids: [Data], liveNodes: UInt64, liveBytes: UInt64, leafNodes: UInt64, internalNodes: UInt64) { - self.liveCids = liveCids - self.liveNodes = liveNodes - self.liveBytes = liveBytes - self.leafNodes = leafNodes - self.internalNodes = internalNodes + public init(values: [Data?], error: String?) { + self.values = values + self.error = error } - - + + } #if compiler(>=6) -extension GcReachabilityRecord: Sendable {} +extension HostStoreBatchGetResultRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeGcReachabilityRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> GcReachabilityRecord { +public struct FfiConverterTypeHostStoreBatchGetResultRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> HostStoreBatchGetResultRecord { return - try GcReachabilityRecord( - liveCids: FfiConverterSequenceData.read(from: &buf), - liveNodes: FfiConverterUInt64.read(from: &buf), - liveBytes: FfiConverterUInt64.read(from: &buf), - leafNodes: FfiConverterUInt64.read(from: &buf), - internalNodes: FfiConverterUInt64.read(from: &buf) + try HostStoreBatchGetResultRecord( + values: FfiConverterSequenceOptionData.read(from: &buf), + error: FfiConverterOptionString.read(from: &buf) ) } - public static func write(_ value: GcReachabilityRecord, into buf: inout [UInt8]) { - FfiConverterSequenceData.write(value.liveCids, into: &buf) - FfiConverterUInt64.write(value.liveNodes, into: &buf) - FfiConverterUInt64.write(value.liveBytes, into: &buf) - FfiConverterUInt64.write(value.leafNodes, into: &buf) - FfiConverterUInt64.write(value.internalNodes, into: &buf) + public static func write(_ value: HostStoreBatchGetResultRecord, into buf: inout [UInt8]) { + FfiConverterSequenceOptionData.write(value.values, into: &buf) + FfiConverterOptionString.write(value.error, into: &buf) } } @@ -14968,57 +15623,53 @@ public struct FfiConverterTypeGcReachabilityRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeGcReachabilityRecord_lift(_ buf: RustBuffer) throws -> GcReachabilityRecord { - return try FfiConverterTypeGcReachabilityRecord.lift(buf) +public func FfiConverterTypeHostStoreBatchGetResultRecord_lift(_ buf: RustBuffer) throws -> HostStoreBatchGetResultRecord { + return try FfiConverterTypeHostStoreBatchGetResultRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeGcReachabilityRecord_lower(_ value: GcReachabilityRecord) -> RustBuffer { - return FfiConverterTypeGcReachabilityRecord.lower(value) +public func FfiConverterTypeHostStoreBatchGetResultRecord_lower(_ value: HostStoreBatchGetResultRecord) -> RustBuffer { + return FfiConverterTypeHostStoreBatchGetResultRecord.lower(value) } -public struct GcSweepRecord: Equatable, Hashable { - public var plan: GcPlanRecord - public var deletedNodes: UInt64 - public var deletedBytes: UInt64 +public struct HostStoreBoolResultRecord: Equatable, Hashable { + public var value: Bool + public var error: String? // Default memberwise initializers are never public by default, so we // declare one manually. - public init(plan: GcPlanRecord, deletedNodes: UInt64, deletedBytes: UInt64) { - self.plan = plan - self.deletedNodes = deletedNodes - self.deletedBytes = deletedBytes + public init(value: Bool, error: String?) { + self.value = value + self.error = error } - - + + } #if compiler(>=6) -extension GcSweepRecord: Sendable {} +extension HostStoreBoolResultRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeGcSweepRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> GcSweepRecord { +public struct FfiConverterTypeHostStoreBoolResultRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> HostStoreBoolResultRecord { return - try GcSweepRecord( - plan: FfiConverterTypeGcPlanRecord.read(from: &buf), - deletedNodes: FfiConverterUInt64.read(from: &buf), - deletedBytes: FfiConverterUInt64.read(from: &buf) + try HostStoreBoolResultRecord( + value: FfiConverterBool.read(from: &buf), + error: FfiConverterOptionString.read(from: &buf) ) } - public static func write(_ value: GcSweepRecord, into buf: inout [UInt8]) { - FfiConverterTypeGcPlanRecord.write(value.plan, into: &buf) - FfiConverterUInt64.write(value.deletedNodes, into: &buf) - FfiConverterUInt64.write(value.deletedBytes, into: &buf) + public static func write(_ value: HostStoreBoolResultRecord, into buf: inout [UInt8]) { + FfiConverterBool.write(value.value, into: &buf) + FfiConverterOptionString.write(value.error, into: &buf) } } @@ -15026,65 +15677,53 @@ public struct FfiConverterTypeGcSweepRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeGcSweepRecord_lift(_ buf: RustBuffer) throws -> GcSweepRecord { - return try FfiConverterTypeGcSweepRecord.lift(buf) +public func FfiConverterTypeHostStoreBoolResultRecord_lift(_ buf: RustBuffer) throws -> HostStoreBoolResultRecord { + return try FfiConverterTypeHostStoreBoolResultRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeGcSweepRecord_lower(_ value: GcSweepRecord) -> RustBuffer { - return FfiConverterTypeGcSweepRecord.lower(value) +public func FfiConverterTypeHostStoreBoolResultRecord_lower(_ value: HostStoreBoolResultRecord) -> RustBuffer { + return FfiConverterTypeHostStoreBoolResultRecord.lower(value) } -public struct HnswBuildLimitsRecord: Equatable, Hashable { - public var maxRecords: UInt64? - public var maxOwnedBytes: UInt64? - public var maxDistanceEvaluations: UInt64? - public var workerThreads: UInt64 - public var maxEncodedGraphBytes: UInt64? +public struct HostStoreBytesResultRecord: Equatable, Hashable { + public var value: Data? + public var error: String? // Default memberwise initializers are never public by default, so we // declare one manually. - public init(maxRecords: UInt64?, maxOwnedBytes: UInt64?, maxDistanceEvaluations: UInt64?, workerThreads: UInt64, maxEncodedGraphBytes: UInt64?) { - self.maxRecords = maxRecords - self.maxOwnedBytes = maxOwnedBytes - self.maxDistanceEvaluations = maxDistanceEvaluations - self.workerThreads = workerThreads - self.maxEncodedGraphBytes = maxEncodedGraphBytes + public init(value: Data?, error: String?) { + self.value = value + self.error = error } - - + + } #if compiler(>=6) -extension HnswBuildLimitsRecord: Sendable {} +extension HostStoreBytesResultRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeHnswBuildLimitsRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> HnswBuildLimitsRecord { +public struct FfiConverterTypeHostStoreBytesResultRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> HostStoreBytesResultRecord { return - try HnswBuildLimitsRecord( - maxRecords: FfiConverterOptionUInt64.read(from: &buf), - maxOwnedBytes: FfiConverterOptionUInt64.read(from: &buf), - maxDistanceEvaluations: FfiConverterOptionUInt64.read(from: &buf), - workerThreads: FfiConverterUInt64.read(from: &buf), - maxEncodedGraphBytes: FfiConverterOptionUInt64.read(from: &buf) + try HostStoreBytesResultRecord( + value: FfiConverterOptionData.read(from: &buf), + error: FfiConverterOptionString.read(from: &buf) ) } - public static func write(_ value: HnswBuildLimitsRecord, into buf: inout [UInt8]) { - FfiConverterOptionUInt64.write(value.maxRecords, into: &buf) - FfiConverterOptionUInt64.write(value.maxOwnedBytes, into: &buf) - FfiConverterOptionUInt64.write(value.maxDistanceEvaluations, into: &buf) - FfiConverterUInt64.write(value.workerThreads, into: &buf) - FfiConverterOptionUInt64.write(value.maxEncodedGraphBytes, into: &buf) + public static func write(_ value: HostStoreBytesResultRecord, into buf: inout [UInt8]) { + FfiConverterOptionData.write(value.value, into: &buf) + FfiConverterOptionString.write(value.error, into: &buf) } } @@ -15092,53 +15731,53 @@ public struct FfiConverterTypeHnswBuildLimitsRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeHnswBuildLimitsRecord_lift(_ buf: RustBuffer) throws -> HnswBuildLimitsRecord { - return try FfiConverterTypeHnswBuildLimitsRecord.lift(buf) +public func FfiConverterTypeHostStoreBytesResultRecord_lift(_ buf: RustBuffer) throws -> HostStoreBytesResultRecord { + return try FfiConverterTypeHostStoreBytesResultRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeHnswBuildLimitsRecord_lower(_ value: HnswBuildLimitsRecord) -> RustBuffer { - return FfiConverterTypeHnswBuildLimitsRecord.lower(value) +public func FfiConverterTypeHostStoreBytesResultRecord_lower(_ value: HostStoreBytesResultRecord) -> RustBuffer { + return FfiConverterTypeHostStoreBytesResultRecord.lower(value) } -public struct HnswBuildResultRecord { - public var index: BindingHnswIndex - public var stats: HnswBuildStatsRecord +public struct HostStoreListBytesResultRecord: Equatable, Hashable { + public var values: [Data] + public var error: String? // Default memberwise initializers are never public by default, so we // declare one manually. - public init(index: BindingHnswIndex, stats: HnswBuildStatsRecord) { - self.index = index - self.stats = stats + public init(values: [Data], error: String?) { + self.values = values + self.error = error } - - + + } #if compiler(>=6) -extension HnswBuildResultRecord: Sendable {} +extension HostStoreListBytesResultRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeHnswBuildResultRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> HnswBuildResultRecord { +public struct FfiConverterTypeHostStoreListBytesResultRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> HostStoreListBytesResultRecord { return - try HnswBuildResultRecord( - index: FfiConverterTypeBindingHnswIndex.read(from: &buf), - stats: FfiConverterTypeHnswBuildStatsRecord.read(from: &buf) + try HostStoreListBytesResultRecord( + values: FfiConverterSequenceData.read(from: &buf), + error: FfiConverterOptionString.read(from: &buf) ) } - public static func write(_ value: HnswBuildResultRecord, into buf: inout [UInt8]) { - FfiConverterTypeBindingHnswIndex.write(value.index, into: &buf) - FfiConverterTypeHnswBuildStatsRecord.write(value.stats, into: &buf) + public static func write(_ value: HostStoreListBytesResultRecord, into buf: inout [UInt8]) { + FfiConverterSequenceData.write(value.values, into: &buf) + FfiConverterOptionString.write(value.error, into: &buf) } } @@ -15146,69 +15785,53 @@ public struct FfiConverterTypeHnswBuildResultRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeHnswBuildResultRecord_lift(_ buf: RustBuffer) throws -> HnswBuildResultRecord { - return try FfiConverterTypeHnswBuildResultRecord.lift(buf) +public func FfiConverterTypeHostStoreListBytesResultRecord_lift(_ buf: RustBuffer) throws -> HostStoreListBytesResultRecord { + return try FfiConverterTypeHostStoreListBytesResultRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeHnswBuildResultRecord_lower(_ value: HnswBuildResultRecord) -> RustBuffer { - return FfiConverterTypeHnswBuildResultRecord.lower(value) +public func FfiConverterTypeHostStoreListBytesResultRecord_lower(_ value: HostStoreListBytesResultRecord) -> RustBuffer { + return FfiConverterTypeHostStoreListBytesResultRecord.lower(value) } -public struct HnswBuildStatsRecord: Equatable, Hashable { - public var records: UInt64 - public var distanceEvaluations: UInt64 - public var directedEdges: UInt64 - public var maximumLevel: UInt8 - public var ownedBytes: UInt64 - public var encodedGraphBytes: UInt64 +public struct HostStoreListRootsResultRecord: Equatable, Hashable { + public var values: [HostStoreNamedRootManifestRecord] + public var error: String? // Default memberwise initializers are never public by default, so we // declare one manually. - public init(records: UInt64, distanceEvaluations: UInt64, directedEdges: UInt64, maximumLevel: UInt8, ownedBytes: UInt64, encodedGraphBytes: UInt64) { - self.records = records - self.distanceEvaluations = distanceEvaluations - self.directedEdges = directedEdges - self.maximumLevel = maximumLevel - self.ownedBytes = ownedBytes - self.encodedGraphBytes = encodedGraphBytes + public init(values: [HostStoreNamedRootManifestRecord], error: String?) { + self.values = values + self.error = error } - - + + } #if compiler(>=6) -extension HnswBuildStatsRecord: Sendable {} +extension HostStoreListRootsResultRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeHnswBuildStatsRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> HnswBuildStatsRecord { +public struct FfiConverterTypeHostStoreListRootsResultRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> HostStoreListRootsResultRecord { return - try HnswBuildStatsRecord( - records: FfiConverterUInt64.read(from: &buf), - distanceEvaluations: FfiConverterUInt64.read(from: &buf), - directedEdges: FfiConverterUInt64.read(from: &buf), - maximumLevel: FfiConverterUInt8.read(from: &buf), - ownedBytes: FfiConverterUInt64.read(from: &buf), - encodedGraphBytes: FfiConverterUInt64.read(from: &buf) + try HostStoreListRootsResultRecord( + values: FfiConverterSequenceTypeHostStoreNamedRootManifestRecord.read(from: &buf), + error: FfiConverterOptionString.read(from: &buf) ) } - public static func write(_ value: HnswBuildStatsRecord, into buf: inout [UInt8]) { - FfiConverterUInt64.write(value.records, into: &buf) - FfiConverterUInt64.write(value.distanceEvaluations, into: &buf) - FfiConverterUInt64.write(value.directedEdges, into: &buf) - FfiConverterUInt8.write(value.maximumLevel, into: &buf) - FfiConverterUInt64.write(value.ownedBytes, into: &buf) - FfiConverterUInt64.write(value.encodedGraphBytes, into: &buf) + public static func write(_ value: HostStoreListRootsResultRecord, into buf: inout [UInt8]) { + FfiConverterSequenceTypeHostStoreNamedRootManifestRecord.write(value.values, into: &buf) + FfiConverterOptionString.write(value.error, into: &buf) } } @@ -15216,73 +15839,53 @@ public struct FfiConverterTypeHnswBuildStatsRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeHnswBuildStatsRecord_lift(_ buf: RustBuffer) throws -> HnswBuildStatsRecord { - return try FfiConverterTypeHnswBuildStatsRecord.lift(buf) +public func FfiConverterTypeHostStoreListRootsResultRecord_lift(_ buf: RustBuffer) throws -> HostStoreListRootsResultRecord { + return try FfiConverterTypeHostStoreListRootsResultRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeHnswBuildStatsRecord_lower(_ value: HnswBuildStatsRecord) -> RustBuffer { - return FfiConverterTypeHnswBuildStatsRecord.lower(value) +public func FfiConverterTypeHostStoreListRootsResultRecord_lower(_ value: HostStoreListRootsResultRecord) -> RustBuffer { + return FfiConverterTypeHostStoreListRootsResultRecord.lower(value) } -public struct HnswConfigRecord: Equatable, Hashable { - public var maxConnections: UInt16 - public var efConstruction: UInt32 - public var efSearch: UInt32 - public var levelBits: UInt8 - public var overfetchMultiplier: UInt32 - public var seed: UInt64 - public var routingVectorEncoding: HnswRoutingVectorEncodingRecord +public struct HostStoreNamedRootManifestRecord: Equatable, Hashable { + public var name: Data + public var manifest: RootManifestRecord // Default memberwise initializers are never public by default, so we // declare one manually. - public init(maxConnections: UInt16, efConstruction: UInt32, efSearch: UInt32, levelBits: UInt8, overfetchMultiplier: UInt32, seed: UInt64, routingVectorEncoding: HnswRoutingVectorEncodingRecord) { - self.maxConnections = maxConnections - self.efConstruction = efConstruction - self.efSearch = efSearch - self.levelBits = levelBits - self.overfetchMultiplier = overfetchMultiplier - self.seed = seed - self.routingVectorEncoding = routingVectorEncoding + public init(name: Data, manifest: RootManifestRecord) { + self.name = name + self.manifest = manifest } - - + + } #if compiler(>=6) -extension HnswConfigRecord: Sendable {} +extension HostStoreNamedRootManifestRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeHnswConfigRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> HnswConfigRecord { +public struct FfiConverterTypeHostStoreNamedRootManifestRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> HostStoreNamedRootManifestRecord { return - try HnswConfigRecord( - maxConnections: FfiConverterUInt16.read(from: &buf), - efConstruction: FfiConverterUInt32.read(from: &buf), - efSearch: FfiConverterUInt32.read(from: &buf), - levelBits: FfiConverterUInt8.read(from: &buf), - overfetchMultiplier: FfiConverterUInt32.read(from: &buf), - seed: FfiConverterUInt64.read(from: &buf), - routingVectorEncoding: FfiConverterTypeHnswRoutingVectorEncodingRecord.read(from: &buf) + try HostStoreNamedRootManifestRecord( + name: FfiConverterData.read(from: &buf), + manifest: FfiConverterTypeRootManifestRecord.read(from: &buf) ) } - public static func write(_ value: HnswConfigRecord, into buf: inout [UInt8]) { - FfiConverterUInt16.write(value.maxConnections, into: &buf) - FfiConverterUInt32.write(value.efConstruction, into: &buf) - FfiConverterUInt32.write(value.efSearch, into: &buf) - FfiConverterUInt8.write(value.levelBits, into: &buf) - FfiConverterUInt32.write(value.overfetchMultiplier, into: &buf) - FfiConverterUInt64.write(value.seed, into: &buf) - FfiConverterTypeHnswRoutingVectorEncodingRecord.write(value.routingVectorEncoding, into: &buf) + public static func write(_ value: HostStoreNamedRootManifestRecord, into buf: inout [UInt8]) { + FfiConverterData.write(value.name, into: &buf) + FfiConverterTypeRootManifestRecord.write(value.manifest, into: &buf) } } @@ -15290,52 +15893,56 @@ public struct FfiConverterTypeHnswConfigRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeHnswConfigRecord_lift(_ buf: RustBuffer) throws -> HnswConfigRecord { - return try FfiConverterTypeHnswConfigRecord.lift(buf) +public func FfiConverterTypeHostStoreNamedRootManifestRecord_lift(_ buf: RustBuffer) throws -> HostStoreNamedRootManifestRecord { + return try FfiConverterTypeHostStoreNamedRootManifestRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeHnswConfigRecord_lower(_ value: HnswConfigRecord) -> RustBuffer { - return FfiConverterTypeHnswConfigRecord.lower(value) +public func FfiConverterTypeHostStoreNamedRootManifestRecord_lower(_ value: HostStoreNamedRootManifestRecord) -> RustBuffer { + return FfiConverterTypeHostStoreNamedRootManifestRecord.lower(value) } -public struct HostStoreBatchGetResultRecord: Equatable, Hashable { - public var values: [Data?] +public struct HostStoreRootCasResultRecord: Equatable, Hashable { + public var applied: Bool + public var current: RootManifestRecord? public var error: String? // Default memberwise initializers are never public by default, so we // declare one manually. - public init(values: [Data?], error: String?) { - self.values = values + public init(applied: Bool, current: RootManifestRecord?, error: String?) { + self.applied = applied + self.current = current self.error = error } - - + + } #if compiler(>=6) -extension HostStoreBatchGetResultRecord: Sendable {} +extension HostStoreRootCasResultRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeHostStoreBatchGetResultRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> HostStoreBatchGetResultRecord { +public struct FfiConverterTypeHostStoreRootCasResultRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> HostStoreRootCasResultRecord { return - try HostStoreBatchGetResultRecord( - values: FfiConverterSequenceOptionData.read(from: &buf), + try HostStoreRootCasResultRecord( + applied: FfiConverterBool.read(from: &buf), + current: FfiConverterOptionTypeRootManifestRecord.read(from: &buf), error: FfiConverterOptionString.read(from: &buf) ) } - public static func write(_ value: HostStoreBatchGetResultRecord, into buf: inout [UInt8]) { - FfiConverterSequenceOptionData.write(value.values, into: &buf) + public static func write(_ value: HostStoreRootCasResultRecord, into buf: inout [UInt8]) { + FfiConverterBool.write(value.applied, into: &buf) + FfiConverterOptionTypeRootManifestRecord.write(value.current, into: &buf) FfiConverterOptionString.write(value.error, into: &buf) } } @@ -15344,52 +15951,52 @@ public struct FfiConverterTypeHostStoreBatchGetResultRecord: FfiConverterRustBuf #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeHostStoreBatchGetResultRecord_lift(_ buf: RustBuffer) throws -> HostStoreBatchGetResultRecord { - return try FfiConverterTypeHostStoreBatchGetResultRecord.lift(buf) +public func FfiConverterTypeHostStoreRootCasResultRecord_lift(_ buf: RustBuffer) throws -> HostStoreRootCasResultRecord { + return try FfiConverterTypeHostStoreRootCasResultRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeHostStoreBatchGetResultRecord_lower(_ value: HostStoreBatchGetResultRecord) -> RustBuffer { - return FfiConverterTypeHostStoreBatchGetResultRecord.lower(value) +public func FfiConverterTypeHostStoreRootCasResultRecord_lower(_ value: HostStoreRootCasResultRecord) -> RustBuffer { + return FfiConverterTypeHostStoreRootCasResultRecord.lower(value) } -public struct HostStoreBoolResultRecord: Equatable, Hashable { - public var value: Bool +public struct HostStoreRootResultRecord: Equatable, Hashable { + public var value: RootManifestRecord? public var error: String? // Default memberwise initializers are never public by default, so we // declare one manually. - public init(value: Bool, error: String?) { + public init(value: RootManifestRecord?, error: String?) { self.value = value self.error = error } - - + + } #if compiler(>=6) -extension HostStoreBoolResultRecord: Sendable {} +extension HostStoreRootResultRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeHostStoreBoolResultRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> HostStoreBoolResultRecord { +public struct FfiConverterTypeHostStoreRootResultRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> HostStoreRootResultRecord { return - try HostStoreBoolResultRecord( - value: FfiConverterBool.read(from: &buf), + try HostStoreRootResultRecord( + value: FfiConverterOptionTypeRootManifestRecord.read(from: &buf), error: FfiConverterOptionString.read(from: &buf) ) } - public static func write(_ value: HostStoreBoolResultRecord, into buf: inout [UInt8]) { - FfiConverterBool.write(value.value, into: &buf) + public static func write(_ value: HostStoreRootResultRecord, into buf: inout [UInt8]) { + FfiConverterOptionTypeRootManifestRecord.write(value.value, into: &buf) FfiConverterOptionString.write(value.error, into: &buf) } } @@ -15398,52 +16005,48 @@ public struct FfiConverterTypeHostStoreBoolResultRecord: FfiConverterRustBuffer #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeHostStoreBoolResultRecord_lift(_ buf: RustBuffer) throws -> HostStoreBoolResultRecord { - return try FfiConverterTypeHostStoreBoolResultRecord.lift(buf) +public func FfiConverterTypeHostStoreRootResultRecord_lift(_ buf: RustBuffer) throws -> HostStoreRootResultRecord { + return try FfiConverterTypeHostStoreRootResultRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeHostStoreBoolResultRecord_lower(_ value: HostStoreBoolResultRecord) -> RustBuffer { - return FfiConverterTypeHostStoreBoolResultRecord.lower(value) +public func FfiConverterTypeHostStoreRootResultRecord_lower(_ value: HostStoreRootResultRecord) -> RustBuffer { + return FfiConverterTypeHostStoreRootResultRecord.lower(value) } -public struct HostStoreBytesResultRecord: Equatable, Hashable { - public var value: Data? +public struct HostStoreUnitResultRecord: Equatable, Hashable { public var error: String? // Default memberwise initializers are never public by default, so we // declare one manually. - public init(value: Data?, error: String?) { - self.value = value + public init(error: String?) { self.error = error } - - + + } #if compiler(>=6) -extension HostStoreBytesResultRecord: Sendable {} +extension HostStoreUnitResultRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeHostStoreBytesResultRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> HostStoreBytesResultRecord { +public struct FfiConverterTypeHostStoreUnitResultRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> HostStoreUnitResultRecord { return - try HostStoreBytesResultRecord( - value: FfiConverterOptionData.read(from: &buf), + try HostStoreUnitResultRecord( error: FfiConverterOptionString.read(from: &buf) ) } - public static func write(_ value: HostStoreBytesResultRecord, into buf: inout [UInt8]) { - FfiConverterOptionData.write(value.value, into: &buf) + public static func write(_ value: HostStoreUnitResultRecord, into buf: inout [UInt8]) { FfiConverterOptionString.write(value.error, into: &buf) } } @@ -15452,53 +16055,73 @@ public struct FfiConverterTypeHostStoreBytesResultRecord: FfiConverterRustBuffer #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeHostStoreBytesResultRecord_lift(_ buf: RustBuffer) throws -> HostStoreBytesResultRecord { - return try FfiConverterTypeHostStoreBytesResultRecord.lift(buf) +public func FfiConverterTypeHostStoreUnitResultRecord_lift(_ buf: RustBuffer) throws -> HostStoreUnitResultRecord { + return try FfiConverterTypeHostStoreUnitResultRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeHostStoreBytesResultRecord_lower(_ value: HostStoreBytesResultRecord) -> RustBuffer { - return FfiConverterTypeHostStoreBytesResultRecord.lower(value) +public func FfiConverterTypeHostStoreUnitResultRecord_lower(_ value: HostStoreUnitResultRecord) -> RustBuffer { + return FfiConverterTypeHostStoreUnitResultRecord.lower(value) } -public struct HostStoreListBytesResultRecord: Equatable, Hashable { - public var values: [Data] - public var error: String? +public struct IndexBuildResultRecord: Equatable, Hashable { + public var sourceVersion: Data + public var indexVersion: Data + public var stateVersion: Data + public var generation: UInt64 + public var entries: UInt64 + public var attempts: UInt64 + public var activated: Bool // Default memberwise initializers are never public by default, so we // declare one manually. - public init(values: [Data], error: String?) { - self.values = values - self.error = error + public init(sourceVersion: Data, indexVersion: Data, stateVersion: Data, generation: UInt64, entries: UInt64, attempts: UInt64, activated: Bool) { + self.sourceVersion = sourceVersion + self.indexVersion = indexVersion + self.stateVersion = stateVersion + self.generation = generation + self.entries = entries + self.attempts = attempts + self.activated = activated } - - + + } #if compiler(>=6) -extension HostStoreListBytesResultRecord: Sendable {} +extension IndexBuildResultRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeHostStoreListBytesResultRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> HostStoreListBytesResultRecord { +public struct FfiConverterTypeIndexBuildResultRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> IndexBuildResultRecord { return - try HostStoreListBytesResultRecord( - values: FfiConverterSequenceData.read(from: &buf), - error: FfiConverterOptionString.read(from: &buf) + try IndexBuildResultRecord( + sourceVersion: FfiConverterData.read(from: &buf), + indexVersion: FfiConverterData.read(from: &buf), + stateVersion: FfiConverterData.read(from: &buf), + generation: FfiConverterUInt64.read(from: &buf), + entries: FfiConverterUInt64.read(from: &buf), + attempts: FfiConverterUInt64.read(from: &buf), + activated: FfiConverterBool.read(from: &buf) ) } - public static func write(_ value: HostStoreListBytesResultRecord, into buf: inout [UInt8]) { - FfiConverterSequenceData.write(value.values, into: &buf) - FfiConverterOptionString.write(value.error, into: &buf) + public static func write(_ value: IndexBuildResultRecord, into buf: inout [UInt8]) { + FfiConverterData.write(value.sourceVersion, into: &buf) + FfiConverterData.write(value.indexVersion, into: &buf) + FfiConverterData.write(value.stateVersion, into: &buf) + FfiConverterUInt64.write(value.generation, into: &buf) + FfiConverterUInt64.write(value.entries, into: &buf) + FfiConverterUInt64.write(value.attempts, into: &buf) + FfiConverterBool.write(value.activated, into: &buf) } } @@ -15506,53 +16129,53 @@ public struct FfiConverterTypeHostStoreListBytesResultRecord: FfiConverterRustBu #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeHostStoreListBytesResultRecord_lift(_ buf: RustBuffer) throws -> HostStoreListBytesResultRecord { - return try FfiConverterTypeHostStoreListBytesResultRecord.lift(buf) +public func FfiConverterTypeIndexBuildResultRecord_lift(_ buf: RustBuffer) throws -> IndexBuildResultRecord { + return try FfiConverterTypeIndexBuildResultRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeHostStoreListBytesResultRecord_lower(_ value: HostStoreListBytesResultRecord) -> RustBuffer { - return FfiConverterTypeHostStoreListBytesResultRecord.lower(value) +public func FfiConverterTypeIndexBuildResultRecord_lower(_ value: IndexBuildResultRecord) -> RustBuffer { + return FfiConverterTypeIndexBuildResultRecord.lower(value) } -public struct HostStoreListRootsResultRecord: Equatable, Hashable { - public var values: [HostStoreNamedRootManifestRecord] - public var error: String? +public struct IndexEntryRecord: Equatable, Hashable { + public var term: Data + public var projection: Data? // Default memberwise initializers are never public by default, so we // declare one manually. - public init(values: [HostStoreNamedRootManifestRecord], error: String?) { - self.values = values - self.error = error + public init(term: Data, projection: Data?) { + self.term = term + self.projection = projection } - - + + } #if compiler(>=6) -extension HostStoreListRootsResultRecord: Sendable {} +extension IndexEntryRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeHostStoreListRootsResultRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> HostStoreListRootsResultRecord { +public struct FfiConverterTypeIndexEntryRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> IndexEntryRecord { return - try HostStoreListRootsResultRecord( - values: FfiConverterSequenceTypeHostStoreNamedRootManifestRecord.read(from: &buf), - error: FfiConverterOptionString.read(from: &buf) + try IndexEntryRecord( + term: FfiConverterData.read(from: &buf), + projection: FfiConverterOptionData.read(from: &buf) ) } - public static func write(_ value: HostStoreListRootsResultRecord, into buf: inout [UInt8]) { - FfiConverterSequenceTypeHostStoreNamedRootManifestRecord.write(value.values, into: &buf) - FfiConverterOptionString.write(value.error, into: &buf) + public static func write(_ value: IndexEntryRecord, into buf: inout [UInt8]) { + FfiConverterData.write(value.term, into: &buf) + FfiConverterOptionData.write(value.projection, into: &buf) } } @@ -15560,53 +16183,57 @@ public struct FfiConverterTypeHostStoreListRootsResultRecord: FfiConverterRustBu #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeHostStoreListRootsResultRecord_lift(_ buf: RustBuffer) throws -> HostStoreListRootsResultRecord { - return try FfiConverterTypeHostStoreListRootsResultRecord.lift(buf) +public func FfiConverterTypeIndexEntryRecord_lift(_ buf: RustBuffer) throws -> IndexEntryRecord { + return try FfiConverterTypeIndexEntryRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeHostStoreListRootsResultRecord_lower(_ value: HostStoreListRootsResultRecord) -> RustBuffer { - return FfiConverterTypeHostStoreListRootsResultRecord.lower(value) +public func FfiConverterTypeIndexEntryRecord_lower(_ value: IndexEntryRecord) -> RustBuffer { + return FfiConverterTypeIndexEntryRecord.lower(value) } -public struct HostStoreNamedRootManifestRecord: Equatable, Hashable { - public var name: Data - public var manifest: RootManifestRecord +public struct IndexMatchRecord: Equatable, Hashable { + public var term: Data + public var primaryKey: Data + public var projection: Data? // Default memberwise initializers are never public by default, so we // declare one manually. - public init(name: Data, manifest: RootManifestRecord) { - self.name = name - self.manifest = manifest + public init(term: Data, primaryKey: Data, projection: Data?) { + self.term = term + self.primaryKey = primaryKey + self.projection = projection } - - + + } #if compiler(>=6) -extension HostStoreNamedRootManifestRecord: Sendable {} +extension IndexMatchRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeHostStoreNamedRootManifestRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> HostStoreNamedRootManifestRecord { +public struct FfiConverterTypeIndexMatchRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> IndexMatchRecord { return - try HostStoreNamedRootManifestRecord( - name: FfiConverterData.read(from: &buf), - manifest: FfiConverterTypeRootManifestRecord.read(from: &buf) + try IndexMatchRecord( + term: FfiConverterData.read(from: &buf), + primaryKey: FfiConverterData.read(from: &buf), + projection: FfiConverterOptionData.read(from: &buf) ) } - public static func write(_ value: HostStoreNamedRootManifestRecord, into buf: inout [UInt8]) { - FfiConverterData.write(value.name, into: &buf) - FfiConverterTypeRootManifestRecord.write(value.manifest, into: &buf) + public static func write(_ value: IndexMatchRecord, into buf: inout [UInt8]) { + FfiConverterData.write(value.term, into: &buf) + FfiConverterData.write(value.primaryKey, into: &buf) + FfiConverterOptionData.write(value.projection, into: &buf) } } @@ -15614,57 +16241,53 @@ public struct FfiConverterTypeHostStoreNamedRootManifestRecord: FfiConverterRust #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeHostStoreNamedRootManifestRecord_lift(_ buf: RustBuffer) throws -> HostStoreNamedRootManifestRecord { - return try FfiConverterTypeHostStoreNamedRootManifestRecord.lift(buf) +public func FfiConverterTypeIndexMatchRecord_lift(_ buf: RustBuffer) throws -> IndexMatchRecord { + return try FfiConverterTypeIndexMatchRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeHostStoreNamedRootManifestRecord_lower(_ value: HostStoreNamedRootManifestRecord) -> RustBuffer { - return FfiConverterTypeHostStoreNamedRootManifestRecord.lower(value) +public func FfiConverterTypeIndexMatchRecord_lower(_ value: IndexMatchRecord) -> RustBuffer { + return FfiConverterTypeIndexMatchRecord.lower(value) } -public struct HostStoreRootCasResultRecord: Equatable, Hashable { - public var applied: Bool - public var current: RootManifestRecord? - public var error: String? +public struct IndexPageRecord: Equatable, Hashable { + public var matches: [IndexMatchRecord] + public var nextCursor: Data? // Default memberwise initializers are never public by default, so we // declare one manually. - public init(applied: Bool, current: RootManifestRecord?, error: String?) { - self.applied = applied - self.current = current - self.error = error + public init(matches: [IndexMatchRecord], nextCursor: Data?) { + self.matches = matches + self.nextCursor = nextCursor } - - + + } #if compiler(>=6) -extension HostStoreRootCasResultRecord: Sendable {} +extension IndexPageRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeHostStoreRootCasResultRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> HostStoreRootCasResultRecord { +public struct FfiConverterTypeIndexPageRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> IndexPageRecord { return - try HostStoreRootCasResultRecord( - applied: FfiConverterBool.read(from: &buf), - current: FfiConverterOptionTypeRootManifestRecord.read(from: &buf), - error: FfiConverterOptionString.read(from: &buf) + try IndexPageRecord( + matches: FfiConverterSequenceTypeIndexMatchRecord.read(from: &buf), + nextCursor: FfiConverterOptionData.read(from: &buf) ) } - public static func write(_ value: HostStoreRootCasResultRecord, into buf: inout [UInt8]) { - FfiConverterBool.write(value.applied, into: &buf) - FfiConverterOptionTypeRootManifestRecord.write(value.current, into: &buf) - FfiConverterOptionString.write(value.error, into: &buf) + public static func write(_ value: IndexPageRecord, into buf: inout [UInt8]) { + FfiConverterSequenceTypeIndexMatchRecord.write(value.matches, into: &buf) + FfiConverterOptionData.write(value.nextCursor, into: &buf) } } @@ -15672,53 +16295,81 @@ public struct FfiConverterTypeHostStoreRootCasResultRecord: FfiConverterRustBuff #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeHostStoreRootCasResultRecord_lift(_ buf: RustBuffer) throws -> HostStoreRootCasResultRecord { - return try FfiConverterTypeHostStoreRootCasResultRecord.lift(buf) +public func FfiConverterTypeIndexPageRecord_lift(_ buf: RustBuffer) throws -> IndexPageRecord { + return try FfiConverterTypeIndexPageRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeHostStoreRootCasResultRecord_lower(_ value: HostStoreRootCasResultRecord) -> RustBuffer { - return FfiConverterTypeHostStoreRootCasResultRecord.lower(value) +public func FfiConverterTypeIndexPageRecord_lower(_ value: IndexPageRecord) -> RustBuffer { + return FfiConverterTypeIndexPageRecord.lower(value) } -public struct HostStoreRootResultRecord: Equatable, Hashable { - public var value: RootManifestRecord? - public var error: String? +public struct IndexVerificationRecord: Equatable, Hashable { + public var name: Data + public var sourceVersion: Data + public var expectedIndexVersion: Data + public var actualIndexVersion: Data + public var expectedEntries: UInt64 + public var actualEntries: UInt64 + public var semanticDifferences: UInt64 + public var valid: Bool + public var canonical: Bool // Default memberwise initializers are never public by default, so we // declare one manually. - public init(value: RootManifestRecord?, error: String?) { - self.value = value - self.error = error + public init(name: Data, sourceVersion: Data, expectedIndexVersion: Data, actualIndexVersion: Data, expectedEntries: UInt64, actualEntries: UInt64, semanticDifferences: UInt64, valid: Bool, canonical: Bool) { + self.name = name + self.sourceVersion = sourceVersion + self.expectedIndexVersion = expectedIndexVersion + self.actualIndexVersion = actualIndexVersion + self.expectedEntries = expectedEntries + self.actualEntries = actualEntries + self.semanticDifferences = semanticDifferences + self.valid = valid + self.canonical = canonical } - - + + } #if compiler(>=6) -extension HostStoreRootResultRecord: Sendable {} +extension IndexVerificationRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeHostStoreRootResultRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> HostStoreRootResultRecord { +public struct FfiConverterTypeIndexVerificationRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> IndexVerificationRecord { return - try HostStoreRootResultRecord( - value: FfiConverterOptionTypeRootManifestRecord.read(from: &buf), - error: FfiConverterOptionString.read(from: &buf) + try IndexVerificationRecord( + name: FfiConverterData.read(from: &buf), + sourceVersion: FfiConverterData.read(from: &buf), + expectedIndexVersion: FfiConverterData.read(from: &buf), + actualIndexVersion: FfiConverterData.read(from: &buf), + expectedEntries: FfiConverterUInt64.read(from: &buf), + actualEntries: FfiConverterUInt64.read(from: &buf), + semanticDifferences: FfiConverterUInt64.read(from: &buf), + valid: FfiConverterBool.read(from: &buf), + canonical: FfiConverterBool.read(from: &buf) ) } - public static func write(_ value: HostStoreRootResultRecord, into buf: inout [UInt8]) { - FfiConverterOptionTypeRootManifestRecord.write(value.value, into: &buf) - FfiConverterOptionString.write(value.error, into: &buf) + public static func write(_ value: IndexVerificationRecord, into buf: inout [UInt8]) { + FfiConverterData.write(value.name, into: &buf) + FfiConverterData.write(value.sourceVersion, into: &buf) + FfiConverterData.write(value.expectedIndexVersion, into: &buf) + FfiConverterData.write(value.actualIndexVersion, into: &buf) + FfiConverterUInt64.write(value.expectedEntries, into: &buf) + FfiConverterUInt64.write(value.actualEntries, into: &buf) + FfiConverterUInt64.write(value.semanticDifferences, into: &buf) + FfiConverterBool.write(value.valid, into: &buf) + FfiConverterBool.write(value.canonical, into: &buf) } } @@ -15726,49 +16377,73 @@ public struct FfiConverterTypeHostStoreRootResultRecord: FfiConverterRustBuffer #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeHostStoreRootResultRecord_lift(_ buf: RustBuffer) throws -> HostStoreRootResultRecord { - return try FfiConverterTypeHostStoreRootResultRecord.lift(buf) +public func FfiConverterTypeIndexVerificationRecord_lift(_ buf: RustBuffer) throws -> IndexVerificationRecord { + return try FfiConverterTypeIndexVerificationRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeHostStoreRootResultRecord_lower(_ value: HostStoreRootResultRecord) -> RustBuffer { - return FfiConverterTypeHostStoreRootResultRecord.lower(value) +public func FfiConverterTypeIndexVerificationRecord_lower(_ value: IndexVerificationRecord) -> RustBuffer { + return FfiConverterTypeIndexVerificationRecord.lower(value) } -public struct HostStoreUnitResultRecord: Equatable, Hashable { - public var error: String? +public struct IndexedMapHealthRecord: Equatable, Hashable { + public var sourceMapId: Data + public var sourceVersion: Data? + public var stateVersion: Data? + public var activeIndexes: [ActiveIndexHealthRecord] + public var closureValid: Bool + public var retainedSnapshots: UInt64 + public var durablePins: UInt64 // Default memberwise initializers are never public by default, so we // declare one manually. - public init(error: String?) { - self.error = error + public init(sourceMapId: Data, sourceVersion: Data?, stateVersion: Data?, activeIndexes: [ActiveIndexHealthRecord], closureValid: Bool, retainedSnapshots: UInt64, durablePins: UInt64) { + self.sourceMapId = sourceMapId + self.sourceVersion = sourceVersion + self.stateVersion = stateVersion + self.activeIndexes = activeIndexes + self.closureValid = closureValid + self.retainedSnapshots = retainedSnapshots + self.durablePins = durablePins } - - + + } #if compiler(>=6) -extension HostStoreUnitResultRecord: Sendable {} +extension IndexedMapHealthRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeHostStoreUnitResultRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> HostStoreUnitResultRecord { +public struct FfiConverterTypeIndexedMapHealthRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> IndexedMapHealthRecord { return - try HostStoreUnitResultRecord( - error: FfiConverterOptionString.read(from: &buf) + try IndexedMapHealthRecord( + sourceMapId: FfiConverterData.read(from: &buf), + sourceVersion: FfiConverterOptionData.read(from: &buf), + stateVersion: FfiConverterOptionData.read(from: &buf), + activeIndexes: FfiConverterSequenceTypeActiveIndexHealthRecord.read(from: &buf), + closureValid: FfiConverterBool.read(from: &buf), + retainedSnapshots: FfiConverterUInt64.read(from: &buf), + durablePins: FfiConverterUInt64.read(from: &buf) ) } - public static func write(_ value: HostStoreUnitResultRecord, into buf: inout [UInt8]) { - FfiConverterOptionString.write(value.error, into: &buf) + public static func write(_ value: IndexedMapHealthRecord, into buf: inout [UInt8]) { + FfiConverterData.write(value.sourceMapId, into: &buf) + FfiConverterOptionData.write(value.sourceVersion, into: &buf) + FfiConverterOptionData.write(value.stateVersion, into: &buf) + FfiConverterSequenceTypeActiveIndexHealthRecord.write(value.activeIndexes, into: &buf) + FfiConverterBool.write(value.closureValid, into: &buf) + FfiConverterUInt64.write(value.retainedSnapshots, into: &buf) + FfiConverterUInt64.write(value.durablePins, into: &buf) } } @@ -15776,73 +16451,89 @@ public struct FfiConverterTypeHostStoreUnitResultRecord: FfiConverterRustBuffer #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeHostStoreUnitResultRecord_lift(_ buf: RustBuffer) throws -> HostStoreUnitResultRecord { - return try FfiConverterTypeHostStoreUnitResultRecord.lift(buf) +public func FfiConverterTypeIndexedMapHealthRecord_lift(_ buf: RustBuffer) throws -> IndexedMapHealthRecord { + return try FfiConverterTypeIndexedMapHealthRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeHostStoreUnitResultRecord_lower(_ value: HostStoreUnitResultRecord) -> RustBuffer { - return FfiConverterTypeHostStoreUnitResultRecord.lower(value) +public func FfiConverterTypeIndexedMapHealthRecord_lower(_ value: IndexedMapHealthRecord) -> RustBuffer { + return FfiConverterTypeIndexedMapHealthRecord.lower(value) } -public struct IndexBuildResultRecord: Equatable, Hashable { - public var sourceVersion: Data - public var indexVersion: Data - public var stateVersion: Data - public var generation: UInt64 - public var entries: UInt64 - public var attempts: UInt64 - public var activated: Bool +public struct IndexedMapMetricsRecord: Equatable, Hashable { + public var normalizedSourceMutations: UInt64 + public var recordsExtracted: UInt64 + public var termsEmitted: UInt64 + public var projectedBytes: UInt64 + public var physicalUpserts: UInt64 + public var physicalDeletes: UInt64 + public var unchangedEmissionsSkipped: UInt64 + public var retries: UInt64 + public var buildAttempts: UInt64 + public var verificationOutcomes: UInt64 + public var retainedRoots: UInt64 // Default memberwise initializers are never public by default, so we // declare one manually. - public init(sourceVersion: Data, indexVersion: Data, stateVersion: Data, generation: UInt64, entries: UInt64, attempts: UInt64, activated: Bool) { - self.sourceVersion = sourceVersion - self.indexVersion = indexVersion - self.stateVersion = stateVersion - self.generation = generation - self.entries = entries - self.attempts = attempts - self.activated = activated + public init(normalizedSourceMutations: UInt64, recordsExtracted: UInt64, termsEmitted: UInt64, projectedBytes: UInt64, physicalUpserts: UInt64, physicalDeletes: UInt64, unchangedEmissionsSkipped: UInt64, retries: UInt64, buildAttempts: UInt64, verificationOutcomes: UInt64, retainedRoots: UInt64) { + self.normalizedSourceMutations = normalizedSourceMutations + self.recordsExtracted = recordsExtracted + self.termsEmitted = termsEmitted + self.projectedBytes = projectedBytes + self.physicalUpserts = physicalUpserts + self.physicalDeletes = physicalDeletes + self.unchangedEmissionsSkipped = unchangedEmissionsSkipped + self.retries = retries + self.buildAttempts = buildAttempts + self.verificationOutcomes = verificationOutcomes + self.retainedRoots = retainedRoots } - - + + } #if compiler(>=6) -extension IndexBuildResultRecord: Sendable {} +extension IndexedMapMetricsRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeIndexBuildResultRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> IndexBuildResultRecord { +public struct FfiConverterTypeIndexedMapMetricsRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> IndexedMapMetricsRecord { return - try IndexBuildResultRecord( - sourceVersion: FfiConverterData.read(from: &buf), - indexVersion: FfiConverterData.read(from: &buf), - stateVersion: FfiConverterData.read(from: &buf), - generation: FfiConverterUInt64.read(from: &buf), - entries: FfiConverterUInt64.read(from: &buf), - attempts: FfiConverterUInt64.read(from: &buf), - activated: FfiConverterBool.read(from: &buf) + try IndexedMapMetricsRecord( + normalizedSourceMutations: FfiConverterUInt64.read(from: &buf), + recordsExtracted: FfiConverterUInt64.read(from: &buf), + termsEmitted: FfiConverterUInt64.read(from: &buf), + projectedBytes: FfiConverterUInt64.read(from: &buf), + physicalUpserts: FfiConverterUInt64.read(from: &buf), + physicalDeletes: FfiConverterUInt64.read(from: &buf), + unchangedEmissionsSkipped: FfiConverterUInt64.read(from: &buf), + retries: FfiConverterUInt64.read(from: &buf), + buildAttempts: FfiConverterUInt64.read(from: &buf), + verificationOutcomes: FfiConverterUInt64.read(from: &buf), + retainedRoots: FfiConverterUInt64.read(from: &buf) ) } - public static func write(_ value: IndexBuildResultRecord, into buf: inout [UInt8]) { - FfiConverterData.write(value.sourceVersion, into: &buf) - FfiConverterData.write(value.indexVersion, into: &buf) - FfiConverterData.write(value.stateVersion, into: &buf) - FfiConverterUInt64.write(value.generation, into: &buf) - FfiConverterUInt64.write(value.entries, into: &buf) - FfiConverterUInt64.write(value.attempts, into: &buf) - FfiConverterBool.write(value.activated, into: &buf) + public static func write(_ value: IndexedMapMetricsRecord, into buf: inout [UInt8]) { + FfiConverterUInt64.write(value.normalizedSourceMutations, into: &buf) + FfiConverterUInt64.write(value.recordsExtracted, into: &buf) + FfiConverterUInt64.write(value.termsEmitted, into: &buf) + FfiConverterUInt64.write(value.projectedBytes, into: &buf) + FfiConverterUInt64.write(value.physicalUpserts, into: &buf) + FfiConverterUInt64.write(value.physicalDeletes, into: &buf) + FfiConverterUInt64.write(value.unchangedEmissionsSkipped, into: &buf) + FfiConverterUInt64.write(value.retries, into: &buf) + FfiConverterUInt64.write(value.buildAttempts, into: &buf) + FfiConverterUInt64.write(value.verificationOutcomes, into: &buf) + FfiConverterUInt64.write(value.retainedRoots, into: &buf) } } @@ -15850,53 +16541,73 @@ public struct FfiConverterTypeIndexBuildResultRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeIndexBuildResultRecord_lift(_ buf: RustBuffer) throws -> IndexBuildResultRecord { - return try FfiConverterTypeIndexBuildResultRecord.lift(buf) +public func FfiConverterTypeIndexedMapMetricsRecord_lift(_ buf: RustBuffer) throws -> IndexedMapMetricsRecord { + return try FfiConverterTypeIndexedMapMetricsRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeIndexBuildResultRecord_lower(_ value: IndexBuildResultRecord) -> RustBuffer { - return FfiConverterTypeIndexBuildResultRecord.lower(value) +public func FfiConverterTypeIndexedMapMetricsRecord_lower(_ value: IndexedMapMetricsRecord) -> RustBuffer { + return FfiConverterTypeIndexedMapMetricsRecord.lower(value) } -public struct IndexEntryRecord: Equatable, Hashable { - public var term: Data - public var projection: Data? +public struct IndexedRetentionRecord: Equatable, Hashable { + public var retainedSourceVersions: [Data] + public var removedSourceVersions: [Data] + public var retainedIndexVersions: [Data] + public var removedIndexVersions: [Data] + public var removedStateVersions: [Data] + public var removedSnapshotRecords: UInt64 + public var removedNamedRoots: [Data] // Default memberwise initializers are never public by default, so we // declare one manually. - public init(term: Data, projection: Data?) { - self.term = term - self.projection = projection + public init(retainedSourceVersions: [Data], removedSourceVersions: [Data], retainedIndexVersions: [Data], removedIndexVersions: [Data], removedStateVersions: [Data], removedSnapshotRecords: UInt64, removedNamedRoots: [Data]) { + self.retainedSourceVersions = retainedSourceVersions + self.removedSourceVersions = removedSourceVersions + self.retainedIndexVersions = retainedIndexVersions + self.removedIndexVersions = removedIndexVersions + self.removedStateVersions = removedStateVersions + self.removedSnapshotRecords = removedSnapshotRecords + self.removedNamedRoots = removedNamedRoots } - - + + } #if compiler(>=6) -extension IndexEntryRecord: Sendable {} +extension IndexedRetentionRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeIndexEntryRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> IndexEntryRecord { +public struct FfiConverterTypeIndexedRetentionRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> IndexedRetentionRecord { return - try IndexEntryRecord( - term: FfiConverterData.read(from: &buf), - projection: FfiConverterOptionData.read(from: &buf) + try IndexedRetentionRecord( + retainedSourceVersions: FfiConverterSequenceData.read(from: &buf), + removedSourceVersions: FfiConverterSequenceData.read(from: &buf), + retainedIndexVersions: FfiConverterSequenceData.read(from: &buf), + removedIndexVersions: FfiConverterSequenceData.read(from: &buf), + removedStateVersions: FfiConverterSequenceData.read(from: &buf), + removedSnapshotRecords: FfiConverterUInt64.read(from: &buf), + removedNamedRoots: FfiConverterSequenceData.read(from: &buf) ) } - public static func write(_ value: IndexEntryRecord, into buf: inout [UInt8]) { - FfiConverterData.write(value.term, into: &buf) - FfiConverterOptionData.write(value.projection, into: &buf) + public static func write(_ value: IndexedRetentionRecord, into buf: inout [UInt8]) { + FfiConverterSequenceData.write(value.retainedSourceVersions, into: &buf) + FfiConverterSequenceData.write(value.removedSourceVersions, into: &buf) + FfiConverterSequenceData.write(value.retainedIndexVersions, into: &buf) + FfiConverterSequenceData.write(value.removedIndexVersions, into: &buf) + FfiConverterSequenceData.write(value.removedStateVersions, into: &buf) + FfiConverterUInt64.write(value.removedSnapshotRecords, into: &buf) + FfiConverterSequenceData.write(value.removedNamedRoots, into: &buf) } } @@ -15904,57 +16615,49 @@ public struct FfiConverterTypeIndexEntryRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeIndexEntryRecord_lift(_ buf: RustBuffer) throws -> IndexEntryRecord { - return try FfiConverterTypeIndexEntryRecord.lift(buf) +public func FfiConverterTypeIndexedRetentionRecord_lift(_ buf: RustBuffer) throws -> IndexedRetentionRecord { + return try FfiConverterTypeIndexedRetentionRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeIndexEntryRecord_lower(_ value: IndexEntryRecord) -> RustBuffer { - return FfiConverterTypeIndexEntryRecord.lower(value) +public func FfiConverterTypeIndexedRetentionRecord_lower(_ value: IndexedRetentionRecord) -> RustBuffer { + return FfiConverterTypeIndexedRetentionRecord.lower(value) } -public struct IndexMatchRecord: Equatable, Hashable { - public var term: Data - public var primaryKey: Data - public var projection: Data? +public struct IndexedSnapshotIdRecord: Equatable, Hashable { + public var snapshot: Data // Default memberwise initializers are never public by default, so we // declare one manually. - public init(term: Data, primaryKey: Data, projection: Data?) { - self.term = term - self.primaryKey = primaryKey - self.projection = projection + public init(snapshot: Data) { + self.snapshot = snapshot } - - + + } #if compiler(>=6) -extension IndexMatchRecord: Sendable {} +extension IndexedSnapshotIdRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeIndexMatchRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> IndexMatchRecord { +public struct FfiConverterTypeIndexedSnapshotIdRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> IndexedSnapshotIdRecord { return - try IndexMatchRecord( - term: FfiConverterData.read(from: &buf), - primaryKey: FfiConverterData.read(from: &buf), - projection: FfiConverterOptionData.read(from: &buf) + try IndexedSnapshotIdRecord( + snapshot: FfiConverterData.read(from: &buf) ) } - public static func write(_ value: IndexMatchRecord, into buf: inout [UInt8]) { - FfiConverterData.write(value.term, into: &buf) - FfiConverterData.write(value.primaryKey, into: &buf) - FfiConverterOptionData.write(value.projection, into: &buf) + public static func write(_ value: IndexedSnapshotIdRecord, into buf: inout [UInt8]) { + FfiConverterData.write(value.snapshot, into: &buf) } } @@ -15962,53 +16665,61 @@ public struct FfiConverterTypeIndexMatchRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeIndexMatchRecord_lift(_ buf: RustBuffer) throws -> IndexMatchRecord { - return try FfiConverterTypeIndexMatchRecord.lift(buf) +public func FfiConverterTypeIndexedSnapshotIdRecord_lift(_ buf: RustBuffer) throws -> IndexedSnapshotIdRecord { + return try FfiConverterTypeIndexedSnapshotIdRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeIndexMatchRecord_lower(_ value: IndexMatchRecord) -> RustBuffer { - return FfiConverterTypeIndexMatchRecord.lower(value) +public func FfiConverterTypeIndexedSnapshotIdRecord_lower(_ value: IndexedSnapshotIdRecord) -> RustBuffer { + return FfiConverterTypeIndexedSnapshotIdRecord.lower(value) } -public struct IndexPageRecord: Equatable, Hashable { - public var matches: [IndexMatchRecord] - public var nextCursor: Data? +public struct IndexedSourceRecord: Equatable, Hashable { + public var term: Data + public var primaryKey: Data + public var projection: Data? + public var sourceValue: Data // Default memberwise initializers are never public by default, so we // declare one manually. - public init(matches: [IndexMatchRecord], nextCursor: Data?) { - self.matches = matches - self.nextCursor = nextCursor + public init(term: Data, primaryKey: Data, projection: Data?, sourceValue: Data) { + self.term = term + self.primaryKey = primaryKey + self.projection = projection + self.sourceValue = sourceValue } - - + + } #if compiler(>=6) -extension IndexPageRecord: Sendable {} +extension IndexedSourceRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeIndexPageRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> IndexPageRecord { +public struct FfiConverterTypeIndexedSourceRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> IndexedSourceRecord { return - try IndexPageRecord( - matches: FfiConverterSequenceTypeIndexMatchRecord.read(from: &buf), - nextCursor: FfiConverterOptionData.read(from: &buf) + try IndexedSourceRecord( + term: FfiConverterData.read(from: &buf), + primaryKey: FfiConverterData.read(from: &buf), + projection: FfiConverterOptionData.read(from: &buf), + sourceValue: FfiConverterData.read(from: &buf) ) } - public static func write(_ value: IndexPageRecord, into buf: inout [UInt8]) { - FfiConverterSequenceTypeIndexMatchRecord.write(value.matches, into: &buf) - FfiConverterOptionData.write(value.nextCursor, into: &buf) + public static func write(_ value: IndexedSourceRecord, into buf: inout [UInt8]) { + FfiConverterData.write(value.term, into: &buf) + FfiConverterData.write(value.primaryKey, into: &buf) + FfiConverterOptionData.write(value.projection, into: &buf) + FfiConverterData.write(value.sourceValue, into: &buf) } } @@ -16016,81 +16727,57 @@ public struct FfiConverterTypeIndexPageRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeIndexPageRecord_lift(_ buf: RustBuffer) throws -> IndexPageRecord { - return try FfiConverterTypeIndexPageRecord.lift(buf) +public func FfiConverterTypeIndexedSourceRecord_lift(_ buf: RustBuffer) throws -> IndexedSourceRecord { + return try FfiConverterTypeIndexedSourceRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeIndexPageRecord_lower(_ value: IndexPageRecord) -> RustBuffer { - return FfiConverterTypeIndexPageRecord.lower(value) +public func FfiConverterTypeIndexedSourceRecord_lower(_ value: IndexedSourceRecord) -> RustBuffer { + return FfiConverterTypeIndexedSourceRecord.lower(value) } -public struct IndexVerificationRecord: Equatable, Hashable { - public var name: Data - public var sourceVersion: Data - public var expectedIndexVersion: Data - public var actualIndexVersion: Data - public var expectedEntries: UInt64 - public var actualEntries: UInt64 - public var semanticDifferences: UInt64 - public var valid: Bool - public var canonical: Bool +public struct IndexedUpdateRecord: Equatable, Hashable { + public var kind: IndexedUpdateKind + public var previousSourceVersion: Data? + public var current: IndexedVersionRecord? // Default memberwise initializers are never public by default, so we // declare one manually. - public init(name: Data, sourceVersion: Data, expectedIndexVersion: Data, actualIndexVersion: Data, expectedEntries: UInt64, actualEntries: UInt64, semanticDifferences: UInt64, valid: Bool, canonical: Bool) { - self.name = name - self.sourceVersion = sourceVersion - self.expectedIndexVersion = expectedIndexVersion - self.actualIndexVersion = actualIndexVersion - self.expectedEntries = expectedEntries - self.actualEntries = actualEntries - self.semanticDifferences = semanticDifferences - self.valid = valid - self.canonical = canonical + public init(kind: IndexedUpdateKind, previousSourceVersion: Data?, current: IndexedVersionRecord?) { + self.kind = kind + self.previousSourceVersion = previousSourceVersion + self.current = current } - - + + } #if compiler(>=6) -extension IndexVerificationRecord: Sendable {} +extension IndexedUpdateRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeIndexVerificationRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> IndexVerificationRecord { +public struct FfiConverterTypeIndexedUpdateRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> IndexedUpdateRecord { return - try IndexVerificationRecord( - name: FfiConverterData.read(from: &buf), - sourceVersion: FfiConverterData.read(from: &buf), - expectedIndexVersion: FfiConverterData.read(from: &buf), - actualIndexVersion: FfiConverterData.read(from: &buf), - expectedEntries: FfiConverterUInt64.read(from: &buf), - actualEntries: FfiConverterUInt64.read(from: &buf), - semanticDifferences: FfiConverterUInt64.read(from: &buf), - valid: FfiConverterBool.read(from: &buf), - canonical: FfiConverterBool.read(from: &buf) + try IndexedUpdateRecord( + kind: FfiConverterTypeIndexedUpdateKind.read(from: &buf), + previousSourceVersion: FfiConverterOptionData.read(from: &buf), + current: FfiConverterOptionTypeIndexedVersionRecord.read(from: &buf) ) } - public static func write(_ value: IndexVerificationRecord, into buf: inout [UInt8]) { - FfiConverterData.write(value.name, into: &buf) - FfiConverterData.write(value.sourceVersion, into: &buf) - FfiConverterData.write(value.expectedIndexVersion, into: &buf) - FfiConverterData.write(value.actualIndexVersion, into: &buf) - FfiConverterUInt64.write(value.expectedEntries, into: &buf) - FfiConverterUInt64.write(value.actualEntries, into: &buf) - FfiConverterUInt64.write(value.semanticDifferences, into: &buf) - FfiConverterBool.write(value.valid, into: &buf) - FfiConverterBool.write(value.canonical, into: &buf) + public static func write(_ value: IndexedUpdateRecord, into buf: inout [UInt8]) { + FfiConverterTypeIndexedUpdateKind.write(value.kind, into: &buf) + FfiConverterOptionData.write(value.previousSourceVersion, into: &buf) + FfiConverterOptionTypeIndexedVersionRecord.write(value.current, into: &buf) } } @@ -16098,73 +16785,57 @@ public struct FfiConverterTypeIndexVerificationRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeIndexVerificationRecord_lift(_ buf: RustBuffer) throws -> IndexVerificationRecord { - return try FfiConverterTypeIndexVerificationRecord.lift(buf) +public func FfiConverterTypeIndexedUpdateRecord_lift(_ buf: RustBuffer) throws -> IndexedUpdateRecord { + return try FfiConverterTypeIndexedUpdateRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeIndexVerificationRecord_lower(_ value: IndexVerificationRecord) -> RustBuffer { - return FfiConverterTypeIndexVerificationRecord.lower(value) +public func FfiConverterTypeIndexedUpdateRecord_lower(_ value: IndexedUpdateRecord) -> RustBuffer { + return FfiConverterTypeIndexedUpdateRecord.lower(value) } -public struct IndexedMapHealthRecord: Equatable, Hashable { - public var sourceMapId: Data - public var sourceVersion: Data? - public var stateVersion: Data? - public var activeIndexes: [ActiveIndexHealthRecord] - public var closureValid: Bool - public var retainedSnapshots: UInt64 - public var durablePins: UInt64 +public struct IndexedVersionRecord: Equatable, Hashable { + public var sourceVersion: Data + public var stateVersion: Data + public var indexCount: UInt64 // Default memberwise initializers are never public by default, so we // declare one manually. - public init(sourceMapId: Data, sourceVersion: Data?, stateVersion: Data?, activeIndexes: [ActiveIndexHealthRecord], closureValid: Bool, retainedSnapshots: UInt64, durablePins: UInt64) { - self.sourceMapId = sourceMapId + public init(sourceVersion: Data, stateVersion: Data, indexCount: UInt64) { self.sourceVersion = sourceVersion self.stateVersion = stateVersion - self.activeIndexes = activeIndexes - self.closureValid = closureValid - self.retainedSnapshots = retainedSnapshots - self.durablePins = durablePins + self.indexCount = indexCount } - - + + } #if compiler(>=6) -extension IndexedMapHealthRecord: Sendable {} +extension IndexedVersionRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeIndexedMapHealthRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> IndexedMapHealthRecord { +public struct FfiConverterTypeIndexedVersionRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> IndexedVersionRecord { return - try IndexedMapHealthRecord( - sourceMapId: FfiConverterData.read(from: &buf), - sourceVersion: FfiConverterOptionData.read(from: &buf), - stateVersion: FfiConverterOptionData.read(from: &buf), - activeIndexes: FfiConverterSequenceTypeActiveIndexHealthRecord.read(from: &buf), - closureValid: FfiConverterBool.read(from: &buf), - retainedSnapshots: FfiConverterUInt64.read(from: &buf), - durablePins: FfiConverterUInt64.read(from: &buf) + try IndexedVersionRecord( + sourceVersion: FfiConverterData.read(from: &buf), + stateVersion: FfiConverterData.read(from: &buf), + indexCount: FfiConverterUInt64.read(from: &buf) ) } - public static func write(_ value: IndexedMapHealthRecord, into buf: inout [UInt8]) { - FfiConverterData.write(value.sourceMapId, into: &buf) - FfiConverterOptionData.write(value.sourceVersion, into: &buf) - FfiConverterOptionData.write(value.stateVersion, into: &buf) - FfiConverterSequenceTypeActiveIndexHealthRecord.write(value.activeIndexes, into: &buf) - FfiConverterBool.write(value.closureValid, into: &buf) - FfiConverterUInt64.write(value.retainedSnapshots, into: &buf) - FfiConverterUInt64.write(value.durablePins, into: &buf) + public static func write(_ value: IndexedVersionRecord, into buf: inout [UInt8]) { + FfiConverterData.write(value.sourceVersion, into: &buf) + FfiConverterData.write(value.stateVersion, into: &buf) + FfiConverterUInt64.write(value.indexCount, into: &buf) } } @@ -16172,89 +16843,49 @@ public struct FfiConverterTypeIndexedMapHealthRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeIndexedMapHealthRecord_lift(_ buf: RustBuffer) throws -> IndexedMapHealthRecord { - return try FfiConverterTypeIndexedMapHealthRecord.lift(buf) +public func FfiConverterTypeIndexedVersionRecord_lift(_ buf: RustBuffer) throws -> IndexedVersionRecord { + return try FfiConverterTypeIndexedVersionRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeIndexedMapHealthRecord_lower(_ value: IndexedMapHealthRecord) -> RustBuffer { - return FfiConverterTypeIndexedMapHealthRecord.lower(value) +public func FfiConverterTypeIndexedVersionRecord_lower(_ value: IndexedVersionRecord) -> RustBuffer { + return FfiConverterTypeIndexedVersionRecord.lower(value) } -public struct IndexedMapMetricsRecord: Equatable, Hashable { - public var normalizedSourceMutations: UInt64 - public var recordsExtracted: UInt64 - public var termsEmitted: UInt64 - public var projectedBytes: UInt64 - public var physicalUpserts: UInt64 - public var physicalDeletes: UInt64 - public var unchangedEmissionsSkipped: UInt64 - public var retries: UInt64 - public var buildAttempts: UInt64 - public var verificationOutcomes: UInt64 - public var retainedRoots: UInt64 +public struct JsonDocumentRecord: Equatable, Hashable { + public var json: String // Default memberwise initializers are never public by default, so we // declare one manually. - public init(normalizedSourceMutations: UInt64, recordsExtracted: UInt64, termsEmitted: UInt64, projectedBytes: UInt64, physicalUpserts: UInt64, physicalDeletes: UInt64, unchangedEmissionsSkipped: UInt64, retries: UInt64, buildAttempts: UInt64, verificationOutcomes: UInt64, retainedRoots: UInt64) { - self.normalizedSourceMutations = normalizedSourceMutations - self.recordsExtracted = recordsExtracted - self.termsEmitted = termsEmitted - self.projectedBytes = projectedBytes - self.physicalUpserts = physicalUpserts - self.physicalDeletes = physicalDeletes - self.unchangedEmissionsSkipped = unchangedEmissionsSkipped - self.retries = retries - self.buildAttempts = buildAttempts - self.verificationOutcomes = verificationOutcomes - self.retainedRoots = retainedRoots + public init(json: String) { + self.json = json } - - + + } #if compiler(>=6) -extension IndexedMapMetricsRecord: Sendable {} +extension JsonDocumentRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeIndexedMapMetricsRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> IndexedMapMetricsRecord { +public struct FfiConverterTypeJsonDocumentRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> JsonDocumentRecord { return - try IndexedMapMetricsRecord( - normalizedSourceMutations: FfiConverterUInt64.read(from: &buf), - recordsExtracted: FfiConverterUInt64.read(from: &buf), - termsEmitted: FfiConverterUInt64.read(from: &buf), - projectedBytes: FfiConverterUInt64.read(from: &buf), - physicalUpserts: FfiConverterUInt64.read(from: &buf), - physicalDeletes: FfiConverterUInt64.read(from: &buf), - unchangedEmissionsSkipped: FfiConverterUInt64.read(from: &buf), - retries: FfiConverterUInt64.read(from: &buf), - buildAttempts: FfiConverterUInt64.read(from: &buf), - verificationOutcomes: FfiConverterUInt64.read(from: &buf), - retainedRoots: FfiConverterUInt64.read(from: &buf) + try JsonDocumentRecord( + json: FfiConverterString.read(from: &buf) ) } - public static func write(_ value: IndexedMapMetricsRecord, into buf: inout [UInt8]) { - FfiConverterUInt64.write(value.normalizedSourceMutations, into: &buf) - FfiConverterUInt64.write(value.recordsExtracted, into: &buf) - FfiConverterUInt64.write(value.termsEmitted, into: &buf) - FfiConverterUInt64.write(value.projectedBytes, into: &buf) - FfiConverterUInt64.write(value.physicalUpserts, into: &buf) - FfiConverterUInt64.write(value.physicalDeletes, into: &buf) - FfiConverterUInt64.write(value.unchangedEmissionsSkipped, into: &buf) - FfiConverterUInt64.write(value.retries, into: &buf) - FfiConverterUInt64.write(value.buildAttempts, into: &buf) - FfiConverterUInt64.write(value.verificationOutcomes, into: &buf) - FfiConverterUInt64.write(value.retainedRoots, into: &buf) + public static func write(_ value: JsonDocumentRecord, into buf: inout [UInt8]) { + FfiConverterString.write(value.json, into: &buf) } } @@ -16262,73 +16893,57 @@ public struct FfiConverterTypeIndexedMapMetricsRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeIndexedMapMetricsRecord_lift(_ buf: RustBuffer) throws -> IndexedMapMetricsRecord { - return try FfiConverterTypeIndexedMapMetricsRecord.lift(buf) +public func FfiConverterTypeJsonDocumentRecord_lift(_ buf: RustBuffer) throws -> JsonDocumentRecord { + return try FfiConverterTypeJsonDocumentRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeIndexedMapMetricsRecord_lower(_ value: IndexedMapMetricsRecord) -> RustBuffer { - return FfiConverterTypeIndexedMapMetricsRecord.lower(value) +public func FfiConverterTypeJsonDocumentRecord_lower(_ value: JsonDocumentRecord) -> RustBuffer { + return FfiConverterTypeJsonDocumentRecord.lower(value) } -public struct IndexedRetentionRecord: Equatable, Hashable { - public var retainedSourceVersions: [Data] - public var removedSourceVersions: [Data] - public var retainedIndexVersions: [Data] - public var removedIndexVersions: [Data] - public var removedStateVersions: [Data] - public var removedSnapshotRecords: UInt64 - public var removedNamedRoots: [Data] +public struct KeyProofRecord: Equatable, Hashable { + public var root: Data? + public var key: Data + public var path: [NodeRecord] // Default memberwise initializers are never public by default, so we // declare one manually. - public init(retainedSourceVersions: [Data], removedSourceVersions: [Data], retainedIndexVersions: [Data], removedIndexVersions: [Data], removedStateVersions: [Data], removedSnapshotRecords: UInt64, removedNamedRoots: [Data]) { - self.retainedSourceVersions = retainedSourceVersions - self.removedSourceVersions = removedSourceVersions - self.retainedIndexVersions = retainedIndexVersions - self.removedIndexVersions = removedIndexVersions - self.removedStateVersions = removedStateVersions - self.removedSnapshotRecords = removedSnapshotRecords - self.removedNamedRoots = removedNamedRoots + public init(root: Data?, key: Data, path: [NodeRecord]) { + self.root = root + self.key = key + self.path = path } - - + + } #if compiler(>=6) -extension IndexedRetentionRecord: Sendable {} +extension KeyProofRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeIndexedRetentionRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> IndexedRetentionRecord { +public struct FfiConverterTypeKeyProofRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> KeyProofRecord { return - try IndexedRetentionRecord( - retainedSourceVersions: FfiConverterSequenceData.read(from: &buf), - removedSourceVersions: FfiConverterSequenceData.read(from: &buf), - retainedIndexVersions: FfiConverterSequenceData.read(from: &buf), - removedIndexVersions: FfiConverterSequenceData.read(from: &buf), - removedStateVersions: FfiConverterSequenceData.read(from: &buf), - removedSnapshotRecords: FfiConverterUInt64.read(from: &buf), - removedNamedRoots: FfiConverterSequenceData.read(from: &buf) - ) - } - - public static func write(_ value: IndexedRetentionRecord, into buf: inout [UInt8]) { - FfiConverterSequenceData.write(value.retainedSourceVersions, into: &buf) - FfiConverterSequenceData.write(value.removedSourceVersions, into: &buf) - FfiConverterSequenceData.write(value.retainedIndexVersions, into: &buf) - FfiConverterSequenceData.write(value.removedIndexVersions, into: &buf) - FfiConverterSequenceData.write(value.removedStateVersions, into: &buf) - FfiConverterUInt64.write(value.removedSnapshotRecords, into: &buf) - FfiConverterSequenceData.write(value.removedNamedRoots, into: &buf) + try KeyProofRecord( + root: FfiConverterOptionData.read(from: &buf), + key: FfiConverterData.read(from: &buf), + path: FfiConverterSequenceTypeNodeRecord.read(from: &buf) + ) + } + + public static func write(_ value: KeyProofRecord, into buf: inout [UInt8]) { + FfiConverterOptionData.write(value.root, into: &buf) + FfiConverterData.write(value.key, into: &buf) + FfiConverterSequenceTypeNodeRecord.write(value.path, into: &buf) } } @@ -16336,49 +16951,69 @@ public struct FfiConverterTypeIndexedRetentionRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeIndexedRetentionRecord_lift(_ buf: RustBuffer) throws -> IndexedRetentionRecord { - return try FfiConverterTypeIndexedRetentionRecord.lift(buf) +public func FfiConverterTypeKeyProofRecord_lift(_ buf: RustBuffer) throws -> KeyProofRecord { + return try FfiConverterTypeKeyProofRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeIndexedRetentionRecord_lower(_ value: IndexedRetentionRecord) -> RustBuffer { - return FfiConverterTypeIndexedRetentionRecord.lower(value) +public func FfiConverterTypeKeyProofRecord_lower(_ value: KeyProofRecord) -> RustBuffer { + return FfiConverterTypeKeyProofRecord.lower(value) } -public struct IndexedSnapshotIdRecord: Equatable, Hashable { - public var snapshot: Data +public struct KeyProofVerificationRecord: Equatable, Hashable { + public var valid: Bool + public var exists: Bool + public var absence: Bool + public var root: Data? + public var key: Data + public var value: Data? // Default memberwise initializers are never public by default, so we // declare one manually. - public init(snapshot: Data) { - self.snapshot = snapshot + public init(valid: Bool, exists: Bool, absence: Bool, root: Data?, key: Data, value: Data?) { + self.valid = valid + self.exists = exists + self.absence = absence + self.root = root + self.key = key + self.value = value } - - + + } #if compiler(>=6) -extension IndexedSnapshotIdRecord: Sendable {} +extension KeyProofVerificationRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeIndexedSnapshotIdRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> IndexedSnapshotIdRecord { +public struct FfiConverterTypeKeyProofVerificationRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> KeyProofVerificationRecord { return - try IndexedSnapshotIdRecord( - snapshot: FfiConverterData.read(from: &buf) + try KeyProofVerificationRecord( + valid: FfiConverterBool.read(from: &buf), + exists: FfiConverterBool.read(from: &buf), + absence: FfiConverterBool.read(from: &buf), + root: FfiConverterOptionData.read(from: &buf), + key: FfiConverterData.read(from: &buf), + value: FfiConverterOptionData.read(from: &buf) ) } - public static func write(_ value: IndexedSnapshotIdRecord, into buf: inout [UInt8]) { - FfiConverterData.write(value.snapshot, into: &buf) + public static func write(_ value: KeyProofVerificationRecord, into buf: inout [UInt8]) { + FfiConverterBool.write(value.valid, into: &buf) + FfiConverterBool.write(value.exists, into: &buf) + FfiConverterBool.write(value.absence, into: &buf) + FfiConverterOptionData.write(value.root, into: &buf) + FfiConverterData.write(value.key, into: &buf) + FfiConverterOptionData.write(value.value, into: &buf) } } @@ -16386,61 +17021,49 @@ public struct FfiConverterTypeIndexedSnapshotIdRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeIndexedSnapshotIdRecord_lift(_ buf: RustBuffer) throws -> IndexedSnapshotIdRecord { - return try FfiConverterTypeIndexedSnapshotIdRecord.lift(buf) +public func FfiConverterTypeKeyProofVerificationRecord_lift(_ buf: RustBuffer) throws -> KeyProofVerificationRecord { + return try FfiConverterTypeKeyProofVerificationRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeIndexedSnapshotIdRecord_lower(_ value: IndexedSnapshotIdRecord) -> RustBuffer { - return FfiConverterTypeIndexedSnapshotIdRecord.lower(value) +public func FfiConverterTypeKeyProofVerificationRecord_lower(_ value: KeyProofVerificationRecord) -> RustBuffer { + return FfiConverterTypeKeyProofVerificationRecord.lower(value) } -public struct IndexedSourceRecord: Equatable, Hashable { - public var term: Data - public var primaryKey: Data - public var projection: Data? - public var sourceValue: Data +public struct LargeValueConfigRecord: Equatable, Hashable { + public var inlineThreshold: UInt64 // Default memberwise initializers are never public by default, so we // declare one manually. - public init(term: Data, primaryKey: Data, projection: Data?, sourceValue: Data) { - self.term = term - self.primaryKey = primaryKey - self.projection = projection - self.sourceValue = sourceValue + public init(inlineThreshold: UInt64) { + self.inlineThreshold = inlineThreshold } - - + + } #if compiler(>=6) -extension IndexedSourceRecord: Sendable {} +extension LargeValueConfigRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeIndexedSourceRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> IndexedSourceRecord { +public struct FfiConverterTypeLargeValueConfigRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> LargeValueConfigRecord { return - try IndexedSourceRecord( - term: FfiConverterData.read(from: &buf), - primaryKey: FfiConverterData.read(from: &buf), - projection: FfiConverterOptionData.read(from: &buf), - sourceValue: FfiConverterData.read(from: &buf) + try LargeValueConfigRecord( + inlineThreshold: FfiConverterUInt64.read(from: &buf) ) } - public static func write(_ value: IndexedSourceRecord, into buf: inout [UInt8]) { - FfiConverterData.write(value.term, into: &buf) - FfiConverterData.write(value.primaryKey, into: &buf) - FfiConverterOptionData.write(value.projection, into: &buf) - FfiConverterData.write(value.sourceValue, into: &buf) + public static func write(_ value: LargeValueConfigRecord, into buf: inout [UInt8]) { + FfiConverterUInt64.write(value.inlineThreshold, into: &buf) } } @@ -16448,57 +17071,61 @@ public struct FfiConverterTypeIndexedSourceRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeIndexedSourceRecord_lift(_ buf: RustBuffer) throws -> IndexedSourceRecord { - return try FfiConverterTypeIndexedSourceRecord.lift(buf) +public func FfiConverterTypeLargeValueConfigRecord_lift(_ buf: RustBuffer) throws -> LargeValueConfigRecord { + return try FfiConverterTypeLargeValueConfigRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeIndexedSourceRecord_lower(_ value: IndexedSourceRecord) -> RustBuffer { - return FfiConverterTypeIndexedSourceRecord.lower(value) +public func FfiConverterTypeLargeValueConfigRecord_lower(_ value: LargeValueConfigRecord) -> RustBuffer { + return FfiConverterTypeLargeValueConfigRecord.lower(value) } -public struct IndexedUpdateRecord: Equatable, Hashable { - public var kind: IndexedUpdateKind - public var previousSourceVersion: Data? - public var current: IndexedVersionRecord? +public struct MapCatalogVerificationRecord: Equatable, Hashable { + public var head: Data + public var versionCount: UInt64 + public var reachableNodes: UInt64 + public var reachableBytes: UInt64 // Default memberwise initializers are never public by default, so we // declare one manually. - public init(kind: IndexedUpdateKind, previousSourceVersion: Data?, current: IndexedVersionRecord?) { - self.kind = kind - self.previousSourceVersion = previousSourceVersion - self.current = current + public init(head: Data, versionCount: UInt64, reachableNodes: UInt64, reachableBytes: UInt64) { + self.head = head + self.versionCount = versionCount + self.reachableNodes = reachableNodes + self.reachableBytes = reachableBytes } - - + + } #if compiler(>=6) -extension IndexedUpdateRecord: Sendable {} +extension MapCatalogVerificationRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeIndexedUpdateRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> IndexedUpdateRecord { +public struct FfiConverterTypeMapCatalogVerificationRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> MapCatalogVerificationRecord { return - try IndexedUpdateRecord( - kind: FfiConverterTypeIndexedUpdateKind.read(from: &buf), - previousSourceVersion: FfiConverterOptionData.read(from: &buf), - current: FfiConverterOptionTypeIndexedVersionRecord.read(from: &buf) + try MapCatalogVerificationRecord( + head: FfiConverterData.read(from: &buf), + versionCount: FfiConverterUInt64.read(from: &buf), + reachableNodes: FfiConverterUInt64.read(from: &buf), + reachableBytes: FfiConverterUInt64.read(from: &buf) ) } - public static func write(_ value: IndexedUpdateRecord, into buf: inout [UInt8]) { - FfiConverterTypeIndexedUpdateKind.write(value.kind, into: &buf) - FfiConverterOptionData.write(value.previousSourceVersion, into: &buf) - FfiConverterOptionTypeIndexedVersionRecord.write(value.current, into: &buf) + public static func write(_ value: MapCatalogVerificationRecord, into buf: inout [UInt8]) { + FfiConverterData.write(value.head, into: &buf) + FfiConverterUInt64.write(value.versionCount, into: &buf) + FfiConverterUInt64.write(value.reachableNodes, into: &buf) + FfiConverterUInt64.write(value.reachableBytes, into: &buf) } } @@ -16506,57 +17133,57 @@ public struct FfiConverterTypeIndexedUpdateRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeIndexedUpdateRecord_lift(_ buf: RustBuffer) throws -> IndexedUpdateRecord { - return try FfiConverterTypeIndexedUpdateRecord.lift(buf) +public func FfiConverterTypeMapCatalogVerificationRecord_lift(_ buf: RustBuffer) throws -> MapCatalogVerificationRecord { + return try FfiConverterTypeMapCatalogVerificationRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeIndexedUpdateRecord_lower(_ value: IndexedUpdateRecord) -> RustBuffer { - return FfiConverterTypeIndexedUpdateRecord.lower(value) +public func FfiConverterTypeMapCatalogVerificationRecord_lower(_ value: MapCatalogVerificationRecord) -> RustBuffer { + return FfiConverterTypeMapCatalogVerificationRecord.lower(value) } -public struct IndexedVersionRecord: Equatable, Hashable { - public var sourceVersion: Data - public var stateVersion: Data - public var indexCount: UInt64 +public struct MapChangeEventRecord: Equatable, Hashable { + public var previous: Data? + public var current: MapVersionRecord + public var diffs: [DiffRecord] // Default memberwise initializers are never public by default, so we // declare one manually. - public init(sourceVersion: Data, stateVersion: Data, indexCount: UInt64) { - self.sourceVersion = sourceVersion - self.stateVersion = stateVersion - self.indexCount = indexCount + public init(previous: Data?, current: MapVersionRecord, diffs: [DiffRecord]) { + self.previous = previous + self.current = current + self.diffs = diffs } - - + + } #if compiler(>=6) -extension IndexedVersionRecord: Sendable {} +extension MapChangeEventRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeIndexedVersionRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> IndexedVersionRecord { +public struct FfiConverterTypeMapChangeEventRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> MapChangeEventRecord { return - try IndexedVersionRecord( - sourceVersion: FfiConverterData.read(from: &buf), - stateVersion: FfiConverterData.read(from: &buf), - indexCount: FfiConverterUInt64.read(from: &buf) + try MapChangeEventRecord( + previous: FfiConverterOptionData.read(from: &buf), + current: FfiConverterTypeMapVersionRecord.read(from: &buf), + diffs: FfiConverterSequenceTypeDiffRecord.read(from: &buf) ) } - public static func write(_ value: IndexedVersionRecord, into buf: inout [UInt8]) { - FfiConverterData.write(value.sourceVersion, into: &buf) - FfiConverterData.write(value.stateVersion, into: &buf) - FfiConverterUInt64.write(value.indexCount, into: &buf) + public static func write(_ value: MapChangeEventRecord, into buf: inout [UInt8]) { + FfiConverterOptionData.write(value.previous, into: &buf) + FfiConverterTypeMapVersionRecord.write(value.current, into: &buf) + FfiConverterSequenceTypeDiffRecord.write(value.diffs, into: &buf) } } @@ -16564,49 +17191,57 @@ public struct FfiConverterTypeIndexedVersionRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeIndexedVersionRecord_lift(_ buf: RustBuffer) throws -> IndexedVersionRecord { - return try FfiConverterTypeIndexedVersionRecord.lift(buf) +public func FfiConverterTypeMapChangeEventRecord_lift(_ buf: RustBuffer) throws -> MapChangeEventRecord { + return try FfiConverterTypeMapChangeEventRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeIndexedVersionRecord_lower(_ value: IndexedVersionRecord) -> RustBuffer { - return FfiConverterTypeIndexedVersionRecord.lower(value) +public func FfiConverterTypeMapChangeEventRecord_lower(_ value: MapChangeEventRecord) -> RustBuffer { + return FfiConverterTypeMapChangeEventRecord.lower(value) } -public struct JsonDocumentRecord: Equatable, Hashable { - public var json: String +public struct MapUpdateRecord: Equatable, Hashable { + public var kind: MapUpdateKind + public var previous: Data? + public var current: MapVersionRecord? // Default memberwise initializers are never public by default, so we // declare one manually. - public init(json: String) { - self.json = json + public init(kind: MapUpdateKind, previous: Data?, current: MapVersionRecord?) { + self.kind = kind + self.previous = previous + self.current = current } - - + + } #if compiler(>=6) -extension JsonDocumentRecord: Sendable {} +extension MapUpdateRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeJsonDocumentRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> JsonDocumentRecord { +public struct FfiConverterTypeMapUpdateRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> MapUpdateRecord { return - try JsonDocumentRecord( - json: FfiConverterString.read(from: &buf) + try MapUpdateRecord( + kind: FfiConverterTypeMapUpdateKind.read(from: &buf), + previous: FfiConverterOptionData.read(from: &buf), + current: FfiConverterOptionTypeMapVersionRecord.read(from: &buf) ) } - public static func write(_ value: JsonDocumentRecord, into buf: inout [UInt8]) { - FfiConverterString.write(value.json, into: &buf) + public static func write(_ value: MapUpdateRecord, into buf: inout [UInt8]) { + FfiConverterTypeMapUpdateKind.write(value.kind, into: &buf) + FfiConverterOptionData.write(value.previous, into: &buf) + FfiConverterOptionTypeMapVersionRecord.write(value.current, into: &buf) } } @@ -16614,57 +17249,88 @@ public struct FfiConverterTypeJsonDocumentRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeJsonDocumentRecord_lift(_ buf: RustBuffer) throws -> JsonDocumentRecord { - return try FfiConverterTypeJsonDocumentRecord.lift(buf) +public func FfiConverterTypeMapUpdateRecord_lift(_ buf: RustBuffer) throws -> MapUpdateRecord { + return try FfiConverterTypeMapUpdateRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeJsonDocumentRecord_lower(_ value: JsonDocumentRecord) -> RustBuffer { - return FfiConverterTypeJsonDocumentRecord.lower(value) +public func FfiConverterTypeMapUpdateRecord_lower(_ value: MapUpdateRecord) -> RustBuffer { + return FfiConverterTypeMapUpdateRecord.lower(value) } -public struct KeyProofRecord: Equatable, Hashable { - public var root: Data? - public var key: Data - public var path: [NodeRecord] +/** + * Portable, owned description of one durable managed-map version. + */ +public struct MapVersionRecord: Equatable, Hashable { + /** + * Raw 32-byte content-derived version identifier. + */ + public var id: Data + /** + * Immutable tree handle for this version. + */ + public var tree: TreeRecord + /** + * Creation timestamp recorded by the version root, when available. + */ + public var createdAtMillis: UInt64? + /** + * Whether this version was the head when resolved. + */ + public var isHead: Bool // Default memberwise initializers are never public by default, so we // declare one manually. - public init(root: Data?, key: Data, path: [NodeRecord]) { - self.root = root - self.key = key - self.path = path + public init( + /** + * Raw 32-byte content-derived version identifier. + */id: Data, + /** + * Immutable tree handle for this version. + */tree: TreeRecord, + /** + * Creation timestamp recorded by the version root, when available. + */createdAtMillis: UInt64?, + /** + * Whether this version was the head when resolved. + */isHead: Bool) { + self.id = id + self.tree = tree + self.createdAtMillis = createdAtMillis + self.isHead = isHead } - - + + } #if compiler(>=6) -extension KeyProofRecord: Sendable {} +extension MapVersionRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeKeyProofRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> KeyProofRecord { +public struct FfiConverterTypeMapVersionRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> MapVersionRecord { return - try KeyProofRecord( - root: FfiConverterOptionData.read(from: &buf), - key: FfiConverterData.read(from: &buf), - path: FfiConverterSequenceTypeNodeRecord.read(from: &buf) + try MapVersionRecord( + id: FfiConverterData.read(from: &buf), + tree: FfiConverterTypeTreeRecord.read(from: &buf), + createdAtMillis: FfiConverterOptionUInt64.read(from: &buf), + isHead: FfiConverterBool.read(from: &buf) ) } - public static func write(_ value: KeyProofRecord, into buf: inout [UInt8]) { - FfiConverterOptionData.write(value.root, into: &buf) - FfiConverterData.write(value.key, into: &buf) - FfiConverterSequenceTypeNodeRecord.write(value.path, into: &buf) + public static func write(_ value: MapVersionRecord, into buf: inout [UInt8]) { + FfiConverterData.write(value.id, into: &buf) + FfiConverterTypeTreeRecord.write(value.tree, into: &buf) + FfiConverterOptionUInt64.write(value.createdAtMillis, into: &buf) + FfiConverterBool.write(value.isHead, into: &buf) } } @@ -16672,69 +17338,61 @@ public struct FfiConverterTypeKeyProofRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeKeyProofRecord_lift(_ buf: RustBuffer) throws -> KeyProofRecord { - return try FfiConverterTypeKeyProofRecord.lift(buf) +public func FfiConverterTypeMapVersionRecord_lift(_ buf: RustBuffer) throws -> MapVersionRecord { + return try FfiConverterTypeMapVersionRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeKeyProofRecord_lower(_ value: KeyProofRecord) -> RustBuffer { - return FfiConverterTypeKeyProofRecord.lower(value) +public func FfiConverterTypeMapVersionRecord_lower(_ value: MapVersionRecord) -> RustBuffer { + return FfiConverterTypeMapVersionRecord.lower(value) } -public struct KeyProofVerificationRecord: Equatable, Hashable { - public var valid: Bool - public var exists: Bool - public var absence: Bool - public var root: Data? - public var key: Data - public var value: Data? +public struct MergeExplanationRecord: Equatable, Hashable { + public var result: TreeRecord? + public var error: String? + public var traceJson: String + public var trace: MergeTraceRecord // Default memberwise initializers are never public by default, so we // declare one manually. - public init(valid: Bool, exists: Bool, absence: Bool, root: Data?, key: Data, value: Data?) { - self.valid = valid - self.exists = exists - self.absence = absence - self.root = root - self.key = key - self.value = value + public init(result: TreeRecord?, error: String?, traceJson: String, trace: MergeTraceRecord) { + self.result = result + self.error = error + self.traceJson = traceJson + self.trace = trace } - - + + } #if compiler(>=6) -extension KeyProofVerificationRecord: Sendable {} +extension MergeExplanationRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeKeyProofVerificationRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> KeyProofVerificationRecord { +public struct FfiConverterTypeMergeExplanationRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> MergeExplanationRecord { return - try KeyProofVerificationRecord( - valid: FfiConverterBool.read(from: &buf), - exists: FfiConverterBool.read(from: &buf), - absence: FfiConverterBool.read(from: &buf), - root: FfiConverterOptionData.read(from: &buf), - key: FfiConverterData.read(from: &buf), - value: FfiConverterOptionData.read(from: &buf) + try MergeExplanationRecord( + result: FfiConverterOptionTypeTreeRecord.read(from: &buf), + error: FfiConverterOptionString.read(from: &buf), + traceJson: FfiConverterString.read(from: &buf), + trace: FfiConverterTypeMergeTraceRecord.read(from: &buf) ) } - public static func write(_ value: KeyProofVerificationRecord, into buf: inout [UInt8]) { - FfiConverterBool.write(value.valid, into: &buf) - FfiConverterBool.write(value.exists, into: &buf) - FfiConverterBool.write(value.absence, into: &buf) - FfiConverterOptionData.write(value.root, into: &buf) - FfiConverterData.write(value.key, into: &buf) - FfiConverterOptionData.write(value.value, into: &buf) + public static func write(_ value: MergeExplanationRecord, into buf: inout [UInt8]) { + FfiConverterOptionTypeTreeRecord.write(value.result, into: &buf) + FfiConverterOptionString.write(value.error, into: &buf) + FfiConverterString.write(value.traceJson, into: &buf) + FfiConverterTypeMergeTraceRecord.write(value.trace, into: &buf) } } @@ -16742,49 +17400,109 @@ public struct FfiConverterTypeKeyProofVerificationRecord: FfiConverterRustBuffer #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeKeyProofVerificationRecord_lift(_ buf: RustBuffer) throws -> KeyProofVerificationRecord { - return try FfiConverterTypeKeyProofVerificationRecord.lift(buf) +public func FfiConverterTypeMergeExplanationRecord_lift(_ buf: RustBuffer) throws -> MergeExplanationRecord { + return try FfiConverterTypeMergeExplanationRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeKeyProofVerificationRecord_lower(_ value: KeyProofVerificationRecord) -> RustBuffer { - return FfiConverterTypeKeyProofVerificationRecord.lower(value) +public func FfiConverterTypeMergeExplanationRecord_lower(_ value: MergeExplanationRecord) -> RustBuffer { + return FfiConverterTypeMergeExplanationRecord.lower(value) } -public struct LargeValueConfigRecord: Equatable, Hashable { - public var inlineThreshold: UInt64 +public struct MergeTraceEventRecord: Equatable, Hashable { + public var kind: MergeTraceEventKind + public var fastPath: MergeFastPathKind? + public var cid: Data? + public var reuseReason: MergeReuseReasonKind? + public var level: UInt64? + public var entries: UInt64? + public var firstKey: Data? + public var lastKey: Data? + public var stage: MergeTraceStageKind? + public var key: Data? + public var resolution: MergeTraceResolutionKind? + public var fallbackReason: MergeFallbackReasonKind? + public var diffStats: DiffTraversalStatsRecord? + public var rightChanges: UInt64? + public var mutations: UInt64? + public var appendOnly: Bool? // Default memberwise initializers are never public by default, so we // declare one manually. - public init(inlineThreshold: UInt64) { - self.inlineThreshold = inlineThreshold + public init(kind: MergeTraceEventKind, fastPath: MergeFastPathKind?, cid: Data?, reuseReason: MergeReuseReasonKind?, level: UInt64?, entries: UInt64?, firstKey: Data?, lastKey: Data?, stage: MergeTraceStageKind?, key: Data?, resolution: MergeTraceResolutionKind?, fallbackReason: MergeFallbackReasonKind?, diffStats: DiffTraversalStatsRecord?, rightChanges: UInt64?, mutations: UInt64?, appendOnly: Bool?) { + self.kind = kind + self.fastPath = fastPath + self.cid = cid + self.reuseReason = reuseReason + self.level = level + self.entries = entries + self.firstKey = firstKey + self.lastKey = lastKey + self.stage = stage + self.key = key + self.resolution = resolution + self.fallbackReason = fallbackReason + self.diffStats = diffStats + self.rightChanges = rightChanges + self.mutations = mutations + self.appendOnly = appendOnly } - - + + } #if compiler(>=6) -extension LargeValueConfigRecord: Sendable {} +extension MergeTraceEventRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeLargeValueConfigRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> LargeValueConfigRecord { +public struct FfiConverterTypeMergeTraceEventRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> MergeTraceEventRecord { return - try LargeValueConfigRecord( - inlineThreshold: FfiConverterUInt64.read(from: &buf) + try MergeTraceEventRecord( + kind: FfiConverterTypeMergeTraceEventKind.read(from: &buf), + fastPath: FfiConverterOptionTypeMergeFastPathKind.read(from: &buf), + cid: FfiConverterOptionData.read(from: &buf), + reuseReason: FfiConverterOptionTypeMergeReuseReasonKind.read(from: &buf), + level: FfiConverterOptionUInt64.read(from: &buf), + entries: FfiConverterOptionUInt64.read(from: &buf), + firstKey: FfiConverterOptionData.read(from: &buf), + lastKey: FfiConverterOptionData.read(from: &buf), + stage: FfiConverterOptionTypeMergeTraceStageKind.read(from: &buf), + key: FfiConverterOptionData.read(from: &buf), + resolution: FfiConverterOptionTypeMergeTraceResolutionKind.read(from: &buf), + fallbackReason: FfiConverterOptionTypeMergeFallbackReasonKind.read(from: &buf), + diffStats: FfiConverterOptionTypeDiffTraversalStatsRecord.read(from: &buf), + rightChanges: FfiConverterOptionUInt64.read(from: &buf), + mutations: FfiConverterOptionUInt64.read(from: &buf), + appendOnly: FfiConverterOptionBool.read(from: &buf) ) } - public static func write(_ value: LargeValueConfigRecord, into buf: inout [UInt8]) { - FfiConverterUInt64.write(value.inlineThreshold, into: &buf) + public static func write(_ value: MergeTraceEventRecord, into buf: inout [UInt8]) { + FfiConverterTypeMergeTraceEventKind.write(value.kind, into: &buf) + FfiConverterOptionTypeMergeFastPathKind.write(value.fastPath, into: &buf) + FfiConverterOptionData.write(value.cid, into: &buf) + FfiConverterOptionTypeMergeReuseReasonKind.write(value.reuseReason, into: &buf) + FfiConverterOptionUInt64.write(value.level, into: &buf) + FfiConverterOptionUInt64.write(value.entries, into: &buf) + FfiConverterOptionData.write(value.firstKey, into: &buf) + FfiConverterOptionData.write(value.lastKey, into: &buf) + FfiConverterOptionTypeMergeTraceStageKind.write(value.stage, into: &buf) + FfiConverterOptionData.write(value.key, into: &buf) + FfiConverterOptionTypeMergeTraceResolutionKind.write(value.resolution, into: &buf) + FfiConverterOptionTypeMergeFallbackReasonKind.write(value.fallbackReason, into: &buf) + FfiConverterOptionTypeDiffTraversalStatsRecord.write(value.diffStats, into: &buf) + FfiConverterOptionUInt64.write(value.rightChanges, into: &buf) + FfiConverterOptionUInt64.write(value.mutations, into: &buf) + FfiConverterOptionBool.write(value.appendOnly, into: &buf) } } @@ -16792,61 +17510,49 @@ public struct FfiConverterTypeLargeValueConfigRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeLargeValueConfigRecord_lift(_ buf: RustBuffer) throws -> LargeValueConfigRecord { - return try FfiConverterTypeLargeValueConfigRecord.lift(buf) +public func FfiConverterTypeMergeTraceEventRecord_lift(_ buf: RustBuffer) throws -> MergeTraceEventRecord { + return try FfiConverterTypeMergeTraceEventRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeLargeValueConfigRecord_lower(_ value: LargeValueConfigRecord) -> RustBuffer { - return FfiConverterTypeLargeValueConfigRecord.lower(value) +public func FfiConverterTypeMergeTraceEventRecord_lower(_ value: MergeTraceEventRecord) -> RustBuffer { + return FfiConverterTypeMergeTraceEventRecord.lower(value) } -public struct MapCatalogVerificationRecord: Equatable, Hashable { - public var head: Data - public var versionCount: UInt64 - public var reachableNodes: UInt64 - public var reachableBytes: UInt64 +public struct MergeTraceRecord: Equatable, Hashable { + public var events: [MergeTraceEventRecord] // Default memberwise initializers are never public by default, so we // declare one manually. - public init(head: Data, versionCount: UInt64, reachableNodes: UInt64, reachableBytes: UInt64) { - self.head = head - self.versionCount = versionCount - self.reachableNodes = reachableNodes - self.reachableBytes = reachableBytes + public init(events: [MergeTraceEventRecord]) { + self.events = events } - - + + } #if compiler(>=6) -extension MapCatalogVerificationRecord: Sendable {} +extension MergeTraceRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeMapCatalogVerificationRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> MapCatalogVerificationRecord { +public struct FfiConverterTypeMergeTraceRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> MergeTraceRecord { return - try MapCatalogVerificationRecord( - head: FfiConverterData.read(from: &buf), - versionCount: FfiConverterUInt64.read(from: &buf), - reachableNodes: FfiConverterUInt64.read(from: &buf), - reachableBytes: FfiConverterUInt64.read(from: &buf) + try MergeTraceRecord( + events: FfiConverterSequenceTypeMergeTraceEventRecord.read(from: &buf) ) } - public static func write(_ value: MapCatalogVerificationRecord, into buf: inout [UInt8]) { - FfiConverterData.write(value.head, into: &buf) - FfiConverterUInt64.write(value.versionCount, into: &buf) - FfiConverterUInt64.write(value.reachableNodes, into: &buf) - FfiConverterUInt64.write(value.reachableBytes, into: &buf) + public static func write(_ value: MergeTraceRecord, into buf: inout [UInt8]) { + FfiConverterSequenceTypeMergeTraceEventRecord.write(value.events, into: &buf) } } @@ -16854,57 +17560,97 @@ public struct FfiConverterTypeMapCatalogVerificationRecord: FfiConverterRustBuff #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeMapCatalogVerificationRecord_lift(_ buf: RustBuffer) throws -> MapCatalogVerificationRecord { - return try FfiConverterTypeMapCatalogVerificationRecord.lift(buf) +public func FfiConverterTypeMergeTraceRecord_lift(_ buf: RustBuffer) throws -> MergeTraceRecord { + return try FfiConverterTypeMergeTraceRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeMapCatalogVerificationRecord_lower(_ value: MapCatalogVerificationRecord) -> RustBuffer { - return FfiConverterTypeMapCatalogVerificationRecord.lower(value) +public func FfiConverterTypeMergeTraceRecord_lower(_ value: MergeTraceRecord) -> RustBuffer { + return FfiConverterTypeMergeTraceRecord.lower(value) } -public struct MapChangeEventRecord: Equatable, Hashable { - public var previous: Data? - public var current: MapVersionRecord - public var diffs: [DiffRecord] +public struct MetricsRecord: Equatable, Hashable { + public var nodeCacheHits: UInt64 + public var nodeCacheMisses: UInt64 + public var nodeCacheEvictions: UInt64 + public var nodesRead: UInt64 + public var bytesRead: UInt64 + public var nodesWritten: UInt64 + public var bytesWritten: UInt64 + public var storeGetCalls: UInt64 + public var storeBatchGetCalls: UInt64 + public var storeBatchGetKeys: UInt64 + public var storePutCalls: UInt64 + public var storeBatchPutCalls: UInt64 + public var storeBatchPutNodes: UInt64 // Default memberwise initializers are never public by default, so we // declare one manually. - public init(previous: Data?, current: MapVersionRecord, diffs: [DiffRecord]) { - self.previous = previous - self.current = current - self.diffs = diffs + public init(nodeCacheHits: UInt64, nodeCacheMisses: UInt64, nodeCacheEvictions: UInt64, nodesRead: UInt64, bytesRead: UInt64, nodesWritten: UInt64, bytesWritten: UInt64, storeGetCalls: UInt64, storeBatchGetCalls: UInt64, storeBatchGetKeys: UInt64, storePutCalls: UInt64, storeBatchPutCalls: UInt64, storeBatchPutNodes: UInt64) { + self.nodeCacheHits = nodeCacheHits + self.nodeCacheMisses = nodeCacheMisses + self.nodeCacheEvictions = nodeCacheEvictions + self.nodesRead = nodesRead + self.bytesRead = bytesRead + self.nodesWritten = nodesWritten + self.bytesWritten = bytesWritten + self.storeGetCalls = storeGetCalls + self.storeBatchGetCalls = storeBatchGetCalls + self.storeBatchGetKeys = storeBatchGetKeys + self.storePutCalls = storePutCalls + self.storeBatchPutCalls = storeBatchPutCalls + self.storeBatchPutNodes = storeBatchPutNodes } - - + + } #if compiler(>=6) -extension MapChangeEventRecord: Sendable {} +extension MetricsRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeMapChangeEventRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> MapChangeEventRecord { +public struct FfiConverterTypeMetricsRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> MetricsRecord { return - try MapChangeEventRecord( - previous: FfiConverterOptionData.read(from: &buf), - current: FfiConverterTypeMapVersionRecord.read(from: &buf), - diffs: FfiConverterSequenceTypeDiffRecord.read(from: &buf) + try MetricsRecord( + nodeCacheHits: FfiConverterUInt64.read(from: &buf), + nodeCacheMisses: FfiConverterUInt64.read(from: &buf), + nodeCacheEvictions: FfiConverterUInt64.read(from: &buf), + nodesRead: FfiConverterUInt64.read(from: &buf), + bytesRead: FfiConverterUInt64.read(from: &buf), + nodesWritten: FfiConverterUInt64.read(from: &buf), + bytesWritten: FfiConverterUInt64.read(from: &buf), + storeGetCalls: FfiConverterUInt64.read(from: &buf), + storeBatchGetCalls: FfiConverterUInt64.read(from: &buf), + storeBatchGetKeys: FfiConverterUInt64.read(from: &buf), + storePutCalls: FfiConverterUInt64.read(from: &buf), + storeBatchPutCalls: FfiConverterUInt64.read(from: &buf), + storeBatchPutNodes: FfiConverterUInt64.read(from: &buf) ) } - public static func write(_ value: MapChangeEventRecord, into buf: inout [UInt8]) { - FfiConverterOptionData.write(value.previous, into: &buf) - FfiConverterTypeMapVersionRecord.write(value.current, into: &buf) - FfiConverterSequenceTypeDiffRecord.write(value.diffs, into: &buf) + public static func write(_ value: MetricsRecord, into buf: inout [UInt8]) { + FfiConverterUInt64.write(value.nodeCacheHits, into: &buf) + FfiConverterUInt64.write(value.nodeCacheMisses, into: &buf) + FfiConverterUInt64.write(value.nodeCacheEvictions, into: &buf) + FfiConverterUInt64.write(value.nodesRead, into: &buf) + FfiConverterUInt64.write(value.bytesRead, into: &buf) + FfiConverterUInt64.write(value.nodesWritten, into: &buf) + FfiConverterUInt64.write(value.bytesWritten, into: &buf) + FfiConverterUInt64.write(value.storeGetCalls, into: &buf) + FfiConverterUInt64.write(value.storeBatchGetCalls, into: &buf) + FfiConverterUInt64.write(value.storeBatchGetKeys, into: &buf) + FfiConverterUInt64.write(value.storePutCalls, into: &buf) + FfiConverterUInt64.write(value.storeBatchPutCalls, into: &buf) + FfiConverterUInt64.write(value.storeBatchPutNodes, into: &buf) } } @@ -16912,57 +17658,57 @@ public struct FfiConverterTypeMapChangeEventRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeMapChangeEventRecord_lift(_ buf: RustBuffer) throws -> MapChangeEventRecord { - return try FfiConverterTypeMapChangeEventRecord.lift(buf) +public func FfiConverterTypeMetricsRecord_lift(_ buf: RustBuffer) throws -> MetricsRecord { + return try FfiConverterTypeMetricsRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeMapChangeEventRecord_lower(_ value: MapChangeEventRecord) -> RustBuffer { - return FfiConverterTypeMapChangeEventRecord.lower(value) +public func FfiConverterTypeMetricsRecord_lower(_ value: MetricsRecord) -> RustBuffer { + return FfiConverterTypeMetricsRecord.lower(value) } -public struct MapUpdateRecord: Equatable, Hashable { - public var kind: MapUpdateKind - public var previous: Data? - public var current: MapVersionRecord? +public struct MissingNodeCopyRecord: Equatable, Hashable { + public var plan: MissingNodePlanRecord + public var copiedNodes: UInt64 + public var copiedBytes: UInt64 // Default memberwise initializers are never public by default, so we // declare one manually. - public init(kind: MapUpdateKind, previous: Data?, current: MapVersionRecord?) { - self.kind = kind - self.previous = previous - self.current = current + public init(plan: MissingNodePlanRecord, copiedNodes: UInt64, copiedBytes: UInt64) { + self.plan = plan + self.copiedNodes = copiedNodes + self.copiedBytes = copiedBytes } - - + + } #if compiler(>=6) -extension MapUpdateRecord: Sendable {} +extension MissingNodeCopyRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeMapUpdateRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> MapUpdateRecord { +public struct FfiConverterTypeMissingNodeCopyRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> MissingNodeCopyRecord { return - try MapUpdateRecord( - kind: FfiConverterTypeMapUpdateKind.read(from: &buf), - previous: FfiConverterOptionData.read(from: &buf), - current: FfiConverterOptionTypeMapVersionRecord.read(from: &buf) + try MissingNodeCopyRecord( + plan: FfiConverterTypeMissingNodePlanRecord.read(from: &buf), + copiedNodes: FfiConverterUInt64.read(from: &buf), + copiedBytes: FfiConverterUInt64.read(from: &buf) ) } - public static func write(_ value: MapUpdateRecord, into buf: inout [UInt8]) { - FfiConverterTypeMapUpdateKind.write(value.kind, into: &buf) - FfiConverterOptionData.write(value.previous, into: &buf) - FfiConverterOptionTypeMapVersionRecord.write(value.current, into: &buf) + public static func write(_ value: MissingNodeCopyRecord, into buf: inout [UInt8]) { + FfiConverterTypeMissingNodePlanRecord.write(value.plan, into: &buf) + FfiConverterUInt64.write(value.copiedNodes, into: &buf) + FfiConverterUInt64.write(value.copiedBytes, into: &buf) } } @@ -16970,88 +17716,69 @@ public struct FfiConverterTypeMapUpdateRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeMapUpdateRecord_lift(_ buf: RustBuffer) throws -> MapUpdateRecord { - return try FfiConverterTypeMapUpdateRecord.lift(buf) +public func FfiConverterTypeMissingNodeCopyRecord_lift(_ buf: RustBuffer) throws -> MissingNodeCopyRecord { + return try FfiConverterTypeMissingNodeCopyRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeMapUpdateRecord_lower(_ value: MapUpdateRecord) -> RustBuffer { - return FfiConverterTypeMapUpdateRecord.lower(value) +public func FfiConverterTypeMissingNodeCopyRecord_lower(_ value: MissingNodeCopyRecord) -> RustBuffer { + return FfiConverterTypeMissingNodeCopyRecord.lower(value) } -/** - * Portable, owned description of one durable managed-map version. - */ -public struct MapVersionRecord: Equatable, Hashable { - /** - * Raw 32-byte content-derived version identifier. - */ - public var id: Data - /** - * Immutable tree handle for this version. - */ - public var tree: TreeRecord - /** - * Creation timestamp recorded by the version root, when available. - */ - public var createdAtMillis: UInt64? - /** - * Whether this version was the head when resolved. - */ - public var isHead: Bool +public struct MissingNodePlanRecord: Equatable, Hashable { + public var requiredCids: [Data] + public var requiredNodes: UInt64 + public var requiredBytes: UInt64 + public var missingCids: [Data] + public var missingNodes: UInt64 + public var missingBytes: UInt64 // Default memberwise initializers are never public by default, so we // declare one manually. - public init( - /** - * Raw 32-byte content-derived version identifier. - */id: Data, - /** - * Immutable tree handle for this version. - */tree: TreeRecord, - /** - * Creation timestamp recorded by the version root, when available. - */createdAtMillis: UInt64?, - /** - * Whether this version was the head when resolved. - */isHead: Bool) { - self.id = id - self.tree = tree - self.createdAtMillis = createdAtMillis - self.isHead = isHead + public init(requiredCids: [Data], requiredNodes: UInt64, requiredBytes: UInt64, missingCids: [Data], missingNodes: UInt64, missingBytes: UInt64) { + self.requiredCids = requiredCids + self.requiredNodes = requiredNodes + self.requiredBytes = requiredBytes + self.missingCids = missingCids + self.missingNodes = missingNodes + self.missingBytes = missingBytes } - - + + } #if compiler(>=6) -extension MapVersionRecord: Sendable {} +extension MissingNodePlanRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeMapVersionRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> MapVersionRecord { +public struct FfiConverterTypeMissingNodePlanRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> MissingNodePlanRecord { return - try MapVersionRecord( - id: FfiConverterData.read(from: &buf), - tree: FfiConverterTypeTreeRecord.read(from: &buf), - createdAtMillis: FfiConverterOptionUInt64.read(from: &buf), - isHead: FfiConverterBool.read(from: &buf) + try MissingNodePlanRecord( + requiredCids: FfiConverterSequenceData.read(from: &buf), + requiredNodes: FfiConverterUInt64.read(from: &buf), + requiredBytes: FfiConverterUInt64.read(from: &buf), + missingCids: FfiConverterSequenceData.read(from: &buf), + missingNodes: FfiConverterUInt64.read(from: &buf), + missingBytes: FfiConverterUInt64.read(from: &buf) ) } - public static func write(_ value: MapVersionRecord, into buf: inout [UInt8]) { - FfiConverterData.write(value.id, into: &buf) - FfiConverterTypeTreeRecord.write(value.tree, into: &buf) - FfiConverterOptionUInt64.write(value.createdAtMillis, into: &buf) - FfiConverterBool.write(value.isHead, into: &buf) + public static func write(_ value: MissingNodePlanRecord, into buf: inout [UInt8]) { + FfiConverterSequenceData.write(value.requiredCids, into: &buf) + FfiConverterUInt64.write(value.requiredNodes, into: &buf) + FfiConverterUInt64.write(value.requiredBytes, into: &buf) + FfiConverterSequenceData.write(value.missingCids, into: &buf) + FfiConverterUInt64.write(value.missingNodes, into: &buf) + FfiConverterUInt64.write(value.missingBytes, into: &buf) } } @@ -17059,61 +17786,57 @@ public struct FfiConverterTypeMapVersionRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeMapVersionRecord_lift(_ buf: RustBuffer) throws -> MapVersionRecord { - return try FfiConverterTypeMapVersionRecord.lift(buf) +public func FfiConverterTypeMissingNodePlanRecord_lift(_ buf: RustBuffer) throws -> MissingNodePlanRecord { + return try FfiConverterTypeMissingNodePlanRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeMapVersionRecord_lower(_ value: MapVersionRecord) -> RustBuffer { - return FfiConverterTypeMapVersionRecord.lower(value) +public func FfiConverterTypeMissingNodePlanRecord_lower(_ value: MissingNodePlanRecord) -> RustBuffer { + return FfiConverterTypeMissingNodePlanRecord.lower(value) } -public struct MergeExplanationRecord: Equatable, Hashable { - public var result: TreeRecord? - public var error: String? - public var traceJson: String - public var trace: MergeTraceRecord +public struct MultiKeyProofRecord: Equatable, Hashable { + public var root: Data? + public var keys: [Data] + public var path: [NodeRecord] // Default memberwise initializers are never public by default, so we // declare one manually. - public init(result: TreeRecord?, error: String?, traceJson: String, trace: MergeTraceRecord) { - self.result = result - self.error = error - self.traceJson = traceJson - self.trace = trace + public init(root: Data?, keys: [Data], path: [NodeRecord]) { + self.root = root + self.keys = keys + self.path = path } - - + + } #if compiler(>=6) -extension MergeExplanationRecord: Sendable {} +extension MultiKeyProofRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeMergeExplanationRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> MergeExplanationRecord { +public struct FfiConverterTypeMultiKeyProofRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> MultiKeyProofRecord { return - try MergeExplanationRecord( - result: FfiConverterOptionTypeTreeRecord.read(from: &buf), - error: FfiConverterOptionString.read(from: &buf), - traceJson: FfiConverterString.read(from: &buf), - trace: FfiConverterTypeMergeTraceRecord.read(from: &buf) + try MultiKeyProofRecord( + root: FfiConverterOptionData.read(from: &buf), + keys: FfiConverterSequenceData.read(from: &buf), + path: FfiConverterSequenceTypeNodeRecord.read(from: &buf) ) } - public static func write(_ value: MergeExplanationRecord, into buf: inout [UInt8]) { - FfiConverterOptionTypeTreeRecord.write(value.result, into: &buf) - FfiConverterOptionString.write(value.error, into: &buf) - FfiConverterString.write(value.traceJson, into: &buf) - FfiConverterTypeMergeTraceRecord.write(value.trace, into: &buf) + public static func write(_ value: MultiKeyProofRecord, into buf: inout [UInt8]) { + FfiConverterOptionData.write(value.root, into: &buf) + FfiConverterSequenceData.write(value.keys, into: &buf) + FfiConverterSequenceTypeNodeRecord.write(value.path, into: &buf) } } @@ -17121,109 +17844,57 @@ public struct FfiConverterTypeMergeExplanationRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeMergeExplanationRecord_lift(_ buf: RustBuffer) throws -> MergeExplanationRecord { - return try FfiConverterTypeMergeExplanationRecord.lift(buf) +public func FfiConverterTypeMultiKeyProofRecord_lift(_ buf: RustBuffer) throws -> MultiKeyProofRecord { + return try FfiConverterTypeMultiKeyProofRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeMergeExplanationRecord_lower(_ value: MergeExplanationRecord) -> RustBuffer { - return FfiConverterTypeMergeExplanationRecord.lower(value) +public func FfiConverterTypeMultiKeyProofRecord_lower(_ value: MultiKeyProofRecord) -> RustBuffer { + return FfiConverterTypeMultiKeyProofRecord.lower(value) } -public struct MergeTraceEventRecord: Equatable, Hashable { - public var kind: MergeTraceEventKind - public var fastPath: MergeFastPathKind? - public var cid: Data? - public var reuseReason: MergeReuseReasonKind? - public var level: UInt64? - public var entries: UInt64? - public var firstKey: Data? - public var lastKey: Data? - public var stage: MergeTraceStageKind? - public var key: Data? - public var resolution: MergeTraceResolutionKind? - public var fallbackReason: MergeFallbackReasonKind? - public var diffStats: DiffTraversalStatsRecord? - public var rightChanges: UInt64? - public var mutations: UInt64? - public var appendOnly: Bool? +public struct MultiKeyProofVerificationRecord: Equatable, Hashable { + public var valid: Bool + public var root: Data? + public var results: [KeyProofVerificationRecord] // Default memberwise initializers are never public by default, so we // declare one manually. - public init(kind: MergeTraceEventKind, fastPath: MergeFastPathKind?, cid: Data?, reuseReason: MergeReuseReasonKind?, level: UInt64?, entries: UInt64?, firstKey: Data?, lastKey: Data?, stage: MergeTraceStageKind?, key: Data?, resolution: MergeTraceResolutionKind?, fallbackReason: MergeFallbackReasonKind?, diffStats: DiffTraversalStatsRecord?, rightChanges: UInt64?, mutations: UInt64?, appendOnly: Bool?) { - self.kind = kind - self.fastPath = fastPath - self.cid = cid - self.reuseReason = reuseReason - self.level = level - self.entries = entries - self.firstKey = firstKey - self.lastKey = lastKey - self.stage = stage - self.key = key - self.resolution = resolution - self.fallbackReason = fallbackReason - self.diffStats = diffStats - self.rightChanges = rightChanges - self.mutations = mutations - self.appendOnly = appendOnly + public init(valid: Bool, root: Data?, results: [KeyProofVerificationRecord]) { + self.valid = valid + self.root = root + self.results = results } - - + + } #if compiler(>=6) -extension MergeTraceEventRecord: Sendable {} +extension MultiKeyProofVerificationRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeMergeTraceEventRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> MergeTraceEventRecord { +public struct FfiConverterTypeMultiKeyProofVerificationRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> MultiKeyProofVerificationRecord { return - try MergeTraceEventRecord( - kind: FfiConverterTypeMergeTraceEventKind.read(from: &buf), - fastPath: FfiConverterOptionTypeMergeFastPathKind.read(from: &buf), - cid: FfiConverterOptionData.read(from: &buf), - reuseReason: FfiConverterOptionTypeMergeReuseReasonKind.read(from: &buf), - level: FfiConverterOptionUInt64.read(from: &buf), - entries: FfiConverterOptionUInt64.read(from: &buf), - firstKey: FfiConverterOptionData.read(from: &buf), - lastKey: FfiConverterOptionData.read(from: &buf), - stage: FfiConverterOptionTypeMergeTraceStageKind.read(from: &buf), - key: FfiConverterOptionData.read(from: &buf), - resolution: FfiConverterOptionTypeMergeTraceResolutionKind.read(from: &buf), - fallbackReason: FfiConverterOptionTypeMergeFallbackReasonKind.read(from: &buf), - diffStats: FfiConverterOptionTypeDiffTraversalStatsRecord.read(from: &buf), - rightChanges: FfiConverterOptionUInt64.read(from: &buf), - mutations: FfiConverterOptionUInt64.read(from: &buf), - appendOnly: FfiConverterOptionBool.read(from: &buf) + try MultiKeyProofVerificationRecord( + valid: FfiConverterBool.read(from: &buf), + root: FfiConverterOptionData.read(from: &buf), + results: FfiConverterSequenceTypeKeyProofVerificationRecord.read(from: &buf) ) } - public static func write(_ value: MergeTraceEventRecord, into buf: inout [UInt8]) { - FfiConverterTypeMergeTraceEventKind.write(value.kind, into: &buf) - FfiConverterOptionTypeMergeFastPathKind.write(value.fastPath, into: &buf) - FfiConverterOptionData.write(value.cid, into: &buf) - FfiConverterOptionTypeMergeReuseReasonKind.write(value.reuseReason, into: &buf) - FfiConverterOptionUInt64.write(value.level, into: &buf) - FfiConverterOptionUInt64.write(value.entries, into: &buf) - FfiConverterOptionData.write(value.firstKey, into: &buf) - FfiConverterOptionData.write(value.lastKey, into: &buf) - FfiConverterOptionTypeMergeTraceStageKind.write(value.stage, into: &buf) - FfiConverterOptionData.write(value.key, into: &buf) - FfiConverterOptionTypeMergeTraceResolutionKind.write(value.resolution, into: &buf) - FfiConverterOptionTypeMergeFallbackReasonKind.write(value.fallbackReason, into: &buf) - FfiConverterOptionTypeDiffTraversalStatsRecord.write(value.diffStats, into: &buf) - FfiConverterOptionUInt64.write(value.rightChanges, into: &buf) - FfiConverterOptionUInt64.write(value.mutations, into: &buf) - FfiConverterOptionBool.write(value.appendOnly, into: &buf) + public static func write(_ value: MultiKeyProofVerificationRecord, into buf: inout [UInt8]) { + FfiConverterBool.write(value.valid, into: &buf) + FfiConverterOptionData.write(value.root, into: &buf) + FfiConverterSequenceTypeKeyProofVerificationRecord.write(value.results, into: &buf) } } @@ -17231,49 +17902,57 @@ public struct FfiConverterTypeMergeTraceEventRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeMergeTraceEventRecord_lift(_ buf: RustBuffer) throws -> MergeTraceEventRecord { - return try FfiConverterTypeMergeTraceEventRecord.lift(buf) +public func FfiConverterTypeMultiKeyProofVerificationRecord_lift(_ buf: RustBuffer) throws -> MultiKeyProofVerificationRecord { + return try FfiConverterTypeMultiKeyProofVerificationRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeMergeTraceEventRecord_lower(_ value: MergeTraceEventRecord) -> RustBuffer { - return FfiConverterTypeMergeTraceEventRecord.lower(value) +public func FfiConverterTypeMultiKeyProofVerificationRecord_lower(_ value: MultiKeyProofVerificationRecord) -> RustBuffer { + return FfiConverterTypeMultiKeyProofVerificationRecord.lower(value) } -public struct MergeTraceRecord: Equatable, Hashable { - public var events: [MergeTraceEventRecord] +public struct MutationRecord: Equatable, Hashable { + public var kind: MutationKind + public var key: Data + public var value: Data? // Default memberwise initializers are never public by default, so we // declare one manually. - public init(events: [MergeTraceEventRecord]) { - self.events = events + public init(kind: MutationKind, key: Data, value: Data?) { + self.kind = kind + self.key = key + self.value = value } - - + + } #if compiler(>=6) -extension MergeTraceRecord: Sendable {} +extension MutationRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeMergeTraceRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> MergeTraceRecord { +public struct FfiConverterTypeMutationRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> MutationRecord { return - try MergeTraceRecord( - events: FfiConverterSequenceTypeMergeTraceEventRecord.read(from: &buf) + try MutationRecord( + kind: FfiConverterTypeMutationKind.read(from: &buf), + key: FfiConverterData.read(from: &buf), + value: FfiConverterOptionData.read(from: &buf) ) } - public static func write(_ value: MergeTraceRecord, into buf: inout [UInt8]) { - FfiConverterSequenceTypeMergeTraceEventRecord.write(value.events, into: &buf) + public static func write(_ value: MutationRecord, into buf: inout [UInt8]) { + FfiConverterTypeMutationKind.write(value.kind, into: &buf) + FfiConverterData.write(value.key, into: &buf) + FfiConverterOptionData.write(value.value, into: &buf) } } @@ -17281,97 +17960,53 @@ public struct FfiConverterTypeMergeTraceRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeMergeTraceRecord_lift(_ buf: RustBuffer) throws -> MergeTraceRecord { - return try FfiConverterTypeMergeTraceRecord.lift(buf) +public func FfiConverterTypeMutationRecord_lift(_ buf: RustBuffer) throws -> MutationRecord { + return try FfiConverterTypeMutationRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeMergeTraceRecord_lower(_ value: MergeTraceRecord) -> RustBuffer { - return FfiConverterTypeMergeTraceRecord.lower(value) +public func FfiConverterTypeMutationRecord_lower(_ value: MutationRecord) -> RustBuffer { + return FfiConverterTypeMutationRecord.lower(value) } -public struct MetricsRecord: Equatable, Hashable { - public var nodeCacheHits: UInt64 - public var nodeCacheMisses: UInt64 - public var nodeCacheEvictions: UInt64 - public var nodesRead: UInt64 - public var bytesRead: UInt64 - public var nodesWritten: UInt64 - public var bytesWritten: UInt64 - public var storeGetCalls: UInt64 - public var storeBatchGetCalls: UInt64 - public var storeBatchGetKeys: UInt64 - public var storePutCalls: UInt64 - public var storeBatchPutCalls: UInt64 - public var storeBatchPutNodes: UInt64 +public struct NamedBytesListResultRecord: Equatable, Hashable { + public var values: [NamedBytesRecord] + public var error: StoreErrorRecord? // Default memberwise initializers are never public by default, so we // declare one manually. - public init(nodeCacheHits: UInt64, nodeCacheMisses: UInt64, nodeCacheEvictions: UInt64, nodesRead: UInt64, bytesRead: UInt64, nodesWritten: UInt64, bytesWritten: UInt64, storeGetCalls: UInt64, storeBatchGetCalls: UInt64, storeBatchGetKeys: UInt64, storePutCalls: UInt64, storeBatchPutCalls: UInt64, storeBatchPutNodes: UInt64) { - self.nodeCacheHits = nodeCacheHits - self.nodeCacheMisses = nodeCacheMisses - self.nodeCacheEvictions = nodeCacheEvictions - self.nodesRead = nodesRead - self.bytesRead = bytesRead - self.nodesWritten = nodesWritten - self.bytesWritten = bytesWritten - self.storeGetCalls = storeGetCalls - self.storeBatchGetCalls = storeBatchGetCalls - self.storeBatchGetKeys = storeBatchGetKeys - self.storePutCalls = storePutCalls - self.storeBatchPutCalls = storeBatchPutCalls - self.storeBatchPutNodes = storeBatchPutNodes + public init(values: [NamedBytesRecord], error: StoreErrorRecord?) { + self.values = values + self.error = error } - - + + } #if compiler(>=6) -extension MetricsRecord: Sendable {} +extension NamedBytesListResultRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeMetricsRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> MetricsRecord { +public struct FfiConverterTypeNamedBytesListResultRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> NamedBytesListResultRecord { return - try MetricsRecord( - nodeCacheHits: FfiConverterUInt64.read(from: &buf), - nodeCacheMisses: FfiConverterUInt64.read(from: &buf), - nodeCacheEvictions: FfiConverterUInt64.read(from: &buf), - nodesRead: FfiConverterUInt64.read(from: &buf), - bytesRead: FfiConverterUInt64.read(from: &buf), - nodesWritten: FfiConverterUInt64.read(from: &buf), - bytesWritten: FfiConverterUInt64.read(from: &buf), - storeGetCalls: FfiConverterUInt64.read(from: &buf), - storeBatchGetCalls: FfiConverterUInt64.read(from: &buf), - storeBatchGetKeys: FfiConverterUInt64.read(from: &buf), - storePutCalls: FfiConverterUInt64.read(from: &buf), - storeBatchPutCalls: FfiConverterUInt64.read(from: &buf), - storeBatchPutNodes: FfiConverterUInt64.read(from: &buf) + try NamedBytesListResultRecord( + values: FfiConverterSequenceTypeNamedBytesRecord.read(from: &buf), + error: FfiConverterOptionTypeStoreErrorRecord.read(from: &buf) ) } - public static func write(_ value: MetricsRecord, into buf: inout [UInt8]) { - FfiConverterUInt64.write(value.nodeCacheHits, into: &buf) - FfiConverterUInt64.write(value.nodeCacheMisses, into: &buf) - FfiConverterUInt64.write(value.nodeCacheEvictions, into: &buf) - FfiConverterUInt64.write(value.nodesRead, into: &buf) - FfiConverterUInt64.write(value.bytesRead, into: &buf) - FfiConverterUInt64.write(value.nodesWritten, into: &buf) - FfiConverterUInt64.write(value.bytesWritten, into: &buf) - FfiConverterUInt64.write(value.storeGetCalls, into: &buf) - FfiConverterUInt64.write(value.storeBatchGetCalls, into: &buf) - FfiConverterUInt64.write(value.storeBatchGetKeys, into: &buf) - FfiConverterUInt64.write(value.storePutCalls, into: &buf) - FfiConverterUInt64.write(value.storeBatchPutCalls, into: &buf) - FfiConverterUInt64.write(value.storeBatchPutNodes, into: &buf) + public static func write(_ value: NamedBytesListResultRecord, into buf: inout [UInt8]) { + FfiConverterSequenceTypeNamedBytesRecord.write(value.values, into: &buf) + FfiConverterOptionTypeStoreErrorRecord.write(value.error, into: &buf) } } @@ -17379,57 +18014,53 @@ public struct FfiConverterTypeMetricsRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeMetricsRecord_lift(_ buf: RustBuffer) throws -> MetricsRecord { - return try FfiConverterTypeMetricsRecord.lift(buf) +public func FfiConverterTypeNamedBytesListResultRecord_lift(_ buf: RustBuffer) throws -> NamedBytesListResultRecord { + return try FfiConverterTypeNamedBytesListResultRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeMetricsRecord_lower(_ value: MetricsRecord) -> RustBuffer { - return FfiConverterTypeMetricsRecord.lower(value) +public func FfiConverterTypeNamedBytesListResultRecord_lower(_ value: NamedBytesListResultRecord) -> RustBuffer { + return FfiConverterTypeNamedBytesListResultRecord.lower(value) } -public struct MissingNodeCopyRecord: Equatable, Hashable { - public var plan: MissingNodePlanRecord - public var copiedNodes: UInt64 - public var copiedBytes: UInt64 +public struct NamedBytesRecord: Equatable, Hashable { + public var name: Data + public var value: Data // Default memberwise initializers are never public by default, so we // declare one manually. - public init(plan: MissingNodePlanRecord, copiedNodes: UInt64, copiedBytes: UInt64) { - self.plan = plan - self.copiedNodes = copiedNodes - self.copiedBytes = copiedBytes + public init(name: Data, value: Data) { + self.name = name + self.value = value } - - + + } #if compiler(>=6) -extension MissingNodeCopyRecord: Sendable {} +extension NamedBytesRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeMissingNodeCopyRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> MissingNodeCopyRecord { +public struct FfiConverterTypeNamedBytesRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> NamedBytesRecord { return - try MissingNodeCopyRecord( - plan: FfiConverterTypeMissingNodePlanRecord.read(from: &buf), - copiedNodes: FfiConverterUInt64.read(from: &buf), - copiedBytes: FfiConverterUInt64.read(from: &buf) + try NamedBytesRecord( + name: FfiConverterData.read(from: &buf), + value: FfiConverterData.read(from: &buf) ) } - public static func write(_ value: MissingNodeCopyRecord, into buf: inout [UInt8]) { - FfiConverterTypeMissingNodePlanRecord.write(value.plan, into: &buf) - FfiConverterUInt64.write(value.copiedNodes, into: &buf) - FfiConverterUInt64.write(value.copiedBytes, into: &buf) + public static func write(_ value: NamedBytesRecord, into buf: inout [UInt8]) { + FfiConverterData.write(value.name, into: &buf) + FfiConverterData.write(value.value, into: &buf) } } @@ -17437,69 +18068,53 @@ public struct FfiConverterTypeMissingNodeCopyRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeMissingNodeCopyRecord_lift(_ buf: RustBuffer) throws -> MissingNodeCopyRecord { - return try FfiConverterTypeMissingNodeCopyRecord.lift(buf) +public func FfiConverterTypeNamedBytesRecord_lift(_ buf: RustBuffer) throws -> NamedBytesRecord { + return try FfiConverterTypeNamedBytesRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeMissingNodeCopyRecord_lower(_ value: MissingNodeCopyRecord) -> RustBuffer { - return FfiConverterTypeMissingNodeCopyRecord.lower(value) +public func FfiConverterTypeNamedBytesRecord_lower(_ value: NamedBytesRecord) -> RustBuffer { + return FfiConverterTypeNamedBytesRecord.lower(value) } -public struct MissingNodePlanRecord: Equatable, Hashable { - public var requiredCids: [Data] - public var requiredNodes: UInt64 - public var requiredBytes: UInt64 - public var missingCids: [Data] - public var missingNodes: UInt64 - public var missingBytes: UInt64 +public struct NamedRootManifestRecord: Equatable, Hashable { + public var name: Data + public var manifest: RootManifestRecord // Default memberwise initializers are never public by default, so we // declare one manually. - public init(requiredCids: [Data], requiredNodes: UInt64, requiredBytes: UInt64, missingCids: [Data], missingNodes: UInt64, missingBytes: UInt64) { - self.requiredCids = requiredCids - self.requiredNodes = requiredNodes - self.requiredBytes = requiredBytes - self.missingCids = missingCids - self.missingNodes = missingNodes - self.missingBytes = missingBytes + public init(name: Data, manifest: RootManifestRecord) { + self.name = name + self.manifest = manifest } - - + + } #if compiler(>=6) -extension MissingNodePlanRecord: Sendable {} +extension NamedRootManifestRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeMissingNodePlanRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> MissingNodePlanRecord { +public struct FfiConverterTypeNamedRootManifestRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> NamedRootManifestRecord { return - try MissingNodePlanRecord( - requiredCids: FfiConverterSequenceData.read(from: &buf), - requiredNodes: FfiConverterUInt64.read(from: &buf), - requiredBytes: FfiConverterUInt64.read(from: &buf), - missingCids: FfiConverterSequenceData.read(from: &buf), - missingNodes: FfiConverterUInt64.read(from: &buf), - missingBytes: FfiConverterUInt64.read(from: &buf) + try NamedRootManifestRecord( + name: FfiConverterData.read(from: &buf), + manifest: FfiConverterTypeRootManifestRecord.read(from: &buf) ) } - public static func write(_ value: MissingNodePlanRecord, into buf: inout [UInt8]) { - FfiConverterSequenceData.write(value.requiredCids, into: &buf) - FfiConverterUInt64.write(value.requiredNodes, into: &buf) - FfiConverterUInt64.write(value.requiredBytes, into: &buf) - FfiConverterSequenceData.write(value.missingCids, into: &buf) - FfiConverterUInt64.write(value.missingNodes, into: &buf) - FfiConverterUInt64.write(value.missingBytes, into: &buf) + public static func write(_ value: NamedRootManifestRecord, into buf: inout [UInt8]) { + FfiConverterData.write(value.name, into: &buf) + FfiConverterTypeRootManifestRecord.write(value.manifest, into: &buf) } } @@ -17507,57 +18122,53 @@ public struct FfiConverterTypeMissingNodePlanRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeMissingNodePlanRecord_lift(_ buf: RustBuffer) throws -> MissingNodePlanRecord { - return try FfiConverterTypeMissingNodePlanRecord.lift(buf) +public func FfiConverterTypeNamedRootManifestRecord_lift(_ buf: RustBuffer) throws -> NamedRootManifestRecord { + return try FfiConverterTypeNamedRootManifestRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeMissingNodePlanRecord_lower(_ value: MissingNodePlanRecord) -> RustBuffer { - return FfiConverterTypeMissingNodePlanRecord.lower(value) +public func FfiConverterTypeNamedRootManifestRecord_lower(_ value: NamedRootManifestRecord) -> RustBuffer { + return FfiConverterTypeNamedRootManifestRecord.lower(value) } -public struct MultiKeyProofRecord: Equatable, Hashable { - public var root: Data? - public var keys: [Data] - public var path: [NodeRecord] +public struct NamedRootRecord: Equatable, Hashable { + public var name: Data + public var tree: TreeRecord // Default memberwise initializers are never public by default, so we // declare one manually. - public init(root: Data?, keys: [Data], path: [NodeRecord]) { - self.root = root - self.keys = keys - self.path = path + public init(name: Data, tree: TreeRecord) { + self.name = name + self.tree = tree } - - + + } #if compiler(>=6) -extension MultiKeyProofRecord: Sendable {} +extension NamedRootRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeMultiKeyProofRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> MultiKeyProofRecord { +public struct FfiConverterTypeNamedRootRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> NamedRootRecord { return - try MultiKeyProofRecord( - root: FfiConverterOptionData.read(from: &buf), - keys: FfiConverterSequenceData.read(from: &buf), - path: FfiConverterSequenceTypeNodeRecord.read(from: &buf) + try NamedRootRecord( + name: FfiConverterData.read(from: &buf), + tree: FfiConverterTypeTreeRecord.read(from: &buf) ) } - public static func write(_ value: MultiKeyProofRecord, into buf: inout [UInt8]) { - FfiConverterOptionData.write(value.root, into: &buf) - FfiConverterSequenceData.write(value.keys, into: &buf) - FfiConverterSequenceTypeNodeRecord.write(value.path, into: &buf) + public static func write(_ value: NamedRootRecord, into buf: inout [UInt8]) { + FfiConverterData.write(value.name, into: &buf) + FfiConverterTypeTreeRecord.write(value.tree, into: &buf) } } @@ -17565,57 +18176,65 @@ public struct FfiConverterTypeMultiKeyProofRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeMultiKeyProofRecord_lift(_ buf: RustBuffer) throws -> MultiKeyProofRecord { - return try FfiConverterTypeMultiKeyProofRecord.lift(buf) +public func FfiConverterTypeNamedRootRecord_lift(_ buf: RustBuffer) throws -> NamedRootRecord { + return try FfiConverterTypeNamedRootRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeMultiKeyProofRecord_lower(_ value: MultiKeyProofRecord) -> RustBuffer { - return FfiConverterTypeMultiKeyProofRecord.lower(value) +public func FfiConverterTypeNamedRootRecord_lower(_ value: NamedRootRecord) -> RustBuffer { + return FfiConverterTypeNamedRootRecord.lower(value) } -public struct MultiKeyProofVerificationRecord: Equatable, Hashable { - public var valid: Bool - public var root: Data? - public var results: [KeyProofVerificationRecord] +public struct NamedRootRetentionRecord: Equatable, Hashable { + public var kind: NamedRootRetentionKind + public var names: [Data] + public var prefix: Data + public var count: UInt64? + public var minUpdatedAtMillis: UInt64? // Default memberwise initializers are never public by default, so we // declare one manually. - public init(valid: Bool, root: Data?, results: [KeyProofVerificationRecord]) { - self.valid = valid - self.root = root - self.results = results + public init(kind: NamedRootRetentionKind, names: [Data], prefix: Data, count: UInt64?, minUpdatedAtMillis: UInt64?) { + self.kind = kind + self.names = names + self.prefix = prefix + self.count = count + self.minUpdatedAtMillis = minUpdatedAtMillis } - - + + } #if compiler(>=6) -extension MultiKeyProofVerificationRecord: Sendable {} +extension NamedRootRetentionRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeMultiKeyProofVerificationRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> MultiKeyProofVerificationRecord { +public struct FfiConverterTypeNamedRootRetentionRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> NamedRootRetentionRecord { return - try MultiKeyProofVerificationRecord( - valid: FfiConverterBool.read(from: &buf), - root: FfiConverterOptionData.read(from: &buf), - results: FfiConverterSequenceTypeKeyProofVerificationRecord.read(from: &buf) + try NamedRootRetentionRecord( + kind: FfiConverterTypeNamedRootRetentionKind.read(from: &buf), + names: FfiConverterSequenceData.read(from: &buf), + prefix: FfiConverterData.read(from: &buf), + count: FfiConverterOptionUInt64.read(from: &buf), + minUpdatedAtMillis: FfiConverterOptionUInt64.read(from: &buf) ) } - public static func write(_ value: MultiKeyProofVerificationRecord, into buf: inout [UInt8]) { - FfiConverterBool.write(value.valid, into: &buf) - FfiConverterOptionData.write(value.root, into: &buf) - FfiConverterSequenceTypeKeyProofVerificationRecord.write(value.results, into: &buf) + public static func write(_ value: NamedRootRetentionRecord, into buf: inout [UInt8]) { + FfiConverterTypeNamedRootRetentionKind.write(value.kind, into: &buf) + FfiConverterSequenceData.write(value.names, into: &buf) + FfiConverterData.write(value.prefix, into: &buf) + FfiConverterOptionUInt64.write(value.count, into: &buf) + FfiConverterOptionUInt64.write(value.minUpdatedAtMillis, into: &buf) } } @@ -17623,57 +18242,53 @@ public struct FfiConverterTypeMultiKeyProofVerificationRecord: FfiConverterRustB #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeMultiKeyProofVerificationRecord_lift(_ buf: RustBuffer) throws -> MultiKeyProofVerificationRecord { - return try FfiConverterTypeMultiKeyProofVerificationRecord.lift(buf) +public func FfiConverterTypeNamedRootRetentionRecord_lift(_ buf: RustBuffer) throws -> NamedRootRetentionRecord { + return try FfiConverterTypeNamedRootRetentionRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeMultiKeyProofVerificationRecord_lower(_ value: MultiKeyProofVerificationRecord) -> RustBuffer { - return FfiConverterTypeMultiKeyProofVerificationRecord.lower(value) +public func FfiConverterTypeNamedRootRetentionRecord_lower(_ value: NamedRootRetentionRecord) -> RustBuffer { + return FfiConverterTypeNamedRootRetentionRecord.lower(value) } -public struct MutationRecord: Equatable, Hashable { - public var kind: MutationKind - public var key: Data - public var value: Data? +public struct NamedRootSelectionRecord: Equatable, Hashable { + public var roots: [NamedRootRecord] + public var missingNames: [Data] // Default memberwise initializers are never public by default, so we // declare one manually. - public init(kind: MutationKind, key: Data, value: Data?) { - self.kind = kind - self.key = key - self.value = value + public init(roots: [NamedRootRecord], missingNames: [Data]) { + self.roots = roots + self.missingNames = missingNames } - - + + } #if compiler(>=6) -extension MutationRecord: Sendable {} +extension NamedRootSelectionRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeMutationRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> MutationRecord { +public struct FfiConverterTypeNamedRootSelectionRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> NamedRootSelectionRecord { return - try MutationRecord( - kind: FfiConverterTypeMutationKind.read(from: &buf), - key: FfiConverterData.read(from: &buf), - value: FfiConverterOptionData.read(from: &buf) + try NamedRootSelectionRecord( + roots: FfiConverterSequenceTypeNamedRootRecord.read(from: &buf), + missingNames: FfiConverterSequenceData.read(from: &buf) ) } - public static func write(_ value: MutationRecord, into buf: inout [UInt8]) { - FfiConverterTypeMutationKind.write(value.kind, into: &buf) - FfiConverterData.write(value.key, into: &buf) - FfiConverterOptionData.write(value.value, into: &buf) + public static func write(_ value: NamedRootSelectionRecord, into buf: inout [UInt8]) { + FfiConverterSequenceTypeNamedRootRecord.write(value.roots, into: &buf) + FfiConverterSequenceData.write(value.missingNames, into: &buf) } } @@ -17681,53 +18296,57 @@ public struct FfiConverterTypeMutationRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeMutationRecord_lift(_ buf: RustBuffer) throws -> MutationRecord { - return try FfiConverterTypeMutationRecord.lift(buf) +public func FfiConverterTypeNamedRootSelectionRecord_lift(_ buf: RustBuffer) throws -> NamedRootSelectionRecord { + return try FfiConverterTypeNamedRootSelectionRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeMutationRecord_lower(_ value: MutationRecord) -> RustBuffer { - return FfiConverterTypeMutationRecord.lower(value) +public func FfiConverterTypeNamedRootSelectionRecord_lower(_ value: NamedRootSelectionRecord) -> RustBuffer { + return FfiConverterTypeNamedRootSelectionRecord.lower(value) } -public struct NamedBytesListResultRecord: Equatable, Hashable { - public var values: [NamedBytesRecord] - public var error: StoreErrorRecord? +public struct NamedRootUpdateRecord: Equatable, Hashable { + public var applied: Bool + public var conflict: Bool + public var current: TreeRecord? // Default memberwise initializers are never public by default, so we // declare one manually. - public init(values: [NamedBytesRecord], error: StoreErrorRecord?) { - self.values = values - self.error = error + public init(applied: Bool, conflict: Bool, current: TreeRecord?) { + self.applied = applied + self.conflict = conflict + self.current = current } - - + + } #if compiler(>=6) -extension NamedBytesListResultRecord: Sendable {} +extension NamedRootUpdateRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeNamedBytesListResultRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> NamedBytesListResultRecord { +public struct FfiConverterTypeNamedRootUpdateRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> NamedRootUpdateRecord { return - try NamedBytesListResultRecord( - values: FfiConverterSequenceTypeNamedBytesRecord.read(from: &buf), - error: FfiConverterOptionTypeStoreErrorRecord.read(from: &buf) + try NamedRootUpdateRecord( + applied: FfiConverterBool.read(from: &buf), + conflict: FfiConverterBool.read(from: &buf), + current: FfiConverterOptionTypeTreeRecord.read(from: &buf) ) } - public static func write(_ value: NamedBytesListResultRecord, into buf: inout [UInt8]) { - FfiConverterSequenceTypeNamedBytesRecord.write(value.values, into: &buf) - FfiConverterOptionTypeStoreErrorRecord.write(value.error, into: &buf) + public static func write(_ value: NamedRootUpdateRecord, into buf: inout [UInt8]) { + FfiConverterBool.write(value.applied, into: &buf) + FfiConverterBool.write(value.conflict, into: &buf) + FfiConverterOptionTypeTreeRecord.write(value.current, into: &buf) } } @@ -17735,52 +18354,52 @@ public struct FfiConverterTypeNamedBytesListResultRecord: FfiConverterRustBuffer #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeNamedBytesListResultRecord_lift(_ buf: RustBuffer) throws -> NamedBytesListResultRecord { - return try FfiConverterTypeNamedBytesListResultRecord.lift(buf) +public func FfiConverterTypeNamedRootUpdateRecord_lift(_ buf: RustBuffer) throws -> NamedRootUpdateRecord { + return try FfiConverterTypeNamedRootUpdateRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeNamedBytesListResultRecord_lower(_ value: NamedBytesListResultRecord) -> RustBuffer { - return FfiConverterTypeNamedBytesListResultRecord.lower(value) +public func FfiConverterTypeNamedRootUpdateRecord_lower(_ value: NamedRootUpdateRecord) -> RustBuffer { + return FfiConverterTypeNamedRootUpdateRecord.lower(value) } -public struct NamedBytesRecord: Equatable, Hashable { - public var name: Data +public struct NodeEntryRecord: Equatable, Hashable { + public var key: Data public var value: Data // Default memberwise initializers are never public by default, so we // declare one manually. - public init(name: Data, value: Data) { - self.name = name + public init(key: Data, value: Data) { + self.key = key self.value = value } - - + + } #if compiler(>=6) -extension NamedBytesRecord: Sendable {} +extension NodeEntryRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeNamedBytesRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> NamedBytesRecord { +public struct FfiConverterTypeNodeEntryRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> NodeEntryRecord { return - try NamedBytesRecord( - name: FfiConverterData.read(from: &buf), + try NodeEntryRecord( + key: FfiConverterData.read(from: &buf), value: FfiConverterData.read(from: &buf) ) } - public static func write(_ value: NamedBytesRecord, into buf: inout [UInt8]) { - FfiConverterData.write(value.name, into: &buf) + public static func write(_ value: NodeEntryRecord, into buf: inout [UInt8]) { + FfiConverterData.write(value.key, into: &buf) FfiConverterData.write(value.value, into: &buf) } } @@ -17789,53 +18408,53 @@ public struct FfiConverterTypeNamedBytesRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeNamedBytesRecord_lift(_ buf: RustBuffer) throws -> NamedBytesRecord { - return try FfiConverterTypeNamedBytesRecord.lift(buf) +public func FfiConverterTypeNodeEntryRecord_lift(_ buf: RustBuffer) throws -> NodeEntryRecord { + return try FfiConverterTypeNodeEntryRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeNamedBytesRecord_lower(_ value: NamedBytesRecord) -> RustBuffer { - return FfiConverterTypeNamedBytesRecord.lower(value) +public func FfiConverterTypeNodeEntryRecord_lower(_ value: NodeEntryRecord) -> RustBuffer { + return FfiConverterTypeNodeEntryRecord.lower(value) } -public struct NamedRootManifestRecord: Equatable, Hashable { - public var name: Data - public var manifest: RootManifestRecord +public struct NodeMutationRecord: Equatable, Hashable { + public var key: Data + public var value: OptionalBytesRecord // Default memberwise initializers are never public by default, so we // declare one manually. - public init(name: Data, manifest: RootManifestRecord) { - self.name = name - self.manifest = manifest + public init(key: Data, value: OptionalBytesRecord) { + self.key = key + self.value = value } - - + + } #if compiler(>=6) -extension NamedRootManifestRecord: Sendable {} +extension NodeMutationRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeNamedRootManifestRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> NamedRootManifestRecord { +public struct FfiConverterTypeNodeMutationRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> NodeMutationRecord { return - try NamedRootManifestRecord( - name: FfiConverterData.read(from: &buf), - manifest: FfiConverterTypeRootManifestRecord.read(from: &buf) + try NodeMutationRecord( + key: FfiConverterData.read(from: &buf), + value: FfiConverterTypeOptionalBytesRecord.read(from: &buf) ) } - public static func write(_ value: NamedRootManifestRecord, into buf: inout [UInt8]) { - FfiConverterData.write(value.name, into: &buf) - FfiConverterTypeRootManifestRecord.write(value.manifest, into: &buf) + public static func write(_ value: NodeMutationRecord, into buf: inout [UInt8]) { + FfiConverterData.write(value.key, into: &buf) + FfiConverterTypeOptionalBytesRecord.write(value.value, into: &buf) } } @@ -17843,53 +18462,57 @@ public struct FfiConverterTypeNamedRootManifestRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeNamedRootManifestRecord_lift(_ buf: RustBuffer) throws -> NamedRootManifestRecord { - return try FfiConverterTypeNamedRootManifestRecord.lift(buf) +public func FfiConverterTypeNodeMutationRecord_lift(_ buf: RustBuffer) throws -> NodeMutationRecord { + return try FfiConverterTypeNodeMutationRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeNamedRootManifestRecord_lower(_ value: NamedRootManifestRecord) -> RustBuffer { - return FfiConverterTypeNamedRootManifestRecord.lower(value) +public func FfiConverterTypeNodeMutationRecord_lower(_ value: NodeMutationRecord) -> RustBuffer { + return FfiConverterTypeNodeMutationRecord.lower(value) } -public struct NamedRootRecord: Equatable, Hashable { - public var name: Data - public var tree: TreeRecord +public struct NodePublicationHintRecord: Equatable, Hashable { + public var namespace: Data + public var key: Data + public var value: Data // Default memberwise initializers are never public by default, so we // declare one manually. - public init(name: Data, tree: TreeRecord) { - self.name = name - self.tree = tree + public init(namespace: Data, key: Data, value: Data) { + self.namespace = namespace + self.key = key + self.value = value } - - + + } #if compiler(>=6) -extension NamedRootRecord: Sendable {} +extension NodePublicationHintRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeNamedRootRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> NamedRootRecord { +public struct FfiConverterTypeNodePublicationHintRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> NodePublicationHintRecord { return - try NamedRootRecord( - name: FfiConverterData.read(from: &buf), - tree: FfiConverterTypeTreeRecord.read(from: &buf) + try NodePublicationHintRecord( + namespace: FfiConverterData.read(from: &buf), + key: FfiConverterData.read(from: &buf), + value: FfiConverterData.read(from: &buf) ) } - public static func write(_ value: NamedRootRecord, into buf: inout [UInt8]) { - FfiConverterData.write(value.name, into: &buf) - FfiConverterTypeTreeRecord.write(value.tree, into: &buf) + public static func write(_ value: NodePublicationHintRecord, into buf: inout [UInt8]) { + FfiConverterData.write(value.namespace, into: &buf) + FfiConverterData.write(value.key, into: &buf) + FfiConverterData.write(value.value, into: &buf) } } @@ -17897,65 +18520,57 @@ public struct FfiConverterTypeNamedRootRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeNamedRootRecord_lift(_ buf: RustBuffer) throws -> NamedRootRecord { - return try FfiConverterTypeNamedRootRecord.lift(buf) +public func FfiConverterTypeNodePublicationHintRecord_lift(_ buf: RustBuffer) throws -> NodePublicationHintRecord { + return try FfiConverterTypeNodePublicationHintRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeNamedRootRecord_lower(_ value: NamedRootRecord) -> RustBuffer { - return FfiConverterTypeNamedRootRecord.lower(value) +public func FfiConverterTypeNodePublicationHintRecord_lower(_ value: NodePublicationHintRecord) -> RustBuffer { + return FfiConverterTypeNodePublicationHintRecord.lower(value) } -public struct NamedRootRetentionRecord: Equatable, Hashable { - public var kind: NamedRootRetentionKind - public var names: [Data] - public var prefix: Data - public var count: UInt64? - public var minUpdatedAtMillis: UInt64? +public struct NodePublicationRecord: Equatable, Hashable { + public var nodes: [NodeEntryRecord] + public var hint: NodePublicationHintRecord? + public var origin: PublicationOriginRecord // Default memberwise initializers are never public by default, so we // declare one manually. - public init(kind: NamedRootRetentionKind, names: [Data], prefix: Data, count: UInt64?, minUpdatedAtMillis: UInt64?) { - self.kind = kind - self.names = names - self.prefix = prefix - self.count = count - self.minUpdatedAtMillis = minUpdatedAtMillis + public init(nodes: [NodeEntryRecord], hint: NodePublicationHintRecord?, origin: PublicationOriginRecord) { + self.nodes = nodes + self.hint = hint + self.origin = origin } - - + + } #if compiler(>=6) -extension NamedRootRetentionRecord: Sendable {} +extension NodePublicationRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeNamedRootRetentionRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> NamedRootRetentionRecord { +public struct FfiConverterTypeNodePublicationRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> NodePublicationRecord { return - try NamedRootRetentionRecord( - kind: FfiConverterTypeNamedRootRetentionKind.read(from: &buf), - names: FfiConverterSequenceData.read(from: &buf), - prefix: FfiConverterData.read(from: &buf), - count: FfiConverterOptionUInt64.read(from: &buf), - minUpdatedAtMillis: FfiConverterOptionUInt64.read(from: &buf) + try NodePublicationRecord( + nodes: FfiConverterSequenceTypeNodeEntryRecord.read(from: &buf), + hint: FfiConverterOptionTypeNodePublicationHintRecord.read(from: &buf), + origin: FfiConverterTypePublicationOriginRecord.read(from: &buf) ) } - public static func write(_ value: NamedRootRetentionRecord, into buf: inout [UInt8]) { - FfiConverterTypeNamedRootRetentionKind.write(value.kind, into: &buf) - FfiConverterSequenceData.write(value.names, into: &buf) - FfiConverterData.write(value.prefix, into: &buf) - FfiConverterOptionUInt64.write(value.count, into: &buf) - FfiConverterOptionUInt64.write(value.minUpdatedAtMillis, into: &buf) + public static func write(_ value: NodePublicationRecord, into buf: inout [UInt8]) { + FfiConverterSequenceTypeNodeEntryRecord.write(value.nodes, into: &buf) + FfiConverterOptionTypeNodePublicationHintRecord.write(value.hint, into: &buf) + FfiConverterTypePublicationOriginRecord.write(value.origin, into: &buf) } } @@ -17963,53 +18578,89 @@ public struct FfiConverterTypeNamedRootRetentionRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeNamedRootRetentionRecord_lift(_ buf: RustBuffer) throws -> NamedRootRetentionRecord { - return try FfiConverterTypeNamedRootRetentionRecord.lift(buf) +public func FfiConverterTypeNodePublicationRecord_lift(_ buf: RustBuffer) throws -> NodePublicationRecord { + return try FfiConverterTypeNodePublicationRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeNamedRootRetentionRecord_lower(_ value: NamedRootRetentionRecord) -> RustBuffer { - return FfiConverterTypeNamedRootRetentionRecord.lower(value) +public func FfiConverterTypeNodePublicationRecord_lower(_ value: NodePublicationRecord) -> RustBuffer { + return FfiConverterTypeNodePublicationRecord.lower(value) } -public struct NamedRootSelectionRecord: Equatable, Hashable { - public var roots: [NamedRootRecord] - public var missingNames: [Data] +public struct NodeRecord: Equatable, Hashable { + public var keys: [Data] + public var vals: [Data] + public var childCounts: [UInt64] + public var leaf: Bool + public var level: UInt8 + public var minChunkSize: UInt64 + public var maxChunkSize: UInt64 + public var chunkingFactor: UInt32 + public var hashSeed: UInt64 + public var encoding: EncodingRecord + public var formatBytes: Data? // Default memberwise initializers are never public by default, so we // declare one manually. - public init(roots: [NamedRootRecord], missingNames: [Data]) { - self.roots = roots - self.missingNames = missingNames + public init(keys: [Data], vals: [Data], childCounts: [UInt64], leaf: Bool, level: UInt8, minChunkSize: UInt64, maxChunkSize: UInt64, chunkingFactor: UInt32, hashSeed: UInt64, encoding: EncodingRecord, formatBytes: Data?) { + self.keys = keys + self.vals = vals + self.childCounts = childCounts + self.leaf = leaf + self.level = level + self.minChunkSize = minChunkSize + self.maxChunkSize = maxChunkSize + self.chunkingFactor = chunkingFactor + self.hashSeed = hashSeed + self.encoding = encoding + self.formatBytes = formatBytes } - - + + } #if compiler(>=6) -extension NamedRootSelectionRecord: Sendable {} +extension NodeRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeNamedRootSelectionRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> NamedRootSelectionRecord { +public struct FfiConverterTypeNodeRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> NodeRecord { return - try NamedRootSelectionRecord( - roots: FfiConverterSequenceTypeNamedRootRecord.read(from: &buf), - missingNames: FfiConverterSequenceData.read(from: &buf) + try NodeRecord( + keys: FfiConverterSequenceData.read(from: &buf), + vals: FfiConverterSequenceData.read(from: &buf), + childCounts: FfiConverterSequenceUInt64.read(from: &buf), + leaf: FfiConverterBool.read(from: &buf), + level: FfiConverterUInt8.read(from: &buf), + minChunkSize: FfiConverterUInt64.read(from: &buf), + maxChunkSize: FfiConverterUInt64.read(from: &buf), + chunkingFactor: FfiConverterUInt32.read(from: &buf), + hashSeed: FfiConverterUInt64.read(from: &buf), + encoding: FfiConverterTypeEncodingRecord.read(from: &buf), + formatBytes: FfiConverterOptionData.read(from: &buf) ) } - public static func write(_ value: NamedRootSelectionRecord, into buf: inout [UInt8]) { - FfiConverterSequenceTypeNamedRootRecord.write(value.roots, into: &buf) - FfiConverterSequenceData.write(value.missingNames, into: &buf) + public static func write(_ value: NodeRecord, into buf: inout [UInt8]) { + FfiConverterSequenceData.write(value.keys, into: &buf) + FfiConverterSequenceData.write(value.vals, into: &buf) + FfiConverterSequenceUInt64.write(value.childCounts, into: &buf) + FfiConverterBool.write(value.leaf, into: &buf) + FfiConverterUInt8.write(value.level, into: &buf) + FfiConverterUInt64.write(value.minChunkSize, into: &buf) + FfiConverterUInt64.write(value.maxChunkSize, into: &buf) + FfiConverterUInt32.write(value.chunkingFactor, into: &buf) + FfiConverterUInt64.write(value.hashSeed, into: &buf) + FfiConverterTypeEncodingRecord.write(value.encoding, into: &buf) + FfiConverterOptionData.write(value.formatBytes, into: &buf) } } @@ -18017,57 +18668,53 @@ public struct FfiConverterTypeNamedRootSelectionRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeNamedRootSelectionRecord_lift(_ buf: RustBuffer) throws -> NamedRootSelectionRecord { - return try FfiConverterTypeNamedRootSelectionRecord.lift(buf) +public func FfiConverterTypeNodeRecord_lift(_ buf: RustBuffer) throws -> NodeRecord { + return try FfiConverterTypeNodeRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeNamedRootSelectionRecord_lower(_ value: NamedRootSelectionRecord) -> RustBuffer { - return FfiConverterTypeNamedRootSelectionRecord.lower(value) +public func FfiConverterTypeNodeRecord_lower(_ value: NodeRecord) -> RustBuffer { + return FfiConverterTypeNodeRecord.lower(value) } -public struct NamedRootUpdateRecord: Equatable, Hashable { - public var applied: Bool - public var conflict: Bool - public var current: TreeRecord? +public struct OptionalBytesListResultRecord: Equatable, Hashable { + public var values: [OptionalBytesRecord] + public var error: StoreErrorRecord? // Default memberwise initializers are never public by default, so we // declare one manually. - public init(applied: Bool, conflict: Bool, current: TreeRecord?) { - self.applied = applied - self.conflict = conflict - self.current = current + public init(values: [OptionalBytesRecord], error: StoreErrorRecord?) { + self.values = values + self.error = error } - - + + } #if compiler(>=6) -extension NamedRootUpdateRecord: Sendable {} +extension OptionalBytesListResultRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeNamedRootUpdateRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> NamedRootUpdateRecord { +public struct FfiConverterTypeOptionalBytesListResultRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> OptionalBytesListResultRecord { return - try NamedRootUpdateRecord( - applied: FfiConverterBool.read(from: &buf), - conflict: FfiConverterBool.read(from: &buf), - current: FfiConverterOptionTypeTreeRecord.read(from: &buf) + try OptionalBytesListResultRecord( + values: FfiConverterSequenceTypeOptionalBytesRecord.read(from: &buf), + error: FfiConverterOptionTypeStoreErrorRecord.read(from: &buf) ) } - public static func write(_ value: NamedRootUpdateRecord, into buf: inout [UInt8]) { - FfiConverterBool.write(value.applied, into: &buf) - FfiConverterBool.write(value.conflict, into: &buf) - FfiConverterOptionTypeTreeRecord.write(value.current, into: &buf) + public static func write(_ value: OptionalBytesListResultRecord, into buf: inout [UInt8]) { + FfiConverterSequenceTypeOptionalBytesRecord.write(value.values, into: &buf) + FfiConverterOptionTypeStoreErrorRecord.write(value.error, into: &buf) } } @@ -18075,52 +18722,52 @@ public struct FfiConverterTypeNamedRootUpdateRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeNamedRootUpdateRecord_lift(_ buf: RustBuffer) throws -> NamedRootUpdateRecord { - return try FfiConverterTypeNamedRootUpdateRecord.lift(buf) +public func FfiConverterTypeOptionalBytesListResultRecord_lift(_ buf: RustBuffer) throws -> OptionalBytesListResultRecord { + return try FfiConverterTypeOptionalBytesListResultRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeNamedRootUpdateRecord_lower(_ value: NamedRootUpdateRecord) -> RustBuffer { - return FfiConverterTypeNamedRootUpdateRecord.lower(value) +public func FfiConverterTypeOptionalBytesListResultRecord_lower(_ value: OptionalBytesListResultRecord) -> RustBuffer { + return FfiConverterTypeOptionalBytesListResultRecord.lower(value) } -public struct NodeEntryRecord: Equatable, Hashable { - public var key: Data +public struct OptionalBytesRecord: Equatable, Hashable { + public var present: Bool public var value: Data // Default memberwise initializers are never public by default, so we // declare one manually. - public init(key: Data, value: Data) { - self.key = key + public init(present: Bool, value: Data) { + self.present = present self.value = value } - - + + } #if compiler(>=6) -extension NodeEntryRecord: Sendable {} +extension OptionalBytesRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeNodeEntryRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> NodeEntryRecord { +public struct FfiConverterTypeOptionalBytesRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> OptionalBytesRecord { return - try NodeEntryRecord( - key: FfiConverterData.read(from: &buf), + try OptionalBytesRecord( + present: FfiConverterBool.read(from: &buf), value: FfiConverterData.read(from: &buf) ) } - public static func write(_ value: NodeEntryRecord, into buf: inout [UInt8]) { - FfiConverterData.write(value.key, into: &buf) + public static func write(_ value: OptionalBytesRecord, into buf: inout [UInt8]) { + FfiConverterBool.write(value.present, into: &buf) FfiConverterData.write(value.value, into: &buf) } } @@ -18129,53 +18776,53 @@ public struct FfiConverterTypeNodeEntryRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeNodeEntryRecord_lift(_ buf: RustBuffer) throws -> NodeEntryRecord { - return try FfiConverterTypeNodeEntryRecord.lift(buf) +public func FfiConverterTypeOptionalBytesRecord_lift(_ buf: RustBuffer) throws -> OptionalBytesRecord { + return try FfiConverterTypeOptionalBytesRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeNodeEntryRecord_lower(_ value: NodeEntryRecord) -> RustBuffer { - return FfiConverterTypeNodeEntryRecord.lower(value) +public func FfiConverterTypeOptionalBytesRecord_lower(_ value: OptionalBytesRecord) -> RustBuffer { + return FfiConverterTypeOptionalBytesRecord.lower(value) } -public struct NodeMutationRecord: Equatable, Hashable { - public var key: Data +public struct OptionalBytesResultRecord: Equatable, Hashable { public var value: OptionalBytesRecord + public var error: StoreErrorRecord? // Default memberwise initializers are never public by default, so we // declare one manually. - public init(key: Data, value: OptionalBytesRecord) { - self.key = key + public init(value: OptionalBytesRecord, error: StoreErrorRecord?) { self.value = value + self.error = error } - - + + } #if compiler(>=6) -extension NodeMutationRecord: Sendable {} +extension OptionalBytesResultRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeNodeMutationRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> NodeMutationRecord { +public struct FfiConverterTypeOptionalBytesResultRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> OptionalBytesResultRecord { return - try NodeMutationRecord( - key: FfiConverterData.read(from: &buf), - value: FfiConverterTypeOptionalBytesRecord.read(from: &buf) + try OptionalBytesResultRecord( + value: FfiConverterTypeOptionalBytesRecord.read(from: &buf), + error: FfiConverterOptionTypeStoreErrorRecord.read(from: &buf) ) } - public static func write(_ value: NodeMutationRecord, into buf: inout [UInt8]) { - FfiConverterData.write(value.key, into: &buf) + public static func write(_ value: OptionalBytesResultRecord, into buf: inout [UInt8]) { FfiConverterTypeOptionalBytesRecord.write(value.value, into: &buf) + FfiConverterOptionTypeStoreErrorRecord.write(value.error, into: &buf) } } @@ -18183,29 +18830,27 @@ public struct FfiConverterTypeNodeMutationRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeNodeMutationRecord_lift(_ buf: RustBuffer) throws -> NodeMutationRecord { - return try FfiConverterTypeNodeMutationRecord.lift(buf) +public func FfiConverterTypeOptionalBytesResultRecord_lift(_ buf: RustBuffer) throws -> OptionalBytesResultRecord { + return try FfiConverterTypeOptionalBytesResultRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeNodeMutationRecord_lower(_ value: NodeMutationRecord) -> RustBuffer { - return FfiConverterTypeNodeMutationRecord.lower(value) +public func FfiConverterTypeOptionalBytesResultRecord_lower(_ value: OptionalBytesResultRecord) -> RustBuffer { + return FfiConverterTypeOptionalBytesResultRecord.lower(value) } -public struct NodePublicationHintRecord: Equatable, Hashable { - public var namespace: Data - public var key: Data - public var value: Data +public struct ParallelConfigRecord: Equatable, Hashable { + public var maxThreads: UInt64 + public var parallelismThreshold: UInt64 // Default memberwise initializers are never public by default, so we // declare one manually. - public init(namespace: Data, key: Data, value: Data) { - self.namespace = namespace - self.key = key - self.value = value + public init(maxThreads: UInt64, parallelismThreshold: UInt64) { + self.maxThreads = maxThreads + self.parallelismThreshold = parallelismThreshold } @@ -18214,26 +18859,24 @@ public struct NodePublicationHintRecord: Equatable, Hashable { } #if compiler(>=6) -extension NodePublicationHintRecord: Sendable {} +extension ParallelConfigRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) -#endif -public struct FfiConverterTypeNodePublicationHintRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> NodePublicationHintRecord { +#endif +public struct FfiConverterTypeParallelConfigRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ParallelConfigRecord { return - try NodePublicationHintRecord( - namespace: FfiConverterData.read(from: &buf), - key: FfiConverterData.read(from: &buf), - value: FfiConverterData.read(from: &buf) + try ParallelConfigRecord( + maxThreads: FfiConverterUInt64.read(from: &buf), + parallelismThreshold: FfiConverterUInt64.read(from: &buf) ) } - public static func write(_ value: NodePublicationHintRecord, into buf: inout [UInt8]) { - FfiConverterData.write(value.namespace, into: &buf) - FfiConverterData.write(value.key, into: &buf) - FfiConverterData.write(value.value, into: &buf) + public static func write(_ value: ParallelConfigRecord, into buf: inout [UInt8]) { + FfiConverterUInt64.write(value.maxThreads, into: &buf) + FfiConverterUInt64.write(value.parallelismThreshold, into: &buf) } } @@ -18241,29 +18884,35 @@ public struct FfiConverterTypeNodePublicationHintRecord: FfiConverterRustBuffer #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeNodePublicationHintRecord_lift(_ buf: RustBuffer) throws -> NodePublicationHintRecord { - return try FfiConverterTypeNodePublicationHintRecord.lift(buf) +public func FfiConverterTypeParallelConfigRecord_lift(_ buf: RustBuffer) throws -> ParallelConfigRecord { + return try FfiConverterTypeParallelConfigRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeNodePublicationHintRecord_lower(_ value: NodePublicationHintRecord) -> RustBuffer { - return FfiConverterTypeNodePublicationHintRecord.lower(value) +public func FfiConverterTypeParallelConfigRecord_lower(_ value: ParallelConfigRecord) -> RustBuffer { + return FfiConverterTypeParallelConfigRecord.lower(value) } -public struct NodePublicationRecord: Equatable, Hashable { - public var nodes: [NodeEntryRecord] - public var hint: NodePublicationHintRecord? - public var origin: PublicationOriginRecord +public struct ProductQuantizationBuildLimitsRecord: Equatable, Hashable { + public var maxTrainingVectors: UInt64? + public var maxTrainingBytes: UInt64? + public var maxTemporaryCodeBytes: UInt64? + public var maxDistanceEvaluations: UInt64? + public var maxEncodedOutputBytes: UInt64? + public var maxWorkerThreads: UInt64? // Default memberwise initializers are never public by default, so we // declare one manually. - public init(nodes: [NodeEntryRecord], hint: NodePublicationHintRecord?, origin: PublicationOriginRecord) { - self.nodes = nodes - self.hint = hint - self.origin = origin + public init(maxTrainingVectors: UInt64?, maxTrainingBytes: UInt64?, maxTemporaryCodeBytes: UInt64?, maxDistanceEvaluations: UInt64?, maxEncodedOutputBytes: UInt64?, maxWorkerThreads: UInt64?) { + self.maxTrainingVectors = maxTrainingVectors + self.maxTrainingBytes = maxTrainingBytes + self.maxTemporaryCodeBytes = maxTemporaryCodeBytes + self.maxDistanceEvaluations = maxDistanceEvaluations + self.maxEncodedOutputBytes = maxEncodedOutputBytes + self.maxWorkerThreads = maxWorkerThreads } @@ -18272,26 +18921,32 @@ public struct NodePublicationRecord: Equatable, Hashable { } #if compiler(>=6) -extension NodePublicationRecord: Sendable {} +extension ProductQuantizationBuildLimitsRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeNodePublicationRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> NodePublicationRecord { +public struct FfiConverterTypeProductQuantizationBuildLimitsRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ProductQuantizationBuildLimitsRecord { return - try NodePublicationRecord( - nodes: FfiConverterSequenceTypeNodeEntryRecord.read(from: &buf), - hint: FfiConverterOptionTypeNodePublicationHintRecord.read(from: &buf), - origin: FfiConverterTypePublicationOriginRecord.read(from: &buf) + try ProductQuantizationBuildLimitsRecord( + maxTrainingVectors: FfiConverterOptionUInt64.read(from: &buf), + maxTrainingBytes: FfiConverterOptionUInt64.read(from: &buf), + maxTemporaryCodeBytes: FfiConverterOptionUInt64.read(from: &buf), + maxDistanceEvaluations: FfiConverterOptionUInt64.read(from: &buf), + maxEncodedOutputBytes: FfiConverterOptionUInt64.read(from: &buf), + maxWorkerThreads: FfiConverterOptionUInt64.read(from: &buf) ) } - public static func write(_ value: NodePublicationRecord, into buf: inout [UInt8]) { - FfiConverterSequenceTypeNodeEntryRecord.write(value.nodes, into: &buf) - FfiConverterOptionTypeNodePublicationHintRecord.write(value.hint, into: &buf) - FfiConverterTypePublicationOriginRecord.write(value.origin, into: &buf) + public static func write(_ value: ProductQuantizationBuildLimitsRecord, into buf: inout [UInt8]) { + FfiConverterOptionUInt64.write(value.maxTrainingVectors, into: &buf) + FfiConverterOptionUInt64.write(value.maxTrainingBytes, into: &buf) + FfiConverterOptionUInt64.write(value.maxTemporaryCodeBytes, into: &buf) + FfiConverterOptionUInt64.write(value.maxDistanceEvaluations, into: &buf) + FfiConverterOptionUInt64.write(value.maxEncodedOutputBytes, into: &buf) + FfiConverterOptionUInt64.write(value.maxWorkerThreads, into: &buf) } } @@ -18299,89 +18954,53 @@ public struct FfiConverterTypeNodePublicationRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeNodePublicationRecord_lift(_ buf: RustBuffer) throws -> NodePublicationRecord { - return try FfiConverterTypeNodePublicationRecord.lift(buf) +public func FfiConverterTypeProductQuantizationBuildLimitsRecord_lift(_ buf: RustBuffer) throws -> ProductQuantizationBuildLimitsRecord { + return try FfiConverterTypeProductQuantizationBuildLimitsRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeNodePublicationRecord_lower(_ value: NodePublicationRecord) -> RustBuffer { - return FfiConverterTypeNodePublicationRecord.lower(value) +public func FfiConverterTypeProductQuantizationBuildLimitsRecord_lower(_ value: ProductQuantizationBuildLimitsRecord) -> RustBuffer { + return FfiConverterTypeProductQuantizationBuildLimitsRecord.lower(value) } -public struct NodeRecord: Equatable, Hashable { - public var keys: [Data] - public var vals: [Data] - public var childCounts: [UInt64] - public var leaf: Bool - public var level: UInt8 - public var minChunkSize: UInt64 - public var maxChunkSize: UInt64 - public var chunkingFactor: UInt32 - public var hashSeed: UInt64 - public var encoding: EncodingRecord - public var formatBytes: Data? +public struct ProductQuantizationBuildResultRecord { + public var index: BindingProductQuantizer + public var stats: ProductQuantizationBuildStatsRecord // Default memberwise initializers are never public by default, so we // declare one manually. - public init(keys: [Data], vals: [Data], childCounts: [UInt64], leaf: Bool, level: UInt8, minChunkSize: UInt64, maxChunkSize: UInt64, chunkingFactor: UInt32, hashSeed: UInt64, encoding: EncodingRecord, formatBytes: Data?) { - self.keys = keys - self.vals = vals - self.childCounts = childCounts - self.leaf = leaf - self.level = level - self.minChunkSize = minChunkSize - self.maxChunkSize = maxChunkSize - self.chunkingFactor = chunkingFactor - self.hashSeed = hashSeed - self.encoding = encoding - self.formatBytes = formatBytes + public init(index: BindingProductQuantizer, stats: ProductQuantizationBuildStatsRecord) { + self.index = index + self.stats = stats } - - + + } #if compiler(>=6) -extension NodeRecord: Sendable {} +extension ProductQuantizationBuildResultRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeNodeRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> NodeRecord { +public struct FfiConverterTypeProductQuantizationBuildResultRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ProductQuantizationBuildResultRecord { return - try NodeRecord( - keys: FfiConverterSequenceData.read(from: &buf), - vals: FfiConverterSequenceData.read(from: &buf), - childCounts: FfiConverterSequenceUInt64.read(from: &buf), - leaf: FfiConverterBool.read(from: &buf), - level: FfiConverterUInt8.read(from: &buf), - minChunkSize: FfiConverterUInt64.read(from: &buf), - maxChunkSize: FfiConverterUInt64.read(from: &buf), - chunkingFactor: FfiConverterUInt32.read(from: &buf), - hashSeed: FfiConverterUInt64.read(from: &buf), - encoding: FfiConverterTypeEncodingRecord.read(from: &buf), - formatBytes: FfiConverterOptionData.read(from: &buf) + try ProductQuantizationBuildResultRecord( + index: FfiConverterTypeBindingProductQuantizer.read(from: &buf), + stats: FfiConverterTypeProductQuantizationBuildStatsRecord.read(from: &buf) ) } - public static func write(_ value: NodeRecord, into buf: inout [UInt8]) { - FfiConverterSequenceData.write(value.keys, into: &buf) - FfiConverterSequenceData.write(value.vals, into: &buf) - FfiConverterSequenceUInt64.write(value.childCounts, into: &buf) - FfiConverterBool.write(value.leaf, into: &buf) - FfiConverterUInt8.write(value.level, into: &buf) - FfiConverterUInt64.write(value.minChunkSize, into: &buf) - FfiConverterUInt64.write(value.maxChunkSize, into: &buf) - FfiConverterUInt32.write(value.chunkingFactor, into: &buf) - FfiConverterUInt64.write(value.hashSeed, into: &buf) - FfiConverterTypeEncodingRecord.write(value.encoding, into: &buf) - FfiConverterOptionData.write(value.formatBytes, into: &buf) + public static func write(_ value: ProductQuantizationBuildResultRecord, into buf: inout [UInt8]) { + FfiConverterTypeBindingProductQuantizer.write(value.index, into: &buf) + FfiConverterTypeProductQuantizationBuildStatsRecord.write(value.stats, into: &buf) } } @@ -18389,53 +19008,69 @@ public struct FfiConverterTypeNodeRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeNodeRecord_lift(_ buf: RustBuffer) throws -> NodeRecord { - return try FfiConverterTypeNodeRecord.lift(buf) +public func FfiConverterTypeProductQuantizationBuildResultRecord_lift(_ buf: RustBuffer) throws -> ProductQuantizationBuildResultRecord { + return try FfiConverterTypeProductQuantizationBuildResultRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeNodeRecord_lower(_ value: NodeRecord) -> RustBuffer { - return FfiConverterTypeNodeRecord.lower(value) +public func FfiConverterTypeProductQuantizationBuildResultRecord_lower(_ value: ProductQuantizationBuildResultRecord) -> RustBuffer { + return FfiConverterTypeProductQuantizationBuildResultRecord.lower(value) } -public struct OptionalBytesListResultRecord: Equatable, Hashable { - public var values: [OptionalBytesRecord] - public var error: StoreErrorRecord? +public struct ProductQuantizationBuildStatsRecord: Equatable, Hashable { + public var trainingDistanceEvaluations: UInt64 + public var encodingDistanceEvaluations: UInt64 + public var encodedVectors: UInt64 + public var trainingVectors: UInt64 + public var trainingBytes: UInt64 + public var encodedOutputBytes: UInt64 // Default memberwise initializers are never public by default, so we // declare one manually. - public init(values: [OptionalBytesRecord], error: StoreErrorRecord?) { - self.values = values - self.error = error + public init(trainingDistanceEvaluations: UInt64, encodingDistanceEvaluations: UInt64, encodedVectors: UInt64, trainingVectors: UInt64, trainingBytes: UInt64, encodedOutputBytes: UInt64) { + self.trainingDistanceEvaluations = trainingDistanceEvaluations + self.encodingDistanceEvaluations = encodingDistanceEvaluations + self.encodedVectors = encodedVectors + self.trainingVectors = trainingVectors + self.trainingBytes = trainingBytes + self.encodedOutputBytes = encodedOutputBytes } - - + + } #if compiler(>=6) -extension OptionalBytesListResultRecord: Sendable {} +extension ProductQuantizationBuildStatsRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeOptionalBytesListResultRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> OptionalBytesListResultRecord { +public struct FfiConverterTypeProductQuantizationBuildStatsRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ProductQuantizationBuildStatsRecord { return - try OptionalBytesListResultRecord( - values: FfiConverterSequenceTypeOptionalBytesRecord.read(from: &buf), - error: FfiConverterOptionTypeStoreErrorRecord.read(from: &buf) + try ProductQuantizationBuildStatsRecord( + trainingDistanceEvaluations: FfiConverterUInt64.read(from: &buf), + encodingDistanceEvaluations: FfiConverterUInt64.read(from: &buf), + encodedVectors: FfiConverterUInt64.read(from: &buf), + trainingVectors: FfiConverterUInt64.read(from: &buf), + trainingBytes: FfiConverterUInt64.read(from: &buf), + encodedOutputBytes: FfiConverterUInt64.read(from: &buf) ) } - public static func write(_ value: OptionalBytesListResultRecord, into buf: inout [UInt8]) { - FfiConverterSequenceTypeOptionalBytesRecord.write(value.values, into: &buf) - FfiConverterOptionTypeStoreErrorRecord.write(value.error, into: &buf) + public static func write(_ value: ProductQuantizationBuildStatsRecord, into buf: inout [UInt8]) { + FfiConverterUInt64.write(value.trainingDistanceEvaluations, into: &buf) + FfiConverterUInt64.write(value.encodingDistanceEvaluations, into: &buf) + FfiConverterUInt64.write(value.encodedVectors, into: &buf) + FfiConverterUInt64.write(value.trainingVectors, into: &buf) + FfiConverterUInt64.write(value.trainingBytes, into: &buf) + FfiConverterUInt64.write(value.encodedOutputBytes, into: &buf) } } @@ -18443,53 +19078,69 @@ public struct FfiConverterTypeOptionalBytesListResultRecord: FfiConverterRustBuf #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeOptionalBytesListResultRecord_lift(_ buf: RustBuffer) throws -> OptionalBytesListResultRecord { - return try FfiConverterTypeOptionalBytesListResultRecord.lift(buf) +public func FfiConverterTypeProductQuantizationBuildStatsRecord_lift(_ buf: RustBuffer) throws -> ProductQuantizationBuildStatsRecord { + return try FfiConverterTypeProductQuantizationBuildStatsRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeOptionalBytesListResultRecord_lower(_ value: OptionalBytesListResultRecord) -> RustBuffer { - return FfiConverterTypeOptionalBytesListResultRecord.lower(value) +public func FfiConverterTypeProductQuantizationBuildStatsRecord_lower(_ value: ProductQuantizationBuildStatsRecord) -> RustBuffer { + return FfiConverterTypeProductQuantizationBuildStatsRecord.lower(value) } -public struct OptionalBytesRecord: Equatable, Hashable { - public var present: Bool - public var value: Data +public struct ProductQuantizationConfigRecord: Equatable, Hashable { + public var subquantizers: UInt32 + public var centroidsPerSubquantizer: UInt16 + public var trainingIterations: UInt16 + public var rerankMultiplier: UInt32 + public var seed: UInt64 + public var maxTrainingVectors: UInt64 // Default memberwise initializers are never public by default, so we // declare one manually. - public init(present: Bool, value: Data) { - self.present = present - self.value = value + public init(subquantizers: UInt32, centroidsPerSubquantizer: UInt16, trainingIterations: UInt16, rerankMultiplier: UInt32, seed: UInt64, maxTrainingVectors: UInt64) { + self.subquantizers = subquantizers + self.centroidsPerSubquantizer = centroidsPerSubquantizer + self.trainingIterations = trainingIterations + self.rerankMultiplier = rerankMultiplier + self.seed = seed + self.maxTrainingVectors = maxTrainingVectors } - - + + } #if compiler(>=6) -extension OptionalBytesRecord: Sendable {} +extension ProductQuantizationConfigRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeOptionalBytesRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> OptionalBytesRecord { +public struct FfiConverterTypeProductQuantizationConfigRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ProductQuantizationConfigRecord { return - try OptionalBytesRecord( - present: FfiConverterBool.read(from: &buf), - value: FfiConverterData.read(from: &buf) + try ProductQuantizationConfigRecord( + subquantizers: FfiConverterUInt32.read(from: &buf), + centroidsPerSubquantizer: FfiConverterUInt16.read(from: &buf), + trainingIterations: FfiConverterUInt16.read(from: &buf), + rerankMultiplier: FfiConverterUInt32.read(from: &buf), + seed: FfiConverterUInt64.read(from: &buf), + maxTrainingVectors: FfiConverterUInt64.read(from: &buf) ) } - public static func write(_ value: OptionalBytesRecord, into buf: inout [UInt8]) { - FfiConverterBool.write(value.present, into: &buf) - FfiConverterData.write(value.value, into: &buf) + public static func write(_ value: ProductQuantizationConfigRecord, into buf: inout [UInt8]) { + FfiConverterUInt32.write(value.subquantizers, into: &buf) + FfiConverterUInt16.write(value.centroidsPerSubquantizer, into: &buf) + FfiConverterUInt16.write(value.trainingIterations, into: &buf) + FfiConverterUInt32.write(value.rerankMultiplier, into: &buf) + FfiConverterUInt64.write(value.seed, into: &buf) + FfiConverterUInt64.write(value.maxTrainingVectors, into: &buf) } } @@ -18497,53 +19148,53 @@ public struct FfiConverterTypeOptionalBytesRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeOptionalBytesRecord_lift(_ buf: RustBuffer) throws -> OptionalBytesRecord { - return try FfiConverterTypeOptionalBytesRecord.lift(buf) +public func FfiConverterTypeProductQuantizationConfigRecord_lift(_ buf: RustBuffer) throws -> ProductQuantizationConfigRecord { + return try FfiConverterTypeProductQuantizationConfigRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeOptionalBytesRecord_lower(_ value: OptionalBytesRecord) -> RustBuffer { - return FfiConverterTypeOptionalBytesRecord.lower(value) +public func FfiConverterTypeProductQuantizationConfigRecord_lower(_ value: ProductQuantizationConfigRecord) -> RustBuffer { + return FfiConverterTypeProductQuantizationConfigRecord.lower(value) } -public struct OptionalBytesResultRecord: Equatable, Hashable { - public var value: OptionalBytesRecord - public var error: StoreErrorRecord? +public struct ProductQuantizationQualityRecord: Equatable, Hashable { + public var meanSquaredError: Double + public var maximumSquaredError: Double // Default memberwise initializers are never public by default, so we // declare one manually. - public init(value: OptionalBytesRecord, error: StoreErrorRecord?) { - self.value = value - self.error = error + public init(meanSquaredError: Double, maximumSquaredError: Double) { + self.meanSquaredError = meanSquaredError + self.maximumSquaredError = maximumSquaredError } - - + + } #if compiler(>=6) -extension OptionalBytesResultRecord: Sendable {} +extension ProductQuantizationQualityRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeOptionalBytesResultRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> OptionalBytesResultRecord { +public struct FfiConverterTypeProductQuantizationQualityRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ProductQuantizationQualityRecord { return - try OptionalBytesResultRecord( - value: FfiConverterTypeOptionalBytesRecord.read(from: &buf), - error: FfiConverterOptionTypeStoreErrorRecord.read(from: &buf) + try ProductQuantizationQualityRecord( + meanSquaredError: FfiConverterDouble.read(from: &buf), + maximumSquaredError: FfiConverterDouble.read(from: &buf) ) } - public static func write(_ value: OptionalBytesResultRecord, into buf: inout [UInt8]) { - FfiConverterTypeOptionalBytesRecord.write(value.value, into: &buf) - FfiConverterOptionTypeStoreErrorRecord.write(value.error, into: &buf) + public static func write(_ value: ProductQuantizationQualityRecord, into buf: inout [UInt8]) { + FfiConverterDouble.write(value.meanSquaredError, into: &buf) + FfiConverterDouble.write(value.maximumSquaredError, into: &buf) } } @@ -18551,53 +19202,93 @@ public struct FfiConverterTypeOptionalBytesResultRecord: FfiConverterRustBuffer #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeOptionalBytesResultRecord_lift(_ buf: RustBuffer) throws -> OptionalBytesResultRecord { - return try FfiConverterTypeOptionalBytesResultRecord.lift(buf) +public func FfiConverterTypeProductQuantizationQualityRecord_lift(_ buf: RustBuffer) throws -> ProductQuantizationQualityRecord { + return try FfiConverterTypeProductQuantizationQualityRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeOptionalBytesResultRecord_lower(_ value: OptionalBytesResultRecord) -> RustBuffer { - return FfiConverterTypeOptionalBytesResultRecord.lower(value) +public func FfiConverterTypeProductQuantizationQualityRecord_lower(_ value: ProductQuantizationQualityRecord) -> RustBuffer { + return FfiConverterTypeProductQuantizationQualityRecord.lower(value) } -public struct ParallelConfigRecord: Equatable, Hashable { - public var maxThreads: UInt64 - public var parallelismThreshold: UInt64 +public struct ProofBundleSummaryRecord: Equatable, Hashable { + public var version: UInt64 + public var kind: String + public var root: Data? + public var otherRoot: Data? + public var keyCount: UInt64 + public var pathNodeCount: UInt64 + public var start: Data? + public var end: Data? + public var after: Data? + public var requestedEnd: Data? + public var limit: UInt64? + public var hasLookahead: Bool // Default memberwise initializers are never public by default, so we // declare one manually. - public init(maxThreads: UInt64, parallelismThreshold: UInt64) { - self.maxThreads = maxThreads - self.parallelismThreshold = parallelismThreshold + public init(version: UInt64, kind: String, root: Data?, otherRoot: Data?, keyCount: UInt64, pathNodeCount: UInt64, start: Data?, end: Data?, after: Data?, requestedEnd: Data?, limit: UInt64?, hasLookahead: Bool) { + self.version = version + self.kind = kind + self.root = root + self.otherRoot = otherRoot + self.keyCount = keyCount + self.pathNodeCount = pathNodeCount + self.start = start + self.end = end + self.after = after + self.requestedEnd = requestedEnd + self.limit = limit + self.hasLookahead = hasLookahead } - - + + } #if compiler(>=6) -extension ParallelConfigRecord: Sendable {} +extension ProofBundleSummaryRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeParallelConfigRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ParallelConfigRecord { +public struct FfiConverterTypeProofBundleSummaryRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ProofBundleSummaryRecord { return - try ParallelConfigRecord( - maxThreads: FfiConverterUInt64.read(from: &buf), - parallelismThreshold: FfiConverterUInt64.read(from: &buf) + try ProofBundleSummaryRecord( + version: FfiConverterUInt64.read(from: &buf), + kind: FfiConverterString.read(from: &buf), + root: FfiConverterOptionData.read(from: &buf), + otherRoot: FfiConverterOptionData.read(from: &buf), + keyCount: FfiConverterUInt64.read(from: &buf), + pathNodeCount: FfiConverterUInt64.read(from: &buf), + start: FfiConverterOptionData.read(from: &buf), + end: FfiConverterOptionData.read(from: &buf), + after: FfiConverterOptionData.read(from: &buf), + requestedEnd: FfiConverterOptionData.read(from: &buf), + limit: FfiConverterOptionUInt64.read(from: &buf), + hasLookahead: FfiConverterBool.read(from: &buf) ) } - public static func write(_ value: ParallelConfigRecord, into buf: inout [UInt8]) { - FfiConverterUInt64.write(value.maxThreads, into: &buf) - FfiConverterUInt64.write(value.parallelismThreshold, into: &buf) + public static func write(_ value: ProofBundleSummaryRecord, into buf: inout [UInt8]) { + FfiConverterUInt64.write(value.version, into: &buf) + FfiConverterString.write(value.kind, into: &buf) + FfiConverterOptionData.write(value.root, into: &buf) + FfiConverterOptionData.write(value.otherRoot, into: &buf) + FfiConverterUInt64.write(value.keyCount, into: &buf) + FfiConverterUInt64.write(value.pathNodeCount, into: &buf) + FfiConverterOptionData.write(value.start, into: &buf) + FfiConverterOptionData.write(value.end, into: &buf) + FfiConverterOptionData.write(value.after, into: &buf) + FfiConverterOptionData.write(value.requestedEnd, into: &buf) + FfiConverterOptionUInt64.write(value.limit, into: &buf) + FfiConverterBool.write(value.hasLookahead, into: &buf) } } @@ -18605,69 +19296,73 @@ public struct FfiConverterTypeParallelConfigRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeParallelConfigRecord_lift(_ buf: RustBuffer) throws -> ParallelConfigRecord { - return try FfiConverterTypeParallelConfigRecord.lift(buf) +public func FfiConverterTypeProofBundleSummaryRecord_lift(_ buf: RustBuffer) throws -> ProofBundleSummaryRecord { + return try FfiConverterTypeProofBundleSummaryRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeParallelConfigRecord_lower(_ value: ParallelConfigRecord) -> RustBuffer { - return FfiConverterTypeParallelConfigRecord.lower(value) +public func FfiConverterTypeProofBundleSummaryRecord_lower(_ value: ProofBundleSummaryRecord) -> RustBuffer { + return FfiConverterTypeProofBundleSummaryRecord.lower(value) } -public struct ProductQuantizationBuildLimitsRecord: Equatable, Hashable { - public var maxTrainingVectors: UInt64? - public var maxTrainingBytes: UInt64? - public var maxTemporaryCodeBytes: UInt64? - public var maxDistanceEvaluations: UInt64? - public var maxEncodedOutputBytes: UInt64? - public var maxWorkerThreads: UInt64? +public struct ProofBundleVerificationRecord: Equatable, Hashable { + public var summary: ProofBundleSummaryRecord + public var valid: Bool + public var existsCount: UInt64 + public var absenceCount: UInt64 + public var entryCount: UInt64 + public var diffCount: UInt64 + public var nextCursor: RangeCursorRecord? // Default memberwise initializers are never public by default, so we // declare one manually. - public init(maxTrainingVectors: UInt64?, maxTrainingBytes: UInt64?, maxTemporaryCodeBytes: UInt64?, maxDistanceEvaluations: UInt64?, maxEncodedOutputBytes: UInt64?, maxWorkerThreads: UInt64?) { - self.maxTrainingVectors = maxTrainingVectors - self.maxTrainingBytes = maxTrainingBytes - self.maxTemporaryCodeBytes = maxTemporaryCodeBytes - self.maxDistanceEvaluations = maxDistanceEvaluations - self.maxEncodedOutputBytes = maxEncodedOutputBytes - self.maxWorkerThreads = maxWorkerThreads + public init(summary: ProofBundleSummaryRecord, valid: Bool, existsCount: UInt64, absenceCount: UInt64, entryCount: UInt64, diffCount: UInt64, nextCursor: RangeCursorRecord?) { + self.summary = summary + self.valid = valid + self.existsCount = existsCount + self.absenceCount = absenceCount + self.entryCount = entryCount + self.diffCount = diffCount + self.nextCursor = nextCursor } - - + + } #if compiler(>=6) -extension ProductQuantizationBuildLimitsRecord: Sendable {} +extension ProofBundleVerificationRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeProductQuantizationBuildLimitsRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ProductQuantizationBuildLimitsRecord { +public struct FfiConverterTypeProofBundleVerificationRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ProofBundleVerificationRecord { return - try ProductQuantizationBuildLimitsRecord( - maxTrainingVectors: FfiConverterOptionUInt64.read(from: &buf), - maxTrainingBytes: FfiConverterOptionUInt64.read(from: &buf), - maxTemporaryCodeBytes: FfiConverterOptionUInt64.read(from: &buf), - maxDistanceEvaluations: FfiConverterOptionUInt64.read(from: &buf), - maxEncodedOutputBytes: FfiConverterOptionUInt64.read(from: &buf), - maxWorkerThreads: FfiConverterOptionUInt64.read(from: &buf) + try ProofBundleVerificationRecord( + summary: FfiConverterTypeProofBundleSummaryRecord.read(from: &buf), + valid: FfiConverterBool.read(from: &buf), + existsCount: FfiConverterUInt64.read(from: &buf), + absenceCount: FfiConverterUInt64.read(from: &buf), + entryCount: FfiConverterUInt64.read(from: &buf), + diffCount: FfiConverterUInt64.read(from: &buf), + nextCursor: FfiConverterOptionTypeRangeCursorRecord.read(from: &buf) ) } - public static func write(_ value: ProductQuantizationBuildLimitsRecord, into buf: inout [UInt8]) { - FfiConverterOptionUInt64.write(value.maxTrainingVectors, into: &buf) - FfiConverterOptionUInt64.write(value.maxTrainingBytes, into: &buf) - FfiConverterOptionUInt64.write(value.maxTemporaryCodeBytes, into: &buf) - FfiConverterOptionUInt64.write(value.maxDistanceEvaluations, into: &buf) - FfiConverterOptionUInt64.write(value.maxEncodedOutputBytes, into: &buf) - FfiConverterOptionUInt64.write(value.maxWorkerThreads, into: &buf) + public static func write(_ value: ProofBundleVerificationRecord, into buf: inout [UInt8]) { + FfiConverterTypeProofBundleSummaryRecord.write(value.summary, into: &buf) + FfiConverterBool.write(value.valid, into: &buf) + FfiConverterUInt64.write(value.existsCount, into: &buf) + FfiConverterUInt64.write(value.absenceCount, into: &buf) + FfiConverterUInt64.write(value.entryCount, into: &buf) + FfiConverterUInt64.write(value.diffCount, into: &buf) + FfiConverterOptionTypeRangeCursorRecord.write(value.nextCursor, into: &buf) } } @@ -18675,53 +19370,53 @@ public struct FfiConverterTypeProductQuantizationBuildLimitsRecord: FfiConverter #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeProductQuantizationBuildLimitsRecord_lift(_ buf: RustBuffer) throws -> ProductQuantizationBuildLimitsRecord { - return try FfiConverterTypeProductQuantizationBuildLimitsRecord.lift(buf) +public func FfiConverterTypeProofBundleVerificationRecord_lift(_ buf: RustBuffer) throws -> ProofBundleVerificationRecord { + return try FfiConverterTypeProofBundleVerificationRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeProductQuantizationBuildLimitsRecord_lower(_ value: ProductQuantizationBuildLimitsRecord) -> RustBuffer { - return FfiConverterTypeProductQuantizationBuildLimitsRecord.lower(value) +public func FfiConverterTypeProofBundleVerificationRecord_lower(_ value: ProofBundleVerificationRecord) -> RustBuffer { + return FfiConverterTypeProofBundleVerificationRecord.lower(value) } -public struct ProductQuantizationBuildResultRecord { - public var index: BindingProductQuantizer - public var stats: ProductQuantizationBuildStatsRecord +public struct ProvedDiffPageRecord: Equatable, Hashable { + public var page: DiffPageRecord + public var proof: DiffPageProofRecord // Default memberwise initializers are never public by default, so we // declare one manually. - public init(index: BindingProductQuantizer, stats: ProductQuantizationBuildStatsRecord) { - self.index = index - self.stats = stats + public init(page: DiffPageRecord, proof: DiffPageProofRecord) { + self.page = page + self.proof = proof } - - + + } #if compiler(>=6) -extension ProductQuantizationBuildResultRecord: Sendable {} +extension ProvedDiffPageRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeProductQuantizationBuildResultRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ProductQuantizationBuildResultRecord { +public struct FfiConverterTypeProvedDiffPageRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ProvedDiffPageRecord { return - try ProductQuantizationBuildResultRecord( - index: FfiConverterTypeBindingProductQuantizer.read(from: &buf), - stats: FfiConverterTypeProductQuantizationBuildStatsRecord.read(from: &buf) + try ProvedDiffPageRecord( + page: FfiConverterTypeDiffPageRecord.read(from: &buf), + proof: FfiConverterTypeDiffPageProofRecord.read(from: &buf) ) } - public static func write(_ value: ProductQuantizationBuildResultRecord, into buf: inout [UInt8]) { - FfiConverterTypeBindingProductQuantizer.write(value.index, into: &buf) - FfiConverterTypeProductQuantizationBuildStatsRecord.write(value.stats, into: &buf) + public static func write(_ value: ProvedDiffPageRecord, into buf: inout [UInt8]) { + FfiConverterTypeDiffPageRecord.write(value.page, into: &buf) + FfiConverterTypeDiffPageProofRecord.write(value.proof, into: &buf) } } @@ -18729,69 +19424,53 @@ public struct FfiConverterTypeProductQuantizationBuildResultRecord: FfiConverter #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeProductQuantizationBuildResultRecord_lift(_ buf: RustBuffer) throws -> ProductQuantizationBuildResultRecord { - return try FfiConverterTypeProductQuantizationBuildResultRecord.lift(buf) +public func FfiConverterTypeProvedDiffPageRecord_lift(_ buf: RustBuffer) throws -> ProvedDiffPageRecord { + return try FfiConverterTypeProvedDiffPageRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeProductQuantizationBuildResultRecord_lower(_ value: ProductQuantizationBuildResultRecord) -> RustBuffer { - return FfiConverterTypeProductQuantizationBuildResultRecord.lower(value) +public func FfiConverterTypeProvedDiffPageRecord_lower(_ value: ProvedDiffPageRecord) -> RustBuffer { + return FfiConverterTypeProvedDiffPageRecord.lower(value) } -public struct ProductQuantizationBuildStatsRecord: Equatable, Hashable { - public var trainingDistanceEvaluations: UInt64 - public var encodingDistanceEvaluations: UInt64 - public var encodedVectors: UInt64 - public var trainingVectors: UInt64 - public var trainingBytes: UInt64 - public var encodedOutputBytes: UInt64 +public struct ProvedRangePageRecord: Equatable, Hashable { + public var page: RangePageRecord + public var proof: RangePageProofRecord // Default memberwise initializers are never public by default, so we // declare one manually. - public init(trainingDistanceEvaluations: UInt64, encodingDistanceEvaluations: UInt64, encodedVectors: UInt64, trainingVectors: UInt64, trainingBytes: UInt64, encodedOutputBytes: UInt64) { - self.trainingDistanceEvaluations = trainingDistanceEvaluations - self.encodingDistanceEvaluations = encodingDistanceEvaluations - self.encodedVectors = encodedVectors - self.trainingVectors = trainingVectors - self.trainingBytes = trainingBytes - self.encodedOutputBytes = encodedOutputBytes + public init(page: RangePageRecord, proof: RangePageProofRecord) { + self.page = page + self.proof = proof } - - + + } #if compiler(>=6) -extension ProductQuantizationBuildStatsRecord: Sendable {} +extension ProvedRangePageRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeProductQuantizationBuildStatsRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ProductQuantizationBuildStatsRecord { +public struct FfiConverterTypeProvedRangePageRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ProvedRangePageRecord { return - try ProductQuantizationBuildStatsRecord( - trainingDistanceEvaluations: FfiConverterUInt64.read(from: &buf), - encodingDistanceEvaluations: FfiConverterUInt64.read(from: &buf), - encodedVectors: FfiConverterUInt64.read(from: &buf), - trainingVectors: FfiConverterUInt64.read(from: &buf), - trainingBytes: FfiConverterUInt64.read(from: &buf), - encodedOutputBytes: FfiConverterUInt64.read(from: &buf) + try ProvedRangePageRecord( + page: FfiConverterTypeRangePageRecord.read(from: &buf), + proof: FfiConverterTypeRangePageProofRecord.read(from: &buf) ) } - public static func write(_ value: ProductQuantizationBuildStatsRecord, into buf: inout [UInt8]) { - FfiConverterUInt64.write(value.trainingDistanceEvaluations, into: &buf) - FfiConverterUInt64.write(value.encodingDistanceEvaluations, into: &buf) - FfiConverterUInt64.write(value.encodedVectors, into: &buf) - FfiConverterUInt64.write(value.trainingVectors, into: &buf) - FfiConverterUInt64.write(value.trainingBytes, into: &buf) - FfiConverterUInt64.write(value.encodedOutputBytes, into: &buf) + public static func write(_ value: ProvedRangePageRecord, into buf: inout [UInt8]) { + FfiConverterTypeRangePageRecord.write(value.page, into: &buf) + FfiConverterTypeRangePageProofRecord.write(value.proof, into: &buf) } } @@ -18799,69 +19478,85 @@ public struct FfiConverterTypeProductQuantizationBuildStatsRecord: FfiConverterR #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeProductQuantizationBuildStatsRecord_lift(_ buf: RustBuffer) throws -> ProductQuantizationBuildStatsRecord { - return try FfiConverterTypeProductQuantizationBuildStatsRecord.lift(buf) +public func FfiConverterTypeProvedRangePageRecord_lift(_ buf: RustBuffer) throws -> ProvedRangePageRecord { + return try FfiConverterTypeProvedRangePageRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeProductQuantizationBuildStatsRecord_lower(_ value: ProductQuantizationBuildStatsRecord) -> RustBuffer { - return FfiConverterTypeProductQuantizationBuildStatsRecord.lower(value) +public func FfiConverterTypeProvedRangePageRecord_lower(_ value: ProvedRangePageRecord) -> RustBuffer { + return FfiConverterTypeProvedRangePageRecord.lower(value) } -public struct ProductQuantizationConfigRecord: Equatable, Hashable { - public var subquantizers: UInt32 - public var centroidsPerSubquantizer: UInt16 - public var trainingIterations: UInt16 - public var rerankMultiplier: UInt32 - public var seed: UInt64 - public var maxTrainingVectors: UInt64 +public struct ProximityConfigRecord: Equatable, Hashable { + public var dimensions: UInt32 + public var metric: DistanceMetricRecord + public var logChunkSize: UInt8 + public var levelHashSeed: UInt64 + public var minPageBytes: UInt32 + public var targetPageBytes: UInt32 + public var maxPageBytes: UInt32 + public var overflowHashSeed: UInt64 + public var inlineThresholdBytes: UInt32 + public var scalarQuantizationGroupSize: UInt32? // Default memberwise initializers are never public by default, so we // declare one manually. - public init(subquantizers: UInt32, centroidsPerSubquantizer: UInt16, trainingIterations: UInt16, rerankMultiplier: UInt32, seed: UInt64, maxTrainingVectors: UInt64) { - self.subquantizers = subquantizers - self.centroidsPerSubquantizer = centroidsPerSubquantizer - self.trainingIterations = trainingIterations - self.rerankMultiplier = rerankMultiplier - self.seed = seed - self.maxTrainingVectors = maxTrainingVectors + public init(dimensions: UInt32, metric: DistanceMetricRecord, logChunkSize: UInt8, levelHashSeed: UInt64, minPageBytes: UInt32, targetPageBytes: UInt32, maxPageBytes: UInt32, overflowHashSeed: UInt64, inlineThresholdBytes: UInt32, scalarQuantizationGroupSize: UInt32?) { + self.dimensions = dimensions + self.metric = metric + self.logChunkSize = logChunkSize + self.levelHashSeed = levelHashSeed + self.minPageBytes = minPageBytes + self.targetPageBytes = targetPageBytes + self.maxPageBytes = maxPageBytes + self.overflowHashSeed = overflowHashSeed + self.inlineThresholdBytes = inlineThresholdBytes + self.scalarQuantizationGroupSize = scalarQuantizationGroupSize } - - + + } #if compiler(>=6) -extension ProductQuantizationConfigRecord: Sendable {} +extension ProximityConfigRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeProductQuantizationConfigRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ProductQuantizationConfigRecord { +public struct FfiConverterTypeProximityConfigRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ProximityConfigRecord { return - try ProductQuantizationConfigRecord( - subquantizers: FfiConverterUInt32.read(from: &buf), - centroidsPerSubquantizer: FfiConverterUInt16.read(from: &buf), - trainingIterations: FfiConverterUInt16.read(from: &buf), - rerankMultiplier: FfiConverterUInt32.read(from: &buf), - seed: FfiConverterUInt64.read(from: &buf), - maxTrainingVectors: FfiConverterUInt64.read(from: &buf) + try ProximityConfigRecord( + dimensions: FfiConverterUInt32.read(from: &buf), + metric: FfiConverterTypeDistanceMetricRecord.read(from: &buf), + logChunkSize: FfiConverterUInt8.read(from: &buf), + levelHashSeed: FfiConverterUInt64.read(from: &buf), + minPageBytes: FfiConverterUInt32.read(from: &buf), + targetPageBytes: FfiConverterUInt32.read(from: &buf), + maxPageBytes: FfiConverterUInt32.read(from: &buf), + overflowHashSeed: FfiConverterUInt64.read(from: &buf), + inlineThresholdBytes: FfiConverterUInt32.read(from: &buf), + scalarQuantizationGroupSize: FfiConverterOptionUInt32.read(from: &buf) ) } - public static func write(_ value: ProductQuantizationConfigRecord, into buf: inout [UInt8]) { - FfiConverterUInt32.write(value.subquantizers, into: &buf) - FfiConverterUInt16.write(value.centroidsPerSubquantizer, into: &buf) - FfiConverterUInt16.write(value.trainingIterations, into: &buf) - FfiConverterUInt32.write(value.rerankMultiplier, into: &buf) - FfiConverterUInt64.write(value.seed, into: &buf) - FfiConverterUInt64.write(value.maxTrainingVectors, into: &buf) + public static func write(_ value: ProximityConfigRecord, into buf: inout [UInt8]) { + FfiConverterUInt32.write(value.dimensions, into: &buf) + FfiConverterTypeDistanceMetricRecord.write(value.metric, into: &buf) + FfiConverterUInt8.write(value.logChunkSize, into: &buf) + FfiConverterUInt64.write(value.levelHashSeed, into: &buf) + FfiConverterUInt32.write(value.minPageBytes, into: &buf) + FfiConverterUInt32.write(value.targetPageBytes, into: &buf) + FfiConverterUInt32.write(value.maxPageBytes, into: &buf) + FfiConverterUInt64.write(value.overflowHashSeed, into: &buf) + FfiConverterUInt32.write(value.inlineThresholdBytes, into: &buf) + FfiConverterOptionUInt32.write(value.scalarQuantizationGroupSize, into: &buf) } } @@ -18869,53 +19564,65 @@ public struct FfiConverterTypeProductQuantizationConfigRecord: FfiConverterRustB #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeProductQuantizationConfigRecord_lift(_ buf: RustBuffer) throws -> ProductQuantizationConfigRecord { - return try FfiConverterTypeProductQuantizationConfigRecord.lift(buf) +public func FfiConverterTypeProximityConfigRecord_lift(_ buf: RustBuffer) throws -> ProximityConfigRecord { + return try FfiConverterTypeProximityConfigRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeProductQuantizationConfigRecord_lower(_ value: ProductQuantizationConfigRecord) -> RustBuffer { - return FfiConverterTypeProductQuantizationConfigRecord.lower(value) +public func FfiConverterTypeProximityConfigRecord_lower(_ value: ProximityConfigRecord) -> RustBuffer { + return FfiConverterTypeProximityConfigRecord.lower(value) } -public struct ProductQuantizationQualityRecord: Equatable, Hashable { - public var meanSquaredError: Double - public var maximumSquaredError: Double +public struct ProximityFilterRecord: Equatable, Hashable { + public var kind: ProximityFilterKind + public var start: Data? + public var rangeEnd: Data? + public var prefix: Data? + public var eligibleKeys: [Data] // Default memberwise initializers are never public by default, so we // declare one manually. - public init(meanSquaredError: Double, maximumSquaredError: Double) { - self.meanSquaredError = meanSquaredError - self.maximumSquaredError = maximumSquaredError + public init(kind: ProximityFilterKind, start: Data?, rangeEnd: Data?, prefix: Data?, eligibleKeys: [Data]) { + self.kind = kind + self.start = start + self.rangeEnd = rangeEnd + self.prefix = prefix + self.eligibleKeys = eligibleKeys } - - + + } #if compiler(>=6) -extension ProductQuantizationQualityRecord: Sendable {} +extension ProximityFilterRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeProductQuantizationQualityRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ProductQuantizationQualityRecord { +public struct FfiConverterTypeProximityFilterRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ProximityFilterRecord { return - try ProductQuantizationQualityRecord( - meanSquaredError: FfiConverterDouble.read(from: &buf), - maximumSquaredError: FfiConverterDouble.read(from: &buf) + try ProximityFilterRecord( + kind: FfiConverterTypeProximityFilterKind.read(from: &buf), + start: FfiConverterOptionData.read(from: &buf), + rangeEnd: FfiConverterOptionData.read(from: &buf), + prefix: FfiConverterOptionData.read(from: &buf), + eligibleKeys: FfiConverterSequenceData.read(from: &buf) ) } - public static func write(_ value: ProductQuantizationQualityRecord, into buf: inout [UInt8]) { - FfiConverterDouble.write(value.meanSquaredError, into: &buf) - FfiConverterDouble.write(value.maximumSquaredError, into: &buf) + public static func write(_ value: ProximityFilterRecord, into buf: inout [UInt8]) { + FfiConverterTypeProximityFilterKind.write(value.kind, into: &buf) + FfiConverterOptionData.write(value.start, into: &buf) + FfiConverterOptionData.write(value.rangeEnd, into: &buf) + FfiConverterOptionData.write(value.prefix, into: &buf) + FfiConverterSequenceData.write(value.eligibleKeys, into: &buf) } } @@ -18923,93 +19630,61 @@ public struct FfiConverterTypeProductQuantizationQualityRecord: FfiConverterRust #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeProductQuantizationQualityRecord_lift(_ buf: RustBuffer) throws -> ProductQuantizationQualityRecord { - return try FfiConverterTypeProductQuantizationQualityRecord.lift(buf) +public func FfiConverterTypeProximityFilterRecord_lift(_ buf: RustBuffer) throws -> ProximityFilterRecord { + return try FfiConverterTypeProximityFilterRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeProductQuantizationQualityRecord_lower(_ value: ProductQuantizationQualityRecord) -> RustBuffer { - return FfiConverterTypeProductQuantizationQualityRecord.lower(value) +public func FfiConverterTypeProximityFilterRecord_lower(_ value: ProximityFilterRecord) -> RustBuffer { + return FfiConverterTypeProximityFilterRecord.lower(value) } -public struct ProofBundleSummaryRecord: Equatable, Hashable { - public var version: UInt64 - public var kind: String - public var root: Data? - public var otherRoot: Data? - public var keyCount: UInt64 - public var pathNodeCount: UInt64 - public var start: Data? - public var end: Data? - public var after: Data? - public var requestedEnd: Data? - public var limit: UInt64? - public var hasLookahead: Bool +public struct ProximityMembershipProofRecord: Equatable, Hashable { + public var descriptor: Data + public var descriptorBytes: Data + public var directoryProof: KeyProofRecord + public var recordBytes: Data? // Default memberwise initializers are never public by default, so we // declare one manually. - public init(version: UInt64, kind: String, root: Data?, otherRoot: Data?, keyCount: UInt64, pathNodeCount: UInt64, start: Data?, end: Data?, after: Data?, requestedEnd: Data?, limit: UInt64?, hasLookahead: Bool) { - self.version = version - self.kind = kind - self.root = root - self.otherRoot = otherRoot - self.keyCount = keyCount - self.pathNodeCount = pathNodeCount - self.start = start - self.end = end - self.after = after - self.requestedEnd = requestedEnd - self.limit = limit - self.hasLookahead = hasLookahead + public init(descriptor: Data, descriptorBytes: Data, directoryProof: KeyProofRecord, recordBytes: Data?) { + self.descriptor = descriptor + self.descriptorBytes = descriptorBytes + self.directoryProof = directoryProof + self.recordBytes = recordBytes } - - + + } #if compiler(>=6) -extension ProofBundleSummaryRecord: Sendable {} +extension ProximityMembershipProofRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeProofBundleSummaryRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ProofBundleSummaryRecord { +public struct FfiConverterTypeProximityMembershipProofRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ProximityMembershipProofRecord { return - try ProofBundleSummaryRecord( - version: FfiConverterUInt64.read(from: &buf), - kind: FfiConverterString.read(from: &buf), - root: FfiConverterOptionData.read(from: &buf), - otherRoot: FfiConverterOptionData.read(from: &buf), - keyCount: FfiConverterUInt64.read(from: &buf), - pathNodeCount: FfiConverterUInt64.read(from: &buf), - start: FfiConverterOptionData.read(from: &buf), - end: FfiConverterOptionData.read(from: &buf), - after: FfiConverterOptionData.read(from: &buf), - requestedEnd: FfiConverterOptionData.read(from: &buf), - limit: FfiConverterOptionUInt64.read(from: &buf), - hasLookahead: FfiConverterBool.read(from: &buf) + try ProximityMembershipProofRecord( + descriptor: FfiConverterData.read(from: &buf), + descriptorBytes: FfiConverterData.read(from: &buf), + directoryProof: FfiConverterTypeKeyProofRecord.read(from: &buf), + recordBytes: FfiConverterOptionData.read(from: &buf) ) } - public static func write(_ value: ProofBundleSummaryRecord, into buf: inout [UInt8]) { - FfiConverterUInt64.write(value.version, into: &buf) - FfiConverterString.write(value.kind, into: &buf) - FfiConverterOptionData.write(value.root, into: &buf) - FfiConverterOptionData.write(value.otherRoot, into: &buf) - FfiConverterUInt64.write(value.keyCount, into: &buf) - FfiConverterUInt64.write(value.pathNodeCount, into: &buf) - FfiConverterOptionData.write(value.start, into: &buf) - FfiConverterOptionData.write(value.end, into: &buf) - FfiConverterOptionData.write(value.after, into: &buf) - FfiConverterOptionData.write(value.requestedEnd, into: &buf) - FfiConverterOptionUInt64.write(value.limit, into: &buf) - FfiConverterBool.write(value.hasLookahead, into: &buf) + public static func write(_ value: ProximityMembershipProofRecord, into buf: inout [UInt8]) { + FfiConverterData.write(value.descriptor, into: &buf) + FfiConverterData.write(value.descriptorBytes, into: &buf) + FfiConverterTypeKeyProofRecord.write(value.directoryProof, into: &buf) + FfiConverterOptionData.write(value.recordBytes, into: &buf) } } @@ -19017,73 +19692,57 @@ public struct FfiConverterTypeProofBundleSummaryRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeProofBundleSummaryRecord_lift(_ buf: RustBuffer) throws -> ProofBundleSummaryRecord { - return try FfiConverterTypeProofBundleSummaryRecord.lift(buf) +public func FfiConverterTypeProximityMembershipProofRecord_lift(_ buf: RustBuffer) throws -> ProximityMembershipProofRecord { + return try FfiConverterTypeProximityMembershipProofRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeProofBundleSummaryRecord_lower(_ value: ProofBundleSummaryRecord) -> RustBuffer { - return FfiConverterTypeProofBundleSummaryRecord.lower(value) +public func FfiConverterTypeProximityMembershipProofRecord_lower(_ value: ProximityMembershipProofRecord) -> RustBuffer { + return FfiConverterTypeProximityMembershipProofRecord.lower(value) } -public struct ProofBundleVerificationRecord: Equatable, Hashable { - public var summary: ProofBundleSummaryRecord - public var valid: Bool - public var existsCount: UInt64 - public var absenceCount: UInt64 - public var entryCount: UInt64 - public var diffCount: UInt64 - public var nextCursor: RangeCursorRecord? +public struct ProximityMembershipVerificationRecord: Equatable, Hashable { + public var descriptor: Data + public var key: Data + public var record: ExactProximityRecordRecord? // Default memberwise initializers are never public by default, so we // declare one manually. - public init(summary: ProofBundleSummaryRecord, valid: Bool, existsCount: UInt64, absenceCount: UInt64, entryCount: UInt64, diffCount: UInt64, nextCursor: RangeCursorRecord?) { - self.summary = summary - self.valid = valid - self.existsCount = existsCount - self.absenceCount = absenceCount - self.entryCount = entryCount - self.diffCount = diffCount - self.nextCursor = nextCursor + public init(descriptor: Data, key: Data, record: ExactProximityRecordRecord?) { + self.descriptor = descriptor + self.key = key + self.record = record } - - + + } #if compiler(>=6) -extension ProofBundleVerificationRecord: Sendable {} +extension ProximityMembershipVerificationRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeProofBundleVerificationRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ProofBundleVerificationRecord { +public struct FfiConverterTypeProximityMembershipVerificationRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ProximityMembershipVerificationRecord { return - try ProofBundleVerificationRecord( - summary: FfiConverterTypeProofBundleSummaryRecord.read(from: &buf), - valid: FfiConverterBool.read(from: &buf), - existsCount: FfiConverterUInt64.read(from: &buf), - absenceCount: FfiConverterUInt64.read(from: &buf), - entryCount: FfiConverterUInt64.read(from: &buf), - diffCount: FfiConverterUInt64.read(from: &buf), - nextCursor: FfiConverterOptionTypeRangeCursorRecord.read(from: &buf) + try ProximityMembershipVerificationRecord( + descriptor: FfiConverterData.read(from: &buf), + key: FfiConverterData.read(from: &buf), + record: FfiConverterOptionTypeExactProximityRecordRecord.read(from: &buf) ) } - public static func write(_ value: ProofBundleVerificationRecord, into buf: inout [UInt8]) { - FfiConverterTypeProofBundleSummaryRecord.write(value.summary, into: &buf) - FfiConverterBool.write(value.valid, into: &buf) - FfiConverterUInt64.write(value.existsCount, into: &buf) - FfiConverterUInt64.write(value.absenceCount, into: &buf) - FfiConverterUInt64.write(value.entryCount, into: &buf) - FfiConverterUInt64.write(value.diffCount, into: &buf) - FfiConverterOptionTypeRangeCursorRecord.write(value.nextCursor, into: &buf) + public static func write(_ value: ProximityMembershipVerificationRecord, into buf: inout [UInt8]) { + FfiConverterData.write(value.descriptor, into: &buf) + FfiConverterData.write(value.key, into: &buf) + FfiConverterOptionTypeExactProximityRecordRecord.write(value.record, into: &buf) } } @@ -19091,53 +19750,57 @@ public struct FfiConverterTypeProofBundleVerificationRecord: FfiConverterRustBuf #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeProofBundleVerificationRecord_lift(_ buf: RustBuffer) throws -> ProofBundleVerificationRecord { - return try FfiConverterTypeProofBundleVerificationRecord.lift(buf) +public func FfiConverterTypeProximityMembershipVerificationRecord_lift(_ buf: RustBuffer) throws -> ProximityMembershipVerificationRecord { + return try FfiConverterTypeProximityMembershipVerificationRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeProofBundleVerificationRecord_lower(_ value: ProofBundleVerificationRecord) -> RustBuffer { - return FfiConverterTypeProofBundleVerificationRecord.lower(value) +public func FfiConverterTypeProximityMembershipVerificationRecord_lower(_ value: ProximityMembershipVerificationRecord) -> RustBuffer { + return FfiConverterTypeProximityMembershipVerificationRecord.lower(value) } -public struct ProvedDiffPageRecord: Equatable, Hashable { - public var page: DiffPageRecord - public var proof: DiffPageProofRecord +public struct ProximityMutationRecord: Equatable, Hashable { + public var key: Data + public var vector: [Float]? + public var value: Data? // Default memberwise initializers are never public by default, so we // declare one manually. - public init(page: DiffPageRecord, proof: DiffPageProofRecord) { - self.page = page - self.proof = proof + public init(key: Data, vector: [Float]?, value: Data?) { + self.key = key + self.vector = vector + self.value = value } - - + + } #if compiler(>=6) -extension ProvedDiffPageRecord: Sendable {} +extension ProximityMutationRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeProvedDiffPageRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ProvedDiffPageRecord { +public struct FfiConverterTypeProximityMutationRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ProximityMutationRecord { return - try ProvedDiffPageRecord( - page: FfiConverterTypeDiffPageRecord.read(from: &buf), - proof: FfiConverterTypeDiffPageProofRecord.read(from: &buf) + try ProximityMutationRecord( + key: FfiConverterData.read(from: &buf), + vector: FfiConverterOptionSequenceFloat.read(from: &buf), + value: FfiConverterOptionData.read(from: &buf) ) } - public static func write(_ value: ProvedDiffPageRecord, into buf: inout [UInt8]) { - FfiConverterTypeDiffPageRecord.write(value.page, into: &buf) - FfiConverterTypeDiffPageProofRecord.write(value.proof, into: &buf) + public static func write(_ value: ProximityMutationRecord, into buf: inout [UInt8]) { + FfiConverterData.write(value.key, into: &buf) + FfiConverterOptionSequenceFloat.write(value.vector, into: &buf) + FfiConverterOptionData.write(value.value, into: &buf) } } @@ -19145,53 +19808,53 @@ public struct FfiConverterTypeProvedDiffPageRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeProvedDiffPageRecord_lift(_ buf: RustBuffer) throws -> ProvedDiffPageRecord { - return try FfiConverterTypeProvedDiffPageRecord.lift(buf) +public func FfiConverterTypeProximityMutationRecord_lift(_ buf: RustBuffer) throws -> ProximityMutationRecord { + return try FfiConverterTypeProximityMutationRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeProvedDiffPageRecord_lower(_ value: ProvedDiffPageRecord) -> RustBuffer { - return FfiConverterTypeProvedDiffPageRecord.lower(value) +public func FfiConverterTypeProximityMutationRecord_lower(_ value: ProximityMutationRecord) -> RustBuffer { + return FfiConverterTypeProximityMutationRecord.lower(value) } -public struct ProvedRangePageRecord: Equatable, Hashable { - public var page: RangePageRecord - public var proof: RangePageProofRecord +public struct ProximityMutationResultRecord { + public var map: BindingProximityMap + public var stats: ProximityMutationStatsRecord // Default memberwise initializers are never public by default, so we // declare one manually. - public init(page: RangePageRecord, proof: RangePageProofRecord) { - self.page = page - self.proof = proof + public init(map: BindingProximityMap, stats: ProximityMutationStatsRecord) { + self.map = map + self.stats = stats } - - + + } #if compiler(>=6) -extension ProvedRangePageRecord: Sendable {} +extension ProximityMutationResultRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeProvedRangePageRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ProvedRangePageRecord { +public struct FfiConverterTypeProximityMutationResultRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ProximityMutationResultRecord { return - try ProvedRangePageRecord( - page: FfiConverterTypeRangePageRecord.read(from: &buf), - proof: FfiConverterTypeRangePageProofRecord.read(from: &buf) + try ProximityMutationResultRecord( + map: FfiConverterTypeBindingProximityMap.read(from: &buf), + stats: FfiConverterTypeProximityMutationStatsRecord.read(from: &buf) ) } - public static func write(_ value: ProvedRangePageRecord, into buf: inout [UInt8]) { - FfiConverterTypeRangePageRecord.write(value.page, into: &buf) - FfiConverterTypeRangePageProofRecord.write(value.proof, into: &buf) + public static func write(_ value: ProximityMutationResultRecord, into buf: inout [UInt8]) { + FfiConverterTypeBindingProximityMap.write(value.map, into: &buf) + FfiConverterTypeProximityMutationStatsRecord.write(value.stats, into: &buf) } } @@ -19199,85 +19862,97 @@ public struct FfiConverterTypeProvedRangePageRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeProvedRangePageRecord_lift(_ buf: RustBuffer) throws -> ProvedRangePageRecord { - return try FfiConverterTypeProvedRangePageRecord.lift(buf) +public func FfiConverterTypeProximityMutationResultRecord_lift(_ buf: RustBuffer) throws -> ProximityMutationResultRecord { + return try FfiConverterTypeProximityMutationResultRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeProvedRangePageRecord_lower(_ value: ProvedRangePageRecord) -> RustBuffer { - return FfiConverterTypeProvedRangePageRecord.lower(value) +public func FfiConverterTypeProximityMutationResultRecord_lower(_ value: ProximityMutationResultRecord) -> RustBuffer { + return FfiConverterTypeProximityMutationResultRecord.lower(value) } -public struct ProximityConfigRecord: Equatable, Hashable { - public var dimensions: UInt32 - public var metric: DistanceMetricRecord - public var logChunkSize: UInt8 - public var levelHashSeed: UInt64 - public var minPageBytes: UInt32 - public var targetPageBytes: UInt32 - public var maxPageBytes: UInt32 - public var overflowHashSeed: UInt64 - public var inlineThresholdBytes: UInt32 - public var scalarQuantizationGroupSize: UInt32? +public struct ProximityMutationStatsRecord: Equatable, Hashable { + public var directoryEntriesScanned: UInt64 + public var directoryNodesRead: UInt64 + public var directoryNodesRebuilt: UInt64 + public var directoryNodesWritten: UInt64 + public var directoryNodesReused: UInt64 + public var directoryLevelsRebuilt: UInt64 + public var directoryRightEdgeRebuilt: Bool + public var nodesRead: UInt64 + public var nodesWritten: UInt64 + public var nodesReused: UInt64 + public var recordsRebuilt: UInt64 + public var distanceEvaluations: UInt64 + public var fullProximityRebuild: Bool // Default memberwise initializers are never public by default, so we // declare one manually. - public init(dimensions: UInt32, metric: DistanceMetricRecord, logChunkSize: UInt8, levelHashSeed: UInt64, minPageBytes: UInt32, targetPageBytes: UInt32, maxPageBytes: UInt32, overflowHashSeed: UInt64, inlineThresholdBytes: UInt32, scalarQuantizationGroupSize: UInt32?) { - self.dimensions = dimensions - self.metric = metric - self.logChunkSize = logChunkSize - self.levelHashSeed = levelHashSeed - self.minPageBytes = minPageBytes - self.targetPageBytes = targetPageBytes - self.maxPageBytes = maxPageBytes - self.overflowHashSeed = overflowHashSeed - self.inlineThresholdBytes = inlineThresholdBytes - self.scalarQuantizationGroupSize = scalarQuantizationGroupSize + public init(directoryEntriesScanned: UInt64, directoryNodesRead: UInt64, directoryNodesRebuilt: UInt64, directoryNodesWritten: UInt64, directoryNodesReused: UInt64, directoryLevelsRebuilt: UInt64, directoryRightEdgeRebuilt: Bool, nodesRead: UInt64, nodesWritten: UInt64, nodesReused: UInt64, recordsRebuilt: UInt64, distanceEvaluations: UInt64, fullProximityRebuild: Bool) { + self.directoryEntriesScanned = directoryEntriesScanned + self.directoryNodesRead = directoryNodesRead + self.directoryNodesRebuilt = directoryNodesRebuilt + self.directoryNodesWritten = directoryNodesWritten + self.directoryNodesReused = directoryNodesReused + self.directoryLevelsRebuilt = directoryLevelsRebuilt + self.directoryRightEdgeRebuilt = directoryRightEdgeRebuilt + self.nodesRead = nodesRead + self.nodesWritten = nodesWritten + self.nodesReused = nodesReused + self.recordsRebuilt = recordsRebuilt + self.distanceEvaluations = distanceEvaluations + self.fullProximityRebuild = fullProximityRebuild } - - + + } #if compiler(>=6) -extension ProximityConfigRecord: Sendable {} +extension ProximityMutationStatsRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeProximityConfigRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ProximityConfigRecord { +public struct FfiConverterTypeProximityMutationStatsRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ProximityMutationStatsRecord { return - try ProximityConfigRecord( - dimensions: FfiConverterUInt32.read(from: &buf), - metric: FfiConverterTypeDistanceMetricRecord.read(from: &buf), - logChunkSize: FfiConverterUInt8.read(from: &buf), - levelHashSeed: FfiConverterUInt64.read(from: &buf), - minPageBytes: FfiConverterUInt32.read(from: &buf), - targetPageBytes: FfiConverterUInt32.read(from: &buf), - maxPageBytes: FfiConverterUInt32.read(from: &buf), - overflowHashSeed: FfiConverterUInt64.read(from: &buf), - inlineThresholdBytes: FfiConverterUInt32.read(from: &buf), - scalarQuantizationGroupSize: FfiConverterOptionUInt32.read(from: &buf) + try ProximityMutationStatsRecord( + directoryEntriesScanned: FfiConverterUInt64.read(from: &buf), + directoryNodesRead: FfiConverterUInt64.read(from: &buf), + directoryNodesRebuilt: FfiConverterUInt64.read(from: &buf), + directoryNodesWritten: FfiConverterUInt64.read(from: &buf), + directoryNodesReused: FfiConverterUInt64.read(from: &buf), + directoryLevelsRebuilt: FfiConverterUInt64.read(from: &buf), + directoryRightEdgeRebuilt: FfiConverterBool.read(from: &buf), + nodesRead: FfiConverterUInt64.read(from: &buf), + nodesWritten: FfiConverterUInt64.read(from: &buf), + nodesReused: FfiConverterUInt64.read(from: &buf), + recordsRebuilt: FfiConverterUInt64.read(from: &buf), + distanceEvaluations: FfiConverterUInt64.read(from: &buf), + fullProximityRebuild: FfiConverterBool.read(from: &buf) ) } - public static func write(_ value: ProximityConfigRecord, into buf: inout [UInt8]) { - FfiConverterUInt32.write(value.dimensions, into: &buf) - FfiConverterTypeDistanceMetricRecord.write(value.metric, into: &buf) - FfiConverterUInt8.write(value.logChunkSize, into: &buf) - FfiConverterUInt64.write(value.levelHashSeed, into: &buf) - FfiConverterUInt32.write(value.minPageBytes, into: &buf) - FfiConverterUInt32.write(value.targetPageBytes, into: &buf) - FfiConverterUInt32.write(value.maxPageBytes, into: &buf) - FfiConverterUInt64.write(value.overflowHashSeed, into: &buf) - FfiConverterUInt32.write(value.inlineThresholdBytes, into: &buf) - FfiConverterOptionUInt32.write(value.scalarQuantizationGroupSize, into: &buf) + public static func write(_ value: ProximityMutationStatsRecord, into buf: inout [UInt8]) { + FfiConverterUInt64.write(value.directoryEntriesScanned, into: &buf) + FfiConverterUInt64.write(value.directoryNodesRead, into: &buf) + FfiConverterUInt64.write(value.directoryNodesRebuilt, into: &buf) + FfiConverterUInt64.write(value.directoryNodesWritten, into: &buf) + FfiConverterUInt64.write(value.directoryNodesReused, into: &buf) + FfiConverterUInt64.write(value.directoryLevelsRebuilt, into: &buf) + FfiConverterBool.write(value.directoryRightEdgeRebuilt, into: &buf) + FfiConverterUInt64.write(value.nodesRead, into: &buf) + FfiConverterUInt64.write(value.nodesWritten, into: &buf) + FfiConverterUInt64.write(value.nodesReused, into: &buf) + FfiConverterUInt64.write(value.recordsRebuilt, into: &buf) + FfiConverterUInt64.write(value.distanceEvaluations, into: &buf) + FfiConverterBool.write(value.fullProximityRebuild, into: &buf) } } @@ -19285,65 +19960,57 @@ public struct FfiConverterTypeProximityConfigRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeProximityConfigRecord_lift(_ buf: RustBuffer) throws -> ProximityConfigRecord { - return try FfiConverterTypeProximityConfigRecord.lift(buf) +public func FfiConverterTypeProximityMutationStatsRecord_lift(_ buf: RustBuffer) throws -> ProximityMutationStatsRecord { + return try FfiConverterTypeProximityMutationStatsRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeProximityConfigRecord_lower(_ value: ProximityConfigRecord) -> RustBuffer { - return FfiConverterTypeProximityConfigRecord.lower(value) +public func FfiConverterTypeProximityMutationStatsRecord_lower(_ value: ProximityMutationStatsRecord) -> RustBuffer { + return FfiConverterTypeProximityMutationStatsRecord.lower(value) } -public struct ProximityFilterRecord: Equatable, Hashable { - public var kind: ProximityFilterKind - public var start: Data? - public var rangeEnd: Data? - public var prefix: Data? - public var eligibleKeys: [Data] +public struct ProximityNeighborRecord: Equatable, Hashable { + public var key: Data + public var value: Data + public var distance: Double // Default memberwise initializers are never public by default, so we // declare one manually. - public init(kind: ProximityFilterKind, start: Data?, rangeEnd: Data?, prefix: Data?, eligibleKeys: [Data]) { - self.kind = kind - self.start = start - self.rangeEnd = rangeEnd - self.prefix = prefix - self.eligibleKeys = eligibleKeys + public init(key: Data, value: Data, distance: Double) { + self.key = key + self.value = value + self.distance = distance } - - + + } #if compiler(>=6) -extension ProximityFilterRecord: Sendable {} +extension ProximityNeighborRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeProximityFilterRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ProximityFilterRecord { +public struct FfiConverterTypeProximityNeighborRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ProximityNeighborRecord { return - try ProximityFilterRecord( - kind: FfiConverterTypeProximityFilterKind.read(from: &buf), - start: FfiConverterOptionData.read(from: &buf), - rangeEnd: FfiConverterOptionData.read(from: &buf), - prefix: FfiConverterOptionData.read(from: &buf), - eligibleKeys: FfiConverterSequenceData.read(from: &buf) + try ProximityNeighborRecord( + key: FfiConverterData.read(from: &buf), + value: FfiConverterData.read(from: &buf), + distance: FfiConverterDouble.read(from: &buf) ) } - public static func write(_ value: ProximityFilterRecord, into buf: inout [UInt8]) { - FfiConverterTypeProximityFilterKind.write(value.kind, into: &buf) - FfiConverterOptionData.write(value.start, into: &buf) - FfiConverterOptionData.write(value.rangeEnd, into: &buf) - FfiConverterOptionData.write(value.prefix, into: &buf) - FfiConverterSequenceData.write(value.eligibleKeys, into: &buf) + public static func write(_ value: ProximityNeighborRecord, into buf: inout [UInt8]) { + FfiConverterData.write(value.key, into: &buf) + FfiConverterData.write(value.value, into: &buf) + FfiConverterDouble.write(value.distance, into: &buf) } } @@ -19351,119 +20018,111 @@ public struct FfiConverterTypeProximityFilterRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeProximityFilterRecord_lift(_ buf: RustBuffer) throws -> ProximityFilterRecord { - return try FfiConverterTypeProximityFilterRecord.lift(buf) +public func FfiConverterTypeProximityNeighborRecord_lift(_ buf: RustBuffer) throws -> ProximityNeighborRecord { + return try FfiConverterTypeProximityNeighborRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeProximityFilterRecord_lower(_ value: ProximityFilterRecord) -> RustBuffer { - return FfiConverterTypeProximityFilterRecord.lower(value) +public func FfiConverterTypeProximityNeighborRecord_lower(_ value: ProximityNeighborRecord) -> RustBuffer { + return FfiConverterTypeProximityNeighborRecord.lower(value) } -public struct ProximityMembershipProofRecord: Equatable, Hashable { - public var descriptor: Data - public var descriptorBytes: Data - public var directoryProof: KeyProofRecord - public var recordBytes: Data? +public struct ProximityRecordRecord: Equatable, Hashable { + public var key: Data + public var vector: [Float] + public var value: Data // Default memberwise initializers are never public by default, so we // declare one manually. - public init(descriptor: Data, descriptorBytes: Data, directoryProof: KeyProofRecord, recordBytes: Data?) { - self.descriptor = descriptor - self.descriptorBytes = descriptorBytes - self.directoryProof = directoryProof - self.recordBytes = recordBytes + public init(key: Data, vector: [Float], value: Data) { + self.key = key + self.vector = vector + self.value = value } - - + + } #if compiler(>=6) -extension ProximityMembershipProofRecord: Sendable {} +extension ProximityRecordRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeProximityMembershipProofRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ProximityMembershipProofRecord { +public struct FfiConverterTypeProximityRecordRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ProximityRecordRecord { return - try ProximityMembershipProofRecord( - descriptor: FfiConverterData.read(from: &buf), - descriptorBytes: FfiConverterData.read(from: &buf), - directoryProof: FfiConverterTypeKeyProofRecord.read(from: &buf), - recordBytes: FfiConverterOptionData.read(from: &buf) + try ProximityRecordRecord( + key: FfiConverterData.read(from: &buf), + vector: FfiConverterSequenceFloat.read(from: &buf), + value: FfiConverterData.read(from: &buf) ) } - public static func write(_ value: ProximityMembershipProofRecord, into buf: inout [UInt8]) { - FfiConverterData.write(value.descriptor, into: &buf) - FfiConverterData.write(value.descriptorBytes, into: &buf) - FfiConverterTypeKeyProofRecord.write(value.directoryProof, into: &buf) - FfiConverterOptionData.write(value.recordBytes, into: &buf) + public static func write(_ value: ProximityRecordRecord, into buf: inout [UInt8]) { + FfiConverterData.write(value.key, into: &buf) + FfiConverterSequenceFloat.write(value.vector, into: &buf) + FfiConverterData.write(value.value, into: &buf) } } #if swift(>=5.8) @_documentation(visibility: private) -#endif -public func FfiConverterTypeProximityMembershipProofRecord_lift(_ buf: RustBuffer) throws -> ProximityMembershipProofRecord { - return try FfiConverterTypeProximityMembershipProofRecord.lift(buf) +#endif +public func FfiConverterTypeProximityRecordRecord_lift(_ buf: RustBuffer) throws -> ProximityRecordRecord { + return try FfiConverterTypeProximityRecordRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeProximityMembershipProofRecord_lower(_ value: ProximityMembershipProofRecord) -> RustBuffer { - return FfiConverterTypeProximityMembershipProofRecord.lower(value) +public func FfiConverterTypeProximityRecordRecord_lower(_ value: ProximityRecordRecord) -> RustBuffer { + return FfiConverterTypeProximityRecordRecord.lower(value) } -public struct ProximityMembershipVerificationRecord: Equatable, Hashable { - public var descriptor: Data - public var key: Data - public var record: ExactProximityRecordRecord? +public struct ProximitySearchClaimRecord: Equatable, Hashable { + public var kind: ProximitySearchClaimKindRecord + public var terminalLowerBound: Double? // Default memberwise initializers are never public by default, so we // declare one manually. - public init(descriptor: Data, key: Data, record: ExactProximityRecordRecord?) { - self.descriptor = descriptor - self.key = key - self.record = record + public init(kind: ProximitySearchClaimKindRecord, terminalLowerBound: Double?) { + self.kind = kind + self.terminalLowerBound = terminalLowerBound } - - + + } #if compiler(>=6) -extension ProximityMembershipVerificationRecord: Sendable {} +extension ProximitySearchClaimRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeProximityMembershipVerificationRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ProximityMembershipVerificationRecord { +public struct FfiConverterTypeProximitySearchClaimRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ProximitySearchClaimRecord { return - try ProximityMembershipVerificationRecord( - descriptor: FfiConverterData.read(from: &buf), - key: FfiConverterData.read(from: &buf), - record: FfiConverterOptionTypeExactProximityRecordRecord.read(from: &buf) + try ProximitySearchClaimRecord( + kind: FfiConverterTypeProximitySearchClaimKindRecord.read(from: &buf), + terminalLowerBound: FfiConverterOptionDouble.read(from: &buf) ) } - public static func write(_ value: ProximityMembershipVerificationRecord, into buf: inout [UInt8]) { - FfiConverterData.write(value.descriptor, into: &buf) - FfiConverterData.write(value.key, into: &buf) - FfiConverterOptionTypeExactProximityRecordRecord.write(value.record, into: &buf) + public static func write(_ value: ProximitySearchClaimRecord, into buf: inout [UInt8]) { + FfiConverterTypeProximitySearchClaimKindRecord.write(value.kind, into: &buf) + FfiConverterOptionDouble.write(value.terminalLowerBound, into: &buf) } } @@ -19471,57 +20130,89 @@ public struct FfiConverterTypeProximityMembershipVerificationRecord: FfiConverte #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeProximityMembershipVerificationRecord_lift(_ buf: RustBuffer) throws -> ProximityMembershipVerificationRecord { - return try FfiConverterTypeProximityMembershipVerificationRecord.lift(buf) +public func FfiConverterTypeProximitySearchClaimRecord_lift(_ buf: RustBuffer) throws -> ProximitySearchClaimRecord { + return try FfiConverterTypeProximitySearchClaimRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeProximityMembershipVerificationRecord_lower(_ value: ProximityMembershipVerificationRecord) -> RustBuffer { - return FfiConverterTypeProximityMembershipVerificationRecord.lower(value) +public func FfiConverterTypeProximitySearchClaimRecord_lower(_ value: ProximitySearchClaimRecord) -> RustBuffer { + return FfiConverterTypeProximitySearchClaimRecord.lower(value) } -public struct ProximityMutationRecord: Equatable, Hashable { - public var key: Data - public var vector: [Float]? - public var value: Data? +public struct ProximitySearchRequestRecord: Equatable, Hashable { + public var query: [Float] + public var k: UInt64 + public var policy: SearchPolicyKind + public var adaptiveQuality: AdaptiveQualityRecord? + public var budget: SearchBudgetRecord + public var filter: ProximityFilterRecord + public var kernel: QueryKernelRecord + public var backend: SearchBackendRecord + public var hnswEfSearch: UInt32? + public var pqRerankMultiplier: UInt16? + public var turboquantRerankMultiplier: UInt16? // Default memberwise initializers are never public by default, so we // declare one manually. - public init(key: Data, vector: [Float]?, value: Data?) { - self.key = key - self.vector = vector - self.value = value + public init(query: [Float], k: UInt64, policy: SearchPolicyKind, adaptiveQuality: AdaptiveQualityRecord?, budget: SearchBudgetRecord, filter: ProximityFilterRecord, kernel: QueryKernelRecord, backend: SearchBackendRecord, hnswEfSearch: UInt32?, pqRerankMultiplier: UInt16?, turboquantRerankMultiplier: UInt16?) { + self.query = query + self.k = k + self.policy = policy + self.adaptiveQuality = adaptiveQuality + self.budget = budget + self.filter = filter + self.kernel = kernel + self.backend = backend + self.hnswEfSearch = hnswEfSearch + self.pqRerankMultiplier = pqRerankMultiplier + self.turboquantRerankMultiplier = turboquantRerankMultiplier } - - + + } #if compiler(>=6) -extension ProximityMutationRecord: Sendable {} +extension ProximitySearchRequestRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeProximityMutationRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ProximityMutationRecord { +public struct FfiConverterTypeProximitySearchRequestRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ProximitySearchRequestRecord { return - try ProximityMutationRecord( - key: FfiConverterData.read(from: &buf), - vector: FfiConverterOptionSequenceFloat.read(from: &buf), - value: FfiConverterOptionData.read(from: &buf) + try ProximitySearchRequestRecord( + query: FfiConverterSequenceFloat.read(from: &buf), + k: FfiConverterUInt64.read(from: &buf), + policy: FfiConverterTypeSearchPolicyKind.read(from: &buf), + adaptiveQuality: FfiConverterOptionTypeAdaptiveQualityRecord.read(from: &buf), + budget: FfiConverterTypeSearchBudgetRecord.read(from: &buf), + filter: FfiConverterTypeProximityFilterRecord.read(from: &buf), + kernel: FfiConverterTypeQueryKernelRecord.read(from: &buf), + backend: FfiConverterTypeSearchBackendRecord.read(from: &buf), + hnswEfSearch: FfiConverterOptionUInt32.read(from: &buf), + pqRerankMultiplier: FfiConverterOptionUInt16.read(from: &buf), + turboquantRerankMultiplier: FfiConverterOptionUInt16.read(from: &buf) ) } - public static func write(_ value: ProximityMutationRecord, into buf: inout [UInt8]) { - FfiConverterData.write(value.key, into: &buf) - FfiConverterOptionSequenceFloat.write(value.vector, into: &buf) - FfiConverterOptionData.write(value.value, into: &buf) + public static func write(_ value: ProximitySearchRequestRecord, into buf: inout [UInt8]) { + FfiConverterSequenceFloat.write(value.query, into: &buf) + FfiConverterUInt64.write(value.k, into: &buf) + FfiConverterTypeSearchPolicyKind.write(value.policy, into: &buf) + FfiConverterOptionTypeAdaptiveQualityRecord.write(value.adaptiveQuality, into: &buf) + FfiConverterTypeSearchBudgetRecord.write(value.budget, into: &buf) + FfiConverterTypeProximityFilterRecord.write(value.filter, into: &buf) + FfiConverterTypeQueryKernelRecord.write(value.kernel, into: &buf) + FfiConverterTypeSearchBackendRecord.write(value.backend, into: &buf) + FfiConverterOptionUInt32.write(value.hnswEfSearch, into: &buf) + FfiConverterOptionUInt16.write(value.pqRerankMultiplier, into: &buf) + FfiConverterOptionUInt16.write(value.turboquantRerankMultiplier, into: &buf) } } @@ -19529,53 +20220,65 @@ public struct FfiConverterTypeProximityMutationRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeProximityMutationRecord_lift(_ buf: RustBuffer) throws -> ProximityMutationRecord { - return try FfiConverterTypeProximityMutationRecord.lift(buf) +public func FfiConverterTypeProximitySearchRequestRecord_lift(_ buf: RustBuffer) throws -> ProximitySearchRequestRecord { + return try FfiConverterTypeProximitySearchRequestRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeProximityMutationRecord_lower(_ value: ProximityMutationRecord) -> RustBuffer { - return FfiConverterTypeProximityMutationRecord.lower(value) +public func FfiConverterTypeProximitySearchRequestRecord_lower(_ value: ProximitySearchRequestRecord) -> RustBuffer { + return FfiConverterTypeProximitySearchRequestRecord.lower(value) } -public struct ProximityMutationResultRecord { - public var map: BindingProximityMap - public var stats: ProximityMutationStatsRecord +public struct ProximitySearchResultRecord: Equatable, Hashable { + public var neighbors: [ProximityNeighborRecord] + public var stats: ProximitySearchStatsRecord + public var completion: SearchCompletionRecord + public var backend: SearchBackendRecord + public var planFormatVersion: UInt8 // Default memberwise initializers are never public by default, so we // declare one manually. - public init(map: BindingProximityMap, stats: ProximityMutationStatsRecord) { - self.map = map + public init(neighbors: [ProximityNeighborRecord], stats: ProximitySearchStatsRecord, completion: SearchCompletionRecord, backend: SearchBackendRecord, planFormatVersion: UInt8) { + self.neighbors = neighbors self.stats = stats + self.completion = completion + self.backend = backend + self.planFormatVersion = planFormatVersion } - - + + } #if compiler(>=6) -extension ProximityMutationResultRecord: Sendable {} +extension ProximitySearchResultRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeProximityMutationResultRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ProximityMutationResultRecord { +public struct FfiConverterTypeProximitySearchResultRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ProximitySearchResultRecord { return - try ProximityMutationResultRecord( - map: FfiConverterTypeBindingProximityMap.read(from: &buf), - stats: FfiConverterTypeProximityMutationStatsRecord.read(from: &buf) + try ProximitySearchResultRecord( + neighbors: FfiConverterSequenceTypeProximityNeighborRecord.read(from: &buf), + stats: FfiConverterTypeProximitySearchStatsRecord.read(from: &buf), + completion: FfiConverterTypeSearchCompletionRecord.read(from: &buf), + backend: FfiConverterTypeSearchBackendRecord.read(from: &buf), + planFormatVersion: FfiConverterUInt8.read(from: &buf) ) } - public static func write(_ value: ProximityMutationResultRecord, into buf: inout [UInt8]) { - FfiConverterTypeBindingProximityMap.write(value.map, into: &buf) - FfiConverterTypeProximityMutationStatsRecord.write(value.stats, into: &buf) + public static func write(_ value: ProximitySearchResultRecord, into buf: inout [UInt8]) { + FfiConverterSequenceTypeProximityNeighborRecord.write(value.neighbors, into: &buf) + FfiConverterTypeProximitySearchStatsRecord.write(value.stats, into: &buf) + FfiConverterTypeSearchCompletionRecord.write(value.completion, into: &buf) + FfiConverterTypeSearchBackendRecord.write(value.backend, into: &buf) + FfiConverterUInt8.write(value.planFormatVersion, into: &buf) } } @@ -19583,97 +20286,69 @@ public struct FfiConverterTypeProximityMutationResultRecord: FfiConverterRustBuf #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeProximityMutationResultRecord_lift(_ buf: RustBuffer) throws -> ProximityMutationResultRecord { - return try FfiConverterTypeProximityMutationResultRecord.lift(buf) +public func FfiConverterTypeProximitySearchResultRecord_lift(_ buf: RustBuffer) throws -> ProximitySearchResultRecord { + return try FfiConverterTypeProximitySearchResultRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeProximityMutationResultRecord_lower(_ value: ProximityMutationResultRecord) -> RustBuffer { - return FfiConverterTypeProximityMutationResultRecord.lower(value) +public func FfiConverterTypeProximitySearchResultRecord_lower(_ value: ProximitySearchResultRecord) -> RustBuffer { + return FfiConverterTypeProximitySearchResultRecord.lower(value) } -public struct ProximityMutationStatsRecord: Equatable, Hashable { - public var directoryEntriesScanned: UInt64 - public var directoryNodesRead: UInt64 - public var directoryNodesRebuilt: UInt64 - public var directoryNodesWritten: UInt64 - public var directoryNodesReused: UInt64 - public var directoryLevelsRebuilt: UInt64 - public var directoryRightEdgeRebuilt: Bool - public var nodesRead: UInt64 - public var nodesWritten: UInt64 - public var nodesReused: UInt64 - public var recordsRebuilt: UInt64 - public var distanceEvaluations: UInt64 - public var fullProximityRebuild: Bool +public struct ProximitySearchRuntimePolicyRecord: Equatable, Hashable { + public var maxEntries: UInt64 + public var maxBytes: UInt64 + public var authoritativeMaxBytes: UInt64 + public var hnswMaxBytes: UInt64 + public var pqMaxBytes: UInt64 + public var turboquantMaxBytes: UInt64 // Default memberwise initializers are never public by default, so we // declare one manually. - public init(directoryEntriesScanned: UInt64, directoryNodesRead: UInt64, directoryNodesRebuilt: UInt64, directoryNodesWritten: UInt64, directoryNodesReused: UInt64, directoryLevelsRebuilt: UInt64, directoryRightEdgeRebuilt: Bool, nodesRead: UInt64, nodesWritten: UInt64, nodesReused: UInt64, recordsRebuilt: UInt64, distanceEvaluations: UInt64, fullProximityRebuild: Bool) { - self.directoryEntriesScanned = directoryEntriesScanned - self.directoryNodesRead = directoryNodesRead - self.directoryNodesRebuilt = directoryNodesRebuilt - self.directoryNodesWritten = directoryNodesWritten - self.directoryNodesReused = directoryNodesReused - self.directoryLevelsRebuilt = directoryLevelsRebuilt - self.directoryRightEdgeRebuilt = directoryRightEdgeRebuilt - self.nodesRead = nodesRead - self.nodesWritten = nodesWritten - self.nodesReused = nodesReused - self.recordsRebuilt = recordsRebuilt - self.distanceEvaluations = distanceEvaluations - self.fullProximityRebuild = fullProximityRebuild + public init(maxEntries: UInt64, maxBytes: UInt64, authoritativeMaxBytes: UInt64, hnswMaxBytes: UInt64, pqMaxBytes: UInt64, turboquantMaxBytes: UInt64) { + self.maxEntries = maxEntries + self.maxBytes = maxBytes + self.authoritativeMaxBytes = authoritativeMaxBytes + self.hnswMaxBytes = hnswMaxBytes + self.pqMaxBytes = pqMaxBytes + self.turboquantMaxBytes = turboquantMaxBytes } - - + + } #if compiler(>=6) -extension ProximityMutationStatsRecord: Sendable {} +extension ProximitySearchRuntimePolicyRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeProximityMutationStatsRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ProximityMutationStatsRecord { +public struct FfiConverterTypeProximitySearchRuntimePolicyRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ProximitySearchRuntimePolicyRecord { return - try ProximityMutationStatsRecord( - directoryEntriesScanned: FfiConverterUInt64.read(from: &buf), - directoryNodesRead: FfiConverterUInt64.read(from: &buf), - directoryNodesRebuilt: FfiConverterUInt64.read(from: &buf), - directoryNodesWritten: FfiConverterUInt64.read(from: &buf), - directoryNodesReused: FfiConverterUInt64.read(from: &buf), - directoryLevelsRebuilt: FfiConverterUInt64.read(from: &buf), - directoryRightEdgeRebuilt: FfiConverterBool.read(from: &buf), - nodesRead: FfiConverterUInt64.read(from: &buf), - nodesWritten: FfiConverterUInt64.read(from: &buf), - nodesReused: FfiConverterUInt64.read(from: &buf), - recordsRebuilt: FfiConverterUInt64.read(from: &buf), - distanceEvaluations: FfiConverterUInt64.read(from: &buf), - fullProximityRebuild: FfiConverterBool.read(from: &buf) + try ProximitySearchRuntimePolicyRecord( + maxEntries: FfiConverterUInt64.read(from: &buf), + maxBytes: FfiConverterUInt64.read(from: &buf), + authoritativeMaxBytes: FfiConverterUInt64.read(from: &buf), + hnswMaxBytes: FfiConverterUInt64.read(from: &buf), + pqMaxBytes: FfiConverterUInt64.read(from: &buf), + turboquantMaxBytes: FfiConverterUInt64.read(from: &buf) ) } - public static func write(_ value: ProximityMutationStatsRecord, into buf: inout [UInt8]) { - FfiConverterUInt64.write(value.directoryEntriesScanned, into: &buf) - FfiConverterUInt64.write(value.directoryNodesRead, into: &buf) - FfiConverterUInt64.write(value.directoryNodesRebuilt, into: &buf) - FfiConverterUInt64.write(value.directoryNodesWritten, into: &buf) - FfiConverterUInt64.write(value.directoryNodesReused, into: &buf) - FfiConverterUInt64.write(value.directoryLevelsRebuilt, into: &buf) - FfiConverterBool.write(value.directoryRightEdgeRebuilt, into: &buf) - FfiConverterUInt64.write(value.nodesRead, into: &buf) - FfiConverterUInt64.write(value.nodesWritten, into: &buf) - FfiConverterUInt64.write(value.nodesReused, into: &buf) - FfiConverterUInt64.write(value.recordsRebuilt, into: &buf) - FfiConverterUInt64.write(value.distanceEvaluations, into: &buf) - FfiConverterBool.write(value.fullProximityRebuild, into: &buf) + public static func write(_ value: ProximitySearchRuntimePolicyRecord, into buf: inout [UInt8]) { + FfiConverterUInt64.write(value.maxEntries, into: &buf) + FfiConverterUInt64.write(value.maxBytes, into: &buf) + FfiConverterUInt64.write(value.authoritativeMaxBytes, into: &buf) + FfiConverterUInt64.write(value.hnswMaxBytes, into: &buf) + FfiConverterUInt64.write(value.pqMaxBytes, into: &buf) + FfiConverterUInt64.write(value.turboquantMaxBytes, into: &buf) } } @@ -19681,57 +20356,53 @@ public struct FfiConverterTypeProximityMutationStatsRecord: FfiConverterRustBuff #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeProximityMutationStatsRecord_lift(_ buf: RustBuffer) throws -> ProximityMutationStatsRecord { - return try FfiConverterTypeProximityMutationStatsRecord.lift(buf) +public func FfiConverterTypeProximitySearchRuntimePolicyRecord_lift(_ buf: RustBuffer) throws -> ProximitySearchRuntimePolicyRecord { + return try FfiConverterTypeProximitySearchRuntimePolicyRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeProximityMutationStatsRecord_lower(_ value: ProximityMutationStatsRecord) -> RustBuffer { - return FfiConverterTypeProximityMutationStatsRecord.lower(value) +public func FfiConverterTypeProximitySearchRuntimePolicyRecord_lower(_ value: ProximitySearchRuntimePolicyRecord) -> RustBuffer { + return FfiConverterTypeProximitySearchRuntimePolicyRecord.lower(value) } -public struct ProximityNeighborRecord: Equatable, Hashable { - public var key: Data - public var value: Data - public var distance: Double +public struct ProximitySearchRuntimeStatsRecord: Equatable, Hashable { + public var physicalReads: UInt64 + public var physicalBytesRead: UInt64 // Default memberwise initializers are never public by default, so we // declare one manually. - public init(key: Data, value: Data, distance: Double) { - self.key = key - self.value = value - self.distance = distance + public init(physicalReads: UInt64, physicalBytesRead: UInt64) { + self.physicalReads = physicalReads + self.physicalBytesRead = physicalBytesRead } - - + + } #if compiler(>=6) -extension ProximityNeighborRecord: Sendable {} +extension ProximitySearchRuntimeStatsRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeProximityNeighborRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ProximityNeighborRecord { +public struct FfiConverterTypeProximitySearchRuntimeStatsRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ProximitySearchRuntimeStatsRecord { return - try ProximityNeighborRecord( - key: FfiConverterData.read(from: &buf), - value: FfiConverterData.read(from: &buf), - distance: FfiConverterDouble.read(from: &buf) + try ProximitySearchRuntimeStatsRecord( + physicalReads: FfiConverterUInt64.read(from: &buf), + physicalBytesRead: FfiConverterUInt64.read(from: &buf) ) } - public static func write(_ value: ProximityNeighborRecord, into buf: inout [UInt8]) { - FfiConverterData.write(value.key, into: &buf) - FfiConverterData.write(value.value, into: &buf) - FfiConverterDouble.write(value.distance, into: &buf) + public static func write(_ value: ProximitySearchRuntimeStatsRecord, into buf: inout [UInt8]) { + FfiConverterUInt64.write(value.physicalReads, into: &buf) + FfiConverterUInt64.write(value.physicalBytesRead, into: &buf) } } @@ -19739,57 +20410,89 @@ public struct FfiConverterTypeProximityNeighborRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeProximityNeighborRecord_lift(_ buf: RustBuffer) throws -> ProximityNeighborRecord { - return try FfiConverterTypeProximityNeighborRecord.lift(buf) +public func FfiConverterTypeProximitySearchRuntimeStatsRecord_lift(_ buf: RustBuffer) throws -> ProximitySearchRuntimeStatsRecord { + return try FfiConverterTypeProximitySearchRuntimeStatsRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeProximityNeighborRecord_lower(_ value: ProximityNeighborRecord) -> RustBuffer { - return FfiConverterTypeProximityNeighborRecord.lower(value) +public func FfiConverterTypeProximitySearchRuntimeStatsRecord_lower(_ value: ProximitySearchRuntimeStatsRecord) -> RustBuffer { + return FfiConverterTypeProximitySearchRuntimeStatsRecord.lower(value) } -public struct ProximityRecordRecord: Equatable, Hashable { - public var key: Data - public var vector: [Float] - public var value: Data +public struct ProximitySearchStatsRecord: Equatable, Hashable { + public var levelsVisited: UInt64 + public var nodesRead: UInt64 + public var bytesRead: UInt64 + public var physicalBytesRead: UInt64 + public var committedBytes: UInt64 + public var distanceEvaluations: UInt64 + public var quantizedDistanceEvaluations: UInt64 + public var rerankedCandidates: UInt64 + public var frontierPeak: UInt64 + public var candidateHandlesPeak: UInt64 + public var candidateRetainedBytesPeak: UInt64 // Default memberwise initializers are never public by default, so we // declare one manually. - public init(key: Data, vector: [Float], value: Data) { - self.key = key - self.vector = vector - self.value = value + public init(levelsVisited: UInt64, nodesRead: UInt64, bytesRead: UInt64, physicalBytesRead: UInt64, committedBytes: UInt64, distanceEvaluations: UInt64, quantizedDistanceEvaluations: UInt64, rerankedCandidates: UInt64, frontierPeak: UInt64, candidateHandlesPeak: UInt64, candidateRetainedBytesPeak: UInt64) { + self.levelsVisited = levelsVisited + self.nodesRead = nodesRead + self.bytesRead = bytesRead + self.physicalBytesRead = physicalBytesRead + self.committedBytes = committedBytes + self.distanceEvaluations = distanceEvaluations + self.quantizedDistanceEvaluations = quantizedDistanceEvaluations + self.rerankedCandidates = rerankedCandidates + self.frontierPeak = frontierPeak + self.candidateHandlesPeak = candidateHandlesPeak + self.candidateRetainedBytesPeak = candidateRetainedBytesPeak } - - + + } #if compiler(>=6) -extension ProximityRecordRecord: Sendable {} +extension ProximitySearchStatsRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeProximityRecordRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ProximityRecordRecord { +public struct FfiConverterTypeProximitySearchStatsRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ProximitySearchStatsRecord { return - try ProximityRecordRecord( - key: FfiConverterData.read(from: &buf), - vector: FfiConverterSequenceFloat.read(from: &buf), - value: FfiConverterData.read(from: &buf) + try ProximitySearchStatsRecord( + levelsVisited: FfiConverterUInt64.read(from: &buf), + nodesRead: FfiConverterUInt64.read(from: &buf), + bytesRead: FfiConverterUInt64.read(from: &buf), + physicalBytesRead: FfiConverterUInt64.read(from: &buf), + committedBytes: FfiConverterUInt64.read(from: &buf), + distanceEvaluations: FfiConverterUInt64.read(from: &buf), + quantizedDistanceEvaluations: FfiConverterUInt64.read(from: &buf), + rerankedCandidates: FfiConverterUInt64.read(from: &buf), + frontierPeak: FfiConverterUInt64.read(from: &buf), + candidateHandlesPeak: FfiConverterUInt64.read(from: &buf), + candidateRetainedBytesPeak: FfiConverterUInt64.read(from: &buf) ) } - public static func write(_ value: ProximityRecordRecord, into buf: inout [UInt8]) { - FfiConverterData.write(value.key, into: &buf) - FfiConverterSequenceFloat.write(value.vector, into: &buf) - FfiConverterData.write(value.value, into: &buf) + public static func write(_ value: ProximitySearchStatsRecord, into buf: inout [UInt8]) { + FfiConverterUInt64.write(value.levelsVisited, into: &buf) + FfiConverterUInt64.write(value.nodesRead, into: &buf) + FfiConverterUInt64.write(value.bytesRead, into: &buf) + FfiConverterUInt64.write(value.physicalBytesRead, into: &buf) + FfiConverterUInt64.write(value.committedBytes, into: &buf) + FfiConverterUInt64.write(value.distanceEvaluations, into: &buf) + FfiConverterUInt64.write(value.quantizedDistanceEvaluations, into: &buf) + FfiConverterUInt64.write(value.rerankedCandidates, into: &buf) + FfiConverterUInt64.write(value.frontierPeak, into: &buf) + FfiConverterUInt64.write(value.candidateHandlesPeak, into: &buf) + FfiConverterUInt64.write(value.candidateRetainedBytesPeak, into: &buf) } } @@ -19797,53 +20500,57 @@ public struct FfiConverterTypeProximityRecordRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeProximityRecordRecord_lift(_ buf: RustBuffer) throws -> ProximityRecordRecord { - return try FfiConverterTypeProximityRecordRecord.lift(buf) +public func FfiConverterTypeProximitySearchStatsRecord_lift(_ buf: RustBuffer) throws -> ProximitySearchStatsRecord { + return try FfiConverterTypeProximitySearchStatsRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeProximityRecordRecord_lower(_ value: ProximityRecordRecord) -> RustBuffer { - return FfiConverterTypeProximityRecordRecord.lower(value) +public func FfiConverterTypeProximitySearchStatsRecord_lower(_ value: ProximitySearchStatsRecord) -> RustBuffer { + return FfiConverterTypeProximitySearchStatsRecord.lower(value) } -public struct ProximitySearchClaimRecord: Equatable, Hashable { - public var kind: ProximitySearchClaimKindRecord - public var terminalLowerBound: Double? +public struct ProximitySearchVerificationRecord: Equatable, Hashable { + public var result: ProximitySearchResultRecord + public var claim: ProximitySearchClaimRecord + public var replayedEvents: UInt64 // Default memberwise initializers are never public by default, so we // declare one manually. - public init(kind: ProximitySearchClaimKindRecord, terminalLowerBound: Double?) { - self.kind = kind - self.terminalLowerBound = terminalLowerBound + public init(result: ProximitySearchResultRecord, claim: ProximitySearchClaimRecord, replayedEvents: UInt64) { + self.result = result + self.claim = claim + self.replayedEvents = replayedEvents } - - + + } #if compiler(>=6) -extension ProximitySearchClaimRecord: Sendable {} +extension ProximitySearchVerificationRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeProximitySearchClaimRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ProximitySearchClaimRecord { +public struct FfiConverterTypeProximitySearchVerificationRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ProximitySearchVerificationRecord { return - try ProximitySearchClaimRecord( - kind: FfiConverterTypeProximitySearchClaimKindRecord.read(from: &buf), - terminalLowerBound: FfiConverterOptionDouble.read(from: &buf) + try ProximitySearchVerificationRecord( + result: FfiConverterTypeProximitySearchResultRecord.read(from: &buf), + claim: FfiConverterTypeProximitySearchClaimRecord.read(from: &buf), + replayedEvents: FfiConverterUInt64.read(from: &buf) ) } - public static func write(_ value: ProximitySearchClaimRecord, into buf: inout [UInt8]) { - FfiConverterTypeProximitySearchClaimKindRecord.write(value.kind, into: &buf) - FfiConverterOptionDouble.write(value.terminalLowerBound, into: &buf) + public static func write(_ value: ProximitySearchVerificationRecord, into buf: inout [UInt8]) { + FfiConverterTypeProximitySearchResultRecord.write(value.result, into: &buf) + FfiConverterTypeProximitySearchClaimRecord.write(value.claim, into: &buf) + FfiConverterUInt64.write(value.replayedEvents, into: &buf) } } @@ -19851,85 +20558,53 @@ public struct FfiConverterTypeProximitySearchClaimRecord: FfiConverterRustBuffer #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeProximitySearchClaimRecord_lift(_ buf: RustBuffer) throws -> ProximitySearchClaimRecord { - return try FfiConverterTypeProximitySearchClaimRecord.lift(buf) +public func FfiConverterTypeProximitySearchVerificationRecord_lift(_ buf: RustBuffer) throws -> ProximitySearchVerificationRecord { + return try FfiConverterTypeProximitySearchVerificationRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeProximitySearchClaimRecord_lower(_ value: ProximitySearchClaimRecord) -> RustBuffer { - return FfiConverterTypeProximitySearchClaimRecord.lower(value) +public func FfiConverterTypeProximitySearchVerificationRecord_lower(_ value: ProximitySearchVerificationRecord) -> RustBuffer { + return FfiConverterTypeProximitySearchVerificationRecord.lower(value) } -public struct ProximitySearchRequestRecord: Equatable, Hashable { - public var query: [Float] - public var k: UInt64 - public var policy: SearchPolicyKind - public var adaptiveQuality: AdaptiveQualityRecord? - public var budget: SearchBudgetRecord - public var filter: ProximityFilterRecord - public var kernel: QueryKernelRecord - public var backend: SearchBackendRecord - public var hnswEfSearch: UInt32? - public var pqRerankMultiplier: UInt16? +public struct ProximityStructuralProofRecord: Equatable, Hashable { + public var descriptor: Data + public var objects: [TypedContentObjectRecord] // Default memberwise initializers are never public by default, so we // declare one manually. - public init(query: [Float], k: UInt64, policy: SearchPolicyKind, adaptiveQuality: AdaptiveQualityRecord?, budget: SearchBudgetRecord, filter: ProximityFilterRecord, kernel: QueryKernelRecord, backend: SearchBackendRecord, hnswEfSearch: UInt32?, pqRerankMultiplier: UInt16?) { - self.query = query - self.k = k - self.policy = policy - self.adaptiveQuality = adaptiveQuality - self.budget = budget - self.filter = filter - self.kernel = kernel - self.backend = backend - self.hnswEfSearch = hnswEfSearch - self.pqRerankMultiplier = pqRerankMultiplier + public init(descriptor: Data, objects: [TypedContentObjectRecord]) { + self.descriptor = descriptor + self.objects = objects } - - + + } #if compiler(>=6) -extension ProximitySearchRequestRecord: Sendable {} +extension ProximityStructuralProofRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeProximitySearchRequestRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ProximitySearchRequestRecord { +public struct FfiConverterTypeProximityStructuralProofRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ProximityStructuralProofRecord { return - try ProximitySearchRequestRecord( - query: FfiConverterSequenceFloat.read(from: &buf), - k: FfiConverterUInt64.read(from: &buf), - policy: FfiConverterTypeSearchPolicyKind.read(from: &buf), - adaptiveQuality: FfiConverterOptionTypeAdaptiveQualityRecord.read(from: &buf), - budget: FfiConverterTypeSearchBudgetRecord.read(from: &buf), - filter: FfiConverterTypeProximityFilterRecord.read(from: &buf), - kernel: FfiConverterTypeQueryKernelRecord.read(from: &buf), - backend: FfiConverterTypeSearchBackendRecord.read(from: &buf), - hnswEfSearch: FfiConverterOptionUInt32.read(from: &buf), - pqRerankMultiplier: FfiConverterOptionUInt16.read(from: &buf) + try ProximityStructuralProofRecord( + descriptor: FfiConverterData.read(from: &buf), + objects: FfiConverterSequenceTypeTypedContentObjectRecord.read(from: &buf) ) } - public static func write(_ value: ProximitySearchRequestRecord, into buf: inout [UInt8]) { - FfiConverterSequenceFloat.write(value.query, into: &buf) - FfiConverterUInt64.write(value.k, into: &buf) - FfiConverterTypeSearchPolicyKind.write(value.policy, into: &buf) - FfiConverterOptionTypeAdaptiveQualityRecord.write(value.adaptiveQuality, into: &buf) - FfiConverterTypeSearchBudgetRecord.write(value.budget, into: &buf) - FfiConverterTypeProximityFilterRecord.write(value.filter, into: &buf) - FfiConverterTypeQueryKernelRecord.write(value.kernel, into: &buf) - FfiConverterTypeSearchBackendRecord.write(value.backend, into: &buf) - FfiConverterOptionUInt32.write(value.hnswEfSearch, into: &buf) - FfiConverterOptionUInt16.write(value.pqRerankMultiplier, into: &buf) + public static func write(_ value: ProximityStructuralProofRecord, into buf: inout [UInt8]) { + FfiConverterData.write(value.descriptor, into: &buf) + FfiConverterSequenceTypeTypedContentObjectRecord.write(value.objects, into: &buf) } } @@ -19937,65 +20612,57 @@ public struct FfiConverterTypeProximitySearchRequestRecord: FfiConverterRustBuff #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeProximitySearchRequestRecord_lift(_ buf: RustBuffer) throws -> ProximitySearchRequestRecord { - return try FfiConverterTypeProximitySearchRequestRecord.lift(buf) +public func FfiConverterTypeProximityStructuralProofRecord_lift(_ buf: RustBuffer) throws -> ProximityStructuralProofRecord { + return try FfiConverterTypeProximityStructuralProofRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeProximitySearchRequestRecord_lower(_ value: ProximitySearchRequestRecord) -> RustBuffer { - return FfiConverterTypeProximitySearchRequestRecord.lower(value) +public func FfiConverterTypeProximityStructuralProofRecord_lower(_ value: ProximityStructuralProofRecord) -> RustBuffer { + return FfiConverterTypeProximityStructuralProofRecord.lower(value) } -public struct ProximitySearchResultRecord: Equatable, Hashable { - public var neighbors: [ProximityNeighborRecord] - public var stats: ProximitySearchStatsRecord - public var completion: SearchCompletionRecord - public var backend: SearchBackendRecord - public var planFormatVersion: UInt8 +public struct ProximityStructuralVerificationRecord: Equatable, Hashable { + public var descriptor: Data + public var objectCount: UInt64 + public var summary: ProximityVerificationRecord // Default memberwise initializers are never public by default, so we // declare one manually. - public init(neighbors: [ProximityNeighborRecord], stats: ProximitySearchStatsRecord, completion: SearchCompletionRecord, backend: SearchBackendRecord, planFormatVersion: UInt8) { - self.neighbors = neighbors - self.stats = stats - self.completion = completion - self.backend = backend - self.planFormatVersion = planFormatVersion + public init(descriptor: Data, objectCount: UInt64, summary: ProximityVerificationRecord) { + self.descriptor = descriptor + self.objectCount = objectCount + self.summary = summary } - - + + } #if compiler(>=6) -extension ProximitySearchResultRecord: Sendable {} +extension ProximityStructuralVerificationRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeProximitySearchResultRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ProximitySearchResultRecord { +public struct FfiConverterTypeProximityStructuralVerificationRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ProximityStructuralVerificationRecord { return - try ProximitySearchResultRecord( - neighbors: FfiConverterSequenceTypeProximityNeighborRecord.read(from: &buf), - stats: FfiConverterTypeProximitySearchStatsRecord.read(from: &buf), - completion: FfiConverterTypeSearchCompletionRecord.read(from: &buf), - backend: FfiConverterTypeSearchBackendRecord.read(from: &buf), - planFormatVersion: FfiConverterUInt8.read(from: &buf) + try ProximityStructuralVerificationRecord( + descriptor: FfiConverterData.read(from: &buf), + objectCount: FfiConverterUInt64.read(from: &buf), + summary: FfiConverterTypeProximityVerificationRecord.read(from: &buf) ) } - public static func write(_ value: ProximitySearchResultRecord, into buf: inout [UInt8]) { - FfiConverterSequenceTypeProximityNeighborRecord.write(value.neighbors, into: &buf) - FfiConverterTypeProximitySearchStatsRecord.write(value.stats, into: &buf) - FfiConverterTypeSearchCompletionRecord.write(value.completion, into: &buf) - FfiConverterTypeSearchBackendRecord.write(value.backend, into: &buf) - FfiConverterUInt8.write(value.planFormatVersion, into: &buf) + public static func write(_ value: ProximityStructuralVerificationRecord, into buf: inout [UInt8]) { + FfiConverterData.write(value.descriptor, into: &buf) + FfiConverterUInt64.write(value.objectCount, into: &buf) + FfiConverterTypeProximityVerificationRecord.write(value.summary, into: &buf) } } @@ -20003,65 +20670,85 @@ public struct FfiConverterTypeProximitySearchResultRecord: FfiConverterRustBuffe #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeProximitySearchResultRecord_lift(_ buf: RustBuffer) throws -> ProximitySearchResultRecord { - return try FfiConverterTypeProximitySearchResultRecord.lift(buf) +public func FfiConverterTypeProximityStructuralVerificationRecord_lift(_ buf: RustBuffer) throws -> ProximityStructuralVerificationRecord { + return try FfiConverterTypeProximityStructuralVerificationRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeProximitySearchResultRecord_lower(_ value: ProximitySearchResultRecord) -> RustBuffer { - return FfiConverterTypeProximitySearchResultRecord.lower(value) +public func FfiConverterTypeProximityStructuralVerificationRecord_lower(_ value: ProximityStructuralVerificationRecord) -> RustBuffer { + return FfiConverterTypeProximityStructuralVerificationRecord.lower(value) } -public struct ProximitySearchRuntimePolicyRecord: Equatable, Hashable { - public var maxEntries: UInt64 - public var maxBytes: UInt64 - public var authoritativeMaxBytes: UInt64 - public var hnswMaxBytes: UInt64 - public var pqMaxBytes: UInt64 +public struct ProximityVerificationRecord: Equatable, Hashable { + public var recordCount: UInt64 + public var proximityNodeCount: UInt64 + public var externalVectorCount: UInt64 + public var quantizedNodeCount: UInt64 + public var scalarQuantizerCount: UInt64 + public var overflowPageCount: UInt64 + public var overflowDirectoryCount: UInt64 + public var maximumLevel: UInt8 + public var maximumNodeBytes: UInt64 + public var distanceChecks: UInt64 // Default memberwise initializers are never public by default, so we // declare one manually. - public init(maxEntries: UInt64, maxBytes: UInt64, authoritativeMaxBytes: UInt64, hnswMaxBytes: UInt64, pqMaxBytes: UInt64) { - self.maxEntries = maxEntries - self.maxBytes = maxBytes - self.authoritativeMaxBytes = authoritativeMaxBytes - self.hnswMaxBytes = hnswMaxBytes - self.pqMaxBytes = pqMaxBytes + public init(recordCount: UInt64, proximityNodeCount: UInt64, externalVectorCount: UInt64, quantizedNodeCount: UInt64, scalarQuantizerCount: UInt64, overflowPageCount: UInt64, overflowDirectoryCount: UInt64, maximumLevel: UInt8, maximumNodeBytes: UInt64, distanceChecks: UInt64) { + self.recordCount = recordCount + self.proximityNodeCount = proximityNodeCount + self.externalVectorCount = externalVectorCount + self.quantizedNodeCount = quantizedNodeCount + self.scalarQuantizerCount = scalarQuantizerCount + self.overflowPageCount = overflowPageCount + self.overflowDirectoryCount = overflowDirectoryCount + self.maximumLevel = maximumLevel + self.maximumNodeBytes = maximumNodeBytes + self.distanceChecks = distanceChecks } - - + + } #if compiler(>=6) -extension ProximitySearchRuntimePolicyRecord: Sendable {} +extension ProximityVerificationRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeProximitySearchRuntimePolicyRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ProximitySearchRuntimePolicyRecord { +public struct FfiConverterTypeProximityVerificationRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ProximityVerificationRecord { return - try ProximitySearchRuntimePolicyRecord( - maxEntries: FfiConverterUInt64.read(from: &buf), - maxBytes: FfiConverterUInt64.read(from: &buf), - authoritativeMaxBytes: FfiConverterUInt64.read(from: &buf), - hnswMaxBytes: FfiConverterUInt64.read(from: &buf), - pqMaxBytes: FfiConverterUInt64.read(from: &buf) + try ProximityVerificationRecord( + recordCount: FfiConverterUInt64.read(from: &buf), + proximityNodeCount: FfiConverterUInt64.read(from: &buf), + externalVectorCount: FfiConverterUInt64.read(from: &buf), + quantizedNodeCount: FfiConverterUInt64.read(from: &buf), + scalarQuantizerCount: FfiConverterUInt64.read(from: &buf), + overflowPageCount: FfiConverterUInt64.read(from: &buf), + overflowDirectoryCount: FfiConverterUInt64.read(from: &buf), + maximumLevel: FfiConverterUInt8.read(from: &buf), + maximumNodeBytes: FfiConverterUInt64.read(from: &buf), + distanceChecks: FfiConverterUInt64.read(from: &buf) ) } - public static func write(_ value: ProximitySearchRuntimePolicyRecord, into buf: inout [UInt8]) { - FfiConverterUInt64.write(value.maxEntries, into: &buf) - FfiConverterUInt64.write(value.maxBytes, into: &buf) - FfiConverterUInt64.write(value.authoritativeMaxBytes, into: &buf) - FfiConverterUInt64.write(value.hnswMaxBytes, into: &buf) - FfiConverterUInt64.write(value.pqMaxBytes, into: &buf) + public static func write(_ value: ProximityVerificationRecord, into buf: inout [UInt8]) { + FfiConverterUInt64.write(value.recordCount, into: &buf) + FfiConverterUInt64.write(value.proximityNodeCount, into: &buf) + FfiConverterUInt64.write(value.externalVectorCount, into: &buf) + FfiConverterUInt64.write(value.quantizedNodeCount, into: &buf) + FfiConverterUInt64.write(value.scalarQuantizerCount, into: &buf) + FfiConverterUInt64.write(value.overflowPageCount, into: &buf) + FfiConverterUInt64.write(value.overflowDirectoryCount, into: &buf) + FfiConverterUInt8.write(value.maximumLevel, into: &buf) + FfiConverterUInt64.write(value.maximumNodeBytes, into: &buf) + FfiConverterUInt64.write(value.distanceChecks, into: &buf) } } @@ -20069,53 +20756,49 @@ public struct FfiConverterTypeProximitySearchRuntimePolicyRecord: FfiConverterRu #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeProximitySearchRuntimePolicyRecord_lift(_ buf: RustBuffer) throws -> ProximitySearchRuntimePolicyRecord { - return try FfiConverterTypeProximitySearchRuntimePolicyRecord.lift(buf) +public func FfiConverterTypeProximityVerificationRecord_lift(_ buf: RustBuffer) throws -> ProximityVerificationRecord { + return try FfiConverterTypeProximityVerificationRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeProximitySearchRuntimePolicyRecord_lower(_ value: ProximitySearchRuntimePolicyRecord) -> RustBuffer { - return FfiConverterTypeProximitySearchRuntimePolicyRecord.lower(value) +public func FfiConverterTypeProximityVerificationRecord_lower(_ value: ProximityVerificationRecord) -> RustBuffer { + return FfiConverterTypeProximityVerificationRecord.lower(value) } -public struct ProximitySearchRuntimeStatsRecord: Equatable, Hashable { - public var physicalReads: UInt64 - public var physicalBytesRead: UInt64 +public struct PublicationOriginRecord: Equatable, Hashable { + public var code: UInt32 // Default memberwise initializers are never public by default, so we // declare one manually. - public init(physicalReads: UInt64, physicalBytesRead: UInt64) { - self.physicalReads = physicalReads - self.physicalBytesRead = physicalBytesRead + public init(code: UInt32) { + self.code = code } - - + + } #if compiler(>=6) -extension ProximitySearchRuntimeStatsRecord: Sendable {} +extension PublicationOriginRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeProximitySearchRuntimeStatsRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ProximitySearchRuntimeStatsRecord { +public struct FfiConverterTypePublicationOriginRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> PublicationOriginRecord { return - try ProximitySearchRuntimeStatsRecord( - physicalReads: FfiConverterUInt64.read(from: &buf), - physicalBytesRead: FfiConverterUInt64.read(from: &buf) + try PublicationOriginRecord( + code: FfiConverterUInt32.read(from: &buf) ) } - public static func write(_ value: ProximitySearchRuntimeStatsRecord, into buf: inout [UInt8]) { - FfiConverterUInt64.write(value.physicalReads, into: &buf) - FfiConverterUInt64.write(value.physicalBytesRead, into: &buf) + public static func write(_ value: PublicationOriginRecord, into buf: inout [UInt8]) { + FfiConverterUInt32.write(value.code, into: &buf) } } @@ -20123,89 +20806,53 @@ public struct FfiConverterTypeProximitySearchRuntimeStatsRecord: FfiConverterRus #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeProximitySearchRuntimeStatsRecord_lift(_ buf: RustBuffer) throws -> ProximitySearchRuntimeStatsRecord { - return try FfiConverterTypeProximitySearchRuntimeStatsRecord.lift(buf) +public func FfiConverterTypePublicationOriginRecord_lift(_ buf: RustBuffer) throws -> PublicationOriginRecord { + return try FfiConverterTypePublicationOriginRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeProximitySearchRuntimeStatsRecord_lower(_ value: ProximitySearchRuntimeStatsRecord) -> RustBuffer { - return FfiConverterTypeProximitySearchRuntimeStatsRecord.lower(value) +public func FfiConverterTypePublicationOriginRecord_lower(_ value: PublicationOriginRecord) -> RustBuffer { + return FfiConverterTypePublicationOriginRecord.lower(value) } -public struct ProximitySearchStatsRecord: Equatable, Hashable { - public var levelsVisited: UInt64 - public var nodesRead: UInt64 - public var bytesRead: UInt64 - public var physicalBytesRead: UInt64 - public var committedBytes: UInt64 - public var distanceEvaluations: UInt64 - public var quantizedDistanceEvaluations: UInt64 - public var rerankedCandidates: UInt64 - public var frontierPeak: UInt64 - public var candidateHandlesPeak: UInt64 - public var candidateRetainedBytesPeak: UInt64 +public struct RangeBoundsRecord: Equatable, Hashable { + public var start: Data + public var end: Data? // Default memberwise initializers are never public by default, so we // declare one manually. - public init(levelsVisited: UInt64, nodesRead: UInt64, bytesRead: UInt64, physicalBytesRead: UInt64, committedBytes: UInt64, distanceEvaluations: UInt64, quantizedDistanceEvaluations: UInt64, rerankedCandidates: UInt64, frontierPeak: UInt64, candidateHandlesPeak: UInt64, candidateRetainedBytesPeak: UInt64) { - self.levelsVisited = levelsVisited - self.nodesRead = nodesRead - self.bytesRead = bytesRead - self.physicalBytesRead = physicalBytesRead - self.committedBytes = committedBytes - self.distanceEvaluations = distanceEvaluations - self.quantizedDistanceEvaluations = quantizedDistanceEvaluations - self.rerankedCandidates = rerankedCandidates - self.frontierPeak = frontierPeak - self.candidateHandlesPeak = candidateHandlesPeak - self.candidateRetainedBytesPeak = candidateRetainedBytesPeak + public init(start: Data, end: Data?) { + self.start = start + self.end = end } - - + + } #if compiler(>=6) -extension ProximitySearchStatsRecord: Sendable {} +extension RangeBoundsRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeProximitySearchStatsRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ProximitySearchStatsRecord { +public struct FfiConverterTypeRangeBoundsRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> RangeBoundsRecord { return - try ProximitySearchStatsRecord( - levelsVisited: FfiConverterUInt64.read(from: &buf), - nodesRead: FfiConverterUInt64.read(from: &buf), - bytesRead: FfiConverterUInt64.read(from: &buf), - physicalBytesRead: FfiConverterUInt64.read(from: &buf), - committedBytes: FfiConverterUInt64.read(from: &buf), - distanceEvaluations: FfiConverterUInt64.read(from: &buf), - quantizedDistanceEvaluations: FfiConverterUInt64.read(from: &buf), - rerankedCandidates: FfiConverterUInt64.read(from: &buf), - frontierPeak: FfiConverterUInt64.read(from: &buf), - candidateHandlesPeak: FfiConverterUInt64.read(from: &buf), - candidateRetainedBytesPeak: FfiConverterUInt64.read(from: &buf) + try RangeBoundsRecord( + start: FfiConverterData.read(from: &buf), + end: FfiConverterOptionData.read(from: &buf) ) } - public static func write(_ value: ProximitySearchStatsRecord, into buf: inout [UInt8]) { - FfiConverterUInt64.write(value.levelsVisited, into: &buf) - FfiConverterUInt64.write(value.nodesRead, into: &buf) - FfiConverterUInt64.write(value.bytesRead, into: &buf) - FfiConverterUInt64.write(value.physicalBytesRead, into: &buf) - FfiConverterUInt64.write(value.committedBytes, into: &buf) - FfiConverterUInt64.write(value.distanceEvaluations, into: &buf) - FfiConverterUInt64.write(value.quantizedDistanceEvaluations, into: &buf) - FfiConverterUInt64.write(value.rerankedCandidates, into: &buf) - FfiConverterUInt64.write(value.frontierPeak, into: &buf) - FfiConverterUInt64.write(value.candidateHandlesPeak, into: &buf) - FfiConverterUInt64.write(value.candidateRetainedBytesPeak, into: &buf) + public static func write(_ value: RangeBoundsRecord, into buf: inout [UInt8]) { + FfiConverterData.write(value.start, into: &buf) + FfiConverterOptionData.write(value.end, into: &buf) } } @@ -20213,57 +20860,49 @@ public struct FfiConverterTypeProximitySearchStatsRecord: FfiConverterRustBuffer #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeProximitySearchStatsRecord_lift(_ buf: RustBuffer) throws -> ProximitySearchStatsRecord { - return try FfiConverterTypeProximitySearchStatsRecord.lift(buf) +public func FfiConverterTypeRangeBoundsRecord_lift(_ buf: RustBuffer) throws -> RangeBoundsRecord { + return try FfiConverterTypeRangeBoundsRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeProximitySearchStatsRecord_lower(_ value: ProximitySearchStatsRecord) -> RustBuffer { - return FfiConverterTypeProximitySearchStatsRecord.lower(value) +public func FfiConverterTypeRangeBoundsRecord_lower(_ value: RangeBoundsRecord) -> RustBuffer { + return FfiConverterTypeRangeBoundsRecord.lower(value) } -public struct ProximitySearchVerificationRecord: Equatable, Hashable { - public var result: ProximitySearchResultRecord - public var claim: ProximitySearchClaimRecord - public var replayedEvents: UInt64 +public struct RangeCursorRecord: Equatable, Hashable { + public var afterKey: Data? // Default memberwise initializers are never public by default, so we // declare one manually. - public init(result: ProximitySearchResultRecord, claim: ProximitySearchClaimRecord, replayedEvents: UInt64) { - self.result = result - self.claim = claim - self.replayedEvents = replayedEvents + public init(afterKey: Data?) { + self.afterKey = afterKey } - - + + } #if compiler(>=6) -extension ProximitySearchVerificationRecord: Sendable {} +extension RangeCursorRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeProximitySearchVerificationRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ProximitySearchVerificationRecord { +public struct FfiConverterTypeRangeCursorRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> RangeCursorRecord { return - try ProximitySearchVerificationRecord( - result: FfiConverterTypeProximitySearchResultRecord.read(from: &buf), - claim: FfiConverterTypeProximitySearchClaimRecord.read(from: &buf), - replayedEvents: FfiConverterUInt64.read(from: &buf) + try RangeCursorRecord( + afterKey: FfiConverterOptionData.read(from: &buf) ) } - public static func write(_ value: ProximitySearchVerificationRecord, into buf: inout [UInt8]) { - FfiConverterTypeProximitySearchResultRecord.write(value.result, into: &buf) - FfiConverterTypeProximitySearchClaimRecord.write(value.claim, into: &buf) - FfiConverterUInt64.write(value.replayedEvents, into: &buf) + public static func write(_ value: RangeCursorRecord, into buf: inout [UInt8]) { + FfiConverterOptionData.write(value.afterKey, into: &buf) } } @@ -20271,53 +20910,61 @@ public struct FfiConverterTypeProximitySearchVerificationRecord: FfiConverterRus #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeProximitySearchVerificationRecord_lift(_ buf: RustBuffer) throws -> ProximitySearchVerificationRecord { - return try FfiConverterTypeProximitySearchVerificationRecord.lift(buf) +public func FfiConverterTypeRangeCursorRecord_lift(_ buf: RustBuffer) throws -> RangeCursorRecord { + return try FfiConverterTypeRangeCursorRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeProximitySearchVerificationRecord_lower(_ value: ProximitySearchVerificationRecord) -> RustBuffer { - return FfiConverterTypeProximitySearchVerificationRecord.lower(value) +public func FfiConverterTypeRangeCursorRecord_lower(_ value: RangeCursorRecord) -> RustBuffer { + return FfiConverterTypeRangeCursorRecord.lower(value) } -public struct ProximityStructuralProofRecord: Equatable, Hashable { - public var descriptor: Data - public var objects: [TypedContentObjectRecord] +public struct RangePageProofRecord: Equatable, Hashable { + public var root: Data? + public var after: Data? + public var end: Data? + public var path: [NodeRecord] // Default memberwise initializers are never public by default, so we // declare one manually. - public init(descriptor: Data, objects: [TypedContentObjectRecord]) { - self.descriptor = descriptor - self.objects = objects + public init(root: Data?, after: Data?, end: Data?, path: [NodeRecord]) { + self.root = root + self.after = after + self.end = end + self.path = path } - - + + } #if compiler(>=6) -extension ProximityStructuralProofRecord: Sendable {} +extension RangePageProofRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeProximityStructuralProofRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ProximityStructuralProofRecord { +public struct FfiConverterTypeRangePageProofRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> RangePageProofRecord { return - try ProximityStructuralProofRecord( - descriptor: FfiConverterData.read(from: &buf), - objects: FfiConverterSequenceTypeTypedContentObjectRecord.read(from: &buf) + try RangePageProofRecord( + root: FfiConverterOptionData.read(from: &buf), + after: FfiConverterOptionData.read(from: &buf), + end: FfiConverterOptionData.read(from: &buf), + path: FfiConverterSequenceTypeNodeRecord.read(from: &buf) ) } - public static func write(_ value: ProximityStructuralProofRecord, into buf: inout [UInt8]) { - FfiConverterData.write(value.descriptor, into: &buf) - FfiConverterSequenceTypeTypedContentObjectRecord.write(value.objects, into: &buf) + public static func write(_ value: RangePageProofRecord, into buf: inout [UInt8]) { + FfiConverterOptionData.write(value.root, into: &buf) + FfiConverterOptionData.write(value.after, into: &buf) + FfiConverterOptionData.write(value.end, into: &buf) + FfiConverterSequenceTypeNodeRecord.write(value.path, into: &buf) } } @@ -20325,57 +20972,65 @@ public struct FfiConverterTypeProximityStructuralProofRecord: FfiConverterRustBu #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeProximityStructuralProofRecord_lift(_ buf: RustBuffer) throws -> ProximityStructuralProofRecord { - return try FfiConverterTypeProximityStructuralProofRecord.lift(buf) +public func FfiConverterTypeRangePageProofRecord_lift(_ buf: RustBuffer) throws -> RangePageProofRecord { + return try FfiConverterTypeRangePageProofRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeProximityStructuralProofRecord_lower(_ value: ProximityStructuralProofRecord) -> RustBuffer { - return FfiConverterTypeProximityStructuralProofRecord.lower(value) +public func FfiConverterTypeRangePageProofRecord_lower(_ value: RangePageProofRecord) -> RustBuffer { + return FfiConverterTypeRangePageProofRecord.lower(value) } -public struct ProximityStructuralVerificationRecord: Equatable, Hashable { - public var descriptor: Data - public var objectCount: UInt64 - public var summary: ProximityVerificationRecord +public struct RangePageProofVerificationRecord: Equatable, Hashable { + public var valid: Bool + public var root: Data? + public var after: Data? + public var end: Data? + public var entries: [EntryRecord] // Default memberwise initializers are never public by default, so we // declare one manually. - public init(descriptor: Data, objectCount: UInt64, summary: ProximityVerificationRecord) { - self.descriptor = descriptor - self.objectCount = objectCount - self.summary = summary + public init(valid: Bool, root: Data?, after: Data?, end: Data?, entries: [EntryRecord]) { + self.valid = valid + self.root = root + self.after = after + self.end = end + self.entries = entries } - - + + } #if compiler(>=6) -extension ProximityStructuralVerificationRecord: Sendable {} +extension RangePageProofVerificationRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeProximityStructuralVerificationRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ProximityStructuralVerificationRecord { +public struct FfiConverterTypeRangePageProofVerificationRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> RangePageProofVerificationRecord { return - try ProximityStructuralVerificationRecord( - descriptor: FfiConverterData.read(from: &buf), - objectCount: FfiConverterUInt64.read(from: &buf), - summary: FfiConverterTypeProximityVerificationRecord.read(from: &buf) + try RangePageProofVerificationRecord( + valid: FfiConverterBool.read(from: &buf), + root: FfiConverterOptionData.read(from: &buf), + after: FfiConverterOptionData.read(from: &buf), + end: FfiConverterOptionData.read(from: &buf), + entries: FfiConverterSequenceTypeEntryRecord.read(from: &buf) ) } - public static func write(_ value: ProximityStructuralVerificationRecord, into buf: inout [UInt8]) { - FfiConverterData.write(value.descriptor, into: &buf) - FfiConverterUInt64.write(value.objectCount, into: &buf) - FfiConverterTypeProximityVerificationRecord.write(value.summary, into: &buf) + public static func write(_ value: RangePageProofVerificationRecord, into buf: inout [UInt8]) { + FfiConverterBool.write(value.valid, into: &buf) + FfiConverterOptionData.write(value.root, into: &buf) + FfiConverterOptionData.write(value.after, into: &buf) + FfiConverterOptionData.write(value.end, into: &buf) + FfiConverterSequenceTypeEntryRecord.write(value.entries, into: &buf) } } @@ -20383,85 +21038,53 @@ public struct FfiConverterTypeProximityStructuralVerificationRecord: FfiConverte #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeProximityStructuralVerificationRecord_lift(_ buf: RustBuffer) throws -> ProximityStructuralVerificationRecord { - return try FfiConverterTypeProximityStructuralVerificationRecord.lift(buf) +public func FfiConverterTypeRangePageProofVerificationRecord_lift(_ buf: RustBuffer) throws -> RangePageProofVerificationRecord { + return try FfiConverterTypeRangePageProofVerificationRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeProximityStructuralVerificationRecord_lower(_ value: ProximityStructuralVerificationRecord) -> RustBuffer { - return FfiConverterTypeProximityStructuralVerificationRecord.lower(value) +public func FfiConverterTypeRangePageProofVerificationRecord_lower(_ value: RangePageProofVerificationRecord) -> RustBuffer { + return FfiConverterTypeRangePageProofVerificationRecord.lower(value) } -public struct ProximityVerificationRecord: Equatable, Hashable { - public var recordCount: UInt64 - public var proximityNodeCount: UInt64 - public var externalVectorCount: UInt64 - public var quantizedNodeCount: UInt64 - public var scalarQuantizerCount: UInt64 - public var overflowPageCount: UInt64 - public var overflowDirectoryCount: UInt64 - public var maximumLevel: UInt8 - public var maximumNodeBytes: UInt64 - public var distanceChecks: UInt64 +public struct RangePageRecord: Equatable, Hashable { + public var entries: [EntryRecord] + public var nextCursor: RangeCursorRecord? // Default memberwise initializers are never public by default, so we // declare one manually. - public init(recordCount: UInt64, proximityNodeCount: UInt64, externalVectorCount: UInt64, quantizedNodeCount: UInt64, scalarQuantizerCount: UInt64, overflowPageCount: UInt64, overflowDirectoryCount: UInt64, maximumLevel: UInt8, maximumNodeBytes: UInt64, distanceChecks: UInt64) { - self.recordCount = recordCount - self.proximityNodeCount = proximityNodeCount - self.externalVectorCount = externalVectorCount - self.quantizedNodeCount = quantizedNodeCount - self.scalarQuantizerCount = scalarQuantizerCount - self.overflowPageCount = overflowPageCount - self.overflowDirectoryCount = overflowDirectoryCount - self.maximumLevel = maximumLevel - self.maximumNodeBytes = maximumNodeBytes - self.distanceChecks = distanceChecks + public init(entries: [EntryRecord], nextCursor: RangeCursorRecord?) { + self.entries = entries + self.nextCursor = nextCursor } - - + + } #if compiler(>=6) -extension ProximityVerificationRecord: Sendable {} +extension RangePageRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeProximityVerificationRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ProximityVerificationRecord { +public struct FfiConverterTypeRangePageRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> RangePageRecord { return - try ProximityVerificationRecord( - recordCount: FfiConverterUInt64.read(from: &buf), - proximityNodeCount: FfiConverterUInt64.read(from: &buf), - externalVectorCount: FfiConverterUInt64.read(from: &buf), - quantizedNodeCount: FfiConverterUInt64.read(from: &buf), - scalarQuantizerCount: FfiConverterUInt64.read(from: &buf), - overflowPageCount: FfiConverterUInt64.read(from: &buf), - overflowDirectoryCount: FfiConverterUInt64.read(from: &buf), - maximumLevel: FfiConverterUInt8.read(from: &buf), - maximumNodeBytes: FfiConverterUInt64.read(from: &buf), - distanceChecks: FfiConverterUInt64.read(from: &buf) + try RangePageRecord( + entries: FfiConverterSequenceTypeEntryRecord.read(from: &buf), + nextCursor: FfiConverterOptionTypeRangeCursorRecord.read(from: &buf) ) } - public static func write(_ value: ProximityVerificationRecord, into buf: inout [UInt8]) { - FfiConverterUInt64.write(value.recordCount, into: &buf) - FfiConverterUInt64.write(value.proximityNodeCount, into: &buf) - FfiConverterUInt64.write(value.externalVectorCount, into: &buf) - FfiConverterUInt64.write(value.quantizedNodeCount, into: &buf) - FfiConverterUInt64.write(value.scalarQuantizerCount, into: &buf) - FfiConverterUInt64.write(value.overflowPageCount, into: &buf) - FfiConverterUInt64.write(value.overflowDirectoryCount, into: &buf) - FfiConverterUInt8.write(value.maximumLevel, into: &buf) - FfiConverterUInt64.write(value.maximumNodeBytes, into: &buf) - FfiConverterUInt64.write(value.distanceChecks, into: &buf) + public static func write(_ value: RangePageRecord, into buf: inout [UInt8]) { + FfiConverterSequenceTypeEntryRecord.write(value.entries, into: &buf) + FfiConverterOptionTypeRangeCursorRecord.write(value.nextCursor, into: &buf) } } @@ -20469,25 +21092,31 @@ public struct FfiConverterTypeProximityVerificationRecord: FfiConverterRustBuffe #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeProximityVerificationRecord_lift(_ buf: RustBuffer) throws -> ProximityVerificationRecord { - return try FfiConverterTypeProximityVerificationRecord.lift(buf) +public func FfiConverterTypeRangePageRecord_lift(_ buf: RustBuffer) throws -> RangePageRecord { + return try FfiConverterTypeRangePageRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeProximityVerificationRecord_lower(_ value: ProximityVerificationRecord) -> RustBuffer { - return FfiConverterTypeProximityVerificationRecord.lower(value) +public func FfiConverterTypeRangePageRecord_lower(_ value: RangePageRecord) -> RustBuffer { + return FfiConverterTypeRangePageRecord.lower(value) } -public struct PublicationOriginRecord: Equatable, Hashable { - public var code: UInt32 +public struct RangeProofRecord: Equatable, Hashable { + public var root: Data? + public var start: Data + public var end: Data? + public var path: [NodeRecord] // Default memberwise initializers are never public by default, so we // declare one manually. - public init(code: UInt32) { - self.code = code + public init(root: Data?, start: Data, end: Data?, path: [NodeRecord]) { + self.root = root + self.start = start + self.end = end + self.path = path } @@ -20496,22 +21125,28 @@ public struct PublicationOriginRecord: Equatable, Hashable { } #if compiler(>=6) -extension PublicationOriginRecord: Sendable {} +extension RangeProofRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypePublicationOriginRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> PublicationOriginRecord { +public struct FfiConverterTypeRangeProofRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> RangeProofRecord { return - try PublicationOriginRecord( - code: FfiConverterUInt32.read(from: &buf) + try RangeProofRecord( + root: FfiConverterOptionData.read(from: &buf), + start: FfiConverterData.read(from: &buf), + end: FfiConverterOptionData.read(from: &buf), + path: FfiConverterSequenceTypeNodeRecord.read(from: &buf) ) } - public static func write(_ value: PublicationOriginRecord, into buf: inout [UInt8]) { - FfiConverterUInt32.write(value.code, into: &buf) + public static func write(_ value: RangeProofRecord, into buf: inout [UInt8]) { + FfiConverterOptionData.write(value.root, into: &buf) + FfiConverterData.write(value.start, into: &buf) + FfiConverterOptionData.write(value.end, into: &buf) + FfiConverterSequenceTypeNodeRecord.write(value.path, into: &buf) } } @@ -20519,53 +21154,65 @@ public struct FfiConverterTypePublicationOriginRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypePublicationOriginRecord_lift(_ buf: RustBuffer) throws -> PublicationOriginRecord { - return try FfiConverterTypePublicationOriginRecord.lift(buf) +public func FfiConverterTypeRangeProofRecord_lift(_ buf: RustBuffer) throws -> RangeProofRecord { + return try FfiConverterTypeRangeProofRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypePublicationOriginRecord_lower(_ value: PublicationOriginRecord) -> RustBuffer { - return FfiConverterTypePublicationOriginRecord.lower(value) +public func FfiConverterTypeRangeProofRecord_lower(_ value: RangeProofRecord) -> RustBuffer { + return FfiConverterTypeRangeProofRecord.lower(value) } -public struct RangeBoundsRecord: Equatable, Hashable { +public struct RangeProofVerificationRecord: Equatable, Hashable { + public var valid: Bool + public var root: Data? public var start: Data public var end: Data? + public var entries: [EntryRecord] // Default memberwise initializers are never public by default, so we // declare one manually. - public init(start: Data, end: Data?) { + public init(valid: Bool, root: Data?, start: Data, end: Data?, entries: [EntryRecord]) { + self.valid = valid + self.root = root self.start = start self.end = end + self.entries = entries } - - + + } #if compiler(>=6) -extension RangeBoundsRecord: Sendable {} +extension RangeProofVerificationRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeRangeBoundsRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> RangeBoundsRecord { +public struct FfiConverterTypeRangeProofVerificationRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> RangeProofVerificationRecord { return - try RangeBoundsRecord( - start: FfiConverterData.read(from: &buf), - end: FfiConverterOptionData.read(from: &buf) + try RangeProofVerificationRecord( + valid: FfiConverterBool.read(from: &buf), + root: FfiConverterOptionData.read(from: &buf), + start: FfiConverterData.read(from: &buf), + end: FfiConverterOptionData.read(from: &buf), + entries: FfiConverterSequenceTypeEntryRecord.read(from: &buf) ) } - public static func write(_ value: RangeBoundsRecord, into buf: inout [UInt8]) { + public static func write(_ value: RangeProofVerificationRecord, into buf: inout [UInt8]) { + FfiConverterBool.write(value.valid, into: &buf) + FfiConverterOptionData.write(value.root, into: &buf) FfiConverterData.write(value.start, into: &buf) FfiConverterOptionData.write(value.end, into: &buf) + FfiConverterSequenceTypeEntryRecord.write(value.entries, into: &buf) } } @@ -20573,49 +21220,53 @@ public struct FfiConverterTypeRangeBoundsRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeRangeBoundsRecord_lift(_ buf: RustBuffer) throws -> RangeBoundsRecord { - return try FfiConverterTypeRangeBoundsRecord.lift(buf) +public func FfiConverterTypeRangeProofVerificationRecord_lift(_ buf: RustBuffer) throws -> RangeProofVerificationRecord { + return try FfiConverterTypeRangeProofVerificationRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeRangeBoundsRecord_lower(_ value: RangeBoundsRecord) -> RustBuffer { - return FfiConverterTypeRangeBoundsRecord.lower(value) +public func FfiConverterTypeRangeProofVerificationRecord_lower(_ value: RangeProofVerificationRecord) -> RustBuffer { + return FfiConverterTypeRangeProofVerificationRecord.lower(value) } -public struct RangeCursorRecord: Equatable, Hashable { - public var afterKey: Data? +public struct ResolutionRecord: Equatable, Hashable { + public var kind: ResolutionKind + public var value: Data? // Default memberwise initializers are never public by default, so we // declare one manually. - public init(afterKey: Data?) { - self.afterKey = afterKey + public init(kind: ResolutionKind, value: Data?) { + self.kind = kind + self.value = value } - - + + } #if compiler(>=6) -extension RangeCursorRecord: Sendable {} +extension ResolutionRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeRangeCursorRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> RangeCursorRecord { +public struct FfiConverterTypeResolutionRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ResolutionRecord { return - try RangeCursorRecord( - afterKey: FfiConverterOptionData.read(from: &buf) + try ResolutionRecord( + kind: FfiConverterTypeResolutionKind.read(from: &buf), + value: FfiConverterOptionData.read(from: &buf) ) } - public static func write(_ value: RangeCursorRecord, into buf: inout [UInt8]) { - FfiConverterOptionData.write(value.afterKey, into: &buf) + public static func write(_ value: ResolutionRecord, into buf: inout [UInt8]) { + FfiConverterTypeResolutionKind.write(value.kind, into: &buf) + FfiConverterOptionData.write(value.value, into: &buf) } } @@ -20623,61 +21274,49 @@ public struct FfiConverterTypeRangeCursorRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeRangeCursorRecord_lift(_ buf: RustBuffer) throws -> RangeCursorRecord { - return try FfiConverterTypeRangeCursorRecord.lift(buf) +public func FfiConverterTypeResolutionRecord_lift(_ buf: RustBuffer) throws -> ResolutionRecord { + return try FfiConverterTypeResolutionRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeRangeCursorRecord_lower(_ value: RangeCursorRecord) -> RustBuffer { - return FfiConverterTypeRangeCursorRecord.lower(value) +public func FfiConverterTypeResolutionRecord_lower(_ value: ResolutionRecord) -> RustBuffer { + return FfiConverterTypeResolutionRecord.lower(value) } -public struct RangePageProofRecord: Equatable, Hashable { - public var root: Data? - public var after: Data? - public var end: Data? - public var path: [NodeRecord] +public struct ReverseCursorRecord: Equatable, Hashable { + public var beforeKey: Data? // Default memberwise initializers are never public by default, so we // declare one manually. - public init(root: Data?, after: Data?, end: Data?, path: [NodeRecord]) { - self.root = root - self.after = after - self.end = end - self.path = path + public init(beforeKey: Data?) { + self.beforeKey = beforeKey } - - + + } #if compiler(>=6) -extension RangePageProofRecord: Sendable {} +extension ReverseCursorRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeRangePageProofRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> RangePageProofRecord { +public struct FfiConverterTypeReverseCursorRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ReverseCursorRecord { return - try RangePageProofRecord( - root: FfiConverterOptionData.read(from: &buf), - after: FfiConverterOptionData.read(from: &buf), - end: FfiConverterOptionData.read(from: &buf), - path: FfiConverterSequenceTypeNodeRecord.read(from: &buf) + try ReverseCursorRecord( + beforeKey: FfiConverterOptionData.read(from: &buf) ) } - public static func write(_ value: RangePageProofRecord, into buf: inout [UInt8]) { - FfiConverterOptionData.write(value.root, into: &buf) - FfiConverterOptionData.write(value.after, into: &buf) - FfiConverterOptionData.write(value.end, into: &buf) - FfiConverterSequenceTypeNodeRecord.write(value.path, into: &buf) + public static func write(_ value: ReverseCursorRecord, into buf: inout [UInt8]) { + FfiConverterOptionData.write(value.beforeKey, into: &buf) } } @@ -20685,65 +21324,53 @@ public struct FfiConverterTypeRangePageProofRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeRangePageProofRecord_lift(_ buf: RustBuffer) throws -> RangePageProofRecord { - return try FfiConverterTypeRangePageProofRecord.lift(buf) +public func FfiConverterTypeReverseCursorRecord_lift(_ buf: RustBuffer) throws -> ReverseCursorRecord { + return try FfiConverterTypeReverseCursorRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeRangePageProofRecord_lower(_ value: RangePageProofRecord) -> RustBuffer { - return FfiConverterTypeRangePageProofRecord.lower(value) +public func FfiConverterTypeReverseCursorRecord_lower(_ value: ReverseCursorRecord) -> RustBuffer { + return FfiConverterTypeReverseCursorRecord.lower(value) } -public struct RangePageProofVerificationRecord: Equatable, Hashable { - public var valid: Bool - public var root: Data? - public var after: Data? - public var end: Data? +public struct ReversePageRecord: Equatable, Hashable { public var entries: [EntryRecord] + public var nextCursor: ReverseCursorRecord? // Default memberwise initializers are never public by default, so we // declare one manually. - public init(valid: Bool, root: Data?, after: Data?, end: Data?, entries: [EntryRecord]) { - self.valid = valid - self.root = root - self.after = after - self.end = end + public init(entries: [EntryRecord], nextCursor: ReverseCursorRecord?) { self.entries = entries + self.nextCursor = nextCursor } - - + + } #if compiler(>=6) -extension RangePageProofVerificationRecord: Sendable {} +extension ReversePageRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeRangePageProofVerificationRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> RangePageProofVerificationRecord { +public struct FfiConverterTypeReversePageRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ReversePageRecord { return - try RangePageProofVerificationRecord( - valid: FfiConverterBool.read(from: &buf), - root: FfiConverterOptionData.read(from: &buf), - after: FfiConverterOptionData.read(from: &buf), - end: FfiConverterOptionData.read(from: &buf), - entries: FfiConverterSequenceTypeEntryRecord.read(from: &buf) + try ReversePageRecord( + entries: FfiConverterSequenceTypeEntryRecord.read(from: &buf), + nextCursor: FfiConverterOptionTypeReverseCursorRecord.read(from: &buf) ) } - public static func write(_ value: RangePageProofVerificationRecord, into buf: inout [UInt8]) { - FfiConverterBool.write(value.valid, into: &buf) - FfiConverterOptionData.write(value.root, into: &buf) - FfiConverterOptionData.write(value.after, into: &buf) - FfiConverterOptionData.write(value.end, into: &buf) + public static func write(_ value: ReversePageRecord, into buf: inout [UInt8]) { FfiConverterSequenceTypeEntryRecord.write(value.entries, into: &buf) + FfiConverterOptionTypeReverseCursorRecord.write(value.nextCursor, into: &buf) } } @@ -20751,53 +21378,57 @@ public struct FfiConverterTypeRangePageProofVerificationRecord: FfiConverterRust #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeRangePageProofVerificationRecord_lift(_ buf: RustBuffer) throws -> RangePageProofVerificationRecord { - return try FfiConverterTypeRangePageProofVerificationRecord.lift(buf) +public func FfiConverterTypeReversePageRecord_lift(_ buf: RustBuffer) throws -> ReversePageRecord { + return try FfiConverterTypeReversePageRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeRangePageProofVerificationRecord_lower(_ value: RangePageProofVerificationRecord) -> RustBuffer { - return FfiConverterTypeRangePageProofVerificationRecord.lower(value) +public func FfiConverterTypeReversePageRecord_lower(_ value: ReversePageRecord) -> RustBuffer { + return FfiConverterTypeReversePageRecord.lower(value) } -public struct RangePageRecord: Equatable, Hashable { - public var entries: [EntryRecord] - public var nextCursor: RangeCursorRecord? +public struct RootCasResultRecord: Equatable, Hashable { + public var applied: Bool + public var current: OptionalBytesRecord + public var error: StoreErrorRecord? // Default memberwise initializers are never public by default, so we // declare one manually. - public init(entries: [EntryRecord], nextCursor: RangeCursorRecord?) { - self.entries = entries - self.nextCursor = nextCursor + public init(applied: Bool, current: OptionalBytesRecord, error: StoreErrorRecord?) { + self.applied = applied + self.current = current + self.error = error } - - + + } #if compiler(>=6) -extension RangePageRecord: Sendable {} +extension RootCasResultRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeRangePageRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> RangePageRecord { +public struct FfiConverterTypeRootCasResultRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> RootCasResultRecord { return - try RangePageRecord( - entries: FfiConverterSequenceTypeEntryRecord.read(from: &buf), - nextCursor: FfiConverterOptionTypeRangeCursorRecord.read(from: &buf) + try RootCasResultRecord( + applied: FfiConverterBool.read(from: &buf), + current: FfiConverterTypeOptionalBytesRecord.read(from: &buf), + error: FfiConverterOptionTypeStoreErrorRecord.read(from: &buf) ) } - public static func write(_ value: RangePageRecord, into buf: inout [UInt8]) { - FfiConverterSequenceTypeEntryRecord.write(value.entries, into: &buf) - FfiConverterOptionTypeRangeCursorRecord.write(value.nextCursor, into: &buf) + public static func write(_ value: RootCasResultRecord, into buf: inout [UInt8]) { + FfiConverterBool.write(value.applied, into: &buf) + FfiConverterTypeOptionalBytesRecord.write(value.current, into: &buf) + FfiConverterOptionTypeStoreErrorRecord.write(value.error, into: &buf) } } @@ -20805,61 +21436,53 @@ public struct FfiConverterTypeRangePageRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeRangePageRecord_lift(_ buf: RustBuffer) throws -> RangePageRecord { - return try FfiConverterTypeRangePageRecord.lift(buf) +public func FfiConverterTypeRootCasResultRecord_lift(_ buf: RustBuffer) throws -> RootCasResultRecord { + return try FfiConverterTypeRootCasResultRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeRangePageRecord_lower(_ value: RangePageRecord) -> RustBuffer { - return FfiConverterTypeRangePageRecord.lower(value) +public func FfiConverterTypeRootCasResultRecord_lower(_ value: RootCasResultRecord) -> RustBuffer { + return FfiConverterTypeRootCasResultRecord.lower(value) } -public struct RangeProofRecord: Equatable, Hashable { - public var root: Data? - public var start: Data - public var end: Data? - public var path: [NodeRecord] +public struct RootConditionRecord: Equatable, Hashable { + public var name: Data + public var expected: OptionalBytesRecord // Default memberwise initializers are never public by default, so we // declare one manually. - public init(root: Data?, start: Data, end: Data?, path: [NodeRecord]) { - self.root = root - self.start = start - self.end = end - self.path = path + public init(name: Data, expected: OptionalBytesRecord) { + self.name = name + self.expected = expected } - - + + } #if compiler(>=6) -extension RangeProofRecord: Sendable {} +extension RootConditionRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeRangeProofRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> RangeProofRecord { +public struct FfiConverterTypeRootConditionRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> RootConditionRecord { return - try RangeProofRecord( - root: FfiConverterOptionData.read(from: &buf), - start: FfiConverterData.read(from: &buf), - end: FfiConverterOptionData.read(from: &buf), - path: FfiConverterSequenceTypeNodeRecord.read(from: &buf) + try RootConditionRecord( + name: FfiConverterData.read(from: &buf), + expected: FfiConverterTypeOptionalBytesRecord.read(from: &buf) ) } - public static func write(_ value: RangeProofRecord, into buf: inout [UInt8]) { - FfiConverterOptionData.write(value.root, into: &buf) - FfiConverterData.write(value.start, into: &buf) - FfiConverterOptionData.write(value.end, into: &buf) - FfiConverterSequenceTypeNodeRecord.write(value.path, into: &buf) + public static func write(_ value: RootConditionRecord, into buf: inout [UInt8]) { + FfiConverterData.write(value.name, into: &buf) + FfiConverterTypeOptionalBytesRecord.write(value.expected, into: &buf) } } @@ -20867,65 +21490,57 @@ public struct FfiConverterTypeRangeProofRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeRangeProofRecord_lift(_ buf: RustBuffer) throws -> RangeProofRecord { - return try FfiConverterTypeRangeProofRecord.lift(buf) +public func FfiConverterTypeRootConditionRecord_lift(_ buf: RustBuffer) throws -> RootConditionRecord { + return try FfiConverterTypeRootConditionRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeRangeProofRecord_lower(_ value: RangeProofRecord) -> RustBuffer { - return FfiConverterTypeRangeProofRecord.lower(value) +public func FfiConverterTypeRootConditionRecord_lower(_ value: RootConditionRecord) -> RustBuffer { + return FfiConverterTypeRootConditionRecord.lower(value) } -public struct RangeProofVerificationRecord: Equatable, Hashable { - public var valid: Bool - public var root: Data? - public var start: Data - public var end: Data? - public var entries: [EntryRecord] +public struct RootManifestRecord: Equatable, Hashable { + public var tree: TreeRecord + public var createdAtMillis: UInt64? + public var updatedAtMillis: UInt64? // Default memberwise initializers are never public by default, so we // declare one manually. - public init(valid: Bool, root: Data?, start: Data, end: Data?, entries: [EntryRecord]) { - self.valid = valid - self.root = root - self.start = start - self.end = end - self.entries = entries + public init(tree: TreeRecord, createdAtMillis: UInt64?, updatedAtMillis: UInt64?) { + self.tree = tree + self.createdAtMillis = createdAtMillis + self.updatedAtMillis = updatedAtMillis } - - + + } #if compiler(>=6) -extension RangeProofVerificationRecord: Sendable {} +extension RootManifestRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeRangeProofVerificationRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> RangeProofVerificationRecord { +public struct FfiConverterTypeRootManifestRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> RootManifestRecord { return - try RangeProofVerificationRecord( - valid: FfiConverterBool.read(from: &buf), - root: FfiConverterOptionData.read(from: &buf), - start: FfiConverterData.read(from: &buf), - end: FfiConverterOptionData.read(from: &buf), - entries: FfiConverterSequenceTypeEntryRecord.read(from: &buf) + try RootManifestRecord( + tree: FfiConverterTypeTreeRecord.read(from: &buf), + createdAtMillis: FfiConverterOptionUInt64.read(from: &buf), + updatedAtMillis: FfiConverterOptionUInt64.read(from: &buf) ) } - public static func write(_ value: RangeProofVerificationRecord, into buf: inout [UInt8]) { - FfiConverterBool.write(value.valid, into: &buf) - FfiConverterOptionData.write(value.root, into: &buf) - FfiConverterData.write(value.start, into: &buf) - FfiConverterOptionData.write(value.end, into: &buf) - FfiConverterSequenceTypeEntryRecord.write(value.entries, into: &buf) + public static func write(_ value: RootManifestRecord, into buf: inout [UInt8]) { + FfiConverterTypeTreeRecord.write(value.tree, into: &buf) + FfiConverterOptionUInt64.write(value.createdAtMillis, into: &buf) + FfiConverterOptionUInt64.write(value.updatedAtMillis, into: &buf) } } @@ -20933,53 +21548,53 @@ public struct FfiConverterTypeRangeProofVerificationRecord: FfiConverterRustBuff #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeRangeProofVerificationRecord_lift(_ buf: RustBuffer) throws -> RangeProofVerificationRecord { - return try FfiConverterTypeRangeProofVerificationRecord.lift(buf) +public func FfiConverterTypeRootManifestRecord_lift(_ buf: RustBuffer) throws -> RootManifestRecord { + return try FfiConverterTypeRootManifestRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeRangeProofVerificationRecord_lower(_ value: RangeProofVerificationRecord) -> RustBuffer { - return FfiConverterTypeRangeProofVerificationRecord.lower(value) +public func FfiConverterTypeRootManifestRecord_lower(_ value: RootManifestRecord) -> RustBuffer { + return FfiConverterTypeRootManifestRecord.lower(value) } -public struct ResolutionRecord: Equatable, Hashable { - public var kind: ResolutionKind - public var value: Data? +public struct RootWriteRecord: Equatable, Hashable { + public var name: Data + public var replacement: OptionalBytesRecord // Default memberwise initializers are never public by default, so we // declare one manually. - public init(kind: ResolutionKind, value: Data?) { - self.kind = kind - self.value = value + public init(name: Data, replacement: OptionalBytesRecord) { + self.name = name + self.replacement = replacement } - - + + } #if compiler(>=6) -extension ResolutionRecord: Sendable {} +extension RootWriteRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeResolutionRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ResolutionRecord { +public struct FfiConverterTypeRootWriteRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> RootWriteRecord { return - try ResolutionRecord( - kind: FfiConverterTypeResolutionKind.read(from: &buf), - value: FfiConverterOptionData.read(from: &buf) + try RootWriteRecord( + name: FfiConverterData.read(from: &buf), + replacement: FfiConverterTypeOptionalBytesRecord.read(from: &buf) ) } - public static func write(_ value: ResolutionRecord, into buf: inout [UInt8]) { - FfiConverterTypeResolutionKind.write(value.kind, into: &buf) - FfiConverterOptionData.write(value.value, into: &buf) + public static func write(_ value: RootWriteRecord, into buf: inout [UInt8]) { + FfiConverterData.write(value.name, into: &buf) + FfiConverterTypeOptionalBytesRecord.write(value.replacement, into: &buf) } } @@ -20987,49 +21602,60 @@ public struct FfiConverterTypeResolutionRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeResolutionRecord_lift(_ buf: RustBuffer) throws -> ResolutionRecord { - return try FfiConverterTypeResolutionRecord.lift(buf) +public func FfiConverterTypeRootWriteRecord_lift(_ buf: RustBuffer) throws -> RootWriteRecord { + return try FfiConverterTypeRootWriteRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeResolutionRecord_lower(_ value: ResolutionRecord) -> RustBuffer { - return FfiConverterTypeResolutionRecord.lower(value) +public func FfiConverterTypeRootWriteRecord_lower(_ value: RootWriteRecord) -> RustBuffer { + return FfiConverterTypeRootWriteRecord.lower(value) } -public struct ReverseCursorRecord: Equatable, Hashable { - public var beforeKey: Data? +/** + * Result of a streaming read operation. + * + * Foreign-language callbacks receive owned byte arrays because Rust borrows + * cannot cross an FFI boundary. The native traversal remains borrowed and + * copies each record only when it is delivered to the callback. + */ +public struct ScanOutcomeRecord: Equatable, Hashable { + public var visited: UInt64 + public var stopped: Bool // Default memberwise initializers are never public by default, so we // declare one manually. - public init(beforeKey: Data?) { - self.beforeKey = beforeKey + public init(visited: UInt64, stopped: Bool) { + self.visited = visited + self.stopped = stopped } - - + + } #if compiler(>=6) -extension ReverseCursorRecord: Sendable {} +extension ScanOutcomeRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeReverseCursorRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ReverseCursorRecord { +public struct FfiConverterTypeScanOutcomeRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ScanOutcomeRecord { return - try ReverseCursorRecord( - beforeKey: FfiConverterOptionData.read(from: &buf) + try ScanOutcomeRecord( + visited: FfiConverterUInt64.read(from: &buf), + stopped: FfiConverterBool.read(from: &buf) ) } - public static func write(_ value: ReverseCursorRecord, into buf: inout [UInt8]) { - FfiConverterOptionData.write(value.beforeKey, into: &buf) + public static func write(_ value: ScanOutcomeRecord, into buf: inout [UInt8]) { + FfiConverterUInt64.write(value.visited, into: &buf) + FfiConverterBool.write(value.stopped, into: &buf) } } @@ -21037,53 +21663,61 @@ public struct FfiConverterTypeReverseCursorRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeReverseCursorRecord_lift(_ buf: RustBuffer) throws -> ReverseCursorRecord { - return try FfiConverterTypeReverseCursorRecord.lift(buf) +public func FfiConverterTypeScanOutcomeRecord_lift(_ buf: RustBuffer) throws -> ScanOutcomeRecord { + return try FfiConverterTypeScanOutcomeRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeReverseCursorRecord_lower(_ value: ReverseCursorRecord) -> RustBuffer { - return FfiConverterTypeReverseCursorRecord.lower(value) +public func FfiConverterTypeScanOutcomeRecord_lower(_ value: ScanOutcomeRecord) -> RustBuffer { + return FfiConverterTypeScanOutcomeRecord.lower(value) } -public struct ReversePageRecord: Equatable, Hashable { - public var entries: [EntryRecord] - public var nextCursor: ReverseCursorRecord? +public struct SearchBudgetRecord: Equatable, Hashable { + public var maxNodes: UInt64? + public var maxCommittedBytes: UInt64? + public var maxDistanceEvaluations: UInt64? + public var maxFrontierEntries: UInt64? + + // Default memberwise initializers are never public by default, so we + // declare one manually. + public init(maxNodes: UInt64?, maxCommittedBytes: UInt64?, maxDistanceEvaluations: UInt64?, maxFrontierEntries: UInt64?) { + self.maxNodes = maxNodes + self.maxCommittedBytes = maxCommittedBytes + self.maxDistanceEvaluations = maxDistanceEvaluations + self.maxFrontierEntries = maxFrontierEntries + } + - // Default memberwise initializers are never public by default, so we - // declare one manually. - public init(entries: [EntryRecord], nextCursor: ReverseCursorRecord?) { - self.entries = entries - self.nextCursor = nextCursor - } - - } #if compiler(>=6) -extension ReversePageRecord: Sendable {} +extension SearchBudgetRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeReversePageRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ReversePageRecord { +public struct FfiConverterTypeSearchBudgetRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> SearchBudgetRecord { return - try ReversePageRecord( - entries: FfiConverterSequenceTypeEntryRecord.read(from: &buf), - nextCursor: FfiConverterOptionTypeReverseCursorRecord.read(from: &buf) + try SearchBudgetRecord( + maxNodes: FfiConverterOptionUInt64.read(from: &buf), + maxCommittedBytes: FfiConverterOptionUInt64.read(from: &buf), + maxDistanceEvaluations: FfiConverterOptionUInt64.read(from: &buf), + maxFrontierEntries: FfiConverterOptionUInt64.read(from: &buf) ) } - public static func write(_ value: ReversePageRecord, into buf: inout [UInt8]) { - FfiConverterSequenceTypeEntryRecord.write(value.entries, into: &buf) - FfiConverterOptionTypeReverseCursorRecord.write(value.nextCursor, into: &buf) + public static func write(_ value: SearchBudgetRecord, into buf: inout [UInt8]) { + FfiConverterOptionUInt64.write(value.maxNodes, into: &buf) + FfiConverterOptionUInt64.write(value.maxCommittedBytes, into: &buf) + FfiConverterOptionUInt64.write(value.maxDistanceEvaluations, into: &buf) + FfiConverterOptionUInt64.write(value.maxFrontierEntries, into: &buf) } } @@ -21091,57 +21725,105 @@ public struct FfiConverterTypeReversePageRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeReversePageRecord_lift(_ buf: RustBuffer) throws -> ReversePageRecord { - return try FfiConverterTypeReversePageRecord.lift(buf) +public func FfiConverterTypeSearchBudgetRecord_lift(_ buf: RustBuffer) throws -> SearchBudgetRecord { + return try FfiConverterTypeSearchBudgetRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeReversePageRecord_lower(_ value: ReversePageRecord) -> RustBuffer { - return FfiConverterTypeReversePageRecord.lower(value) +public func FfiConverterTypeSearchBudgetRecord_lower(_ value: SearchBudgetRecord) -> RustBuffer { + return FfiConverterTypeSearchBudgetRecord.lower(value) } -public struct RootCasResultRecord: Equatable, Hashable { - public var applied: Bool - public var current: OptionalBytesRecord - public var error: StoreErrorRecord? +public struct SecondaryIndexLimitsRecord: Equatable, Hashable { + public var maxTermBytes: UInt64 + public var maxProjectionBytes: UInt64 + public var maxAllValueBytes: UInt64 + public var maxTermsPerRecord: UInt64 + public var maxProjectedBytesPerRecord: UInt64 + public var maxDerivedMutationsPerWrite: UInt64 + public var maxProjectedBytesPerWrite: UInt64 + public var maxIndexes: UInt64 + public var buildPageSize: UInt64 + public var maxTemporarySortBytes: UInt64 + public var maxBundleNodes: UInt64 + public var maxBundleBytes: UInt64 + public var maxVerificationEntries: UInt64 + public var maxWriteRetries: UInt64 + public var maxBuildRetries: UInt64 // Default memberwise initializers are never public by default, so we // declare one manually. - public init(applied: Bool, current: OptionalBytesRecord, error: StoreErrorRecord?) { - self.applied = applied - self.current = current - self.error = error + public init(maxTermBytes: UInt64, maxProjectionBytes: UInt64, maxAllValueBytes: UInt64, maxTermsPerRecord: UInt64, maxProjectedBytesPerRecord: UInt64, maxDerivedMutationsPerWrite: UInt64, maxProjectedBytesPerWrite: UInt64, maxIndexes: UInt64, buildPageSize: UInt64, maxTemporarySortBytes: UInt64, maxBundleNodes: UInt64, maxBundleBytes: UInt64, maxVerificationEntries: UInt64, maxWriteRetries: UInt64, maxBuildRetries: UInt64) { + self.maxTermBytes = maxTermBytes + self.maxProjectionBytes = maxProjectionBytes + self.maxAllValueBytes = maxAllValueBytes + self.maxTermsPerRecord = maxTermsPerRecord + self.maxProjectedBytesPerRecord = maxProjectedBytesPerRecord + self.maxDerivedMutationsPerWrite = maxDerivedMutationsPerWrite + self.maxProjectedBytesPerWrite = maxProjectedBytesPerWrite + self.maxIndexes = maxIndexes + self.buildPageSize = buildPageSize + self.maxTemporarySortBytes = maxTemporarySortBytes + self.maxBundleNodes = maxBundleNodes + self.maxBundleBytes = maxBundleBytes + self.maxVerificationEntries = maxVerificationEntries + self.maxWriteRetries = maxWriteRetries + self.maxBuildRetries = maxBuildRetries } - - + + } #if compiler(>=6) -extension RootCasResultRecord: Sendable {} +extension SecondaryIndexLimitsRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeRootCasResultRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> RootCasResultRecord { +public struct FfiConverterTypeSecondaryIndexLimitsRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> SecondaryIndexLimitsRecord { return - try RootCasResultRecord( - applied: FfiConverterBool.read(from: &buf), - current: FfiConverterTypeOptionalBytesRecord.read(from: &buf), - error: FfiConverterOptionTypeStoreErrorRecord.read(from: &buf) + try SecondaryIndexLimitsRecord( + maxTermBytes: FfiConverterUInt64.read(from: &buf), + maxProjectionBytes: FfiConverterUInt64.read(from: &buf), + maxAllValueBytes: FfiConverterUInt64.read(from: &buf), + maxTermsPerRecord: FfiConverterUInt64.read(from: &buf), + maxProjectedBytesPerRecord: FfiConverterUInt64.read(from: &buf), + maxDerivedMutationsPerWrite: FfiConverterUInt64.read(from: &buf), + maxProjectedBytesPerWrite: FfiConverterUInt64.read(from: &buf), + maxIndexes: FfiConverterUInt64.read(from: &buf), + buildPageSize: FfiConverterUInt64.read(from: &buf), + maxTemporarySortBytes: FfiConverterUInt64.read(from: &buf), + maxBundleNodes: FfiConverterUInt64.read(from: &buf), + maxBundleBytes: FfiConverterUInt64.read(from: &buf), + maxVerificationEntries: FfiConverterUInt64.read(from: &buf), + maxWriteRetries: FfiConverterUInt64.read(from: &buf), + maxBuildRetries: FfiConverterUInt64.read(from: &buf) ) } - public static func write(_ value: RootCasResultRecord, into buf: inout [UInt8]) { - FfiConverterBool.write(value.applied, into: &buf) - FfiConverterTypeOptionalBytesRecord.write(value.current, into: &buf) - FfiConverterOptionTypeStoreErrorRecord.write(value.error, into: &buf) + public static func write(_ value: SecondaryIndexLimitsRecord, into buf: inout [UInt8]) { + FfiConverterUInt64.write(value.maxTermBytes, into: &buf) + FfiConverterUInt64.write(value.maxProjectionBytes, into: &buf) + FfiConverterUInt64.write(value.maxAllValueBytes, into: &buf) + FfiConverterUInt64.write(value.maxTermsPerRecord, into: &buf) + FfiConverterUInt64.write(value.maxProjectedBytesPerRecord, into: &buf) + FfiConverterUInt64.write(value.maxDerivedMutationsPerWrite, into: &buf) + FfiConverterUInt64.write(value.maxProjectedBytesPerWrite, into: &buf) + FfiConverterUInt64.write(value.maxIndexes, into: &buf) + FfiConverterUInt64.write(value.buildPageSize, into: &buf) + FfiConverterUInt64.write(value.maxTemporarySortBytes, into: &buf) + FfiConverterUInt64.write(value.maxBundleNodes, into: &buf) + FfiConverterUInt64.write(value.maxBundleBytes, into: &buf) + FfiConverterUInt64.write(value.maxVerificationEntries, into: &buf) + FfiConverterUInt64.write(value.maxWriteRetries, into: &buf) + FfiConverterUInt64.write(value.maxBuildRetries, into: &buf) } } @@ -21149,53 +21831,53 @@ public struct FfiConverterTypeRootCasResultRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeRootCasResultRecord_lift(_ buf: RustBuffer) throws -> RootCasResultRecord { - return try FfiConverterTypeRootCasResultRecord.lift(buf) +public func FfiConverterTypeSecondaryIndexLimitsRecord_lift(_ buf: RustBuffer) throws -> SecondaryIndexLimitsRecord { + return try FfiConverterTypeSecondaryIndexLimitsRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeRootCasResultRecord_lower(_ value: RootCasResultRecord) -> RustBuffer { - return FfiConverterTypeRootCasResultRecord.lower(value) +public func FfiConverterTypeSecondaryIndexLimitsRecord_lower(_ value: SecondaryIndexLimitsRecord) -> RustBuffer { + return FfiConverterTypeSecondaryIndexLimitsRecord.lower(value) } -public struct RootConditionRecord: Equatable, Hashable { - public var name: Data - public var expected: OptionalBytesRecord +public struct SnapshotBundleNodeRecord: Equatable, Hashable { + public var cid: Data + public var bytes: Data // Default memberwise initializers are never public by default, so we // declare one manually. - public init(name: Data, expected: OptionalBytesRecord) { - self.name = name - self.expected = expected + public init(cid: Data, bytes: Data) { + self.cid = cid + self.bytes = bytes } - - + + } #if compiler(>=6) -extension RootConditionRecord: Sendable {} +extension SnapshotBundleNodeRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeRootConditionRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> RootConditionRecord { +public struct FfiConverterTypeSnapshotBundleNodeRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> SnapshotBundleNodeRecord { return - try RootConditionRecord( - name: FfiConverterData.read(from: &buf), - expected: FfiConverterTypeOptionalBytesRecord.read(from: &buf) + try SnapshotBundleNodeRecord( + cid: FfiConverterData.read(from: &buf), + bytes: FfiConverterData.read(from: &buf) ) } - public static func write(_ value: RootConditionRecord, into buf: inout [UInt8]) { - FfiConverterData.write(value.name, into: &buf) - FfiConverterTypeOptionalBytesRecord.write(value.expected, into: &buf) + public static func write(_ value: SnapshotBundleNodeRecord, into buf: inout [UInt8]) { + FfiConverterData.write(value.cid, into: &buf) + FfiConverterData.write(value.bytes, into: &buf) } } @@ -21203,57 +21885,57 @@ public struct FfiConverterTypeRootConditionRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeRootConditionRecord_lift(_ buf: RustBuffer) throws -> RootConditionRecord { - return try FfiConverterTypeRootConditionRecord.lift(buf) +public func FfiConverterTypeSnapshotBundleNodeRecord_lift(_ buf: RustBuffer) throws -> SnapshotBundleNodeRecord { + return try FfiConverterTypeSnapshotBundleNodeRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeRootConditionRecord_lower(_ value: RootConditionRecord) -> RustBuffer { - return FfiConverterTypeRootConditionRecord.lower(value) +public func FfiConverterTypeSnapshotBundleNodeRecord_lower(_ value: SnapshotBundleNodeRecord) -> RustBuffer { + return FfiConverterTypeSnapshotBundleNodeRecord.lower(value) } -public struct RootManifestRecord: Equatable, Hashable { +public struct SnapshotBundleRecord: Equatable, Hashable { + public var formatVersion: UInt32 public var tree: TreeRecord - public var createdAtMillis: UInt64? - public var updatedAtMillis: UInt64? + public var nodes: [SnapshotBundleNodeRecord] // Default memberwise initializers are never public by default, so we // declare one manually. - public init(tree: TreeRecord, createdAtMillis: UInt64?, updatedAtMillis: UInt64?) { + public init(formatVersion: UInt32, tree: TreeRecord, nodes: [SnapshotBundleNodeRecord]) { + self.formatVersion = formatVersion self.tree = tree - self.createdAtMillis = createdAtMillis - self.updatedAtMillis = updatedAtMillis + self.nodes = nodes } - - + + } #if compiler(>=6) -extension RootManifestRecord: Sendable {} +extension SnapshotBundleRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeRootManifestRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> RootManifestRecord { +public struct FfiConverterTypeSnapshotBundleRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> SnapshotBundleRecord { return - try RootManifestRecord( - tree: FfiConverterTypeTreeRecord.read(from: &buf), - createdAtMillis: FfiConverterOptionUInt64.read(from: &buf), - updatedAtMillis: FfiConverterOptionUInt64.read(from: &buf) + try SnapshotBundleRecord( + formatVersion: FfiConverterUInt32.read(from: &buf), + tree: FfiConverterTypeTreeRecord.read(from: &buf), + nodes: FfiConverterSequenceTypeSnapshotBundleNodeRecord.read(from: &buf) ) } - public static func write(_ value: RootManifestRecord, into buf: inout [UInt8]) { + public static func write(_ value: SnapshotBundleRecord, into buf: inout [UInt8]) { + FfiConverterUInt32.write(value.formatVersion, into: &buf) FfiConverterTypeTreeRecord.write(value.tree, into: &buf) - FfiConverterOptionUInt64.write(value.createdAtMillis, into: &buf) - FfiConverterOptionUInt64.write(value.updatedAtMillis, into: &buf) + FfiConverterSequenceTypeSnapshotBundleNodeRecord.write(value.nodes, into: &buf) } } @@ -21261,53 +21943,69 @@ public struct FfiConverterTypeRootManifestRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeRootManifestRecord_lift(_ buf: RustBuffer) throws -> RootManifestRecord { - return try FfiConverterTypeRootManifestRecord.lift(buf) +public func FfiConverterTypeSnapshotBundleRecord_lift(_ buf: RustBuffer) throws -> SnapshotBundleRecord { + return try FfiConverterTypeSnapshotBundleRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeRootManifestRecord_lower(_ value: RootManifestRecord) -> RustBuffer { - return FfiConverterTypeRootManifestRecord.lower(value) +public func FfiConverterTypeSnapshotBundleRecord_lower(_ value: SnapshotBundleRecord) -> RustBuffer { + return FfiConverterTypeSnapshotBundleRecord.lower(value) } -public struct RootWriteRecord: Equatable, Hashable { - public var name: Data - public var replacement: OptionalBytesRecord +public struct SnapshotBundleSummaryRecord: Equatable, Hashable { + public var formatVersion: UInt32 + public var root: Data? + public var nodeCount: UInt64 + public var byteCount: UInt64 + public var minNodeBytes: UInt64 + public var maxNodeBytes: UInt64 // Default memberwise initializers are never public by default, so we // declare one manually. - public init(name: Data, replacement: OptionalBytesRecord) { - self.name = name - self.replacement = replacement + public init(formatVersion: UInt32, root: Data?, nodeCount: UInt64, byteCount: UInt64, minNodeBytes: UInt64, maxNodeBytes: UInt64) { + self.formatVersion = formatVersion + self.root = root + self.nodeCount = nodeCount + self.byteCount = byteCount + self.minNodeBytes = minNodeBytes + self.maxNodeBytes = maxNodeBytes } - - + + } #if compiler(>=6) -extension RootWriteRecord: Sendable {} +extension SnapshotBundleSummaryRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeRootWriteRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> RootWriteRecord { +public struct FfiConverterTypeSnapshotBundleSummaryRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> SnapshotBundleSummaryRecord { return - try RootWriteRecord( - name: FfiConverterData.read(from: &buf), - replacement: FfiConverterTypeOptionalBytesRecord.read(from: &buf) + try SnapshotBundleSummaryRecord( + formatVersion: FfiConverterUInt32.read(from: &buf), + root: FfiConverterOptionData.read(from: &buf), + nodeCount: FfiConverterUInt64.read(from: &buf), + byteCount: FfiConverterUInt64.read(from: &buf), + minNodeBytes: FfiConverterUInt64.read(from: &buf), + maxNodeBytes: FfiConverterUInt64.read(from: &buf) ) } - public static func write(_ value: RootWriteRecord, into buf: inout [UInt8]) { - FfiConverterData.write(value.name, into: &buf) - FfiConverterTypeOptionalBytesRecord.write(value.replacement, into: &buf) + public static func write(_ value: SnapshotBundleSummaryRecord, into buf: inout [UInt8]) { + FfiConverterUInt32.write(value.formatVersion, into: &buf) + FfiConverterOptionData.write(value.root, into: &buf) + FfiConverterUInt64.write(value.nodeCount, into: &buf) + FfiConverterUInt64.write(value.byteCount, into: &buf) + FfiConverterUInt64.write(value.minNodeBytes, into: &buf) + FfiConverterUInt64.write(value.maxNodeBytes, into: &buf) } } @@ -21315,60 +22013,69 @@ public struct FfiConverterTypeRootWriteRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeRootWriteRecord_lift(_ buf: RustBuffer) throws -> RootWriteRecord { - return try FfiConverterTypeRootWriteRecord.lift(buf) +public func FfiConverterTypeSnapshotBundleSummaryRecord_lift(_ buf: RustBuffer) throws -> SnapshotBundleSummaryRecord { + return try FfiConverterTypeSnapshotBundleSummaryRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeRootWriteRecord_lower(_ value: RootWriteRecord) -> RustBuffer { - return FfiConverterTypeRootWriteRecord.lower(value) -} - - -/** - * Result of a streaming read operation. - * - * Foreign-language callbacks receive owned byte arrays because Rust borrows - * cannot cross an FFI boundary. The native traversal remains borrowed and - * copies each record only when it is delivered to the callback. - */ -public struct ScanOutcomeRecord: Equatable, Hashable { - public var visited: UInt64 - public var stopped: Bool +public func FfiConverterTypeSnapshotBundleSummaryRecord_lower(_ value: SnapshotBundleSummaryRecord) -> RustBuffer { + return FfiConverterTypeSnapshotBundleSummaryRecord.lower(value) +} + + +public struct SnapshotBundleVerificationRecord: Equatable, Hashable { + public var valid: Bool + public var summary: SnapshotBundleSummaryRecord + public var reachableNodes: UInt64 + public var reachableBytes: UInt64 + public var missingCids: [Data] + public var extraCids: [Data] // Default memberwise initializers are never public by default, so we // declare one manually. - public init(visited: UInt64, stopped: Bool) { - self.visited = visited - self.stopped = stopped + public init(valid: Bool, summary: SnapshotBundleSummaryRecord, reachableNodes: UInt64, reachableBytes: UInt64, missingCids: [Data], extraCids: [Data]) { + self.valid = valid + self.summary = summary + self.reachableNodes = reachableNodes + self.reachableBytes = reachableBytes + self.missingCids = missingCids + self.extraCids = extraCids } - - + + } #if compiler(>=6) -extension ScanOutcomeRecord: Sendable {} +extension SnapshotBundleVerificationRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeScanOutcomeRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ScanOutcomeRecord { +public struct FfiConverterTypeSnapshotBundleVerificationRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> SnapshotBundleVerificationRecord { return - try ScanOutcomeRecord( - visited: FfiConverterUInt64.read(from: &buf), - stopped: FfiConverterBool.read(from: &buf) + try SnapshotBundleVerificationRecord( + valid: FfiConverterBool.read(from: &buf), + summary: FfiConverterTypeSnapshotBundleSummaryRecord.read(from: &buf), + reachableNodes: FfiConverterUInt64.read(from: &buf), + reachableBytes: FfiConverterUInt64.read(from: &buf), + missingCids: FfiConverterSequenceData.read(from: &buf), + extraCids: FfiConverterSequenceData.read(from: &buf) ) } - public static func write(_ value: ScanOutcomeRecord, into buf: inout [UInt8]) { - FfiConverterUInt64.write(value.visited, into: &buf) - FfiConverterBool.write(value.stopped, into: &buf) + public static func write(_ value: SnapshotBundleVerificationRecord, into buf: inout [UInt8]) { + FfiConverterBool.write(value.valid, into: &buf) + FfiConverterTypeSnapshotBundleSummaryRecord.write(value.summary, into: &buf) + FfiConverterUInt64.write(value.reachableNodes, into: &buf) + FfiConverterUInt64.write(value.reachableBytes, into: &buf) + FfiConverterSequenceData.write(value.missingCids, into: &buf) + FfiConverterSequenceData.write(value.extraCids, into: &buf) } } @@ -21376,61 +22083,53 @@ public struct FfiConverterTypeScanOutcomeRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeScanOutcomeRecord_lift(_ buf: RustBuffer) throws -> ScanOutcomeRecord { - return try FfiConverterTypeScanOutcomeRecord.lift(buf) +public func FfiConverterTypeSnapshotBundleVerificationRecord_lift(_ buf: RustBuffer) throws -> SnapshotBundleVerificationRecord { + return try FfiConverterTypeSnapshotBundleVerificationRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeScanOutcomeRecord_lower(_ value: ScanOutcomeRecord) -> RustBuffer { - return FfiConverterTypeScanOutcomeRecord.lower(value) +public func FfiConverterTypeSnapshotBundleVerificationRecord_lower(_ value: SnapshotBundleVerificationRecord) -> RustBuffer { + return FfiConverterTypeSnapshotBundleVerificationRecord.lower(value) } -public struct SearchBudgetRecord: Equatable, Hashable { - public var maxNodes: UInt64? - public var maxCommittedBytes: UInt64? - public var maxDistanceEvaluations: UInt64? - public var maxFrontierEntries: UInt64? +public struct SnapshotNamespaceRecord: Equatable, Hashable { + public var kind: SnapshotNamespaceKind + public var customPrefix: Data? // Default memberwise initializers are never public by default, so we // declare one manually. - public init(maxNodes: UInt64?, maxCommittedBytes: UInt64?, maxDistanceEvaluations: UInt64?, maxFrontierEntries: UInt64?) { - self.maxNodes = maxNodes - self.maxCommittedBytes = maxCommittedBytes - self.maxDistanceEvaluations = maxDistanceEvaluations - self.maxFrontierEntries = maxFrontierEntries + public init(kind: SnapshotNamespaceKind, customPrefix: Data?) { + self.kind = kind + self.customPrefix = customPrefix } - - + + } #if compiler(>=6) -extension SearchBudgetRecord: Sendable {} +extension SnapshotNamespaceRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeSearchBudgetRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> SearchBudgetRecord { +public struct FfiConverterTypeSnapshotNamespaceRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> SnapshotNamespaceRecord { return - try SearchBudgetRecord( - maxNodes: FfiConverterOptionUInt64.read(from: &buf), - maxCommittedBytes: FfiConverterOptionUInt64.read(from: &buf), - maxDistanceEvaluations: FfiConverterOptionUInt64.read(from: &buf), - maxFrontierEntries: FfiConverterOptionUInt64.read(from: &buf) + try SnapshotNamespaceRecord( + kind: FfiConverterTypeSnapshotNamespaceKind.read(from: &buf), + customPrefix: FfiConverterOptionData.read(from: &buf) ) } - public static func write(_ value: SearchBudgetRecord, into buf: inout [UInt8]) { - FfiConverterOptionUInt64.write(value.maxNodes, into: &buf) - FfiConverterOptionUInt64.write(value.maxCommittedBytes, into: &buf) - FfiConverterOptionUInt64.write(value.maxDistanceEvaluations, into: &buf) - FfiConverterOptionUInt64.write(value.maxFrontierEntries, into: &buf) + public static func write(_ value: SnapshotNamespaceRecord, into buf: inout [UInt8]) { + FfiConverterTypeSnapshotNamespaceKind.write(value.kind, into: &buf) + FfiConverterOptionData.write(value.customPrefix, into: &buf) } } @@ -21438,105 +22137,65 @@ public struct FfiConverterTypeSearchBudgetRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeSearchBudgetRecord_lift(_ buf: RustBuffer) throws -> SearchBudgetRecord { - return try FfiConverterTypeSearchBudgetRecord.lift(buf) +public func FfiConverterTypeSnapshotNamespaceRecord_lift(_ buf: RustBuffer) throws -> SnapshotNamespaceRecord { + return try FfiConverterTypeSnapshotNamespaceRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeSearchBudgetRecord_lower(_ value: SearchBudgetRecord) -> RustBuffer { - return FfiConverterTypeSearchBudgetRecord.lower(value) +public func FfiConverterTypeSnapshotNamespaceRecord_lower(_ value: SnapshotNamespaceRecord) -> RustBuffer { + return FfiConverterTypeSnapshotNamespaceRecord.lower(value) } -public struct SecondaryIndexLimitsRecord: Equatable, Hashable { - public var maxTermBytes: UInt64 - public var maxProjectionBytes: UInt64 - public var maxAllValueBytes: UInt64 - public var maxTermsPerRecord: UInt64 - public var maxProjectedBytesPerRecord: UInt64 - public var maxDerivedMutationsPerWrite: UInt64 - public var maxProjectedBytesPerWrite: UInt64 - public var maxIndexes: UInt64 - public var buildPageSize: UInt64 - public var maxTemporarySortBytes: UInt64 - public var maxBundleNodes: UInt64 - public var maxBundleBytes: UInt64 - public var maxVerificationEntries: UInt64 - public var maxWriteRetries: UInt64 - public var maxBuildRetries: UInt64 +public struct SnapshotRecord: Equatable, Hashable { + public var id: Data + public var name: Data + public var tree: TreeRecord + public var createdAtMillis: UInt64? + public var updatedAtMillis: UInt64? // Default memberwise initializers are never public by default, so we // declare one manually. - public init(maxTermBytes: UInt64, maxProjectionBytes: UInt64, maxAllValueBytes: UInt64, maxTermsPerRecord: UInt64, maxProjectedBytesPerRecord: UInt64, maxDerivedMutationsPerWrite: UInt64, maxProjectedBytesPerWrite: UInt64, maxIndexes: UInt64, buildPageSize: UInt64, maxTemporarySortBytes: UInt64, maxBundleNodes: UInt64, maxBundleBytes: UInt64, maxVerificationEntries: UInt64, maxWriteRetries: UInt64, maxBuildRetries: UInt64) { - self.maxTermBytes = maxTermBytes - self.maxProjectionBytes = maxProjectionBytes - self.maxAllValueBytes = maxAllValueBytes - self.maxTermsPerRecord = maxTermsPerRecord - self.maxProjectedBytesPerRecord = maxProjectedBytesPerRecord - self.maxDerivedMutationsPerWrite = maxDerivedMutationsPerWrite - self.maxProjectedBytesPerWrite = maxProjectedBytesPerWrite - self.maxIndexes = maxIndexes - self.buildPageSize = buildPageSize - self.maxTemporarySortBytes = maxTemporarySortBytes - self.maxBundleNodes = maxBundleNodes - self.maxBundleBytes = maxBundleBytes - self.maxVerificationEntries = maxVerificationEntries - self.maxWriteRetries = maxWriteRetries - self.maxBuildRetries = maxBuildRetries + public init(id: Data, name: Data, tree: TreeRecord, createdAtMillis: UInt64?, updatedAtMillis: UInt64?) { + self.id = id + self.name = name + self.tree = tree + self.createdAtMillis = createdAtMillis + self.updatedAtMillis = updatedAtMillis } - - + + } #if compiler(>=6) -extension SecondaryIndexLimitsRecord: Sendable {} +extension SnapshotRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeSecondaryIndexLimitsRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> SecondaryIndexLimitsRecord { +public struct FfiConverterTypeSnapshotRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> SnapshotRecord { return - try SecondaryIndexLimitsRecord( - maxTermBytes: FfiConverterUInt64.read(from: &buf), - maxProjectionBytes: FfiConverterUInt64.read(from: &buf), - maxAllValueBytes: FfiConverterUInt64.read(from: &buf), - maxTermsPerRecord: FfiConverterUInt64.read(from: &buf), - maxProjectedBytesPerRecord: FfiConverterUInt64.read(from: &buf), - maxDerivedMutationsPerWrite: FfiConverterUInt64.read(from: &buf), - maxProjectedBytesPerWrite: FfiConverterUInt64.read(from: &buf), - maxIndexes: FfiConverterUInt64.read(from: &buf), - buildPageSize: FfiConverterUInt64.read(from: &buf), - maxTemporarySortBytes: FfiConverterUInt64.read(from: &buf), - maxBundleNodes: FfiConverterUInt64.read(from: &buf), - maxBundleBytes: FfiConverterUInt64.read(from: &buf), - maxVerificationEntries: FfiConverterUInt64.read(from: &buf), - maxWriteRetries: FfiConverterUInt64.read(from: &buf), - maxBuildRetries: FfiConverterUInt64.read(from: &buf) + try SnapshotRecord( + id: FfiConverterData.read(from: &buf), + name: FfiConverterData.read(from: &buf), + tree: FfiConverterTypeTreeRecord.read(from: &buf), + createdAtMillis: FfiConverterOptionUInt64.read(from: &buf), + updatedAtMillis: FfiConverterOptionUInt64.read(from: &buf) ) } - public static func write(_ value: SecondaryIndexLimitsRecord, into buf: inout [UInt8]) { - FfiConverterUInt64.write(value.maxTermBytes, into: &buf) - FfiConverterUInt64.write(value.maxProjectionBytes, into: &buf) - FfiConverterUInt64.write(value.maxAllValueBytes, into: &buf) - FfiConverterUInt64.write(value.maxTermsPerRecord, into: &buf) - FfiConverterUInt64.write(value.maxProjectedBytesPerRecord, into: &buf) - FfiConverterUInt64.write(value.maxDerivedMutationsPerWrite, into: &buf) - FfiConverterUInt64.write(value.maxProjectedBytesPerWrite, into: &buf) - FfiConverterUInt64.write(value.maxIndexes, into: &buf) - FfiConverterUInt64.write(value.buildPageSize, into: &buf) - FfiConverterUInt64.write(value.maxTemporarySortBytes, into: &buf) - FfiConverterUInt64.write(value.maxBundleNodes, into: &buf) - FfiConverterUInt64.write(value.maxBundleBytes, into: &buf) - FfiConverterUInt64.write(value.maxVerificationEntries, into: &buf) - FfiConverterUInt64.write(value.maxWriteRetries, into: &buf) - FfiConverterUInt64.write(value.maxBuildRetries, into: &buf) + public static func write(_ value: SnapshotRecord, into buf: inout [UInt8]) { + FfiConverterData.write(value.id, into: &buf) + FfiConverterData.write(value.name, into: &buf) + FfiConverterTypeTreeRecord.write(value.tree, into: &buf) + FfiConverterOptionUInt64.write(value.createdAtMillis, into: &buf) + FfiConverterOptionUInt64.write(value.updatedAtMillis, into: &buf) } } @@ -21544,53 +22203,53 @@ public struct FfiConverterTypeSecondaryIndexLimitsRecord: FfiConverterRustBuffer #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeSecondaryIndexLimitsRecord_lift(_ buf: RustBuffer) throws -> SecondaryIndexLimitsRecord { - return try FfiConverterTypeSecondaryIndexLimitsRecord.lift(buf) +public func FfiConverterTypeSnapshotRecord_lift(_ buf: RustBuffer) throws -> SnapshotRecord { + return try FfiConverterTypeSnapshotRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeSecondaryIndexLimitsRecord_lower(_ value: SecondaryIndexLimitsRecord) -> RustBuffer { - return FfiConverterTypeSecondaryIndexLimitsRecord.lower(value) +public func FfiConverterTypeSnapshotRecord_lower(_ value: SnapshotRecord) -> RustBuffer { + return FfiConverterTypeSnapshotRecord.lower(value) } -public struct SnapshotBundleNodeRecord: Equatable, Hashable { - public var cid: Data - public var bytes: Data +public struct SnapshotSelectionRecord: Equatable, Hashable { + public var snapshots: [SnapshotRecord] + public var missingIds: [Data] // Default memberwise initializers are never public by default, so we // declare one manually. - public init(cid: Data, bytes: Data) { - self.cid = cid - self.bytes = bytes + public init(snapshots: [SnapshotRecord], missingIds: [Data]) { + self.snapshots = snapshots + self.missingIds = missingIds } - - + + } #if compiler(>=6) -extension SnapshotBundleNodeRecord: Sendable {} +extension SnapshotSelectionRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeSnapshotBundleNodeRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> SnapshotBundleNodeRecord { +public struct FfiConverterTypeSnapshotSelectionRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> SnapshotSelectionRecord { return - try SnapshotBundleNodeRecord( - cid: FfiConverterData.read(from: &buf), - bytes: FfiConverterData.read(from: &buf) + try SnapshotSelectionRecord( + snapshots: FfiConverterSequenceTypeSnapshotRecord.read(from: &buf), + missingIds: FfiConverterSequenceData.read(from: &buf) ) } - public static func write(_ value: SnapshotBundleNodeRecord, into buf: inout [UInt8]) { - FfiConverterData.write(value.cid, into: &buf) - FfiConverterData.write(value.bytes, into: &buf) + public static func write(_ value: SnapshotSelectionRecord, into buf: inout [UInt8]) { + FfiConverterSequenceTypeSnapshotRecord.write(value.snapshots, into: &buf) + FfiConverterSequenceData.write(value.missingIds, into: &buf) } } @@ -21598,57 +22257,61 @@ public struct FfiConverterTypeSnapshotBundleNodeRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeSnapshotBundleNodeRecord_lift(_ buf: RustBuffer) throws -> SnapshotBundleNodeRecord { - return try FfiConverterTypeSnapshotBundleNodeRecord.lift(buf) +public func FfiConverterTypeSnapshotSelectionRecord_lift(_ buf: RustBuffer) throws -> SnapshotSelectionRecord { + return try FfiConverterTypeSnapshotSelectionRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeSnapshotBundleNodeRecord_lower(_ value: SnapshotBundleNodeRecord) -> RustBuffer { - return FfiConverterTypeSnapshotBundleNodeRecord.lower(value) +public func FfiConverterTypeSnapshotSelectionRecord_lower(_ value: SnapshotSelectionRecord) -> RustBuffer { + return FfiConverterTypeSnapshotSelectionRecord.lower(value) } -public struct SnapshotBundleRecord: Equatable, Hashable { - public var formatVersion: UInt32 - public var tree: TreeRecord - public var nodes: [SnapshotBundleNodeRecord] +public struct StatsComparisonRecord: Equatable, Hashable { + public var before: TreeStatsRecord + public var after: TreeStatsRecord + public var absolute: StatsDiffRecord + public var percentage: StatsPercentageChangeRecord // Default memberwise initializers are never public by default, so we // declare one manually. - public init(formatVersion: UInt32, tree: TreeRecord, nodes: [SnapshotBundleNodeRecord]) { - self.formatVersion = formatVersion - self.tree = tree - self.nodes = nodes + public init(before: TreeStatsRecord, after: TreeStatsRecord, absolute: StatsDiffRecord, percentage: StatsPercentageChangeRecord) { + self.before = before + self.after = after + self.absolute = absolute + self.percentage = percentage } - - + + } #if compiler(>=6) -extension SnapshotBundleRecord: Sendable {} +extension StatsComparisonRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeSnapshotBundleRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> SnapshotBundleRecord { +public struct FfiConverterTypeStatsComparisonRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> StatsComparisonRecord { return - try SnapshotBundleRecord( - formatVersion: FfiConverterUInt32.read(from: &buf), - tree: FfiConverterTypeTreeRecord.read(from: &buf), - nodes: FfiConverterSequenceTypeSnapshotBundleNodeRecord.read(from: &buf) + try StatsComparisonRecord( + before: FfiConverterTypeTreeStatsRecord.read(from: &buf), + after: FfiConverterTypeTreeStatsRecord.read(from: &buf), + absolute: FfiConverterTypeStatsDiffRecord.read(from: &buf), + percentage: FfiConverterTypeStatsPercentageChangeRecord.read(from: &buf) ) } - public static func write(_ value: SnapshotBundleRecord, into buf: inout [UInt8]) { - FfiConverterUInt32.write(value.formatVersion, into: &buf) - FfiConverterTypeTreeRecord.write(value.tree, into: &buf) - FfiConverterSequenceTypeSnapshotBundleNodeRecord.write(value.nodes, into: &buf) + public static func write(_ value: StatsComparisonRecord, into buf: inout [UInt8]) { + FfiConverterTypeTreeStatsRecord.write(value.before, into: &buf) + FfiConverterTypeTreeStatsRecord.write(value.after, into: &buf) + FfiConverterTypeStatsDiffRecord.write(value.absolute, into: &buf) + FfiConverterTypeStatsPercentageChangeRecord.write(value.percentage, into: &buf) } } @@ -21656,69 +22319,141 @@ public struct FfiConverterTypeSnapshotBundleRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeSnapshotBundleRecord_lift(_ buf: RustBuffer) throws -> SnapshotBundleRecord { - return try FfiConverterTypeSnapshotBundleRecord.lift(buf) +public func FfiConverterTypeStatsComparisonRecord_lift(_ buf: RustBuffer) throws -> StatsComparisonRecord { + return try FfiConverterTypeStatsComparisonRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeSnapshotBundleRecord_lower(_ value: SnapshotBundleRecord) -> RustBuffer { - return FfiConverterTypeSnapshotBundleRecord.lower(value) +public func FfiConverterTypeStatsComparisonRecord_lower(_ value: StatsComparisonRecord) -> RustBuffer { + return FfiConverterTypeStatsComparisonRecord.lower(value) } -public struct SnapshotBundleSummaryRecord: Equatable, Hashable { - public var formatVersion: UInt32 - public var root: Data? - public var nodeCount: UInt64 - public var byteCount: UInt64 - public var minNodeBytes: UInt64 - public var maxNodeBytes: UInt64 +public struct StatsDiffRecord: Equatable, Hashable { + public var numNodesDiff: Int64 + public var numLeavesDiff: Int64 + public var numInternalNodesDiff: Int64 + public var treeHeightDiff: Int8 + public var totalKeyValuePairsDiff: Int64 + public var totalTreeSizeBytesDiff: Int64 + public var avgNodeSizeBytesDiff: Double + public var minNodeSizeBytesDiff: Int64 + public var maxNodeSizeBytesDiff: Int64 + public var avgEntriesPerNodeDiff: Double + public var avgFanoutDiff: Double + public var minFanoutDiff: Int64 + public var maxFanoutDiff: Int64 + public var avgFillFactorDiff: Double + public var avgLeafFillFactorDiff: Double + public var avgInternalFillFactorDiff: Double + public var avgKeySizeBytesDiff: Double + public var avgValueSizeBytesDiff: Double + public var minKeySizeBytesDiff: Int64 + public var maxKeySizeBytesDiff: Int64 + public var minValueSizeBytesDiff: Int64 + public var maxValueSizeBytesDiff: Int64 + public var totalKeysSizeBytesDiff: Int64 + public var totalValuesSizeBytesDiff: Int64 // Default memberwise initializers are never public by default, so we // declare one manually. - public init(formatVersion: UInt32, root: Data?, nodeCount: UInt64, byteCount: UInt64, minNodeBytes: UInt64, maxNodeBytes: UInt64) { - self.formatVersion = formatVersion - self.root = root - self.nodeCount = nodeCount - self.byteCount = byteCount - self.minNodeBytes = minNodeBytes - self.maxNodeBytes = maxNodeBytes + public init(numNodesDiff: Int64, numLeavesDiff: Int64, numInternalNodesDiff: Int64, treeHeightDiff: Int8, totalKeyValuePairsDiff: Int64, totalTreeSizeBytesDiff: Int64, avgNodeSizeBytesDiff: Double, minNodeSizeBytesDiff: Int64, maxNodeSizeBytesDiff: Int64, avgEntriesPerNodeDiff: Double, avgFanoutDiff: Double, minFanoutDiff: Int64, maxFanoutDiff: Int64, avgFillFactorDiff: Double, avgLeafFillFactorDiff: Double, avgInternalFillFactorDiff: Double, avgKeySizeBytesDiff: Double, avgValueSizeBytesDiff: Double, minKeySizeBytesDiff: Int64, maxKeySizeBytesDiff: Int64, minValueSizeBytesDiff: Int64, maxValueSizeBytesDiff: Int64, totalKeysSizeBytesDiff: Int64, totalValuesSizeBytesDiff: Int64) { + self.numNodesDiff = numNodesDiff + self.numLeavesDiff = numLeavesDiff + self.numInternalNodesDiff = numInternalNodesDiff + self.treeHeightDiff = treeHeightDiff + self.totalKeyValuePairsDiff = totalKeyValuePairsDiff + self.totalTreeSizeBytesDiff = totalTreeSizeBytesDiff + self.avgNodeSizeBytesDiff = avgNodeSizeBytesDiff + self.minNodeSizeBytesDiff = minNodeSizeBytesDiff + self.maxNodeSizeBytesDiff = maxNodeSizeBytesDiff + self.avgEntriesPerNodeDiff = avgEntriesPerNodeDiff + self.avgFanoutDiff = avgFanoutDiff + self.minFanoutDiff = minFanoutDiff + self.maxFanoutDiff = maxFanoutDiff + self.avgFillFactorDiff = avgFillFactorDiff + self.avgLeafFillFactorDiff = avgLeafFillFactorDiff + self.avgInternalFillFactorDiff = avgInternalFillFactorDiff + self.avgKeySizeBytesDiff = avgKeySizeBytesDiff + self.avgValueSizeBytesDiff = avgValueSizeBytesDiff + self.minKeySizeBytesDiff = minKeySizeBytesDiff + self.maxKeySizeBytesDiff = maxKeySizeBytesDiff + self.minValueSizeBytesDiff = minValueSizeBytesDiff + self.maxValueSizeBytesDiff = maxValueSizeBytesDiff + self.totalKeysSizeBytesDiff = totalKeysSizeBytesDiff + self.totalValuesSizeBytesDiff = totalValuesSizeBytesDiff } - - + + } #if compiler(>=6) -extension SnapshotBundleSummaryRecord: Sendable {} +extension StatsDiffRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeSnapshotBundleSummaryRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> SnapshotBundleSummaryRecord { +public struct FfiConverterTypeStatsDiffRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> StatsDiffRecord { return - try SnapshotBundleSummaryRecord( - formatVersion: FfiConverterUInt32.read(from: &buf), - root: FfiConverterOptionData.read(from: &buf), - nodeCount: FfiConverterUInt64.read(from: &buf), - byteCount: FfiConverterUInt64.read(from: &buf), - minNodeBytes: FfiConverterUInt64.read(from: &buf), - maxNodeBytes: FfiConverterUInt64.read(from: &buf) + try StatsDiffRecord( + numNodesDiff: FfiConverterInt64.read(from: &buf), + numLeavesDiff: FfiConverterInt64.read(from: &buf), + numInternalNodesDiff: FfiConverterInt64.read(from: &buf), + treeHeightDiff: FfiConverterInt8.read(from: &buf), + totalKeyValuePairsDiff: FfiConverterInt64.read(from: &buf), + totalTreeSizeBytesDiff: FfiConverterInt64.read(from: &buf), + avgNodeSizeBytesDiff: FfiConverterDouble.read(from: &buf), + minNodeSizeBytesDiff: FfiConverterInt64.read(from: &buf), + maxNodeSizeBytesDiff: FfiConverterInt64.read(from: &buf), + avgEntriesPerNodeDiff: FfiConverterDouble.read(from: &buf), + avgFanoutDiff: FfiConverterDouble.read(from: &buf), + minFanoutDiff: FfiConverterInt64.read(from: &buf), + maxFanoutDiff: FfiConverterInt64.read(from: &buf), + avgFillFactorDiff: FfiConverterDouble.read(from: &buf), + avgLeafFillFactorDiff: FfiConverterDouble.read(from: &buf), + avgInternalFillFactorDiff: FfiConverterDouble.read(from: &buf), + avgKeySizeBytesDiff: FfiConverterDouble.read(from: &buf), + avgValueSizeBytesDiff: FfiConverterDouble.read(from: &buf), + minKeySizeBytesDiff: FfiConverterInt64.read(from: &buf), + maxKeySizeBytesDiff: FfiConverterInt64.read(from: &buf), + minValueSizeBytesDiff: FfiConverterInt64.read(from: &buf), + maxValueSizeBytesDiff: FfiConverterInt64.read(from: &buf), + totalKeysSizeBytesDiff: FfiConverterInt64.read(from: &buf), + totalValuesSizeBytesDiff: FfiConverterInt64.read(from: &buf) ) } - public static func write(_ value: SnapshotBundleSummaryRecord, into buf: inout [UInt8]) { - FfiConverterUInt32.write(value.formatVersion, into: &buf) - FfiConverterOptionData.write(value.root, into: &buf) - FfiConverterUInt64.write(value.nodeCount, into: &buf) - FfiConverterUInt64.write(value.byteCount, into: &buf) - FfiConverterUInt64.write(value.minNodeBytes, into: &buf) - FfiConverterUInt64.write(value.maxNodeBytes, into: &buf) + public static func write(_ value: StatsDiffRecord, into buf: inout [UInt8]) { + FfiConverterInt64.write(value.numNodesDiff, into: &buf) + FfiConverterInt64.write(value.numLeavesDiff, into: &buf) + FfiConverterInt64.write(value.numInternalNodesDiff, into: &buf) + FfiConverterInt8.write(value.treeHeightDiff, into: &buf) + FfiConverterInt64.write(value.totalKeyValuePairsDiff, into: &buf) + FfiConverterInt64.write(value.totalTreeSizeBytesDiff, into: &buf) + FfiConverterDouble.write(value.avgNodeSizeBytesDiff, into: &buf) + FfiConverterInt64.write(value.minNodeSizeBytesDiff, into: &buf) + FfiConverterInt64.write(value.maxNodeSizeBytesDiff, into: &buf) + FfiConverterDouble.write(value.avgEntriesPerNodeDiff, into: &buf) + FfiConverterDouble.write(value.avgFanoutDiff, into: &buf) + FfiConverterInt64.write(value.minFanoutDiff, into: &buf) + FfiConverterInt64.write(value.maxFanoutDiff, into: &buf) + FfiConverterDouble.write(value.avgFillFactorDiff, into: &buf) + FfiConverterDouble.write(value.avgLeafFillFactorDiff, into: &buf) + FfiConverterDouble.write(value.avgInternalFillFactorDiff, into: &buf) + FfiConverterDouble.write(value.avgKeySizeBytesDiff, into: &buf) + FfiConverterDouble.write(value.avgValueSizeBytesDiff, into: &buf) + FfiConverterInt64.write(value.minKeySizeBytesDiff, into: &buf) + FfiConverterInt64.write(value.maxKeySizeBytesDiff, into: &buf) + FfiConverterInt64.write(value.minValueSizeBytesDiff, into: &buf) + FfiConverterInt64.write(value.maxValueSizeBytesDiff, into: &buf) + FfiConverterInt64.write(value.totalKeysSizeBytesDiff, into: &buf) + FfiConverterInt64.write(value.totalValuesSizeBytesDiff, into: &buf) } } @@ -21726,69 +22461,141 @@ public struct FfiConverterTypeSnapshotBundleSummaryRecord: FfiConverterRustBuffe #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeSnapshotBundleSummaryRecord_lift(_ buf: RustBuffer) throws -> SnapshotBundleSummaryRecord { - return try FfiConverterTypeSnapshotBundleSummaryRecord.lift(buf) +public func FfiConverterTypeStatsDiffRecord_lift(_ buf: RustBuffer) throws -> StatsDiffRecord { + return try FfiConverterTypeStatsDiffRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeSnapshotBundleSummaryRecord_lower(_ value: SnapshotBundleSummaryRecord) -> RustBuffer { - return FfiConverterTypeSnapshotBundleSummaryRecord.lower(value) +public func FfiConverterTypeStatsDiffRecord_lower(_ value: StatsDiffRecord) -> RustBuffer { + return FfiConverterTypeStatsDiffRecord.lower(value) } -public struct SnapshotBundleVerificationRecord: Equatable, Hashable { - public var valid: Bool - public var summary: SnapshotBundleSummaryRecord - public var reachableNodes: UInt64 - public var reachableBytes: UInt64 - public var missingCids: [Data] - public var extraCids: [Data] +public struct StatsPercentageChangeRecord: Equatable, Hashable { + public var numNodesPct: Double + public var numLeavesPct: Double + public var numInternalNodesPct: Double + public var treeHeightPct: Double + public var totalKeyValuePairsPct: Double + public var totalTreeSizeBytesPct: Double + public var avgNodeSizeBytesPct: Double + public var minNodeSizeBytesPct: Double + public var maxNodeSizeBytesPct: Double + public var avgEntriesPerNodePct: Double + public var avgFanoutPct: Double + public var minFanoutPct: Double + public var maxFanoutPct: Double + public var avgFillFactorPct: Double + public var avgLeafFillFactorPct: Double + public var avgInternalFillFactorPct: Double + public var avgKeySizeBytesPct: Double + public var avgValueSizeBytesPct: Double + public var minKeySizeBytesPct: Double + public var maxKeySizeBytesPct: Double + public var minValueSizeBytesPct: Double + public var maxValueSizeBytesPct: Double + public var totalKeysSizeBytesPct: Double + public var totalValuesSizeBytesPct: Double // Default memberwise initializers are never public by default, so we // declare one manually. - public init(valid: Bool, summary: SnapshotBundleSummaryRecord, reachableNodes: UInt64, reachableBytes: UInt64, missingCids: [Data], extraCids: [Data]) { - self.valid = valid - self.summary = summary - self.reachableNodes = reachableNodes - self.reachableBytes = reachableBytes - self.missingCids = missingCids - self.extraCids = extraCids + public init(numNodesPct: Double, numLeavesPct: Double, numInternalNodesPct: Double, treeHeightPct: Double, totalKeyValuePairsPct: Double, totalTreeSizeBytesPct: Double, avgNodeSizeBytesPct: Double, minNodeSizeBytesPct: Double, maxNodeSizeBytesPct: Double, avgEntriesPerNodePct: Double, avgFanoutPct: Double, minFanoutPct: Double, maxFanoutPct: Double, avgFillFactorPct: Double, avgLeafFillFactorPct: Double, avgInternalFillFactorPct: Double, avgKeySizeBytesPct: Double, avgValueSizeBytesPct: Double, minKeySizeBytesPct: Double, maxKeySizeBytesPct: Double, minValueSizeBytesPct: Double, maxValueSizeBytesPct: Double, totalKeysSizeBytesPct: Double, totalValuesSizeBytesPct: Double) { + self.numNodesPct = numNodesPct + self.numLeavesPct = numLeavesPct + self.numInternalNodesPct = numInternalNodesPct + self.treeHeightPct = treeHeightPct + self.totalKeyValuePairsPct = totalKeyValuePairsPct + self.totalTreeSizeBytesPct = totalTreeSizeBytesPct + self.avgNodeSizeBytesPct = avgNodeSizeBytesPct + self.minNodeSizeBytesPct = minNodeSizeBytesPct + self.maxNodeSizeBytesPct = maxNodeSizeBytesPct + self.avgEntriesPerNodePct = avgEntriesPerNodePct + self.avgFanoutPct = avgFanoutPct + self.minFanoutPct = minFanoutPct + self.maxFanoutPct = maxFanoutPct + self.avgFillFactorPct = avgFillFactorPct + self.avgLeafFillFactorPct = avgLeafFillFactorPct + self.avgInternalFillFactorPct = avgInternalFillFactorPct + self.avgKeySizeBytesPct = avgKeySizeBytesPct + self.avgValueSizeBytesPct = avgValueSizeBytesPct + self.minKeySizeBytesPct = minKeySizeBytesPct + self.maxKeySizeBytesPct = maxKeySizeBytesPct + self.minValueSizeBytesPct = minValueSizeBytesPct + self.maxValueSizeBytesPct = maxValueSizeBytesPct + self.totalKeysSizeBytesPct = totalKeysSizeBytesPct + self.totalValuesSizeBytesPct = totalValuesSizeBytesPct } - - + + } #if compiler(>=6) -extension SnapshotBundleVerificationRecord: Sendable {} +extension StatsPercentageChangeRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeSnapshotBundleVerificationRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> SnapshotBundleVerificationRecord { +public struct FfiConverterTypeStatsPercentageChangeRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> StatsPercentageChangeRecord { return - try SnapshotBundleVerificationRecord( - valid: FfiConverterBool.read(from: &buf), - summary: FfiConverterTypeSnapshotBundleSummaryRecord.read(from: &buf), - reachableNodes: FfiConverterUInt64.read(from: &buf), - reachableBytes: FfiConverterUInt64.read(from: &buf), - missingCids: FfiConverterSequenceData.read(from: &buf), - extraCids: FfiConverterSequenceData.read(from: &buf) + try StatsPercentageChangeRecord( + numNodesPct: FfiConverterDouble.read(from: &buf), + numLeavesPct: FfiConverterDouble.read(from: &buf), + numInternalNodesPct: FfiConverterDouble.read(from: &buf), + treeHeightPct: FfiConverterDouble.read(from: &buf), + totalKeyValuePairsPct: FfiConverterDouble.read(from: &buf), + totalTreeSizeBytesPct: FfiConverterDouble.read(from: &buf), + avgNodeSizeBytesPct: FfiConverterDouble.read(from: &buf), + minNodeSizeBytesPct: FfiConverterDouble.read(from: &buf), + maxNodeSizeBytesPct: FfiConverterDouble.read(from: &buf), + avgEntriesPerNodePct: FfiConverterDouble.read(from: &buf), + avgFanoutPct: FfiConverterDouble.read(from: &buf), + minFanoutPct: FfiConverterDouble.read(from: &buf), + maxFanoutPct: FfiConverterDouble.read(from: &buf), + avgFillFactorPct: FfiConverterDouble.read(from: &buf), + avgLeafFillFactorPct: FfiConverterDouble.read(from: &buf), + avgInternalFillFactorPct: FfiConverterDouble.read(from: &buf), + avgKeySizeBytesPct: FfiConverterDouble.read(from: &buf), + avgValueSizeBytesPct: FfiConverterDouble.read(from: &buf), + minKeySizeBytesPct: FfiConverterDouble.read(from: &buf), + maxKeySizeBytesPct: FfiConverterDouble.read(from: &buf), + minValueSizeBytesPct: FfiConverterDouble.read(from: &buf), + maxValueSizeBytesPct: FfiConverterDouble.read(from: &buf), + totalKeysSizeBytesPct: FfiConverterDouble.read(from: &buf), + totalValuesSizeBytesPct: FfiConverterDouble.read(from: &buf) ) } - public static func write(_ value: SnapshotBundleVerificationRecord, into buf: inout [UInt8]) { - FfiConverterBool.write(value.valid, into: &buf) - FfiConverterTypeSnapshotBundleSummaryRecord.write(value.summary, into: &buf) - FfiConverterUInt64.write(value.reachableNodes, into: &buf) - FfiConverterUInt64.write(value.reachableBytes, into: &buf) - FfiConverterSequenceData.write(value.missingCids, into: &buf) - FfiConverterSequenceData.write(value.extraCids, into: &buf) + public static func write(_ value: StatsPercentageChangeRecord, into buf: inout [UInt8]) { + FfiConverterDouble.write(value.numNodesPct, into: &buf) + FfiConverterDouble.write(value.numLeavesPct, into: &buf) + FfiConverterDouble.write(value.numInternalNodesPct, into: &buf) + FfiConverterDouble.write(value.treeHeightPct, into: &buf) + FfiConverterDouble.write(value.totalKeyValuePairsPct, into: &buf) + FfiConverterDouble.write(value.totalTreeSizeBytesPct, into: &buf) + FfiConverterDouble.write(value.avgNodeSizeBytesPct, into: &buf) + FfiConverterDouble.write(value.minNodeSizeBytesPct, into: &buf) + FfiConverterDouble.write(value.maxNodeSizeBytesPct, into: &buf) + FfiConverterDouble.write(value.avgEntriesPerNodePct, into: &buf) + FfiConverterDouble.write(value.avgFanoutPct, into: &buf) + FfiConverterDouble.write(value.minFanoutPct, into: &buf) + FfiConverterDouble.write(value.maxFanoutPct, into: &buf) + FfiConverterDouble.write(value.avgFillFactorPct, into: &buf) + FfiConverterDouble.write(value.avgLeafFillFactorPct, into: &buf) + FfiConverterDouble.write(value.avgInternalFillFactorPct, into: &buf) + FfiConverterDouble.write(value.avgKeySizeBytesPct, into: &buf) + FfiConverterDouble.write(value.avgValueSizeBytesPct, into: &buf) + FfiConverterDouble.write(value.minKeySizeBytesPct, into: &buf) + FfiConverterDouble.write(value.maxKeySizeBytesPct, into: &buf) + FfiConverterDouble.write(value.minValueSizeBytesPct, into: &buf) + FfiConverterDouble.write(value.maxValueSizeBytesPct, into: &buf) + FfiConverterDouble.write(value.totalKeysSizeBytesPct, into: &buf) + FfiConverterDouble.write(value.totalValuesSizeBytesPct, into: &buf) } } @@ -21796,53 +22603,81 @@ public struct FfiConverterTypeSnapshotBundleVerificationRecord: FfiConverterRust #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeSnapshotBundleVerificationRecord_lift(_ buf: RustBuffer) throws -> SnapshotBundleVerificationRecord { - return try FfiConverterTypeSnapshotBundleVerificationRecord.lift(buf) +public func FfiConverterTypeStatsPercentageChangeRecord_lift(_ buf: RustBuffer) throws -> StatsPercentageChangeRecord { + return try FfiConverterTypeStatsPercentageChangeRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeSnapshotBundleVerificationRecord_lower(_ value: SnapshotBundleVerificationRecord) -> RustBuffer { - return FfiConverterTypeSnapshotBundleVerificationRecord.lower(value) +public func FfiConverterTypeStatsPercentageChangeRecord_lower(_ value: StatsPercentageChangeRecord) -> RustBuffer { + return FfiConverterTypeStatsPercentageChangeRecord.lower(value) } -public struct SnapshotNamespaceRecord: Equatable, Hashable { - public var kind: SnapshotNamespaceKind - public var customPrefix: Data? +public struct StoreCapabilitiesRecord: Equatable, Hashable { + public var nativeBatchReads: Bool + public var atomicBatchWrites: Bool + public var nodeScan: Bool + public var hints: Bool + public var atomicNodesAndHint: Bool + public var rootScan: Bool + public var rootCompareAndSwap: Bool + public var transactions: Bool + public var readParallelism: UInt32 // Default memberwise initializers are never public by default, so we // declare one manually. - public init(kind: SnapshotNamespaceKind, customPrefix: Data?) { - self.kind = kind - self.customPrefix = customPrefix + public init(nativeBatchReads: Bool, atomicBatchWrites: Bool, nodeScan: Bool, hints: Bool, atomicNodesAndHint: Bool, rootScan: Bool, rootCompareAndSwap: Bool, transactions: Bool, readParallelism: UInt32) { + self.nativeBatchReads = nativeBatchReads + self.atomicBatchWrites = atomicBatchWrites + self.nodeScan = nodeScan + self.hints = hints + self.atomicNodesAndHint = atomicNodesAndHint + self.rootScan = rootScan + self.rootCompareAndSwap = rootCompareAndSwap + self.transactions = transactions + self.readParallelism = readParallelism } - - + + } #if compiler(>=6) -extension SnapshotNamespaceRecord: Sendable {} +extension StoreCapabilitiesRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeSnapshotNamespaceRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> SnapshotNamespaceRecord { +public struct FfiConverterTypeStoreCapabilitiesRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> StoreCapabilitiesRecord { return - try SnapshotNamespaceRecord( - kind: FfiConverterTypeSnapshotNamespaceKind.read(from: &buf), - customPrefix: FfiConverterOptionData.read(from: &buf) + try StoreCapabilitiesRecord( + nativeBatchReads: FfiConverterBool.read(from: &buf), + atomicBatchWrites: FfiConverterBool.read(from: &buf), + nodeScan: FfiConverterBool.read(from: &buf), + hints: FfiConverterBool.read(from: &buf), + atomicNodesAndHint: FfiConverterBool.read(from: &buf), + rootScan: FfiConverterBool.read(from: &buf), + rootCompareAndSwap: FfiConverterBool.read(from: &buf), + transactions: FfiConverterBool.read(from: &buf), + readParallelism: FfiConverterUInt32.read(from: &buf) ) } - public static func write(_ value: SnapshotNamespaceRecord, into buf: inout [UInt8]) { - FfiConverterTypeSnapshotNamespaceKind.write(value.kind, into: &buf) - FfiConverterOptionData.write(value.customPrefix, into: &buf) + public static func write(_ value: StoreCapabilitiesRecord, into buf: inout [UInt8]) { + FfiConverterBool.write(value.nativeBatchReads, into: &buf) + FfiConverterBool.write(value.atomicBatchWrites, into: &buf) + FfiConverterBool.write(value.nodeScan, into: &buf) + FfiConverterBool.write(value.hints, into: &buf) + FfiConverterBool.write(value.atomicNodesAndHint, into: &buf) + FfiConverterBool.write(value.rootScan, into: &buf) + FfiConverterBool.write(value.rootCompareAndSwap, into: &buf) + FfiConverterBool.write(value.transactions, into: &buf) + FfiConverterUInt32.write(value.readParallelism, into: &buf) } } @@ -21850,65 +22685,69 @@ public struct FfiConverterTypeSnapshotNamespaceRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeSnapshotNamespaceRecord_lift(_ buf: RustBuffer) throws -> SnapshotNamespaceRecord { - return try FfiConverterTypeSnapshotNamespaceRecord.lift(buf) +public func FfiConverterTypeStoreCapabilitiesRecord_lift(_ buf: RustBuffer) throws -> StoreCapabilitiesRecord { + return try FfiConverterTypeStoreCapabilitiesRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeSnapshotNamespaceRecord_lower(_ value: SnapshotNamespaceRecord) -> RustBuffer { - return FfiConverterTypeSnapshotNamespaceRecord.lower(value) +public func FfiConverterTypeStoreCapabilitiesRecord_lower(_ value: StoreCapabilitiesRecord) -> RustBuffer { + return FfiConverterTypeStoreCapabilitiesRecord.lower(value) } -public struct SnapshotRecord: Equatable, Hashable { - public var id: Data - public var name: Data - public var tree: TreeRecord - public var createdAtMillis: UInt64? - public var updatedAtMillis: UInt64? +public struct StoreDescriptorRecord: Equatable, Hashable { + public var protocolMajor: UInt32 + public var adapterName: String + public var provider: String + public var schemaVersion: UInt32 + public var capabilities: StoreCapabilitiesRecord + public var limits: StoreLimitsRecord // Default memberwise initializers are never public by default, so we // declare one manually. - public init(id: Data, name: Data, tree: TreeRecord, createdAtMillis: UInt64?, updatedAtMillis: UInt64?) { - self.id = id - self.name = name - self.tree = tree - self.createdAtMillis = createdAtMillis - self.updatedAtMillis = updatedAtMillis + public init(protocolMajor: UInt32, adapterName: String, provider: String, schemaVersion: UInt32, capabilities: StoreCapabilitiesRecord, limits: StoreLimitsRecord) { + self.protocolMajor = protocolMajor + self.adapterName = adapterName + self.provider = provider + self.schemaVersion = schemaVersion + self.capabilities = capabilities + self.limits = limits } - - + + } #if compiler(>=6) -extension SnapshotRecord: Sendable {} +extension StoreDescriptorRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeSnapshotRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> SnapshotRecord { +public struct FfiConverterTypeStoreDescriptorRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> StoreDescriptorRecord { return - try SnapshotRecord( - id: FfiConverterData.read(from: &buf), - name: FfiConverterData.read(from: &buf), - tree: FfiConverterTypeTreeRecord.read(from: &buf), - createdAtMillis: FfiConverterOptionUInt64.read(from: &buf), - updatedAtMillis: FfiConverterOptionUInt64.read(from: &buf) + try StoreDescriptorRecord( + protocolMajor: FfiConverterUInt32.read(from: &buf), + adapterName: FfiConverterString.read(from: &buf), + provider: FfiConverterString.read(from: &buf), + schemaVersion: FfiConverterUInt32.read(from: &buf), + capabilities: FfiConverterTypeStoreCapabilitiesRecord.read(from: &buf), + limits: FfiConverterTypeStoreLimitsRecord.read(from: &buf) ) } - public static func write(_ value: SnapshotRecord, into buf: inout [UInt8]) { - FfiConverterData.write(value.id, into: &buf) - FfiConverterData.write(value.name, into: &buf) - FfiConverterTypeTreeRecord.write(value.tree, into: &buf) - FfiConverterOptionUInt64.write(value.createdAtMillis, into: &buf) - FfiConverterOptionUInt64.write(value.updatedAtMillis, into: &buf) + public static func write(_ value: StoreDescriptorRecord, into buf: inout [UInt8]) { + FfiConverterUInt32.write(value.protocolMajor, into: &buf) + FfiConverterString.write(value.adapterName, into: &buf) + FfiConverterString.write(value.provider, into: &buf) + FfiConverterUInt32.write(value.schemaVersion, into: &buf) + FfiConverterTypeStoreCapabilitiesRecord.write(value.capabilities, into: &buf) + FfiConverterTypeStoreLimitsRecord.write(value.limits, into: &buf) } } @@ -21916,53 +22755,53 @@ public struct FfiConverterTypeSnapshotRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeSnapshotRecord_lift(_ buf: RustBuffer) throws -> SnapshotRecord { - return try FfiConverterTypeSnapshotRecord.lift(buf) +public func FfiConverterTypeStoreDescriptorRecord_lift(_ buf: RustBuffer) throws -> StoreDescriptorRecord { + return try FfiConverterTypeStoreDescriptorRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeSnapshotRecord_lower(_ value: SnapshotRecord) -> RustBuffer { - return FfiConverterTypeSnapshotRecord.lower(value) +public func FfiConverterTypeStoreDescriptorRecord_lower(_ value: StoreDescriptorRecord) -> RustBuffer { + return FfiConverterTypeStoreDescriptorRecord.lower(value) } -public struct SnapshotSelectionRecord: Equatable, Hashable { - public var snapshots: [SnapshotRecord] - public var missingIds: [Data] +public struct StoreDescriptorResultRecord: Equatable, Hashable { + public var value: StoreDescriptorRecord? + public var error: StoreErrorRecord? // Default memberwise initializers are never public by default, so we // declare one manually. - public init(snapshots: [SnapshotRecord], missingIds: [Data]) { - self.snapshots = snapshots - self.missingIds = missingIds + public init(value: StoreDescriptorRecord?, error: StoreErrorRecord?) { + self.value = value + self.error = error } - - + + } #if compiler(>=6) -extension SnapshotSelectionRecord: Sendable {} +extension StoreDescriptorResultRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeSnapshotSelectionRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> SnapshotSelectionRecord { +public struct FfiConverterTypeStoreDescriptorResultRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> StoreDescriptorResultRecord { return - try SnapshotSelectionRecord( - snapshots: FfiConverterSequenceTypeSnapshotRecord.read(from: &buf), - missingIds: FfiConverterSequenceData.read(from: &buf) + try StoreDescriptorResultRecord( + value: FfiConverterOptionTypeStoreDescriptorRecord.read(from: &buf), + error: FfiConverterOptionTypeStoreErrorRecord.read(from: &buf) ) } - public static func write(_ value: SnapshotSelectionRecord, into buf: inout [UInt8]) { - FfiConverterSequenceTypeSnapshotRecord.write(value.snapshots, into: &buf) - FfiConverterSequenceData.write(value.missingIds, into: &buf) + public static func write(_ value: StoreDescriptorResultRecord, into buf: inout [UInt8]) { + FfiConverterOptionTypeStoreDescriptorRecord.write(value.value, into: &buf) + FfiConverterOptionTypeStoreErrorRecord.write(value.error, into: &buf) } } @@ -21970,61 +22809,61 @@ public struct FfiConverterTypeSnapshotSelectionRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeSnapshotSelectionRecord_lift(_ buf: RustBuffer) throws -> SnapshotSelectionRecord { - return try FfiConverterTypeSnapshotSelectionRecord.lift(buf) +public func FfiConverterTypeStoreDescriptorResultRecord_lift(_ buf: RustBuffer) throws -> StoreDescriptorResultRecord { + return try FfiConverterTypeStoreDescriptorResultRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeSnapshotSelectionRecord_lower(_ value: SnapshotSelectionRecord) -> RustBuffer { - return FfiConverterTypeSnapshotSelectionRecord.lower(value) +public func FfiConverterTypeStoreDescriptorResultRecord_lower(_ value: StoreDescriptorResultRecord) -> RustBuffer { + return FfiConverterTypeStoreDescriptorResultRecord.lower(value) } -public struct StatsComparisonRecord: Equatable, Hashable { - public var before: TreeStatsRecord - public var after: TreeStatsRecord - public var absolute: StatsDiffRecord - public var percentage: StatsPercentageChangeRecord +public struct StoreErrorRecord: Equatable, Hashable { + public var code: String + public var message: String + public var retryable: Bool + public var providerCode: String? // Default memberwise initializers are never public by default, so we // declare one manually. - public init(before: TreeStatsRecord, after: TreeStatsRecord, absolute: StatsDiffRecord, percentage: StatsPercentageChangeRecord) { - self.before = before - self.after = after - self.absolute = absolute - self.percentage = percentage + public init(code: String, message: String, retryable: Bool, providerCode: String?) { + self.code = code + self.message = message + self.retryable = retryable + self.providerCode = providerCode } - - + + } #if compiler(>=6) -extension StatsComparisonRecord: Sendable {} +extension StoreErrorRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeStatsComparisonRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> StatsComparisonRecord { +public struct FfiConverterTypeStoreErrorRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> StoreErrorRecord { return - try StatsComparisonRecord( - before: FfiConverterTypeTreeStatsRecord.read(from: &buf), - after: FfiConverterTypeTreeStatsRecord.read(from: &buf), - absolute: FfiConverterTypeStatsDiffRecord.read(from: &buf), - percentage: FfiConverterTypeStatsPercentageChangeRecord.read(from: &buf) + try StoreErrorRecord( + code: FfiConverterString.read(from: &buf), + message: FfiConverterString.read(from: &buf), + retryable: FfiConverterBool.read(from: &buf), + providerCode: FfiConverterOptionString.read(from: &buf) ) } - public static func write(_ value: StatsComparisonRecord, into buf: inout [UInt8]) { - FfiConverterTypeTreeStatsRecord.write(value.before, into: &buf) - FfiConverterTypeTreeStatsRecord.write(value.after, into: &buf) - FfiConverterTypeStatsDiffRecord.write(value.absolute, into: &buf) - FfiConverterTypeStatsPercentageChangeRecord.write(value.percentage, into: &buf) + public static func write(_ value: StoreErrorRecord, into buf: inout [UInt8]) { + FfiConverterString.write(value.code, into: &buf) + FfiConverterString.write(value.message, into: &buf) + FfiConverterBool.write(value.retryable, into: &buf) + FfiConverterOptionString.write(value.providerCode, into: &buf) } } @@ -22032,141 +22871,61 @@ public struct FfiConverterTypeStatsComparisonRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeStatsComparisonRecord_lift(_ buf: RustBuffer) throws -> StatsComparisonRecord { - return try FfiConverterTypeStatsComparisonRecord.lift(buf) +public func FfiConverterTypeStoreErrorRecord_lift(_ buf: RustBuffer) throws -> StoreErrorRecord { + return try FfiConverterTypeStoreErrorRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeStatsComparisonRecord_lower(_ value: StatsComparisonRecord) -> RustBuffer { - return FfiConverterTypeStatsComparisonRecord.lower(value) +public func FfiConverterTypeStoreErrorRecord_lower(_ value: StoreErrorRecord) -> RustBuffer { + return FfiConverterTypeStoreErrorRecord.lower(value) } -public struct StatsDiffRecord: Equatable, Hashable { - public var numNodesDiff: Int64 - public var numLeavesDiff: Int64 - public var numInternalNodesDiff: Int64 - public var treeHeightDiff: Int8 - public var totalKeyValuePairsDiff: Int64 - public var totalTreeSizeBytesDiff: Int64 - public var avgNodeSizeBytesDiff: Double - public var minNodeSizeBytesDiff: Int64 - public var maxNodeSizeBytesDiff: Int64 - public var avgEntriesPerNodeDiff: Double - public var avgFanoutDiff: Double - public var minFanoutDiff: Int64 - public var maxFanoutDiff: Int64 - public var avgFillFactorDiff: Double - public var avgLeafFillFactorDiff: Double - public var avgInternalFillFactorDiff: Double - public var avgKeySizeBytesDiff: Double - public var avgValueSizeBytesDiff: Double - public var minKeySizeBytesDiff: Int64 - public var maxKeySizeBytesDiff: Int64 - public var minValueSizeBytesDiff: Int64 - public var maxValueSizeBytesDiff: Int64 - public var totalKeysSizeBytesDiff: Int64 - public var totalValuesSizeBytesDiff: Int64 +public struct StoreLimitsRecord: Equatable, Hashable { + public var maxBatchReadItems: UInt32? + public var maxBatchWriteItems: UInt32? + public var maxTransactionOperations: UInt32? + public var maxNodeBytes: UInt64? // Default memberwise initializers are never public by default, so we // declare one manually. - public init(numNodesDiff: Int64, numLeavesDiff: Int64, numInternalNodesDiff: Int64, treeHeightDiff: Int8, totalKeyValuePairsDiff: Int64, totalTreeSizeBytesDiff: Int64, avgNodeSizeBytesDiff: Double, minNodeSizeBytesDiff: Int64, maxNodeSizeBytesDiff: Int64, avgEntriesPerNodeDiff: Double, avgFanoutDiff: Double, minFanoutDiff: Int64, maxFanoutDiff: Int64, avgFillFactorDiff: Double, avgLeafFillFactorDiff: Double, avgInternalFillFactorDiff: Double, avgKeySizeBytesDiff: Double, avgValueSizeBytesDiff: Double, minKeySizeBytesDiff: Int64, maxKeySizeBytesDiff: Int64, minValueSizeBytesDiff: Int64, maxValueSizeBytesDiff: Int64, totalKeysSizeBytesDiff: Int64, totalValuesSizeBytesDiff: Int64) { - self.numNodesDiff = numNodesDiff - self.numLeavesDiff = numLeavesDiff - self.numInternalNodesDiff = numInternalNodesDiff - self.treeHeightDiff = treeHeightDiff - self.totalKeyValuePairsDiff = totalKeyValuePairsDiff - self.totalTreeSizeBytesDiff = totalTreeSizeBytesDiff - self.avgNodeSizeBytesDiff = avgNodeSizeBytesDiff - self.minNodeSizeBytesDiff = minNodeSizeBytesDiff - self.maxNodeSizeBytesDiff = maxNodeSizeBytesDiff - self.avgEntriesPerNodeDiff = avgEntriesPerNodeDiff - self.avgFanoutDiff = avgFanoutDiff - self.minFanoutDiff = minFanoutDiff - self.maxFanoutDiff = maxFanoutDiff - self.avgFillFactorDiff = avgFillFactorDiff - self.avgLeafFillFactorDiff = avgLeafFillFactorDiff - self.avgInternalFillFactorDiff = avgInternalFillFactorDiff - self.avgKeySizeBytesDiff = avgKeySizeBytesDiff - self.avgValueSizeBytesDiff = avgValueSizeBytesDiff - self.minKeySizeBytesDiff = minKeySizeBytesDiff - self.maxKeySizeBytesDiff = maxKeySizeBytesDiff - self.minValueSizeBytesDiff = minValueSizeBytesDiff - self.maxValueSizeBytesDiff = maxValueSizeBytesDiff - self.totalKeysSizeBytesDiff = totalKeysSizeBytesDiff - self.totalValuesSizeBytesDiff = totalValuesSizeBytesDiff + public init(maxBatchReadItems: UInt32?, maxBatchWriteItems: UInt32?, maxTransactionOperations: UInt32?, maxNodeBytes: UInt64?) { + self.maxBatchReadItems = maxBatchReadItems + self.maxBatchWriteItems = maxBatchWriteItems + self.maxTransactionOperations = maxTransactionOperations + self.maxNodeBytes = maxNodeBytes } - - + + } #if compiler(>=6) -extension StatsDiffRecord: Sendable {} +extension StoreLimitsRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeStatsDiffRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> StatsDiffRecord { +public struct FfiConverterTypeStoreLimitsRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> StoreLimitsRecord { return - try StatsDiffRecord( - numNodesDiff: FfiConverterInt64.read(from: &buf), - numLeavesDiff: FfiConverterInt64.read(from: &buf), - numInternalNodesDiff: FfiConverterInt64.read(from: &buf), - treeHeightDiff: FfiConverterInt8.read(from: &buf), - totalKeyValuePairsDiff: FfiConverterInt64.read(from: &buf), - totalTreeSizeBytesDiff: FfiConverterInt64.read(from: &buf), - avgNodeSizeBytesDiff: FfiConverterDouble.read(from: &buf), - minNodeSizeBytesDiff: FfiConverterInt64.read(from: &buf), - maxNodeSizeBytesDiff: FfiConverterInt64.read(from: &buf), - avgEntriesPerNodeDiff: FfiConverterDouble.read(from: &buf), - avgFanoutDiff: FfiConverterDouble.read(from: &buf), - minFanoutDiff: FfiConverterInt64.read(from: &buf), - maxFanoutDiff: FfiConverterInt64.read(from: &buf), - avgFillFactorDiff: FfiConverterDouble.read(from: &buf), - avgLeafFillFactorDiff: FfiConverterDouble.read(from: &buf), - avgInternalFillFactorDiff: FfiConverterDouble.read(from: &buf), - avgKeySizeBytesDiff: FfiConverterDouble.read(from: &buf), - avgValueSizeBytesDiff: FfiConverterDouble.read(from: &buf), - minKeySizeBytesDiff: FfiConverterInt64.read(from: &buf), - maxKeySizeBytesDiff: FfiConverterInt64.read(from: &buf), - minValueSizeBytesDiff: FfiConverterInt64.read(from: &buf), - maxValueSizeBytesDiff: FfiConverterInt64.read(from: &buf), - totalKeysSizeBytesDiff: FfiConverterInt64.read(from: &buf), - totalValuesSizeBytesDiff: FfiConverterInt64.read(from: &buf) + try StoreLimitsRecord( + maxBatchReadItems: FfiConverterOptionUInt32.read(from: &buf), + maxBatchWriteItems: FfiConverterOptionUInt32.read(from: &buf), + maxTransactionOperations: FfiConverterOptionUInt32.read(from: &buf), + maxNodeBytes: FfiConverterOptionUInt64.read(from: &buf) ) } - public static func write(_ value: StatsDiffRecord, into buf: inout [UInt8]) { - FfiConverterInt64.write(value.numNodesDiff, into: &buf) - FfiConverterInt64.write(value.numLeavesDiff, into: &buf) - FfiConverterInt64.write(value.numInternalNodesDiff, into: &buf) - FfiConverterInt8.write(value.treeHeightDiff, into: &buf) - FfiConverterInt64.write(value.totalKeyValuePairsDiff, into: &buf) - FfiConverterInt64.write(value.totalTreeSizeBytesDiff, into: &buf) - FfiConverterDouble.write(value.avgNodeSizeBytesDiff, into: &buf) - FfiConverterInt64.write(value.minNodeSizeBytesDiff, into: &buf) - FfiConverterInt64.write(value.maxNodeSizeBytesDiff, into: &buf) - FfiConverterDouble.write(value.avgEntriesPerNodeDiff, into: &buf) - FfiConverterDouble.write(value.avgFanoutDiff, into: &buf) - FfiConverterInt64.write(value.minFanoutDiff, into: &buf) - FfiConverterInt64.write(value.maxFanoutDiff, into: &buf) - FfiConverterDouble.write(value.avgFillFactorDiff, into: &buf) - FfiConverterDouble.write(value.avgLeafFillFactorDiff, into: &buf) - FfiConverterDouble.write(value.avgInternalFillFactorDiff, into: &buf) - FfiConverterDouble.write(value.avgKeySizeBytesDiff, into: &buf) - FfiConverterDouble.write(value.avgValueSizeBytesDiff, into: &buf) - FfiConverterInt64.write(value.minKeySizeBytesDiff, into: &buf) - FfiConverterInt64.write(value.maxKeySizeBytesDiff, into: &buf) - FfiConverterInt64.write(value.minValueSizeBytesDiff, into: &buf) - FfiConverterInt64.write(value.maxValueSizeBytesDiff, into: &buf) - FfiConverterInt64.write(value.totalKeysSizeBytesDiff, into: &buf) - FfiConverterInt64.write(value.totalValuesSizeBytesDiff, into: &buf) + public static func write(_ value: StoreLimitsRecord, into buf: inout [UInt8]) { + FfiConverterOptionUInt32.write(value.maxBatchReadItems, into: &buf) + FfiConverterOptionUInt32.write(value.maxBatchWriteItems, into: &buf) + FfiConverterOptionUInt32.write(value.maxTransactionOperations, into: &buf) + FfiConverterOptionUInt64.write(value.maxNodeBytes, into: &buf) } } @@ -22174,141 +22933,57 @@ public struct FfiConverterTypeStatsDiffRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeStatsDiffRecord_lift(_ buf: RustBuffer) throws -> StatsDiffRecord { - return try FfiConverterTypeStatsDiffRecord.lift(buf) +public func FfiConverterTypeStoreLimitsRecord_lift(_ buf: RustBuffer) throws -> StoreLimitsRecord { + return try FfiConverterTypeStoreLimitsRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeStatsDiffRecord_lower(_ value: StatsDiffRecord) -> RustBuffer { - return FfiConverterTypeStatsDiffRecord.lower(value) +public func FfiConverterTypeStoreLimitsRecord_lower(_ value: StoreLimitsRecord) -> RustBuffer { + return FfiConverterTypeStoreLimitsRecord.lower(value) } -public struct StatsPercentageChangeRecord: Equatable, Hashable { - public var numNodesPct: Double - public var numLeavesPct: Double - public var numInternalNodesPct: Double - public var treeHeightPct: Double - public var totalKeyValuePairsPct: Double - public var totalTreeSizeBytesPct: Double - public var avgNodeSizeBytesPct: Double - public var minNodeSizeBytesPct: Double - public var maxNodeSizeBytesPct: Double - public var avgEntriesPerNodePct: Double - public var avgFanoutPct: Double - public var minFanoutPct: Double - public var maxFanoutPct: Double - public var avgFillFactorPct: Double - public var avgLeafFillFactorPct: Double - public var avgInternalFillFactorPct: Double - public var avgKeySizeBytesPct: Double - public var avgValueSizeBytesPct: Double - public var minKeySizeBytesPct: Double - public var maxKeySizeBytesPct: Double - public var minValueSizeBytesPct: Double - public var maxValueSizeBytesPct: Double - public var totalKeysSizeBytesPct: Double - public var totalValuesSizeBytesPct: Double +public struct StoreTransactionConflictRecord: Equatable, Hashable { + public var name: Data + public var expected: OptionalBytesRecord + public var current: OptionalBytesRecord // Default memberwise initializers are never public by default, so we // declare one manually. - public init(numNodesPct: Double, numLeavesPct: Double, numInternalNodesPct: Double, treeHeightPct: Double, totalKeyValuePairsPct: Double, totalTreeSizeBytesPct: Double, avgNodeSizeBytesPct: Double, minNodeSizeBytesPct: Double, maxNodeSizeBytesPct: Double, avgEntriesPerNodePct: Double, avgFanoutPct: Double, minFanoutPct: Double, maxFanoutPct: Double, avgFillFactorPct: Double, avgLeafFillFactorPct: Double, avgInternalFillFactorPct: Double, avgKeySizeBytesPct: Double, avgValueSizeBytesPct: Double, minKeySizeBytesPct: Double, maxKeySizeBytesPct: Double, minValueSizeBytesPct: Double, maxValueSizeBytesPct: Double, totalKeysSizeBytesPct: Double, totalValuesSizeBytesPct: Double) { - self.numNodesPct = numNodesPct - self.numLeavesPct = numLeavesPct - self.numInternalNodesPct = numInternalNodesPct - self.treeHeightPct = treeHeightPct - self.totalKeyValuePairsPct = totalKeyValuePairsPct - self.totalTreeSizeBytesPct = totalTreeSizeBytesPct - self.avgNodeSizeBytesPct = avgNodeSizeBytesPct - self.minNodeSizeBytesPct = minNodeSizeBytesPct - self.maxNodeSizeBytesPct = maxNodeSizeBytesPct - self.avgEntriesPerNodePct = avgEntriesPerNodePct - self.avgFanoutPct = avgFanoutPct - self.minFanoutPct = minFanoutPct - self.maxFanoutPct = maxFanoutPct - self.avgFillFactorPct = avgFillFactorPct - self.avgLeafFillFactorPct = avgLeafFillFactorPct - self.avgInternalFillFactorPct = avgInternalFillFactorPct - self.avgKeySizeBytesPct = avgKeySizeBytesPct - self.avgValueSizeBytesPct = avgValueSizeBytesPct - self.minKeySizeBytesPct = minKeySizeBytesPct - self.maxKeySizeBytesPct = maxKeySizeBytesPct - self.minValueSizeBytesPct = minValueSizeBytesPct - self.maxValueSizeBytesPct = maxValueSizeBytesPct - self.totalKeysSizeBytesPct = totalKeysSizeBytesPct - self.totalValuesSizeBytesPct = totalValuesSizeBytesPct + public init(name: Data, expected: OptionalBytesRecord, current: OptionalBytesRecord) { + self.name = name + self.expected = expected + self.current = current } - - + + } #if compiler(>=6) -extension StatsPercentageChangeRecord: Sendable {} +extension StoreTransactionConflictRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeStatsPercentageChangeRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> StatsPercentageChangeRecord { +public struct FfiConverterTypeStoreTransactionConflictRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> StoreTransactionConflictRecord { return - try StatsPercentageChangeRecord( - numNodesPct: FfiConverterDouble.read(from: &buf), - numLeavesPct: FfiConverterDouble.read(from: &buf), - numInternalNodesPct: FfiConverterDouble.read(from: &buf), - treeHeightPct: FfiConverterDouble.read(from: &buf), - totalKeyValuePairsPct: FfiConverterDouble.read(from: &buf), - totalTreeSizeBytesPct: FfiConverterDouble.read(from: &buf), - avgNodeSizeBytesPct: FfiConverterDouble.read(from: &buf), - minNodeSizeBytesPct: FfiConverterDouble.read(from: &buf), - maxNodeSizeBytesPct: FfiConverterDouble.read(from: &buf), - avgEntriesPerNodePct: FfiConverterDouble.read(from: &buf), - avgFanoutPct: FfiConverterDouble.read(from: &buf), - minFanoutPct: FfiConverterDouble.read(from: &buf), - maxFanoutPct: FfiConverterDouble.read(from: &buf), - avgFillFactorPct: FfiConverterDouble.read(from: &buf), - avgLeafFillFactorPct: FfiConverterDouble.read(from: &buf), - avgInternalFillFactorPct: FfiConverterDouble.read(from: &buf), - avgKeySizeBytesPct: FfiConverterDouble.read(from: &buf), - avgValueSizeBytesPct: FfiConverterDouble.read(from: &buf), - minKeySizeBytesPct: FfiConverterDouble.read(from: &buf), - maxKeySizeBytesPct: FfiConverterDouble.read(from: &buf), - minValueSizeBytesPct: FfiConverterDouble.read(from: &buf), - maxValueSizeBytesPct: FfiConverterDouble.read(from: &buf), - totalKeysSizeBytesPct: FfiConverterDouble.read(from: &buf), - totalValuesSizeBytesPct: FfiConverterDouble.read(from: &buf) + try StoreTransactionConflictRecord( + name: FfiConverterData.read(from: &buf), + expected: FfiConverterTypeOptionalBytesRecord.read(from: &buf), + current: FfiConverterTypeOptionalBytesRecord.read(from: &buf) ) } - public static func write(_ value: StatsPercentageChangeRecord, into buf: inout [UInt8]) { - FfiConverterDouble.write(value.numNodesPct, into: &buf) - FfiConverterDouble.write(value.numLeavesPct, into: &buf) - FfiConverterDouble.write(value.numInternalNodesPct, into: &buf) - FfiConverterDouble.write(value.treeHeightPct, into: &buf) - FfiConverterDouble.write(value.totalKeyValuePairsPct, into: &buf) - FfiConverterDouble.write(value.totalTreeSizeBytesPct, into: &buf) - FfiConverterDouble.write(value.avgNodeSizeBytesPct, into: &buf) - FfiConverterDouble.write(value.minNodeSizeBytesPct, into: &buf) - FfiConverterDouble.write(value.maxNodeSizeBytesPct, into: &buf) - FfiConverterDouble.write(value.avgEntriesPerNodePct, into: &buf) - FfiConverterDouble.write(value.avgFanoutPct, into: &buf) - FfiConverterDouble.write(value.minFanoutPct, into: &buf) - FfiConverterDouble.write(value.maxFanoutPct, into: &buf) - FfiConverterDouble.write(value.avgFillFactorPct, into: &buf) - FfiConverterDouble.write(value.avgLeafFillFactorPct, into: &buf) - FfiConverterDouble.write(value.avgInternalFillFactorPct, into: &buf) - FfiConverterDouble.write(value.avgKeySizeBytesPct, into: &buf) - FfiConverterDouble.write(value.avgValueSizeBytesPct, into: &buf) - FfiConverterDouble.write(value.minKeySizeBytesPct, into: &buf) - FfiConverterDouble.write(value.maxKeySizeBytesPct, into: &buf) - FfiConverterDouble.write(value.minValueSizeBytesPct, into: &buf) - FfiConverterDouble.write(value.maxValueSizeBytesPct, into: &buf) - FfiConverterDouble.write(value.totalKeysSizeBytesPct, into: &buf) - FfiConverterDouble.write(value.totalValuesSizeBytesPct, into: &buf) + public static func write(_ value: StoreTransactionConflictRecord, into buf: inout [UInt8]) { + FfiConverterData.write(value.name, into: &buf) + FfiConverterTypeOptionalBytesRecord.write(value.expected, into: &buf) + FfiConverterTypeOptionalBytesRecord.write(value.current, into: &buf) } } @@ -22316,81 +22991,61 @@ public struct FfiConverterTypeStatsPercentageChangeRecord: FfiConverterRustBuffe #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeStatsPercentageChangeRecord_lift(_ buf: RustBuffer) throws -> StatsPercentageChangeRecord { - return try FfiConverterTypeStatsPercentageChangeRecord.lift(buf) +public func FfiConverterTypeStoreTransactionConflictRecord_lift(_ buf: RustBuffer) throws -> StoreTransactionConflictRecord { + return try FfiConverterTypeStoreTransactionConflictRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeStatsPercentageChangeRecord_lower(_ value: StatsPercentageChangeRecord) -> RustBuffer { - return FfiConverterTypeStatsPercentageChangeRecord.lower(value) +public func FfiConverterTypeStoreTransactionConflictRecord_lower(_ value: StoreTransactionConflictRecord) -> RustBuffer { + return FfiConverterTypeStoreTransactionConflictRecord.lower(value) } -public struct StoreCapabilitiesRecord: Equatable, Hashable { - public var nativeBatchReads: Bool - public var atomicBatchWrites: Bool - public var nodeScan: Bool - public var hints: Bool - public var atomicNodesAndHint: Bool - public var rootScan: Bool - public var rootCompareAndSwap: Bool - public var transactions: Bool - public var readParallelism: UInt32 +public struct StructuralDiffCursorRecord: Equatable, Hashable { + public var baseRoot: Data? + public var otherRoot: Data? + public var markers: [StructuralDiffMarkerRecord] + public var pending: [DiffRecord] // Default memberwise initializers are never public by default, so we // declare one manually. - public init(nativeBatchReads: Bool, atomicBatchWrites: Bool, nodeScan: Bool, hints: Bool, atomicNodesAndHint: Bool, rootScan: Bool, rootCompareAndSwap: Bool, transactions: Bool, readParallelism: UInt32) { - self.nativeBatchReads = nativeBatchReads - self.atomicBatchWrites = atomicBatchWrites - self.nodeScan = nodeScan - self.hints = hints - self.atomicNodesAndHint = atomicNodesAndHint - self.rootScan = rootScan - self.rootCompareAndSwap = rootCompareAndSwap - self.transactions = transactions - self.readParallelism = readParallelism + public init(baseRoot: Data?, otherRoot: Data?, markers: [StructuralDiffMarkerRecord], pending: [DiffRecord]) { + self.baseRoot = baseRoot + self.otherRoot = otherRoot + self.markers = markers + self.pending = pending } - - + + } #if compiler(>=6) -extension StoreCapabilitiesRecord: Sendable {} +extension StructuralDiffCursorRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeStoreCapabilitiesRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> StoreCapabilitiesRecord { +public struct FfiConverterTypeStructuralDiffCursorRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> StructuralDiffCursorRecord { return - try StoreCapabilitiesRecord( - nativeBatchReads: FfiConverterBool.read(from: &buf), - atomicBatchWrites: FfiConverterBool.read(from: &buf), - nodeScan: FfiConverterBool.read(from: &buf), - hints: FfiConverterBool.read(from: &buf), - atomicNodesAndHint: FfiConverterBool.read(from: &buf), - rootScan: FfiConverterBool.read(from: &buf), - rootCompareAndSwap: FfiConverterBool.read(from: &buf), - transactions: FfiConverterBool.read(from: &buf), - readParallelism: FfiConverterUInt32.read(from: &buf) + try StructuralDiffCursorRecord( + baseRoot: FfiConverterOptionData.read(from: &buf), + otherRoot: FfiConverterOptionData.read(from: &buf), + markers: FfiConverterSequenceTypeStructuralDiffMarkerRecord.read(from: &buf), + pending: FfiConverterSequenceTypeDiffRecord.read(from: &buf) ) } - public static func write(_ value: StoreCapabilitiesRecord, into buf: inout [UInt8]) { - FfiConverterBool.write(value.nativeBatchReads, into: &buf) - FfiConverterBool.write(value.atomicBatchWrites, into: &buf) - FfiConverterBool.write(value.nodeScan, into: &buf) - FfiConverterBool.write(value.hints, into: &buf) - FfiConverterBool.write(value.atomicNodesAndHint, into: &buf) - FfiConverterBool.write(value.rootScan, into: &buf) - FfiConverterBool.write(value.rootCompareAndSwap, into: &buf) - FfiConverterBool.write(value.transactions, into: &buf) - FfiConverterUInt32.write(value.readParallelism, into: &buf) + public static func write(_ value: StructuralDiffCursorRecord, into buf: inout [UInt8]) { + FfiConverterOptionData.write(value.baseRoot, into: &buf) + FfiConverterOptionData.write(value.otherRoot, into: &buf) + FfiConverterSequenceTypeStructuralDiffMarkerRecord.write(value.markers, into: &buf) + FfiConverterSequenceTypeDiffRecord.write(value.pending, into: &buf) } } @@ -22398,69 +23053,65 @@ public struct FfiConverterTypeStoreCapabilitiesRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeStoreCapabilitiesRecord_lift(_ buf: RustBuffer) throws -> StoreCapabilitiesRecord { - return try FfiConverterTypeStoreCapabilitiesRecord.lift(buf) +public func FfiConverterTypeStructuralDiffCursorRecord_lift(_ buf: RustBuffer) throws -> StructuralDiffCursorRecord { + return try FfiConverterTypeStructuralDiffCursorRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeStoreCapabilitiesRecord_lower(_ value: StoreCapabilitiesRecord) -> RustBuffer { - return FfiConverterTypeStoreCapabilitiesRecord.lower(value) +public func FfiConverterTypeStructuralDiffCursorRecord_lower(_ value: StructuralDiffCursorRecord) -> RustBuffer { + return FfiConverterTypeStructuralDiffCursorRecord.lower(value) } -public struct StoreDescriptorRecord: Equatable, Hashable { - public var protocolMajor: UInt32 - public var adapterName: String - public var provider: String - public var schemaVersion: UInt32 - public var capabilities: StoreCapabilitiesRecord - public var limits: StoreLimitsRecord +public struct StructuralDiffMarkerRecord: Equatable, Hashable { + public var kind: StructuralDiffMarkerKind + public var baseCid: Data? + public var otherCid: Data? + public var spanEnd: Data? + public var cid: Data? // Default memberwise initializers are never public by default, so we // declare one manually. - public init(protocolMajor: UInt32, adapterName: String, provider: String, schemaVersion: UInt32, capabilities: StoreCapabilitiesRecord, limits: StoreLimitsRecord) { - self.protocolMajor = protocolMajor - self.adapterName = adapterName - self.provider = provider - self.schemaVersion = schemaVersion - self.capabilities = capabilities - self.limits = limits + public init(kind: StructuralDiffMarkerKind, baseCid: Data?, otherCid: Data?, spanEnd: Data?, cid: Data?) { + self.kind = kind + self.baseCid = baseCid + self.otherCid = otherCid + self.spanEnd = spanEnd + self.cid = cid } - - + + } #if compiler(>=6) -extension StoreDescriptorRecord: Sendable {} +extension StructuralDiffMarkerRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeStoreDescriptorRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> StoreDescriptorRecord { - return - try StoreDescriptorRecord( - protocolMajor: FfiConverterUInt32.read(from: &buf), - adapterName: FfiConverterString.read(from: &buf), - provider: FfiConverterString.read(from: &buf), - schemaVersion: FfiConverterUInt32.read(from: &buf), - capabilities: FfiConverterTypeStoreCapabilitiesRecord.read(from: &buf), - limits: FfiConverterTypeStoreLimitsRecord.read(from: &buf) +public struct FfiConverterTypeStructuralDiffMarkerRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> StructuralDiffMarkerRecord { + return + try StructuralDiffMarkerRecord( + kind: FfiConverterTypeStructuralDiffMarkerKind.read(from: &buf), + baseCid: FfiConverterOptionData.read(from: &buf), + otherCid: FfiConverterOptionData.read(from: &buf), + spanEnd: FfiConverterOptionData.read(from: &buf), + cid: FfiConverterOptionData.read(from: &buf) ) } - public static func write(_ value: StoreDescriptorRecord, into buf: inout [UInt8]) { - FfiConverterUInt32.write(value.protocolMajor, into: &buf) - FfiConverterString.write(value.adapterName, into: &buf) - FfiConverterString.write(value.provider, into: &buf) - FfiConverterUInt32.write(value.schemaVersion, into: &buf) - FfiConverterTypeStoreCapabilitiesRecord.write(value.capabilities, into: &buf) - FfiConverterTypeStoreLimitsRecord.write(value.limits, into: &buf) + public static func write(_ value: StructuralDiffMarkerRecord, into buf: inout [UInt8]) { + FfiConverterTypeStructuralDiffMarkerKind.write(value.kind, into: &buf) + FfiConverterOptionData.write(value.baseCid, into: &buf) + FfiConverterOptionData.write(value.otherCid, into: &buf) + FfiConverterOptionData.write(value.spanEnd, into: &buf) + FfiConverterOptionData.write(value.cid, into: &buf) } } @@ -22468,53 +23119,61 @@ public struct FfiConverterTypeStoreDescriptorRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeStoreDescriptorRecord_lift(_ buf: RustBuffer) throws -> StoreDescriptorRecord { - return try FfiConverterTypeStoreDescriptorRecord.lift(buf) +public func FfiConverterTypeStructuralDiffMarkerRecord_lift(_ buf: RustBuffer) throws -> StructuralDiffMarkerRecord { + return try FfiConverterTypeStructuralDiffMarkerRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeStoreDescriptorRecord_lower(_ value: StoreDescriptorRecord) -> RustBuffer { - return FfiConverterTypeStoreDescriptorRecord.lower(value) +public func FfiConverterTypeStructuralDiffMarkerRecord_lower(_ value: StructuralDiffMarkerRecord) -> RustBuffer { + return FfiConverterTypeStructuralDiffMarkerRecord.lower(value) } -public struct StoreDescriptorResultRecord: Equatable, Hashable { - public var value: StoreDescriptorRecord? - public var error: StoreErrorRecord? +public struct StructuralDiffPageRecord: Equatable, Hashable { + public var diffs: [DiffRecord] + public var nextCursorJson: String? + public var stats: DiffTraversalStatsRecord + public var nextCursor: StructuralDiffCursorRecord? // Default memberwise initializers are never public by default, so we // declare one manually. - public init(value: StoreDescriptorRecord?, error: StoreErrorRecord?) { - self.value = value - self.error = error + public init(diffs: [DiffRecord], nextCursorJson: String?, stats: DiffTraversalStatsRecord, nextCursor: StructuralDiffCursorRecord?) { + self.diffs = diffs + self.nextCursorJson = nextCursorJson + self.stats = stats + self.nextCursor = nextCursor } - - + + } #if compiler(>=6) -extension StoreDescriptorResultRecord: Sendable {} +extension StructuralDiffPageRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeStoreDescriptorResultRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> StoreDescriptorResultRecord { +public struct FfiConverterTypeStructuralDiffPageRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> StructuralDiffPageRecord { return - try StoreDescriptorResultRecord( - value: FfiConverterOptionTypeStoreDescriptorRecord.read(from: &buf), - error: FfiConverterOptionTypeStoreErrorRecord.read(from: &buf) + try StructuralDiffPageRecord( + diffs: FfiConverterSequenceTypeDiffRecord.read(from: &buf), + nextCursorJson: FfiConverterOptionString.read(from: &buf), + stats: FfiConverterTypeDiffTraversalStatsRecord.read(from: &buf), + nextCursor: FfiConverterOptionTypeStructuralDiffCursorRecord.read(from: &buf) ) } - public static func write(_ value: StoreDescriptorResultRecord, into buf: inout [UInt8]) { - FfiConverterOptionTypeStoreDescriptorRecord.write(value.value, into: &buf) - FfiConverterOptionTypeStoreErrorRecord.write(value.error, into: &buf) + public static func write(_ value: StructuralDiffPageRecord, into buf: inout [UInt8]) { + FfiConverterSequenceTypeDiffRecord.write(value.diffs, into: &buf) + FfiConverterOptionString.write(value.nextCursorJson, into: &buf) + FfiConverterTypeDiffTraversalStatsRecord.write(value.stats, into: &buf) + FfiConverterOptionTypeStructuralDiffCursorRecord.write(value.nextCursor, into: &buf) } } @@ -22522,61 +23181,53 @@ public struct FfiConverterTypeStoreDescriptorResultRecord: FfiConverterRustBuffe #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeStoreDescriptorResultRecord_lift(_ buf: RustBuffer) throws -> StoreDescriptorResultRecord { - return try FfiConverterTypeStoreDescriptorResultRecord.lift(buf) +public func FfiConverterTypeStructuralDiffPageRecord_lift(_ buf: RustBuffer) throws -> StructuralDiffPageRecord { + return try FfiConverterTypeStructuralDiffPageRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeStoreDescriptorResultRecord_lower(_ value: StoreDescriptorResultRecord) -> RustBuffer { - return FfiConverterTypeStoreDescriptorResultRecord.lower(value) +public func FfiConverterTypeStructuralDiffPageRecord_lower(_ value: StructuralDiffPageRecord) -> RustBuffer { + return FfiConverterTypeStructuralDiffPageRecord.lower(value) } -public struct StoreErrorRecord: Equatable, Hashable { - public var code: String - public var message: String - public var retryable: Bool - public var providerCode: String? +public struct TimestampedValueRecord: Equatable, Hashable { + public var value: Data + public var timestamp: UInt64 // Default memberwise initializers are never public by default, so we // declare one manually. - public init(code: String, message: String, retryable: Bool, providerCode: String?) { - self.code = code - self.message = message - self.retryable = retryable - self.providerCode = providerCode + public init(value: Data, timestamp: UInt64) { + self.value = value + self.timestamp = timestamp } - - + + } #if compiler(>=6) -extension StoreErrorRecord: Sendable {} +extension TimestampedValueRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeStoreErrorRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> StoreErrorRecord { +public struct FfiConverterTypeTimestampedValueRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> TimestampedValueRecord { return - try StoreErrorRecord( - code: FfiConverterString.read(from: &buf), - message: FfiConverterString.read(from: &buf), - retryable: FfiConverterBool.read(from: &buf), - providerCode: FfiConverterOptionString.read(from: &buf) + try TimestampedValueRecord( + value: FfiConverterData.read(from: &buf), + timestamp: FfiConverterUInt64.read(from: &buf) ) } - public static func write(_ value: StoreErrorRecord, into buf: inout [UInt8]) { - FfiConverterString.write(value.code, into: &buf) - FfiConverterString.write(value.message, into: &buf) - FfiConverterBool.write(value.retryable, into: &buf) - FfiConverterOptionString.write(value.providerCode, into: &buf) + public static func write(_ value: TimestampedValueRecord, into buf: inout [UInt8]) { + FfiConverterData.write(value.value, into: &buf) + FfiConverterUInt64.write(value.timestamp, into: &buf) } } @@ -22584,61 +23235,53 @@ public struct FfiConverterTypeStoreErrorRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeStoreErrorRecord_lift(_ buf: RustBuffer) throws -> StoreErrorRecord { - return try FfiConverterTypeStoreErrorRecord.lift(buf) +public func FfiConverterTypeTimestampedValueRecord_lift(_ buf: RustBuffer) throws -> TimestampedValueRecord { + return try FfiConverterTypeTimestampedValueRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeStoreErrorRecord_lower(_ value: StoreErrorRecord) -> RustBuffer { - return FfiConverterTypeStoreErrorRecord.lower(value) +public func FfiConverterTypeTimestampedValueRecord_lower(_ value: TimestampedValueRecord) -> RustBuffer { + return FfiConverterTypeTimestampedValueRecord.lower(value) } -public struct StoreLimitsRecord: Equatable, Hashable { - public var maxBatchReadItems: UInt32? - public var maxBatchWriteItems: UInt32? - public var maxTransactionOperations: UInt32? - public var maxNodeBytes: UInt64? +public struct TombstoneMetadataRecord: Equatable, Hashable { + public var key: String + public var value: Data // Default memberwise initializers are never public by default, so we // declare one manually. - public init(maxBatchReadItems: UInt32?, maxBatchWriteItems: UInt32?, maxTransactionOperations: UInt32?, maxNodeBytes: UInt64?) { - self.maxBatchReadItems = maxBatchReadItems - self.maxBatchWriteItems = maxBatchWriteItems - self.maxTransactionOperations = maxTransactionOperations - self.maxNodeBytes = maxNodeBytes + public init(key: String, value: Data) { + self.key = key + self.value = value } - - + + } #if compiler(>=6) -extension StoreLimitsRecord: Sendable {} +extension TombstoneMetadataRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeStoreLimitsRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> StoreLimitsRecord { +public struct FfiConverterTypeTombstoneMetadataRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> TombstoneMetadataRecord { return - try StoreLimitsRecord( - maxBatchReadItems: FfiConverterOptionUInt32.read(from: &buf), - maxBatchWriteItems: FfiConverterOptionUInt32.read(from: &buf), - maxTransactionOperations: FfiConverterOptionUInt32.read(from: &buf), - maxNodeBytes: FfiConverterOptionUInt64.read(from: &buf) + try TombstoneMetadataRecord( + key: FfiConverterString.read(from: &buf), + value: FfiConverterData.read(from: &buf) ) } - public static func write(_ value: StoreLimitsRecord, into buf: inout [UInt8]) { - FfiConverterOptionUInt32.write(value.maxBatchReadItems, into: &buf) - FfiConverterOptionUInt32.write(value.maxBatchWriteItems, into: &buf) - FfiConverterOptionUInt32.write(value.maxTransactionOperations, into: &buf) - FfiConverterOptionUInt64.write(value.maxNodeBytes, into: &buf) + public static func write(_ value: TombstoneMetadataRecord, into buf: inout [UInt8]) { + FfiConverterString.write(value.key, into: &buf) + FfiConverterData.write(value.value, into: &buf) } } @@ -22646,57 +23289,57 @@ public struct FfiConverterTypeStoreLimitsRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeStoreLimitsRecord_lift(_ buf: RustBuffer) throws -> StoreLimitsRecord { - return try FfiConverterTypeStoreLimitsRecord.lift(buf) +public func FfiConverterTypeTombstoneMetadataRecord_lift(_ buf: RustBuffer) throws -> TombstoneMetadataRecord { + return try FfiConverterTypeTombstoneMetadataRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeStoreLimitsRecord_lower(_ value: StoreLimitsRecord) -> RustBuffer { - return FfiConverterTypeStoreLimitsRecord.lower(value) +public func FfiConverterTypeTombstoneMetadataRecord_lower(_ value: TombstoneMetadataRecord) -> RustBuffer { + return FfiConverterTypeTombstoneMetadataRecord.lower(value) } -public struct StoreTransactionConflictRecord: Equatable, Hashable { - public var name: Data - public var expected: OptionalBytesRecord - public var current: OptionalBytesRecord +public struct TombstoneRecord: Equatable, Hashable { + public var actor: Data + public var timestampMillis: UInt64 + public var causalMetadata: [TombstoneMetadataRecord] // Default memberwise initializers are never public by default, so we // declare one manually. - public init(name: Data, expected: OptionalBytesRecord, current: OptionalBytesRecord) { - self.name = name - self.expected = expected - self.current = current + public init(actor: Data, timestampMillis: UInt64, causalMetadata: [TombstoneMetadataRecord]) { + self.actor = actor + self.timestampMillis = timestampMillis + self.causalMetadata = causalMetadata } - - + + } #if compiler(>=6) -extension StoreTransactionConflictRecord: Sendable {} +extension TombstoneRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeStoreTransactionConflictRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> StoreTransactionConflictRecord { +public struct FfiConverterTypeTombstoneRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> TombstoneRecord { return - try StoreTransactionConflictRecord( - name: FfiConverterData.read(from: &buf), - expected: FfiConverterTypeOptionalBytesRecord.read(from: &buf), - current: FfiConverterTypeOptionalBytesRecord.read(from: &buf) + try TombstoneRecord( + actor: FfiConverterData.read(from: &buf), + timestampMillis: FfiConverterUInt64.read(from: &buf), + causalMetadata: FfiConverterSequenceTypeTombstoneMetadataRecord.read(from: &buf) ) } - public static func write(_ value: StoreTransactionConflictRecord, into buf: inout [UInt8]) { - FfiConverterData.write(value.name, into: &buf) - FfiConverterTypeOptionalBytesRecord.write(value.expected, into: &buf) - FfiConverterTypeOptionalBytesRecord.write(value.current, into: &buf) + public static func write(_ value: TombstoneRecord, into buf: inout [UInt8]) { + FfiConverterData.write(value.actor, into: &buf) + FfiConverterUInt64.write(value.timestampMillis, into: &buf) + FfiConverterSequenceTypeTombstoneMetadataRecord.write(value.causalMetadata, into: &buf) } } @@ -22704,61 +23347,57 @@ public struct FfiConverterTypeStoreTransactionConflictRecord: FfiConverterRustBu #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeStoreTransactionConflictRecord_lift(_ buf: RustBuffer) throws -> StoreTransactionConflictRecord { - return try FfiConverterTypeStoreTransactionConflictRecord.lift(buf) +public func FfiConverterTypeTombstoneRecord_lift(_ buf: RustBuffer) throws -> TombstoneRecord { + return try FfiConverterTypeTombstoneRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeStoreTransactionConflictRecord_lower(_ value: StoreTransactionConflictRecord) -> RustBuffer { - return FfiConverterTypeStoreTransactionConflictRecord.lower(value) +public func FfiConverterTypeTombstoneRecord_lower(_ value: TombstoneRecord) -> RustBuffer { + return FfiConverterTypeTombstoneRecord.lower(value) } -public struct StructuralDiffCursorRecord: Equatable, Hashable { - public var baseRoot: Data? - public var otherRoot: Data? - public var markers: [StructuralDiffMarkerRecord] - public var pending: [DiffRecord] +public struct TransactionConflictRecord: Equatable, Hashable { + public var name: Data + public var expected: RootManifestRecord? + public var current: RootManifestRecord? // Default memberwise initializers are never public by default, so we // declare one manually. - public init(baseRoot: Data?, otherRoot: Data?, markers: [StructuralDiffMarkerRecord], pending: [DiffRecord]) { - self.baseRoot = baseRoot - self.otherRoot = otherRoot - self.markers = markers - self.pending = pending + public init(name: Data, expected: RootManifestRecord?, current: RootManifestRecord?) { + self.name = name + self.expected = expected + self.current = current } - - + + } #if compiler(>=6) -extension StructuralDiffCursorRecord: Sendable {} +extension TransactionConflictRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeStructuralDiffCursorRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> StructuralDiffCursorRecord { +public struct FfiConverterTypeTransactionConflictRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> TransactionConflictRecord { return - try StructuralDiffCursorRecord( - baseRoot: FfiConverterOptionData.read(from: &buf), - otherRoot: FfiConverterOptionData.read(from: &buf), - markers: FfiConverterSequenceTypeStructuralDiffMarkerRecord.read(from: &buf), - pending: FfiConverterSequenceTypeDiffRecord.read(from: &buf) + try TransactionConflictRecord( + name: FfiConverterData.read(from: &buf), + expected: FfiConverterOptionTypeRootManifestRecord.read(from: &buf), + current: FfiConverterOptionTypeRootManifestRecord.read(from: &buf) ) } - public static func write(_ value: StructuralDiffCursorRecord, into buf: inout [UInt8]) { - FfiConverterOptionData.write(value.baseRoot, into: &buf) - FfiConverterOptionData.write(value.otherRoot, into: &buf) - FfiConverterSequenceTypeStructuralDiffMarkerRecord.write(value.markers, into: &buf) - FfiConverterSequenceTypeDiffRecord.write(value.pending, into: &buf) + public static func write(_ value: TransactionConflictRecord, into buf: inout [UInt8]) { + FfiConverterData.write(value.name, into: &buf) + FfiConverterOptionTypeRootManifestRecord.write(value.expected, into: &buf) + FfiConverterOptionTypeRootManifestRecord.write(value.current, into: &buf) } } @@ -22766,65 +23405,57 @@ public struct FfiConverterTypeStructuralDiffCursorRecord: FfiConverterRustBuffer #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeStructuralDiffCursorRecord_lift(_ buf: RustBuffer) throws -> StructuralDiffCursorRecord { - return try FfiConverterTypeStructuralDiffCursorRecord.lift(buf) +public func FfiConverterTypeTransactionConflictRecord_lift(_ buf: RustBuffer) throws -> TransactionConflictRecord { + return try FfiConverterTypeTransactionConflictRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeStructuralDiffCursorRecord_lower(_ value: StructuralDiffCursorRecord) -> RustBuffer { - return FfiConverterTypeStructuralDiffCursorRecord.lower(value) +public func FfiConverterTypeTransactionConflictRecord_lower(_ value: TransactionConflictRecord) -> RustBuffer { + return FfiConverterTypeTransactionConflictRecord.lower(value) } -public struct StructuralDiffMarkerRecord: Equatable, Hashable { - public var kind: StructuralDiffMarkerKind - public var baseCid: Data? - public var otherCid: Data? - public var spanEnd: Data? - public var cid: Data? +public struct TransactionResultRecord: Equatable, Hashable { + public var applied: Bool + public var conflict: StoreTransactionConflictRecord? + public var error: StoreErrorRecord? // Default memberwise initializers are never public by default, so we // declare one manually. - public init(kind: StructuralDiffMarkerKind, baseCid: Data?, otherCid: Data?, spanEnd: Data?, cid: Data?) { - self.kind = kind - self.baseCid = baseCid - self.otherCid = otherCid - self.spanEnd = spanEnd - self.cid = cid + public init(applied: Bool, conflict: StoreTransactionConflictRecord?, error: StoreErrorRecord?) { + self.applied = applied + self.conflict = conflict + self.error = error } - - + + } #if compiler(>=6) -extension StructuralDiffMarkerRecord: Sendable {} +extension TransactionResultRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeStructuralDiffMarkerRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> StructuralDiffMarkerRecord { +public struct FfiConverterTypeTransactionResultRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> TransactionResultRecord { return - try StructuralDiffMarkerRecord( - kind: FfiConverterTypeStructuralDiffMarkerKind.read(from: &buf), - baseCid: FfiConverterOptionData.read(from: &buf), - otherCid: FfiConverterOptionData.read(from: &buf), - spanEnd: FfiConverterOptionData.read(from: &buf), - cid: FfiConverterOptionData.read(from: &buf) + try TransactionResultRecord( + applied: FfiConverterBool.read(from: &buf), + conflict: FfiConverterOptionTypeStoreTransactionConflictRecord.read(from: &buf), + error: FfiConverterOptionTypeStoreErrorRecord.read(from: &buf) ) } - public static func write(_ value: StructuralDiffMarkerRecord, into buf: inout [UInt8]) { - FfiConverterTypeStructuralDiffMarkerKind.write(value.kind, into: &buf) - FfiConverterOptionData.write(value.baseCid, into: &buf) - FfiConverterOptionData.write(value.otherCid, into: &buf) - FfiConverterOptionData.write(value.spanEnd, into: &buf) - FfiConverterOptionData.write(value.cid, into: &buf) + public static func write(_ value: TransactionResultRecord, into buf: inout [UInt8]) { + FfiConverterBool.write(value.applied, into: &buf) + FfiConverterOptionTypeStoreTransactionConflictRecord.write(value.conflict, into: &buf) + FfiConverterOptionTypeStoreErrorRecord.write(value.error, into: &buf) } } @@ -22832,61 +23463,65 @@ public struct FfiConverterTypeStructuralDiffMarkerRecord: FfiConverterRustBuffer #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeStructuralDiffMarkerRecord_lift(_ buf: RustBuffer) throws -> StructuralDiffMarkerRecord { - return try FfiConverterTypeStructuralDiffMarkerRecord.lift(buf) +public func FfiConverterTypeTransactionResultRecord_lift(_ buf: RustBuffer) throws -> TransactionResultRecord { + return try FfiConverterTypeTransactionResultRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeStructuralDiffMarkerRecord_lower(_ value: StructuralDiffMarkerRecord) -> RustBuffer { - return FfiConverterTypeStructuralDiffMarkerRecord.lower(value) +public func FfiConverterTypeTransactionResultRecord_lower(_ value: TransactionResultRecord) -> RustBuffer { + return FfiConverterTypeTransactionResultRecord.lower(value) } -public struct StructuralDiffPageRecord: Equatable, Hashable { - public var diffs: [DiffRecord] - public var nextCursorJson: String? - public var stats: DiffTraversalStatsRecord - public var nextCursor: StructuralDiffCursorRecord? +public struct TransactionUpdateRecord: Equatable, Hashable { + public var applied: Bool + public var conflict: Bool + public var nodesWritten: UInt64 + public var rootsWritten: UInt64 + public var conflictDetail: TransactionConflictRecord? // Default memberwise initializers are never public by default, so we // declare one manually. - public init(diffs: [DiffRecord], nextCursorJson: String?, stats: DiffTraversalStatsRecord, nextCursor: StructuralDiffCursorRecord?) { - self.diffs = diffs - self.nextCursorJson = nextCursorJson - self.stats = stats - self.nextCursor = nextCursor + public init(applied: Bool, conflict: Bool, nodesWritten: UInt64, rootsWritten: UInt64, conflictDetail: TransactionConflictRecord?) { + self.applied = applied + self.conflict = conflict + self.nodesWritten = nodesWritten + self.rootsWritten = rootsWritten + self.conflictDetail = conflictDetail } - - + + } #if compiler(>=6) -extension StructuralDiffPageRecord: Sendable {} +extension TransactionUpdateRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeStructuralDiffPageRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> StructuralDiffPageRecord { +public struct FfiConverterTypeTransactionUpdateRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> TransactionUpdateRecord { return - try StructuralDiffPageRecord( - diffs: FfiConverterSequenceTypeDiffRecord.read(from: &buf), - nextCursorJson: FfiConverterOptionString.read(from: &buf), - stats: FfiConverterTypeDiffTraversalStatsRecord.read(from: &buf), - nextCursor: FfiConverterOptionTypeStructuralDiffCursorRecord.read(from: &buf) + try TransactionUpdateRecord( + applied: FfiConverterBool.read(from: &buf), + conflict: FfiConverterBool.read(from: &buf), + nodesWritten: FfiConverterUInt64.read(from: &buf), + rootsWritten: FfiConverterUInt64.read(from: &buf), + conflictDetail: FfiConverterOptionTypeTransactionConflictRecord.read(from: &buf) ) } - public static func write(_ value: StructuralDiffPageRecord, into buf: inout [UInt8]) { - FfiConverterSequenceTypeDiffRecord.write(value.diffs, into: &buf) - FfiConverterOptionString.write(value.nextCursorJson, into: &buf) - FfiConverterTypeDiffTraversalStatsRecord.write(value.stats, into: &buf) - FfiConverterOptionTypeStructuralDiffCursorRecord.write(value.nextCursor, into: &buf) + public static func write(_ value: TransactionUpdateRecord, into buf: inout [UInt8]) { + FfiConverterBool.write(value.applied, into: &buf) + FfiConverterBool.write(value.conflict, into: &buf) + FfiConverterUInt64.write(value.nodesWritten, into: &buf) + FfiConverterUInt64.write(value.rootsWritten, into: &buf) + FfiConverterOptionTypeTransactionConflictRecord.write(value.conflictDetail, into: &buf) } } @@ -22894,53 +23529,53 @@ public struct FfiConverterTypeStructuralDiffPageRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeStructuralDiffPageRecord_lift(_ buf: RustBuffer) throws -> StructuralDiffPageRecord { - return try FfiConverterTypeStructuralDiffPageRecord.lift(buf) +public func FfiConverterTypeTransactionUpdateRecord_lift(_ buf: RustBuffer) throws -> TransactionUpdateRecord { + return try FfiConverterTypeTransactionUpdateRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeStructuralDiffPageRecord_lower(_ value: StructuralDiffPageRecord) -> RustBuffer { - return FfiConverterTypeStructuralDiffPageRecord.lower(value) +public func FfiConverterTypeTransactionUpdateRecord_lower(_ value: TransactionUpdateRecord) -> RustBuffer { + return FfiConverterTypeTransactionUpdateRecord.lower(value) } -public struct TimestampedValueRecord: Equatable, Hashable { - public var value: Data - public var timestamp: UInt64 +public struct TreeDebugComparedNodeRecord: Equatable, Hashable { + public var status: TreeDebugNodeStatusKind + public var node: TreeDebugNodeRecord // Default memberwise initializers are never public by default, so we // declare one manually. - public init(value: Data, timestamp: UInt64) { - self.value = value - self.timestamp = timestamp + public init(status: TreeDebugNodeStatusKind, node: TreeDebugNodeRecord) { + self.status = status + self.node = node } - - + + } #if compiler(>=6) -extension TimestampedValueRecord: Sendable {} +extension TreeDebugComparedNodeRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeTimestampedValueRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> TimestampedValueRecord { +public struct FfiConverterTypeTreeDebugComparedNodeRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> TreeDebugComparedNodeRecord { return - try TimestampedValueRecord( - value: FfiConverterData.read(from: &buf), - timestamp: FfiConverterUInt64.read(from: &buf) + try TreeDebugComparedNodeRecord( + status: FfiConverterTypeTreeDebugNodeStatusKind.read(from: &buf), + node: FfiConverterTypeTreeDebugNodeRecord.read(from: &buf) ) } - public static func write(_ value: TimestampedValueRecord, into buf: inout [UInt8]) { - FfiConverterData.write(value.value, into: &buf) - FfiConverterUInt64.write(value.timestamp, into: &buf) + public static func write(_ value: TreeDebugComparedNodeRecord, into buf: inout [UInt8]) { + FfiConverterTypeTreeDebugNodeStatusKind.write(value.status, into: &buf) + FfiConverterTypeTreeDebugNodeRecord.write(value.node, into: &buf) } } @@ -22948,53 +23583,77 @@ public struct FfiConverterTypeTimestampedValueRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeTimestampedValueRecord_lift(_ buf: RustBuffer) throws -> TimestampedValueRecord { - return try FfiConverterTypeTimestampedValueRecord.lift(buf) +public func FfiConverterTypeTreeDebugComparedNodeRecord_lift(_ buf: RustBuffer) throws -> TreeDebugComparedNodeRecord { + return try FfiConverterTypeTreeDebugComparedNodeRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeTimestampedValueRecord_lower(_ value: TimestampedValueRecord) -> RustBuffer { - return FfiConverterTypeTimestampedValueRecord.lower(value) +public func FfiConverterTypeTreeDebugComparedNodeRecord_lower(_ value: TreeDebugComparedNodeRecord) -> RustBuffer { + return FfiConverterTypeTreeDebugComparedNodeRecord.lower(value) } -public struct TombstoneMetadataRecord: Equatable, Hashable { - public var key: String - public var value: Data +public struct TreeDebugComparisonLevelRecord: Equatable, Hashable { + public var level: UInt8 + public var sharedNodes: UInt64 + public var leftOnlyNodes: UInt64 + public var rightOnlyNodes: UInt64 + public var sharedBytes: UInt64 + public var leftOnlyBytes: UInt64 + public var rightOnlyBytes: UInt64 + public var nodes: [TreeDebugComparedNodeRecord] // Default memberwise initializers are never public by default, so we // declare one manually. - public init(key: String, value: Data) { - self.key = key - self.value = value + public init(level: UInt8, sharedNodes: UInt64, leftOnlyNodes: UInt64, rightOnlyNodes: UInt64, sharedBytes: UInt64, leftOnlyBytes: UInt64, rightOnlyBytes: UInt64, nodes: [TreeDebugComparedNodeRecord]) { + self.level = level + self.sharedNodes = sharedNodes + self.leftOnlyNodes = leftOnlyNodes + self.rightOnlyNodes = rightOnlyNodes + self.sharedBytes = sharedBytes + self.leftOnlyBytes = leftOnlyBytes + self.rightOnlyBytes = rightOnlyBytes + self.nodes = nodes } - - + + } #if compiler(>=6) -extension TombstoneMetadataRecord: Sendable {} +extension TreeDebugComparisonLevelRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeTombstoneMetadataRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> TombstoneMetadataRecord { +public struct FfiConverterTypeTreeDebugComparisonLevelRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> TreeDebugComparisonLevelRecord { return - try TombstoneMetadataRecord( - key: FfiConverterString.read(from: &buf), - value: FfiConverterData.read(from: &buf) + try TreeDebugComparisonLevelRecord( + level: FfiConverterUInt8.read(from: &buf), + sharedNodes: FfiConverterUInt64.read(from: &buf), + leftOnlyNodes: FfiConverterUInt64.read(from: &buf), + rightOnlyNodes: FfiConverterUInt64.read(from: &buf), + sharedBytes: FfiConverterUInt64.read(from: &buf), + leftOnlyBytes: FfiConverterUInt64.read(from: &buf), + rightOnlyBytes: FfiConverterUInt64.read(from: &buf), + nodes: FfiConverterSequenceTypeTreeDebugComparedNodeRecord.read(from: &buf) ) } - public static func write(_ value: TombstoneMetadataRecord, into buf: inout [UInt8]) { - FfiConverterString.write(value.key, into: &buf) - FfiConverterData.write(value.value, into: &buf) + public static func write(_ value: TreeDebugComparisonLevelRecord, into buf: inout [UInt8]) { + FfiConverterUInt8.write(value.level, into: &buf) + FfiConverterUInt64.write(value.sharedNodes, into: &buf) + FfiConverterUInt64.write(value.leftOnlyNodes, into: &buf) + FfiConverterUInt64.write(value.rightOnlyNodes, into: &buf) + FfiConverterUInt64.write(value.sharedBytes, into: &buf) + FfiConverterUInt64.write(value.leftOnlyBytes, into: &buf) + FfiConverterUInt64.write(value.rightOnlyBytes, into: &buf) + FfiConverterSequenceTypeTreeDebugComparedNodeRecord.write(value.nodes, into: &buf) } } @@ -23002,57 +23661,73 @@ public struct FfiConverterTypeTombstoneMetadataRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeTombstoneMetadataRecord_lift(_ buf: RustBuffer) throws -> TombstoneMetadataRecord { - return try FfiConverterTypeTombstoneMetadataRecord.lift(buf) +public func FfiConverterTypeTreeDebugComparisonLevelRecord_lift(_ buf: RustBuffer) throws -> TreeDebugComparisonLevelRecord { + return try FfiConverterTypeTreeDebugComparisonLevelRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeTombstoneMetadataRecord_lower(_ value: TombstoneMetadataRecord) -> RustBuffer { - return FfiConverterTypeTombstoneMetadataRecord.lower(value) +public func FfiConverterTypeTreeDebugComparisonLevelRecord_lower(_ value: TreeDebugComparisonLevelRecord) -> RustBuffer { + return FfiConverterTypeTreeDebugComparisonLevelRecord.lower(value) } -public struct TombstoneRecord: Equatable, Hashable { - public var actor: Data - public var timestampMillis: UInt64 - public var causalMetadata: [TombstoneMetadataRecord] +public struct TreeDebugComparisonRecord: Equatable, Hashable { + public var sharedNodes: UInt64 + public var leftOnlyNodes: UInt64 + public var rightOnlyNodes: UInt64 + public var sharedBytes: UInt64 + public var leftOnlyBytes: UInt64 + public var rightOnlyBytes: UInt64 + public var levels: [TreeDebugComparisonLevelRecord] // Default memberwise initializers are never public by default, so we // declare one manually. - public init(actor: Data, timestampMillis: UInt64, causalMetadata: [TombstoneMetadataRecord]) { - self.actor = actor - self.timestampMillis = timestampMillis - self.causalMetadata = causalMetadata + public init(sharedNodes: UInt64, leftOnlyNodes: UInt64, rightOnlyNodes: UInt64, sharedBytes: UInt64, leftOnlyBytes: UInt64, rightOnlyBytes: UInt64, levels: [TreeDebugComparisonLevelRecord]) { + self.sharedNodes = sharedNodes + self.leftOnlyNodes = leftOnlyNodes + self.rightOnlyNodes = rightOnlyNodes + self.sharedBytes = sharedBytes + self.leftOnlyBytes = leftOnlyBytes + self.rightOnlyBytes = rightOnlyBytes + self.levels = levels } - - + + } #if compiler(>=6) -extension TombstoneRecord: Sendable {} +extension TreeDebugComparisonRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeTombstoneRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> TombstoneRecord { +public struct FfiConverterTypeTreeDebugComparisonRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> TreeDebugComparisonRecord { return - try TombstoneRecord( - actor: FfiConverterData.read(from: &buf), - timestampMillis: FfiConverterUInt64.read(from: &buf), - causalMetadata: FfiConverterSequenceTypeTombstoneMetadataRecord.read(from: &buf) + try TreeDebugComparisonRecord( + sharedNodes: FfiConverterUInt64.read(from: &buf), + leftOnlyNodes: FfiConverterUInt64.read(from: &buf), + rightOnlyNodes: FfiConverterUInt64.read(from: &buf), + sharedBytes: FfiConverterUInt64.read(from: &buf), + leftOnlyBytes: FfiConverterUInt64.read(from: &buf), + rightOnlyBytes: FfiConverterUInt64.read(from: &buf), + levels: FfiConverterSequenceTypeTreeDebugComparisonLevelRecord.read(from: &buf) ) } - public static func write(_ value: TombstoneRecord, into buf: inout [UInt8]) { - FfiConverterData.write(value.actor, into: &buf) - FfiConverterUInt64.write(value.timestampMillis, into: &buf) - FfiConverterSequenceTypeTombstoneMetadataRecord.write(value.causalMetadata, into: &buf) + public static func write(_ value: TreeDebugComparisonRecord, into buf: inout [UInt8]) { + FfiConverterUInt64.write(value.sharedNodes, into: &buf) + FfiConverterUInt64.write(value.leftOnlyNodes, into: &buf) + FfiConverterUInt64.write(value.rightOnlyNodes, into: &buf) + FfiConverterUInt64.write(value.sharedBytes, into: &buf) + FfiConverterUInt64.write(value.leftOnlyBytes, into: &buf) + FfiConverterUInt64.write(value.rightOnlyBytes, into: &buf) + FfiConverterSequenceTypeTreeDebugComparisonLevelRecord.write(value.levels, into: &buf) } } @@ -23060,57 +23735,53 @@ public struct FfiConverterTypeTombstoneRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeTombstoneRecord_lift(_ buf: RustBuffer) throws -> TombstoneRecord { - return try FfiConverterTypeTombstoneRecord.lift(buf) +public func FfiConverterTypeTreeDebugComparisonRecord_lift(_ buf: RustBuffer) throws -> TreeDebugComparisonRecord { + return try FfiConverterTypeTreeDebugComparisonRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeTombstoneRecord_lower(_ value: TombstoneRecord) -> RustBuffer { - return FfiConverterTypeTombstoneRecord.lower(value) +public func FfiConverterTypeTreeDebugComparisonRecord_lower(_ value: TreeDebugComparisonRecord) -> RustBuffer { + return FfiConverterTypeTreeDebugComparisonRecord.lower(value) } -public struct TransactionConflictRecord: Equatable, Hashable { - public var name: Data - public var expected: RootManifestRecord? - public var current: RootManifestRecord? +public struct TreeDebugLevelRecord: Equatable, Hashable { + public var level: UInt8 + public var nodes: [TreeDebugNodeRecord] // Default memberwise initializers are never public by default, so we // declare one manually. - public init(name: Data, expected: RootManifestRecord?, current: RootManifestRecord?) { - self.name = name - self.expected = expected - self.current = current + public init(level: UInt8, nodes: [TreeDebugNodeRecord]) { + self.level = level + self.nodes = nodes } - - + + } #if compiler(>=6) -extension TransactionConflictRecord: Sendable {} +extension TreeDebugLevelRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeTransactionConflictRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> TransactionConflictRecord { +public struct FfiConverterTypeTreeDebugLevelRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> TreeDebugLevelRecord { return - try TransactionConflictRecord( - name: FfiConverterData.read(from: &buf), - expected: FfiConverterOptionTypeRootManifestRecord.read(from: &buf), - current: FfiConverterOptionTypeRootManifestRecord.read(from: &buf) + try TreeDebugLevelRecord( + level: FfiConverterUInt8.read(from: &buf), + nodes: FfiConverterSequenceTypeTreeDebugNodeRecord.read(from: &buf) ) } - public static func write(_ value: TransactionConflictRecord, into buf: inout [UInt8]) { - FfiConverterData.write(value.name, into: &buf) - FfiConverterOptionTypeRootManifestRecord.write(value.expected, into: &buf) - FfiConverterOptionTypeRootManifestRecord.write(value.current, into: &buf) + public static func write(_ value: TreeDebugLevelRecord, into buf: inout [UInt8]) { + FfiConverterUInt8.write(value.level, into: &buf) + FfiConverterSequenceTypeTreeDebugNodeRecord.write(value.nodes, into: &buf) } } @@ -23118,57 +23789,81 @@ public struct FfiConverterTypeTransactionConflictRecord: FfiConverterRustBuffer #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeTransactionConflictRecord_lift(_ buf: RustBuffer) throws -> TransactionConflictRecord { - return try FfiConverterTypeTransactionConflictRecord.lift(buf) +public func FfiConverterTypeTreeDebugLevelRecord_lift(_ buf: RustBuffer) throws -> TreeDebugLevelRecord { + return try FfiConverterTypeTreeDebugLevelRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeTransactionConflictRecord_lower(_ value: TransactionConflictRecord) -> RustBuffer { - return FfiConverterTypeTransactionConflictRecord.lower(value) +public func FfiConverterTypeTreeDebugLevelRecord_lower(_ value: TreeDebugLevelRecord) -> RustBuffer { + return FfiConverterTypeTreeDebugLevelRecord.lower(value) } -public struct TransactionResultRecord: Equatable, Hashable { - public var applied: Bool - public var conflict: StoreTransactionConflictRecord? - public var error: StoreErrorRecord? +public struct TreeDebugNodeRecord: Equatable, Hashable { + public var cid: Data + public var leaf: Bool + public var level: UInt8 + public var entryCount: UInt64 + public var maxEntries: UInt64 + public var fillFactor: Double + public var encodedBytes: UInt64 + public var firstKey: Data? + public var lastKey: Data? // Default memberwise initializers are never public by default, so we // declare one manually. - public init(applied: Bool, conflict: StoreTransactionConflictRecord?, error: StoreErrorRecord?) { - self.applied = applied - self.conflict = conflict - self.error = error + public init(cid: Data, leaf: Bool, level: UInt8, entryCount: UInt64, maxEntries: UInt64, fillFactor: Double, encodedBytes: UInt64, firstKey: Data?, lastKey: Data?) { + self.cid = cid + self.leaf = leaf + self.level = level + self.entryCount = entryCount + self.maxEntries = maxEntries + self.fillFactor = fillFactor + self.encodedBytes = encodedBytes + self.firstKey = firstKey + self.lastKey = lastKey } - - + + } #if compiler(>=6) -extension TransactionResultRecord: Sendable {} +extension TreeDebugNodeRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeTransactionResultRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> TransactionResultRecord { +public struct FfiConverterTypeTreeDebugNodeRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> TreeDebugNodeRecord { return - try TransactionResultRecord( - applied: FfiConverterBool.read(from: &buf), - conflict: FfiConverterOptionTypeStoreTransactionConflictRecord.read(from: &buf), - error: FfiConverterOptionTypeStoreErrorRecord.read(from: &buf) + try TreeDebugNodeRecord( + cid: FfiConverterData.read(from: &buf), + leaf: FfiConverterBool.read(from: &buf), + level: FfiConverterUInt8.read(from: &buf), + entryCount: FfiConverterUInt64.read(from: &buf), + maxEntries: FfiConverterUInt64.read(from: &buf), + fillFactor: FfiConverterDouble.read(from: &buf), + encodedBytes: FfiConverterUInt64.read(from: &buf), + firstKey: FfiConverterOptionData.read(from: &buf), + lastKey: FfiConverterOptionData.read(from: &buf) ) } - public static func write(_ value: TransactionResultRecord, into buf: inout [UInt8]) { - FfiConverterBool.write(value.applied, into: &buf) - FfiConverterOptionTypeStoreTransactionConflictRecord.write(value.conflict, into: &buf) - FfiConverterOptionTypeStoreErrorRecord.write(value.error, into: &buf) + public static func write(_ value: TreeDebugNodeRecord, into buf: inout [UInt8]) { + FfiConverterData.write(value.cid, into: &buf) + FfiConverterBool.write(value.leaf, into: &buf) + FfiConverterUInt8.write(value.level, into: &buf) + FfiConverterUInt64.write(value.entryCount, into: &buf) + FfiConverterUInt64.write(value.maxEntries, into: &buf) + FfiConverterDouble.write(value.fillFactor, into: &buf) + FfiConverterUInt64.write(value.encodedBytes, into: &buf) + FfiConverterOptionData.write(value.firstKey, into: &buf) + FfiConverterOptionData.write(value.lastKey, into: &buf) } } @@ -23176,65 +23871,49 @@ public struct FfiConverterTypeTransactionResultRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeTransactionResultRecord_lift(_ buf: RustBuffer) throws -> TransactionResultRecord { - return try FfiConverterTypeTransactionResultRecord.lift(buf) +public func FfiConverterTypeTreeDebugNodeRecord_lift(_ buf: RustBuffer) throws -> TreeDebugNodeRecord { + return try FfiConverterTypeTreeDebugNodeRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeTransactionResultRecord_lower(_ value: TransactionResultRecord) -> RustBuffer { - return FfiConverterTypeTransactionResultRecord.lower(value) +public func FfiConverterTypeTreeDebugNodeRecord_lower(_ value: TreeDebugNodeRecord) -> RustBuffer { + return FfiConverterTypeTreeDebugNodeRecord.lower(value) } -public struct TransactionUpdateRecord: Equatable, Hashable { - public var applied: Bool - public var conflict: Bool - public var nodesWritten: UInt64 - public var rootsWritten: UInt64 - public var conflictDetail: TransactionConflictRecord? +public struct TreeDebugViewRecord: Equatable, Hashable { + public var levels: [TreeDebugLevelRecord] // Default memberwise initializers are never public by default, so we // declare one manually. - public init(applied: Bool, conflict: Bool, nodesWritten: UInt64, rootsWritten: UInt64, conflictDetail: TransactionConflictRecord?) { - self.applied = applied - self.conflict = conflict - self.nodesWritten = nodesWritten - self.rootsWritten = rootsWritten - self.conflictDetail = conflictDetail + public init(levels: [TreeDebugLevelRecord]) { + self.levels = levels } - - + + } #if compiler(>=6) -extension TransactionUpdateRecord: Sendable {} +extension TreeDebugViewRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeTransactionUpdateRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> TransactionUpdateRecord { +public struct FfiConverterTypeTreeDebugViewRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> TreeDebugViewRecord { return - try TransactionUpdateRecord( - applied: FfiConverterBool.read(from: &buf), - conflict: FfiConverterBool.read(from: &buf), - nodesWritten: FfiConverterUInt64.read(from: &buf), - rootsWritten: FfiConverterUInt64.read(from: &buf), - conflictDetail: FfiConverterOptionTypeTransactionConflictRecord.read(from: &buf) + try TreeDebugViewRecord( + levels: FfiConverterSequenceTypeTreeDebugLevelRecord.read(from: &buf) ) } - public static func write(_ value: TransactionUpdateRecord, into buf: inout [UInt8]) { - FfiConverterBool.write(value.applied, into: &buf) - FfiConverterBool.write(value.conflict, into: &buf) - FfiConverterUInt64.write(value.nodesWritten, into: &buf) - FfiConverterUInt64.write(value.rootsWritten, into: &buf) - FfiConverterOptionTypeTransactionConflictRecord.write(value.conflictDetail, into: &buf) + public static func write(_ value: TreeDebugViewRecord, into buf: inout [UInt8]) { + FfiConverterSequenceTypeTreeDebugLevelRecord.write(value.levels, into: &buf) } } @@ -23242,53 +23921,53 @@ public struct FfiConverterTypeTransactionUpdateRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeTransactionUpdateRecord_lift(_ buf: RustBuffer) throws -> TransactionUpdateRecord { - return try FfiConverterTypeTransactionUpdateRecord.lift(buf) +public func FfiConverterTypeTreeDebugViewRecord_lift(_ buf: RustBuffer) throws -> TreeDebugViewRecord { + return try FfiConverterTypeTreeDebugViewRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeTransactionUpdateRecord_lower(_ value: TransactionUpdateRecord) -> RustBuffer { - return FfiConverterTypeTransactionUpdateRecord.lower(value) +public func FfiConverterTypeTreeDebugViewRecord_lower(_ value: TreeDebugViewRecord) -> RustBuffer { + return FfiConverterTypeTreeDebugViewRecord.lower(value) } -public struct TreeDebugComparedNodeRecord: Equatable, Hashable { - public var status: TreeDebugNodeStatusKind - public var node: TreeDebugNodeRecord +public struct TreeRecord: Equatable, Hashable { + public var root: Data? + public var config: ConfigRecord // Default memberwise initializers are never public by default, so we // declare one manually. - public init(status: TreeDebugNodeStatusKind, node: TreeDebugNodeRecord) { - self.status = status - self.node = node + public init(root: Data?, config: ConfigRecord) { + self.root = root + self.config = config } - - + + } #if compiler(>=6) -extension TreeDebugComparedNodeRecord: Sendable {} +extension TreeRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeTreeDebugComparedNodeRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> TreeDebugComparedNodeRecord { +public struct FfiConverterTypeTreeRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> TreeRecord { return - try TreeDebugComparedNodeRecord( - status: FfiConverterTypeTreeDebugNodeStatusKind.read(from: &buf), - node: FfiConverterTypeTreeDebugNodeRecord.read(from: &buf) + try TreeRecord( + root: FfiConverterOptionData.read(from: &buf), + config: FfiConverterTypeConfigRecord.read(from: &buf) ) } - public static func write(_ value: TreeDebugComparedNodeRecord, into buf: inout [UInt8]) { - FfiConverterTypeTreeDebugNodeStatusKind.write(value.status, into: &buf) - FfiConverterTypeTreeDebugNodeRecord.write(value.node, into: &buf) + public static func write(_ value: TreeRecord, into buf: inout [UInt8]) { + FfiConverterOptionData.write(value.root, into: &buf) + FfiConverterTypeConfigRecord.write(value.config, into: &buf) } } @@ -23296,77 +23975,53 @@ public struct FfiConverterTypeTreeDebugComparedNodeRecord: FfiConverterRustBuffe #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeTreeDebugComparedNodeRecord_lift(_ buf: RustBuffer) throws -> TreeDebugComparedNodeRecord { - return try FfiConverterTypeTreeDebugComparedNodeRecord.lift(buf) +public func FfiConverterTypeTreeRecord_lift(_ buf: RustBuffer) throws -> TreeRecord { + return try FfiConverterTypeTreeRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeTreeDebugComparedNodeRecord_lower(_ value: TreeDebugComparedNodeRecord) -> RustBuffer { - return FfiConverterTypeTreeDebugComparedNodeRecord.lower(value) +public func FfiConverterTypeTreeRecord_lower(_ value: TreeRecord) -> RustBuffer { + return FfiConverterTypeTreeRecord.lower(value) } -public struct TreeDebugComparisonLevelRecord: Equatable, Hashable { +public struct TreeStatsLevelF64Record: Equatable, Hashable { public var level: UInt8 - public var sharedNodes: UInt64 - public var leftOnlyNodes: UInt64 - public var rightOnlyNodes: UInt64 - public var sharedBytes: UInt64 - public var leftOnlyBytes: UInt64 - public var rightOnlyBytes: UInt64 - public var nodes: [TreeDebugComparedNodeRecord] + public var value: Double // Default memberwise initializers are never public by default, so we // declare one manually. - public init(level: UInt8, sharedNodes: UInt64, leftOnlyNodes: UInt64, rightOnlyNodes: UInt64, sharedBytes: UInt64, leftOnlyBytes: UInt64, rightOnlyBytes: UInt64, nodes: [TreeDebugComparedNodeRecord]) { + public init(level: UInt8, value: Double) { self.level = level - self.sharedNodes = sharedNodes - self.leftOnlyNodes = leftOnlyNodes - self.rightOnlyNodes = rightOnlyNodes - self.sharedBytes = sharedBytes - self.leftOnlyBytes = leftOnlyBytes - self.rightOnlyBytes = rightOnlyBytes - self.nodes = nodes + self.value = value } - - + + } #if compiler(>=6) -extension TreeDebugComparisonLevelRecord: Sendable {} +extension TreeStatsLevelF64Record: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeTreeDebugComparisonLevelRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> TreeDebugComparisonLevelRecord { +public struct FfiConverterTypeTreeStatsLevelF64Record: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> TreeStatsLevelF64Record { return - try TreeDebugComparisonLevelRecord( - level: FfiConverterUInt8.read(from: &buf), - sharedNodes: FfiConverterUInt64.read(from: &buf), - leftOnlyNodes: FfiConverterUInt64.read(from: &buf), - rightOnlyNodes: FfiConverterUInt64.read(from: &buf), - sharedBytes: FfiConverterUInt64.read(from: &buf), - leftOnlyBytes: FfiConverterUInt64.read(from: &buf), - rightOnlyBytes: FfiConverterUInt64.read(from: &buf), - nodes: FfiConverterSequenceTypeTreeDebugComparedNodeRecord.read(from: &buf) + try TreeStatsLevelF64Record( + level: FfiConverterUInt8.read(from: &buf), + value: FfiConverterDouble.read(from: &buf) ) } - public static func write(_ value: TreeDebugComparisonLevelRecord, into buf: inout [UInt8]) { + public static func write(_ value: TreeStatsLevelF64Record, into buf: inout [UInt8]) { FfiConverterUInt8.write(value.level, into: &buf) - FfiConverterUInt64.write(value.sharedNodes, into: &buf) - FfiConverterUInt64.write(value.leftOnlyNodes, into: &buf) - FfiConverterUInt64.write(value.rightOnlyNodes, into: &buf) - FfiConverterUInt64.write(value.sharedBytes, into: &buf) - FfiConverterUInt64.write(value.leftOnlyBytes, into: &buf) - FfiConverterUInt64.write(value.rightOnlyBytes, into: &buf) - FfiConverterSequenceTypeTreeDebugComparedNodeRecord.write(value.nodes, into: &buf) + FfiConverterDouble.write(value.value, into: &buf) } } @@ -23374,73 +24029,53 @@ public struct FfiConverterTypeTreeDebugComparisonLevelRecord: FfiConverterRustBu #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeTreeDebugComparisonLevelRecord_lift(_ buf: RustBuffer) throws -> TreeDebugComparisonLevelRecord { - return try FfiConverterTypeTreeDebugComparisonLevelRecord.lift(buf) +public func FfiConverterTypeTreeStatsLevelF64Record_lift(_ buf: RustBuffer) throws -> TreeStatsLevelF64Record { + return try FfiConverterTypeTreeStatsLevelF64Record.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeTreeDebugComparisonLevelRecord_lower(_ value: TreeDebugComparisonLevelRecord) -> RustBuffer { - return FfiConverterTypeTreeDebugComparisonLevelRecord.lower(value) +public func FfiConverterTypeTreeStatsLevelF64Record_lower(_ value: TreeStatsLevelF64Record) -> RustBuffer { + return FfiConverterTypeTreeStatsLevelF64Record.lower(value) } -public struct TreeDebugComparisonRecord: Equatable, Hashable { - public var sharedNodes: UInt64 - public var leftOnlyNodes: UInt64 - public var rightOnlyNodes: UInt64 - public var sharedBytes: UInt64 - public var leftOnlyBytes: UInt64 - public var rightOnlyBytes: UInt64 - public var levels: [TreeDebugComparisonLevelRecord] +public struct TreeStatsLevelU64Record: Equatable, Hashable { + public var level: UInt8 + public var value: UInt64 // Default memberwise initializers are never public by default, so we // declare one manually. - public init(sharedNodes: UInt64, leftOnlyNodes: UInt64, rightOnlyNodes: UInt64, sharedBytes: UInt64, leftOnlyBytes: UInt64, rightOnlyBytes: UInt64, levels: [TreeDebugComparisonLevelRecord]) { - self.sharedNodes = sharedNodes - self.leftOnlyNodes = leftOnlyNodes - self.rightOnlyNodes = rightOnlyNodes - self.sharedBytes = sharedBytes - self.leftOnlyBytes = leftOnlyBytes - self.rightOnlyBytes = rightOnlyBytes - self.levels = levels + public init(level: UInt8, value: UInt64) { + self.level = level + self.value = value } - - + + } #if compiler(>=6) -extension TreeDebugComparisonRecord: Sendable {} +extension TreeStatsLevelU64Record: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeTreeDebugComparisonRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> TreeDebugComparisonRecord { +public struct FfiConverterTypeTreeStatsLevelU64Record: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> TreeStatsLevelU64Record { return - try TreeDebugComparisonRecord( - sharedNodes: FfiConverterUInt64.read(from: &buf), - leftOnlyNodes: FfiConverterUInt64.read(from: &buf), - rightOnlyNodes: FfiConverterUInt64.read(from: &buf), - sharedBytes: FfiConverterUInt64.read(from: &buf), - leftOnlyBytes: FfiConverterUInt64.read(from: &buf), - rightOnlyBytes: FfiConverterUInt64.read(from: &buf), - levels: FfiConverterSequenceTypeTreeDebugComparisonLevelRecord.read(from: &buf) + try TreeStatsLevelU64Record( + level: FfiConverterUInt8.read(from: &buf), + value: FfiConverterUInt64.read(from: &buf) ) } - public static func write(_ value: TreeDebugComparisonRecord, into buf: inout [UInt8]) { - FfiConverterUInt64.write(value.sharedNodes, into: &buf) - FfiConverterUInt64.write(value.leftOnlyNodes, into: &buf) - FfiConverterUInt64.write(value.rightOnlyNodes, into: &buf) - FfiConverterUInt64.write(value.sharedBytes, into: &buf) - FfiConverterUInt64.write(value.leftOnlyBytes, into: &buf) - FfiConverterUInt64.write(value.rightOnlyBytes, into: &buf) - FfiConverterSequenceTypeTreeDebugComparisonLevelRecord.write(value.levels, into: &buf) + public static func write(_ value: TreeStatsLevelU64Record, into buf: inout [UInt8]) { + FfiConverterUInt8.write(value.level, into: &buf) + FfiConverterUInt64.write(value.value, into: &buf) } } @@ -23448,53 +24083,161 @@ public struct FfiConverterTypeTreeDebugComparisonRecord: FfiConverterRustBuffer #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeTreeDebugComparisonRecord_lift(_ buf: RustBuffer) throws -> TreeDebugComparisonRecord { - return try FfiConverterTypeTreeDebugComparisonRecord.lift(buf) +public func FfiConverterTypeTreeStatsLevelU64Record_lift(_ buf: RustBuffer) throws -> TreeStatsLevelU64Record { + return try FfiConverterTypeTreeStatsLevelU64Record.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeTreeDebugComparisonRecord_lower(_ value: TreeDebugComparisonRecord) -> RustBuffer { - return FfiConverterTypeTreeDebugComparisonRecord.lower(value) +public func FfiConverterTypeTreeStatsLevelU64Record_lower(_ value: TreeStatsLevelU64Record) -> RustBuffer { + return FfiConverterTypeTreeStatsLevelU64Record.lower(value) } -public struct TreeDebugLevelRecord: Equatable, Hashable { - public var level: UInt8 - public var nodes: [TreeDebugNodeRecord] +public struct TreeStatsRecord: Equatable, Hashable { + public var numNodes: UInt64 + public var numLeaves: UInt64 + public var numInternalNodes: UInt64 + public var treeHeight: UInt8 + public var totalKeyValuePairs: UInt64 + public var totalTreeSizeBytes: UInt64 + public var avgNodeSizeBytes: Double + public var minNodeSizeBytes: UInt64 + public var maxNodeSizeBytes: UInt64 + public var avgEntriesPerNode: Double + public var nodesPerLevel: [TreeStatsLevelU64Record] + public var avgNodeSizePerLevel: [TreeStatsLevelF64Record] + public var avgEntriesPerLevel: [TreeStatsLevelF64Record] + public var minEntriesPerLevel: [TreeStatsLevelU64Record] + public var maxEntriesPerLevel: [TreeStatsLevelU64Record] + public var avgFanout: Double + public var minFanout: UInt64 + public var maxFanout: UInt64 + public var avgFillFactor: Double + public var avgLeafFillFactor: Double + public var avgInternalFillFactor: Double + public var avgKeySizeBytes: Double + public var avgValueSizeBytes: Double + public var minKeySizeBytes: UInt64 + public var maxKeySizeBytes: UInt64 + public var minValueSizeBytes: UInt64 + public var maxValueSizeBytes: UInt64 + public var totalKeysSizeBytes: UInt64 + public var totalValuesSizeBytes: UInt64 // Default memberwise initializers are never public by default, so we // declare one manually. - public init(level: UInt8, nodes: [TreeDebugNodeRecord]) { - self.level = level - self.nodes = nodes + public init(numNodes: UInt64, numLeaves: UInt64, numInternalNodes: UInt64, treeHeight: UInt8, totalKeyValuePairs: UInt64, totalTreeSizeBytes: UInt64, avgNodeSizeBytes: Double, minNodeSizeBytes: UInt64, maxNodeSizeBytes: UInt64, avgEntriesPerNode: Double, nodesPerLevel: [TreeStatsLevelU64Record], avgNodeSizePerLevel: [TreeStatsLevelF64Record], avgEntriesPerLevel: [TreeStatsLevelF64Record], minEntriesPerLevel: [TreeStatsLevelU64Record], maxEntriesPerLevel: [TreeStatsLevelU64Record], avgFanout: Double, minFanout: UInt64, maxFanout: UInt64, avgFillFactor: Double, avgLeafFillFactor: Double, avgInternalFillFactor: Double, avgKeySizeBytes: Double, avgValueSizeBytes: Double, minKeySizeBytes: UInt64, maxKeySizeBytes: UInt64, minValueSizeBytes: UInt64, maxValueSizeBytes: UInt64, totalKeysSizeBytes: UInt64, totalValuesSizeBytes: UInt64) { + self.numNodes = numNodes + self.numLeaves = numLeaves + self.numInternalNodes = numInternalNodes + self.treeHeight = treeHeight + self.totalKeyValuePairs = totalKeyValuePairs + self.totalTreeSizeBytes = totalTreeSizeBytes + self.avgNodeSizeBytes = avgNodeSizeBytes + self.minNodeSizeBytes = minNodeSizeBytes + self.maxNodeSizeBytes = maxNodeSizeBytes + self.avgEntriesPerNode = avgEntriesPerNode + self.nodesPerLevel = nodesPerLevel + self.avgNodeSizePerLevel = avgNodeSizePerLevel + self.avgEntriesPerLevel = avgEntriesPerLevel + self.minEntriesPerLevel = minEntriesPerLevel + self.maxEntriesPerLevel = maxEntriesPerLevel + self.avgFanout = avgFanout + self.minFanout = minFanout + self.maxFanout = maxFanout + self.avgFillFactor = avgFillFactor + self.avgLeafFillFactor = avgLeafFillFactor + self.avgInternalFillFactor = avgInternalFillFactor + self.avgKeySizeBytes = avgKeySizeBytes + self.avgValueSizeBytes = avgValueSizeBytes + self.minKeySizeBytes = minKeySizeBytes + self.maxKeySizeBytes = maxKeySizeBytes + self.minValueSizeBytes = minValueSizeBytes + self.maxValueSizeBytes = maxValueSizeBytes + self.totalKeysSizeBytes = totalKeysSizeBytes + self.totalValuesSizeBytes = totalValuesSizeBytes } - - + + } #if compiler(>=6) -extension TreeDebugLevelRecord: Sendable {} +extension TreeStatsRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeTreeDebugLevelRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> TreeDebugLevelRecord { +public struct FfiConverterTypeTreeStatsRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> TreeStatsRecord { return - try TreeDebugLevelRecord( - level: FfiConverterUInt8.read(from: &buf), - nodes: FfiConverterSequenceTypeTreeDebugNodeRecord.read(from: &buf) + try TreeStatsRecord( + numNodes: FfiConverterUInt64.read(from: &buf), + numLeaves: FfiConverterUInt64.read(from: &buf), + numInternalNodes: FfiConverterUInt64.read(from: &buf), + treeHeight: FfiConverterUInt8.read(from: &buf), + totalKeyValuePairs: FfiConverterUInt64.read(from: &buf), + totalTreeSizeBytes: FfiConverterUInt64.read(from: &buf), + avgNodeSizeBytes: FfiConverterDouble.read(from: &buf), + minNodeSizeBytes: FfiConverterUInt64.read(from: &buf), + maxNodeSizeBytes: FfiConverterUInt64.read(from: &buf), + avgEntriesPerNode: FfiConverterDouble.read(from: &buf), + nodesPerLevel: FfiConverterSequenceTypeTreeStatsLevelU64Record.read(from: &buf), + avgNodeSizePerLevel: FfiConverterSequenceTypeTreeStatsLevelF64Record.read(from: &buf), + avgEntriesPerLevel: FfiConverterSequenceTypeTreeStatsLevelF64Record.read(from: &buf), + minEntriesPerLevel: FfiConverterSequenceTypeTreeStatsLevelU64Record.read(from: &buf), + maxEntriesPerLevel: FfiConverterSequenceTypeTreeStatsLevelU64Record.read(from: &buf), + avgFanout: FfiConverterDouble.read(from: &buf), + minFanout: FfiConverterUInt64.read(from: &buf), + maxFanout: FfiConverterUInt64.read(from: &buf), + avgFillFactor: FfiConverterDouble.read(from: &buf), + avgLeafFillFactor: FfiConverterDouble.read(from: &buf), + avgInternalFillFactor: FfiConverterDouble.read(from: &buf), + avgKeySizeBytes: FfiConverterDouble.read(from: &buf), + avgValueSizeBytes: FfiConverterDouble.read(from: &buf), + minKeySizeBytes: FfiConverterUInt64.read(from: &buf), + maxKeySizeBytes: FfiConverterUInt64.read(from: &buf), + minValueSizeBytes: FfiConverterUInt64.read(from: &buf), + maxValueSizeBytes: FfiConverterUInt64.read(from: &buf), + totalKeysSizeBytes: FfiConverterUInt64.read(from: &buf), + totalValuesSizeBytes: FfiConverterUInt64.read(from: &buf) ) } - public static func write(_ value: TreeDebugLevelRecord, into buf: inout [UInt8]) { - FfiConverterUInt8.write(value.level, into: &buf) - FfiConverterSequenceTypeTreeDebugNodeRecord.write(value.nodes, into: &buf) + public static func write(_ value: TreeStatsRecord, into buf: inout [UInt8]) { + FfiConverterUInt64.write(value.numNodes, into: &buf) + FfiConverterUInt64.write(value.numLeaves, into: &buf) + FfiConverterUInt64.write(value.numInternalNodes, into: &buf) + FfiConverterUInt8.write(value.treeHeight, into: &buf) + FfiConverterUInt64.write(value.totalKeyValuePairs, into: &buf) + FfiConverterUInt64.write(value.totalTreeSizeBytes, into: &buf) + FfiConverterDouble.write(value.avgNodeSizeBytes, into: &buf) + FfiConverterUInt64.write(value.minNodeSizeBytes, into: &buf) + FfiConverterUInt64.write(value.maxNodeSizeBytes, into: &buf) + FfiConverterDouble.write(value.avgEntriesPerNode, into: &buf) + FfiConverterSequenceTypeTreeStatsLevelU64Record.write(value.nodesPerLevel, into: &buf) + FfiConverterSequenceTypeTreeStatsLevelF64Record.write(value.avgNodeSizePerLevel, into: &buf) + FfiConverterSequenceTypeTreeStatsLevelF64Record.write(value.avgEntriesPerLevel, into: &buf) + FfiConverterSequenceTypeTreeStatsLevelU64Record.write(value.minEntriesPerLevel, into: &buf) + FfiConverterSequenceTypeTreeStatsLevelU64Record.write(value.maxEntriesPerLevel, into: &buf) + FfiConverterDouble.write(value.avgFanout, into: &buf) + FfiConverterUInt64.write(value.minFanout, into: &buf) + FfiConverterUInt64.write(value.maxFanout, into: &buf) + FfiConverterDouble.write(value.avgFillFactor, into: &buf) + FfiConverterDouble.write(value.avgLeafFillFactor, into: &buf) + FfiConverterDouble.write(value.avgInternalFillFactor, into: &buf) + FfiConverterDouble.write(value.avgKeySizeBytes, into: &buf) + FfiConverterDouble.write(value.avgValueSizeBytes, into: &buf) + FfiConverterUInt64.write(value.minKeySizeBytes, into: &buf) + FfiConverterUInt64.write(value.maxKeySizeBytes, into: &buf) + FfiConverterUInt64.write(value.minValueSizeBytes, into: &buf) + FfiConverterUInt64.write(value.maxValueSizeBytes, into: &buf) + FfiConverterUInt64.write(value.totalKeysSizeBytes, into: &buf) + FfiConverterUInt64.write(value.totalValuesSizeBytes, into: &buf) } } @@ -23502,81 +24245,69 @@ public struct FfiConverterTypeTreeDebugLevelRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeTreeDebugLevelRecord_lift(_ buf: RustBuffer) throws -> TreeDebugLevelRecord { - return try FfiConverterTypeTreeDebugLevelRecord.lift(buf) +public func FfiConverterTypeTreeStatsRecord_lift(_ buf: RustBuffer) throws -> TreeStatsRecord { + return try FfiConverterTypeTreeStatsRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeTreeDebugLevelRecord_lower(_ value: TreeDebugLevelRecord) -> RustBuffer { - return FfiConverterTypeTreeDebugLevelRecord.lower(value) +public func FfiConverterTypeTreeStatsRecord_lower(_ value: TreeStatsRecord) -> RustBuffer { + return FfiConverterTypeTreeStatsRecord.lower(value) } -public struct TreeDebugNodeRecord: Equatable, Hashable { - public var cid: Data - public var leaf: Bool - public var level: UInt8 - public var entryCount: UInt64 - public var maxEntries: UInt64 - public var fillFactor: Double - public var encodedBytes: UInt64 - public var firstKey: Data? - public var lastKey: Data? +public struct TurboQuantizationBuildLimitsRecord: Equatable, Hashable { + public var maxRecords: UInt64? + public var maxInputBytes: UInt64? + public var maxTemporaryBytes: UInt64? + public var maxTransformOperations: UInt64? + public var maxEncodedOutputBytes: UInt64? + public var maxWorkerThreads: UInt64? // Default memberwise initializers are never public by default, so we // declare one manually. - public init(cid: Data, leaf: Bool, level: UInt8, entryCount: UInt64, maxEntries: UInt64, fillFactor: Double, encodedBytes: UInt64, firstKey: Data?, lastKey: Data?) { - self.cid = cid - self.leaf = leaf - self.level = level - self.entryCount = entryCount - self.maxEntries = maxEntries - self.fillFactor = fillFactor - self.encodedBytes = encodedBytes - self.firstKey = firstKey - self.lastKey = lastKey + public init(maxRecords: UInt64?, maxInputBytes: UInt64?, maxTemporaryBytes: UInt64?, maxTransformOperations: UInt64?, maxEncodedOutputBytes: UInt64?, maxWorkerThreads: UInt64?) { + self.maxRecords = maxRecords + self.maxInputBytes = maxInputBytes + self.maxTemporaryBytes = maxTemporaryBytes + self.maxTransformOperations = maxTransformOperations + self.maxEncodedOutputBytes = maxEncodedOutputBytes + self.maxWorkerThreads = maxWorkerThreads } - - + + } #if compiler(>=6) -extension TreeDebugNodeRecord: Sendable {} +extension TurboQuantizationBuildLimitsRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeTreeDebugNodeRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> TreeDebugNodeRecord { +public struct FfiConverterTypeTurboQuantizationBuildLimitsRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> TurboQuantizationBuildLimitsRecord { return - try TreeDebugNodeRecord( - cid: FfiConverterData.read(from: &buf), - leaf: FfiConverterBool.read(from: &buf), - level: FfiConverterUInt8.read(from: &buf), - entryCount: FfiConverterUInt64.read(from: &buf), - maxEntries: FfiConverterUInt64.read(from: &buf), - fillFactor: FfiConverterDouble.read(from: &buf), - encodedBytes: FfiConverterUInt64.read(from: &buf), - firstKey: FfiConverterOptionData.read(from: &buf), - lastKey: FfiConverterOptionData.read(from: &buf) + try TurboQuantizationBuildLimitsRecord( + maxRecords: FfiConverterOptionUInt64.read(from: &buf), + maxInputBytes: FfiConverterOptionUInt64.read(from: &buf), + maxTemporaryBytes: FfiConverterOptionUInt64.read(from: &buf), + maxTransformOperations: FfiConverterOptionUInt64.read(from: &buf), + maxEncodedOutputBytes: FfiConverterOptionUInt64.read(from: &buf), + maxWorkerThreads: FfiConverterOptionUInt64.read(from: &buf) ) } - public static func write(_ value: TreeDebugNodeRecord, into buf: inout [UInt8]) { - FfiConverterData.write(value.cid, into: &buf) - FfiConverterBool.write(value.leaf, into: &buf) - FfiConverterUInt8.write(value.level, into: &buf) - FfiConverterUInt64.write(value.entryCount, into: &buf) - FfiConverterUInt64.write(value.maxEntries, into: &buf) - FfiConverterDouble.write(value.fillFactor, into: &buf) - FfiConverterUInt64.write(value.encodedBytes, into: &buf) - FfiConverterOptionData.write(value.firstKey, into: &buf) - FfiConverterOptionData.write(value.lastKey, into: &buf) + public static func write(_ value: TurboQuantizationBuildLimitsRecord, into buf: inout [UInt8]) { + FfiConverterOptionUInt64.write(value.maxRecords, into: &buf) + FfiConverterOptionUInt64.write(value.maxInputBytes, into: &buf) + FfiConverterOptionUInt64.write(value.maxTemporaryBytes, into: &buf) + FfiConverterOptionUInt64.write(value.maxTransformOperations, into: &buf) + FfiConverterOptionUInt64.write(value.maxEncodedOutputBytes, into: &buf) + FfiConverterOptionUInt64.write(value.maxWorkerThreads, into: &buf) } } @@ -23584,49 +24315,53 @@ public struct FfiConverterTypeTreeDebugNodeRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeTreeDebugNodeRecord_lift(_ buf: RustBuffer) throws -> TreeDebugNodeRecord { - return try FfiConverterTypeTreeDebugNodeRecord.lift(buf) +public func FfiConverterTypeTurboQuantizationBuildLimitsRecord_lift(_ buf: RustBuffer) throws -> TurboQuantizationBuildLimitsRecord { + return try FfiConverterTypeTurboQuantizationBuildLimitsRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeTreeDebugNodeRecord_lower(_ value: TreeDebugNodeRecord) -> RustBuffer { - return FfiConverterTypeTreeDebugNodeRecord.lower(value) +public func FfiConverterTypeTurboQuantizationBuildLimitsRecord_lower(_ value: TurboQuantizationBuildLimitsRecord) -> RustBuffer { + return FfiConverterTypeTurboQuantizationBuildLimitsRecord.lower(value) } -public struct TreeDebugViewRecord: Equatable, Hashable { - public var levels: [TreeDebugLevelRecord] +public struct TurboQuantizationBuildResultRecord { + public var index: BindingTurboQuantizer + public var stats: TurboQuantizationBuildStatsRecord // Default memberwise initializers are never public by default, so we // declare one manually. - public init(levels: [TreeDebugLevelRecord]) { - self.levels = levels + public init(index: BindingTurboQuantizer, stats: TurboQuantizationBuildStatsRecord) { + self.index = index + self.stats = stats } - - + + } #if compiler(>=6) -extension TreeDebugViewRecord: Sendable {} +extension TurboQuantizationBuildResultRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeTreeDebugViewRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> TreeDebugViewRecord { +public struct FfiConverterTypeTurboQuantizationBuildResultRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> TurboQuantizationBuildResultRecord { return - try TreeDebugViewRecord( - levels: FfiConverterSequenceTypeTreeDebugLevelRecord.read(from: &buf) + try TurboQuantizationBuildResultRecord( + index: FfiConverterTypeBindingTurboQuantizer.read(from: &buf), + stats: FfiConverterTypeTurboQuantizationBuildStatsRecord.read(from: &buf) ) } - public static func write(_ value: TreeDebugViewRecord, into buf: inout [UInt8]) { - FfiConverterSequenceTypeTreeDebugLevelRecord.write(value.levels, into: &buf) + public static func write(_ value: TurboQuantizationBuildResultRecord, into buf: inout [UInt8]) { + FfiConverterTypeBindingTurboQuantizer.write(value.index, into: &buf) + FfiConverterTypeTurboQuantizationBuildStatsRecord.write(value.stats, into: &buf) } } @@ -23634,53 +24369,73 @@ public struct FfiConverterTypeTreeDebugViewRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeTreeDebugViewRecord_lift(_ buf: RustBuffer) throws -> TreeDebugViewRecord { - return try FfiConverterTypeTreeDebugViewRecord.lift(buf) +public func FfiConverterTypeTurboQuantizationBuildResultRecord_lift(_ buf: RustBuffer) throws -> TurboQuantizationBuildResultRecord { + return try FfiConverterTypeTurboQuantizationBuildResultRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeTreeDebugViewRecord_lower(_ value: TreeDebugViewRecord) -> RustBuffer { - return FfiConverterTypeTreeDebugViewRecord.lower(value) +public func FfiConverterTypeTurboQuantizationBuildResultRecord_lower(_ value: TurboQuantizationBuildResultRecord) -> RustBuffer { + return FfiConverterTypeTurboQuantizationBuildResultRecord.lower(value) } -public struct TreeRecord: Equatable, Hashable { - public var root: Data? - public var config: ConfigRecord +public struct TurboQuantizationBuildStatsRecord: Equatable, Hashable { + public var encodedVectors: UInt64 + public var zeroVectors: UInt64 + public var transformedComponents: UInt64 + public var butterflyOperations: UInt64 + public var inputBytes: UInt64 + public var encodedOutputBytes: UInt64 + public var peakTemporaryBytes: UInt64 // Default memberwise initializers are never public by default, so we // declare one manually. - public init(root: Data?, config: ConfigRecord) { - self.root = root - self.config = config + public init(encodedVectors: UInt64, zeroVectors: UInt64, transformedComponents: UInt64, butterflyOperations: UInt64, inputBytes: UInt64, encodedOutputBytes: UInt64, peakTemporaryBytes: UInt64) { + self.encodedVectors = encodedVectors + self.zeroVectors = zeroVectors + self.transformedComponents = transformedComponents + self.butterflyOperations = butterflyOperations + self.inputBytes = inputBytes + self.encodedOutputBytes = encodedOutputBytes + self.peakTemporaryBytes = peakTemporaryBytes } - - + + } #if compiler(>=6) -extension TreeRecord: Sendable {} +extension TurboQuantizationBuildStatsRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeTreeRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> TreeRecord { +public struct FfiConverterTypeTurboQuantizationBuildStatsRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> TurboQuantizationBuildStatsRecord { return - try TreeRecord( - root: FfiConverterOptionData.read(from: &buf), - config: FfiConverterTypeConfigRecord.read(from: &buf) + try TurboQuantizationBuildStatsRecord( + encodedVectors: FfiConverterUInt64.read(from: &buf), + zeroVectors: FfiConverterUInt64.read(from: &buf), + transformedComponents: FfiConverterUInt64.read(from: &buf), + butterflyOperations: FfiConverterUInt64.read(from: &buf), + inputBytes: FfiConverterUInt64.read(from: &buf), + encodedOutputBytes: FfiConverterUInt64.read(from: &buf), + peakTemporaryBytes: FfiConverterUInt64.read(from: &buf) ) } - public static func write(_ value: TreeRecord, into buf: inout [UInt8]) { - FfiConverterOptionData.write(value.root, into: &buf) - FfiConverterTypeConfigRecord.write(value.config, into: &buf) + public static func write(_ value: TurboQuantizationBuildStatsRecord, into buf: inout [UInt8]) { + FfiConverterUInt64.write(value.encodedVectors, into: &buf) + FfiConverterUInt64.write(value.zeroVectors, into: &buf) + FfiConverterUInt64.write(value.transformedComponents, into: &buf) + FfiConverterUInt64.write(value.butterflyOperations, into: &buf) + FfiConverterUInt64.write(value.inputBytes, into: &buf) + FfiConverterUInt64.write(value.encodedOutputBytes, into: &buf) + FfiConverterUInt64.write(value.peakTemporaryBytes, into: &buf) } } @@ -23688,53 +24443,57 @@ public struct FfiConverterTypeTreeRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeTreeRecord_lift(_ buf: RustBuffer) throws -> TreeRecord { - return try FfiConverterTypeTreeRecord.lift(buf) +public func FfiConverterTypeTurboQuantizationBuildStatsRecord_lift(_ buf: RustBuffer) throws -> TurboQuantizationBuildStatsRecord { + return try FfiConverterTypeTurboQuantizationBuildStatsRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeTreeRecord_lower(_ value: TreeRecord) -> RustBuffer { - return FfiConverterTypeTreeRecord.lower(value) +public func FfiConverterTypeTurboQuantizationBuildStatsRecord_lower(_ value: TurboQuantizationBuildStatsRecord) -> RustBuffer { + return FfiConverterTypeTurboQuantizationBuildStatsRecord.lower(value) } -public struct TreeStatsLevelF64Record: Equatable, Hashable { - public var level: UInt8 - public var value: Double +public struct TurboQuantizationConfigRecord: Equatable, Hashable { + public var bitWidth: UInt8 + public var rerankMultiplier: UInt32 + public var seed: UInt64 // Default memberwise initializers are never public by default, so we // declare one manually. - public init(level: UInt8, value: Double) { - self.level = level - self.value = value + public init(bitWidth: UInt8, rerankMultiplier: UInt32, seed: UInt64) { + self.bitWidth = bitWidth + self.rerankMultiplier = rerankMultiplier + self.seed = seed } - - + + } #if compiler(>=6) -extension TreeStatsLevelF64Record: Sendable {} +extension TurboQuantizationConfigRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeTreeStatsLevelF64Record: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> TreeStatsLevelF64Record { +public struct FfiConverterTypeTurboQuantizationConfigRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> TurboQuantizationConfigRecord { return - try TreeStatsLevelF64Record( - level: FfiConverterUInt8.read(from: &buf), - value: FfiConverterDouble.read(from: &buf) + try TurboQuantizationConfigRecord( + bitWidth: FfiConverterUInt8.read(from: &buf), + rerankMultiplier: FfiConverterUInt32.read(from: &buf), + seed: FfiConverterUInt64.read(from: &buf) ) } - - public static func write(_ value: TreeStatsLevelF64Record, into buf: inout [UInt8]) { - FfiConverterUInt8.write(value.level, into: &buf) - FfiConverterDouble.write(value.value, into: &buf) + + public static func write(_ value: TurboQuantizationConfigRecord, into buf: inout [UInt8]) { + FfiConverterUInt8.write(value.bitWidth, into: &buf) + FfiConverterUInt32.write(value.rerankMultiplier, into: &buf) + FfiConverterUInt64.write(value.seed, into: &buf) } } @@ -23742,53 +24501,53 @@ public struct FfiConverterTypeTreeStatsLevelF64Record: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeTreeStatsLevelF64Record_lift(_ buf: RustBuffer) throws -> TreeStatsLevelF64Record { - return try FfiConverterTypeTreeStatsLevelF64Record.lift(buf) +public func FfiConverterTypeTurboQuantizationConfigRecord_lift(_ buf: RustBuffer) throws -> TurboQuantizationConfigRecord { + return try FfiConverterTypeTurboQuantizationConfigRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeTreeStatsLevelF64Record_lower(_ value: TreeStatsLevelF64Record) -> RustBuffer { - return FfiConverterTypeTreeStatsLevelF64Record.lower(value) +public func FfiConverterTypeTurboQuantizationConfigRecord_lower(_ value: TurboQuantizationConfigRecord) -> RustBuffer { + return FfiConverterTypeTurboQuantizationConfigRecord.lower(value) } -public struct TreeStatsLevelU64Record: Equatable, Hashable { - public var level: UInt8 - public var value: UInt64 +public struct TurboQuantizationQualityRecord: Equatable, Hashable { + public var meanSquaredError: Double + public var maximumSquaredError: Double // Default memberwise initializers are never public by default, so we // declare one manually. - public init(level: UInt8, value: UInt64) { - self.level = level - self.value = value + public init(meanSquaredError: Double, maximumSquaredError: Double) { + self.meanSquaredError = meanSquaredError + self.maximumSquaredError = maximumSquaredError } - - + + } #if compiler(>=6) -extension TreeStatsLevelU64Record: Sendable {} +extension TurboQuantizationQualityRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeTreeStatsLevelU64Record: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> TreeStatsLevelU64Record { +public struct FfiConverterTypeTurboQuantizationQualityRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> TurboQuantizationQualityRecord { return - try TreeStatsLevelU64Record( - level: FfiConverterUInt8.read(from: &buf), - value: FfiConverterUInt64.read(from: &buf) + try TurboQuantizationQualityRecord( + meanSquaredError: FfiConverterDouble.read(from: &buf), + maximumSquaredError: FfiConverterDouble.read(from: &buf) ) } - public static func write(_ value: TreeStatsLevelU64Record, into buf: inout [UInt8]) { - FfiConverterUInt8.write(value.level, into: &buf) - FfiConverterUInt64.write(value.value, into: &buf) + public static func write(_ value: TurboQuantizationQualityRecord, into buf: inout [UInt8]) { + FfiConverterDouble.write(value.meanSquaredError, into: &buf) + FfiConverterDouble.write(value.maximumSquaredError, into: &buf) } } @@ -23796,161 +24555,57 @@ public struct FfiConverterTypeTreeStatsLevelU64Record: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeTreeStatsLevelU64Record_lift(_ buf: RustBuffer) throws -> TreeStatsLevelU64Record { - return try FfiConverterTypeTreeStatsLevelU64Record.lift(buf) +public func FfiConverterTypeTurboQuantizationQualityRecord_lift(_ buf: RustBuffer) throws -> TurboQuantizationQualityRecord { + return try FfiConverterTypeTurboQuantizationQualityRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeTreeStatsLevelU64Record_lower(_ value: TreeStatsLevelU64Record) -> RustBuffer { - return FfiConverterTypeTreeStatsLevelU64Record.lower(value) +public func FfiConverterTypeTurboQuantizationQualityRecord_lower(_ value: TurboQuantizationQualityRecord) -> RustBuffer { + return FfiConverterTypeTurboQuantizationQualityRecord.lower(value) } -public struct TreeStatsRecord: Equatable, Hashable { - public var numNodes: UInt64 - public var numLeaves: UInt64 - public var numInternalNodes: UInt64 - public var treeHeight: UInt8 - public var totalKeyValuePairs: UInt64 - public var totalTreeSizeBytes: UInt64 - public var avgNodeSizeBytes: Double - public var minNodeSizeBytes: UInt64 - public var maxNodeSizeBytes: UInt64 - public var avgEntriesPerNode: Double - public var nodesPerLevel: [TreeStatsLevelU64Record] - public var avgNodeSizePerLevel: [TreeStatsLevelF64Record] - public var avgEntriesPerLevel: [TreeStatsLevelF64Record] - public var minEntriesPerLevel: [TreeStatsLevelU64Record] - public var maxEntriesPerLevel: [TreeStatsLevelU64Record] - public var avgFanout: Double - public var minFanout: UInt64 - public var maxFanout: UInt64 - public var avgFillFactor: Double - public var avgLeafFillFactor: Double - public var avgInternalFillFactor: Double - public var avgKeySizeBytes: Double - public var avgValueSizeBytes: Double - public var minKeySizeBytes: UInt64 - public var maxKeySizeBytes: UInt64 - public var minValueSizeBytes: UInt64 - public var maxValueSizeBytes: UInt64 - public var totalKeysSizeBytes: UInt64 - public var totalValuesSizeBytes: UInt64 +public struct TurboQuantizationVerificationRecord: Equatable, Hashable { + public var encodedVectors: UInt64 + public var zeroVectors: UInt64 + public var quality: TurboQuantizationQualityRecord // Default memberwise initializers are never public by default, so we // declare one manually. - public init(numNodes: UInt64, numLeaves: UInt64, numInternalNodes: UInt64, treeHeight: UInt8, totalKeyValuePairs: UInt64, totalTreeSizeBytes: UInt64, avgNodeSizeBytes: Double, minNodeSizeBytes: UInt64, maxNodeSizeBytes: UInt64, avgEntriesPerNode: Double, nodesPerLevel: [TreeStatsLevelU64Record], avgNodeSizePerLevel: [TreeStatsLevelF64Record], avgEntriesPerLevel: [TreeStatsLevelF64Record], minEntriesPerLevel: [TreeStatsLevelU64Record], maxEntriesPerLevel: [TreeStatsLevelU64Record], avgFanout: Double, minFanout: UInt64, maxFanout: UInt64, avgFillFactor: Double, avgLeafFillFactor: Double, avgInternalFillFactor: Double, avgKeySizeBytes: Double, avgValueSizeBytes: Double, minKeySizeBytes: UInt64, maxKeySizeBytes: UInt64, minValueSizeBytes: UInt64, maxValueSizeBytes: UInt64, totalKeysSizeBytes: UInt64, totalValuesSizeBytes: UInt64) { - self.numNodes = numNodes - self.numLeaves = numLeaves - self.numInternalNodes = numInternalNodes - self.treeHeight = treeHeight - self.totalKeyValuePairs = totalKeyValuePairs - self.totalTreeSizeBytes = totalTreeSizeBytes - self.avgNodeSizeBytes = avgNodeSizeBytes - self.minNodeSizeBytes = minNodeSizeBytes - self.maxNodeSizeBytes = maxNodeSizeBytes - self.avgEntriesPerNode = avgEntriesPerNode - self.nodesPerLevel = nodesPerLevel - self.avgNodeSizePerLevel = avgNodeSizePerLevel - self.avgEntriesPerLevel = avgEntriesPerLevel - self.minEntriesPerLevel = minEntriesPerLevel - self.maxEntriesPerLevel = maxEntriesPerLevel - self.avgFanout = avgFanout - self.minFanout = minFanout - self.maxFanout = maxFanout - self.avgFillFactor = avgFillFactor - self.avgLeafFillFactor = avgLeafFillFactor - self.avgInternalFillFactor = avgInternalFillFactor - self.avgKeySizeBytes = avgKeySizeBytes - self.avgValueSizeBytes = avgValueSizeBytes - self.minKeySizeBytes = minKeySizeBytes - self.maxKeySizeBytes = maxKeySizeBytes - self.minValueSizeBytes = minValueSizeBytes - self.maxValueSizeBytes = maxValueSizeBytes - self.totalKeysSizeBytes = totalKeysSizeBytes - self.totalValuesSizeBytes = totalValuesSizeBytes + public init(encodedVectors: UInt64, zeroVectors: UInt64, quality: TurboQuantizationQualityRecord) { + self.encodedVectors = encodedVectors + self.zeroVectors = zeroVectors + self.quality = quality } - - + + } #if compiler(>=6) -extension TreeStatsRecord: Sendable {} +extension TurboQuantizationVerificationRecord: Sendable {} #endif #if swift(>=5.8) @_documentation(visibility: private) #endif -public struct FfiConverterTypeTreeStatsRecord: FfiConverterRustBuffer { - public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> TreeStatsRecord { +public struct FfiConverterTypeTurboQuantizationVerificationRecord: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> TurboQuantizationVerificationRecord { return - try TreeStatsRecord( - numNodes: FfiConverterUInt64.read(from: &buf), - numLeaves: FfiConverterUInt64.read(from: &buf), - numInternalNodes: FfiConverterUInt64.read(from: &buf), - treeHeight: FfiConverterUInt8.read(from: &buf), - totalKeyValuePairs: FfiConverterUInt64.read(from: &buf), - totalTreeSizeBytes: FfiConverterUInt64.read(from: &buf), - avgNodeSizeBytes: FfiConverterDouble.read(from: &buf), - minNodeSizeBytes: FfiConverterUInt64.read(from: &buf), - maxNodeSizeBytes: FfiConverterUInt64.read(from: &buf), - avgEntriesPerNode: FfiConverterDouble.read(from: &buf), - nodesPerLevel: FfiConverterSequenceTypeTreeStatsLevelU64Record.read(from: &buf), - avgNodeSizePerLevel: FfiConverterSequenceTypeTreeStatsLevelF64Record.read(from: &buf), - avgEntriesPerLevel: FfiConverterSequenceTypeTreeStatsLevelF64Record.read(from: &buf), - minEntriesPerLevel: FfiConverterSequenceTypeTreeStatsLevelU64Record.read(from: &buf), - maxEntriesPerLevel: FfiConverterSequenceTypeTreeStatsLevelU64Record.read(from: &buf), - avgFanout: FfiConverterDouble.read(from: &buf), - minFanout: FfiConverterUInt64.read(from: &buf), - maxFanout: FfiConverterUInt64.read(from: &buf), - avgFillFactor: FfiConverterDouble.read(from: &buf), - avgLeafFillFactor: FfiConverterDouble.read(from: &buf), - avgInternalFillFactor: FfiConverterDouble.read(from: &buf), - avgKeySizeBytes: FfiConverterDouble.read(from: &buf), - avgValueSizeBytes: FfiConverterDouble.read(from: &buf), - minKeySizeBytes: FfiConverterUInt64.read(from: &buf), - maxKeySizeBytes: FfiConverterUInt64.read(from: &buf), - minValueSizeBytes: FfiConverterUInt64.read(from: &buf), - maxValueSizeBytes: FfiConverterUInt64.read(from: &buf), - totalKeysSizeBytes: FfiConverterUInt64.read(from: &buf), - totalValuesSizeBytes: FfiConverterUInt64.read(from: &buf) + try TurboQuantizationVerificationRecord( + encodedVectors: FfiConverterUInt64.read(from: &buf), + zeroVectors: FfiConverterUInt64.read(from: &buf), + quality: FfiConverterTypeTurboQuantizationQualityRecord.read(from: &buf) ) } - public static func write(_ value: TreeStatsRecord, into buf: inout [UInt8]) { - FfiConverterUInt64.write(value.numNodes, into: &buf) - FfiConverterUInt64.write(value.numLeaves, into: &buf) - FfiConverterUInt64.write(value.numInternalNodes, into: &buf) - FfiConverterUInt8.write(value.treeHeight, into: &buf) - FfiConverterUInt64.write(value.totalKeyValuePairs, into: &buf) - FfiConverterUInt64.write(value.totalTreeSizeBytes, into: &buf) - FfiConverterDouble.write(value.avgNodeSizeBytes, into: &buf) - FfiConverterUInt64.write(value.minNodeSizeBytes, into: &buf) - FfiConverterUInt64.write(value.maxNodeSizeBytes, into: &buf) - FfiConverterDouble.write(value.avgEntriesPerNode, into: &buf) - FfiConverterSequenceTypeTreeStatsLevelU64Record.write(value.nodesPerLevel, into: &buf) - FfiConverterSequenceTypeTreeStatsLevelF64Record.write(value.avgNodeSizePerLevel, into: &buf) - FfiConverterSequenceTypeTreeStatsLevelF64Record.write(value.avgEntriesPerLevel, into: &buf) - FfiConverterSequenceTypeTreeStatsLevelU64Record.write(value.minEntriesPerLevel, into: &buf) - FfiConverterSequenceTypeTreeStatsLevelU64Record.write(value.maxEntriesPerLevel, into: &buf) - FfiConverterDouble.write(value.avgFanout, into: &buf) - FfiConverterUInt64.write(value.minFanout, into: &buf) - FfiConverterUInt64.write(value.maxFanout, into: &buf) - FfiConverterDouble.write(value.avgFillFactor, into: &buf) - FfiConverterDouble.write(value.avgLeafFillFactor, into: &buf) - FfiConverterDouble.write(value.avgInternalFillFactor, into: &buf) - FfiConverterDouble.write(value.avgKeySizeBytes, into: &buf) - FfiConverterDouble.write(value.avgValueSizeBytes, into: &buf) - FfiConverterUInt64.write(value.minKeySizeBytes, into: &buf) - FfiConverterUInt64.write(value.maxKeySizeBytes, into: &buf) - FfiConverterUInt64.write(value.minValueSizeBytes, into: &buf) - FfiConverterUInt64.write(value.maxValueSizeBytes, into: &buf) - FfiConverterUInt64.write(value.totalKeysSizeBytes, into: &buf) - FfiConverterUInt64.write(value.totalValuesSizeBytes, into: &buf) + public static func write(_ value: TurboQuantizationVerificationRecord, into buf: inout [UInt8]) { + FfiConverterUInt64.write(value.encodedVectors, into: &buf) + FfiConverterUInt64.write(value.zeroVectors, into: &buf) + FfiConverterTypeTurboQuantizationQualityRecord.write(value.quality, into: &buf) } } @@ -23958,15 +24613,15 @@ public struct FfiConverterTypeTreeStatsRecord: FfiConverterRustBuffer { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeTreeStatsRecord_lift(_ buf: RustBuffer) throws -> TreeStatsRecord { - return try FfiConverterTypeTreeStatsRecord.lift(buf) +public func FfiConverterTypeTurboQuantizationVerificationRecord_lift(_ buf: RustBuffer) throws -> TurboQuantizationVerificationRecord { + return try FfiConverterTypeTurboQuantizationVerificationRecord.lift(buf) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeTreeStatsRecord_lower(_ value: TreeStatsRecord) -> RustBuffer { - return FfiConverterTypeTreeStatsRecord.lower(value) +public func FfiConverterTypeTurboQuantizationVerificationRecord_lower(_ value: TurboQuantizationVerificationRecord) -> RustBuffer { + return FfiConverterTypeTurboQuantizationVerificationRecord.lower(value) } @@ -23987,9 +24642,9 @@ public struct TypedContentObjectRecord: Equatable, Hashable { self.depth = depth } - - + + } #if compiler(>=6) @@ -24003,10 +24658,10 @@ public struct FfiConverterTypeTypedContentObjectRecord: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> TypedContentObjectRecord { return try TypedContentObjectRecord( - kind: FfiConverterTypeContentObjectKindRecord.read(from: &buf), - cid: FfiConverterData.read(from: &buf), - dimensions: FfiConverterOptionUInt32.read(from: &buf), - bytes: FfiConverterData.read(from: &buf), + kind: FfiConverterTypeContentObjectKindRecord.read(from: &buf), + cid: FfiConverterData.read(from: &buf), + dimensions: FfiConverterOptionUInt32.read(from: &buf), + bytes: FfiConverterData.read(from: &buf), depth: FfiConverterUInt64.read(from: &buf) ) } @@ -24045,9 +24700,9 @@ public struct UnitResultRecord: Equatable, Hashable { self.error = error } - - + + } #if compiler(>=6) @@ -24099,9 +24754,9 @@ public struct ValueRefRecord: Equatable, Hashable { self.blob = blob } - - + + } #if compiler(>=6) @@ -24115,8 +24770,8 @@ public struct FfiConverterTypeValueRefRecord: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ValueRefRecord { return try ValueRefRecord( - kind: FfiConverterTypeValueRefKind.read(from: &buf), - value: FfiConverterOptionData.read(from: &buf), + kind: FfiConverterTypeValueRefKind.read(from: &buf), + value: FfiConverterOptionData.read(from: &buf), blob: FfiConverterOptionTypeBlobRefRecord.read(from: &buf) ) } @@ -24155,9 +24810,9 @@ public struct VersionPruneRecord: Equatable, Hashable { self.removed = removed } - - + + } #if compiler(>=6) @@ -24171,7 +24826,7 @@ public struct FfiConverterTypeVersionPruneRecord: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> VersionPruneRecord { return try VersionPruneRecord( - retained: FfiConverterSequenceData.read(from: &buf), + retained: FfiConverterSequenceData.read(from: &buf), removed: FfiConverterSequenceData.read(from: &buf) ) } @@ -24209,9 +24864,9 @@ public struct VersionedMapBatchResultRecord: Equatable, Hashable { self.stats = stats } - - + + } #if compiler(>=6) @@ -24225,7 +24880,7 @@ public struct FfiConverterTypeVersionedMapBatchResultRecord: FfiConverterRustBuf public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> VersionedMapBatchResultRecord { return try VersionedMapBatchResultRecord( - version: FfiConverterTypeMapVersionRecord.read(from: &buf), + version: FfiConverterTypeMapVersionRecord.read(from: &buf), stats: FfiConverterTypeBatchApplyStatsRecord.read(from: &buf) ) } @@ -24267,9 +24922,9 @@ public struct VersionedTransactionCommitRecord: Equatable, Hashable { self.conflictCurrent = conflictCurrent } - - + + } #if compiler(>=6) @@ -24283,9 +24938,9 @@ public struct FfiConverterTypeVersionedTransactionCommitRecord: FfiConverterRust public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> VersionedTransactionCommitRecord { return try VersionedTransactionCommitRecord( - applied: FfiConverterBool.read(from: &buf), - versions: FfiConverterSequenceTypeMapVersionRecord.read(from: &buf), - conflictMapId: FfiConverterOptionData.read(from: &buf), + applied: FfiConverterBool.read(from: &buf), + versions: FfiConverterSequenceTypeMapVersionRecord.read(from: &buf), + conflictMapId: FfiConverterOptionData.read(from: &buf), conflictCurrent: FfiConverterOptionTypeMapVersionRecord.read(from: &buf) ) } @@ -24329,9 +24984,9 @@ public struct VersionedValueRecord: Equatable, Hashable { self.payload = payload } - - + + } #if compiler(>=6) @@ -24345,9 +25000,9 @@ public struct FfiConverterTypeVersionedValueRecord: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> VersionedValueRecord { return try VersionedValueRecord( - schema: FfiConverterString.read(from: &buf), - version: FfiConverterUInt64.read(from: &buf), - encoding: FfiConverterTypeEncodingRecord.read(from: &buf), + schema: FfiConverterString.read(from: &buf), + version: FfiConverterUInt64.read(from: &buf), + encoding: FfiConverterTypeEncodingRecord.read(from: &buf), payload: FfiConverterData.read(from: &buf) ) } @@ -24387,9 +25042,9 @@ public struct WriteResultRecord: Equatable, Hashable { self.stats = stats } - - + + } #if compiler(>=6) @@ -24403,7 +25058,7 @@ public struct FfiConverterTypeWriteResultRecord: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> WriteResultRecord { return try WriteResultRecord( - tree: FfiConverterTypeTreeRecord.read(from: &buf), + tree: FfiConverterTypeTreeRecord.read(from: &buf), stats: FfiConverterTypeWriteStatsRecord.read(from: &buf) ) } @@ -24469,9 +25124,9 @@ public struct WriteStatsRecord: Equatable, Hashable { self.coalescedIslands = coalescedIslands } - - + + } #if compiler(>=6) @@ -24485,17 +25140,17 @@ public struct FfiConverterTypeWriteStatsRecord: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> WriteStatsRecord { return try WriteStatsRecord( - inputMutations: FfiConverterUInt64.read(from: &buf), - effectiveMutations: FfiConverterUInt64.read(from: &buf), - entriesStreamed: FfiConverterUInt64.read(from: &buf), - nodesRead: FfiConverterUInt64.read(from: &buf), - nodesWritten: FfiConverterUInt64.read(from: &buf), - nodesReused: FfiConverterUInt64.read(from: &buf), - bytesRead: FfiConverterUInt64.read(from: &buf), - bytesWritten: FfiConverterUInt64.read(from: &buf), - resyncDistanceEntries: FfiConverterUInt64.read(from: &buf), - resyncDistanceNodes: FfiConverterUInt64.read(from: &buf), - usedKeyStableFastPath: FfiConverterBool.read(from: &buf), + inputMutations: FfiConverterUInt64.read(from: &buf), + effectiveMutations: FfiConverterUInt64.read(from: &buf), + entriesStreamed: FfiConverterUInt64.read(from: &buf), + nodesRead: FfiConverterUInt64.read(from: &buf), + nodesWritten: FfiConverterUInt64.read(from: &buf), + nodesReused: FfiConverterUInt64.read(from: &buf), + bytesRead: FfiConverterUInt64.read(from: &buf), + bytesWritten: FfiConverterUInt64.read(from: &buf), + resyncDistanceEntries: FfiConverterUInt64.read(from: &buf), + resyncDistanceNodes: FfiConverterUInt64.read(from: &buf), + usedKeyStableFastPath: FfiConverterBool.read(from: &buf), usedBatchedValueUpdatePath: FfiConverterBool.read(from: &buf), parallelWidth: FfiConverterUInt64.read(from: &buf), parallelTasks: FfiConverterUInt64.read(from: &buf), @@ -24543,7 +25198,7 @@ public func FfiConverterTypeWriteStatsRecord_lower(_ value: WriteStatsRecord) -> // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. public enum AdaptiveQualityRecord: Equatable, Hashable { - + case fast case balanced case highRecall @@ -24567,32 +25222,32 @@ public struct FfiConverterTypeAdaptiveQualityRecord: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> AdaptiveQualityRecord { let variant: Int32 = try readInt(&buf) switch variant { - + case 1: return .fast - + case 2: return .balanced - + case 3: return .highRecall - + default: throw UniffiInternalError.unexpectedEnumCase } } public static func write(_ value: AdaptiveQualityRecord, into buf: inout [UInt8]) { switch value { - - + + case .fast: writeInt(&buf, Int32(1)) - - + + case .balanced: writeInt(&buf, Int32(2)) - - + + case .highRecall: writeInt(&buf, Int32(3)) - + } } } @@ -24617,10 +25272,11 @@ public func FfiConverterTypeAdaptiveQualityRecord_lower(_ value: AdaptiveQuality // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. public enum CatalogAcceleratorKindRecord: Equatable, Hashable { - + case hnsw case productQuantized case composite + case turboQuantized @@ -24641,32 +25297,38 @@ public struct FfiConverterTypeCatalogAcceleratorKindRecord: FfiConverterRustBuff public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> CatalogAcceleratorKindRecord { let variant: Int32 = try readInt(&buf) switch variant { - + case 1: return .hnsw - + case 2: return .productQuantized - + case 3: return .composite - + + case 4: return .turboQuantized + default: throw UniffiInternalError.unexpectedEnumCase } } public static func write(_ value: CatalogAcceleratorKindRecord, into buf: inout [UInt8]) { switch value { - - + + case .hnsw: writeInt(&buf, Int32(1)) - - + + case .productQuantized: writeInt(&buf, Int32(2)) - - + + case .composite: writeInt(&buf, Int32(3)) - + + + case .turboQuantized: + writeInt(&buf, Int32(4)) + } } } @@ -24691,9 +25353,10 @@ public func FfiConverterTypeCatalogAcceleratorKindRecord_lower(_ value: CatalogA // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. public enum CompositeBaseKindRecord: Equatable, Hashable { - + case hnsw case productQuantized + case turboQuantized @@ -24714,26 +25377,32 @@ public struct FfiConverterTypeCompositeBaseKindRecord: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> CompositeBaseKindRecord { let variant: Int32 = try readInt(&buf) switch variant { - + case 1: return .hnsw - + case 2: return .productQuantized - + + case 3: return .turboQuantized + default: throw UniffiInternalError.unexpectedEnumCase } } public static func write(_ value: CompositeBaseKindRecord, into buf: inout [UInt8]) { switch value { - - + + case .hnsw: writeInt(&buf, Int32(1)) - - + + case .productQuantized: writeInt(&buf, Int32(2)) - + + + case .turboQuantized: + writeInt(&buf, Int32(3)) + } } } @@ -24758,11 +25427,12 @@ public func FfiConverterTypeCompositeBaseKindRecord_lower(_ value: CompositeBase // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. public enum CompositeBuildOrRebuildKindRecord: Equatable, Hashable { - + case composite case noAcceleratorRequired case hnswRebuilt case productQuantizedRebuilt + case turboQuantizedRebuilt @@ -24783,38 +25453,44 @@ public struct FfiConverterTypeCompositeBuildOrRebuildKindRecord: FfiConverterRus public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> CompositeBuildOrRebuildKindRecord { let variant: Int32 = try readInt(&buf) switch variant { - + case 1: return .composite - + case 2: return .noAcceleratorRequired - + case 3: return .hnswRebuilt - + case 4: return .productQuantizedRebuilt - + + case 5: return .turboQuantizedRebuilt + default: throw UniffiInternalError.unexpectedEnumCase } } public static func write(_ value: CompositeBuildOrRebuildKindRecord, into buf: inout [UInt8]) { switch value { - - + + case .composite: writeInt(&buf, Int32(1)) - - + + case .noAcceleratorRequired: writeInt(&buf, Int32(2)) - - + + case .hnswRebuilt: writeInt(&buf, Int32(3)) - - + + case .productQuantizedRebuilt: writeInt(&buf, Int32(4)) - + + + case .turboQuantizedRebuilt: + writeInt(&buf, Int32(5)) + } } } @@ -24839,7 +25515,7 @@ public func FfiConverterTypeCompositeBuildOrRebuildKindRecord_lower(_ value: Com // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. public enum ContentObjectKindRecord: Equatable, Hashable { - + case orderedNode case proximityDescriptor case proximityNode @@ -24852,6 +25528,7 @@ public enum ContentObjectKindRecord: Equatable, Hashable { case hnswPage case compositeAccelerator case acceleratorCatalog + case turboQuantization @@ -24872,86 +25549,92 @@ public struct FfiConverterTypeContentObjectKindRecord: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ContentObjectKindRecord { let variant: Int32 = try readInt(&buf) switch variant { - + case 1: return .orderedNode - + case 2: return .proximityDescriptor - + case 3: return .proximityNode - + case 4: return .overflowDirectory - + case 5: return .overflowPage - + case 6: return .externalVector - + case 7: return .scalarQuantization - + case 8: return .productQuantization - + case 9: return .hnswManifest - + case 10: return .hnswPage - + case 11: return .compositeAccelerator - + case 12: return .acceleratorCatalog - + + case 13: return .turboQuantization + default: throw UniffiInternalError.unexpectedEnumCase } } public static func write(_ value: ContentObjectKindRecord, into buf: inout [UInt8]) { switch value { - - + + case .orderedNode: writeInt(&buf, Int32(1)) - - + + case .proximityDescriptor: writeInt(&buf, Int32(2)) - - + + case .proximityNode: writeInt(&buf, Int32(3)) - - + + case .overflowDirectory: writeInt(&buf, Int32(4)) - - + + case .overflowPage: writeInt(&buf, Int32(5)) - - + + case .externalVector: writeInt(&buf, Int32(6)) - - + + case .scalarQuantization: writeInt(&buf, Int32(7)) - - + + case .productQuantization: writeInt(&buf, Int32(8)) - - + + case .hnswManifest: writeInt(&buf, Int32(9)) - - + + case .hnswPage: writeInt(&buf, Int32(10)) - - + + case .compositeAccelerator: writeInt(&buf, Int32(11)) - - + + case .acceleratorCatalog: writeInt(&buf, Int32(12)) - + + + case .turboQuantization: + writeInt(&buf, Int32(13)) + } } } @@ -24976,7 +25659,7 @@ public func FfiConverterTypeContentObjectKindRecord_lower(_ value: ContentObject // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. public enum CrdtDeletePolicyKind: Equatable, Hashable { - + case deleteWins case updateWins @@ -24999,26 +25682,26 @@ public struct FfiConverterTypeCrdtDeletePolicyKind: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> CrdtDeletePolicyKind { let variant: Int32 = try readInt(&buf) switch variant { - + case 1: return .deleteWins - + case 2: return .updateWins - + default: throw UniffiInternalError.unexpectedEnumCase } } public static func write(_ value: CrdtDeletePolicyKind, into buf: inout [UInt8]) { switch value { - - + + case .deleteWins: writeInt(&buf, Int32(1)) - - + + case .updateWins: writeInt(&buf, Int32(2)) - + } } } @@ -25043,7 +25726,7 @@ public func FfiConverterTypeCrdtDeletePolicyKind_lower(_ value: CrdtDeletePolicy // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. public enum CrdtMergeStrategyKind: Equatable, Hashable { - + case lastWriterWins case multiValue @@ -25066,26 +25749,26 @@ public struct FfiConverterTypeCrdtMergeStrategyKind: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> CrdtMergeStrategyKind { let variant: Int32 = try readInt(&buf) switch variant { - + case 1: return .lastWriterWins - + case 2: return .multiValue - + default: throw UniffiInternalError.unexpectedEnumCase } } public static func write(_ value: CrdtMergeStrategyKind, into buf: inout [UInt8]) { switch value { - - + + case .lastWriterWins: writeInt(&buf, Int32(1)) - - + + case .multiValue: writeInt(&buf, Int32(2)) - + } } } @@ -25110,7 +25793,7 @@ public func FfiConverterTypeCrdtMergeStrategyKind_lower(_ value: CrdtMergeStrate // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. public enum CrdtResolutionKind: Equatable, Hashable { - + case value case delete @@ -25133,26 +25816,26 @@ public struct FfiConverterTypeCrdtResolutionKind: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> CrdtResolutionKind { let variant: Int32 = try readInt(&buf) switch variant { - + case 1: return .value - + case 2: return .delete - + default: throw UniffiInternalError.unexpectedEnumCase } } public static func write(_ value: CrdtResolutionKind, into buf: inout [UInt8]) { switch value { - - + + case .value: writeInt(&buf, Int32(1)) - - + + case .delete: writeInt(&buf, Int32(2)) - + } } } @@ -25177,7 +25860,7 @@ public func FfiConverterTypeCrdtResolutionKind_lower(_ value: CrdtResolutionKind // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. public enum DiffKind: Equatable, Hashable { - + case added case removed case changed @@ -25201,32 +25884,32 @@ public struct FfiConverterTypeDiffKind: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> DiffKind { let variant: Int32 = try readInt(&buf) switch variant { - + case 1: return .added - + case 2: return .removed - + case 3: return .changed - + default: throw UniffiInternalError.unexpectedEnumCase } } public static func write(_ value: DiffKind, into buf: inout [UInt8]) { switch value { - - + + case .added: writeInt(&buf, Int32(1)) - - + + case .removed: writeInt(&buf, Int32(2)) - - + + case .changed: writeInt(&buf, Int32(3)) - + } } } @@ -25251,7 +25934,7 @@ public func FfiConverterTypeDiffKind_lower(_ value: DiffKind) -> RustBuffer { // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. public enum DistanceMetricRecord: Equatable, Hashable { - + case l2Squared case cosine case innerProduct @@ -25275,32 +25958,32 @@ public struct FfiConverterTypeDistanceMetricRecord: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> DistanceMetricRecord { let variant: Int32 = try readInt(&buf) switch variant { - + case 1: return .l2Squared - + case 2: return .cosine - + case 3: return .innerProduct - + default: throw UniffiInternalError.unexpectedEnumCase } } public static func write(_ value: DistanceMetricRecord, into buf: inout [UInt8]) { switch value { - - + + case .l2Squared: writeInt(&buf, Int32(1)) - - + + case .cosine: writeInt(&buf, Int32(2)) - - + + case .innerProduct: writeInt(&buf, Int32(3)) - + } } } @@ -25325,7 +26008,7 @@ public func FfiConverterTypeDistanceMetricRecord_lower(_ value: DistanceMetricRe // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. public enum EncodingKind: Equatable, Hashable { - + case raw case cbor case json @@ -25350,38 +26033,38 @@ public struct FfiConverterTypeEncodingKind: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> EncodingKind { let variant: Int32 = try readInt(&buf) switch variant { - + case 1: return .raw - + case 2: return .cbor - + case 3: return .json - + case 4: return .custom - + default: throw UniffiInternalError.unexpectedEnumCase } } public static func write(_ value: EncodingKind, into buf: inout [UInt8]) { switch value { - - + + case .raw: writeInt(&buf, Int32(1)) - - + + case .cbor: writeInt(&buf, Int32(2)) - - + + case .json: writeInt(&buf, Int32(3)) - - + + case .custom: writeInt(&buf, Int32(4)) - + } } } @@ -25406,7 +26089,7 @@ public func FfiConverterTypeEncodingKind_lower(_ value: EncodingKind) -> RustBuf // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. public enum FullRebuildReasonKindRecord: Equatable, Hashable { - + case deltaRecords case shadowRecords case deltaRatio @@ -25431,38 +26114,38 @@ public struct FfiConverterTypeFullRebuildReasonKindRecord: FfiConverterRustBuffe public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> FullRebuildReasonKindRecord { let variant: Int32 = try readInt(&buf) switch variant { - + case 1: return .deltaRecords - + case 2: return .shadowRecords - + case 3: return .deltaRatio - + case 4: return .shadowRatio - + default: throw UniffiInternalError.unexpectedEnumCase } } public static func write(_ value: FullRebuildReasonKindRecord, into buf: inout [UInt8]) { switch value { - - + + case .deltaRecords: writeInt(&buf, Int32(1)) - - + + case .shadowRecords: writeInt(&buf, Int32(2)) - - + + case .deltaRatio: writeInt(&buf, Int32(3)) - - + + case .shadowRatio: writeInt(&buf, Int32(4)) - + } } } @@ -25487,7 +26170,7 @@ public func FfiConverterTypeFullRebuildReasonKindRecord_lower(_ value: FullRebui // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. public enum HnswRoutingVectorEncodingRecord: Equatable, Hashable { - + case fullF32 @@ -25509,20 +26192,20 @@ public struct FfiConverterTypeHnswRoutingVectorEncodingRecord: FfiConverterRustB public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> HnswRoutingVectorEncodingRecord { let variant: Int32 = try readInt(&buf) switch variant { - + case 1: return .fullF32 - + default: throw UniffiInternalError.unexpectedEnumCase } } public static func write(_ value: HnswRoutingVectorEncodingRecord, into buf: inout [UInt8]) { switch value { - - + + case .fullF32: writeInt(&buf, Int32(1)) - + } } } @@ -25547,7 +26230,7 @@ public func FfiConverterTypeHnswRoutingVectorEncodingRecord_lower(_ value: HnswR // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. public enum IndexProjectionRecord: Equatable, Hashable { - + case keysOnly case include case all @@ -25571,32 +26254,32 @@ public struct FfiConverterTypeIndexProjectionRecord: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> IndexProjectionRecord { let variant: Int32 = try readInt(&buf) switch variant { - + case 1: return .keysOnly - + case 2: return .include - + case 3: return .all - + default: throw UniffiInternalError.unexpectedEnumCase } } public static func write(_ value: IndexProjectionRecord, into buf: inout [UInt8]) { switch value { - - + + case .keysOnly: writeInt(&buf, Int32(1)) - - + + case .include: writeInt(&buf, Int32(2)) - - + + case .all: writeInt(&buf, Int32(3)) - + } } } @@ -25621,7 +26304,7 @@ public func FfiConverterTypeIndexProjectionRecord_lower(_ value: IndexProjection // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. public enum IndexedUpdateKind: Equatable, Hashable { - + case applied case unchanged case conflict @@ -25645,32 +26328,32 @@ public struct FfiConverterTypeIndexedUpdateKind: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> IndexedUpdateKind { let variant: Int32 = try readInt(&buf) switch variant { - + case 1: return .applied - + case 2: return .unchanged - + case 3: return .conflict - + default: throw UniffiInternalError.unexpectedEnumCase } } public static func write(_ value: IndexedUpdateKind, into buf: inout [UInt8]) { switch value { - - + + case .applied: writeInt(&buf, Int32(1)) - - + + case .unchanged: writeInt(&buf, Int32(2)) - - + + case .conflict: writeInt(&buf, Int32(3)) - + } } } @@ -25695,7 +26378,7 @@ public func FfiConverterTypeIndexedUpdateKind_lower(_ value: IndexedUpdateKind) // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. public enum MapUpdateKind: Equatable, Hashable { - + case applied case unchanged case conflict @@ -25719,32 +26402,32 @@ public struct FfiConverterTypeMapUpdateKind: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> MapUpdateKind { let variant: Int32 = try readInt(&buf) switch variant { - + case 1: return .applied - + case 2: return .unchanged - + case 3: return .conflict - + default: throw UniffiInternalError.unexpectedEnumCase } } public static func write(_ value: MapUpdateKind, into buf: inout [UInt8]) { switch value { - - + + case .applied: writeInt(&buf, Int32(1)) - - + + case .unchanged: writeInt(&buf, Int32(2)) - - + + case .conflict: writeInt(&buf, Int32(3)) - + } } } @@ -25769,7 +26452,7 @@ public func FfiConverterTypeMapUpdateKind_lower(_ value: MapUpdateKind) -> RustB // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. public enum MergeFallbackReasonKind: Equatable, Hashable { - + case missingRoot case shapeMismatch case nodeLengthMismatch @@ -25796,50 +26479,50 @@ public struct FfiConverterTypeMergeFallbackReasonKind: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> MergeFallbackReasonKind { let variant: Int32 = try readInt(&buf) switch variant { - + case 1: return .missingRoot - + case 2: return .shapeMismatch - + case 3: return .nodeLengthMismatch - + case 4: return .childFallback - + case 5: return .deleteResolution - + case 6: return .diffBatch - + default: throw UniffiInternalError.unexpectedEnumCase } } public static func write(_ value: MergeFallbackReasonKind, into buf: inout [UInt8]) { switch value { - - + + case .missingRoot: writeInt(&buf, Int32(1)) - - + + case .shapeMismatch: writeInt(&buf, Int32(2)) - - + + case .nodeLengthMismatch: writeInt(&buf, Int32(3)) - - + + case .childFallback: writeInt(&buf, Int32(4)) - - + + case .deleteResolution: writeInt(&buf, Int32(5)) - - + + case .diffBatch: writeInt(&buf, Int32(6)) - + } } } @@ -25864,7 +26547,7 @@ public func FfiConverterTypeMergeFallbackReasonKind_lower(_ value: MergeFallback // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. public enum MergeFastPathKind: Equatable, Hashable { - + case branchesEqual case leftUnchanged case rightUnchanged @@ -25888,32 +26571,32 @@ public struct FfiConverterTypeMergeFastPathKind: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> MergeFastPathKind { let variant: Int32 = try readInt(&buf) switch variant { - + case 1: return .branchesEqual - + case 2: return .leftUnchanged - + case 3: return .rightUnchanged - + default: throw UniffiInternalError.unexpectedEnumCase } } public static func write(_ value: MergeFastPathKind, into buf: inout [UInt8]) { switch value { - - + + case .branchesEqual: writeInt(&buf, Int32(1)) - - + + case .leftUnchanged: writeInt(&buf, Int32(2)) - - + + case .rightUnchanged: writeInt(&buf, Int32(3)) - + } } } @@ -25938,7 +26621,7 @@ public func FfiConverterTypeMergeFastPathKind_lower(_ value: MergeFastPathKind) // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. public enum MergeReuseReasonKind: Equatable, Hashable { - + case branchesEqual case leftUnchanged case rightUnchanged @@ -25965,50 +26648,50 @@ public struct FfiConverterTypeMergeReuseReasonKind: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> MergeReuseReasonKind { let variant: Int32 = try readInt(&buf) switch variant { - + case 1: return .branchesEqual - + case 2: return .leftUnchanged - + case 3: return .rightUnchanged - + case 4: return .unchangedAfterMerge - + case 5: return .matchesLeft - + case 6: return .matchesRight - + default: throw UniffiInternalError.unexpectedEnumCase } } public static func write(_ value: MergeReuseReasonKind, into buf: inout [UInt8]) { switch value { - - + + case .branchesEqual: writeInt(&buf, Int32(1)) - - + + case .leftUnchanged: writeInt(&buf, Int32(2)) - - + + case .rightUnchanged: writeInt(&buf, Int32(3)) - - + + case .unchangedAfterMerge: writeInt(&buf, Int32(4)) - - + + case .matchesLeft: writeInt(&buf, Int32(5)) - - + + case .matchesRight: writeInt(&buf, Int32(6)) - + } } } @@ -26033,7 +26716,7 @@ public func FfiConverterTypeMergeReuseReasonKind_lower(_ value: MergeReuseReason // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. public enum MergeTraceEventKind: Equatable, Hashable { - + case fastPath case structuralMergeStarted case reusedSubtree @@ -26062,62 +26745,62 @@ public struct FfiConverterTypeMergeTraceEventKind: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> MergeTraceEventKind { let variant: Int32 = try readInt(&buf) switch variant { - + case 1: return .fastPath - + case 2: return .structuralMergeStarted - + case 3: return .reusedSubtree - + case 4: return .rewrittenNode - + case 5: return .resolverCalled - + case 6: return .fallback - + case 7: return .diffTraversal - + case 8: return .batchMerge - + default: throw UniffiInternalError.unexpectedEnumCase } } public static func write(_ value: MergeTraceEventKind, into buf: inout [UInt8]) { switch value { - - + + case .fastPath: writeInt(&buf, Int32(1)) - - + + case .structuralMergeStarted: writeInt(&buf, Int32(2)) - - + + case .reusedSubtree: writeInt(&buf, Int32(3)) - - + + case .rewrittenNode: writeInt(&buf, Int32(4)) - - + + case .resolverCalled: writeInt(&buf, Int32(5)) - - + + case .fallback: writeInt(&buf, Int32(6)) - - + + case .diffTraversal: writeInt(&buf, Int32(7)) - - + + case .batchMerge: writeInt(&buf, Int32(8)) - + } } } @@ -26142,7 +26825,7 @@ public func FfiConverterTypeMergeTraceEventKind_lower(_ value: MergeTraceEventKi // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. public enum MergeTraceResolutionKind: Equatable, Hashable { - + case value case delete case unresolved @@ -26166,32 +26849,32 @@ public struct FfiConverterTypeMergeTraceResolutionKind: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> MergeTraceResolutionKind { let variant: Int32 = try readInt(&buf) switch variant { - + case 1: return .value - + case 2: return .delete - + case 3: return .unresolved - + default: throw UniffiInternalError.unexpectedEnumCase } } public static func write(_ value: MergeTraceResolutionKind, into buf: inout [UInt8]) { switch value { - - + + case .value: writeInt(&buf, Int32(1)) - - + + case .delete: writeInt(&buf, Int32(2)) - - + + case .unresolved: writeInt(&buf, Int32(3)) - + } } } @@ -26216,7 +26899,7 @@ public func FfiConverterTypeMergeTraceResolutionKind_lower(_ value: MergeTraceRe // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. public enum MergeTraceStageKind: Equatable, Hashable { - + case structural case batch @@ -26239,26 +26922,26 @@ public struct FfiConverterTypeMergeTraceStageKind: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> MergeTraceStageKind { let variant: Int32 = try readInt(&buf) switch variant { - + case 1: return .structural - + case 2: return .batch - + default: throw UniffiInternalError.unexpectedEnumCase } } public static func write(_ value: MergeTraceStageKind, into buf: inout [UInt8]) { switch value { - - + + case .structural: writeInt(&buf, Int32(1)) - - + + case .batch: writeInt(&buf, Int32(2)) - + } } } @@ -26283,7 +26966,7 @@ public func FfiConverterTypeMergeTraceStageKind_lower(_ value: MergeTraceStageKi // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. public enum MutationKind: Equatable, Hashable { - + case upsert case delete @@ -26306,26 +26989,26 @@ public struct FfiConverterTypeMutationKind: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> MutationKind { let variant: Int32 = try readInt(&buf) switch variant { - + case 1: return .upsert - + case 2: return .delete - + default: throw UniffiInternalError.unexpectedEnumCase } } public static func write(_ value: MutationKind, into buf: inout [UInt8]) { switch value { - - + + case .upsert: writeInt(&buf, Int32(1)) - - + + case .delete: writeInt(&buf, Int32(2)) - + } } } @@ -26350,7 +27033,7 @@ public func FfiConverterTypeMutationKind_lower(_ value: MutationKind) -> RustBuf // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. public enum NamedRootRetentionKind: Equatable, Hashable { - + case all case exact case prefix @@ -26376,44 +27059,44 @@ public struct FfiConverterTypeNamedRootRetentionKind: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> NamedRootRetentionKind { let variant: Int32 = try readInt(&buf) switch variant { - + case 1: return .all - + case 2: return .exact - + case 3: return .prefix - + case 4: return .newestByName - + case 5: return .updatedSince - + default: throw UniffiInternalError.unexpectedEnumCase } } public static func write(_ value: NamedRootRetentionKind, into buf: inout [UInt8]) { switch value { - - + + case .all: writeInt(&buf, Int32(1)) - - + + case .exact: writeInt(&buf, Int32(2)) - - + + case .prefix: writeInt(&buf, Int32(3)) - - + + case .newestByName: writeInt(&buf, Int32(4)) - - + + case .updatedSince: writeInt(&buf, Int32(5)) - + } } } @@ -26437,8 +27120,8 @@ public func FfiConverterTypeNamedRootRetentionKind_lower(_ value: NamedRootReten public enum ProllyBindingError: Swift.Error, Equatable, Hashable, Foundation.LocalizedError { - - + + case InvalidArgument(reason: String ) case InvalidCid(reason: String @@ -26458,15 +27141,15 @@ public enum ProllyBindingError: Swift.Error, Equatable, Hashable, Foundation.Loc case Internal(reason: String ) - - - + + + public var errorDescription: String? { String(reflecting: self) } - + } #if compiler(>=6) @@ -26483,9 +27166,9 @@ public struct FfiConverterTypeProllyBindingError: FfiConverterRustBuffer { let variant: Int32 = try readInt(&buf) switch variant { - - + + case 1: return .InvalidArgument( reason: try FfiConverterString.read(from: &buf) ) @@ -26523,45 +27206,45 @@ public struct FfiConverterTypeProllyBindingError: FfiConverterRustBuffer { public static func write(_ value: ProllyBindingError, into buf: inout [UInt8]) { switch value { - - - + + + case let .InvalidArgument(reason): writeInt(&buf, Int32(1)) FfiConverterString.write(reason, into: &buf) - - + + case let .InvalidCid(reason): writeInt(&buf, Int32(2)) FfiConverterString.write(reason, into: &buf) - - + + case let .InvalidNode(reason): writeInt(&buf, Int32(3)) FfiConverterString.write(reason, into: &buf) - - + + case let .NotFound(reason): writeInt(&buf, Int32(4)) FfiConverterString.write(reason, into: &buf) - - + + case let .Conflict(reason): writeInt(&buf, Int32(5)) FfiConverterString.write(reason, into: &buf) - - + + case let .Store(reason): writeInt(&buf, Int32(6)) FfiConverterString.write(reason, into: &buf) - - + + case let .Serialization(reason): writeInt(&buf, Int32(7)) FfiConverterString.write(reason, into: &buf) - - + + case let .Index(code,retryAdvice,reason): writeInt(&buf, Int32(8)) FfiConverterString.write(code, into: &buf) @@ -26572,7 +27255,7 @@ public struct FfiConverterTypeProllyBindingError: FfiConverterRustBuffer { case let .Internal(reason): writeInt(&buf, Int32(9)) FfiConverterString.write(reason, into: &buf) - + } } } @@ -26596,7 +27279,7 @@ public func FfiConverterTypeProllyBindingError_lower(_ value: ProllyBindingError // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. public enum ProximityFilterKind: Equatable, Hashable { - + case all case keyRange case prefix @@ -26621,38 +27304,38 @@ public struct FfiConverterTypeProximityFilterKind: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ProximityFilterKind { let variant: Int32 = try readInt(&buf) switch variant { - + case 1: return .all - + case 2: return .keyRange - + case 3: return .prefix - + case 4: return .eligibleKeys - + default: throw UniffiInternalError.unexpectedEnumCase } } public static func write(_ value: ProximityFilterKind, into buf: inout [UInt8]) { switch value { - - + + case .all: writeInt(&buf, Int32(1)) - - + + case .keyRange: writeInt(&buf, Int32(2)) - - + + case .prefix: writeInt(&buf, Int32(3)) - - + + case .eligibleKeys: writeInt(&buf, Int32(4)) - + } } } @@ -26677,7 +27360,7 @@ public func FfiConverterTypeProximityFilterKind_lower(_ value: ProximityFilterKi // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. public enum ProximitySearchClaimKindRecord: Equatable, Hashable { - + case exactL2Optimal case honestExecution @@ -26700,26 +27383,26 @@ public struct FfiConverterTypeProximitySearchClaimKindRecord: FfiConverterRustBu public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ProximitySearchClaimKindRecord { let variant: Int32 = try readInt(&buf) switch variant { - + case 1: return .exactL2Optimal - + case 2: return .honestExecution - + default: throw UniffiInternalError.unexpectedEnumCase } } public static func write(_ value: ProximitySearchClaimKindRecord, into buf: inout [UInt8]) { switch value { - - + + case .exactL2Optimal: writeInt(&buf, Int32(1)) - - + + case .honestExecution: writeInt(&buf, Int32(2)) - + } } } @@ -26744,7 +27427,7 @@ public func FfiConverterTypeProximitySearchClaimKindRecord_lower(_ value: Proxim // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. public enum QueryKernelRecord: Equatable, Hashable { - + case scalarDeterministic case simdDeterministic case autoDeterministic @@ -26768,32 +27451,32 @@ public struct FfiConverterTypeQueryKernelRecord: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> QueryKernelRecord { let variant: Int32 = try readInt(&buf) switch variant { - + case 1: return .scalarDeterministic - + case 2: return .simdDeterministic - + case 3: return .autoDeterministic - + default: throw UniffiInternalError.unexpectedEnumCase } } public static func write(_ value: QueryKernelRecord, into buf: inout [UInt8]) { switch value { - - + + case .scalarDeterministic: writeInt(&buf, Int32(1)) - - + + case .simdDeterministic: writeInt(&buf, Int32(2)) - - + + case .autoDeterministic: writeInt(&buf, Int32(3)) - + } } } @@ -26818,7 +27501,7 @@ public func FfiConverterTypeQueryKernelRecord_lower(_ value: QueryKernelRecord) // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. public enum ResolutionKind: Equatable, Hashable { - + case value case delete case unresolved @@ -26842,32 +27525,32 @@ public struct FfiConverterTypeResolutionKind: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ResolutionKind { let variant: Int32 = try readInt(&buf) switch variant { - + case 1: return .value - + case 2: return .delete - + case 3: return .unresolved - + default: throw UniffiInternalError.unexpectedEnumCase } } public static func write(_ value: ResolutionKind, into buf: inout [UInt8]) { switch value { - - + + case .value: writeInt(&buf, Int32(1)) - - + + case .delete: writeInt(&buf, Int32(2)) - - + + case .unresolved: writeInt(&buf, Int32(3)) - + } } } @@ -26892,12 +27575,13 @@ public func FfiConverterTypeResolutionKind_lower(_ value: ResolutionKind) -> Rus // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. public enum SearchBackendRecord: Equatable, Hashable { - + case native case productQuantized case hnsw case composite case auto + case turboQuantized @@ -26918,44 +27602,50 @@ public struct FfiConverterTypeSearchBackendRecord: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> SearchBackendRecord { let variant: Int32 = try readInt(&buf) switch variant { - + case 1: return .native - + case 2: return .productQuantized - + case 3: return .hnsw - + case 4: return .composite - + case 5: return .auto - + + case 6: return .turboQuantized + default: throw UniffiInternalError.unexpectedEnumCase } } public static func write(_ value: SearchBackendRecord, into buf: inout [UInt8]) { switch value { - - + + case .native: writeInt(&buf, Int32(1)) - - + + case .productQuantized: writeInt(&buf, Int32(2)) - - + + case .hnsw: writeInt(&buf, Int32(3)) - - + + case .composite: writeInt(&buf, Int32(4)) - - + + case .auto: writeInt(&buf, Int32(5)) - + + + case .turboQuantized: + writeInt(&buf, Int32(6)) + } } } @@ -26980,7 +27670,7 @@ public func FfiConverterTypeSearchBackendRecord_lower(_ value: SearchBackendReco // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. public enum SearchCompletionRecord: Equatable, Hashable { - + case exact case approximatePolicySatisfied case budgetExhausted @@ -27006,44 +27696,44 @@ public struct FfiConverterTypeSearchCompletionRecord: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> SearchCompletionRecord { let variant: Int32 = try readInt(&buf) switch variant { - + case 1: return .exact - + case 2: return .approximatePolicySatisfied - + case 3: return .budgetExhausted - + case 4: return .cancelled - + case 5: return .deadlineExceeded - + default: throw UniffiInternalError.unexpectedEnumCase } } public static func write(_ value: SearchCompletionRecord, into buf: inout [UInt8]) { switch value { - - + + case .exact: writeInt(&buf, Int32(1)) - - + + case .approximatePolicySatisfied: writeInt(&buf, Int32(2)) - - + + case .budgetExhausted: writeInt(&buf, Int32(3)) - - + + case .cancelled: writeInt(&buf, Int32(4)) - - + + case .deadlineExceeded: writeInt(&buf, Int32(5)) - + } } } @@ -27068,7 +27758,7 @@ public func FfiConverterTypeSearchCompletionRecord_lower(_ value: SearchCompleti // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. public enum SearchPolicyKind: Equatable, Hashable { - + case exact case fixedBudget case adaptive @@ -27092,32 +27782,32 @@ public struct FfiConverterTypeSearchPolicyKind: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> SearchPolicyKind { let variant: Int32 = try readInt(&buf) switch variant { - + case 1: return .exact - + case 2: return .fixedBudget - + case 3: return .adaptive - + default: throw UniffiInternalError.unexpectedEnumCase } } public static func write(_ value: SearchPolicyKind, into buf: inout [UInt8]) { switch value { - - + + case .exact: writeInt(&buf, Int32(1)) - - + + case .fixedBudget: writeInt(&buf, Int32(2)) - - + + case .adaptive: writeInt(&buf, Int32(3)) - + } } } @@ -27142,7 +27832,7 @@ public func FfiConverterTypeSearchPolicyKind_lower(_ value: SearchPolicyKind) -> // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. public enum SnapshotNamespaceKind: Equatable, Hashable { - + case branch case tag case checkpoint @@ -27167,38 +27857,38 @@ public struct FfiConverterTypeSnapshotNamespaceKind: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> SnapshotNamespaceKind { let variant: Int32 = try readInt(&buf) switch variant { - + case 1: return .branch - + case 2: return .tag - + case 3: return .checkpoint - + case 4: return .custom - + default: throw UniffiInternalError.unexpectedEnumCase } } public static func write(_ value: SnapshotNamespaceKind, into buf: inout [UInt8]) { switch value { - - + + case .branch: writeInt(&buf, Int32(1)) - - + + case .tag: writeInt(&buf, Int32(2)) - - + + case .checkpoint: writeInt(&buf, Int32(3)) - - + + case .custom: writeInt(&buf, Int32(4)) - + } } } @@ -27223,7 +27913,7 @@ public func FfiConverterTypeSnapshotNamespaceKind_lower(_ value: SnapshotNamespa // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. public enum StructuralDiffMarkerKind: Equatable, Hashable { - + case compare case added case removed @@ -27247,32 +27937,32 @@ public struct FfiConverterTypeStructuralDiffMarkerKind: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> StructuralDiffMarkerKind { let variant: Int32 = try readInt(&buf) switch variant { - + case 1: return .compare - + case 2: return .added - + case 3: return .removed - + default: throw UniffiInternalError.unexpectedEnumCase } } public static func write(_ value: StructuralDiffMarkerKind, into buf: inout [UInt8]) { switch value { - - + + case .compare: writeInt(&buf, Int32(1)) - - + + case .added: writeInt(&buf, Int32(2)) - - + + case .removed: writeInt(&buf, Int32(3)) - + } } } @@ -27297,7 +27987,7 @@ public func FfiConverterTypeStructuralDiffMarkerKind_lower(_ value: StructuralDi // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. public enum TreeDebugNodeStatusKind: Equatable, Hashable { - + case shared case leftOnly case rightOnly @@ -27321,32 +28011,32 @@ public struct FfiConverterTypeTreeDebugNodeStatusKind: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> TreeDebugNodeStatusKind { let variant: Int32 = try readInt(&buf) switch variant { - + case 1: return .shared - + case 2: return .leftOnly - + case 3: return .rightOnly - + default: throw UniffiInternalError.unexpectedEnumCase } } public static func write(_ value: TreeDebugNodeStatusKind, into buf: inout [UInt8]) { switch value { - - + + case .shared: writeInt(&buf, Int32(1)) - - + + case .leftOnly: writeInt(&buf, Int32(2)) - - + + case .rightOnly: writeInt(&buf, Int32(3)) - + } } } @@ -27371,7 +28061,7 @@ public func FfiConverterTypeTreeDebugNodeStatusKind_lower(_ value: TreeDebugNode // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. public enum ValueRefKind: Equatable, Hashable { - + case inline case blob @@ -27394,26 +28084,26 @@ public struct FfiConverterTypeValueRefKind: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ValueRefKind { let variant: Int32 = try readInt(&buf) switch variant { - + case 1: return .inline - + case 2: return .blob - + default: throw UniffiInternalError.unexpectedEnumCase } } public static func write(_ value: ValueRefKind, into buf: inout [UInt8]) { switch value { - - + + case .inline: writeInt(&buf, Int32(1)) - - + + case .blob: writeInt(&buf, Int32(2)) - + } } } @@ -27722,6 +28412,30 @@ fileprivate struct FfiConverterOptionTypeBindingProximitySearchRuntime: FfiConve } } +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +fileprivate struct FfiConverterOptionTypeBindingTurboQuantizer: FfiConverterRustBuffer { + typealias SwiftType = BindingTurboQuantizer? + + public static func write(_ value: SwiftType, into buf: inout [UInt8]) { + guard let value = value else { + writeInt(&buf, Int8(0)) + return + } + writeInt(&buf, Int8(1)) + FfiConverterTypeBindingTurboQuantizer.write(value, into: &buf) + } + + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> SwiftType { + switch try readInt(&buf) as Int8 { + case 0: return nil + case 1: return try FfiConverterTypeBindingTurboQuantizer.read(from: &buf) + default: throw UniffiInternalError.unexpectedOptionalTag + } + } +} + #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -28346,6 +29060,30 @@ fileprivate struct FfiConverterOptionTypeTreeRecord: FfiConverterRustBuffer { } } +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +fileprivate struct FfiConverterOptionTypeTurboQuantizationBuildStatsRecord: FfiConverterRustBuffer { + typealias SwiftType = TurboQuantizationBuildStatsRecord? + + public static func write(_ value: SwiftType, into buf: inout [UInt8]) { + guard let value = value else { + writeInt(&buf, Int8(0)) + return + } + writeInt(&buf, Int8(1)) + FfiConverterTypeTurboQuantizationBuildStatsRecord.write(value, into: &buf) + } + + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> SwiftType { + switch try readInt(&buf) as Int8 { + case 0: return nil + case 1: return try FfiConverterTypeTurboQuantizationBuildStatsRecord.read(from: &buf) + default: throw UniffiInternalError.unexpectedOptionalTag + } + } +} + #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -30764,6 +31502,18 @@ public func defaultProximitySearchRuntimePolicy() -> ProximitySearchRuntimePolic ) }) } +public func defaultTurboquantBuildLimits() -> TurboQuantizationBuildLimitsRecord { + return try! FfiConverterTypeTurboQuantizationBuildLimitsRecord_lift(try! rustCall() { + uniffi_prolly_bindings_fn_func_default_turboquant_build_limits($0 + ) +}) +} +public func defaultTurboquantConfig() -> TurboQuantizationConfigRecord { + return try! FfiConverterTypeTurboQuantizationConfigRecord_lift(try! rustCall() { + uniffi_prolly_bindings_fn_func_default_turboquant_config($0 + ) +}) +} public func exactProximitySearchRequest(query: [Float], k: UInt64) -> ProximitySearchRequestRecord { return try! FfiConverterTypeProximitySearchRequestRecord_lift(try! rustCall() { uniffi_prolly_bindings_fn_func_exact_proximity_search_request( @@ -31214,6 +31964,12 @@ private let initializationResult: InitializationResult = { if (uniffi_prolly_bindings_checksum_func_default_proximity_search_runtime_policy() != 8352) { return InitializationResult.apiChecksumMismatch } + if (uniffi_prolly_bindings_checksum_func_default_turboquant_build_limits() != 16284) { + return InitializationResult.apiChecksumMismatch + } + if (uniffi_prolly_bindings_checksum_func_default_turboquant_config() != 37586) { + return InitializationResult.apiChecksumMismatch + } if (uniffi_prolly_bindings_checksum_func_exact_proximity_search_request() != 59384) { return InitializationResult.apiChecksumMismatch } @@ -32141,7 +32897,7 @@ private let initializationResult: InitializationResult = { if (uniffi_prolly_bindings_checksum_method_bindingproximitycancellationtoken_is_cancelled() != 33821) { return InitializationResult.apiChecksumMismatch } - if (uniffi_prolly_bindings_checksum_method_bindingproximitymap_build_accelerator_catalog() != 27841) { + if (uniffi_prolly_bindings_checksum_method_bindingproximitymap_build_accelerator_catalog() != 39929) { return InitializationResult.apiChecksumMismatch } if (uniffi_prolly_bindings_checksum_method_bindingproximitymap_build_composite_hnsw() != 60836) { @@ -32150,6 +32906,9 @@ private let initializationResult: InitializationResult = { if (uniffi_prolly_bindings_checksum_method_bindingproximitymap_build_composite_pq() != 36562) { return InitializationResult.apiChecksumMismatch } + if (uniffi_prolly_bindings_checksum_method_bindingproximitymap_build_composite_turboquant() != 32424) { + return InitializationResult.apiChecksumMismatch + } if (uniffi_prolly_bindings_checksum_method_bindingproximitymap_build_hnsw() != 15873) { return InitializationResult.apiChecksumMismatch } @@ -32159,9 +32918,15 @@ private let initializationResult: InitializationResult = { if (uniffi_prolly_bindings_checksum_method_bindingproximitymap_build_or_rebuild_composite_pq() != 27287) { return InitializationResult.apiChecksumMismatch } + if (uniffi_prolly_bindings_checksum_method_bindingproximitymap_build_or_rebuild_composite_turboquant() != 42282) { + return InitializationResult.apiChecksumMismatch + } if (uniffi_prolly_bindings_checksum_method_bindingproximitymap_build_pq() != 7075) { return InitializationResult.apiChecksumMismatch } + if (uniffi_prolly_bindings_checksum_method_bindingproximitymap_build_turboquant() != 51245) { + return InitializationResult.apiChecksumMismatch + } if (uniffi_prolly_bindings_checksum_method_bindingproximitymap_clear_content_cache() != 42240) { return InitializationResult.apiChecksumMismatch } @@ -32195,6 +32960,9 @@ private let initializationResult: InitializationResult = { if (uniffi_prolly_bindings_checksum_method_bindingproximitymap_load_pq() != 63976) { return InitializationResult.apiChecksumMismatch } + if (uniffi_prolly_bindings_checksum_method_bindingproximitymap_load_turboquant() != 12420) { + return InitializationResult.apiChecksumMismatch + } if (uniffi_prolly_bindings_checksum_method_bindingproximitymap_mutate() != 39394) { return InitializationResult.apiChecksumMismatch } @@ -32264,6 +33032,33 @@ private let initializationResult: InitializationResult = { if (uniffi_prolly_bindings_checksum_method_bindingproximitysearchruntime_stats() != 45140) { return InitializationResult.apiChecksumMismatch } + if (uniffi_prolly_bindings_checksum_method_bindingturboquantizer_config() != 59416) { + return InitializationResult.apiChecksumMismatch + } + if (uniffi_prolly_bindings_checksum_method_bindingturboquantizer_manifest() != 10558) { + return InitializationResult.apiChecksumMismatch + } + if (uniffi_prolly_bindings_checksum_method_bindingturboquantizer_prove_search() != 38682) { + return InitializationResult.apiChecksumMismatch + } + if (uniffi_prolly_bindings_checksum_method_bindingturboquantizer_quality() != 37928) { + return InitializationResult.apiChecksumMismatch + } + if (uniffi_prolly_bindings_checksum_method_bindingturboquantizer_search() != 30129) { + return InitializationResult.apiChecksumMismatch + } + if (uniffi_prolly_bindings_checksum_method_bindingturboquantizer_search_cancellable() != 39190) { + return InitializationResult.apiChecksumMismatch + } + if (uniffi_prolly_bindings_checksum_method_bindingturboquantizer_search_with_runtime() != 64232) { + return InitializationResult.apiChecksumMismatch + } + if (uniffi_prolly_bindings_checksum_method_bindingturboquantizer_source_descriptor() != 44910) { + return InitializationResult.apiChecksumMismatch + } + if (uniffi_prolly_bindings_checksum_method_bindingturboquantizer_verify() != 57510) { + return InitializationResult.apiChecksumMismatch + } if (uniffi_prolly_bindings_checksum_method_proximityrecordvisitorcallback_visit() != 31782) { return InitializationResult.apiChecksumMismatch } @@ -32758,4 +33553,4 @@ public func uniffiEnsureProllyBindingsInitialized() { } } -// swiftlint:enable all +// swiftlint:enable all \ No newline at end of file diff --git a/bindings/swift/Sources/ProllyAPI/PortableAPI.swift b/bindings/swift/Sources/ProllyAPI/PortableAPI.swift index cf91f646..678674b3 100644 --- a/bindings/swift/Sources/ProllyAPI/PortableAPI.swift +++ b/bindings/swift/Sources/ProllyAPI/PortableAPI.swift @@ -28,6 +28,11 @@ public struct ProductQuantizationBuildResult { public let stats: ProductQuantizationBuildStatsRecord } +public struct TurboQuantizationBuildResult { + public let index: TurboQuantizer + public let stats: TurboQuantizationBuildStatsRecord +} + public struct CompositeBuildOutcome { public let accelerator: CompositeAccelerator? public let reasons: [FullRebuildReasonRecord] @@ -39,10 +44,12 @@ public struct CompositeBuildOrRebuildOutcome { public let composite: CompositeAccelerator? public let hnsw: HnswIndex? public let pq: ProductQuantizer? + public let turboquant: TurboQuantizer? public let reasons: [FullRebuildReasonRecord] public let compositeStats: CompositeBuildStatsRecord public let hnswStats: HnswBuildStatsRecord? public let pqStats: ProductQuantizationBuildStatsRecord? + public let turboquantStats: TurboQuantizationBuildStatsRecord? } private func portableCompositeOutcome(_ result: CompositeBuildOutcomeRecord) -> CompositeBuildOutcome { @@ -61,10 +68,12 @@ private func portableCompositeRebuildOutcome( composite: result.composite.map { CompositeAccelerator(native: $0) }, hnsw: result.hnsw.map { HnswIndex(native: $0) }, pq: result.pq.map { ProductQuantizer(native: $0) }, + turboquant: result.turboquant.map { TurboQuantizer(native: $0) }, reasons: result.reasons, compositeStats: result.compositeStats, hnswStats: result.hnswStats, - pqStats: result.pqStats + pqStats: result.pqStats, + turboquantStats: result.turboquantStats ) } @@ -1750,7 +1759,8 @@ private func ownedSearchRequest(_ request: ProximitySearchRequestRecord) -> Prox kernel: request.kernel, backend: request.backend, hnswEfSearch: request.hnswEfSearch, - pqRerankMultiplier: request.pqRerankMultiplier + pqRerankMultiplier: request.pqRerankMultiplier, + turboquantRerankMultiplier: request.turboquantRerankMultiplier ) } @@ -1789,6 +1799,21 @@ public final class ProximityMap: @unchecked Sendable { public func loadPq(_ manifest: Data) throws -> ProductQuantizer { ProductQuantizer(native: try native.loadPq(manifest: Data(manifest))) } + public func buildTurboquant( + config: TurboQuantizationConfigRecord = defaultTurboquantConfig(), + workerThreads: UInt64 = 1, + limits: TurboQuantizationBuildLimitsRecord = defaultTurboquantBuildLimits() + ) throws -> TurboQuantizationBuildResult { + let result = try native.buildTurboquant( + config: config, workerThreads: workerThreads, limits: limits + ) + return TurboQuantizationBuildResult( + index: TurboQuantizer(native: result.index), stats: result.stats + ) + } + public func loadTurboquant(_ manifest: Data) throws -> TurboQuantizer { + TurboQuantizer(native: try native.loadTurboquant(manifest: Data(manifest))) + } public func buildCompositeHnsw( baseMap: ProximityMap, base: HnswIndex, @@ -1809,6 +1834,16 @@ public final class ProximityMap: @unchecked Sendable { baseMap: baseMap.native, base: base.native, config: config, limits: limits )) } + public func buildCompositeTurboquant( + baseMap: ProximityMap, + base: TurboQuantizer, + config: CompositeAcceleratorConfigRecord = defaultCompositeAcceleratorConfig(), + limits: CompositeBuildLimitsRecord = defaultCompositeBuildLimits() + ) throws -> CompositeBuildOutcome { + portableCompositeOutcome(try native.buildCompositeTurboquant( + baseMap: baseMap.native, base: base.native, config: config, limits: limits + )) + } public func buildOrRebuildCompositeHnsw( baseMap: ProximityMap, base: HnswIndex, @@ -1833,16 +1868,30 @@ public final class ProximityMap: @unchecked Sendable { limits: limits, rebuild: rebuild )) } + public func buildOrRebuildCompositeTurboquant( + baseMap: ProximityMap, + base: TurboQuantizer, + config: CompositeAcceleratorConfigRecord = defaultCompositeAcceleratorConfig(), + limits: CompositeBuildLimitsRecord = defaultCompositeBuildLimits(), + rebuild: CompositeRebuildOptionsRecord = defaultCompositeRebuildOptions() + ) throws -> CompositeBuildOrRebuildOutcome { + portableCompositeRebuildOutcome(try native.buildOrRebuildCompositeTurboquant( + baseMap: baseMap.native, base: base.native, config: config, + limits: limits, rebuild: rebuild + )) + } public func loadComposite(_ manifest: Data) throws -> CompositeAccelerator { CompositeAccelerator(native: try native.loadComposite(manifest: Data(manifest))) } public func buildAcceleratorCatalog( hnsw: HnswIndex? = nil, pq: ProductQuantizer? = nil, + turboquant: TurboQuantizer? = nil, composite: CompositeAccelerator? = nil ) throws -> AcceleratorCatalog { AcceleratorCatalog(native: try native.buildAcceleratorCatalog( - hnsw: hnsw?.native, pq: pq?.native, composite: composite?.native + hnsw: hnsw?.native, pq: pq?.native, turboquant: turboquant?.native, + composite: composite?.native )) } public func loadAcceleratorCatalog(_ manifest: Data) throws -> AcceleratorCatalog { @@ -2126,6 +2175,93 @@ public final class ProductQuantizer: @unchecked Sendable { public func close() { closed = true } } +public final class TurboQuantizer: @unchecked Sendable { + let native: BindingTurboQuantizer + private var closed = false + init(native: BindingTurboQuantizer) { self.native = native } + + public var manifest: Data { + precondition(!closed, "TurboQuantizer is closed") + return Data(native.manifest()) + } + public var sourceDescriptor: Data { + precondition(!closed, "TurboQuantizer is closed") + return Data(native.sourceDescriptor()) + } + public var config: TurboQuantizationConfigRecord { + precondition(!closed, "TurboQuantizer is closed") + return native.config() + } + public var quality: TurboQuantizationQualityRecord { + precondition(!closed, "TurboQuantizer is closed") + return native.quality() + } + public func verify(_ map: ProximityMap) throws -> TurboQuantizationVerificationRecord { + guard !closed else { throw PortableAPIError.closed("TurboQuantizer") } + return try native.verify(map: map.native) + } + public func search( + _ map: ProximityMap, + request: ProximitySearchRequestRecord + ) throws -> ProximitySearchResultRecord { + guard !closed else { throw PortableAPIError.closed("TurboQuantizer") } + return try native.search(map: map.native, request: ownedSearchRequest(request)) + } + public func search( + _ map: ProximityMap, + request: ProximitySearchRequestRecord, + runtime: ProximitySearchRuntime + ) throws -> ProximitySearchResultRecord { + guard !closed else { throw PortableAPIError.closed("TurboQuantizer") } + return try native.searchWithRuntime( + map: map.native, request: ownedSearchRequest(request), runtime: runtime.checkedNative() + ) + } + public func searchCancellable( + _ map: ProximityMap, + request: ProximitySearchRequestRecord, + runtime: ProximitySearchRuntime? = nil, + cancellation: ProximityCancellationToken + ) throws -> ProximitySearchResultRecord { + guard !closed else { throw PortableAPIError.closed("TurboQuantizer") } + return try native.searchCancellable( + map: map.native, + request: ownedSearchRequest(request), + runtime: try runtime?.checkedNative(), + cancellation: cancellation.checkedNative() + ) + } + public func searchAsync( + _ map: ProximityMap, + request: ProximitySearchRequestRecord, + runtime: ProximitySearchRuntime? = nil, + cancellation: ProximityCancellationToken? = nil + ) -> Task { + let owned = ownedSearchRequest(request) + let token = cancellation ?? ProximityCancellationToken() + return Task { + try await withTaskCancellationHandler { + try searchCancellable(map, request: owned, runtime: runtime, cancellation: token) + } onCancel: { token.cancel() } + } + } + public func proveSearch( + _ map: ProximityMap, + request: ProximitySearchRequestRecord, + limits: ContentGraphLimitsRecord = defaultContentGraphLimits() + ) throws -> ProximitySearchProof { + guard !closed else { throw PortableAPIError.closed("TurboQuantizer") } + return ProximitySearchProof( + native: try native.proveSearch( + map: map.native, + request: ownedSearchRequest(request), + limits: limits + ) + ) + } + public func close() { closed = true } +} + public final class CompositeAccelerator: @unchecked Sendable { let native: BindingCompositeAccelerator private var closed = false diff --git a/bindings/swift/Sources/prollyFFI/include/prollyFFI.h b/bindings/swift/Sources/prollyFFI/include/prollyFFI.h index 03ef6c3d..2ce984aa 100644 --- a/bindings/swift/Sources/prollyFFI/include/prollyFFI.h +++ b/bindings/swift/Sources/prollyFFI/include/prollyFFI.h @@ -245,63 +245,63 @@ typedef void (*UniffiForeignFutureCompleteVoid)(uint64_t, UniffiForeignFutureRes #endif #ifndef UNIFFI_FFIDEF_CALLBACK_INTERFACE_CONFLICT_VISITOR_CALLBACK_METHOD0 #define UNIFFI_FFIDEF_CALLBACK_INTERFACE_CONFLICT_VISITOR_CALLBACK_METHOD0 -typedef void (*UniffiCallbackInterfaceConflictVisitorCallbackMethod0)(uint64_t, RustBuffer, int8_t* _Nonnull, +typedef void (*UniffiCallbackInterfaceConflictVisitorCallbackMethod0)(uint64_t, RustBuffer, int8_t* _Nonnull, RustCallStatus *_Nonnull uniffiCallStatus ); #endif #ifndef UNIFFI_FFIDEF_CALLBACK_INTERFACE_CRDT_RESOLVER_CALLBACK_METHOD0 #define UNIFFI_FFIDEF_CALLBACK_INTERFACE_CRDT_RESOLVER_CALLBACK_METHOD0 -typedef void (*UniffiCallbackInterfaceCrdtResolverCallbackMethod0)(uint64_t, RustBuffer, RustBuffer* _Nonnull, +typedef void (*UniffiCallbackInterfaceCrdtResolverCallbackMethod0)(uint64_t, RustBuffer, RustBuffer* _Nonnull, RustCallStatus *_Nonnull uniffiCallStatus ); #endif #ifndef UNIFFI_FFIDEF_CALLBACK_INTERFACE_DIFF_VISITOR_CALLBACK_METHOD0 #define UNIFFI_FFIDEF_CALLBACK_INTERFACE_DIFF_VISITOR_CALLBACK_METHOD0 -typedef void (*UniffiCallbackInterfaceDiffVisitorCallbackMethod0)(uint64_t, RustBuffer, int8_t* _Nonnull, +typedef void (*UniffiCallbackInterfaceDiffVisitorCallbackMethod0)(uint64_t, RustBuffer, int8_t* _Nonnull, RustCallStatus *_Nonnull uniffiCallStatus ); #endif #ifndef UNIFFI_FFIDEF_CALLBACK_INTERFACE_ENTRY_VISITOR_CALLBACK_METHOD0 #define UNIFFI_FFIDEF_CALLBACK_INTERFACE_ENTRY_VISITOR_CALLBACK_METHOD0 -typedef void (*UniffiCallbackInterfaceEntryVisitorCallbackMethod0)(uint64_t, RustBuffer, int8_t* _Nonnull, +typedef void (*UniffiCallbackInterfaceEntryVisitorCallbackMethod0)(uint64_t, RustBuffer, int8_t* _Nonnull, RustCallStatus *_Nonnull uniffiCallStatus ); #endif #ifndef UNIFFI_FFIDEF_CALLBACK_INTERFACE_HOST_STORE_CALLBACK_METHOD0 #define UNIFFI_FFIDEF_CALLBACK_INTERFACE_HOST_STORE_CALLBACK_METHOD0 -typedef void (*UniffiCallbackInterfaceHostStoreCallbackMethod0)(uint64_t, RustBuffer, RustBuffer* _Nonnull, +typedef void (*UniffiCallbackInterfaceHostStoreCallbackMethod0)(uint64_t, RustBuffer, RustBuffer* _Nonnull, RustCallStatus *_Nonnull uniffiCallStatus ); #endif #ifndef UNIFFI_FFIDEF_CALLBACK_INTERFACE_HOST_STORE_CALLBACK_METHOD1 #define UNIFFI_FFIDEF_CALLBACK_INTERFACE_HOST_STORE_CALLBACK_METHOD1 -typedef void (*UniffiCallbackInterfaceHostStoreCallbackMethod1)(uint64_t, RustBuffer, RustBuffer, RustBuffer* _Nonnull, +typedef void (*UniffiCallbackInterfaceHostStoreCallbackMethod1)(uint64_t, RustBuffer, RustBuffer, RustBuffer* _Nonnull, RustCallStatus *_Nonnull uniffiCallStatus ); #endif #ifndef UNIFFI_FFIDEF_CALLBACK_INTERFACE_HOST_STORE_CALLBACK_METHOD2 #define UNIFFI_FFIDEF_CALLBACK_INTERFACE_HOST_STORE_CALLBACK_METHOD2 -typedef void (*UniffiCallbackInterfaceHostStoreCallbackMethod2)(uint64_t, RustBuffer, RustBuffer* _Nonnull, +typedef void (*UniffiCallbackInterfaceHostStoreCallbackMethod2)(uint64_t, RustBuffer, RustBuffer* _Nonnull, RustCallStatus *_Nonnull uniffiCallStatus ); #endif #ifndef UNIFFI_FFIDEF_CALLBACK_INTERFACE_HOST_STORE_CALLBACK_METHOD3 #define UNIFFI_FFIDEF_CALLBACK_INTERFACE_HOST_STORE_CALLBACK_METHOD3 -typedef void (*UniffiCallbackInterfaceHostStoreCallbackMethod3)(uint64_t, RustBuffer, RustBuffer* _Nonnull, +typedef void (*UniffiCallbackInterfaceHostStoreCallbackMethod3)(uint64_t, RustBuffer, RustBuffer* _Nonnull, RustCallStatus *_Nonnull uniffiCallStatus ); #endif #ifndef UNIFFI_FFIDEF_CALLBACK_INTERFACE_HOST_STORE_CALLBACK_METHOD4 #define UNIFFI_FFIDEF_CALLBACK_INTERFACE_HOST_STORE_CALLBACK_METHOD4 -typedef void (*UniffiCallbackInterfaceHostStoreCallbackMethod4)(uint64_t, RustBuffer, RustBuffer* _Nonnull, +typedef void (*UniffiCallbackInterfaceHostStoreCallbackMethod4)(uint64_t, RustBuffer, RustBuffer* _Nonnull, RustCallStatus *_Nonnull uniffiCallStatus ); @@ -315,7 +315,7 @@ typedef void (*UniffiCallbackInterfaceHostStoreCallbackMethod5)(uint64_t, RustBu #endif #ifndef UNIFFI_FFIDEF_CALLBACK_INTERFACE_HOST_STORE_CALLBACK_METHOD6 #define UNIFFI_FFIDEF_CALLBACK_INTERFACE_HOST_STORE_CALLBACK_METHOD6 -typedef void (*UniffiCallbackInterfaceHostStoreCallbackMethod6)(uint64_t, RustBuffer* _Nonnull, +typedef void (*UniffiCallbackInterfaceHostStoreCallbackMethod6)(uint64_t, RustBuffer* _Nonnull, RustCallStatus *_Nonnull uniffiCallStatus ); @@ -385,7 +385,7 @@ typedef void (*UniffiCallbackInterfaceHostStoreCallbackMethod15)(uint64_t, RustB #endif #ifndef UNIFFI_FFIDEF_CALLBACK_INTERFACE_MERGE_RESOLVER_CALLBACK_METHOD0 #define UNIFFI_FFIDEF_CALLBACK_INTERFACE_MERGE_RESOLVER_CALLBACK_METHOD0 -typedef void (*UniffiCallbackInterfaceMergeResolverCallbackMethod0)(uint64_t, RustBuffer, RustBuffer* _Nonnull, +typedef void (*UniffiCallbackInterfaceMergeResolverCallbackMethod0)(uint64_t, RustBuffer, RustBuffer* _Nonnull, RustCallStatus *_Nonnull uniffiCallStatus ); @@ -494,14 +494,14 @@ typedef void (*UniffiCallbackInterfaceForeignRemoteStoreMethod16)(uint64_t, Rust #endif #ifndef UNIFFI_FFIDEF_CALLBACK_INTERFACE_SECONDARY_INDEX_EXTRACTOR_CALLBACK_METHOD0 #define UNIFFI_FFIDEF_CALLBACK_INTERFACE_SECONDARY_INDEX_EXTRACTOR_CALLBACK_METHOD0 -typedef void (*UniffiCallbackInterfaceSecondaryIndexExtractorCallbackMethod0)(uint64_t, RustBuffer, RustBuffer, RustBuffer* _Nonnull, +typedef void (*UniffiCallbackInterfaceSecondaryIndexExtractorCallbackMethod0)(uint64_t, RustBuffer, RustBuffer, RustBuffer* _Nonnull, RustCallStatus *_Nonnull uniffiCallStatus ); #endif #ifndef UNIFFI_FFIDEF_CALLBACK_INTERFACE_PROXIMITY_RECORD_VISITOR_CALLBACK_METHOD0 #define UNIFFI_FFIDEF_CALLBACK_INTERFACE_PROXIMITY_RECORD_VISITOR_CALLBACK_METHOD0 -typedef void (*UniffiCallbackInterfaceProximityRecordVisitorCallbackMethod0)(uint64_t, RustBuffer, int8_t* _Nonnull, +typedef void (*UniffiCallbackInterfaceProximityRecordVisitorCallbackMethod0)(uint64_t, RustBuffer, int8_t* _Nonnull, RustCallStatus *_Nonnull uniffiCallStatus ); @@ -806,7 +806,7 @@ void uniffi_prolly_bindings_fn_free_mergepolicyregistry(uint64_t handle, RustCal #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_CONSTRUCTOR_MERGEPOLICYREGISTRY_NEW #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_CONSTRUCTOR_MERGEPOLICYREGISTRY_NEW uint64_t uniffi_prolly_bindings_fn_constructor_mergepolicyregistry_new(RustCallStatus *_Nonnull out_status - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_METHOD_MERGEPOLICYREGISTRY_HAS_DEFAULT @@ -892,7 +892,7 @@ uint64_t uniffi_prolly_bindings_fn_constructor_prollyblobstore_file(RustBuffer p #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_CONSTRUCTOR_PROLLYBLOBSTORE_MEMORY #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_CONSTRUCTOR_PROLLYBLOBSTORE_MEMORY uint64_t uniffi_prolly_bindings_fn_constructor_prollyblobstore_memory(RustCallStatus *_Nonnull out_status - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_METHOD_PROLLYBLOBSTORE_BLOB_COUNT @@ -1998,7 +1998,7 @@ void uniffi_prolly_bindings_fn_free_bindingindexregistry(uint64_t handle, RustCa #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_CONSTRUCTOR_BINDINGINDEXREGISTRY_NEW #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_CONSTRUCTOR_BINDINGINDEXREGISTRY_NEW uint64_t uniffi_prolly_bindings_fn_constructor_bindingindexregistry_new(RustCallStatus *_Nonnull out_status - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_METHOD_BINDINGINDEXREGISTRY_LEN @@ -2474,7 +2474,7 @@ void uniffi_prolly_bindings_fn_free_bindingproximitycancellationtoken(uint64_t h #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_CONSTRUCTOR_BINDINGPROXIMITYCANCELLATIONTOKEN_NEW #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_CONSTRUCTOR_BINDINGPROXIMITYCANCELLATIONTOKEN_NEW uint64_t uniffi_prolly_bindings_fn_constructor_bindingproximitycancellationtoken_new(RustCallStatus *_Nonnull out_status - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_METHOD_BINDINGPROXIMITYCANCELLATIONTOKEN_CANCEL @@ -2499,7 +2499,7 @@ void uniffi_prolly_bindings_fn_free_bindingproximitymap(uint64_t handle, RustCal #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_METHOD_BINDINGPROXIMITYMAP_BUILD_ACCELERATOR_CATALOG #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_METHOD_BINDINGPROXIMITYMAP_BUILD_ACCELERATOR_CATALOG -uint64_t uniffi_prolly_bindings_fn_method_bindingproximitymap_build_accelerator_catalog(uint64_t ptr, RustBuffer hnsw, RustBuffer pq, RustBuffer composite, RustCallStatus *_Nonnull out_status +uint64_t uniffi_prolly_bindings_fn_method_bindingproximitymap_build_accelerator_catalog(uint64_t ptr, RustBuffer hnsw, RustBuffer pq, RustBuffer turboquant, RustBuffer composite, RustCallStatus *_Nonnull out_status ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_METHOD_BINDINGPROXIMITYMAP_BUILD_COMPOSITE_HNSW @@ -2512,6 +2512,11 @@ RustBuffer uniffi_prolly_bindings_fn_method_bindingproximitymap_build_composite_ RustBuffer uniffi_prolly_bindings_fn_method_bindingproximitymap_build_composite_pq(uint64_t ptr, uint64_t base_map, uint64_t base, RustBuffer config, RustBuffer limits, RustCallStatus *_Nonnull out_status ); #endif +#ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_METHOD_BINDINGPROXIMITYMAP_BUILD_COMPOSITE_TURBOQUANT +#define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_METHOD_BINDINGPROXIMITYMAP_BUILD_COMPOSITE_TURBOQUANT +RustBuffer uniffi_prolly_bindings_fn_method_bindingproximitymap_build_composite_turboquant(uint64_t ptr, uint64_t base_map, uint64_t base, RustBuffer config, RustBuffer limits, RustCallStatus *_Nonnull out_status +); +#endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_METHOD_BINDINGPROXIMITYMAP_BUILD_HNSW #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_METHOD_BINDINGPROXIMITYMAP_BUILD_HNSW RustBuffer uniffi_prolly_bindings_fn_method_bindingproximitymap_build_hnsw(uint64_t ptr, RustBuffer config, RustBuffer limits, RustCallStatus *_Nonnull out_status @@ -2527,11 +2532,21 @@ RustBuffer uniffi_prolly_bindings_fn_method_bindingproximitymap_build_or_rebuild RustBuffer uniffi_prolly_bindings_fn_method_bindingproximitymap_build_or_rebuild_composite_pq(uint64_t ptr, uint64_t base_map, uint64_t base, RustBuffer config, RustBuffer limits, RustBuffer rebuild, RustCallStatus *_Nonnull out_status ); #endif +#ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_METHOD_BINDINGPROXIMITYMAP_BUILD_OR_REBUILD_COMPOSITE_TURBOQUANT +#define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_METHOD_BINDINGPROXIMITYMAP_BUILD_OR_REBUILD_COMPOSITE_TURBOQUANT +RustBuffer uniffi_prolly_bindings_fn_method_bindingproximitymap_build_or_rebuild_composite_turboquant(uint64_t ptr, uint64_t base_map, uint64_t base, RustBuffer config, RustBuffer limits, RustBuffer rebuild, RustCallStatus *_Nonnull out_status +); +#endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_METHOD_BINDINGPROXIMITYMAP_BUILD_PQ #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_METHOD_BINDINGPROXIMITYMAP_BUILD_PQ RustBuffer uniffi_prolly_bindings_fn_method_bindingproximitymap_build_pq(uint64_t ptr, RustBuffer config, uint64_t worker_threads, RustBuffer limits, RustCallStatus *_Nonnull out_status ); #endif +#ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_METHOD_BINDINGPROXIMITYMAP_BUILD_TURBOQUANT +#define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_METHOD_BINDINGPROXIMITYMAP_BUILD_TURBOQUANT +RustBuffer uniffi_prolly_bindings_fn_method_bindingproximitymap_build_turboquant(uint64_t ptr, RustBuffer config, uint64_t worker_threads, RustBuffer limits, RustCallStatus *_Nonnull out_status +); +#endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_METHOD_BINDINGPROXIMITYMAP_CLEAR_CONTENT_CACHE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_METHOD_BINDINGPROXIMITYMAP_CLEAR_CONTENT_CACHE void uniffi_prolly_bindings_fn_method_bindingproximitymap_clear_content_cache(uint64_t ptr, RustCallStatus *_Nonnull out_status @@ -2587,6 +2602,11 @@ uint64_t uniffi_prolly_bindings_fn_method_bindingproximitymap_load_hnsw(uint64_t uint64_t uniffi_prolly_bindings_fn_method_bindingproximitymap_load_pq(uint64_t ptr, RustBuffer manifest, RustCallStatus *_Nonnull out_status ); #endif +#ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_METHOD_BINDINGPROXIMITYMAP_LOAD_TURBOQUANT +#define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_METHOD_BINDINGPROXIMITYMAP_LOAD_TURBOQUANT +uint64_t uniffi_prolly_bindings_fn_method_bindingproximitymap_load_turboquant(uint64_t ptr, RustBuffer manifest, RustCallStatus *_Nonnull out_status +); +#endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_METHOD_BINDINGPROXIMITYMAP_MUTATE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_METHOD_BINDINGPROXIMITYMAP_MUTATE RustBuffer uniffi_prolly_bindings_fn_method_bindingproximitymap_mutate(uint64_t ptr, RustBuffer mutations, RustCallStatus *_Nonnull out_status @@ -2732,6 +2752,61 @@ RustBuffer uniffi_prolly_bindings_fn_method_bindingproximitysearchruntime_policy RustBuffer uniffi_prolly_bindings_fn_method_bindingproximitysearchruntime_stats(uint64_t ptr, RustCallStatus *_Nonnull out_status ); #endif +#ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_CLONE_BINDINGTURBOQUANTIZER +#define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_CLONE_BINDINGTURBOQUANTIZER +uint64_t uniffi_prolly_bindings_fn_clone_bindingturboquantizer(uint64_t handle, RustCallStatus *_Nonnull out_status +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_FREE_BINDINGTURBOQUANTIZER +#define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_FREE_BINDINGTURBOQUANTIZER +void uniffi_prolly_bindings_fn_free_bindingturboquantizer(uint64_t handle, RustCallStatus *_Nonnull out_status +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_METHOD_BINDINGTURBOQUANTIZER_CONFIG +#define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_METHOD_BINDINGTURBOQUANTIZER_CONFIG +RustBuffer uniffi_prolly_bindings_fn_method_bindingturboquantizer_config(uint64_t ptr, RustCallStatus *_Nonnull out_status +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_METHOD_BINDINGTURBOQUANTIZER_MANIFEST +#define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_METHOD_BINDINGTURBOQUANTIZER_MANIFEST +RustBuffer uniffi_prolly_bindings_fn_method_bindingturboquantizer_manifest(uint64_t ptr, RustCallStatus *_Nonnull out_status +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_METHOD_BINDINGTURBOQUANTIZER_PROVE_SEARCH +#define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_METHOD_BINDINGTURBOQUANTIZER_PROVE_SEARCH +uint64_t uniffi_prolly_bindings_fn_method_bindingturboquantizer_prove_search(uint64_t ptr, uint64_t map, RustBuffer request, RustBuffer limits, RustCallStatus *_Nonnull out_status +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_METHOD_BINDINGTURBOQUANTIZER_QUALITY +#define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_METHOD_BINDINGTURBOQUANTIZER_QUALITY +RustBuffer uniffi_prolly_bindings_fn_method_bindingturboquantizer_quality(uint64_t ptr, RustCallStatus *_Nonnull out_status +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_METHOD_BINDINGTURBOQUANTIZER_SEARCH +#define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_METHOD_BINDINGTURBOQUANTIZER_SEARCH +RustBuffer uniffi_prolly_bindings_fn_method_bindingturboquantizer_search(uint64_t ptr, uint64_t map, RustBuffer request, RustCallStatus *_Nonnull out_status +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_METHOD_BINDINGTURBOQUANTIZER_SEARCH_CANCELLABLE +#define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_METHOD_BINDINGTURBOQUANTIZER_SEARCH_CANCELLABLE +RustBuffer uniffi_prolly_bindings_fn_method_bindingturboquantizer_search_cancellable(uint64_t ptr, uint64_t map, RustBuffer request, RustBuffer runtime, uint64_t cancellation, RustCallStatus *_Nonnull out_status +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_METHOD_BINDINGTURBOQUANTIZER_SEARCH_WITH_RUNTIME +#define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_METHOD_BINDINGTURBOQUANTIZER_SEARCH_WITH_RUNTIME +RustBuffer uniffi_prolly_bindings_fn_method_bindingturboquantizer_search_with_runtime(uint64_t ptr, uint64_t map, RustBuffer request, uint64_t runtime, RustCallStatus *_Nonnull out_status +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_METHOD_BINDINGTURBOQUANTIZER_SOURCE_DESCRIPTOR +#define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_METHOD_BINDINGTURBOQUANTIZER_SOURCE_DESCRIPTOR +RustBuffer uniffi_prolly_bindings_fn_method_bindingturboquantizer_source_descriptor(uint64_t ptr, RustCallStatus *_Nonnull out_status +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_METHOD_BINDINGTURBOQUANTIZER_VERIFY +#define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_METHOD_BINDINGTURBOQUANTIZER_VERIFY +RustBuffer uniffi_prolly_bindings_fn_method_bindingturboquantizer_verify(uint64_t ptr, uint64_t map, RustCallStatus *_Nonnull out_status +); +#endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_CLONE_PROXIMITYRECORDVISITORCALLBACK #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_CLONE_PROXIMITYRECORDVISITORCALLBACK uint64_t uniffi_prolly_bindings_fn_clone_proximityrecordvisitorcallback(uint64_t handle, RustCallStatus *_Nonnull out_status @@ -3575,7 +3650,7 @@ RustBuffer uniffi_prolly_bindings_fn_func_crdt_config_multi_value(RustBuffer del #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_FUNC_CRDT_RESOLUTION_DELETE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_FUNC_CRDT_RESOLUTION_DELETE RustBuffer uniffi_prolly_bindings_fn_func_crdt_resolution_delete(RustCallStatus *_Nonnull out_status - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_FUNC_CRDT_RESOLUTION_VALUE @@ -3596,19 +3671,19 @@ RustBuffer uniffi_prolly_bindings_fn_func_decode_segments(RustBuffer key, RustCa #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_FUNC_DEFAULT_CONFIG #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_FUNC_DEFAULT_CONFIG RustBuffer uniffi_prolly_bindings_fn_func_default_config(RustCallStatus *_Nonnull out_status - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_FUNC_DEFAULT_LARGE_VALUE_CONFIG #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_FUNC_DEFAULT_LARGE_VALUE_CONFIG RustBuffer uniffi_prolly_bindings_fn_func_default_large_value_config(RustCallStatus *_Nonnull out_status - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_FUNC_DEFAULT_PARALLEL_CONFIG #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_FUNC_DEFAULT_PARALLEL_CONFIG RustBuffer uniffi_prolly_bindings_fn_func_default_parallel_config(RustCallStatus *_Nonnull out_status - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_FUNC_DELETE_MUTATION @@ -3634,7 +3709,7 @@ RustBuffer uniffi_prolly_bindings_fn_func_encode_segment(RustBuffer segment, Rus #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_FUNC_ENCODING_CBOR #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_FUNC_ENCODING_CBOR RustBuffer uniffi_prolly_bindings_fn_func_encoding_cbor(RustCallStatus *_Nonnull out_status - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_FUNC_ENCODING_CUSTOM @@ -3645,13 +3720,13 @@ RustBuffer uniffi_prolly_bindings_fn_func_encoding_custom(RustBuffer name, RustC #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_FUNC_ENCODING_JSON #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_FUNC_ENCODING_JSON RustBuffer uniffi_prolly_bindings_fn_func_encoding_json(RustCallStatus *_Nonnull out_status - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_FUNC_ENCODING_RAW #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_FUNC_ENCODING_RAW RustBuffer uniffi_prolly_bindings_fn_func_encoding_raw(RustCallStatus *_Nonnull out_status - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_FUNC_I128_KEY @@ -3767,7 +3842,7 @@ RustBuffer uniffi_prolly_bindings_fn_func_parallel_config(uint64_t max_threads, #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_FUNC_PARALLEL_CONFIG_SEQUENTIAL #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_FUNC_PARALLEL_CONFIG_SEQUENTIAL RustBuffer uniffi_prolly_bindings_fn_func_parallel_config_sequential(RustCallStatus *_Nonnull out_status - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_FUNC_PREFIX_END @@ -3788,7 +3863,7 @@ RustBuffer uniffi_prolly_bindings_fn_func_range_cursor_after_key(RustBuffer key, #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_FUNC_RANGE_CURSOR_START #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_FUNC_RANGE_CURSOR_START RustBuffer uniffi_prolly_bindings_fn_func_range_cursor_start(RustCallStatus *_Nonnull out_status - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_FUNC_RANGE_PAGE_PROOF_FROM_BYTES @@ -3834,13 +3909,13 @@ RustBuffer uniffi_prolly_bindings_fn_func_range_proof_to_bytes(RustBuffer proof, #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_FUNC_RESOLUTION_DELETE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_FUNC_RESOLUTION_DELETE RustBuffer uniffi_prolly_bindings_fn_func_resolution_delete(RustCallStatus *_Nonnull out_status - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_FUNC_RESOLUTION_UNRESOLVED #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_FUNC_RESOLUTION_UNRESOLVED RustBuffer uniffi_prolly_bindings_fn_func_resolution_unresolved(RustCallStatus *_Nonnull out_status - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_FUNC_RESOLUTION_VALUE @@ -3871,7 +3946,7 @@ RustBuffer uniffi_prolly_bindings_fn_func_resolve_update_wins(RustBuffer conflic #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_FUNC_RETAIN_ALL_NAMED_ROOTS #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_FUNC_RETAIN_ALL_NAMED_ROOTS RustBuffer uniffi_prolly_bindings_fn_func_retain_all_named_roots(RustCallStatus *_Nonnull out_status - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_FUNC_RETAIN_EXACT_NAMED_ROOTS @@ -3902,7 +3977,7 @@ RustBuffer uniffi_prolly_bindings_fn_func_reverse_cursor_before_key(RustBuffer k #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_FUNC_REVERSE_CURSOR_END #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_FUNC_REVERSE_CURSOR_END RustBuffer uniffi_prolly_bindings_fn_func_reverse_cursor_end(RustCallStatus *_Nonnull out_status - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_FUNC_ROOT_MANIFEST_FROM_BYTES @@ -3958,13 +4033,13 @@ RustBuffer uniffi_prolly_bindings_fn_func_snapshot_id_from_name(RustBuffer names #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_FUNC_SNAPSHOT_NAMESPACE_BRANCH #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_FUNC_SNAPSHOT_NAMESPACE_BRANCH RustBuffer uniffi_prolly_bindings_fn_func_snapshot_namespace_branch(RustCallStatus *_Nonnull out_status - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_FUNC_SNAPSHOT_NAMESPACE_CHECKPOINT #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_FUNC_SNAPSHOT_NAMESPACE_CHECKPOINT RustBuffer uniffi_prolly_bindings_fn_func_snapshot_namespace_checkpoint(RustCallStatus *_Nonnull out_status - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_FUNC_SNAPSHOT_NAMESPACE_CUSTOM @@ -3975,7 +4050,7 @@ RustBuffer uniffi_prolly_bindings_fn_func_snapshot_namespace_custom(RustBuffer p #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_FUNC_SNAPSHOT_NAMESPACE_TAG #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_FUNC_SNAPSHOT_NAMESPACE_TAG RustBuffer uniffi_prolly_bindings_fn_func_snapshot_namespace_tag(RustCallStatus *_Nonnull out_status - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_FUNC_SNAPSHOT_ROOT_NAME @@ -4161,55 +4236,55 @@ uint64_t uniffi_prolly_bindings_fn_func_open_remote_prolly_engine(uint64_t store #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_FUNC_DEFAULT_SECONDARY_INDEX_LIMITS #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_FUNC_DEFAULT_SECONDARY_INDEX_LIMITS RustBuffer uniffi_prolly_bindings_fn_func_default_secondary_index_limits(RustCallStatus *_Nonnull out_status - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_FUNC_DEFAULT_COMPOSITE_ACCELERATOR_CONFIG #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_FUNC_DEFAULT_COMPOSITE_ACCELERATOR_CONFIG RustBuffer uniffi_prolly_bindings_fn_func_default_composite_accelerator_config(RustCallStatus *_Nonnull out_status - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_FUNC_DEFAULT_COMPOSITE_BUILD_LIMITS #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_FUNC_DEFAULT_COMPOSITE_BUILD_LIMITS RustBuffer uniffi_prolly_bindings_fn_func_default_composite_build_limits(RustCallStatus *_Nonnull out_status - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_FUNC_DEFAULT_COMPOSITE_REBUILD_OPTIONS #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_FUNC_DEFAULT_COMPOSITE_REBUILD_OPTIONS RustBuffer uniffi_prolly_bindings_fn_func_default_composite_rebuild_options(RustCallStatus *_Nonnull out_status - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_FUNC_DEFAULT_CONTENT_GRAPH_LIMITS #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_FUNC_DEFAULT_CONTENT_GRAPH_LIMITS RustBuffer uniffi_prolly_bindings_fn_func_default_content_graph_limits(RustCallStatus *_Nonnull out_status - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_FUNC_DEFAULT_HNSW_BUILD_LIMITS #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_FUNC_DEFAULT_HNSW_BUILD_LIMITS RustBuffer uniffi_prolly_bindings_fn_func_default_hnsw_build_limits(RustCallStatus *_Nonnull out_status - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_FUNC_DEFAULT_HNSW_CONFIG #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_FUNC_DEFAULT_HNSW_CONFIG RustBuffer uniffi_prolly_bindings_fn_func_default_hnsw_config(RustCallStatus *_Nonnull out_status - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_FUNC_DEFAULT_PQ_BUILD_LIMITS #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_FUNC_DEFAULT_PQ_BUILD_LIMITS RustBuffer uniffi_prolly_bindings_fn_func_default_pq_build_limits(RustCallStatus *_Nonnull out_status - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_FUNC_DEFAULT_PQ_CONFIG #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_FUNC_DEFAULT_PQ_CONFIG RustBuffer uniffi_prolly_bindings_fn_func_default_pq_config(RustCallStatus *_Nonnull out_status - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_FUNC_DEFAULT_PROXIMITY_CONFIG @@ -4220,7 +4295,19 @@ RustBuffer uniffi_prolly_bindings_fn_func_default_proximity_config(uint32_t dime #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_FUNC_DEFAULT_PROXIMITY_SEARCH_RUNTIME_POLICY #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_FUNC_DEFAULT_PROXIMITY_SEARCH_RUNTIME_POLICY RustBuffer uniffi_prolly_bindings_fn_func_default_proximity_search_runtime_policy(RustCallStatus *_Nonnull out_status - + +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_FUNC_DEFAULT_TURBOQUANT_BUILD_LIMITS +#define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_FUNC_DEFAULT_TURBOQUANT_BUILD_LIMITS +RustBuffer uniffi_prolly_bindings_fn_func_default_turboquant_build_limits(RustCallStatus *_Nonnull out_status + +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_FUNC_DEFAULT_TURBOQUANT_CONFIG +#define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_FUNC_DEFAULT_TURBOQUANT_CONFIG +RustBuffer uniffi_prolly_bindings_fn_func_default_turboquant_config(RustCallStatus *_Nonnull out_status + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_FN_FUNC_EXACT_PROXIMITY_SEARCH_REQUEST @@ -4506,823 +4593,835 @@ void ffi_prolly_bindings_rust_future_complete_void(uint64_t handle, RustCallStat #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_AUTHENTICATED_PROOF_ENVELOPE_FROM_BYTES #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_AUTHENTICATED_PROOF_ENVELOPE_FROM_BYTES uint16_t uniffi_prolly_bindings_checksum_func_authenticated_proof_envelope_from_bytes(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_AUTHENTICATED_PROOF_ENVELOPE_TO_BYTES #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_AUTHENTICATED_PROOF_ENVELOPE_TO_BYTES uint16_t uniffi_prolly_bindings_checksum_func_authenticated_proof_envelope_to_bytes(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_BLOB_REF_VALIDATE_BYTES #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_BLOB_REF_VALIDATE_BYTES uint16_t uniffi_prolly_bindings_checksum_func_blob_ref_validate_bytes(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_CHANGED_SPAN #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_CHANGED_SPAN uint16_t uniffi_prolly_bindings_checksum_func_changed_span(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_CHANGED_SPAN_FOR_PREFIX #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_CHANGED_SPAN_FOR_PREFIX uint16_t uniffi_prolly_bindings_checksum_func_changed_span_for_prefix(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_CHANGED_SPAN_FROM_KEY #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_CHANGED_SPAN_FROM_KEY uint16_t uniffi_prolly_bindings_checksum_func_changed_span_from_key(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_CID_FROM_BYTES #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_CID_FROM_BYTES uint16_t uniffi_prolly_bindings_checksum_func_cid_from_bytes(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_CRDT_CONFIG_LWW #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_CRDT_CONFIG_LWW uint16_t uniffi_prolly_bindings_checksum_func_crdt_config_lww(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_CRDT_CONFIG_MULTI_VALUE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_CRDT_CONFIG_MULTI_VALUE uint16_t uniffi_prolly_bindings_checksum_func_crdt_config_multi_value(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_CRDT_RESOLUTION_DELETE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_CRDT_RESOLUTION_DELETE uint16_t uniffi_prolly_bindings_checksum_func_crdt_resolution_delete(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_CRDT_RESOLUTION_VALUE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_CRDT_RESOLUTION_VALUE uint16_t uniffi_prolly_bindings_checksum_func_crdt_resolution_value(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_DEBUG_KEY #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_DEBUG_KEY uint16_t uniffi_prolly_bindings_checksum_func_debug_key(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_DECODE_SEGMENTS #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_DECODE_SEGMENTS uint16_t uniffi_prolly_bindings_checksum_func_decode_segments(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_DEFAULT_CONFIG #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_DEFAULT_CONFIG uint16_t uniffi_prolly_bindings_checksum_func_default_config(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_DEFAULT_LARGE_VALUE_CONFIG #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_DEFAULT_LARGE_VALUE_CONFIG uint16_t uniffi_prolly_bindings_checksum_func_default_large_value_config(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_DEFAULT_PARALLEL_CONFIG #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_DEFAULT_PARALLEL_CONFIG uint16_t uniffi_prolly_bindings_checksum_func_default_parallel_config(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_DELETE_MUTATION #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_DELETE_MUTATION uint16_t uniffi_prolly_bindings_checksum_func_delete_mutation(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_DIFF_PAGE_PROOF_FROM_BYTES #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_DIFF_PAGE_PROOF_FROM_BYTES uint16_t uniffi_prolly_bindings_checksum_func_diff_page_proof_from_bytes(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_DIFF_PAGE_PROOF_TO_BYTES #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_DIFF_PAGE_PROOF_TO_BYTES uint16_t uniffi_prolly_bindings_checksum_func_diff_page_proof_to_bytes(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_ENCODE_SEGMENT #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_ENCODE_SEGMENT uint16_t uniffi_prolly_bindings_checksum_func_encode_segment(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_ENCODING_CBOR #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_ENCODING_CBOR uint16_t uniffi_prolly_bindings_checksum_func_encoding_cbor(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_ENCODING_CUSTOM #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_ENCODING_CUSTOM uint16_t uniffi_prolly_bindings_checksum_func_encoding_custom(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_ENCODING_JSON #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_ENCODING_JSON uint16_t uniffi_prolly_bindings_checksum_func_encoding_json(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_ENCODING_RAW #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_ENCODING_RAW uint16_t uniffi_prolly_bindings_checksum_func_encoding_raw(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_I128_KEY #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_I128_KEY uint16_t uniffi_prolly_bindings_checksum_func_i128_key(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_I64_KEY #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_I64_KEY uint16_t uniffi_prolly_bindings_checksum_func_i64_key(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_INSPECT_PROOF_BUNDLE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_INSPECT_PROOF_BUNDLE uint16_t uniffi_prolly_bindings_checksum_func_inspect_proof_bundle(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_IS_TOMBSTONE_VALUE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_IS_TOMBSTONE_VALUE uint16_t uniffi_prolly_bindings_checksum_func_is_tombstone_value(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_KEY_FROM_PREFIXED_SEGMENTS #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_KEY_FROM_PREFIXED_SEGMENTS uint16_t uniffi_prolly_bindings_checksum_func_key_from_prefixed_segments(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_KEY_FROM_SEGMENTS #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_KEY_FROM_SEGMENTS uint16_t uniffi_prolly_bindings_checksum_func_key_from_segments(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_KEY_PROOF_FROM_BYTES #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_KEY_PROOF_FROM_BYTES uint16_t uniffi_prolly_bindings_checksum_func_key_proof_from_bytes(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_KEY_PROOF_FROM_NODE_BYTES #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_KEY_PROOF_FROM_NODE_BYTES uint16_t uniffi_prolly_bindings_checksum_func_key_proof_from_node_bytes(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_KEY_PROOF_PATH_NODE_BYTES #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_KEY_PROOF_PATH_NODE_BYTES uint16_t uniffi_prolly_bindings_checksum_func_key_proof_path_node_bytes(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_KEY_PROOF_TO_BYTES #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_KEY_PROOF_TO_BYTES uint16_t uniffi_prolly_bindings_checksum_func_key_proof_to_bytes(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_LARGE_VALUE_CONFIG #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_LARGE_VALUE_CONFIG uint16_t uniffi_prolly_bindings_checksum_func_large_value_config(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_MULTI_KEY_PROOF_FROM_BYTES #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_MULTI_KEY_PROOF_FROM_BYTES uint16_t uniffi_prolly_bindings_checksum_func_multi_key_proof_from_bytes(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_MULTI_KEY_PROOF_FROM_NODE_BYTES #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_MULTI_KEY_PROOF_FROM_NODE_BYTES uint16_t uniffi_prolly_bindings_checksum_func_multi_key_proof_from_node_bytes(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_MULTI_KEY_PROOF_PATH_NODE_BYTES #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_MULTI_KEY_PROOF_PATH_NODE_BYTES uint16_t uniffi_prolly_bindings_checksum_func_multi_key_proof_path_node_bytes(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_MULTI_KEY_PROOF_TO_BYTES #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_MULTI_KEY_PROOF_TO_BYTES uint16_t uniffi_prolly_bindings_checksum_func_multi_key_proof_to_bytes(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_MULTI_VALUE_SET_FROM_BYTES #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_MULTI_VALUE_SET_FROM_BYTES uint16_t uniffi_prolly_bindings_checksum_func_multi_value_set_from_bytes(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_MULTI_VALUE_SET_MERGE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_MULTI_VALUE_SET_MERGE uint16_t uniffi_prolly_bindings_checksum_func_multi_value_set_merge(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_MULTI_VALUE_SET_TO_BYTES #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_MULTI_VALUE_SET_TO_BYTES uint16_t uniffi_prolly_bindings_checksum_func_multi_value_set_to_bytes(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_NODE_CID #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_NODE_CID uint16_t uniffi_prolly_bindings_checksum_func_node_cid(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_NODE_FROM_BYTES #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_NODE_FROM_BYTES uint16_t uniffi_prolly_bindings_checksum_func_node_from_bytes(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_NODE_TO_BYTES #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_NODE_TO_BYTES uint16_t uniffi_prolly_bindings_checksum_func_node_to_bytes(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_PARALLEL_CONFIG #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_PARALLEL_CONFIG uint16_t uniffi_prolly_bindings_checksum_func_parallel_config(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_PARALLEL_CONFIG_SEQUENTIAL #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_PARALLEL_CONFIG_SEQUENTIAL uint16_t uniffi_prolly_bindings_checksum_func_parallel_config_sequential(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_PREFIX_END #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_PREFIX_END uint16_t uniffi_prolly_bindings_checksum_func_prefix_end(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_PREFIX_RANGE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_PREFIX_RANGE uint16_t uniffi_prolly_bindings_checksum_func_prefix_range(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_RANGE_CURSOR_AFTER_KEY #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_RANGE_CURSOR_AFTER_KEY uint16_t uniffi_prolly_bindings_checksum_func_range_cursor_after_key(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_RANGE_CURSOR_START #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_RANGE_CURSOR_START uint16_t uniffi_prolly_bindings_checksum_func_range_cursor_start(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_RANGE_PAGE_PROOF_FROM_BYTES #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_RANGE_PAGE_PROOF_FROM_BYTES uint16_t uniffi_prolly_bindings_checksum_func_range_page_proof_from_bytes(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_RANGE_PAGE_PROOF_FROM_NODE_BYTES #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_RANGE_PAGE_PROOF_FROM_NODE_BYTES uint16_t uniffi_prolly_bindings_checksum_func_range_page_proof_from_node_bytes(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_RANGE_PAGE_PROOF_PATH_NODE_BYTES #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_RANGE_PAGE_PROOF_PATH_NODE_BYTES uint16_t uniffi_prolly_bindings_checksum_func_range_page_proof_path_node_bytes(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_RANGE_PAGE_PROOF_TO_BYTES #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_RANGE_PAGE_PROOF_TO_BYTES uint16_t uniffi_prolly_bindings_checksum_func_range_page_proof_to_bytes(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_RANGE_PROOF_FROM_BYTES #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_RANGE_PROOF_FROM_BYTES uint16_t uniffi_prolly_bindings_checksum_func_range_proof_from_bytes(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_RANGE_PROOF_FROM_NODE_BYTES #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_RANGE_PROOF_FROM_NODE_BYTES uint16_t uniffi_prolly_bindings_checksum_func_range_proof_from_node_bytes(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_RANGE_PROOF_PATH_NODE_BYTES #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_RANGE_PROOF_PATH_NODE_BYTES uint16_t uniffi_prolly_bindings_checksum_func_range_proof_path_node_bytes(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_RANGE_PROOF_TO_BYTES #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_RANGE_PROOF_TO_BYTES uint16_t uniffi_prolly_bindings_checksum_func_range_proof_to_bytes(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_RESOLUTION_DELETE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_RESOLUTION_DELETE uint16_t uniffi_prolly_bindings_checksum_func_resolution_delete(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_RESOLUTION_UNRESOLVED #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_RESOLUTION_UNRESOLVED uint16_t uniffi_prolly_bindings_checksum_func_resolution_unresolved(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_RESOLUTION_VALUE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_RESOLUTION_VALUE uint16_t uniffi_prolly_bindings_checksum_func_resolution_value(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_RESOLVE_DELETE_WINS #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_RESOLVE_DELETE_WINS uint16_t uniffi_prolly_bindings_checksum_func_resolve_delete_wins(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_RESOLVE_PREFER_LEFT #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_RESOLVE_PREFER_LEFT uint16_t uniffi_prolly_bindings_checksum_func_resolve_prefer_left(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_RESOLVE_PREFER_RIGHT #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_RESOLVE_PREFER_RIGHT uint16_t uniffi_prolly_bindings_checksum_func_resolve_prefer_right(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_RESOLVE_UPDATE_WINS #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_RESOLVE_UPDATE_WINS uint16_t uniffi_prolly_bindings_checksum_func_resolve_update_wins(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_RETAIN_ALL_NAMED_ROOTS #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_RETAIN_ALL_NAMED_ROOTS uint16_t uniffi_prolly_bindings_checksum_func_retain_all_named_roots(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_RETAIN_EXACT_NAMED_ROOTS #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_RETAIN_EXACT_NAMED_ROOTS uint16_t uniffi_prolly_bindings_checksum_func_retain_exact_named_roots(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_RETAIN_NAMED_ROOT_PREFIX #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_RETAIN_NAMED_ROOT_PREFIX uint16_t uniffi_prolly_bindings_checksum_func_retain_named_root_prefix(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_RETAIN_NAMED_ROOTS_UPDATED_SINCE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_RETAIN_NAMED_ROOTS_UPDATED_SINCE uint16_t uniffi_prolly_bindings_checksum_func_retain_named_roots_updated_since(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_RETAIN_NEWEST_NAMED_ROOTS #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_RETAIN_NEWEST_NAMED_ROOTS uint16_t uniffi_prolly_bindings_checksum_func_retain_newest_named_roots(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_REVERSE_CURSOR_BEFORE_KEY #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_REVERSE_CURSOR_BEFORE_KEY uint16_t uniffi_prolly_bindings_checksum_func_reverse_cursor_before_key(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_REVERSE_CURSOR_END #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_REVERSE_CURSOR_END uint16_t uniffi_prolly_bindings_checksum_func_reverse_cursor_end(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_ROOT_MANIFEST_FROM_BYTES #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_ROOT_MANIFEST_FROM_BYTES uint16_t uniffi_prolly_bindings_checksum_func_root_manifest_from_bytes(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_ROOT_MANIFEST_TO_BYTES #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_ROOT_MANIFEST_TO_BYTES uint16_t uniffi_prolly_bindings_checksum_func_root_manifest_to_bytes(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_SIGN_PROOF_BUNDLE_HMAC_SHA256 #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_SIGN_PROOF_BUNDLE_HMAC_SHA256 uint16_t uniffi_prolly_bindings_checksum_func_sign_proof_bundle_hmac_sha256(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_SNAPSHOT_BUNDLE_DIGEST #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_SNAPSHOT_BUNDLE_DIGEST uint16_t uniffi_prolly_bindings_checksum_func_snapshot_bundle_digest(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_SNAPSHOT_BUNDLE_DIGEST_BYTES #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_SNAPSHOT_BUNDLE_DIGEST_BYTES uint16_t uniffi_prolly_bindings_checksum_func_snapshot_bundle_digest_bytes(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_SNAPSHOT_BUNDLE_FROM_BYTES #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_SNAPSHOT_BUNDLE_FROM_BYTES uint16_t uniffi_prolly_bindings_checksum_func_snapshot_bundle_from_bytes(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_SNAPSHOT_BUNDLE_SUMMARY #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_SNAPSHOT_BUNDLE_SUMMARY uint16_t uniffi_prolly_bindings_checksum_func_snapshot_bundle_summary(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_SNAPSHOT_BUNDLE_SUMMARY_FROM_BYTES #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_SNAPSHOT_BUNDLE_SUMMARY_FROM_BYTES uint16_t uniffi_prolly_bindings_checksum_func_snapshot_bundle_summary_from_bytes(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_SNAPSHOT_BUNDLE_TO_BYTES #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_SNAPSHOT_BUNDLE_TO_BYTES uint16_t uniffi_prolly_bindings_checksum_func_snapshot_bundle_to_bytes(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_SNAPSHOT_ID_FROM_NAME #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_SNAPSHOT_ID_FROM_NAME uint16_t uniffi_prolly_bindings_checksum_func_snapshot_id_from_name(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_SNAPSHOT_NAMESPACE_BRANCH #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_SNAPSHOT_NAMESPACE_BRANCH uint16_t uniffi_prolly_bindings_checksum_func_snapshot_namespace_branch(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_SNAPSHOT_NAMESPACE_CHECKPOINT #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_SNAPSHOT_NAMESPACE_CHECKPOINT uint16_t uniffi_prolly_bindings_checksum_func_snapshot_namespace_checkpoint(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_SNAPSHOT_NAMESPACE_CUSTOM #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_SNAPSHOT_NAMESPACE_CUSTOM uint16_t uniffi_prolly_bindings_checksum_func_snapshot_namespace_custom(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_SNAPSHOT_NAMESPACE_TAG #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_SNAPSHOT_NAMESPACE_TAG uint16_t uniffi_prolly_bindings_checksum_func_snapshot_namespace_tag(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_SNAPSHOT_ROOT_NAME #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_SNAPSHOT_ROOT_NAME uint16_t uniffi_prolly_bindings_checksum_func_snapshot_root_name(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_TIMESTAMP_MILLIS_KEY #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_TIMESTAMP_MILLIS_KEY uint16_t uniffi_prolly_bindings_checksum_func_timestamp_millis_key(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_TIMESTAMPED_VALUE_FROM_BYTES #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_TIMESTAMPED_VALUE_FROM_BYTES uint16_t uniffi_prolly_bindings_checksum_func_timestamped_value_from_bytes(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_TIMESTAMPED_VALUE_NOW #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_TIMESTAMPED_VALUE_NOW uint16_t uniffi_prolly_bindings_checksum_func_timestamped_value_now(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_TIMESTAMPED_VALUE_TO_BYTES #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_TIMESTAMPED_VALUE_TO_BYTES uint16_t uniffi_prolly_bindings_checksum_func_timestamped_value_to_bytes(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_TOMBSTONE_COMPACTION_MUTATION #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_TOMBSTONE_COMPACTION_MUTATION uint16_t uniffi_prolly_bindings_checksum_func_tombstone_compaction_mutation(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_TOMBSTONE_FROM_BYTES #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_TOMBSTONE_FROM_BYTES uint16_t uniffi_prolly_bindings_checksum_func_tombstone_from_bytes(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_TOMBSTONE_FROM_STORED_BYTES #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_TOMBSTONE_FROM_STORED_BYTES uint16_t uniffi_prolly_bindings_checksum_func_tombstone_from_stored_bytes(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_TOMBSTONE_TO_BYTES #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_TOMBSTONE_TO_BYTES uint16_t uniffi_prolly_bindings_checksum_func_tombstone_to_bytes(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_TOMBSTONE_UPSERT_MUTATION #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_TOMBSTONE_UPSERT_MUTATION uint16_t uniffi_prolly_bindings_checksum_func_tombstone_upsert_mutation(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_TREE_CONFIG #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_TREE_CONFIG uint16_t uniffi_prolly_bindings_checksum_func_tree_config(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_TREE_CONFIG_FROM_FORMAT_BYTES #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_TREE_CONFIG_FROM_FORMAT_BYTES uint16_t uniffi_prolly_bindings_checksum_func_tree_config_from_format_bytes(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_U128_KEY #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_U128_KEY uint16_t uniffi_prolly_bindings_checksum_func_u128_key(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_U64_KEY #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_U64_KEY uint16_t uniffi_prolly_bindings_checksum_func_u64_key(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_UPSERT_MUTATION #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_UPSERT_MUTATION uint16_t uniffi_prolly_bindings_checksum_func_upsert_mutation(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_VALUE_REF_FROM_BYTES #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_VALUE_REF_FROM_BYTES uint16_t uniffi_prolly_bindings_checksum_func_value_ref_from_bytes(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_VALUE_REF_FROM_STORED_BYTES #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_VALUE_REF_FROM_STORED_BYTES uint16_t uniffi_prolly_bindings_checksum_func_value_ref_from_stored_bytes(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_VALUE_REF_INLINE_REQUIRES_ESCAPE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_VALUE_REF_INLINE_REQUIRES_ESCAPE uint16_t uniffi_prolly_bindings_checksum_func_value_ref_inline_requires_escape(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_VALUE_REF_TO_BYTES #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_VALUE_REF_TO_BYTES uint16_t uniffi_prolly_bindings_checksum_func_value_ref_to_bytes(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_VERIFY_AUTHENTICATED_PROOF_BUNDLE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_VERIFY_AUTHENTICATED_PROOF_BUNDLE uint16_t uniffi_prolly_bindings_checksum_func_verify_authenticated_proof_bundle(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_VERIFY_AUTHENTICATED_PROOF_ENVELOPE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_VERIFY_AUTHENTICATED_PROOF_ENVELOPE uint16_t uniffi_prolly_bindings_checksum_func_verify_authenticated_proof_envelope(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_VERIFY_DIFF_PAGE_PROOF #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_VERIFY_DIFF_PAGE_PROOF uint16_t uniffi_prolly_bindings_checksum_func_verify_diff_page_proof(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_VERIFY_KEY_PROOF #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_VERIFY_KEY_PROOF uint16_t uniffi_prolly_bindings_checksum_func_verify_key_proof(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_VERIFY_MULTI_KEY_PROOF #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_VERIFY_MULTI_KEY_PROOF uint16_t uniffi_prolly_bindings_checksum_func_verify_multi_key_proof(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_VERIFY_PROOF_BUNDLE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_VERIFY_PROOF_BUNDLE uint16_t uniffi_prolly_bindings_checksum_func_verify_proof_bundle(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_VERIFY_RANGE_PAGE_PROOF #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_VERIFY_RANGE_PAGE_PROOF uint16_t uniffi_prolly_bindings_checksum_func_verify_range_page_proof(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_VERIFY_RANGE_PROOF #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_VERIFY_RANGE_PROOF uint16_t uniffi_prolly_bindings_checksum_func_verify_range_proof(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_VERIFY_SNAPSHOT_BUNDLE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_VERIFY_SNAPSHOT_BUNDLE uint16_t uniffi_prolly_bindings_checksum_func_verify_snapshot_bundle(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_VERIFY_SNAPSHOT_BUNDLE_BYTES #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_VERIFY_SNAPSHOT_BUNDLE_BYTES uint16_t uniffi_prolly_bindings_checksum_func_verify_snapshot_bundle_bytes(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_VERSIONED_VALUE_BYTES_MATCHES_SCHEMA #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_VERSIONED_VALUE_BYTES_MATCHES_SCHEMA uint16_t uniffi_prolly_bindings_checksum_func_versioned_value_bytes_matches_schema(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_VERSIONED_VALUE_BYTES_REQUIRE_SCHEMA #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_VERSIONED_VALUE_BYTES_REQUIRE_SCHEMA uint16_t uniffi_prolly_bindings_checksum_func_versioned_value_bytes_require_schema(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_VERSIONED_VALUE_FROM_BYTES #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_VERSIONED_VALUE_FROM_BYTES uint16_t uniffi_prolly_bindings_checksum_func_versioned_value_from_bytes(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_VERSIONED_VALUE_MATCHES_SCHEMA #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_VERSIONED_VALUE_MATCHES_SCHEMA uint16_t uniffi_prolly_bindings_checksum_func_versioned_value_matches_schema(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_VERSIONED_VALUE_REQUIRE_SCHEMA #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_VERSIONED_VALUE_REQUIRE_SCHEMA uint16_t uniffi_prolly_bindings_checksum_func_versioned_value_require_schema(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_VERSIONED_VALUE_TO_BYTES #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_VERSIONED_VALUE_TO_BYTES uint16_t uniffi_prolly_bindings_checksum_func_versioned_value_to_bytes(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_OPEN_REMOTE_PROLLY_ENGINE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_OPEN_REMOTE_PROLLY_ENGINE uint16_t uniffi_prolly_bindings_checksum_func_open_remote_prolly_engine(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_DEFAULT_SECONDARY_INDEX_LIMITS #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_DEFAULT_SECONDARY_INDEX_LIMITS uint16_t uniffi_prolly_bindings_checksum_func_default_secondary_index_limits(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_DEFAULT_COMPOSITE_ACCELERATOR_CONFIG #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_DEFAULT_COMPOSITE_ACCELERATOR_CONFIG uint16_t uniffi_prolly_bindings_checksum_func_default_composite_accelerator_config(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_DEFAULT_COMPOSITE_BUILD_LIMITS #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_DEFAULT_COMPOSITE_BUILD_LIMITS uint16_t uniffi_prolly_bindings_checksum_func_default_composite_build_limits(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_DEFAULT_COMPOSITE_REBUILD_OPTIONS #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_DEFAULT_COMPOSITE_REBUILD_OPTIONS uint16_t uniffi_prolly_bindings_checksum_func_default_composite_rebuild_options(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_DEFAULT_CONTENT_GRAPH_LIMITS #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_DEFAULT_CONTENT_GRAPH_LIMITS uint16_t uniffi_prolly_bindings_checksum_func_default_content_graph_limits(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_DEFAULT_HNSW_BUILD_LIMITS #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_DEFAULT_HNSW_BUILD_LIMITS uint16_t uniffi_prolly_bindings_checksum_func_default_hnsw_build_limits(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_DEFAULT_HNSW_CONFIG #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_DEFAULT_HNSW_CONFIG uint16_t uniffi_prolly_bindings_checksum_func_default_hnsw_config(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_DEFAULT_PQ_BUILD_LIMITS #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_DEFAULT_PQ_BUILD_LIMITS uint16_t uniffi_prolly_bindings_checksum_func_default_pq_build_limits(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_DEFAULT_PQ_CONFIG #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_DEFAULT_PQ_CONFIG uint16_t uniffi_prolly_bindings_checksum_func_default_pq_config(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_DEFAULT_PROXIMITY_CONFIG #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_DEFAULT_PROXIMITY_CONFIG uint16_t uniffi_prolly_bindings_checksum_func_default_proximity_config(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_DEFAULT_PROXIMITY_SEARCH_RUNTIME_POLICY #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_DEFAULT_PROXIMITY_SEARCH_RUNTIME_POLICY uint16_t uniffi_prolly_bindings_checksum_func_default_proximity_search_runtime_policy(void - + +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_DEFAULT_TURBOQUANT_BUILD_LIMITS +#define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_DEFAULT_TURBOQUANT_BUILD_LIMITS +uint16_t uniffi_prolly_bindings_checksum_func_default_turboquant_build_limits(void + +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_DEFAULT_TURBOQUANT_CONFIG +#define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_DEFAULT_TURBOQUANT_CONFIG +uint16_t uniffi_prolly_bindings_checksum_func_default_turboquant_config(void + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_EXACT_PROXIMITY_SEARCH_REQUEST #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_EXACT_PROXIMITY_SEARCH_REQUEST uint16_t uniffi_prolly_bindings_checksum_func_exact_proximity_search_request(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_VERIFY_PROXIMITY_MEMBERSHIP_PROOF #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_VERIFY_PROXIMITY_MEMBERSHIP_PROOF uint16_t uniffi_prolly_bindings_checksum_func_verify_proximity_membership_proof(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_VERIFY_PROXIMITY_STRUCTURE_PROOF #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_VERIFY_PROXIMITY_STRUCTURE_PROOF uint16_t uniffi_prolly_bindings_checksum_func_verify_proximity_structure_proof(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_FUNC_NORMALIZE_PUBLICATION_ORIGIN_CODE @@ -5334,49 +5433,49 @@ uint16_t uniffi_prolly_bindings_checksum_func_normalize_publication_origin_code( #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_CONFLICTVISITORCALLBACK_VISIT #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_CONFLICTVISITORCALLBACK_VISIT uint16_t uniffi_prolly_bindings_checksum_method_conflictvisitorcallback_visit(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_CRDTRESOLVERCALLBACK_RESOLVE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_CRDTRESOLVERCALLBACK_RESOLVE uint16_t uniffi_prolly_bindings_checksum_method_crdtresolvercallback_resolve(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_DIFFVISITORCALLBACK_VISIT #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_DIFFVISITORCALLBACK_VISIT uint16_t uniffi_prolly_bindings_checksum_method_diffvisitorcallback_visit(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_ENTRYVISITORCALLBACK_VISIT #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_ENTRYVISITORCALLBACK_VISIT uint16_t uniffi_prolly_bindings_checksum_method_entryvisitorcallback_visit(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_HOSTSTORECALLBACK_GET #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_HOSTSTORECALLBACK_GET uint16_t uniffi_prolly_bindings_checksum_method_hoststorecallback_get(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_HOSTSTORECALLBACK_PUT #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_HOSTSTORECALLBACK_PUT uint16_t uniffi_prolly_bindings_checksum_method_hoststorecallback_put(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_HOSTSTORECALLBACK_DELETE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_HOSTSTORECALLBACK_DELETE uint16_t uniffi_prolly_bindings_checksum_method_hoststorecallback_delete(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_HOSTSTORECALLBACK_BATCH #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_HOSTSTORECALLBACK_BATCH uint16_t uniffi_prolly_bindings_checksum_method_hoststorecallback_batch(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_HOSTSTORECALLBACK_PUBLISH_NODES @@ -5388,1249 +5487,1249 @@ uint16_t uniffi_prolly_bindings_checksum_method_hoststorecallback_publish_nodes( #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_HOSTSTORECALLBACK_BATCH_GET_ORDERED #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_HOSTSTORECALLBACK_BATCH_GET_ORDERED uint16_t uniffi_prolly_bindings_checksum_method_hoststorecallback_batch_get_ordered(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_HOSTSTORECALLBACK_PREFERS_BATCH_READS #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_HOSTSTORECALLBACK_PREFERS_BATCH_READS uint16_t uniffi_prolly_bindings_checksum_method_hoststorecallback_prefers_batch_reads(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_HOSTSTORECALLBACK_SUPPORTS_HINTS #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_HOSTSTORECALLBACK_SUPPORTS_HINTS uint16_t uniffi_prolly_bindings_checksum_method_hoststorecallback_supports_hints(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_HOSTSTORECALLBACK_GET_HINT #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_HOSTSTORECALLBACK_GET_HINT uint16_t uniffi_prolly_bindings_checksum_method_hoststorecallback_get_hint(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_HOSTSTORECALLBACK_PUT_HINT #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_HOSTSTORECALLBACK_PUT_HINT uint16_t uniffi_prolly_bindings_checksum_method_hoststorecallback_put_hint(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_HOSTSTORECALLBACK_LIST_NODE_CIDS #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_HOSTSTORECALLBACK_LIST_NODE_CIDS uint16_t uniffi_prolly_bindings_checksum_method_hoststorecallback_list_node_cids(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_HOSTSTORECALLBACK_GET_ROOT #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_HOSTSTORECALLBACK_GET_ROOT uint16_t uniffi_prolly_bindings_checksum_method_hoststorecallback_get_root(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_HOSTSTORECALLBACK_PUT_ROOT #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_HOSTSTORECALLBACK_PUT_ROOT uint16_t uniffi_prolly_bindings_checksum_method_hoststorecallback_put_root(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_HOSTSTORECALLBACK_DELETE_ROOT #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_HOSTSTORECALLBACK_DELETE_ROOT uint16_t uniffi_prolly_bindings_checksum_method_hoststorecallback_delete_root(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_HOSTSTORECALLBACK_COMPARE_AND_SWAP_ROOT #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_HOSTSTORECALLBACK_COMPARE_AND_SWAP_ROOT uint16_t uniffi_prolly_bindings_checksum_method_hoststorecallback_compare_and_swap_root(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_HOSTSTORECALLBACK_LIST_ROOTS #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_HOSTSTORECALLBACK_LIST_ROOTS uint16_t uniffi_prolly_bindings_checksum_method_hoststorecallback_list_roots(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_MERGEPOLICYREGISTRY_HAS_DEFAULT #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_MERGEPOLICYREGISTRY_HAS_DEFAULT uint16_t uniffi_prolly_bindings_checksum_method_mergepolicyregistry_has_default(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_MERGEPOLICYREGISTRY_IS_EMPTY #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_MERGEPOLICYREGISTRY_IS_EMPTY uint16_t uniffi_prolly_bindings_checksum_method_mergepolicyregistry_is_empty(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_MERGEPOLICYREGISTRY_LEN #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_MERGEPOLICYREGISTRY_LEN uint16_t uniffi_prolly_bindings_checksum_method_mergepolicyregistry_len(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_MERGEPOLICYREGISTRY_PUSH_EXACT_RESOLVER #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_MERGEPOLICYREGISTRY_PUSH_EXACT_RESOLVER uint16_t uniffi_prolly_bindings_checksum_method_mergepolicyregistry_push_exact_resolver(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_MERGEPOLICYREGISTRY_PUSH_EXACT_RESOLVER_NAME #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_MERGEPOLICYREGISTRY_PUSH_EXACT_RESOLVER_NAME uint16_t uniffi_prolly_bindings_checksum_method_mergepolicyregistry_push_exact_resolver_name(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_MERGEPOLICYREGISTRY_PUSH_PREFIX_RESOLVER #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_MERGEPOLICYREGISTRY_PUSH_PREFIX_RESOLVER uint16_t uniffi_prolly_bindings_checksum_method_mergepolicyregistry_push_prefix_resolver(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_MERGEPOLICYREGISTRY_PUSH_PREFIX_RESOLVER_NAME #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_MERGEPOLICYREGISTRY_PUSH_PREFIX_RESOLVER_NAME uint16_t uniffi_prolly_bindings_checksum_method_mergepolicyregistry_push_prefix_resolver_name(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_MERGEPOLICYREGISTRY_SET_DEFAULT_RESOLVER #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_MERGEPOLICYREGISTRY_SET_DEFAULT_RESOLVER uint16_t uniffi_prolly_bindings_checksum_method_mergepolicyregistry_set_default_resolver(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_MERGEPOLICYREGISTRY_SET_DEFAULT_RESOLVER_NAME #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_MERGEPOLICYREGISTRY_SET_DEFAULT_RESOLVER_NAME uint16_t uniffi_prolly_bindings_checksum_method_mergepolicyregistry_set_default_resolver_name(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_MERGERESOLVERCALLBACK_RESOLVE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_MERGERESOLVERCALLBACK_RESOLVE uint16_t uniffi_prolly_bindings_checksum_method_mergeresolvercallback_resolve(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYBLOBSTORE_BLOB_COUNT #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYBLOBSTORE_BLOB_COUNT uint16_t uniffi_prolly_bindings_checksum_method_prollyblobstore_blob_count(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYBLOBSTORE_DELETE_BLOB #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYBLOBSTORE_DELETE_BLOB uint16_t uniffi_prolly_bindings_checksum_method_prollyblobstore_delete_blob(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYBLOBSTORE_GET_BLOB #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYBLOBSTORE_GET_BLOB uint16_t uniffi_prolly_bindings_checksum_method_prollyblobstore_get_blob(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYBLOBSTORE_LIST_BLOB_REFS #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYBLOBSTORE_LIST_BLOB_REFS uint16_t uniffi_prolly_bindings_checksum_method_prollyblobstore_list_blob_refs(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYBLOBSTORE_PUT_BLOB #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYBLOBSTORE_PUT_BLOB uint16_t uniffi_prolly_bindings_checksum_method_prollyblobstore_put_blob(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_APPEND_BATCH #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_APPEND_BATCH uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_append_batch(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_APPEND_BATCH_WITH_STATS #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_APPEND_BATCH_WITH_STATS uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_append_batch_with_stats(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_BATCH #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_BATCH uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_batch(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_BATCH_WITH_STATS #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_BATCH_WITH_STATS uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_batch_with_stats(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_BEGIN_TRANSACTION #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_BEGIN_TRANSACTION uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_begin_transaction(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_BEGIN_VERSIONED_TRANSACTION #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_BEGIN_VERSIONED_TRANSACTION uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_begin_versioned_transaction(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_BUILD_FROM_ENTRIES #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_BUILD_FROM_ENTRIES uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_build_from_entries(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_BUILD_FROM_SORTED_ENTRIES #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_BUILD_FROM_SORTED_ENTRIES uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_build_from_sorted_entries(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_BUILD_PROXIMITY_MAP #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_BUILD_PROXIMITY_MAP uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_build_proximity_map(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_CACHE_STATS #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_CACHE_STATS uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_cache_stats(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_CLEAR_CACHE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_CLEAR_CACHE uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_clear_cache(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_COLLECT_STATS #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_COLLECT_STATS uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_collect_stats(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_COLLECT_STATS_JSON #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_COLLECT_STATS_JSON uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_collect_stats_json(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_COMPARE_AND_SWAP_NAMED_ROOT #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_COMPARE_AND_SWAP_NAMED_ROOT uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_compare_and_swap_named_root(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_COMPARE_AND_SWAP_NAMED_ROOT_AT_MILLIS #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_COMPARE_AND_SWAP_NAMED_ROOT_AT_MILLIS uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_compare_and_swap_named_root_at_millis(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_COMPARE_AND_SWAP_SNAPSHOT #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_COMPARE_AND_SWAP_SNAPSHOT uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_compare_and_swap_snapshot(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_COMPARE_AND_SWAP_SNAPSHOT_AT_MILLIS #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_COMPARE_AND_SWAP_SNAPSHOT_AT_MILLIS uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_compare_and_swap_snapshot_at_millis(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_CONFLICT_PAGE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_CONFLICT_PAGE uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_conflict_page(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_COPY_MISSING_NODES #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_COPY_MISSING_NODES uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_copy_missing_nodes(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_CRDT_MERGE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_CRDT_MERGE uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_crdt_merge(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_CRDT_MERGE_WITH_RESOLVER #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_CRDT_MERGE_WITH_RESOLVER uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_crdt_merge_with_resolver(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_CREATE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_CREATE uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_create(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_CURSOR_WINDOW #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_CURSOR_WINDOW uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_cursor_window(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_DEBUG_COMPARE_TREES #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_DEBUG_COMPARE_TREES uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_debug_compare_trees(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_DEBUG_COMPARE_TREES_JSON #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_DEBUG_COMPARE_TREES_JSON uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_debug_compare_trees_json(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_DEBUG_COMPARE_TREES_TEXT #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_DEBUG_COMPARE_TREES_TEXT uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_debug_compare_trees_text(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_DEBUG_TREE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_DEBUG_TREE uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_debug_tree(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_DEBUG_TREE_JSON #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_DEBUG_TREE_JSON uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_debug_tree_json(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_DEBUG_TREE_TEXT #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_DEBUG_TREE_TEXT uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_debug_tree_text(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_DELETE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_DELETE uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_delete(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_DELETE_NAMED_ROOT #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_DELETE_NAMED_ROOT uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_delete_named_root(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_DELETE_RANGE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_DELETE_RANGE uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_delete_range(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_DELETE_RANGE_WITH_STATS #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_DELETE_RANGE_WITH_STATS uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_delete_range_with_stats(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_DELETE_SNAPSHOT #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_DELETE_SNAPSHOT uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_delete_snapshot(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_DIFF #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_DIFF uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_diff(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_DIFF_FROM_CURSOR #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_DIFF_FROM_CURSOR uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_diff_from_cursor(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_DIFF_PAGE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_DIFF_PAGE uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_diff_page(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_EXPORT_SNAPSHOT #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_EXPORT_SNAPSHOT uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_export_snapshot(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_FIRST_ENTRY #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_FIRST_ENTRY uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_first_entry(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_GET #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_GET uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_get(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_GET_LARGE_VALUE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_GET_LARGE_VALUE uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_get_large_value(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_GET_MANY #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_GET_MANY uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_get_many(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_GET_VALUE_REF #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_GET_VALUE_REF uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_get_value_ref(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_HYDRATE_PREFIX_PATH_HINT #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_HYDRATE_PREFIX_PATH_HINT uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_hydrate_prefix_path_hint(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_IMPORT_SNAPSHOT #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_IMPORT_SNAPSHOT uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_import_snapshot(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_INDEXED_MAP #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_INDEXED_MAP uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_indexed_map(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_LAST_ENTRY #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_LAST_ENTRY uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_last_entry(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_LIST_NAMED_ROOT_MANIFESTS #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_LIST_NAMED_ROOT_MANIFESTS uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_list_named_root_manifests(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_LIST_NAMED_ROOTS #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_LIST_NAMED_ROOTS uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_list_named_roots(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_LIST_NODE_CIDS #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_LIST_NODE_CIDS uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_list_node_cids(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_LIST_SNAPSHOTS #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_LIST_SNAPSHOTS uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_list_snapshots(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_LOAD_CHANGED_SPANS_HINT #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_LOAD_CHANGED_SPANS_HINT uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_load_changed_spans_hint(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_LOAD_NAMED_ROOT #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_LOAD_NAMED_ROOT uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_load_named_root(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_LOAD_NAMED_ROOTS #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_LOAD_NAMED_ROOTS uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_load_named_roots(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_LOAD_PROXIMITY_MAP #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_LOAD_PROXIMITY_MAP uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_load_proximity_map(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_LOAD_RETAINED_NAMED_ROOTS #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_LOAD_RETAINED_NAMED_ROOTS uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_load_retained_named_roots(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_LOAD_SNAPSHOT #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_LOAD_SNAPSHOT uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_load_snapshot(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_LOAD_SNAPSHOTS #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_LOAD_SNAPSHOTS uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_load_snapshots(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_LOWER_BOUND #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_LOWER_BOUND uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_lower_bound(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_MARK_REACHABLE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_MARK_REACHABLE uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_mark_reachable(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_MARK_REACHABLE_BLOBS #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_MARK_REACHABLE_BLOBS uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_mark_reachable_blobs(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_MERGE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_MERGE uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_merge(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_MERGE_EXPLAIN #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_MERGE_EXPLAIN uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_merge_explain(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_MERGE_EXPLAIN_WITH_POLICY #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_MERGE_EXPLAIN_WITH_POLICY uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_merge_explain_with_policy(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_MERGE_EXPLAIN_WITH_RESOLVER #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_MERGE_EXPLAIN_WITH_RESOLVER uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_merge_explain_with_resolver(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_MERGE_PREFIX #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_MERGE_PREFIX uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_merge_prefix(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_MERGE_PREFIX_WITH_POLICY #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_MERGE_PREFIX_WITH_POLICY uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_merge_prefix_with_policy(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_MERGE_PREFIX_WITH_RESOLVER #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_MERGE_PREFIX_WITH_RESOLVER uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_merge_prefix_with_resolver(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_MERGE_RANGE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_MERGE_RANGE uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_merge_range(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_MERGE_RANGE_WITH_POLICY #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_MERGE_RANGE_WITH_POLICY uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_merge_range_with_policy(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_MERGE_RANGE_WITH_RESOLVER #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_MERGE_RANGE_WITH_RESOLVER uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_merge_range_with_resolver(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_MERGE_WITH_POLICY #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_MERGE_WITH_POLICY uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_merge_with_policy(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_MERGE_WITH_RESOLVER #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_MERGE_WITH_RESOLVER uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_merge_with_resolver(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_METRICS #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_METRICS uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_metrics(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_PARALLEL_BATCH #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_PARALLEL_BATCH uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_parallel_batch(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_PARALLEL_BATCH_WITH_STATS #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_PARALLEL_BATCH_WITH_STATS uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_parallel_batch_with_stats(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_PIN_TREE_PATH #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_PIN_TREE_PATH uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_pin_tree_path(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_PIN_TREE_ROOT #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_PIN_TREE_ROOT uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_pin_tree_root(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_PLAN_BLOB_GC #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_PLAN_BLOB_GC uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_plan_blob_gc(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_PLAN_BLOB_STORE_GC #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_PLAN_BLOB_STORE_GC uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_plan_blob_store_gc(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_PLAN_GC #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_PLAN_GC uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_plan_gc(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_PLAN_MISSING_NODES #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_PLAN_MISSING_NODES uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_plan_missing_nodes(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_PLAN_STORE_GC #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_PLAN_STORE_GC uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_plan_store_gc(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_PLAN_STORE_GC_FOR_RETENTION #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_PLAN_STORE_GC_FOR_RETENTION uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_plan_store_gc_for_retention(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_PREFIX #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_PREFIX uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_prefix(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_PREFIX_PAGE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_PREFIX_PAGE uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_prefix_page(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_PREFIX_REVERSE_PAGE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_PREFIX_REVERSE_PAGE uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_prefix_reverse_page(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_PROVE_DIFF_PAGE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_PROVE_DIFF_PAGE uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_prove_diff_page(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_PROVE_KEY #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_PROVE_KEY uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_prove_key(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_PROVE_KEYS #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_PROVE_KEYS uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_prove_keys(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_PROVE_PREFIX #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_PROVE_PREFIX uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_prove_prefix(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_PROVE_RANGE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_PROVE_RANGE uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_prove_range(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_PROVE_RANGE_PAGE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_PROVE_RANGE_PAGE uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_prove_range_page(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_PROXIMITY_SEARCH_RUNTIME #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_PROXIMITY_SEARCH_RUNTIME uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_proximity_search_runtime(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_PUBLISH_CHANGED_SPANS_HINT #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_PUBLISH_CHANGED_SPANS_HINT uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_publish_changed_spans_hint(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_PUBLISH_NAMED_ROOT #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_PUBLISH_NAMED_ROOT uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_publish_named_root(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_PUBLISH_NAMED_ROOT_AT_MILLIS #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_PUBLISH_NAMED_ROOT_AT_MILLIS uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_publish_named_root_at_millis(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_PUBLISH_PREFIX_PATH_HINT #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_PUBLISH_PREFIX_PATH_HINT uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_publish_prefix_path_hint(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_PUBLISH_SNAPSHOT #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_PUBLISH_SNAPSHOT uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_publish_snapshot(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_PUBLISH_SNAPSHOT_AT_MILLIS #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_PUBLISH_SNAPSHOT_AT_MILLIS uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_publish_snapshot_at_millis(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_PUT #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_PUT uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_put(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_PUT_LARGE_VALUE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_PUT_LARGE_VALUE uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_put_large_value(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_RANGE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_RANGE uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_range(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_RANGE_AFTER #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_RANGE_AFTER uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_range_after(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_RANGE_DIFF #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_RANGE_DIFF uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_range_diff(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_RANGE_FROM_CURSOR #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_RANGE_FROM_CURSOR uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_range_from_cursor(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_RANGE_PAGE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_RANGE_PAGE uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_range_page(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_READ_SESSION #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_READ_SESSION uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_read_session(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_RESET_METRICS #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_RESET_METRICS uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_reset_metrics(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_REVERSE_PAGE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_REVERSE_PAGE uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_reverse_page(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_SCAN_CONFLICTS #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_SCAN_CONFLICTS uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_scan_conflicts(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_SCAN_DIFF #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_SCAN_DIFF uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_scan_diff(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_SCAN_PREFIX #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_SCAN_PREFIX uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_scan_prefix(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_SCAN_PREFIX_REVERSE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_SCAN_PREFIX_REVERSE uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_scan_prefix_reverse(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_SCAN_RANGE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_SCAN_RANGE uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_scan_range(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_SCAN_RANGE_DIFF #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_SCAN_RANGE_DIFF uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_scan_range_diff(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_SCAN_RANGE_REVERSE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_SCAN_RANGE_REVERSE uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_scan_range_reverse(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_STATS_DIFF #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_STATS_DIFF uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_stats_diff(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_STATS_DIFF_JSON #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_STATS_DIFF_JSON uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_stats_diff_json(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_STRUCTURAL_DIFF_PAGE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_STRUCTURAL_DIFF_PAGE uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_structural_diff_page(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_STRUCTURAL_DIFF_PAGE_WITH_CURSOR #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_STRUCTURAL_DIFF_PAGE_WITH_CURSOR uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_structural_diff_page_with_cursor(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_SWEEP_BLOB_GC #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_SWEEP_BLOB_GC uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_sweep_blob_gc(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_SWEEP_BLOB_STORE_GC #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_SWEEP_BLOB_STORE_GC uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_sweep_blob_store_gc(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_SWEEP_GC #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_SWEEP_GC uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_sweep_gc(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_SWEEP_STORE_GC #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_SWEEP_STORE_GC uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_sweep_store_gc(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_SWEEP_STORE_GC_FOR_RETENTION #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_SWEEP_STORE_GC_FOR_RETENTION uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_sweep_store_gc_for_retention(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_UNPIN_ALL_CACHE_NODES #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_UNPIN_ALL_CACHE_NODES uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_unpin_all_cache_nodes(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_UPPER_BOUND #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_UPPER_BOUND uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_upper_bound(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_VERSIONED_MAP #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYENGINE_VERSIONED_MAP uint16_t uniffi_prolly_bindings_checksum_method_prollyengine_versioned_map(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYREADSESSION_FAST_HANDLE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYREADSESSION_FAST_HANDLE uint16_t uniffi_prolly_bindings_checksum_method_prollyreadsession_fast_handle(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYREADSESSION_GET #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYREADSESSION_GET uint16_t uniffi_prolly_bindings_checksum_method_prollyreadsession_get(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYREADSESSION_GET_MANY #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYREADSESSION_GET_MANY uint16_t uniffi_prolly_bindings_checksum_method_prollyreadsession_get_many(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYREADSESSION_SCAN_CONFLICTS #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYREADSESSION_SCAN_CONFLICTS uint16_t uniffi_prolly_bindings_checksum_method_prollyreadsession_scan_conflicts(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYREADSESSION_SCAN_RANGE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYREADSESSION_SCAN_RANGE uint16_t uniffi_prolly_bindings_checksum_method_prollyreadsession_scan_range(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYREADSESSION_SCAN_RANGE_DIFF #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYREADSESSION_SCAN_RANGE_DIFF uint16_t uniffi_prolly_bindings_checksum_method_prollyreadsession_scan_range_diff(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYTRANSACTION_BATCH #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYTRANSACTION_BATCH uint16_t uniffi_prolly_bindings_checksum_method_prollytransaction_batch(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYTRANSACTION_COMMIT #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYTRANSACTION_COMMIT uint16_t uniffi_prolly_bindings_checksum_method_prollytransaction_commit(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYTRANSACTION_COMPARE_AND_SWAP_NAMED_ROOT #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYTRANSACTION_COMPARE_AND_SWAP_NAMED_ROOT uint16_t uniffi_prolly_bindings_checksum_method_prollytransaction_compare_and_swap_named_root(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYTRANSACTION_CREATE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYTRANSACTION_CREATE uint16_t uniffi_prolly_bindings_checksum_method_prollytransaction_create(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYTRANSACTION_DELETE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYTRANSACTION_DELETE uint16_t uniffi_prolly_bindings_checksum_method_prollytransaction_delete(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYTRANSACTION_DELETE_NAMED_ROOT #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYTRANSACTION_DELETE_NAMED_ROOT uint16_t uniffi_prolly_bindings_checksum_method_prollytransaction_delete_named_root(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYTRANSACTION_GET #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYTRANSACTION_GET uint16_t uniffi_prolly_bindings_checksum_method_prollytransaction_get(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYTRANSACTION_LOAD_NAMED_ROOT #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYTRANSACTION_LOAD_NAMED_ROOT uint16_t uniffi_prolly_bindings_checksum_method_prollytransaction_load_named_root(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYTRANSACTION_PUBLISH_NAMED_ROOT #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYTRANSACTION_PUBLISH_NAMED_ROOT uint16_t uniffi_prolly_bindings_checksum_method_prollytransaction_publish_named_root(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYTRANSACTION_PUT #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYTRANSACTION_PUT uint16_t uniffi_prolly_bindings_checksum_method_prollytransaction_put(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYTRANSACTION_ROLLBACK #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROLLYTRANSACTION_ROLLBACK uint16_t uniffi_prolly_bindings_checksum_method_prollytransaction_rollback(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_ASYNCPROLLYENGINE_BATCH #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_ASYNCPROLLYENGINE_BATCH uint16_t uniffi_prolly_bindings_checksum_method_asyncprollyengine_batch(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_ASYNCPROLLYENGINE_BEGIN_TRANSACTION #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_ASYNCPROLLYENGINE_BEGIN_TRANSACTION uint16_t uniffi_prolly_bindings_checksum_method_asyncprollyengine_begin_transaction(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_ASYNCPROLLYENGINE_COLLECT_STATS #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_ASYNCPROLLYENGINE_COLLECT_STATS uint16_t uniffi_prolly_bindings_checksum_method_asyncprollyengine_collect_stats(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_ASYNCPROLLYENGINE_COMPARE_AND_SWAP_NAMED_ROOT #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_ASYNCPROLLYENGINE_COMPARE_AND_SWAP_NAMED_ROOT uint16_t uniffi_prolly_bindings_checksum_method_asyncprollyengine_compare_and_swap_named_root(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_ASYNCPROLLYENGINE_CREATE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_ASYNCPROLLYENGINE_CREATE uint16_t uniffi_prolly_bindings_checksum_method_asyncprollyengine_create(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_ASYNCPROLLYENGINE_DELETE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_ASYNCPROLLYENGINE_DELETE uint16_t uniffi_prolly_bindings_checksum_method_asyncprollyengine_delete(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_ASYNCPROLLYENGINE_DELETE_NAMED_ROOT #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_ASYNCPROLLYENGINE_DELETE_NAMED_ROOT uint16_t uniffi_prolly_bindings_checksum_method_asyncprollyengine_delete_named_root(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_ASYNCPROLLYENGINE_DIFF #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_ASYNCPROLLYENGINE_DIFF uint16_t uniffi_prolly_bindings_checksum_method_asyncprollyengine_diff(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_ASYNCPROLLYENGINE_GET #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_ASYNCPROLLYENGINE_GET uint16_t uniffi_prolly_bindings_checksum_method_asyncprollyengine_get(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_ASYNCPROLLYENGINE_GET_MANY #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_ASYNCPROLLYENGINE_GET_MANY uint16_t uniffi_prolly_bindings_checksum_method_asyncprollyengine_get_many(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_ASYNCPROLLYENGINE_LIST_NAMED_ROOTS #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_ASYNCPROLLYENGINE_LIST_NAMED_ROOTS uint16_t uniffi_prolly_bindings_checksum_method_asyncprollyengine_list_named_roots(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_ASYNCPROLLYENGINE_LOAD_NAMED_ROOT #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_ASYNCPROLLYENGINE_LOAD_NAMED_ROOT uint16_t uniffi_prolly_bindings_checksum_method_asyncprollyengine_load_named_root(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_ASYNCPROLLYENGINE_MERGE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_ASYNCPROLLYENGINE_MERGE uint16_t uniffi_prolly_bindings_checksum_method_asyncprollyengine_merge(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_ASYNCPROLLYENGINE_PREFIX #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_ASYNCPROLLYENGINE_PREFIX uint16_t uniffi_prolly_bindings_checksum_method_asyncprollyengine_prefix(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_ASYNCPROLLYENGINE_PUBLISH_NAMED_ROOT #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_ASYNCPROLLYENGINE_PUBLISH_NAMED_ROOT uint16_t uniffi_prolly_bindings_checksum_method_asyncprollyengine_publish_named_root(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_ASYNCPROLLYENGINE_PUBLISH_NAMED_ROOT_AT_MILLIS #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_ASYNCPROLLYENGINE_PUBLISH_NAMED_ROOT_AT_MILLIS uint16_t uniffi_prolly_bindings_checksum_method_asyncprollyengine_publish_named_root_at_millis(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_ASYNCPROLLYENGINE_PUT #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_ASYNCPROLLYENGINE_PUT uint16_t uniffi_prolly_bindings_checksum_method_asyncprollyengine_put(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_ASYNCPROLLYENGINE_RANGE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_ASYNCPROLLYENGINE_RANGE uint16_t uniffi_prolly_bindings_checksum_method_asyncprollyengine_range(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_ASYNCPROLLYENGINE_RANGE_PAGE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_ASYNCPROLLYENGINE_RANGE_PAGE uint16_t uniffi_prolly_bindings_checksum_method_asyncprollyengine_range_page(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_ASYNCPROLLYTRANSACTION_BATCH #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_ASYNCPROLLYTRANSACTION_BATCH uint16_t uniffi_prolly_bindings_checksum_method_asyncprollytransaction_batch(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_ASYNCPROLLYTRANSACTION_COMMIT #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_ASYNCPROLLYTRANSACTION_COMMIT uint16_t uniffi_prolly_bindings_checksum_method_asyncprollytransaction_commit(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_ASYNCPROLLYTRANSACTION_COMPARE_AND_SWAP_NAMED_ROOT #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_ASYNCPROLLYTRANSACTION_COMPARE_AND_SWAP_NAMED_ROOT uint16_t uniffi_prolly_bindings_checksum_method_asyncprollytransaction_compare_and_swap_named_root(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_ASYNCPROLLYTRANSACTION_CREATE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_ASYNCPROLLYTRANSACTION_CREATE uint16_t uniffi_prolly_bindings_checksum_method_asyncprollytransaction_create(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_ASYNCPROLLYTRANSACTION_DELETE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_ASYNCPROLLYTRANSACTION_DELETE uint16_t uniffi_prolly_bindings_checksum_method_asyncprollytransaction_delete(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_ASYNCPROLLYTRANSACTION_DELETE_NAMED_ROOT #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_ASYNCPROLLYTRANSACTION_DELETE_NAMED_ROOT uint16_t uniffi_prolly_bindings_checksum_method_asyncprollytransaction_delete_named_root(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_ASYNCPROLLYTRANSACTION_GET #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_ASYNCPROLLYTRANSACTION_GET uint16_t uniffi_prolly_bindings_checksum_method_asyncprollytransaction_get(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_ASYNCPROLLYTRANSACTION_LOAD_NAMED_ROOT #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_ASYNCPROLLYTRANSACTION_LOAD_NAMED_ROOT uint16_t uniffi_prolly_bindings_checksum_method_asyncprollytransaction_load_named_root(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_ASYNCPROLLYTRANSACTION_PUBLISH_NAMED_ROOT #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_ASYNCPROLLYTRANSACTION_PUBLISH_NAMED_ROOT uint16_t uniffi_prolly_bindings_checksum_method_asyncprollytransaction_publish_named_root(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_ASYNCPROLLYTRANSACTION_PUBLISH_NAMED_ROOT_AT_MILLIS #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_ASYNCPROLLYTRANSACTION_PUBLISH_NAMED_ROOT_AT_MILLIS uint16_t uniffi_prolly_bindings_checksum_method_asyncprollytransaction_publish_named_root_at_millis(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_ASYNCPROLLYTRANSACTION_PUT #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_ASYNCPROLLYTRANSACTION_PUT uint16_t uniffi_prolly_bindings_checksum_method_asyncprollytransaction_put(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_ASYNCPROLLYTRANSACTION_ROLLBACK #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_ASYNCPROLLYTRANSACTION_ROLLBACK uint16_t uniffi_prolly_bindings_checksum_method_asyncprollytransaction_rollback(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_FOREIGNREMOTESTORE_DESCRIPTOR #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_FOREIGNREMOTESTORE_DESCRIPTOR uint16_t uniffi_prolly_bindings_checksum_method_foreignremotestore_descriptor(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_FOREIGNREMOTESTORE_GET_NODE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_FOREIGNREMOTESTORE_GET_NODE uint16_t uniffi_prolly_bindings_checksum_method_foreignremotestore_get_node(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_FOREIGNREMOTESTORE_PUT_NODE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_FOREIGNREMOTESTORE_PUT_NODE uint16_t uniffi_prolly_bindings_checksum_method_foreignremotestore_put_node(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_FOREIGNREMOTESTORE_DELETE_NODE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_FOREIGNREMOTESTORE_DELETE_NODE uint16_t uniffi_prolly_bindings_checksum_method_foreignremotestore_delete_node(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_FOREIGNREMOTESTORE_BATCH_NODES #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_FOREIGNREMOTESTORE_BATCH_NODES uint16_t uniffi_prolly_bindings_checksum_method_foreignremotestore_batch_nodes(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_FOREIGNREMOTESTORE_PUBLISH_NODES @@ -6642,1711 +6741,1789 @@ uint16_t uniffi_prolly_bindings_checksum_method_foreignremotestore_publish_nodes #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_FOREIGNREMOTESTORE_BATCH_GET_NODES_ORDERED #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_FOREIGNREMOTESTORE_BATCH_GET_NODES_ORDERED uint16_t uniffi_prolly_bindings_checksum_method_foreignremotestore_batch_get_nodes_ordered(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_FOREIGNREMOTESTORE_LIST_NODE_CIDS #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_FOREIGNREMOTESTORE_LIST_NODE_CIDS uint16_t uniffi_prolly_bindings_checksum_method_foreignremotestore_list_node_cids(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_FOREIGNREMOTESTORE_GET_HINT #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_FOREIGNREMOTESTORE_GET_HINT uint16_t uniffi_prolly_bindings_checksum_method_foreignremotestore_get_hint(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_FOREIGNREMOTESTORE_PUT_HINT #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_FOREIGNREMOTESTORE_PUT_HINT uint16_t uniffi_prolly_bindings_checksum_method_foreignremotestore_put_hint(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_FOREIGNREMOTESTORE_BATCH_PUT_NODES_WITH_HINT #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_FOREIGNREMOTESTORE_BATCH_PUT_NODES_WITH_HINT uint16_t uniffi_prolly_bindings_checksum_method_foreignremotestore_batch_put_nodes_with_hint(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_FOREIGNREMOTESTORE_GET_ROOT_MANIFEST #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_FOREIGNREMOTESTORE_GET_ROOT_MANIFEST uint16_t uniffi_prolly_bindings_checksum_method_foreignremotestore_get_root_manifest(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_FOREIGNREMOTESTORE_PUT_ROOT_MANIFEST #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_FOREIGNREMOTESTORE_PUT_ROOT_MANIFEST uint16_t uniffi_prolly_bindings_checksum_method_foreignremotestore_put_root_manifest(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_FOREIGNREMOTESTORE_DELETE_ROOT_MANIFEST #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_FOREIGNREMOTESTORE_DELETE_ROOT_MANIFEST uint16_t uniffi_prolly_bindings_checksum_method_foreignremotestore_delete_root_manifest(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_FOREIGNREMOTESTORE_COMPARE_AND_SWAP_ROOT_MANIFEST #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_FOREIGNREMOTESTORE_COMPARE_AND_SWAP_ROOT_MANIFEST uint16_t uniffi_prolly_bindings_checksum_method_foreignremotestore_compare_and_swap_root_manifest(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_FOREIGNREMOTESTORE_LIST_ROOT_MANIFESTS #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_FOREIGNREMOTESTORE_LIST_ROOT_MANIFESTS uint16_t uniffi_prolly_bindings_checksum_method_foreignremotestore_list_root_manifests(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_FOREIGNREMOTESTORE_COMMIT_TRANSACTION #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_FOREIGNREMOTESTORE_COMMIT_TRANSACTION uint16_t uniffi_prolly_bindings_checksum_method_foreignremotestore_commit_transaction(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGINDEXREGISTRY_LEN #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGINDEXREGISTRY_LEN uint16_t uniffi_prolly_bindings_checksum_method_bindingindexregistry_len(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGINDEXREGISTRY_REGISTER #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGINDEXREGISTRY_REGISTER uint16_t uniffi_prolly_bindings_checksum_method_bindingindexregistry_register(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGINDEXEDMAP_APPLY #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGINDEXEDMAP_APPLY uint16_t uniffi_prolly_bindings_checksum_method_bindingindexedmap_apply(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGINDEXEDMAP_APPLY_IF #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGINDEXEDMAP_APPLY_IF uint16_t uniffi_prolly_bindings_checksum_method_bindingindexedmap_apply_if(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGINDEXEDMAP_DEACTIVATE_INDEX #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGINDEXEDMAP_DEACTIVATE_INDEX uint16_t uniffi_prolly_bindings_checksum_method_bindingindexedmap_deactivate_index(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGINDEXEDMAP_DELETE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGINDEXEDMAP_DELETE uint16_t uniffi_prolly_bindings_checksum_method_bindingindexedmap_delete(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGINDEXEDMAP_ENSURE_INDEX #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGINDEXEDMAP_ENSURE_INDEX uint16_t uniffi_prolly_bindings_checksum_method_bindingindexedmap_ensure_index(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGINDEXEDMAP_EXPORT_CURRENT #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGINDEXEDMAP_EXPORT_CURRENT uint16_t uniffi_prolly_bindings_checksum_method_bindingindexedmap_export_current(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGINDEXEDMAP_FAST_HANDLE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGINDEXEDMAP_FAST_HANDLE uint16_t uniffi_prolly_bindings_checksum_method_bindingindexedmap_fast_handle(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGINDEXEDMAP_GET #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGINDEXEDMAP_GET uint16_t uniffi_prolly_bindings_checksum_method_bindingindexedmap_get(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGINDEXEDMAP_HEALTH #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGINDEXEDMAP_HEALTH uint16_t uniffi_prolly_bindings_checksum_method_bindingindexedmap_health(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGINDEXEDMAP_ID #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGINDEXEDMAP_ID uint16_t uniffi_prolly_bindings_checksum_method_bindingindexedmap_id(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGINDEXEDMAP_IMPORT_CURRENT #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGINDEXEDMAP_IMPORT_CURRENT uint16_t uniffi_prolly_bindings_checksum_method_bindingindexedmap_import_current(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGINDEXEDMAP_KEEP_LAST #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGINDEXEDMAP_KEEP_LAST uint16_t uniffi_prolly_bindings_checksum_method_bindingindexedmap_keep_last(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGINDEXEDMAP_METRICS #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGINDEXEDMAP_METRICS uint16_t uniffi_prolly_bindings_checksum_method_bindingindexedmap_metrics(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGINDEXEDMAP_PLAN_GC #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGINDEXEDMAP_PLAN_GC uint16_t uniffi_prolly_bindings_checksum_method_bindingindexedmap_plan_gc(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGINDEXEDMAP_PUT #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGINDEXEDMAP_PUT uint16_t uniffi_prolly_bindings_checksum_method_bindingindexedmap_put(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGINDEXEDMAP_REPAIR_INDEX #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGINDEXEDMAP_REPAIR_INDEX uint16_t uniffi_prolly_bindings_checksum_method_bindingindexedmap_repair_index(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGINDEXEDMAP_REPLACE_INDEX #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGINDEXEDMAP_REPLACE_INDEX uint16_t uniffi_prolly_bindings_checksum_method_bindingindexedmap_replace_index(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGINDEXEDMAP_SNAPSHOT #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGINDEXEDMAP_SNAPSHOT uint16_t uniffi_prolly_bindings_checksum_method_bindingindexedmap_snapshot(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGINDEXEDMAP_SNAPSHOT_AT #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGINDEXEDMAP_SNAPSHOT_AT uint16_t uniffi_prolly_bindings_checksum_method_bindingindexedmap_snapshot_at(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGINDEXEDMAP_SNAPSHOT_BY_ID #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGINDEXEDMAP_SNAPSHOT_BY_ID uint16_t uniffi_prolly_bindings_checksum_method_bindingindexedmap_snapshot_by_id(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGINDEXEDMAP_VERIFY_ALL #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGINDEXEDMAP_VERIFY_ALL uint16_t uniffi_prolly_bindings_checksum_method_bindingindexedmap_verify_all(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGINDEXEDMAP_VERIFY_INDEX #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGINDEXEDMAP_VERIFY_INDEX uint16_t uniffi_prolly_bindings_checksum_method_bindingindexedmap_verify_index(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGINDEXEDSNAPSHOT_ID #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGINDEXEDSNAPSHOT_ID uint16_t uniffi_prolly_bindings_checksum_method_bindingindexedsnapshot_id(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGINDEXEDSNAPSHOT_INDEX #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGINDEXEDSNAPSHOT_INDEX uint16_t uniffi_prolly_bindings_checksum_method_bindingindexedsnapshot_index(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGSECONDARYINDEXSNAPSHOT_EXACT #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGSECONDARYINDEXSNAPSHOT_EXACT uint16_t uniffi_prolly_bindings_checksum_method_bindingsecondaryindexsnapshot_exact(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGSECONDARYINDEXSNAPSHOT_EXACT_PAGE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGSECONDARYINDEXSNAPSHOT_EXACT_PAGE uint16_t uniffi_prolly_bindings_checksum_method_bindingsecondaryindexsnapshot_exact_page(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGSECONDARYINDEXSNAPSHOT_EXACT_REVERSE_PAGE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGSECONDARYINDEXSNAPSHOT_EXACT_REVERSE_PAGE uint16_t uniffi_prolly_bindings_checksum_method_bindingsecondaryindexsnapshot_exact_reverse_page(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGSECONDARYINDEXSNAPSHOT_FAST_HANDLE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGSECONDARYINDEXSNAPSHOT_FAST_HANDLE uint16_t uniffi_prolly_bindings_checksum_method_bindingsecondaryindexsnapshot_fast_handle(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGSECONDARYINDEXSNAPSHOT_NAME #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGSECONDARYINDEXSNAPSHOT_NAME uint16_t uniffi_prolly_bindings_checksum_method_bindingsecondaryindexsnapshot_name(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGSECONDARYINDEXSNAPSHOT_PREFIX #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGSECONDARYINDEXSNAPSHOT_PREFIX uint16_t uniffi_prolly_bindings_checksum_method_bindingsecondaryindexsnapshot_prefix(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGSECONDARYINDEXSNAPSHOT_PREFIX_PAGE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGSECONDARYINDEXSNAPSHOT_PREFIX_PAGE uint16_t uniffi_prolly_bindings_checksum_method_bindingsecondaryindexsnapshot_prefix_page(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGSECONDARYINDEXSNAPSHOT_PREFIX_REVERSE_PAGE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGSECONDARYINDEXSNAPSHOT_PREFIX_REVERSE_PAGE uint16_t uniffi_prolly_bindings_checksum_method_bindingsecondaryindexsnapshot_prefix_reverse_page(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGSECONDARYINDEXSNAPSHOT_RANGE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGSECONDARYINDEXSNAPSHOT_RANGE uint16_t uniffi_prolly_bindings_checksum_method_bindingsecondaryindexsnapshot_range(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGSECONDARYINDEXSNAPSHOT_RANGE_PAGE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGSECONDARYINDEXSNAPSHOT_RANGE_PAGE uint16_t uniffi_prolly_bindings_checksum_method_bindingsecondaryindexsnapshot_range_page(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGSECONDARYINDEXSNAPSHOT_RANGE_REVERSE_PAGE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGSECONDARYINDEXSNAPSHOT_RANGE_REVERSE_PAGE uint16_t uniffi_prolly_bindings_checksum_method_bindingsecondaryindexsnapshot_range_reverse_page(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGSECONDARYINDEXSNAPSHOT_RECORDS #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGSECONDARYINDEXSNAPSHOT_RECORDS uint16_t uniffi_prolly_bindings_checksum_method_bindingsecondaryindexsnapshot_records(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_SECONDARYINDEXEXTRACTORCALLBACK_EXTRACT #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_SECONDARYINDEXEXTRACTORCALLBACK_EXTRACT uint16_t uniffi_prolly_bindings_checksum_method_secondaryindexextractorcallback_extract(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGACCELERATORCATALOG_ENTRIES #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGACCELERATORCATALOG_ENTRIES uint16_t uniffi_prolly_bindings_checksum_method_bindingacceleratorcatalog_entries(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGACCELERATORCATALOG_MANIFEST #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGACCELERATORCATALOG_MANIFEST uint16_t uniffi_prolly_bindings_checksum_method_bindingacceleratorcatalog_manifest(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGACCELERATORCATALOG_PROVE_SEARCH #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGACCELERATORCATALOG_PROVE_SEARCH uint16_t uniffi_prolly_bindings_checksum_method_bindingacceleratorcatalog_prove_search(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGACCELERATORCATALOG_SEARCH #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGACCELERATORCATALOG_SEARCH uint16_t uniffi_prolly_bindings_checksum_method_bindingacceleratorcatalog_search(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGACCELERATORCATALOG_SEARCH_CANCELLABLE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGACCELERATORCATALOG_SEARCH_CANCELLABLE uint16_t uniffi_prolly_bindings_checksum_method_bindingacceleratorcatalog_search_cancellable(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGACCELERATORCATALOG_SEARCH_WITH_RUNTIME #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGACCELERATORCATALOG_SEARCH_WITH_RUNTIME uint16_t uniffi_prolly_bindings_checksum_method_bindingacceleratorcatalog_search_with_runtime(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGACCELERATORCATALOG_SOURCE_DESCRIPTOR #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGACCELERATORCATALOG_SOURCE_DESCRIPTOR uint16_t uniffi_prolly_bindings_checksum_method_bindingacceleratorcatalog_source_descriptor(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGCOMPOSITEACCELERATOR_BASE_KIND #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGCOMPOSITEACCELERATOR_BASE_KIND uint16_t uniffi_prolly_bindings_checksum_method_bindingcompositeaccelerator_base_kind(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGCOMPOSITEACCELERATOR_BASE_SOURCE_DESCRIPTOR #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGCOMPOSITEACCELERATOR_BASE_SOURCE_DESCRIPTOR uint16_t uniffi_prolly_bindings_checksum_method_bindingcompositeaccelerator_base_source_descriptor(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGCOMPOSITEACCELERATOR_BUILD_STATS #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGCOMPOSITEACCELERATOR_BUILD_STATS uint16_t uniffi_prolly_bindings_checksum_method_bindingcompositeaccelerator_build_stats(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGCOMPOSITEACCELERATOR_CONFIG #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGCOMPOSITEACCELERATOR_CONFIG uint16_t uniffi_prolly_bindings_checksum_method_bindingcompositeaccelerator_config(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGCOMPOSITEACCELERATOR_CURRENT_SOURCE_DESCRIPTOR #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGCOMPOSITEACCELERATOR_CURRENT_SOURCE_DESCRIPTOR uint16_t uniffi_prolly_bindings_checksum_method_bindingcompositeaccelerator_current_source_descriptor(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGCOMPOSITEACCELERATOR_DELTA_COUNT #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGCOMPOSITEACCELERATOR_DELTA_COUNT uint16_t uniffi_prolly_bindings_checksum_method_bindingcompositeaccelerator_delta_count(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGCOMPOSITEACCELERATOR_MANIFEST #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGCOMPOSITEACCELERATOR_MANIFEST uint16_t uniffi_prolly_bindings_checksum_method_bindingcompositeaccelerator_manifest(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGCOMPOSITEACCELERATOR_PROVE_SEARCH #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGCOMPOSITEACCELERATOR_PROVE_SEARCH uint16_t uniffi_prolly_bindings_checksum_method_bindingcompositeaccelerator_prove_search(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGCOMPOSITEACCELERATOR_SEARCH #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGCOMPOSITEACCELERATOR_SEARCH uint16_t uniffi_prolly_bindings_checksum_method_bindingcompositeaccelerator_search(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGCOMPOSITEACCELERATOR_SEARCH_CANCELLABLE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGCOMPOSITEACCELERATOR_SEARCH_CANCELLABLE uint16_t uniffi_prolly_bindings_checksum_method_bindingcompositeaccelerator_search_cancellable(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGCOMPOSITEACCELERATOR_SEARCH_WITH_RUNTIME #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGCOMPOSITEACCELERATOR_SEARCH_WITH_RUNTIME uint16_t uniffi_prolly_bindings_checksum_method_bindingcompositeaccelerator_search_with_runtime(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGCOMPOSITEACCELERATOR_SHADOW_COUNT #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGCOMPOSITEACCELERATOR_SHADOW_COUNT uint16_t uniffi_prolly_bindings_checksum_method_bindingcompositeaccelerator_shadow_count(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGHNSWINDEX_CONFIG #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGHNSWINDEX_CONFIG uint16_t uniffi_prolly_bindings_checksum_method_bindinghnswindex_config(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGHNSWINDEX_IS_CANONICAL #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGHNSWINDEX_IS_CANONICAL uint16_t uniffi_prolly_bindings_checksum_method_bindinghnswindex_is_canonical(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGHNSWINDEX_MANIFEST #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGHNSWINDEX_MANIFEST uint16_t uniffi_prolly_bindings_checksum_method_bindinghnswindex_manifest(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGHNSWINDEX_PROVE_SEARCH #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGHNSWINDEX_PROVE_SEARCH uint16_t uniffi_prolly_bindings_checksum_method_bindinghnswindex_prove_search(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGHNSWINDEX_SEARCH #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGHNSWINDEX_SEARCH uint16_t uniffi_prolly_bindings_checksum_method_bindinghnswindex_search(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGHNSWINDEX_SEARCH_CANCELLABLE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGHNSWINDEX_SEARCH_CANCELLABLE uint16_t uniffi_prolly_bindings_checksum_method_bindinghnswindex_search_cancellable(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGHNSWINDEX_SEARCH_WITH_RUNTIME #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGHNSWINDEX_SEARCH_WITH_RUNTIME uint16_t uniffi_prolly_bindings_checksum_method_bindinghnswindex_search_with_runtime(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGHNSWINDEX_SOURCE_DESCRIPTOR #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGHNSWINDEX_SOURCE_DESCRIPTOR uint16_t uniffi_prolly_bindings_checksum_method_bindinghnswindex_source_descriptor(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPRODUCTQUANTIZER_CONFIG #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPRODUCTQUANTIZER_CONFIG uint16_t uniffi_prolly_bindings_checksum_method_bindingproductquantizer_config(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPRODUCTQUANTIZER_MANIFEST #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPRODUCTQUANTIZER_MANIFEST uint16_t uniffi_prolly_bindings_checksum_method_bindingproductquantizer_manifest(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPRODUCTQUANTIZER_PROVE_SEARCH #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPRODUCTQUANTIZER_PROVE_SEARCH uint16_t uniffi_prolly_bindings_checksum_method_bindingproductquantizer_prove_search(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPRODUCTQUANTIZER_QUALITY #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPRODUCTQUANTIZER_QUALITY uint16_t uniffi_prolly_bindings_checksum_method_bindingproductquantizer_quality(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPRODUCTQUANTIZER_SEARCH #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPRODUCTQUANTIZER_SEARCH uint16_t uniffi_prolly_bindings_checksum_method_bindingproductquantizer_search(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPRODUCTQUANTIZER_SEARCH_CANCELLABLE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPRODUCTQUANTIZER_SEARCH_CANCELLABLE uint16_t uniffi_prolly_bindings_checksum_method_bindingproductquantizer_search_cancellable(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPRODUCTQUANTIZER_SEARCH_WITH_RUNTIME #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPRODUCTQUANTIZER_SEARCH_WITH_RUNTIME uint16_t uniffi_prolly_bindings_checksum_method_bindingproductquantizer_search_with_runtime(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPRODUCTQUANTIZER_SOURCE_DESCRIPTOR #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPRODUCTQUANTIZER_SOURCE_DESCRIPTOR uint16_t uniffi_prolly_bindings_checksum_method_bindingproductquantizer_source_descriptor(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPROXIMITYCANCELLATIONTOKEN_CANCEL #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPROXIMITYCANCELLATIONTOKEN_CANCEL uint16_t uniffi_prolly_bindings_checksum_method_bindingproximitycancellationtoken_cancel(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPROXIMITYCANCELLATIONTOKEN_IS_CANCELLED #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPROXIMITYCANCELLATIONTOKEN_IS_CANCELLED uint16_t uniffi_prolly_bindings_checksum_method_bindingproximitycancellationtoken_is_cancelled(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPROXIMITYMAP_BUILD_ACCELERATOR_CATALOG #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPROXIMITYMAP_BUILD_ACCELERATOR_CATALOG uint16_t uniffi_prolly_bindings_checksum_method_bindingproximitymap_build_accelerator_catalog(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPROXIMITYMAP_BUILD_COMPOSITE_HNSW #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPROXIMITYMAP_BUILD_COMPOSITE_HNSW uint16_t uniffi_prolly_bindings_checksum_method_bindingproximitymap_build_composite_hnsw(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPROXIMITYMAP_BUILD_COMPOSITE_PQ #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPROXIMITYMAP_BUILD_COMPOSITE_PQ uint16_t uniffi_prolly_bindings_checksum_method_bindingproximitymap_build_composite_pq(void - + +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPROXIMITYMAP_BUILD_COMPOSITE_TURBOQUANT +#define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPROXIMITYMAP_BUILD_COMPOSITE_TURBOQUANT +uint16_t uniffi_prolly_bindings_checksum_method_bindingproximitymap_build_composite_turboquant(void + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPROXIMITYMAP_BUILD_HNSW #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPROXIMITYMAP_BUILD_HNSW uint16_t uniffi_prolly_bindings_checksum_method_bindingproximitymap_build_hnsw(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPROXIMITYMAP_BUILD_OR_REBUILD_COMPOSITE_HNSW #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPROXIMITYMAP_BUILD_OR_REBUILD_COMPOSITE_HNSW uint16_t uniffi_prolly_bindings_checksum_method_bindingproximitymap_build_or_rebuild_composite_hnsw(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPROXIMITYMAP_BUILD_OR_REBUILD_COMPOSITE_PQ #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPROXIMITYMAP_BUILD_OR_REBUILD_COMPOSITE_PQ uint16_t uniffi_prolly_bindings_checksum_method_bindingproximitymap_build_or_rebuild_composite_pq(void - + +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPROXIMITYMAP_BUILD_OR_REBUILD_COMPOSITE_TURBOQUANT +#define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPROXIMITYMAP_BUILD_OR_REBUILD_COMPOSITE_TURBOQUANT +uint16_t uniffi_prolly_bindings_checksum_method_bindingproximitymap_build_or_rebuild_composite_turboquant(void + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPROXIMITYMAP_BUILD_PQ #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPROXIMITYMAP_BUILD_PQ uint16_t uniffi_prolly_bindings_checksum_method_bindingproximitymap_build_pq(void - + +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPROXIMITYMAP_BUILD_TURBOQUANT +#define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPROXIMITYMAP_BUILD_TURBOQUANT +uint16_t uniffi_prolly_bindings_checksum_method_bindingproximitymap_build_turboquant(void + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPROXIMITYMAP_CLEAR_CONTENT_CACHE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPROXIMITYMAP_CLEAR_CONTENT_CACHE uint16_t uniffi_prolly_bindings_checksum_method_bindingproximitymap_clear_content_cache(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPROXIMITYMAP_CONFIG #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPROXIMITYMAP_CONFIG uint16_t uniffi_prolly_bindings_checksum_method_bindingproximitymap_config(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPROXIMITYMAP_CONTAINS_KEY #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPROXIMITYMAP_CONTAINS_KEY uint16_t uniffi_prolly_bindings_checksum_method_bindingproximitymap_contains_key(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPROXIMITYMAP_COUNT #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPROXIMITYMAP_COUNT uint16_t uniffi_prolly_bindings_checksum_method_bindingproximitymap_count(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPROXIMITYMAP_DESCRIPTOR #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPROXIMITYMAP_DESCRIPTOR uint16_t uniffi_prolly_bindings_checksum_method_bindingproximitymap_descriptor(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPROXIMITYMAP_FAST_HANDLE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPROXIMITYMAP_FAST_HANDLE uint16_t uniffi_prolly_bindings_checksum_method_bindingproximitymap_fast_handle(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPROXIMITYMAP_GET #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPROXIMITYMAP_GET uint16_t uniffi_prolly_bindings_checksum_method_bindingproximitymap_get(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPROXIMITYMAP_LOAD_ACCELERATOR_CATALOG #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPROXIMITYMAP_LOAD_ACCELERATOR_CATALOG uint16_t uniffi_prolly_bindings_checksum_method_bindingproximitymap_load_accelerator_catalog(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPROXIMITYMAP_LOAD_COMPOSITE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPROXIMITYMAP_LOAD_COMPOSITE uint16_t uniffi_prolly_bindings_checksum_method_bindingproximitymap_load_composite(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPROXIMITYMAP_LOAD_HNSW #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPROXIMITYMAP_LOAD_HNSW uint16_t uniffi_prolly_bindings_checksum_method_bindingproximitymap_load_hnsw(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPROXIMITYMAP_LOAD_PQ #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPROXIMITYMAP_LOAD_PQ uint16_t uniffi_prolly_bindings_checksum_method_bindingproximitymap_load_pq(void - + +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPROXIMITYMAP_LOAD_TURBOQUANT +#define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPROXIMITYMAP_LOAD_TURBOQUANT +uint16_t uniffi_prolly_bindings_checksum_method_bindingproximitymap_load_turboquant(void + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPROXIMITYMAP_MUTATE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPROXIMITYMAP_MUTATE uint16_t uniffi_prolly_bindings_checksum_method_bindingproximitymap_mutate(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPROXIMITYMAP_PROVE_MEMBERSHIP #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPROXIMITYMAP_PROVE_MEMBERSHIP uint16_t uniffi_prolly_bindings_checksum_method_bindingproximitymap_prove_membership(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPROXIMITYMAP_PROVE_SEARCH #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPROXIMITYMAP_PROVE_SEARCH uint16_t uniffi_prolly_bindings_checksum_method_bindingproximitymap_prove_search(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPROXIMITYMAP_PROVE_STRUCTURE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPROXIMITYMAP_PROVE_STRUCTURE uint16_t uniffi_prolly_bindings_checksum_method_bindingproximitymap_prove_structure(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPROXIMITYMAP_READ_SESSION #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPROXIMITYMAP_READ_SESSION uint16_t uniffi_prolly_bindings_checksum_method_bindingproximitymap_read_session(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPROXIMITYMAP_REBUILD #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPROXIMITYMAP_REBUILD uint16_t uniffi_prolly_bindings_checksum_method_bindingproximitymap_rebuild(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPROXIMITYMAP_SCAN_RECORDS #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPROXIMITYMAP_SCAN_RECORDS uint16_t uniffi_prolly_bindings_checksum_method_bindingproximitymap_scan_records(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPROXIMITYMAP_SEARCH #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPROXIMITYMAP_SEARCH uint16_t uniffi_prolly_bindings_checksum_method_bindingproximitymap_search(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPROXIMITYMAP_SEARCH_CANCELLABLE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPROXIMITYMAP_SEARCH_CANCELLABLE uint16_t uniffi_prolly_bindings_checksum_method_bindingproximitymap_search_cancellable(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPROXIMITYMAP_SEARCH_WITH_RUNTIME #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPROXIMITYMAP_SEARCH_WITH_RUNTIME uint16_t uniffi_prolly_bindings_checksum_method_bindingproximitymap_search_with_runtime(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPROXIMITYMAP_VERIFY #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPROXIMITYMAP_VERIFY uint16_t uniffi_prolly_bindings_checksum_method_bindingproximitymap_verify(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPROXIMITYREADSESSION_CONTAINS_KEY #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPROXIMITYREADSESSION_CONTAINS_KEY uint16_t uniffi_prolly_bindings_checksum_method_bindingproximityreadsession_contains_key(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPROXIMITYREADSESSION_FAST_HANDLE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPROXIMITYREADSESSION_FAST_HANDLE uint16_t uniffi_prolly_bindings_checksum_method_bindingproximityreadsession_fast_handle(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPROXIMITYREADSESSION_GET #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPROXIMITYREADSESSION_GET uint16_t uniffi_prolly_bindings_checksum_method_bindingproximityreadsession_get(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPROXIMITYREADSESSION_SCAN_RECORDS #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPROXIMITYREADSESSION_SCAN_RECORDS uint16_t uniffi_prolly_bindings_checksum_method_bindingproximityreadsession_scan_records(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPROXIMITYREADSESSION_SEARCH #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPROXIMITYREADSESSION_SEARCH uint16_t uniffi_prolly_bindings_checksum_method_bindingproximityreadsession_search(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPROXIMITYREADSESSION_SEARCH_CANCELLABLE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPROXIMITYREADSESSION_SEARCH_CANCELLABLE uint16_t uniffi_prolly_bindings_checksum_method_bindingproximityreadsession_search_cancellable(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPROXIMITYREADSESSION_SEARCH_WITH_RUNTIME #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPROXIMITYREADSESSION_SEARCH_WITH_RUNTIME uint16_t uniffi_prolly_bindings_checksum_method_bindingproximityreadsession_search_with_runtime(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPROXIMITYSEARCHPROOF_SOURCE_DESCRIPTOR #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPROXIMITYSEARCHPROOF_SOURCE_DESCRIPTOR uint16_t uniffi_prolly_bindings_checksum_method_bindingproximitysearchproof_source_descriptor(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPROXIMITYSEARCHPROOF_VERIFY #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPROXIMITYSEARCHPROOF_VERIFY uint16_t uniffi_prolly_bindings_checksum_method_bindingproximitysearchproof_verify(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPROXIMITYSEARCHRUNTIME_CLEAR #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPROXIMITYSEARCHRUNTIME_CLEAR uint16_t uniffi_prolly_bindings_checksum_method_bindingproximitysearchruntime_clear(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPROXIMITYSEARCHRUNTIME_POLICY #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPROXIMITYSEARCHRUNTIME_POLICY uint16_t uniffi_prolly_bindings_checksum_method_bindingproximitysearchruntime_policy(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPROXIMITYSEARCHRUNTIME_STATS #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGPROXIMITYSEARCHRUNTIME_STATS uint16_t uniffi_prolly_bindings_checksum_method_bindingproximitysearchruntime_stats(void - + +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGTURBOQUANTIZER_CONFIG +#define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGTURBOQUANTIZER_CONFIG +uint16_t uniffi_prolly_bindings_checksum_method_bindingturboquantizer_config(void + +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGTURBOQUANTIZER_MANIFEST +#define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGTURBOQUANTIZER_MANIFEST +uint16_t uniffi_prolly_bindings_checksum_method_bindingturboquantizer_manifest(void + +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGTURBOQUANTIZER_PROVE_SEARCH +#define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGTURBOQUANTIZER_PROVE_SEARCH +uint16_t uniffi_prolly_bindings_checksum_method_bindingturboquantizer_prove_search(void + +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGTURBOQUANTIZER_QUALITY +#define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGTURBOQUANTIZER_QUALITY +uint16_t uniffi_prolly_bindings_checksum_method_bindingturboquantizer_quality(void + +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGTURBOQUANTIZER_SEARCH +#define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGTURBOQUANTIZER_SEARCH +uint16_t uniffi_prolly_bindings_checksum_method_bindingturboquantizer_search(void + +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGTURBOQUANTIZER_SEARCH_CANCELLABLE +#define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGTURBOQUANTIZER_SEARCH_CANCELLABLE +uint16_t uniffi_prolly_bindings_checksum_method_bindingturboquantizer_search_cancellable(void + +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGTURBOQUANTIZER_SEARCH_WITH_RUNTIME +#define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGTURBOQUANTIZER_SEARCH_WITH_RUNTIME +uint16_t uniffi_prolly_bindings_checksum_method_bindingturboquantizer_search_with_runtime(void + +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGTURBOQUANTIZER_SOURCE_DESCRIPTOR +#define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGTURBOQUANTIZER_SOURCE_DESCRIPTOR +uint16_t uniffi_prolly_bindings_checksum_method_bindingturboquantizer_source_descriptor(void + +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGTURBOQUANTIZER_VERIFY +#define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGTURBOQUANTIZER_VERIFY +uint16_t uniffi_prolly_bindings_checksum_method_bindingturboquantizer_verify(void + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROXIMITYRECORDVISITORCALLBACK_VISIT #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_PROXIMITYRECORDVISITORCALLBACK_VISIT uint16_t uniffi_prolly_bindings_checksum_method_proximityrecordvisitorcallback_visit(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPCOMPARISON_BASE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPCOMPARISON_BASE uint16_t uniffi_prolly_bindings_checksum_method_bindingmapcomparison_base(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPCOMPARISON_CHANGED_SPANS #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPCOMPARISON_CHANGED_SPANS uint16_t uniffi_prolly_bindings_checksum_method_bindingmapcomparison_changed_spans(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPCOMPARISON_DEBUG_VIEW #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPCOMPARISON_DEBUG_VIEW uint16_t uniffi_prolly_bindings_checksum_method_bindingmapcomparison_debug_view(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPCOMPARISON_DIFF #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPCOMPARISON_DIFF uint16_t uniffi_prolly_bindings_checksum_method_bindingmapcomparison_diff(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPCOMPARISON_DIFF_PAGE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPCOMPARISON_DIFF_PAGE uint16_t uniffi_prolly_bindings_checksum_method_bindingmapcomparison_diff_page(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPCOMPARISON_PROVE_DIFF_PAGE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPCOMPARISON_PROVE_DIFF_PAGE uint16_t uniffi_prolly_bindings_checksum_method_bindingmapcomparison_prove_diff_page(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPCOMPARISON_PUBLISH_CHANGED_SPANS #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPCOMPARISON_PUBLISH_CHANGED_SPANS uint16_t uniffi_prolly_bindings_checksum_method_bindingmapcomparison_publish_changed_spans(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPCOMPARISON_SCAN_DIFF #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPCOMPARISON_SCAN_DIFF uint16_t uniffi_prolly_bindings_checksum_method_bindingmapcomparison_scan_diff(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPCOMPARISON_STATS #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPCOMPARISON_STATS uint16_t uniffi_prolly_bindings_checksum_method_bindingmapcomparison_stats(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPCOMPARISON_STRUCTURAL_DIFF_PAGE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPCOMPARISON_STRUCTURAL_DIFF_PAGE uint16_t uniffi_prolly_bindings_checksum_method_bindingmapcomparison_structural_diff_page(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPCOMPARISON_TARGET #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPCOMPARISON_TARGET uint16_t uniffi_prolly_bindings_checksum_method_bindingmapcomparison_target(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPMERGE_BASE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPMERGE_BASE uint16_t uniffi_prolly_bindings_checksum_method_bindingmapmerge_base(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPMERGE_CANDIDATE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPMERGE_CANDIDATE uint16_t uniffi_prolly_bindings_checksum_method_bindingmapmerge_candidate(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPMERGE_CONFLICT_PAGE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPMERGE_CONFLICT_PAGE uint16_t uniffi_prolly_bindings_checksum_method_bindingmapmerge_conflict_page(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPMERGE_CRDT_MERGE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPMERGE_CRDT_MERGE uint16_t uniffi_prolly_bindings_checksum_method_bindingmapmerge_crdt_merge(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPMERGE_CRDT_MERGE_EXPLAIN #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPMERGE_CRDT_MERGE_EXPLAIN uint16_t uniffi_prolly_bindings_checksum_method_bindingmapmerge_crdt_merge_explain(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPMERGE_HEAD #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPMERGE_HEAD uint16_t uniffi_prolly_bindings_checksum_method_bindingmapmerge_head(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPMERGE_MERGE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPMERGE_MERGE uint16_t uniffi_prolly_bindings_checksum_method_bindingmapmerge_merge(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPMERGE_MERGE_WITH_POLICY #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPMERGE_MERGE_WITH_POLICY uint16_t uniffi_prolly_bindings_checksum_method_bindingmapmerge_merge_with_policy(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPMERGE_PUBLISH #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPMERGE_PUBLISH uint16_t uniffi_prolly_bindings_checksum_method_bindingmapmerge_publish(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPMERGE_PUBLISH_CRDT #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPMERGE_PUBLISH_CRDT uint16_t uniffi_prolly_bindings_checksum_method_bindingmapmerge_publish_crdt(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPMERGE_PUBLISH_WITH_POLICY #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPMERGE_PUBLISH_WITH_POLICY uint16_t uniffi_prolly_bindings_checksum_method_bindingmapmerge_publish_with_policy(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPMERGE_SCAN_CONFLICTS #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPMERGE_SCAN_CONFLICTS uint16_t uniffi_prolly_bindings_checksum_method_bindingmapmerge_scan_conflicts(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPSNAPSHOT_CONTAINS_KEY #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPSNAPSHOT_CONTAINS_KEY uint16_t uniffi_prolly_bindings_checksum_method_bindingmapsnapshot_contains_key(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPSNAPSHOT_COPY_MISSING_NODES #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPSNAPSHOT_COPY_MISSING_NODES uint16_t uniffi_prolly_bindings_checksum_method_bindingmapsnapshot_copy_missing_nodes(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPSNAPSHOT_CURSOR_WINDOW #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPSNAPSHOT_CURSOR_WINDOW uint16_t uniffi_prolly_bindings_checksum_method_bindingmapsnapshot_cursor_window(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPSNAPSHOT_DEBUG_VIEW #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPSNAPSHOT_DEBUG_VIEW uint16_t uniffi_prolly_bindings_checksum_method_bindingmapsnapshot_debug_view(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPSNAPSHOT_EXPORT #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPSNAPSHOT_EXPORT uint16_t uniffi_prolly_bindings_checksum_method_bindingmapsnapshot_export(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPSNAPSHOT_FIRST_ENTRY #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPSNAPSHOT_FIRST_ENTRY uint16_t uniffi_prolly_bindings_checksum_method_bindingmapsnapshot_first_entry(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPSNAPSHOT_GET #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPSNAPSHOT_GET uint16_t uniffi_prolly_bindings_checksum_method_bindingmapsnapshot_get(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPSNAPSHOT_GET_MANY #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPSNAPSHOT_GET_MANY uint16_t uniffi_prolly_bindings_checksum_method_bindingmapsnapshot_get_many(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPSNAPSHOT_GET_VALUE_REF #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPSNAPSHOT_GET_VALUE_REF uint16_t uniffi_prolly_bindings_checksum_method_bindingmapsnapshot_get_value_ref(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPSNAPSHOT_HYDRATE_PREFIX_HINT #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPSNAPSHOT_HYDRATE_PREFIX_HINT uint16_t uniffi_prolly_bindings_checksum_method_bindingmapsnapshot_hydrate_prefix_hint(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPSNAPSHOT_ID #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPSNAPSHOT_ID uint16_t uniffi_prolly_bindings_checksum_method_bindingmapsnapshot_id(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPSNAPSHOT_LAST_ENTRY #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPSNAPSHOT_LAST_ENTRY uint16_t uniffi_prolly_bindings_checksum_method_bindingmapsnapshot_last_entry(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPSNAPSHOT_LOWER_BOUND #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPSNAPSHOT_LOWER_BOUND uint16_t uniffi_prolly_bindings_checksum_method_bindingmapsnapshot_lower_bound(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPSNAPSHOT_PIN_PATH #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPSNAPSHOT_PIN_PATH uint16_t uniffi_prolly_bindings_checksum_method_bindingmapsnapshot_pin_path(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPSNAPSHOT_PIN_ROOT #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPSNAPSHOT_PIN_ROOT uint16_t uniffi_prolly_bindings_checksum_method_bindingmapsnapshot_pin_root(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPSNAPSHOT_PLAN_MISSING_NODES #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPSNAPSHOT_PLAN_MISSING_NODES uint16_t uniffi_prolly_bindings_checksum_method_bindingmapsnapshot_plan_missing_nodes(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPSNAPSHOT_PREFIX #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPSNAPSHOT_PREFIX uint16_t uniffi_prolly_bindings_checksum_method_bindingmapsnapshot_prefix(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPSNAPSHOT_PREFIX_PAGE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPSNAPSHOT_PREFIX_PAGE uint16_t uniffi_prolly_bindings_checksum_method_bindingmapsnapshot_prefix_page(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPSNAPSHOT_PREFIX_REVERSE_PAGE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPSNAPSHOT_PREFIX_REVERSE_PAGE uint16_t uniffi_prolly_bindings_checksum_method_bindingmapsnapshot_prefix_reverse_page(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPSNAPSHOT_PROVE_KEY #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPSNAPSHOT_PROVE_KEY uint16_t uniffi_prolly_bindings_checksum_method_bindingmapsnapshot_prove_key(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPSNAPSHOT_PROVE_KEYS #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPSNAPSHOT_PROVE_KEYS uint16_t uniffi_prolly_bindings_checksum_method_bindingmapsnapshot_prove_keys(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPSNAPSHOT_PROVE_PREFIX #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPSNAPSHOT_PROVE_PREFIX uint16_t uniffi_prolly_bindings_checksum_method_bindingmapsnapshot_prove_prefix(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPSNAPSHOT_PROVE_RANGE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPSNAPSHOT_PROVE_RANGE uint16_t uniffi_prolly_bindings_checksum_method_bindingmapsnapshot_prove_range(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPSNAPSHOT_PROVE_RANGE_PAGE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPSNAPSHOT_PROVE_RANGE_PAGE uint16_t uniffi_prolly_bindings_checksum_method_bindingmapsnapshot_prove_range_page(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPSNAPSHOT_PUBLISH_PREFIX_HINT #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPSNAPSHOT_PUBLISH_PREFIX_HINT uint16_t uniffi_prolly_bindings_checksum_method_bindingmapsnapshot_publish_prefix_hint(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPSNAPSHOT_PUSH_TO #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPSNAPSHOT_PUSH_TO uint16_t uniffi_prolly_bindings_checksum_method_bindingmapsnapshot_push_to(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPSNAPSHOT_RANGE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPSNAPSHOT_RANGE uint16_t uniffi_prolly_bindings_checksum_method_bindingmapsnapshot_range(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPSNAPSHOT_RANGE_PAGE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPSNAPSHOT_RANGE_PAGE uint16_t uniffi_prolly_bindings_checksum_method_bindingmapsnapshot_range_page(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPSNAPSHOT_READ_SESSION #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPSNAPSHOT_READ_SESSION uint16_t uniffi_prolly_bindings_checksum_method_bindingmapsnapshot_read_session(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPSNAPSHOT_REVERSE_PAGE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPSNAPSHOT_REVERSE_PAGE uint16_t uniffi_prolly_bindings_checksum_method_bindingmapsnapshot_reverse_page(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPSNAPSHOT_SCAN_PREFIX #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPSNAPSHOT_SCAN_PREFIX uint16_t uniffi_prolly_bindings_checksum_method_bindingmapsnapshot_scan_prefix(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPSNAPSHOT_SCAN_RANGE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPSNAPSHOT_SCAN_RANGE uint16_t uniffi_prolly_bindings_checksum_method_bindingmapsnapshot_scan_range(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPSNAPSHOT_STATS #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPSNAPSHOT_STATS uint16_t uniffi_prolly_bindings_checksum_method_bindingmapsnapshot_stats(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPSNAPSHOT_TREE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPSNAPSHOT_TREE uint16_t uniffi_prolly_bindings_checksum_method_bindingmapsnapshot_tree(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPSNAPSHOT_UPPER_BOUND #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPSNAPSHOT_UPPER_BOUND uint16_t uniffi_prolly_bindings_checksum_method_bindingmapsnapshot_upper_bound(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPSNAPSHOT_VERSION #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPSNAPSHOT_VERSION uint16_t uniffi_prolly_bindings_checksum_method_bindingmapsnapshot_version(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPSUBSCRIPTION_LAST_SEEN #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPSUBSCRIPTION_LAST_SEEN uint16_t uniffi_prolly_bindings_checksum_method_bindingmapsubscription_last_seen(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPSUBSCRIPTION_POLL #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGMAPSUBSCRIPTION_POLL uint16_t uniffi_prolly_bindings_checksum_method_bindingmapsubscription_poll(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_APPEND #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_APPEND uint16_t uniffi_prolly_bindings_checksum_method_bindingversionedmap_append(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_APPLY #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_APPLY uint16_t uniffi_prolly_bindings_checksum_method_bindingversionedmap_apply(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_APPLY_AT_MILLIS #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_APPLY_AT_MILLIS uint16_t uniffi_prolly_bindings_checksum_method_bindingversionedmap_apply_at_millis(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_APPLY_IF #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_APPLY_IF uint16_t uniffi_prolly_bindings_checksum_method_bindingversionedmap_apply_if(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_APPLY_IF_AT_MILLIS #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_APPLY_IF_AT_MILLIS uint16_t uniffi_prolly_bindings_checksum_method_bindingversionedmap_apply_if_at_millis(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_BACKUP #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_BACKUP uint16_t uniffi_prolly_bindings_checksum_method_bindingversionedmap_backup(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_CHANGES_SINCE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_CHANGES_SINCE uint16_t uniffi_prolly_bindings_checksum_method_bindingversionedmap_changes_since(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_COMPARE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_COMPARE uint16_t uniffi_prolly_bindings_checksum_method_bindingversionedmap_compare(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_COMPARE_TO_HEAD #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_COMPARE_TO_HEAD uint16_t uniffi_prolly_bindings_checksum_method_bindingversionedmap_compare_to_head(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_CONTAINS_KEY #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_CONTAINS_KEY uint16_t uniffi_prolly_bindings_checksum_method_bindingversionedmap_contains_key(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_DELETE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_DELETE uint16_t uniffi_prolly_bindings_checksum_method_bindingversionedmap_delete(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_DELETE_IF #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_DELETE_IF uint16_t uniffi_prolly_bindings_checksum_method_bindingversionedmap_delete_if(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_DIFF #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_DIFF uint16_t uniffi_prolly_bindings_checksum_method_bindingversionedmap_diff(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_EDIT #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_EDIT uint16_t uniffi_prolly_bindings_checksum_method_bindingversionedmap_edit(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_EDIT_IF #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_EDIT_IF uint16_t uniffi_prolly_bindings_checksum_method_bindingversionedmap_edit_if(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_GET #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_GET uint16_t uniffi_prolly_bindings_checksum_method_bindingversionedmap_get(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_GET_AT #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_GET_AT uint16_t uniffi_prolly_bindings_checksum_method_bindingversionedmap_get_at(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_GET_LARGE_VALUE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_GET_LARGE_VALUE uint16_t uniffi_prolly_bindings_checksum_method_bindingversionedmap_get_large_value(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_GET_MANY #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_GET_MANY uint16_t uniffi_prolly_bindings_checksum_method_bindingversionedmap_get_many(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_GET_MANY_AT #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_GET_MANY_AT uint16_t uniffi_prolly_bindings_checksum_method_bindingversionedmap_get_many_at(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_GET_VALUE_REF #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_GET_VALUE_REF uint16_t uniffi_prolly_bindings_checksum_method_bindingversionedmap_get_value_ref(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_GET_VALUE_REF_AT #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_GET_VALUE_REF_AT uint16_t uniffi_prolly_bindings_checksum_method_bindingversionedmap_get_value_ref_at(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_HEAD #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_HEAD uint16_t uniffi_prolly_bindings_checksum_method_bindingversionedmap_head(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_HEAD_ID #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_HEAD_ID uint16_t uniffi_prolly_bindings_checksum_method_bindingversionedmap_head_id(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_HEAD_NAME #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_HEAD_NAME uint16_t uniffi_prolly_bindings_checksum_method_bindingversionedmap_head_name(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_ID #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_ID uint16_t uniffi_prolly_bindings_checksum_method_bindingversionedmap_id(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_IMPORT_AS_HEAD #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_IMPORT_AS_HEAD uint16_t uniffi_prolly_bindings_checksum_method_bindingversionedmap_import_as_head(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_IMPORT_AS_HEAD_AT_MILLIS #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_IMPORT_AS_HEAD_AT_MILLIS uint16_t uniffi_prolly_bindings_checksum_method_bindingversionedmap_import_as_head_at_millis(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_INITIALIZE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_INITIALIZE uint16_t uniffi_prolly_bindings_checksum_method_bindingversionedmap_initialize(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_INITIALIZE_SORTED #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_INITIALIZE_SORTED uint16_t uniffi_prolly_bindings_checksum_method_bindingversionedmap_initialize_sorted(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_IS_INITIALIZED #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_IS_INITIALIZED uint16_t uniffi_prolly_bindings_checksum_method_bindingversionedmap_is_initialized(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_KEEP_FOR #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_KEEP_FOR uint16_t uniffi_prolly_bindings_checksum_method_bindingversionedmap_keep_for(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_KEEP_FOR_AT #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_KEEP_FOR_AT uint16_t uniffi_prolly_bindings_checksum_method_bindingversionedmap_keep_for_at(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_KEEP_LAST #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_KEEP_LAST uint16_t uniffi_prolly_bindings_checksum_method_bindingversionedmap_keep_last(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_KEEP_VERSIONS #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_KEEP_VERSIONS uint16_t uniffi_prolly_bindings_checksum_method_bindingversionedmap_keep_versions(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_PARALLEL_APPLY #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_PARALLEL_APPLY uint16_t uniffi_prolly_bindings_checksum_method_bindingversionedmap_parallel_apply(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_PLAN_BLOB_GC #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_PLAN_BLOB_GC uint16_t uniffi_prolly_bindings_checksum_method_bindingversionedmap_plan_blob_gc(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_PLAN_GC #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_PLAN_GC uint16_t uniffi_prolly_bindings_checksum_method_bindingversionedmap_plan_gc(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_PREFIX #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_PREFIX uint16_t uniffi_prolly_bindings_checksum_method_bindingversionedmap_prefix(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_PREFIX_AT #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_PREFIX_AT uint16_t uniffi_prolly_bindings_checksum_method_bindingversionedmap_prefix_at(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_PREFIX_PAGE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_PREFIX_PAGE uint16_t uniffi_prolly_bindings_checksum_method_bindingversionedmap_prefix_page(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_PREFIX_PAGE_AT #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_PREFIX_PAGE_AT uint16_t uniffi_prolly_bindings_checksum_method_bindingversionedmap_prefix_page_at(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_PREPARE_MERGE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_PREPARE_MERGE uint16_t uniffi_prolly_bindings_checksum_method_bindingversionedmap_prepare_merge(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_PRUNE_VERSIONS #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_PRUNE_VERSIONS uint16_t uniffi_prolly_bindings_checksum_method_bindingversionedmap_prune_versions(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_PUT #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_PUT uint16_t uniffi_prolly_bindings_checksum_method_bindingversionedmap_put(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_PUT_IF #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_PUT_IF uint16_t uniffi_prolly_bindings_checksum_method_bindingversionedmap_put_if(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_PUT_LARGE_VALUE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_PUT_LARGE_VALUE uint16_t uniffi_prolly_bindings_checksum_method_bindingversionedmap_put_large_value(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_PUT_LARGE_VALUE_IF #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_PUT_LARGE_VALUE_IF uint16_t uniffi_prolly_bindings_checksum_method_bindingversionedmap_put_large_value_if(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_RANGE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_RANGE uint16_t uniffi_prolly_bindings_checksum_method_bindingversionedmap_range(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_RANGE_AT #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_RANGE_AT uint16_t uniffi_prolly_bindings_checksum_method_bindingversionedmap_range_at(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_RANGE_PAGE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_RANGE_PAGE uint16_t uniffi_prolly_bindings_checksum_method_bindingversionedmap_range_page(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_RANGE_PAGE_AT #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_RANGE_PAGE_AT uint16_t uniffi_prolly_bindings_checksum_method_bindingversionedmap_range_page_at(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_READ_SESSION #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_READ_SESSION uint16_t uniffi_prolly_bindings_checksum_method_bindingversionedmap_read_session(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_REBUILD_FROM_ENTRIES_IF #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_REBUILD_FROM_ENTRIES_IF uint16_t uniffi_prolly_bindings_checksum_method_bindingversionedmap_rebuild_from_entries_if(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_REBUILD_FROM_ITER_IF #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_REBUILD_FROM_ITER_IF uint16_t uniffi_prolly_bindings_checksum_method_bindingversionedmap_rebuild_from_iter_if(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_REBUILD_SORTED_IF #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_REBUILD_SORTED_IF uint16_t uniffi_prolly_bindings_checksum_method_bindingversionedmap_rebuild_sorted_if(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_RESTORE_BACKUP #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_RESTORE_BACKUP uint16_t uniffi_prolly_bindings_checksum_method_bindingversionedmap_restore_backup(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_RETENTION_POLICY #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_RETENTION_POLICY uint16_t uniffi_prolly_bindings_checksum_method_bindingversionedmap_retention_policy(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_ROLLBACK_TO #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_ROLLBACK_TO uint16_t uniffi_prolly_bindings_checksum_method_bindingversionedmap_rollback_to(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_SCAN_PREFIX #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_SCAN_PREFIX uint16_t uniffi_prolly_bindings_checksum_method_bindingversionedmap_scan_prefix(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_SCAN_PREFIX_AT #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_SCAN_PREFIX_AT uint16_t uniffi_prolly_bindings_checksum_method_bindingversionedmap_scan_prefix_at(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_SCAN_RANGE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_SCAN_RANGE uint16_t uniffi_prolly_bindings_checksum_method_bindingversionedmap_scan_range(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_SCAN_RANGE_AT #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_SCAN_RANGE_AT uint16_t uniffi_prolly_bindings_checksum_method_bindingversionedmap_scan_range_at(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_SNAPSHOT #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_SNAPSHOT uint16_t uniffi_prolly_bindings_checksum_method_bindingversionedmap_snapshot(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_SNAPSHOT_AT #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_SNAPSHOT_AT uint16_t uniffi_prolly_bindings_checksum_method_bindingversionedmap_snapshot_at(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_SUBSCRIBE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_SUBSCRIBE uint16_t uniffi_prolly_bindings_checksum_method_bindingversionedmap_subscribe(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_SUBSCRIBE_FROM #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_SUBSCRIBE_FROM uint16_t uniffi_prolly_bindings_checksum_method_bindingversionedmap_subscribe_from(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_SWEEP_BLOB_GC #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_SWEEP_BLOB_GC uint16_t uniffi_prolly_bindings_checksum_method_bindingversionedmap_sweep_blob_gc(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_SWEEP_GC #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_SWEEP_GC uint16_t uniffi_prolly_bindings_checksum_method_bindingversionedmap_sweep_gc(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_VERIFY_CATALOG #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_VERIFY_CATALOG uint16_t uniffi_prolly_bindings_checksum_method_bindingversionedmap_verify_catalog(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_VERSION #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_VERSION uint16_t uniffi_prolly_bindings_checksum_method_bindingversionedmap_version(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_VERSIONS #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_VERSIONS uint16_t uniffi_prolly_bindings_checksum_method_bindingversionedmap_versions(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_VERSIONS_PREFIX #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDMAP_VERSIONS_PREFIX uint16_t uniffi_prolly_bindings_checksum_method_bindingversionedmap_versions_prefix(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDTRANSACTION_APPLY #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDTRANSACTION_APPLY uint16_t uniffi_prolly_bindings_checksum_method_bindingversionedtransaction_apply(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDTRANSACTION_APPLY_IF #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDTRANSACTION_APPLY_IF uint16_t uniffi_prolly_bindings_checksum_method_bindingversionedtransaction_apply_if(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDTRANSACTION_COMMIT #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDTRANSACTION_COMMIT uint16_t uniffi_prolly_bindings_checksum_method_bindingversionedtransaction_commit(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDTRANSACTION_DELETE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDTRANSACTION_DELETE uint16_t uniffi_prolly_bindings_checksum_method_bindingversionedtransaction_delete(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDTRANSACTION_GET #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDTRANSACTION_GET uint16_t uniffi_prolly_bindings_checksum_method_bindingversionedtransaction_get(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDTRANSACTION_HEAD #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDTRANSACTION_HEAD uint16_t uniffi_prolly_bindings_checksum_method_bindingversionedtransaction_head(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDTRANSACTION_PUT #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDTRANSACTION_PUT uint16_t uniffi_prolly_bindings_checksum_method_bindingversionedtransaction_put(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDTRANSACTION_ROLLBACK #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_METHOD_BINDINGVERSIONEDTRANSACTION_ROLLBACK uint16_t uniffi_prolly_bindings_checksum_method_bindingversionedtransaction_rollback(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_CONSTRUCTOR_MERGEPOLICYREGISTRY_NEW #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_CONSTRUCTOR_MERGEPOLICYREGISTRY_NEW uint16_t uniffi_prolly_bindings_checksum_constructor_mergepolicyregistry_new(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_CONSTRUCTOR_PROLLYBLOBSTORE_FILE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_CONSTRUCTOR_PROLLYBLOBSTORE_FILE uint16_t uniffi_prolly_bindings_checksum_constructor_prollyblobstore_file(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_CONSTRUCTOR_PROLLYBLOBSTORE_MEMORY #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_CONSTRUCTOR_PROLLYBLOBSTORE_MEMORY uint16_t uniffi_prolly_bindings_checksum_constructor_prollyblobstore_memory(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_CONSTRUCTOR_PROLLYENGINE_CUSTOM_STORE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_CONSTRUCTOR_PROLLYENGINE_CUSTOM_STORE uint16_t uniffi_prolly_bindings_checksum_constructor_prollyengine_custom_store(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_CONSTRUCTOR_PROLLYENGINE_FILE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_CONSTRUCTOR_PROLLYENGINE_FILE uint16_t uniffi_prolly_bindings_checksum_constructor_prollyengine_file(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_CONSTRUCTOR_PROLLYENGINE_MEMORY #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_CONSTRUCTOR_PROLLYENGINE_MEMORY uint16_t uniffi_prolly_bindings_checksum_constructor_prollyengine_memory(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_CONSTRUCTOR_PROLLYENGINE_SQLITE #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_CONSTRUCTOR_PROLLYENGINE_SQLITE uint16_t uniffi_prolly_bindings_checksum_constructor_prollyengine_sqlite(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_CONSTRUCTOR_PROLLYENGINE_SQLITE_IN_MEMORY #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_CONSTRUCTOR_PROLLYENGINE_SQLITE_IN_MEMORY uint16_t uniffi_prolly_bindings_checksum_constructor_prollyengine_sqlite_in_memory(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_CONSTRUCTOR_ASYNCPROLLYENGINE_NEW #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_CONSTRUCTOR_ASYNCPROLLYENGINE_NEW uint16_t uniffi_prolly_bindings_checksum_constructor_asyncprollyengine_new(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_CONSTRUCTOR_BINDINGINDEXREGISTRY_NEW #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_CONSTRUCTOR_BINDINGINDEXREGISTRY_NEW uint16_t uniffi_prolly_bindings_checksum_constructor_bindingindexregistry_new(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_CONSTRUCTOR_BINDINGINDEXEDMAP_NEW #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_CONSTRUCTOR_BINDINGINDEXEDMAP_NEW uint16_t uniffi_prolly_bindings_checksum_constructor_bindingindexedmap_new(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_CONSTRUCTOR_BINDINGPROXIMITYCANCELLATIONTOKEN_NEW #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_CONSTRUCTOR_BINDINGPROXIMITYCANCELLATIONTOKEN_NEW uint16_t uniffi_prolly_bindings_checksum_constructor_bindingproximitycancellationtoken_new(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_CONSTRUCTOR_BINDINGVERSIONEDMAP_NEW #define UNIFFI_FFIDEF_UNIFFI_PROLLY_BINDINGS_CHECKSUM_CONSTRUCTOR_BINDINGVERSIONEDMAP_NEW uint16_t uniffi_prolly_bindings_checksum_constructor_bindingversionedmap_new(void - + ); #endif #ifndef UNIFFI_FFIDEF_FFI_PROLLY_BINDINGS_UNIFFI_CONTRACT_VERSION #define UNIFFI_FFIDEF_FFI_PROLLY_BINDINGS_UNIFFI_CONTRACT_VERSION uint32_t ffi_prolly_bindings_uniffi_contract_version(void - + ); #endif diff --git a/bindings/swift/Tests/ProllyTests/PortableParityTests.swift b/bindings/swift/Tests/ProllyTests/PortableParityTests.swift index e1ef8203..231dffcc 100644 --- a/bindings/swift/Tests/ProllyTests/PortableParityTests.swift +++ b/bindings/swift/Tests/ProllyTests/PortableParityTests.swift @@ -205,6 +205,81 @@ final class PortableParityTests: XCTestCase { } } + func testTurboQuantizerLifecycleIsPortableAndVerified() throws { + try Engine.withMemory { engine in + let proximity = try engine.buildProximity( + dimensions: 8, + records: (0..<16).map { index in + ProximityRecord( + key: Data(String(format: "turbo-%02d", index).utf8), + vector: [Float(index), Float(index % 3), 0, 1, 0, 0, 0, 0], + value: Data(String(format: "value-%02d", index).utf8) + ) + } + ) + let config = TurboQuantizationConfigRecord( + bitWidth: 4, + rerankMultiplier: 4, + seed: .max + ) + let built = try proximity.buildTurboquant(config: config, workerThreads: 2) + XCTAssertEqual(built.stats.encodedVectors, 16) + var request = exactProximitySearchRequest(query: [0, 0, 0, 1, 0, 0, 0, 0], k: 3) + request.policy = .fixedBudget + request.backend = .turboQuantized + let index = built.index + XCTAssertEqual(index.config, config) + XCTAssertEqual(index.sourceDescriptor, proximity.descriptor) + XCTAssertEqual(try index.verify(proximity).encodedVectors, 16) + let result = try index.search(proximity, request: request) + XCTAssertEqual(result.backend, .turboQuantized) + XCTAssertEqual(result.neighbors.first?.key, Data("turbo-00".utf8)) + XCTAssertGreaterThan(result.stats.distanceEvaluations, 0) + let cancellation = ProximityCancellationToken() + cancellation.cancel() + let cancelled = try index.searchCancellable( + proximity, request: request, cancellation: cancellation + ) + XCTAssertEqual(cancelled.completion, .cancelled) + XCTAssertTrue(cancelled.neighbors.isEmpty) + cancellation.close() + let manifest = index.manifest + let proof = try index.proveSearch(proximity, request: request) + XCTAssertEqual( + try proof.verify(expectedDescriptor: proximity.descriptor).result.backend, + .turboQuantized + ) + proof.close() + let catalog = try proximity.buildAcceleratorCatalog(turboquant: index) + XCTAssertEqual(catalog.entries.first?.kind, .turboQuantized) + XCTAssertEqual(try catalog.search(proximity, request: request).backend, .turboQuantized) + catalog.close() + let current = try proximity.mutate([ + ProximityMutationRecord( + key: Data("turbo-00".utf8), + vector: [0.25, 0, 0, 1, 0, 0, 0, 0], + value: Data("updated".utf8) + ) + ]).map + let compositeBuilt = try current.buildCompositeTurboquant( + baseMap: proximity, base: index + ) + let composite = try XCTUnwrap(compositeBuilt.accelerator) + XCTAssertEqual(composite.baseKind, .turboQuantized) + var compositeRequest = request + compositeRequest.backend = .composite + XCTAssertEqual( + try composite.search(current, request: compositeRequest).backend, + .composite + ) + composite.close() + index.close() + let loaded = try proximity.loadTurboquant(manifest) + XCTAssertEqual(loaded.manifest, manifest) + loaded.close() + } + } + func testHnswAcceleratorLifecycleIsPortable() throws { try Engine.withMemory { engine in let proximity = try engine.buildProximity( @@ -278,7 +353,8 @@ final class PortableParityTests: XCTestCase { kernel: .scalarDeterministic, backend: .auto, hnswEfSearch: nil, - pqRerankMultiplier: nil + pqRerankMultiplier: nil, + turboquantRerankMultiplier: nil ) let result = try proximity.search(request) diff --git a/bindings/uniffi/src/domain/proximity.rs b/bindings/uniffi/src/domain/proximity.rs index ed415aad..c6c9224a 100644 --- a/bindings/uniffi/src/domain/proximity.rs +++ b/bindings/uniffi/src/domain/proximity.rs @@ -238,6 +238,85 @@ mod tests { assert_eq!(loaded.manifest(), built.index.manifest()); } + #[test] + fn turboquant_accelerator_lifecycle_is_portable_bounded_and_source_bound() { + let engine = Arc::new(ProllyEngine::memory(default_config()).unwrap()); + let records = (0..24) + .map(|index| ProximityRecordRecord { + key: format!("vector-{index:02}").into_bytes(), + vector: (0..8) + .map(|dimension| (index * 8 + dimension) as f32 / 31.0) + .collect(), + value: format!("value-{index:02}").into_bytes(), + }) + .collect(); + let map = engine + .build_proximity_map(ProximityConfigRecord::new(8), records, None) + .unwrap(); + let config = TurboQuantizationConfigRecord { + bit_width: 4, + rerank_multiplier: 8, + seed: u64::MAX, + }; + let built = map + .build_turboquant(config.clone(), 2, default_turboquant_build_limits()) + .unwrap(); + assert_eq!(built.stats.encoded_vectors, 24); + assert_eq!(built.index.config(), config); + assert_eq!(built.index.source_descriptor(), map.descriptor()); + assert!(built.index.quality().mean_squared_error.is_finite()); + assert_eq!(built.index.verify(map.clone()).unwrap().encoded_vectors, 24); + + let mut request = + ProximitySearchRequestRecord::exact(vec![0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], 3); + request.policy = SearchPolicyKind::FixedBudget; + request.backend = SearchBackendRecord::TurboQuantized; + let result = built.index.search(map.clone(), request.clone()).unwrap(); + assert_eq!(result.backend, SearchBackendRecord::TurboQuantized); + let runtime = engine + .proximity_search_runtime(default_proximity_search_runtime_policy()) + .unwrap(); + assert_eq!( + built + .index + .search_with_runtime(map.clone(), request.clone(), runtime.clone()) + .unwrap() + .neighbors, + result.neighbors + ); + let cancellation = Arc::new(BindingProximityCancellationToken::new()); + cancellation.cancel(); + assert_eq!( + built + .index + .search_cancellable(map.clone(), request.clone(), Some(runtime), cancellation) + .unwrap() + .completion, + SearchCompletionRecord::Cancelled + ); + let proof = built + .index + .prove_search(map.clone(), request, ContentGraphLimitsRecord::defaults()) + .unwrap(); + assert_eq!( + proof + .verify(Some(map.descriptor()), ContentGraphLimitsRecord::defaults()) + .unwrap() + .result + .backend, + SearchBackendRecord::TurboQuantized + ); + let loaded = map.load_turboquant(built.index.manifest()).unwrap(); + assert_eq!(loaded.manifest(), built.index.manifest()); + let catalog = map + .build_accelerator_catalog(None, None, Some(loaded), None) + .unwrap(); + assert_eq!( + catalog.entries()[0].kind, + CatalogAcceleratorKindRecord::TurboQuantized + ); + } + #[test] fn retained_search_runtime_reuses_validated_content_and_is_engine_bound() { let engine = Arc::new(ProllyEngine::memory(default_config()).unwrap()); @@ -452,7 +531,7 @@ mod tests { assert_eq!(loaded_composite.manifest(), composite.manifest()); let catalog = current - .build_accelerator_catalog(None, None, Some(composite.clone())) + .build_accelerator_catalog(None, None, None, Some(composite.clone())) .unwrap(); assert_eq!(catalog.source_descriptor(), current.descriptor()); assert_eq!(catalog.entries().len(), 1); @@ -533,20 +612,24 @@ use std::task::{Context, Poll, Wake, Waker}; use prolly::{ AcceleratorCatalog, AcceleratorCatalogEntry, AcceleratorSet, AdaptiveQuality, AsyncAcceleratorCatalog, AsyncAcceleratorSet, AsyncCompositeAccelerator, AsyncHnswIndex, - AsyncProductQuantizer, AsyncProximityMap, AsyncSearchControl, BuildParallelism, - CancellationToken, CatalogAcceleratorKind, CompositeAccelerator, CompositeAcceleratorConfig, - CompositeBase, CompositeBaseKind, CompositeBuildLimits, CompositeBuildOrRebuildOutcome, - CompositeBuildOutcome, CompositeBuildStats, CompositeRebuildOptions, ContentGraphLimits, - ContentObjectKind, DistanceMetric, FullRebuildReason, HierarchyConfig, HnswBuildLimits, - HnswBuildStats, HnswConfig, HnswIndex, HnswRoutingVectorEncoding, HnswSearchOptions, Neighbor, - OverflowConfig, PlannerPolicy, PqSearchOptions, ProductQuantizationBuildLimits, - ProductQuantizationBuildStats, ProductQuantizationConfig, ProductQuantizationQuality, - ProductQuantizer, ProximityConfig, ProximityFilter, ProximityMap, ProximityMembershipProof, - ProximityMutation, ProximityMutationStats, ProximityRecord, ProximitySearchClaim, - ProximitySearchProof, ProximitySearchStats, ProximityStructuralProof, ProximityVerification, - QueryKernel, ScalarQuantizationConfig, SearchBackend, SearchBudget, SearchCompletion, SearchIo, + AsyncProductQuantizer, AsyncProximityMap, AsyncSearchControl, AsyncTurboQuantizer, + BuildParallelism, CancellationToken, CatalogAcceleratorKind, CompositeAccelerator, + CompositeAcceleratorConfig, CompositeBase, CompositeBaseKind, CompositeBuildLimits, + CompositeBuildOrRebuildOutcome, CompositeBuildOutcome, CompositeBuildStats, + CompositeRebuildOptions, ContentGraphLimits, ContentObjectKind, DistanceMetric, + FullRebuildReason, HierarchyConfig, HnswBuildLimits, HnswBuildStats, HnswConfig, HnswIndex, + HnswRoutingVectorEncoding, HnswSearchOptions, Neighbor, OverflowConfig, PlannerPolicy, + PqSearchOptions, ProductQuantizationBuildLimits, ProductQuantizationBuildStats, + ProductQuantizationConfig, ProductQuantizationQuality, ProductQuantizer, ProximityConfig, + ProximityFilter, ProximityMap, ProximityMembershipProof, ProximityMutation, + ProximityMutationStats, ProximityRecord, ProximitySearchClaim, ProximitySearchProof, + ProximitySearchStats, ProximityStructuralProof, ProximityVerification, QueryKernel, + ScalarQuantizationConfig, SearchBackend, SearchBudget, SearchCompletion, SearchIo, SearchOptions, SearchPolicy, SearchRequest, SearchResult, SearchRuntime, SearchRuntimePolicy, - Store, SyncStoreAsAsync, TypedContentObject, TypedContentRoot, VectorStorageConfig, + Store, SyncStoreAsAsync, TurboQuantSearchOptions, TurboQuantizationBuildLimits, + TurboQuantizationBuildStats, TurboQuantizationConfig, TurboQuantizationQuality, + TurboQuantizationVerification, TurboQuantizer, TypedContentObject, TypedContentRoot, + VectorStorageConfig, }; use crate::{BindingEngine, KeyProofRecord, ProllyBindingError, ProllyEngine}; @@ -567,6 +650,7 @@ pub enum ContentObjectKindRecord { HnswPage, CompositeAccelerator, AcceleratorCatalog, + TurboQuantization, } impl From for ContentObjectKindRecord { @@ -584,6 +668,7 @@ impl From for ContentObjectKindRecord { ContentObjectKind::HnswPage => Self::HnswPage, ContentObjectKind::CompositeAccelerator => Self::CompositeAccelerator, ContentObjectKind::AcceleratorCatalog => Self::AcceleratorCatalog, + ContentObjectKind::TurboQuantization => Self::TurboQuantization, } } } @@ -603,6 +688,7 @@ impl From for ContentObjectKind { ContentObjectKindRecord::HnswPage => Self::HnswPage, ContentObjectKindRecord::CompositeAccelerator => Self::CompositeAccelerator, ContentObjectKindRecord::AcceleratorCatalog => Self::AcceleratorCatalog, + ContentObjectKindRecord::TurboQuantization => Self::TurboQuantization, } } } @@ -919,6 +1005,7 @@ pub enum SearchBackendRecord { Hnsw, Composite, Auto, + TurboQuantized, } impl From for SearchBackend { @@ -929,6 +1016,7 @@ impl From for SearchBackend { SearchBackendRecord::Hnsw => Self::Hnsw, SearchBackendRecord::Composite => Self::Composite, SearchBackendRecord::Auto => Self::Auto, + SearchBackendRecord::TurboQuantized => Self::TurboQuantized, } } } @@ -941,6 +1029,7 @@ impl From for SearchBackendRecord { SearchBackend::Hnsw => Self::Hnsw, SearchBackend::Composite => Self::Composite, SearchBackend::Auto => Self::Auto, + SearchBackend::TurboQuantized => Self::TurboQuantized, } } } @@ -1001,6 +1090,7 @@ pub struct ProximitySearchRequestRecord { pub backend: SearchBackendRecord, pub hnsw_ef_search: Option, pub pq_rerank_multiplier: Option, + pub turboquant_rerank_multiplier: Option, } impl ProximitySearchRequestRecord { @@ -1016,6 +1106,7 @@ impl ProximitySearchRequestRecord { backend: SearchBackendRecord::Native, hnsw_ef_search: None, pq_rerank_multiplier: None, + turboquant_rerank_multiplier: None, } } } @@ -1102,6 +1193,9 @@ fn proximity_search_request( pq: PqSearchOptions { rerank_multiplier: request.pq_rerank_multiplier, }, + turboquant: TurboQuantSearchOptions { + rerank_multiplier: request.turboquant_rerank_multiplier, + }, }, }) } @@ -1120,6 +1214,7 @@ pub struct ProximitySearchRuntimePolicyRecord { pub authoritative_max_bytes: u64, pub hnsw_max_bytes: u64, pub pq_max_bytes: u64, + pub turboquant_max_bytes: u64, } impl From for ProximitySearchRuntimePolicyRecord { @@ -1130,6 +1225,7 @@ impl From for ProximitySearchRuntimePolicyRecord { authoritative_max_bytes: value.authoritative_max_bytes as u64, hnsw_max_bytes: value.hnsw_max_bytes as u64, pq_max_bytes: value.pq_max_bytes as u64, + turboquant_max_bytes: value.turboquant_max_bytes as u64, } } } @@ -1147,6 +1243,7 @@ impl TryFrom for SearchRuntimePolicy { )?, hnsw_max_bytes: to_usize(value.hnsw_max_bytes, "hnsw_max_bytes")?, pq_max_bytes: to_usize(value.pq_max_bytes, "pq_max_bytes")?, + turboquant_max_bytes: to_usize(value.turboquant_max_bytes, "turboquant_max_bytes")?, }) } } @@ -1477,10 +1574,144 @@ pub fn default_pq_build_limits() -> ProductQuantizationBuildLimitsRecord { } } +#[derive(Clone, Debug, PartialEq, Eq, uniffi::Record)] +pub struct TurboQuantizationConfigRecord { + pub bit_width: u8, + pub rerank_multiplier: u32, + pub seed: u64, +} + +impl From for TurboQuantizationConfigRecord { + fn from(value: TurboQuantizationConfig) -> Self { + Self { + bit_width: value.bit_width, + rerank_multiplier: value.rerank_multiplier, + seed: value.seed, + } + } +} + +impl From for TurboQuantizationConfig { + fn from(value: TurboQuantizationConfigRecord) -> Self { + Self { + bit_width: value.bit_width, + rerank_multiplier: value.rerank_multiplier, + seed: value.seed, + } + } +} + +#[derive(Clone, Debug, PartialEq, Eq, uniffi::Record)] +pub struct TurboQuantizationBuildLimitsRecord { + pub max_records: Option, + pub max_input_bytes: Option, + pub max_temporary_bytes: Option, + pub max_transform_operations: Option, + pub max_encoded_output_bytes: Option, + pub max_worker_threads: Option, +} + +impl TryFrom for TurboQuantizationBuildLimits { + type Error = ProllyBindingError; + + fn try_from(value: TurboQuantizationBuildLimitsRecord) -> Result { + Ok(Self { + max_records: optional_usize(value.max_records, "max_records")?, + max_input_bytes: optional_usize(value.max_input_bytes, "max_input_bytes")?, + max_temporary_bytes: optional_usize(value.max_temporary_bytes, "max_temporary_bytes")?, + max_transform_operations: optional_usize( + value.max_transform_operations, + "max_transform_operations", + )?, + max_encoded_output_bytes: optional_usize( + value.max_encoded_output_bytes, + "max_encoded_output_bytes", + )?, + max_worker_threads: optional_usize(value.max_worker_threads, "max_worker_threads")?, + }) + } +} + +#[derive(Clone, Debug, PartialEq, Eq, uniffi::Record)] +pub struct TurboQuantizationBuildStatsRecord { + pub encoded_vectors: u64, + pub zero_vectors: u64, + pub transformed_components: u64, + pub butterfly_operations: u64, + pub input_bytes: u64, + pub encoded_output_bytes: u64, + pub peak_temporary_bytes: u64, +} + +impl From for TurboQuantizationBuildStatsRecord { + fn from(value: TurboQuantizationBuildStats) -> Self { + Self { + encoded_vectors: value.encoded_vectors as u64, + zero_vectors: value.zero_vectors as u64, + transformed_components: value.transformed_components as u64, + butterfly_operations: value.butterfly_operations as u64, + input_bytes: value.input_bytes as u64, + encoded_output_bytes: value.encoded_output_bytes as u64, + peak_temporary_bytes: value.peak_temporary_bytes as u64, + } + } +} + +#[derive(Clone, Copy, Debug, PartialEq, uniffi::Record)] +pub struct TurboQuantizationQualityRecord { + pub mean_squared_error: f64, + pub maximum_squared_error: f64, +} + +impl From for TurboQuantizationQualityRecord { + fn from(value: TurboQuantizationQuality) -> Self { + Self { + mean_squared_error: value.mean_squared_error, + maximum_squared_error: value.maximum_squared_error, + } + } +} + +#[derive(Clone, Copy, Debug, PartialEq, uniffi::Record)] +pub struct TurboQuantizationVerificationRecord { + pub encoded_vectors: u64, + pub zero_vectors: u64, + pub quality: TurboQuantizationQualityRecord, +} + +impl From for TurboQuantizationVerificationRecord { + fn from(value: TurboQuantizationVerification) -> Self { + Self { + encoded_vectors: value.encoded_vectors, + zero_vectors: value.zero_vectors, + quality: value.quality.into(), + } + } +} + +#[uniffi::export] +pub fn default_turboquant_config() -> TurboQuantizationConfigRecord { + TurboQuantizationConfig::default().into() +} + +#[uniffi::export] +pub fn default_turboquant_build_limits() -> TurboQuantizationBuildLimitsRecord { + let value = TurboQuantizationBuildLimits::default(); + TurboQuantizationBuildLimitsRecord { + max_records: value.max_records.map(|value| value as u64), + max_input_bytes: value.max_input_bytes.map(|value| value as u64), + max_temporary_bytes: value.max_temporary_bytes.map(|value| value as u64), + max_transform_operations: value.max_transform_operations.map(|value| value as u64), + max_encoded_output_bytes: value.max_encoded_output_bytes.map(|value| value as u64), + max_worker_threads: value.max_worker_threads.map(|value| value as u64), + } +} + #[derive(Clone, Copy, Debug, PartialEq, Eq, uniffi::Enum)] pub enum CompositeBaseKindRecord { Hnsw, ProductQuantized, + TurboQuantized, } impl From for CompositeBaseKindRecord { @@ -1488,6 +1719,7 @@ impl From for CompositeBaseKindRecord { match value { CompositeBaseKind::Hnsw => Self::Hnsw, CompositeBaseKind::ProductQuantized => Self::ProductQuantized, + CompositeBaseKind::TurboQuantized => Self::TurboQuantized, } } } @@ -1638,6 +1870,8 @@ pub struct CompositeRebuildOptionsRecord { pub hnsw_limits: HnswBuildLimitsRecord, pub pq_worker_threads: u64, pub pq_limits: ProductQuantizationBuildLimitsRecord, + pub turboquant_worker_threads: u64, + pub turboquant_limits: TurboQuantizationBuildLimitsRecord, } impl TryFrom for CompositeRebuildOptions { @@ -1651,6 +1885,11 @@ impl TryFrom for CompositeRebuildOptions { "pq_worker_threads", )?)?, pq_limits: value.pq_limits.try_into()?, + turboquant_parallelism: BuildParallelism::new(to_usize( + value.turboquant_worker_threads, + "turboquant_worker_threads", + )?)?, + turboquant_limits: value.turboquant_limits.try_into()?, }) } } @@ -1676,6 +1915,8 @@ pub fn default_composite_rebuild_options() -> CompositeRebuildOptionsRecord { hnsw_limits: default_hnsw_build_limits(), pq_worker_threads: 1, pq_limits: default_pq_build_limits(), + turboquant_worker_threads: 1, + turboquant_limits: default_turboquant_build_limits(), } } @@ -2237,6 +2478,7 @@ where enum BindingAsyncAcceleratorKind { Hnsw, ProductQuantized, + TurboQuantized, Composite, Catalog, } @@ -2270,6 +2512,11 @@ where async_map.tree(), AsyncProductQuantizer::load(&store, manifest).await?, )?, + BindingAsyncAcceleratorKind::TurboQuantized => AsyncAcceleratorSet::empty() + .with_turboquant( + async_map.tree(), + AsyncTurboQuantizer::load(&store, manifest).await?, + )?, BindingAsyncAcceleratorKind::Composite => AsyncAcceleratorSet::empty().with_composite( async_map.tree(), AsyncCompositeAccelerator::load(&store, manifest).await?, @@ -2500,6 +2747,15 @@ pub struct BindingProductQuantizer { quality: ProductQuantizationQualityRecord, } +#[derive(uniffi::Object)] +pub struct BindingTurboQuantizer { + engine: Arc, + manifest: Vec, + source_descriptor: Vec, + config: TurboQuantizationConfigRecord, + quality: TurboQuantizationQualityRecord, +} + #[derive(uniffi::Object)] pub struct BindingCompositeAccelerator { engine: Arc, @@ -2526,6 +2782,7 @@ pub enum CompositeBuildOrRebuildKindRecord { NoAcceleratorRequired, HnswRebuilt, ProductQuantizedRebuilt, + TurboQuantizedRebuilt, } #[derive(Clone, uniffi::Record)] @@ -2534,10 +2791,12 @@ pub struct CompositeBuildOrRebuildOutcomeRecord { pub composite: Option>, pub hnsw: Option>, pub pq: Option>, + pub turboquant: Option>, pub reasons: Vec, pub composite_stats: CompositeBuildStatsRecord, pub hnsw_stats: Option, pub pq_stats: Option, + pub turboquant_stats: Option, } #[derive(Clone, Copy, Debug, PartialEq, Eq, uniffi::Enum)] @@ -2545,6 +2804,7 @@ pub enum CatalogAcceleratorKindRecord { Hnsw, ProductQuantized, Composite, + TurboQuantized, } impl From for CatalogAcceleratorKindRecord { @@ -2553,6 +2813,7 @@ impl From for CatalogAcceleratorKindRecord { CatalogAcceleratorKind::Hnsw => Self::Hnsw, CatalogAcceleratorKind::ProductQuantized => Self::ProductQuantized, CatalogAcceleratorKind::Composite => Self::Composite, + CatalogAcceleratorKind::TurboQuantized => Self::TurboQuantized, } } } @@ -2613,6 +2874,23 @@ where }) } +fn binding_turboquantizer( + engine: Arc, + index: &TurboQuantizer, +) -> Arc +where + S: Store + Clone + Send + Sync, + S::Error: Send + Sync, +{ + Arc::new(BindingTurboQuantizer { + engine, + manifest: index.manifest_cid().0.to_vec(), + source_descriptor: index.source_descriptor().0.to_vec(), + config: index.config().clone().into(), + quality: index.quality().into(), + }) +} + fn binding_composite_accelerator( engine: Arc, index: &CompositeAccelerator, @@ -2673,10 +2951,12 @@ where composite: Some(binding_composite_accelerator(engine, &accelerator)), hnsw: None, pq: None, + turboquant: None, reasons: Vec::new(), composite_stats: stats.into(), hnsw_stats: None, pq_stats: None, + turboquant_stats: None, } } CompositeBuildOrRebuildOutcome::NoAcceleratorRequired { @@ -2687,10 +2967,12 @@ where composite: None, hnsw: None, pq: None, + turboquant: None, reasons: reasons.into_iter().map(Into::into).collect(), composite_stats: composite_stats.into(), hnsw_stats: None, pq_stats: None, + turboquant_stats: None, }, CompositeBuildOrRebuildOutcome::HnswRebuilt { accelerator, @@ -2702,10 +2984,12 @@ where composite: None, hnsw: Some(binding_hnsw_index(engine, &accelerator)), pq: None, + turboquant: None, reasons: reasons.into_iter().map(Into::into).collect(), composite_stats: composite_stats.into(), hnsw_stats: Some(rebuild_stats.into()), pq_stats: None, + turboquant_stats: None, }, CompositeBuildOrRebuildOutcome::ProductQuantizedRebuilt { accelerator, @@ -2717,10 +3001,29 @@ where composite: None, hnsw: None, pq: Some(binding_product_quantizer(engine, &accelerator)), + turboquant: None, reasons: reasons.into_iter().map(Into::into).collect(), composite_stats: composite_stats.into(), hnsw_stats: None, pq_stats: Some(rebuild_stats.into()), + turboquant_stats: None, + }, + CompositeBuildOrRebuildOutcome::TurboQuantizedRebuilt { + accelerator, + reasons, + composite_stats, + rebuild_stats, + } => CompositeBuildOrRebuildOutcomeRecord { + kind: CompositeBuildOrRebuildKindRecord::TurboQuantizedRebuilt, + composite: None, + hnsw: None, + pq: None, + turboquant: Some(binding_turboquantizer(engine, &accelerator)), + reasons: reasons.into_iter().map(Into::into).collect(), + composite_stats: composite_stats.into(), + hnsw_stats: None, + pq_stats: None, + turboquant_stats: Some(rebuild_stats.into()), }, } } @@ -2769,6 +3072,28 @@ where )) } +fn build_composite_turboquant( + engine: Arc, + store: S, + base_source: prolly::Cid, + current_source: prolly::Cid, + base_manifest: prolly::Cid, + config: CompositeAcceleratorConfig, + limits: CompositeBuildLimits, +) -> Result +where + S: Store + Clone + Send + Sync, + S::Error: Send + Sync, +{ + let base_map = ProximityMap::load(store.clone(), base_source)?; + let current_map = ProximityMap::load(store.clone(), current_source)?; + let base = CompositeBase::TurboQuantized(TurboQuantizer::load(store, base_manifest)?); + Ok(composite_build_outcome( + engine, + CompositeAccelerator::build(&base_map, ¤t_map, base, config, limits)?, + )) +} + fn rebuild_composite_hnsw( engine: Arc, store: S, @@ -2829,6 +3154,36 @@ where )) } +fn rebuild_composite_turboquant( + engine: Arc, + store: S, + base_source: prolly::Cid, + current_source: prolly::Cid, + base_manifest: prolly::Cid, + config: CompositeAcceleratorConfig, + limits: CompositeBuildLimits, + rebuild: CompositeRebuildOptions, +) -> Result +where + S: Store + Clone + Send + Sync, + S::Error: Send + Sync, +{ + let base_map = ProximityMap::load(store.clone(), base_source)?; + let current_map = ProximityMap::load(store.clone(), current_source)?; + let base = CompositeBase::TurboQuantized(TurboQuantizer::load(store, base_manifest)?); + Ok(composite_rebuild_outcome( + engine, + CompositeAccelerator::build_or_rebuild( + &base_map, + ¤t_map, + base, + config, + limits, + rebuild, + )?, + )) +} + fn search_hnsw( store: S, manifest: &prolly::Cid, @@ -2901,42 +3256,39 @@ where .map_err(Into::into) } -fn binding_accelerator_catalog( - engine: Arc, - catalog: &AcceleratorCatalog, -) -> Arc +fn search_turboquant( + store: S, + manifest: &prolly::Cid, + source: &prolly::Cid, + request: SearchRequest<'_>, +) -> Result where S: Store + Clone + Send + Sync, S::Error: Send + Sync, { - Arc::new(BindingAcceleratorCatalog { - engine, - manifest: catalog.manifest_cid().0.to_vec(), - source_descriptor: catalog.source_descriptor().0.to_vec(), - entries: catalog.entries().iter().cloned().map(Into::into).collect(), - }) + let index = TurboQuantizer::load(store.clone(), manifest.clone())?; + let map = ProximityMap::load(store, source.clone())?; + index + .search(&map, request) + .map(Into::into) + .map_err(Into::into) } -fn search_composite( +fn verify_turboquant( store: S, manifest: &prolly::Cid, source: &prolly::Cid, - request: SearchRequest<'_>, -) -> Result +) -> Result where S: Store + Clone + Send + Sync, S::Error: Send + Sync, { - let map = ProximityMap::load(store.clone(), source.clone())?; - let composite = CompositeAccelerator::load(store.clone(), manifest.clone())?; - let accelerators = AcceleratorSet::empty().with_composite(map.tree(), composite)?; - let search_io = SearchIo::new(store, Arc::new(SearchRuntime::default())); - map.search_with(&accelerators, &search_io, request) - .map(Into::into) - .map_err(Into::into) + let index = TurboQuantizer::load(store.clone(), manifest.clone())?; + let map = ProximityMap::load(store, source.clone())?; + index.verify(&map).map(Into::into).map_err(Into::into) } -fn prove_composite_search( +fn prove_turboquant_search( store: S, manifest: &prolly::Cid, source: &prolly::Cid, @@ -2947,16 +3299,69 @@ where S: Store + Clone + Send + Sync, S::Error: Send + Sync, { - let index = CompositeAccelerator::load(store.clone(), manifest.clone())?; + let index = TurboQuantizer::load(store.clone(), manifest.clone())?; let map = ProximityMap::load(store, source.clone())?; index .prove_search(&map, request, limits) .map_err(Into::into) } -fn search_catalog( - store: S, - manifest: &prolly::Cid, +fn binding_accelerator_catalog( + engine: Arc, + catalog: &AcceleratorCatalog, +) -> Arc +where + S: Store + Clone + Send + Sync, + S::Error: Send + Sync, +{ + Arc::new(BindingAcceleratorCatalog { + engine, + manifest: catalog.manifest_cid().0.to_vec(), + source_descriptor: catalog.source_descriptor().0.to_vec(), + entries: catalog.entries().iter().cloned().map(Into::into).collect(), + }) +} + +fn search_composite( + store: S, + manifest: &prolly::Cid, + source: &prolly::Cid, + request: SearchRequest<'_>, +) -> Result +where + S: Store + Clone + Send + Sync, + S::Error: Send + Sync, +{ + let map = ProximityMap::load(store.clone(), source.clone())?; + let composite = CompositeAccelerator::load(store.clone(), manifest.clone())?; + let accelerators = AcceleratorSet::empty().with_composite(map.tree(), composite)?; + let search_io = SearchIo::new(store, Arc::new(SearchRuntime::default())); + map.search_with(&accelerators, &search_io, request) + .map(Into::into) + .map_err(Into::into) +} + +fn prove_composite_search( + store: S, + manifest: &prolly::Cid, + source: &prolly::Cid, + request: SearchRequest<'_>, + limits: &ContentGraphLimits, +) -> Result +where + S: Store + Clone + Send + Sync, + S::Error: Send + Sync, +{ + let index = CompositeAccelerator::load(store.clone(), manifest.clone())?; + let map = ProximityMap::load(store, source.clone())?; + index + .prove_search(&map, request, limits) + .map_err(Into::into) +} + +fn search_catalog( + store: S, + manifest: &prolly::Cid, source: &prolly::Cid, request: SearchRequest<'_>, ) -> Result @@ -2996,6 +3401,7 @@ fn build_catalog( source: prolly::Cid, hnsw: Option, pq: Option, + turboquant: Option, composite: Option, ) -> Result, ProllyBindingError> where @@ -3012,6 +3418,10 @@ where accelerators = accelerators.with_pq(map.tree(), ProductQuantizer::load(store.clone(), manifest)?)?; } + if let Some(manifest) = turboquant { + accelerators = accelerators + .with_turboquant(map.tree(), TurboQuantizer::load(store.clone(), manifest)?)?; + } if let Some(manifest) = composite { accelerators = accelerators.with_composite( map.tree(), @@ -3279,6 +3689,176 @@ impl BindingProductQuantizer { } } +#[uniffi::export] +impl BindingTurboQuantizer { + pub fn manifest(&self) -> Vec { + self.manifest.clone() + } + + pub fn source_descriptor(&self) -> Vec { + self.source_descriptor.clone() + } + + pub fn config(&self) -> TurboQuantizationConfigRecord { + self.config.clone() + } + + pub fn quality(&self) -> TurboQuantizationQualityRecord { + self.quality + } + + pub fn verify( + &self, + map: Arc, + ) -> Result { + if !Arc::ptr_eq(&self.engine, &map.engine) { + return Err(ProllyBindingError::InvalidArgument { + reason: "TurboQuantizer and proximity map belong to different engines".to_string(), + }); + } + let manifest = crate::cid_from_vec(self.manifest.clone())?; + let source = crate::cid_from_vec(map.descriptor())?; + match &self.engine.inner { + BindingEngine::Memory(engine) => { + verify_turboquant(engine.store().clone(), &manifest, &source) + } + BindingEngine::File(engine) => { + verify_turboquant(engine.store().clone(), &manifest, &source) + } + #[cfg(feature = "sqlite")] + BindingEngine::Sqlite(engine) => { + verify_turboquant(engine.store().clone(), &manifest, &source) + } + BindingEngine::Host(engine) => { + verify_turboquant(engine.store().clone(), &manifest, &source) + } + } + } + + pub fn search( + &self, + map: Arc, + request: ProximitySearchRequestRecord, + ) -> Result { + if !Arc::ptr_eq(&self.engine, &map.engine) { + return Err(ProllyBindingError::InvalidArgument { + reason: "TurboQuantizer and proximity map belong to different engines".to_string(), + }); + } + let manifest = crate::cid_from_vec(self.manifest.clone())?; + let source = crate::cid_from_vec(map.descriptor())?; + let request = proximity_search_request(&request)?; + match &self.engine.inner { + BindingEngine::Memory(engine) => { + search_turboquant(engine.store().clone(), &manifest, &source, request) + } + BindingEngine::File(engine) => { + search_turboquant(engine.store().clone(), &manifest, &source, request) + } + #[cfg(feature = "sqlite")] + BindingEngine::Sqlite(engine) => { + search_turboquant(engine.store().clone(), &manifest, &source, request) + } + BindingEngine::Host(engine) => { + search_turboquant(engine.store().clone(), &manifest, &source, request) + } + } + } + + pub fn search_with_runtime( + &self, + map: Arc, + request: ProximitySearchRequestRecord, + runtime: Arc, + ) -> Result { + if !Arc::ptr_eq(&self.engine, &map.engine) || !runtime.belongs_to(&self.engine) { + return Err(ProllyBindingError::InvalidArgument { + reason: "TurboQuantizer, proximity map, and search runtime must belong to the same engine".to_string(), + }); + } + let manifest = crate::cid_from_vec(self.manifest.clone())?; + let source = crate::cid_from_vec(map.descriptor())?; + let request = proximity_search_request(&request)?; + with_proximity_search_io!(runtime, io, { + let store = io.store().clone(); + let map = ProximityMap::load(store.clone(), source)?; + let index = TurboQuantizer::load(store, manifest)?; + let accelerators = AcceleratorSet::empty().with_turboquant(map.tree(), index)?; + map.search_with(&accelerators, io, request) + .map(Into::into) + .map_err(Into::into) + }) + } + + pub fn search_cancellable( + &self, + map: Arc, + request: ProximitySearchRequestRecord, + runtime: Option>, + cancellation: Arc, + ) -> Result { + let runtime = binding_search_runtime(&self.engine, runtime)?; + search_binding_accelerator_cancellable( + &self.engine, + &map, + &runtime, + crate::cid_from_vec(self.manifest.clone())?, + BindingAsyncAcceleratorKind::TurboQuantized, + proximity_search_request(&request)?, + cancellation.inner.clone(), + ) + } + + pub fn prove_search( + &self, + map: Arc, + request: ProximitySearchRequestRecord, + limits: ContentGraphLimitsRecord, + ) -> Result, ProllyBindingError> { + if !Arc::ptr_eq(&self.engine, &map.engine) { + return Err(ProllyBindingError::InvalidArgument { + reason: "TurboQuantizer and proximity map belong to different engines".to_string(), + }); + } + let manifest = crate::cid_from_vec(self.manifest.clone())?; + let source = crate::cid_from_vec(map.descriptor())?; + let request = proximity_search_request(&request)?; + let limits = ContentGraphLimits::try_from(limits)?; + let proof = match &self.engine.inner { + BindingEngine::Memory(engine) => prove_turboquant_search( + engine.store().clone(), + &manifest, + &source, + request, + &limits, + ), + BindingEngine::File(engine) => prove_turboquant_search( + engine.store().clone(), + &manifest, + &source, + request, + &limits, + ), + #[cfg(feature = "sqlite")] + BindingEngine::Sqlite(engine) => prove_turboquant_search( + engine.store().clone(), + &manifest, + &source, + request, + &limits, + ), + BindingEngine::Host(engine) => prove_turboquant_search( + engine.store().clone(), + &manifest, + &source, + request, + &limits, + ), + }?; + Ok(Arc::new(BindingProximitySearchProof { inner: proof })) + } +} + #[uniffi::export] impl BindingCompositeAccelerator { pub fn manifest(&self) -> Vec { @@ -3560,6 +4140,12 @@ pub struct ProductQuantizationBuildResultRecord { pub stats: ProductQuantizationBuildStatsRecord, } +#[derive(Clone, uniffi::Record)] +pub struct TurboQuantizationBuildResultRecord { + pub index: Arc, + pub stats: TurboQuantizationBuildStatsRecord, +} + impl BindingProximityMap { fn from_descriptor(engine: Arc, descriptor: prolly::Cid) -> Arc { let map = Arc::new(Self { @@ -3756,6 +4342,40 @@ impl BindingProximityMap { }) } + pub fn build_turboquant( + &self, + config: TurboQuantizationConfigRecord, + worker_threads: u64, + limits: TurboQuantizationBuildLimitsRecord, + ) -> Result { + let parallelism = BuildParallelism::new(to_usize(worker_threads, "worker_threads")?)?; + let limits = TurboQuantizationBuildLimits::try_from(limits)?; + with_proximity_map!(self, map, { + let (index, stats) = + TurboQuantizer::build_with_limits(&map, config.into(), parallelism, limits)?; + Ok(TurboQuantizationBuildResultRecord { + index: binding_turboquantizer(self.engine.clone(), &index), + stats: stats.into(), + }) + }) + } + + pub fn load_turboquant( + &self, + manifest: Vec, + ) -> Result, ProllyBindingError> { + let manifest = crate::cid_from_vec(manifest)?; + with_proximity_store_map!(self, store, map, { + let index = TurboQuantizer::load(store, manifest)?; + if index.source_descriptor() != &map.tree().descriptor { + return Err(ProllyBindingError::InvalidArgument { + reason: "TurboQuantizer is bound to a different source descriptor".to_string(), + }); + } + Ok(binding_turboquantizer(self.engine.clone(), &index)) + }) + } + pub fn build_composite_hnsw( &self, base_map: Arc, @@ -3874,6 +4494,65 @@ impl BindingProximityMap { } } + pub fn build_composite_turboquant( + &self, + base_map: Arc, + base: Arc, + config: CompositeAcceleratorConfigRecord, + limits: CompositeBuildLimitsRecord, + ) -> Result { + if !Arc::ptr_eq(&self.engine, &base_map.engine) || !Arc::ptr_eq(&self.engine, &base.engine) + { + return Err(ProllyBindingError::InvalidArgument { + reason: "composite inputs belong to different engines".to_string(), + }); + } + let base_source = crate::cid_from_vec(base_map.descriptor())?; + let current_source = crate::cid_from_vec(self.descriptor())?; + let base_manifest = crate::cid_from_vec(base.manifest())?; + let config = config.try_into()?; + let limits = limits.try_into()?; + match &self.engine.inner { + BindingEngine::Memory(engine) => build_composite_turboquant( + self.engine.clone(), + engine.store().clone(), + base_source, + current_source, + base_manifest, + config, + limits, + ), + BindingEngine::File(engine) => build_composite_turboquant( + self.engine.clone(), + engine.store().clone(), + base_source, + current_source, + base_manifest, + config, + limits, + ), + #[cfg(feature = "sqlite")] + BindingEngine::Sqlite(engine) => build_composite_turboquant( + self.engine.clone(), + engine.store().clone(), + base_source, + current_source, + base_manifest, + config, + limits, + ), + BindingEngine::Host(engine) => build_composite_turboquant( + self.engine.clone(), + engine.store().clone(), + base_source, + current_source, + base_manifest, + config, + limits, + ), + } + } + pub fn build_or_rebuild_composite_hnsw( &self, base_map: Arc, @@ -4004,6 +4683,71 @@ impl BindingProximityMap { } } + pub fn build_or_rebuild_composite_turboquant( + &self, + base_map: Arc, + base: Arc, + config: CompositeAcceleratorConfigRecord, + limits: CompositeBuildLimitsRecord, + rebuild: CompositeRebuildOptionsRecord, + ) -> Result { + if !Arc::ptr_eq(&self.engine, &base_map.engine) || !Arc::ptr_eq(&self.engine, &base.engine) + { + return Err(ProllyBindingError::InvalidArgument { + reason: "composite inputs belong to different engines".to_string(), + }); + } + let base_source = crate::cid_from_vec(base_map.descriptor())?; + let current_source = crate::cid_from_vec(self.descriptor())?; + let base_manifest = crate::cid_from_vec(base.manifest())?; + let config = config.try_into()?; + let limits = limits.try_into()?; + let rebuild = rebuild.try_into()?; + match &self.engine.inner { + BindingEngine::Memory(engine) => rebuild_composite_turboquant( + self.engine.clone(), + engine.store().clone(), + base_source, + current_source, + base_manifest, + config, + limits, + rebuild, + ), + BindingEngine::File(engine) => rebuild_composite_turboquant( + self.engine.clone(), + engine.store().clone(), + base_source, + current_source, + base_manifest, + config, + limits, + rebuild, + ), + #[cfg(feature = "sqlite")] + BindingEngine::Sqlite(engine) => rebuild_composite_turboquant( + self.engine.clone(), + engine.store().clone(), + base_source, + current_source, + base_manifest, + config, + limits, + rebuild, + ), + BindingEngine::Host(engine) => rebuild_composite_turboquant( + self.engine.clone(), + engine.store().clone(), + base_source, + current_source, + base_manifest, + config, + limits, + rebuild, + ), + } + } + pub fn load_composite( &self, manifest: Vec, @@ -4025,6 +4769,7 @@ impl BindingProximityMap { &self, hnsw: Option>, pq: Option>, + turboquant: Option>, composite: Option>, ) -> Result, ProllyBindingError> { for belongs in [ @@ -4032,6 +4777,9 @@ impl BindingProximityMap { .map(|value| Arc::ptr_eq(&self.engine, &value.engine)), pq.as_ref() .map(|value| Arc::ptr_eq(&self.engine, &value.engine)), + turboquant + .as_ref() + .map(|value| Arc::ptr_eq(&self.engine, &value.engine)), composite .as_ref() .map(|value| Arc::ptr_eq(&self.engine, &value.engine)), @@ -4052,6 +4800,9 @@ impl BindingProximityMap { let pq = pq .map(|value| crate::cid_from_vec(value.manifest())) .transpose()?; + let turboquant = turboquant + .map(|value| crate::cid_from_vec(value.manifest())) + .transpose()?; let composite = composite .map(|value| crate::cid_from_vec(value.manifest())) .transpose()?; @@ -4062,6 +4813,7 @@ impl BindingProximityMap { source, hnsw, pq, + turboquant, composite, ), BindingEngine::File(engine) => build_catalog( @@ -4070,6 +4822,7 @@ impl BindingProximityMap { source, hnsw, pq, + turboquant, composite, ), #[cfg(feature = "sqlite")] @@ -4079,6 +4832,7 @@ impl BindingProximityMap { source, hnsw, pq, + turboquant, composite, ), BindingEngine::Host(engine) => build_catalog( @@ -4087,6 +4841,7 @@ impl BindingProximityMap { source, hnsw, pq, + turboquant, composite, ), } diff --git a/bindings/uniffi/src/lib.rs b/bindings/uniffi/src/lib.rs index 333bbebf..302ecc50 100644 --- a/bindings/uniffi/src/lib.rs +++ b/bindings/uniffi/src/lib.rs @@ -54,19 +54,19 @@ pub use domain::proximity::{ default_composite_accelerator_config, default_composite_build_limits, default_composite_rebuild_options, default_content_graph_limits, default_hnsw_build_limits, default_hnsw_config, default_pq_build_limits, default_pq_config, default_proximity_config, - default_proximity_search_runtime_policy, exact_proximity_search_request, - verify_proximity_membership_proof, verify_proximity_structure_proof, - AcceleratorCatalogEntryRecord, AdaptiveQualityRecord, BindingAcceleratorCatalog, - BindingCompositeAccelerator, BindingHnswIndex, BindingProductQuantizer, - BindingProximityCancellationToken, BindingProximityMap, BindingProximityReadSession, - BindingProximitySearchProof, BindingProximitySearchRuntime, CatalogAcceleratorKindRecord, - CompositeAcceleratorConfigRecord, CompositeBaseKindRecord, CompositeBuildLimitsRecord, - CompositeBuildOrRebuildKindRecord, CompositeBuildOrRebuildOutcomeRecord, - CompositeBuildOutcomeRecord, CompositeBuildStatsRecord, CompositeRebuildOptionsRecord, - ContentGraphLimitsRecord, ContentObjectKindRecord, DistanceMetricRecord, - ExactProximityRecordRecord, FullRebuildReasonKindRecord, FullRebuildReasonRecord, - HnswBuildLimitsRecord, HnswBuildResultRecord, HnswBuildStatsRecord, HnswConfigRecord, - HnswRoutingVectorEncodingRecord, ProductQuantizationBuildLimitsRecord, + default_proximity_search_runtime_policy, default_turboquant_build_limits, + default_turboquant_config, exact_proximity_search_request, verify_proximity_membership_proof, + verify_proximity_structure_proof, AcceleratorCatalogEntryRecord, AdaptiveQualityRecord, + BindingAcceleratorCatalog, BindingCompositeAccelerator, BindingHnswIndex, + BindingProductQuantizer, BindingProximityCancellationToken, BindingProximityMap, + BindingProximityReadSession, BindingProximitySearchProof, BindingProximitySearchRuntime, + BindingTurboQuantizer, CatalogAcceleratorKindRecord, CompositeAcceleratorConfigRecord, + CompositeBaseKindRecord, CompositeBuildLimitsRecord, CompositeBuildOrRebuildKindRecord, + CompositeBuildOrRebuildOutcomeRecord, CompositeBuildOutcomeRecord, CompositeBuildStatsRecord, + CompositeRebuildOptionsRecord, ContentGraphLimitsRecord, ContentObjectKindRecord, + DistanceMetricRecord, ExactProximityRecordRecord, FullRebuildReasonKindRecord, + FullRebuildReasonRecord, HnswBuildLimitsRecord, HnswBuildResultRecord, HnswBuildStatsRecord, + HnswConfigRecord, HnswRoutingVectorEncodingRecord, ProductQuantizationBuildLimitsRecord, ProductQuantizationBuildResultRecord, ProductQuantizationBuildStatsRecord, ProductQuantizationConfigRecord, ProductQuantizationQualityRecord, ProximityConfigRecord, ProximityFilterKind, ProximityFilterRecord, ProximityMembershipProofRecord, @@ -78,7 +78,9 @@ pub use domain::proximity::{ ProximitySearchVerificationRecord, ProximityStructuralProofRecord, ProximityStructuralVerificationRecord, ProximityVerificationRecord, QueryKernelRecord, SearchBackendRecord, SearchBudgetRecord, SearchCompletionRecord, SearchPolicyKind, - TypedContentObjectRecord, + TurboQuantizationBuildLimitsRecord, TurboQuantizationBuildResultRecord, + TurboQuantizationBuildStatsRecord, TurboQuantizationConfigRecord, + TurboQuantizationQualityRecord, TurboQuantizationVerificationRecord, TypedContentObjectRecord, }; pub use domain::versioned::{ BindingMapComparison, BindingMapMerge, BindingMapSnapshot, BindingMapSubscription, diff --git a/bindings/wasm/COOKBOOK.md b/bindings/wasm/COOKBOOK.md index 78048aff..32311870 100644 --- a/bindings/wasm/COOKBOOK.md +++ b/bindings/wasm/COOKBOOK.md @@ -32,6 +32,48 @@ Browser-safe application files include `batch-build.ts`, `vector-sidecar.ts`, `provenance-values.ts`, `materialized-view.ts`, and `browser-storage.ts`. +## Build And Force A TurboQuant RAG Sidecar + +The high-level browser facade builds and searches TurboQuant entirely in WASM; +it has no native-library or filesystem dependency. Browser construction is +single-worker, candidates are reranked from the authoritative proximity map, +and `Auto` remains disabled pending qualification. + +```ts +import { Engine, loadProllyWasm } from "prollydb-wasm"; + +const wasm = await loadProllyWasm(); +const text = new TextEncoder(); +const engine = Engine.memory(wasm); +try { + const records = Array.from({ length: 32 }, (_, index) => ({ + key: text.encode(`chunk/${index.toString().padStart(2, "0")}`), + vector: new Float32Array([index, index % 3, 0, 1, 2, 3, 4, 5]), + value: text.encode(`document-${index.toString().padStart(2, "0")}`), + })); + const proximity = await engine.buildProximity(8, records); + const built = await proximity.buildTurboQuant({ workerThreads: 1n }); + const request = { + vector: new Float32Array([0, 0, 0, 1, 2, 3, 4, 5]), + topK: 3, + policy: "fixed_budget" as const, + backend: "turbo_quantized" as const, + }; + const manifest = built.index.manifest(); + if (built.index.verify(proximity).encodedVectors !== BigInt(records.length)) { + throw new Error("incomplete TurboQuant sidecar"); + } + if ((await built.index.search(proximity, request)).backend !== "turbo_quantized") { + throw new Error("unexpected backend"); + } + built.index.close(); + proximity.loadTurboQuant(manifest).close(); + proximity.close(); +} finally { + engine.close(); +} +``` + ## Create A Browser Snapshot ```ts diff --git a/bindings/wasm/src/index.ts b/bindings/wasm/src/index.ts index c9329928..3c51af54 100644 --- a/bindings/wasm/src/index.ts +++ b/bindings/wasm/src/index.ts @@ -910,9 +910,10 @@ export interface PortableSearchRequest { budget?: PortableSearchBudget; filter?: PortableSearchFilter; kernel?: "scalar_deterministic" | "simd_deterministic" | "auto_deterministic"; - backend?: "native" | "product_quantized" | "hnsw" | "composite" | "auto"; + backend?: "native" | "product_quantized" | "hnsw" | "composite" | "auto" | "turbo_quantized"; hnswEfSearch?: number; pqRerankMultiplier?: number; + turboquantRerankMultiplier?: number; signal?: AbortSignal; } @@ -955,6 +956,7 @@ export interface ProximitySearchRuntimePolicy { authoritativeMaxBytes: bigint; hnswMaxBytes: bigint; pqMaxBytes: bigint; + turboquantMaxBytes: bigint; } export interface ProximitySearchRuntimeStats { @@ -969,6 +971,7 @@ export function defaultProximitySearchRuntimePolicy(): ProximitySearchRuntimePol authoritativeMaxBytes: 128n * 1024n * 1024n, hnswMaxBytes: 96n * 1024n * 1024n, pqMaxBytes: 32n * 1024n * 1024n, + turboquantMaxBytes: 32n * 1024n * 1024n, }; } @@ -1092,6 +1095,62 @@ export function defaultPqBuildLimits(): ProductQuantizationBuildLimits { return {}; } +export interface TurboQuantizationConfig { + bitWidth: 2 | 3 | 4; + rerankMultiplier: number; + seed: bigint; +} + +export interface TurboQuantizationBuildLimits { + maxRecords?: bigint; + maxInputBytes?: bigint; + maxTemporaryBytes?: bigint; + maxTransformOperations?: bigint; + maxEncodedOutputBytes?: bigint; + maxWorkerThreads?: bigint; +} + +export interface TurboQuantizationBuildStats { + encodedVectors: bigint; + zeroVectors: bigint; + transformedComponents: bigint; + butterflyOperations: bigint; + inputBytes: bigint; + encodedOutputBytes: bigint; + peakTemporaryBytes: bigint; +} + +export interface TurboQuantizationQuality { + meanSquaredError: number; + maximumSquaredError: number; +} + +export interface TurboQuantizationVerification { + encodedVectors: bigint; + zeroVectors: bigint; + quality: TurboQuantizationQuality; +} + +export interface TurboQuantizationBuildOptions { + config?: TurboQuantizationConfig; + workerThreads?: bigint; + limits?: TurboQuantizationBuildLimits; + signal?: AbortSignal; +} + +export interface TurboQuantizationBuildResult { + index: WasmTurboQuantizer; + stats: TurboQuantizationBuildStats; +} + +export function defaultTurboQuantConfig(): TurboQuantizationConfig { + return { bitWidth: 4, rerankMultiplier: 8, seed: 0n }; +} + +export function defaultTurboQuantBuildLimits(): TurboQuantizationBuildLimits { + return {}; +} + export interface CompositeAcceleratorConfig { maxDeltaRecords: bigint; maxShadowRecords: bigint; @@ -1117,6 +1176,8 @@ export interface CompositeRebuildOptions { hnswLimits?: HnswBuildLimits; pqWorkerThreads?: bigint; pqLimits?: ProductQuantizationBuildLimits; + turboquantWorkerThreads?: bigint; + turboquantLimits?: TurboQuantizationBuildLimits; } export interface CompositeBuildOptions { config?: CompositeAcceleratorConfig; limits?: CompositeBuildLimits; signal?: AbortSignal; @@ -1126,13 +1187,15 @@ export interface CompositeBuildOutcome { accelerator?: WasmCompositeAccelerator; reasons: FullRebuildReason[]; stats: CompositeBuildStats; } export interface CompositeBuildOrRebuildOutcome { - kind: "composite" | "no_accelerator_required" | "hnsw_rebuilt" | "product_quantized_rebuilt"; + kind: "composite" | "no_accelerator_required" | "hnsw_rebuilt" | "product_quantized_rebuilt" | "turboquant_rebuilt"; composite?: WasmCompositeAccelerator; hnsw?: WasmHnswIndex; pq?: WasmProductQuantizer; + turboquant?: WasmTurboQuantizer; reasons: FullRebuildReason[]; compositeStats: CompositeBuildStats; hnswStats?: HnswBuildStats; pqStats?: ProductQuantizationBuildStats; + turboquantStats?: TurboQuantizationBuildStats; } export interface AcceleratorCatalogEntry { - kind: "hnsw" | "product_quantized" | "composite"; + kind: "hnsw" | "product_quantized" | "composite" | "turbo_quantized"; configurationFingerprint: Uint8Array; manifest: Uint8Array; } export function defaultCompositeAcceleratorConfig(): CompositeAcceleratorConfig { @@ -1164,6 +1227,9 @@ function ownProximitySearchRuntimePolicy(value: ProximitySearchRuntimePolicy): o ).toString(), hnswMaxBytes: requireUnsignedBigInt(value.hnswMaxBytes, "hnswMaxBytes").toString(), pqMaxBytes: requireUnsignedBigInt(value.pqMaxBytes, "pqMaxBytes").toString(), + turboquantMaxBytes: requireUnsignedBigInt( + value.turboquantMaxBytes, "turboquantMaxBytes", + ).toString(), }; } @@ -1234,6 +1300,34 @@ function ownPqBuildLimits(value: ProductQuantizationBuildLimits | undefined): ob }; } +function ownTurboQuantConfig(value: TurboQuantizationConfig | undefined): object { + const config = value ?? defaultTurboQuantConfig(); + if (config.bitWidth !== 2 && config.bitWidth !== 3 && config.bitWidth !== 4) { + throw new RangeError("bitWidth must be 2, 3, or 4"); + } + return { + bitWidth: config.bitWidth, + rerankMultiplier: requireUnsignedInteger( + config.rerankMultiplier, "rerankMultiplier", 0xffff_ffff, + ), + seed: requireUnsignedBigInt(config.seed, "seed").toString(), + }; +} + +function ownTurboQuantBuildLimits(value: TurboQuantizationBuildLimits | undefined): object { + const limits = value ?? defaultTurboQuantBuildLimits(); + const optional = (candidate: bigint | undefined, name: string) => + candidate == null ? undefined : requireUnsignedBigInt(candidate, name).toString(); + return { + maxRecords: optional(limits.maxRecords, "maxRecords"), + maxInputBytes: optional(limits.maxInputBytes, "maxInputBytes"), + maxTemporaryBytes: optional(limits.maxTemporaryBytes, "maxTemporaryBytes"), + maxTransformOperations: optional(limits.maxTransformOperations, "maxTransformOperations"), + maxEncodedOutputBytes: optional(limits.maxEncodedOutputBytes, "maxEncodedOutputBytes"), + maxWorkerThreads: optional(limits.maxWorkerThreads, "maxWorkerThreads"), + }; +} + function ownCompositeConfig(value: CompositeAcceleratorConfig | undefined): object { const config = value ?? defaultCompositeAcceleratorConfig(); return { @@ -1263,10 +1357,20 @@ function ownCompositeRebuildOptions(value: CompositeRebuildOptions | undefined): if (workerThreads !== 1n) { throw new RangeError("browser-safe WASM composite PQ rebuild requires pqWorkerThreads = 1"); } + const turboquantWorkerThreads = requireUnsignedBigInt( + options.turboquantWorkerThreads ?? 1n, "turboquantWorkerThreads", + ); + if (turboquantWorkerThreads !== 1n) { + throw new RangeError( + "browser-safe WASM composite TurboQuant rebuild requires turboquantWorkerThreads = 1", + ); + } return { hnswLimits: ownHnswBuildLimits(options.hnswLimits), pqWorkerThreads: workerThreads.toString(), pqLimits: ownPqBuildLimits(options.pqLimits), + turboquantWorkerThreads: turboquantWorkerThreads.toString(), + turboquantLimits: ownTurboQuantBuildLimits(options.turboquantLimits), }; } @@ -1314,6 +1418,7 @@ function ownPortableSearchRequest(request: PortableSearchRequest): object { backend: request.backend ?? "native", hnswEfSearch: request.hnswEfSearch, pqRerankMultiplier: request.pqRerankMultiplier, + turboquantRerankMultiplier: request.turboquantRerankMultiplier, }; } @@ -2920,10 +3025,12 @@ function wasmCompositeRebuildOutcome(result: any): CompositeBuildOrRebuildOutcom composite: result.composite == null ? undefined : new WasmCompositeAccelerator(result.composite), hnsw: result.hnsw == null ? undefined : new WasmHnswIndex(result.hnsw), pq: result.pq == null ? undefined : new WasmProductQuantizer(result.pq), + turboquant: result.turboquant == null ? undefined : new WasmTurboQuantizer(result.turboquant), reasons: result.reasons, compositeStats: result.compositeStats, hnswStats: result.hnswStats, pqStats: result.pqStats, + turboquantStats: result.turboquantStats, }; } @@ -2942,6 +3049,7 @@ export class WasmProximitySearchRuntime implements Disposable { authoritativeMaxBytes: BigInt(value.authoritativeMaxBytes), hnswMaxBytes: BigInt(value.hnswMaxBytes), pqMaxBytes: BigInt(value.pqMaxBytes), + turboquantMaxBytes: BigInt(value.turboquantMaxBytes), }; } stats(): ProximitySearchRuntimeStats { @@ -3116,6 +3224,34 @@ export class WasmProximityMap implements Disposable { loadPq(manifest: Uint8Array): WasmProductQuantizer { return new WasmProductQuantizer(this.nativeHandle().loadPq(ownedPortableBytes(manifest))); } + buildTurboQuant(options: TurboQuantizationBuildOptions = {}): Promise { + const native = this.nativeHandle(); + const config = ownTurboQuantConfig(options.config); + const workerThreads = requireUnsignedBigInt( + options.workerThreads ?? 1n, "workerThreads", + ).toString(); + const limits = ownTurboQuantBuildLimits(options.limits); + return portablePromise(options.signal, () => { + const result = native.buildTurboQuant(config, workerThreads, limits); + return { + index: new WasmTurboQuantizer(result.index), + stats: { + encodedVectors: BigInt(result.stats.encodedVectors), + zeroVectors: BigInt(result.stats.zeroVectors), + transformedComponents: BigInt(result.stats.transformedComponents), + butterflyOperations: BigInt(result.stats.butterflyOperations), + inputBytes: BigInt(result.stats.inputBytes), + encodedOutputBytes: BigInt(result.stats.encodedOutputBytes), + peakTemporaryBytes: BigInt(result.stats.peakTemporaryBytes), + }, + }; + }); + } + loadTurboQuant(manifest: Uint8Array): WasmTurboQuantizer { + return new WasmTurboQuantizer( + this.nativeHandle().loadTurboQuant(ownedPortableBytes(manifest)), + ); + } buildCompositeHnsw(baseMap: WasmProximityMap, base: WasmHnswIndex, options: CompositeBuildOptions = {}): Promise { const native = this.nativeHandle(); return portablePromise(options.signal, () => { @@ -3130,6 +3266,13 @@ export class WasmProximityMap implements Disposable { return { accelerator: result.accelerator == null ? undefined : new WasmCompositeAccelerator(result.accelerator), reasons: result.reasons, stats: result.stats }; }); } + buildCompositeTurboQuant(baseMap: WasmProximityMap, base: WasmTurboQuantizer, options: CompositeBuildOptions = {}): Promise { + const native = this.nativeHandle(); + return portablePromise(options.signal, () => { + const result = native.buildCompositeTurboQuant(baseMap.nativeHandle(), base.nativeHandle(), ownCompositeConfig(options.config), ownCompositeBuildLimits(options.limits)); + return { accelerator: result.accelerator == null ? undefined : new WasmCompositeAccelerator(result.accelerator), reasons: result.reasons, stats: result.stats }; + }); + } buildOrRebuildCompositeHnsw(baseMap: WasmProximityMap, base: WasmHnswIndex, options: CompositeBuildOrRebuildOptions = {}): Promise { const native = this.nativeHandle(); return portablePromise(options.signal, () => wasmCompositeRebuildOutcome(native.buildOrRebuildCompositeHnsw( @@ -3142,12 +3285,18 @@ export class WasmProximityMap implements Disposable { baseMap.nativeHandle(), base.nativeHandle(), ownCompositeConfig(options.config), ownCompositeBuildLimits(options.limits), ownCompositeRebuildOptions(options.rebuild), ))); } + buildOrRebuildCompositeTurboQuant(baseMap: WasmProximityMap, base: WasmTurboQuantizer, options: CompositeBuildOrRebuildOptions = {}): Promise { + const native = this.nativeHandle(); + return portablePromise(options.signal, () => wasmCompositeRebuildOutcome(native.buildOrRebuildCompositeTurboQuant( + baseMap.nativeHandle(), base.nativeHandle(), ownCompositeConfig(options.config), ownCompositeBuildLimits(options.limits), ownCompositeRebuildOptions(options.rebuild), + ))); + } loadComposite(manifest: Uint8Array): WasmCompositeAccelerator { return new WasmCompositeAccelerator(this.nativeHandle().loadComposite(ownedPortableBytes(manifest))); } - buildAcceleratorCatalog(options: { hnsw?: WasmHnswIndex; pq?: WasmProductQuantizer; composite?: WasmCompositeAccelerator } = {}): WasmAcceleratorCatalog { + buildAcceleratorCatalog(options: { hnsw?: WasmHnswIndex; pq?: WasmProductQuantizer; turboquant?: WasmTurboQuantizer; composite?: WasmCompositeAccelerator } = {}): WasmAcceleratorCatalog { return new WasmAcceleratorCatalog(this.nativeHandle().buildAcceleratorCatalog( - options.hnsw?.manifest(), options.pq?.manifest(), options.composite?.manifest(), + options.hnsw?.manifest(), options.pq?.manifest(), options.turboquant?.manifest(), options.composite?.manifest(), )); } loadAcceleratorCatalog(manifest: Uint8Array): WasmAcceleratorCatalog { @@ -3316,6 +3465,77 @@ export class WasmProductQuantizer implements Disposable { [Symbol.dispose](): void { this.close(); } } +export class WasmTurboQuantizer implements Disposable { + #native?: any; + constructor(native: any) { this.#native = native; } + #open(): any { + if (this.#native == null) throw new Error("WASM TurboQuantizer is closed"); + return this.#native; + } + nativeHandle(): any { return this.#open(); } + manifest(): Uint8Array { return ownedPortableBytes(this.#open().manifest()); } + sourceDescriptor(): Uint8Array { return ownedPortableBytes(this.#open().sourceDescriptor()); } + config(): TurboQuantizationConfig { + const value = this.#open().config(); + return { + bitWidth: value.bitWidth, + rerankMultiplier: value.rerankMultiplier, + seed: BigInt(value.seed), + }; + } + quality(): TurboQuantizationQuality { + const value = this.#open().quality(); + return { + meanSquaredError: value.meanSquaredError, + maximumSquaredError: value.maximumSquaredError, + }; + } + verify(map: WasmProximityMap): TurboQuantizationVerification { + const value = this.#open().verify(map.nativeHandle()); + return { + encodedVectors: BigInt(value.encodedVectors), + zeroVectors: BigInt(value.zeroVectors), + quality: { + meanSquaredError: value.quality.meanSquaredError, + maximumSquaredError: value.quality.maximumSquaredError, + }, + }; + } + search(map: WasmProximityMap, request: PortableSearchRequest): Promise { + const cancellation = map.cancellationToken(); + return this.searchCancellable(map, request, cancellation).finally(() => cancellation.close()); + } + searchWithRuntime( + map: WasmProximityMap, + request: PortableSearchRequest, + runtime: WasmProximitySearchRuntime, + ): Promise { + const cancellation = map.cancellationToken(); + return this.searchCancellable(map, request, cancellation, runtime) + .finally(() => cancellation.close()); + } + searchCancellable( + map: WasmProximityMap, request: PortableSearchRequest, + cancellation: WasmProximityCancellationToken, runtime?: WasmProximitySearchRuntime, + ): Promise { + const native = this.#open(); + const nativeMap = map.nativeHandle(); + const nativeRuntime = runtime?.nativeHandle(); + return cooperativeWasmSearch(request, cancellation, (owned, token) => ( + nativeRuntime == null + ? native.searchCancellable(nativeMap, owned, token) + : native.searchWithRuntimeCancellable(nativeMap, owned, nativeRuntime, token) + )); + } + proveSearch(map: WasmProximityMap, request: PortableSearchRequest): WasmProximitySearchProof { + return new WasmProximitySearchProof( + this.#open().proveSearch(map.nativeHandle(), ownPortableSearchRequest(request)), + ); + } + close(): void { this.#native?.free?.(); this.#native = undefined; } + [Symbol.dispose](): void { this.close(); } +} + export class WasmCompositeAccelerator implements Disposable { #native?: any; constructor(native: any) { this.#native = native; } @@ -3326,7 +3546,7 @@ export class WasmCompositeAccelerator implements Disposable { manifest(): Uint8Array { return ownedPortableBytes(this.nativeHandle().manifest()); } currentSourceDescriptor(): Uint8Array { return ownedPortableBytes(this.nativeHandle().currentSourceDescriptor()); } baseSourceDescriptor(): Uint8Array { return ownedPortableBytes(this.nativeHandle().baseSourceDescriptor()); } - baseKind(): "hnsw" | "product_quantized" { return this.nativeHandle().baseKind(); } + baseKind(): "hnsw" | "product_quantized" | "turbo_quantized" { return this.nativeHandle().baseKind(); } deltaCount(): bigint { return BigInt(this.nativeHandle().deltaCount()); } shadowCount(): bigint { return BigInt(this.nativeHandle().shadowCount()); } config(): CompositeAcceleratorConfig { return this.nativeHandle().config(); } diff --git a/bindings/wasm/src/proximity.rs b/bindings/wasm/src/proximity.rs index eb75656e..e6c164ed 100644 --- a/bindings/wasm/src/proximity.rs +++ b/bindings/wasm/src/proximity.rs @@ -4,18 +4,20 @@ use js_sys::{Array, BigInt, Float32Array, Function, Object, Reflect, Uint8Array} use prolly::{ AcceleratorCatalog, AcceleratorSet, AdaptiveQuality, AsyncAcceleratorCatalog, AsyncAcceleratorSet, AsyncCompositeAccelerator, AsyncHnswIndex, AsyncProductQuantizer, - AsyncProximityMap, AsyncSearchControl, BuildParallelism, CancellationToken, - CatalogAcceleratorKind, Cid, CompositeAccelerator, CompositeAcceleratorConfig, CompositeBase, - CompositeBaseKind, CompositeBuildLimits, CompositeBuildOrRebuildOutcome, CompositeBuildOutcome, - CompositeBuildStats, CompositeRebuildOptions, ContentGraphLimits, DistanceMetric, - FullRebuildReason, HnswBuildLimits, HnswBuildStats, HnswConfig, HnswIndex, - HnswRoutingVectorEncoding, HnswSearchOptions, PlannerPolicy, PqSearchOptions, - ProductQuantizationBuildLimits, ProductQuantizationBuildStats, ProductQuantizationConfig, - ProductQuantizationQuality, ProductQuantizer, ProximityConfig, ProximityFilter, ProximityMap, - ProximityMembershipProof, ProximityMutation, ProximityRecord, ProximitySearchClaim, - ProximitySearchProof, ProximityStructuralProof, ProximityVerification, QueryKernel, - SearchBackend, SearchBudget, SearchCompletion, SearchIo, SearchOptions, SearchPolicy, - SearchRequest, SearchRuntime, SearchRuntimePolicy, + AsyncProximityMap, AsyncSearchControl, AsyncTurboQuantizer, BuildParallelism, + CancellationToken, CatalogAcceleratorKind, Cid, CompositeAccelerator, + CompositeAcceleratorConfig, CompositeBase, CompositeBaseKind, CompositeBuildLimits, + CompositeBuildOrRebuildOutcome, CompositeBuildOutcome, CompositeBuildStats, + CompositeRebuildOptions, ContentGraphLimits, DistanceMetric, FullRebuildReason, + HnswBuildLimits, HnswBuildStats, HnswConfig, HnswIndex, HnswRoutingVectorEncoding, + HnswSearchOptions, PlannerPolicy, PqSearchOptions, ProductQuantizationBuildLimits, + ProductQuantizationBuildStats, ProductQuantizationConfig, ProductQuantizationQuality, + ProductQuantizer, ProximityConfig, ProximityFilter, ProximityMap, ProximityMembershipProof, + ProximityMutation, ProximityRecord, ProximitySearchClaim, ProximitySearchProof, + ProximityStructuralProof, ProximityVerification, QueryKernel, SearchBackend, SearchBudget, + SearchCompletion, SearchIo, SearchOptions, SearchPolicy, SearchRequest, SearchRuntime, + SearchRuntimePolicy, TurboQuantSearchOptions, TurboQuantizationBuildLimits, + TurboQuantizationBuildStats, TurboQuantizationConfig, TurboQuantizationQuality, TurboQuantizer, }; use std::future::Future; use std::sync::Arc; @@ -203,6 +205,7 @@ fn cancellable_map_search( enum WasmAsyncAcceleratorKind { Hnsw, ProductQuantized, + TurboQuantized, Composite, Catalog, } @@ -232,6 +235,11 @@ fn cancellable_accelerated_search( async_map.tree(), AsyncProductQuantizer::load(&store, manifest).await?, )?, + WasmAsyncAcceleratorKind::TurboQuantized => AsyncAcceleratorSet::empty() + .with_turboquant( + async_map.tree(), + AsyncTurboQuantizer::load(&store, manifest).await?, + )?, WasmAsyncAcceleratorKind::Composite => AsyncAcceleratorSet::empty().with_composite( async_map.tree(), AsyncCompositeAccelerator::load(&store, manifest).await?, @@ -310,6 +318,7 @@ fn search_runtime_policy_from_js(value: &JsValue) -> Result Result Result Result { + if value.is_null() || value.is_undefined() { + return Ok(TurboQuantizationConfig::default()); + } + Ok(TurboQuantizationConfig { + bit_width: u8::try_from(required_u32(value, "bitWidth")?) + .map_err(|_| JsValue::from_str("bitWidth must fit u8"))?, + rerank_multiplier: required_u32(value, "rerankMultiplier")?, + seed: required_string_u64(value, "seed")?, + }) +} + +fn turboquant_build_limits_from_js( + value: &JsValue, +) -> Result { + if value.is_null() || value.is_undefined() { + return Ok(TurboQuantizationBuildLimits::default()); + } + Ok(TurboQuantizationBuildLimits { + max_records: optional_string_usize(value, "maxRecords")?, + max_input_bytes: optional_string_usize(value, "maxInputBytes")?, + max_temporary_bytes: optional_string_usize(value, "maxTemporaryBytes")?, + max_transform_operations: optional_string_usize(value, "maxTransformOperations")?, + max_encoded_output_bytes: optional_string_usize(value, "maxEncodedOutputBytes")?, + max_worker_threads: optional_string_usize(value, "maxWorkerThreads")?, + }) +} + +fn turboquant_config_object(config: &TurboQuantizationConfig) -> Result { + let object = Object::new(); + Reflect::set( + &object, + &"bitWidth".into(), + &JsValue::from_f64(f64::from(config.bit_width)), + )?; + Reflect::set( + &object, + &"rerankMultiplier".into(), + &JsValue::from_f64(f64::from(config.rerank_multiplier)), + )?; + Reflect::set(&object, &"seed".into(), &BigInt::from(config.seed))?; + Ok(object) +} + +fn turboquant_build_stats_object(stats: TurboQuantizationBuildStats) -> Result { + let object = Object::new(); + for (name, value) in [ + ("encodedVectors", stats.encoded_vectors), + ("zeroVectors", stats.zero_vectors), + ("transformedComponents", stats.transformed_components), + ("butterflyOperations", stats.butterfly_operations), + ("inputBytes", stats.input_bytes), + ("encodedOutputBytes", stats.encoded_output_bytes), + ("peakTemporaryBytes", stats.peak_temporary_bytes), + ] { + Reflect::set(&object, &name.into(), &BigInt::from(value as u64))?; + } + Ok(object) +} + +fn turboquant_quality_object(quality: TurboQuantizationQuality) -> Result { + let object = Object::new(); + Reflect::set( + &object, + &"meanSquaredError".into(), + &JsValue::from_f64(quality.mean_squared_error), + )?; + Reflect::set( + &object, + &"maximumSquaredError".into(), + &JsValue::from_f64(quality.maximum_squared_error), + )?; + Ok(object) +} + fn composite_config_from_js(value: &JsValue) -> Result { if value.is_null() || value.is_undefined() { return Ok(CompositeAcceleratorConfig::default()); @@ -674,6 +763,8 @@ fn composite_rebuild_options_from_js(value: &JsValue) -> Result Result() + .map_err(|error| { + JsValue::from_str(&format!("invalid turboquantWorkerThreads: {error}")) + }) + }) + .transpose()? + .unwrap_or(1); + if turboquant_threads != 1 { + return Err(JsValue::from_str( + "browser-safe WASM composite TurboQuant rebuild requires turboquantWorkerThreads = 1", + )); + } Ok(CompositeRebuildOptions { hnsw_limits: hnsw_build_limits_from_js(&hnsw)?, pq_parallelism: BuildParallelism::serial(), pq_limits: pq_build_limits_from_js(&pq_limits)?, + turboquant_parallelism: BuildParallelism::serial(), + turboquant_limits: turboquant_build_limits_from_js(&turboquant_limits)?, }) } @@ -837,6 +949,37 @@ fn composite_rebuild_outcome_object( &pq_build_stats_object(rebuild_stats)?.into(), )?; } + CompositeBuildOrRebuildOutcome::TurboQuantizedRebuilt { + accelerator, + reasons, + composite_stats, + rebuild_stats, + } => { + Reflect::set(&object, &"kind".into(), &"turboquant_rebuilt".into())?; + Reflect::set( + &object, + &"turboquant".into(), + &JsValue::from(WasmTurboQuantizer { + engine, + inner: *accelerator, + }), + )?; + Reflect::set( + &object, + &"reasons".into(), + &rebuild_reasons_array(&reasons)?.into(), + )?; + Reflect::set( + &object, + &"compositeStats".into(), + &composite_stats_object(&composite_stats)?.into(), + )?; + Reflect::set( + &object, + &"turboquantStats".into(), + &turboquant_build_stats_object(rebuild_stats)?.into(), + )?; + } } Ok(object) } @@ -968,6 +1111,7 @@ fn owned_search_request(value: JsValue) -> Result { "hnsw" => SearchBackend::Hnsw, "composite" => SearchBackend::Composite, "auto" => SearchBackend::Auto, + "turbo_quantized" | "turboquant" => SearchBackend::TurboQuantized, other => { return Err(JsValue::from_str(&format!( "unknown search backend: {other}" @@ -990,6 +1134,9 @@ fn owned_search_request(value: JsValue) -> Result { pq: PqSearchOptions { rerank_multiplier: optional_u16(&value, "pqRerankMultiplier")?, }, + turboquant: TurboQuantSearchOptions { + rerank_multiplier: optional_u16(&value, "turboquantRerankMultiplier")?, + }, }, }) } @@ -1199,6 +1346,61 @@ impl WasmProximityMap { inner: index, }) } + #[wasm_bindgen(js_name = buildTurboQuant)] + pub fn build_turboquant( + &self, + config: JsValue, + worker_threads: String, + limits: JsValue, + ) -> Result { + let config = turboquant_config_from_js(&config)?; + let worker_threads = worker_threads + .parse::() + .map_err(|error| JsValue::from_str(&format!("invalid workerThreads: {error}")))?; + if worker_threads != 1 { + return Err(JsValue::from_str( + "browser-safe WASM TurboQuant requires workerThreads = 1", + )); + } + let limits = turboquant_build_limits_from_js(&limits)?; + let map = self.load()?; + let (index, stats) = + TurboQuantizer::build_with_limits(&map, config, BuildParallelism::serial(), limits) + .map_err(js_error)?; + let result = Object::new(); + Reflect::set( + &result, + &"index".into(), + &JsValue::from(WasmTurboQuantizer { + engine: Arc::clone(&self.engine), + inner: index, + }), + )?; + Reflect::set( + &result, + &"stats".into(), + &turboquant_build_stats_object(stats)?.into(), + )?; + Ok(result) + } + #[wasm_bindgen(js_name = loadTurboQuant)] + pub fn load_turboquant(&self, manifest: Uint8Array) -> Result { + let raw: [u8; 32] = manifest + .to_vec() + .try_into() + .map_err(|_| JsValue::from_str("TurboQuant manifest CID must be 32 bytes"))?; + let index = + TurboQuantizer::load(self.engine.store().clone(), Cid(raw)).map_err(js_error)?; + if index.source_descriptor() != &self.descriptor { + return Err(JsValue::from_str( + "TurboQuantizer is bound to a different source descriptor", + )); + } + Ok(WasmTurboQuantizer { + engine: Arc::clone(&self.engine), + inner: index, + }) + } #[wasm_bindgen(js_name = buildCompositeHnsw)] pub fn build_composite_hnsw( &self, @@ -1249,6 +1451,31 @@ impl WasmProximityMap { .map_err(js_error)?; composite_build_outcome_object(Arc::clone(&self.engine), outcome) } + #[wasm_bindgen(js_name = buildCompositeTurboQuant)] + pub fn build_composite_turboquant( + &self, + base_map: &WasmProximityMap, + base: &WasmTurboQuantizer, + config: JsValue, + limits: JsValue, + ) -> Result { + let current = self.load()?; + let base_map = base_map.load()?; + let base = TurboQuantizer::load( + self.engine.store().clone(), + base.inner.manifest_cid().clone(), + ) + .map_err(js_error)?; + let outcome = CompositeAccelerator::build( + &base_map, + ¤t, + CompositeBase::TurboQuantized(base), + composite_config_from_js(&config)?, + composite_limits_from_js(&limits)?, + ) + .map_err(js_error)?; + composite_build_outcome_object(Arc::clone(&self.engine), outcome) + } #[wasm_bindgen(js_name = buildOrRebuildCompositeHnsw)] pub fn build_or_rebuild_composite_hnsw( &self, @@ -1303,6 +1530,33 @@ impl WasmProximityMap { .map_err(js_error)?; composite_rebuild_outcome_object(Arc::clone(&self.engine), outcome) } + #[wasm_bindgen(js_name = buildOrRebuildCompositeTurboQuant)] + pub fn build_or_rebuild_composite_turboquant( + &self, + base_map: &WasmProximityMap, + base: &WasmTurboQuantizer, + config: JsValue, + limits: JsValue, + rebuild: JsValue, + ) -> Result { + let current = self.load()?; + let base_map = base_map.load()?; + let base = TurboQuantizer::load( + self.engine.store().clone(), + base.inner.manifest_cid().clone(), + ) + .map_err(js_error)?; + let outcome = CompositeAccelerator::build_or_rebuild( + &base_map, + ¤t, + CompositeBase::TurboQuantized(base), + composite_config_from_js(&config)?, + composite_limits_from_js(&limits)?, + composite_rebuild_options_from_js(&rebuild)?, + ) + .map_err(js_error)?; + composite_rebuild_outcome_object(Arc::clone(&self.engine), outcome) + } #[wasm_bindgen(js_name = loadComposite)] pub fn load_composite( &self, @@ -1329,6 +1583,7 @@ impl WasmProximityMap { &self, hnsw: Option, pq: Option, + turboquant: Option, composite: Option, ) -> Result { let map = self.load()?; @@ -1362,6 +1617,20 @@ impl WasmProximityMap { ) .map_err(js_error)?; } + if let Some(value) = turboquant { + set = set + .with_turboquant( + map.tree(), + TurboQuantizer::load( + self.engine.store().clone(), + Cid(value.to_vec().try_into().map_err(|_| { + JsValue::from_str("TurboQuant manifest CID must be 32 bytes") + })?), + ) + .map_err(js_error)?, + ) + .map_err(js_error)?; + } if let Some(value) = composite { set = set .with_composite( @@ -1748,6 +2017,143 @@ impl WasmProductQuantizer { } } +#[wasm_bindgen(js_name = WasmTurboQuantizer)] +pub struct WasmTurboQuantizer { + engine: Arc, + inner: TurboQuantizer>, +} + +#[wasm_bindgen(js_class = WasmTurboQuantizer)] +impl WasmTurboQuantizer { + pub fn manifest(&self) -> Vec { + self.inner.manifest_cid().as_bytes().to_vec() + } + + #[wasm_bindgen(js_name = sourceDescriptor)] + pub fn source_descriptor(&self) -> Vec { + self.inner.source_descriptor().as_bytes().to_vec() + } + + pub fn config(&self) -> Result { + turboquant_config_object(self.inner.config()) + } + + pub fn quality(&self) -> Result { + turboquant_quality_object(self.inner.quality()) + } + + pub fn verify(&self, map: &WasmProximityMap) -> Result { + let verification = self.inner.verify(&map.load()?).map_err(js_error)?; + let object = Object::new(); + Reflect::set( + &object, + &"encodedVectors".into(), + &BigInt::from(verification.encoded_vectors).into(), + )?; + Reflect::set( + &object, + &"zeroVectors".into(), + &BigInt::from(verification.zero_vectors).into(), + )?; + Reflect::set( + &object, + &"quality".into(), + &turboquant_quality_object(verification.quality)?.into(), + )?; + Ok(object) + } + + pub fn search(&self, map: &WasmProximityMap, request: JsValue) -> Result { + let request = owned_search_request(request)?; + self.inner + .search(&map.load()?, request.as_request()) + .map_err(js_error) + .and_then(search_result_object) + } + + #[wasm_bindgen(js_name = searchWithRuntime)] + pub fn search_with_runtime( + &self, + map: &WasmProximityMap, + request: JsValue, + runtime: &WasmProximitySearchRuntime, + ) -> Result { + runtime.ensure_engine(&self.engine)?; + runtime.ensure_engine(&map.engine)?; + let request = owned_search_request(request)?; + let map = map.load()?; + let index = TurboQuantizer::load( + runtime.io.store().clone(), + self.inner.manifest_cid().clone(), + ) + .map_err(js_error)?; + let accelerators = AcceleratorSet::empty() + .with_turboquant(map.tree(), index) + .map_err(js_error)?; + map.search_with(&accelerators, &runtime.io, request.as_request()) + .map_err(js_error) + .and_then(search_result_object) + } + + #[wasm_bindgen(js_name = searchCancellable)] + pub fn search_cancellable( + &self, + map: &WasmProximityMap, + request: JsValue, + cancellation: &WasmProximityCancellationToken, + ) -> Result { + let io = SearchIo::new( + self.engine.store().clone(), + Arc::new(SearchRuntime::default()), + ); + cancellable_accelerated_search( + &map.load()?, + &io, + self.inner.manifest_cid().clone(), + WasmAsyncAcceleratorKind::TurboQuantized, + &owned_search_request(request)?, + cancellation.inner.clone(), + ) + } + + #[wasm_bindgen(js_name = searchWithRuntimeCancellable)] + pub fn search_with_runtime_cancellable( + &self, + map: &WasmProximityMap, + request: JsValue, + runtime: &WasmProximitySearchRuntime, + cancellation: &WasmProximityCancellationToken, + ) -> Result { + runtime.ensure_engine(&self.engine)?; + runtime.ensure_engine(&map.engine)?; + cancellable_accelerated_search( + &map.load()?, + &runtime.io, + self.inner.manifest_cid().clone(), + WasmAsyncAcceleratorKind::TurboQuantized, + &owned_search_request(request)?, + cancellation.inner.clone(), + ) + } + + #[wasm_bindgen(js_name = proveSearch)] + pub fn prove_search( + &self, + map: &WasmProximityMap, + request: JsValue, + ) -> Result { + let request = owned_search_request(request)?; + self.inner + .prove_search( + &map.load()?, + request.as_request(), + &ContentGraphLimits::default(), + ) + .map(|inner| WasmProximitySearchProof { inner }) + .map_err(js_error) + } +} + #[wasm_bindgen(js_name = WasmCompositeAccelerator)] pub struct WasmCompositeAccelerator { engine: Arc, @@ -1772,6 +2178,7 @@ impl WasmCompositeAccelerator { match self.inner.base_kind() { CompositeBaseKind::Hnsw => "hnsw", CompositeBaseKind::ProductQuantized => "product_quantized", + CompositeBaseKind::TurboQuantized => "turbo_quantized", } .to_string() } @@ -1911,6 +2318,7 @@ impl WasmAcceleratorCatalog { CatalogAcceleratorKind::Hnsw => "hnsw", CatalogAcceleratorKind::ProductQuantized => "product_quantized", CatalogAcceleratorKind::Composite => "composite", + CatalogAcceleratorKind::TurboQuantized => "turbo_quantized", }; Reflect::set(&object, &"kind".into(), &kind.into())?; set_bytes( @@ -2722,6 +3130,7 @@ fn search_result_object(result: prolly::SearchResult) -> Result SearchBackend::Hnsw => "hnsw", SearchBackend::Composite => "composite", SearchBackend::Auto => "auto", + SearchBackend::TurboQuantized => "turbo_quantized", }; Reflect::set(&object, &"completion".into(), &completion.into())?; Reflect::set(&object, &"backend".into(), &backend.into())?; diff --git a/bindings/wasm/test/portable-parity.test.ts b/bindings/wasm/test/portable-parity.test.ts index 1422bbe7..6234cabb 100644 --- a/bindings/wasm/test/portable-parity.test.ts +++ b/bindings/wasm/test/portable-parity.test.ts @@ -220,6 +220,134 @@ test("WASM product quantizer lifecycle is portable and bounded", { skip: !genera } }); +test("WASM TurboQuant lifecycle is portable, verified, and cancellable", { skip: !generatedPresent }, async () => { + const engine = api.Engine.memory(wasm); + try { + const proximity = await engine.buildProximity(8, Array.from({ length: 16 }, (_, index) => ({ + key: bytes(`tq-vector-${index.toString().padStart(2, "0")}`), + vector: new Float32Array(Array.from({ length: 8 }, (_, component) => ( + index === 0 ? 0 : ((index * 31 + component * 17) % 97) / 13 - 3 + ))), + value: bytes(`tq-value-${index.toString().padStart(2, "0")}`), + }))); + const config = { ...api.defaultTurboQuantConfig(), seed: 0xffff_ffff_ffff_ffffn }; + const built = await proximity.buildTurboQuant({ + config, + workerThreads: 1n, + limits: api.defaultTurboQuantBuildLimits(), + }); + assert.equal(built.stats.encodedVectors, 16n); + assert.equal(built.stats.zeroVectors, 1n); + assert.equal(built.stats.encodedOutputBytes, 16n * 12n); + const request = { + vector: new Float32Array(8), + topK: 3, + policy: "fixed_budget" as const, + backend: "turbo_quantized" as const, + }; + const index = built.index; + assert.deepEqual(index.sourceDescriptor(), proximity.descriptor()); + assert.deepEqual(index.config(), config); + assert.ok(index.quality().meanSquaredError >= 0); + assert.equal(index.verify(proximity).encodedVectors, 16n); + const result = await index.search(proximity, request); + assert.equal(result.backend, "turbo_quantized"); + assert.equal(Buffer.from(result.neighbors[0].key).toString(), "tq-vector-00"); + assert.ok(result.stats.distanceEvaluations > 0n); + const cancellation = proximity.cancellationToken(); + try { + cancellation.cancel(); + const cancelled = await index.searchCancellable(proximity, request, cancellation); + assert.equal(cancelled.completion, "cancelled"); + assert.deepEqual(cancelled.neighbors, []); + } finally { + cancellation.close(); + } + const manifest = index.manifest(); + const proof = index.proveSearch(proximity, request); + assert.equal(proof.verify(proximity.descriptor()).result.backend, "turbo_quantized"); + proof.close(); + const catalog = proximity.buildAcceleratorCatalog({ turboquant: index }); + assert.equal(catalog.entries()[0].kind, "turbo_quantized"); + assert.equal((await catalog.search(proximity, request)).backend, "turbo_quantized"); + catalog.close(); + + const current = proximity.mutate([{ + key: bytes("tq-vector-00"), + vector: new Float32Array([0.25, 0, 0, 1, 0, 0, 0, 0]), + value: bytes("updated"), + }]).map; + const compositeBuilt = await current.buildCompositeTurboQuant(proximity, index); + assert.ok(compositeBuilt.accelerator); + const composite = compositeBuilt.accelerator!; + assert.equal(composite.baseKind(), "turbo_quantized"); + assert.equal((await composite.search(current, { + ...request, + backend: "composite", + })).backend, "composite"); + composite.close(); + current.close(); + index.close(); + const loaded = proximity.loadTurboQuant(manifest); + assert.deepEqual(loaded.manifest(), manifest); + loaded.close(); + await assert.rejects( + proximity.buildTurboQuant({ config, workerThreads: 2n }), + /browser-safe WASM TurboQuant requires workerThreads = 1/, + ); + proximity.close(); + } finally { + engine.close(); + } +}); + +test("WASM TurboQuant build matches the checked-in Rust wire fixture", { skip: !generatedPresent }, async () => { + const fixture = JSON.parse(readFileSync( + resolve(import.meta.dirname, "../../../conformance/proximity-fixtures.json"), + "utf8", + )).turboquant.wire_fixture; + const descriptorCid = fixture.objects.find( + (object: { kind: string }) => object.kind === "ProximityDescriptor", + ).cid; + const engine = api.Engine.memory(wasm); + try { + const proximity = await engine.buildProximity(8, [ + { key: bytes("a"), vector: new Float32Array(8), value: bytes("zero") }, + { + key: bytes("b"), + vector: new Float32Array([1, 0, -1, 0.5, 2, -2, 0.25, -0.25]), + value: bytes("one"), + }, + { + key: bytes("c"), + vector: new Float32Array([0.25, 0.5, 0.75, 1, -0.25, -0.5, -0.75, -1]), + value: bytes("two"), + }, + ]); + try { + assert.equal(Buffer.from(proximity.descriptor()).toString("hex"), descriptorCid); + const built = await proximity.buildTurboQuant({ + config: { bitWidth: 3, rerankMultiplier: 8, seed: 0x5eedn }, + workerThreads: 1n, + }); + try { + assert.equal( + Buffer.from(built.index.manifest()).toString("hex"), + fixture.manifest_cid, + ); + assert.equal(built.stats.encodedVectors, 3n); + assert.equal(built.stats.zeroVectors, 1n); + } finally { + built.index.close(); + } + } finally { + proximity.close(); + } + } finally { + engine.close(); + } +}); + test("WASM composite and catalog lifecycle is portable and bounded", { skip: !generatedPresent }, async () => { const engine = api.Engine.memory(wasm); try { diff --git a/conformance/proximity-fixtures.json b/conformance/proximity-fixtures.json index 97e85a2b..db346972 100644 --- a/conformance/proximity-fixtures.json +++ b/conformance/proximity-fixtures.json @@ -23,6 +23,101 @@ "bytes": "505153380200020202010000003f0000803e00050200" } }, + "turboquant": { + "description": "TurboQuant structured-transform, codebook, and bit-packing contract", + "seed": 24301, + "splitmix64_seed_zero": [ + "e220a8397b1dcdaf", + "6e789e6aa1b965f4", + "06c45d188009454f" + ], + "rotation": { + "8": { + "plan_sha256": "2f6eebb75a59bd467362f520f65d7439e9dca67d2550e4629272a2da0bd60fa4", + "input_sha256": "0df23ccb8ae4539f523c781770edc1a6559238c7f85a46f722ef734bd3f1b426", + "output_sha256": "701ad9f7590028ee3ae66f65e070054a61559936bd1cf2c0cf6c302f245f3cf7" + }, + "24": { + "plan_sha256": "74d6434c74763010f29e9d52e29b1fe3276ca788071da05aaddb9bba48343cca", + "input_sha256": "253c1e0c40cff30eafc491db09b70ad70477c499a619ef15ba6d556d3acdb62a", + "output_sha256": "14f903f1054c1fe218c0260a36dfaa202c3272ee26f4e1edfbb1eec978d60877" + }, + "128": { + "plan_sha256": "d8c3493ae87a67447244162c06fc14bae49221da8e768199c1306865901b79a6", + "input_sha256": "8336f407759ab9bd7359070cf07bf31de3a5429cfef13628984f6dc0c6c0b2e0", + "output_sha256": "3876fc0ee1bfdc304aaed52196a49b09e51cea6a6faf9af0ce30ac02ce9cacaf" + }, + "200": { + "plan_sha256": "9c09de045a68fee9538f2058c4feba60d5af63c4c0658978cc21d94179b6c0a1", + "input_sha256": "8d7dd2a89b614fd72f03c83c29398c7e2a0f9c3ee38e978d855462913593ee5a", + "output_sha256": "4f64414bb94df1ac03fac551e5c2166cae7d548944b99b9ae9e0c07f65acc330" + }, + "768": { + "plan_sha256": "9933010c8cc39c7f581209f8aba2ee1b1b6639a17721ea5cd0c6ab3c4c523d62", + "input_sha256": "0d948d563cb311bb0e9f144357a99899196badae66ea26e51ebc59ed8012049b", + "output_sha256": "2a0ea3aaab4ee516e198d27687969e0a87ee8e3f02e08a2b94bf99d978b1f533" + }, + "1536": { + "plan_sha256": "a4bd7182d4bb646586a5da39f1adc41cc70d804bf02cac7c6657b0a6486dcb8c", + "input_sha256": "ec35a39f1156d3165150800a38e561eaca2559044dd21fd882401c5bdad05ab2", + "output_sha256": "e301c711ebd75614ce76945d103e8390b06f57b0d64b2f6f9c078a0feebfc834" + }, + "3072": { + "plan_sha256": "232ff3045de1e706300ded2e18364cf1c062749d5e1a3b2512e4495f45acee8b", + "input_sha256": "d4599c39517807d720357c1b81d4bebd391917cddd39b09e9c5b8ba73978bb1e", + "output_sha256": "465385945d6903401b1644bcfe47330d86e92018e261f01a34d655d93d633416" + } + }, + "packing_19_codes": { + "2": "e4e4e4e424", + "3": "88c6fa88c6fa8800", + "4": "1032547698badcfe1002" + }, + "wire_fixture": { + "manifest_cid": "f927847b6f9d119d728e1145d835d11b2720f5171248b308a38f3ae72ddac338", + "objects": [ + { + "kind": "OrderedNode", + "cid": "4ea477031171d681c3e60d7f29318335e353e618a843495f5978115ae9dc5306", + "bytes": "4352414202000100030001610b00000000000000000000000001620b76709b96a8c4094083c8af0001630bd94e4fb1defbfe3fd9fa59" + }, + { + "kind": "OrderedNode", + "cid": "fd95817879c9acc2e8c9120ae44c7f14becbfd32ef639fd907c587648f4d560f", + "bytes": "4352414202000100030001612c505256520201080000000000000000000000000000000000000000000000000000000000000000047a65726f0001622b505256520201080000803f00000000000080bf0000003f00000040000000c00000803e000080be036f6e650001632b505256520201080000803e0000003f0000403f0000803f000080be000000bf000040bf000080bf0374776f" + }, + { + "kind": "ProximityNode", + "cid": "46cda58584c347b46286c0fc2105e8494e6b38e89220ff5ef99774efcc699493", + "bytes": "5052584e0201000003030161000000000000000000000000000000000000000000000000000000000000000000010000000000000000016101610162000000803f00000000000080bf0000003f00000040000000c00000803e000080be010000000000000000016201620163000000803e0000003f0000403f0000803f000080be000000bf000040bf000080bf01000000000000000001630163" + }, + { + "kind": "ProximityDescriptor", + "cid": "aa33d78f3fa8e8df48bb18b4f03756dba1a5ca4b78c6f09512c81e2bf07927dd", + "bytes": "505258490200010801000308000000000000000080208080048080800200000000000000008080040001fd95817879c9acc2e8c9120ae44c7f14becbfd32ef639fd907c587648f4d560f38435246540100000000000000800000000000000004000000000000008000000000001000000000000000000000010000000001000000000046cda58584c347b46286c0fc2105e8494e6b38e89220ff5ef99774efcc69949301e83e01a174f8519a525d73f7b1cb00580ea6c4e303b3c8e93ab31313905ce7dd00" + }, + { + "kind": "TurboQuantization", + "cid": "f927847b6f9d119d728e1145d835d11b2720f5171248b308a38f3ae72ddac338", + "bytes": "545154510100aa33d78f3fa8e8df48bb18b4f03756dba1a5ca4b78c6f09512c81e2bf07927dd0801030308ed5e00000000000001014ea477031171d681c3e60d7f29318335e353e618a843495f5978115ae9dc53061d85e863aea99f3f993d2ac9d249ac3f01c96f7e234994a2014564794bbbd5e6102db049fda16cc3f2110d61214b6b525f" + } + ] + }, + "codebooks": { + "2": { + "threshold_bits": ["bfef6941ee8da043", "0000000000000000", "3fef6941ee8da043"], + "centroid_bits": ["bff82aaba77ce5fa", "bfdcfa591c42e927", "3fdcfa591c42e927", "3ff82aaba77ce5fa"] + }, + "3": { + "threshold_bits": ["bffbf782d13dcab0", "bff0cca00132d1d5", "bfe00480de1634f6", "0000000000000000", "3fe00480de1634f6", "3ff0cca00132d1d5", "3ffbf782d13dcab0"], + "centroid_bits": ["c001372f4f3e0846", "bff580a703ff84d6", "bfe83131fccc3da8", "bfcf5f3efd80b113", "3fcf5f3efd80b113", "3fe83131fccc3da8", "3ff580a703ff84d6", "4001372f4f3e0846"] + }, + "4": { + "threshold_bits": ["c00334d8698e82e4", "bffd7f1b351180d5", "bff6fe853ee19176", "bff196acbc390ac5", "bfe995e96f9c1848", "bfe0b787fbb06a33", "bfd086b429384856", "0000000000000000", "3fd086b429384856", "3fe0b787fbb06a33", "3fe995e96f9c1848", "3ff196acbc390ac5", "3ff6fe853ee19176", "3ffd7f1b351180d5", "400334d8698e82e4"], + "centroid_bits": ["c005dc57ebc684e8", "c0008d58e75680e1", "bff9e3849b75ffe8", "bff41985e24d2303", "bfee27a72c49e50d", "bfe5042bb2ee4b83", "bfd8d5c888e511c6", "bfc06f3f9316fdcb", "3fc06f3f9316fdcb", "3fd8d5c888e511c6", "3fe5042bb2ee4b83", "3fee27a72c49e50d", "3ff41985e24d2303", "3ff9e3849b75ffe8", "40008d58e75680e1", "4005dc57ebc684e8"] + } + } + }, "empty": { "descriptor_cid": "b5971bf77a002307e590fcb6f3411cf30f257cf5981d91d360539ee53a2d0ff3", "descriptor_bytes": "50525849020001030100000213000000000000008020808004808010000000000000000080800400003843524654010000000000000080000000000000000400000000000000800000000000100000000000000000000001000000000100000000003b0c8bd0859cfa6d716caf97c1656ad327b8fbdb5a319ac929805de05fc7394101b5cd2d6ba9034df3dec1ebbc4107942f3f5b73aef937983201559dbfed936d1200", diff --git a/docs/cookbook.md b/docs/cookbook.md index a5730841..a69fa981 100644 --- a/docs/cookbook.md +++ b/docs/cookbook.md @@ -857,9 +857,36 @@ content-addressed descriptor. It stores exact key/vector/value records in an ordered directory and uses a deterministic proximity hierarchy for exact L2 or honestly approximate filtered search. It includes cosine/inner product, localized canonical mutation, async/SIMD execution, overflow/external vectors, -SQ8/PQ/HNSW, typed replication/GC, and descriptor-bound proofs. See +SQ8/TurboQuant/PQ/HNSW, typed replication/GC, and descriptor-bound proofs. See [`proximity-map.md`](proximity-map.md) for complete examples. +For high-dimensional immutable RAG corpora, a forced TurboQuant sidecar can +reduce routing storage and avoid PQ's corpus-training pass while keeping final +values and distances authoritative: + +```rust,no_run +use prolly::*; + +# fn retrieve(map: &ProximityMap, query: &[f32]) -> Result +# where S: Store + Clone + Send + Sync, S::Error: Send + Sync { +let (turboquant, _) = TurboQuantizer::build( + map, + TurboQuantizationConfig::default(), + BuildParallelism::new(4)?, +)?; +let mut request = SearchRequest::exact(query, 10); +request.policy = SearchPolicy::FixedBudget; +request.options.backend = SearchBackend::TurboQuantized; +turboquant.search(map, request) +# } +``` + +The map's descriptor remains the durable snapshot identity; retain and publish +the TurboQuant manifest only as a disposable derived sidecar. TurboQuant is +currently explicit-only and supports fixed dimensions divisible by eight in +the range 8 through 16,384. Always validate recall for the embedding model and +filters used by the application. + Choose this path for immutable versions, exact historical replay, duplicate vector identities, structural sharing, deterministic accelerators, and verifiable execution. Use an external engine when GPU serving, arbitrary metric diff --git a/docs/design-spec.md b/docs/design-spec.md index c1968bb6..f24c9b89 100644 --- a/docs/design-spec.md +++ b/docs/design-spec.md @@ -415,9 +415,11 @@ scalar/SIMD query kernels cannot alter persisted bytes. Exact L2 terminates only from a conservative global bound; other policies report an explicit honest completion. Result ordering is total and deterministic by `(score,key)`. -The primary proximity codecs reject legacy persistence. Derived PQ and HNSW -manifests exactly bind the source descriptor, metric, and configuration and -cannot claim exact completion. Typed replication publishes only closed verified -graphs, and proofs are checked against a caller-trusted descriptor CID. +The primary proximity codecs reject legacy persistence. Derived PQ, +TurboQuant, and HNSW manifests exactly bind the source descriptor, metric, and +configuration and cannot claim exact completion. Typed replication publishes +only closed verified graphs, and proofs are checked against a caller-trusted +descriptor CID. TurboQuant uses a frozen structured engineering rotation and +does not claim the paper's dense Gaussian-QR/Haar theorem. The detailed contract is [`proximity-map.md`](proximity-map.md). diff --git a/docs/design.md b/docs/design.md index 2df0265e..83d7e4ca 100644 --- a/docs/design.md +++ b/docs/design.md @@ -388,5 +388,6 @@ See [`proximity-map.md`](proximity-map.md) for the public API, algorithms, mutation rules, resource budgets, and operational limitations. See [`wire-format.md`](wire-format.md) for the hard-cut object family. This map adds canonical directory splicing, all three metrics, overflow/PRXV storage, SQ8, -deterministic parallel and async execution, source-bound PQ/HNSW, typed content -replication/GC, and descriptor-bound proofs. +deterministic parallel and async execution, source-bound PQ/TurboQuant/HNSW, +catalog and composite accelerators, typed content replication/GC, and +descriptor-bound proofs. diff --git a/docs/proximity-map-completion-audit.md b/docs/proximity-map-completion-audit.md index cbecfbf7..3a88566a 100644 --- a/docs/proximity-map-completion-audit.md +++ b/docs/proximity-map-completion-audit.md @@ -4,11 +4,11 @@ This audit maps every approved goal to implementation, adversarial tests, and a benchmark row. The release is a hard format cutoff: proximity v1 is legacy rejection input only; ordered CRAB bytes remain unchanged. -## Thirteen-goal evidence matrix +## Fourteen-goal evidence matrix | # | Goal | Implementation evidence | Test evidence | Benchmark row | | ---: | --- | --- | --- | --- | -| 1 | Canonical localized exact-directory mutation | `src/prolly/canonical_splice.rs`, `proximity/mutation/`, `map.rs` | `tests/canonical_splice.rs`, `tests/proximity_mutation.rs` | `localized_mutation` (`nodes_written`, `nodes_reused`) | +| 1 | Canonical localized exact-directory mutation | `src/prolly/splice.rs`, `src/prolly/proximity/mutation.rs`, `src/prolly/proximity/map.rs` | `tests/splice.rs`, `tests/proximity_mutation.rs` | `localized_mutation` (`nodes_written`, `nodes_reused`) | | 2 | Deterministic global best-first search | `proximity/search/engine.rs`, `map.rs` | `tests/proximity_search.rs` | `search_exact_scalar`, `search_adaptive_sq8` | | 3 | Conservative compositional bounds | `proximity/distance/canonical.rs`, `storage/node.rs`, `storage/overflow.rs` | `tests/proximity_metrics.rs`, `tests/proximity_overflow.rs`, verifier corruption tests | exact-search and proof rows | | 4 | Range/prefix/eligible/secondary filters | `proximity/search/filter.rs` | `tests/proximity_search.rs`, `tests/proximity_proofs.rs` | prefix filter is applied to all search rows | @@ -21,6 +21,21 @@ legacy rejection input only; ordered CRAB bytes remain unchanged. | 11 | Typed traversal, sync, manifests, GC, proofs | `content_graph/`, `proximity/proof/` | `tests/proximity_content_graph.rs`, `tests/proximity_proofs.rs` | `content_graph_copy`, `content_graph_gc_plan`, `search_proof_*` | | 12 | Overflow hierarchies and external vectors | `proximity/storage/{overflow,vector}.rs` | `tests/proximity_overflow.rs` | all rows use bounded overflow and externalize vectors above 4 KiB | | 13 | Validated source-bound HNSW | `proximity/accelerator/hnsw/` | `tests/proximity_hnsw.rs`, `tests/proximity_proofs.rs` | `hnsw_build`, `hnsw_search` | +| 14 | Native source-bound TurboQuant-MSE routing | `proximity/accelerator/{turboquant,quantized,async}.rs`, `proximity/distance/simd.rs`, `proximity/search/runtime.rs`; the TurboQuant algorithm module statically forbids unsafe code | `tests/proximity_turboquant.rs`, including bounded native async direct/composite construction, canonical repeated-equal-error quality persistence, and cancellation at every full-scan/direct-lookup/rerank store-read boundary; `fuzz/fuzz_targets/` contains arbitrary-decode and bounded lifecycle/corruption targets; runtime tests prove that only cache-authenticated reads bypass duplicate CID hashing and corrupt fallbacks remain unverified; every-code signed-zero/extreme-weight product-table identity and scalar/SIMD identity pass strict-provenance Miri; `tests/proximity_wire.rs` and async/proof/content/composite suites complete the focused coverage | `turboquant_build`, `turboquant_search_scalar`, `turboquant_search_simd`, `turboquant_recall` | + +The TurboQuant binding deliverable is also mapped directly: Python, Go, +Node/TypeScript, Kotlin, Java, Ruby, Swift, and browser WASM each expose and +test build/load/verify/forced-search behavior, pre-cancelled search, and +reported build/search statistics. Every lifecycle also attaches the native +TurboQuant sidecar directly to an accelerator catalog, dispatches a catalog +search through it, and constructs and searches a mutation-aware composite +whose base kind is TurboQuant. Each corresponding +`bindings/*/COOKBOOK.md` now includes a deterministic RAG-sidecar lifecycle. +The regenerated `bindings/api/classification-audit.json` contains 73 +TurboQuant rows, all `implemented` and `release_complete`. +The repository-wide inventory and production qualification gates remain +tracked separately in +[`proximity-turboquant-qualification.md`](proximity-turboquant-qualification.md). ## Wire and migration evidence @@ -32,26 +47,70 @@ legacy rejection input only; ordered CRAB bytes remain unchanged. ## Benchmark protocol -`benches/proximity_bench.rs` emits CSV: +`benches/prolly_proximity_bench.rs` emits CSV: ```text operation,dimensions,threads,micros,metric_a,metric_b ``` +For repeated accelerator searches, the base row's `micros` value is the +sample median and `_p95`/`_p99` companion rows contain nearest-rank tail +latency. Companion counters expose logical/physical read bytes and candidate +retention peaks. Quantized `_io` rows expose logical nodes and actual store read +operations; `_rerank` rows expose authoritative rerank counts and committed +logical bytes. Dedicated resource and sidecar rows record owned build bytes, +transform work, authoritative source-closure bytes, derived accelerator bytes, +and encoded payload counts. Accelerator sidecar totals exclude +content-addressed source objects referenced by the manifest; companion rows +split manifest bytes from code-tree bytes. + Default dimensions are 8, 128, 768, and 1536; build rows use 1, 2, and 4 workers. The harness also records mutation locality, exact/adaptive/SQ8, -scalar/SIMD, sync/async, PQ/HNSW, content copy/GC, and proof generation/replay. +scalar/SIMD, sync/async, TurboQuant/PQ/HNSW, content copy/GC, and proof +generation/replay. Counters in `metric_a`/`metric_b` are operation-specific and printed beside wall time so regressions can be attributed to logical work rather than timing noise. +The strict matrix entry point is +`scripts/run_turboquant_qualification.py`. Its `full` profile contains 45,360 +deterministic cells and supports stable hash sharding and exact-contract resume. +It validates schema/revision metadata, row completeness, worker determinism, +warm/cold physical I/O, and sync/async logical parity before writing an atomic +completion record. The harness asserts neighbor, exact-distance, plan, +completion, and complete logical-statistic parity across scalar/SIMD/automatic +and async execution. Shard zero also records an unskipped browser-WASM build +and test smoke gate. `scripts/summarize_turboquant_qualification.py` accepts +only the complete, disjoint shard set and emits consolidated rows plus separate +forced-backend and `Auto` gate results. + +The first ten schema-v3 cells are retained as superseded diagnostics in +[`proximity-turboquant-v3-qualification.md`](proximity-turboquant-v3-qualification.md). +They cover 10K and 100K × 768 at the default four-bit, 8× setting for all +three metrics, plus matching 16× cosine and inner-product diagnostics. +Their cosine oracle rescored raw pre-ingestion vectors with platform `sqrt` +instead of using persisted canonical vectors and the authoritative +deterministic scorer; exhaustive reranking consequently reported only 0.50 +recall. Benchmark schema 4 corrects the oracle and rejects every older row. + +Eleven corrected schema-4 cells are retained in +[`proximity-turboquant-v4-qualification.md`](proximity-turboquant-v4-qualification.md). +They establish 1.00 exhaustive recall for both TurboQuant and PQ and expose +the remaining 10K cosine default failure: all authoritative exact top-10 +vectors share a packed code with 222 lower-key records, so the frozen +80-candidate `(approximate_score, key)` shortlist cannot select them. This is +a contract-level recall gap, not a scorer defect. + +All 45,360 current-schema cells still require a single frozen-revision run, +and all final release gates remain open. + Smoke command: ```sh PROLLY_PROXIMITY_BENCH_RECORDS=64 \ PROLLY_PROXIMITY_BENCH_DIMENSIONS=8 \ PROLLY_PROXIMITY_BENCH_THREADS=1,2 \ -cargo bench --all-features --bench proximity_bench +cargo bench --all-features --bench prolly_proximity_bench ``` Recorded smoke result on 2026-07-14 (Apple Silicon development machine, release @@ -80,7 +139,7 @@ Production characterization command: PROLLY_PROXIMITY_BENCH_RECORDS=10000 \ PROLLY_PROXIMITY_BENCH_DIMENSIONS=8,128,768,1536 \ PROLLY_PROXIMITY_BENCH_THREADS=1,2,4 \ -cargo bench --all-features --bench proximity_bench +cargo bench --all-features --bench prolly_proximity_bench ``` Results are hardware-, compiler-, and store-specific. Persist CSV output with @@ -94,10 +153,12 @@ The completion gate is: ```sh cargo fmt --all -- --check cargo clippy --all-targets --all-features -- -D warnings -cargo +1.81.0 check --all-targets --all-features +cargo +1.89.0 check --all-targets --all-features cargo test --all-features --no-fail-fast cargo test --doc --all-features cargo bench --all-features --no-run +cargo +nightly fuzz run proximity_turboquant_decode -- -runs=2048 -max_len=4096 -timeout=5 +cargo +nightly fuzz run proximity_turboquant_lifecycle -- -runs=256 -max_len=1024 -timeout=5 git diff --check ``` @@ -105,13 +166,20 @@ The focused evidence suites are: ```sh cargo test --test proximity_api --test proximity_metrics --test proximity_wire -cargo test --test canonical_splice --test proximity_overflow --test proximity_mutation +cargo test --test splice --test proximity_overflow --test proximity_mutation cargo test --test proximity_search --test proximity_parallel --test proximity_simd cargo test --all-features --test proximity_async cargo test --test proximity_quantization --test proximity_hnsw +cargo test --test proximity_turboquant --test proximity_wire cargo test --test proximity_content_graph --test proximity_proofs ``` +TurboQuant is explicit-only until its separate recall and comparative value +gates pass. See +[`proximity-turboquant-qualification.md`](proximity-turboquant-qualification.md) +for pending evidence; this audit does not treat a local smoke timing as a GA or +`Auto` qualification result. + ## Commit trail The program is split into reviewable commits from `cd08ce3` (hard-cut API) diff --git a/docs/proximity-map.md b/docs/proximity-map.md index 6532af55..ad7aa3a7 100644 --- a/docs/proximity-map.md +++ b/docs/proximity-map.md @@ -25,14 +25,15 @@ PRXI descriptor └── optional PQS8 node-local routing data PQPQ product-quantization sidecar ──bound to PRXI CID +TQMS TurboQuant-MSE sidecar ──bound to PRXI CID HNSW graph sidecar ──bound to PRXI CID Composite accelerator ──current PRXI + ancestor base + delta/shadow Accelerator catalog ──bound to one current PRXI CID ``` -The application-visible immutable version is the PRXI descriptor CID. PQ and -HNSW are derived, independently retained sidecars and never replace exact -directory values. +The application-visible immutable version is the PRXI descriptor CID. PQ, +TurboQuant, and HNSW are derived, independently retained sidecars and never +replace exact directory values. ## Build, reopen, and exact lookup @@ -218,7 +219,7 @@ pages and recursive directories. `VectorStorageConfig` deterministically moves large vectors to PRXV objects. Immediate-child summaries commit key ranges, subtree counts, representatives, and conservatively rounded L2 radii. -## SQ8, product quantization, and HNSW +## SQ8, TurboQuant, product quantization, and HNSW Node-local SQ8 is enabled in `ProximityConfig`. It influences approximate routing only; leaf candidates are resolved and reranked from full vectors. @@ -244,7 +245,13 @@ where BuildParallelism::new(4)?, )?; let (hnsw, _) = HnswIndex::build(map, HnswConfig::default())?; - let accelerators = AcceleratorSet::try_new(map.tree(), Some(hnsw), Some(pq))?; + let (turboquant, _) = TurboQuantizer::build( + map, + TurboQuantizationConfig::default(), + BuildParallelism::new(4)?, + )?; + let accelerators = AcceleratorSet::try_new(map.tree(), Some(hnsw), Some(pq))? + .with_turboquant(map.tree(), turboquant)?; let runtime = std::sync::Arc::new(SearchRuntime::default()); let search_io = SearchIo::new(store, runtime); @@ -258,15 +265,37 @@ where } ``` +TurboQuant is a training-free routing accelerator for dimensions 8 through +16,384 that are divisible by eight. It normalizes each vector, applies a +deterministic structured orthogonal rotation, and scalar-quantizes every +coordinate to two, three, or four bits. Four bits, an eight-times rerank +shortlist, and seed zero are the defaults. Candidate scores are approximate, +but every shortlisted key is resolved from the authoritative PRVR directory +and reranked with the requested exact metric. A forced search therefore never +claims exact completion even when its shortlist happens to contain every +record. + +This structured rotation is a portable engineering variant of the +`TurboQuant_mse` algorithm described in the public Google Research paper. It +is not the paper's dense Gaussian-QR/Haar rotation and does not claim the +paper's exact dense-rotation theorem. The implementation is independent and +does not depend on, read, or write Turbovec formats. + +TurboQuant is currently explicit-only: set +`request.options.backend = SearchBackend::TurboQuantized`. `Auto` ignores it +until the checked-in recall and comparative performance qualification has +passed. Applications should retain the source PRXI root and treat the +TurboQuant manifest as disposable derived content. + PQ uses deterministic bounded training samples and streams its code pass. -HNSW embeds routing vectors and uses bounded graph insertion. Both manifests -bind source descriptor, dimensions, metric, count, and configuration. `Auto` -may select native while planning when an accelerator is absent, stale, or not -budget-admissible. Corruption or store/decode failure after execution begins is -returned; execution never switches backends. Neither PQ nor HNSW claims exact -completion. - -Accelerator component names are unversioned: HNSW, PQ, +HNSW embeds routing vectors and uses bounded graph insertion. All three +manifests bind source descriptor, dimensions, metric, count, and +configuration. `Auto` may select native while planning when an accelerator is +absent, stale, or not budget-admissible. Corruption or store/decode failure +after execution begins is returned; execution never switches backends. No +accelerator claims exact completion. + +Accelerator component names are unversioned: HNSW, PQ, `TurboQuantizer`, `CompositeAccelerator`, and `AcceleratorCatalog` always identify the current data structures. Accelerator codec changes are hard cutovers; the engine does not expose parallel generation types, compatibility aliases, or legacy @@ -278,16 +307,26 @@ accelerator readers. context automatically, avoiding a cache-configuration footgun. Call `search_with_runtime` so physical-byte statistics reflect actual cache misses rather than logical object use. Async-only object stores can construct and -publish canonical HNSW/PQ catalogs with `AsyncAcceleratorCatalog::build`, load +publish canonical HNSW/PQ/TurboQuant catalogs with +`AsyncAcceleratorCatalog::build`, load individual sidecars, validate them into an `AsyncAcceleratorSet`, and call `search_with_accelerators`. Construction stages deterministic CPU work away from the remote adapter, then publishes the authenticated closure in bounded provider batches. The planner and plan summaries are identical to `ProximityMap::search_with`; only I/O scheduling and physical statistics differ. +Search-runtime cache admission authenticates each CID and validates its codec +before retaining immutable bytes. That successful per-read validation is +carried into ordered-tree decoding, so repeated warm searches do not hash the +same authoritative leaf bytes a second time. The fast path is not a store-wide +trust switch: ordinary stores and every runtime fallback return unverified +reads and therefore retain the engine's CID check. Corrupt or missing content +still fails closed and never triggers backend execution fallback. + ## Composite accelerators and catalogs -`CompositeAccelerator` avoids rebuilding a large HNSW or PQ sidecar for every +`CompositeAccelerator` avoids rebuilding a large HNSW, PQ, or TurboQuant +sidecar for every immutable snapshot. It structurally diffs the ancestor and current ordered directories, stores inserts and vector updates in a bounded delta tree, and stores deleted and vector-updated keys in a shadow tree. Value-only changes use @@ -337,14 +376,16 @@ deep, so composites cannot form unbounded chains. If the current source is empty, rebuild resolution returns `NoAcceleratorRequired` because native empty search needs no derived sidecar. -Accelerator catalogs contain validated direct HNSW, direct PQ, and composite roots. +Accelerator catalogs contain validated direct HNSW, direct PQ, direct +TurboQuant, and composite roots. Publish `catalog.typed_root()` with `put_named_content_root` or `compare_and_swap_named_content_root`; replacement is atomic and independent of PRXI publication. `AsyncAcceleratorCatalog::load` and `AsyncCompositeAccelerator::load` provide the same validation and planner -capabilities for async-only stores. `AsyncCompositeAccelerator::build_from_hnsw` -and `build_from_product_quantizer` construct and publish bounded delta/shadow -sidecars from async-only base and current snapshots. +capabilities for async-only stores. `AsyncCompositeAccelerator::build_from_hnsw`, +`build_from_product_quantizer`, and `build_from_turboquant` construct and +publish bounded delta/shadow sidecars from async-only base and current +snapshots. `AsyncAcceleratorCatalog::publish` binds already-validated async sidecars to the current descriptor. @@ -391,7 +432,8 @@ the content-root manifest. Interrupted copies remain unreachable. Use `compare_and_swap_named_content_root` for concurrent heads. `plan_content_gc`/`sweep_content_gc_with_invalidator` mark any number of ordered, -PRXI, snapshot, PQ, HNSW, composite, or accelerator-catalog roots and preserve shared objects. Candidate sets +PRXI, snapshot, PQ, TurboQuant, HNSW, composite, or accelerator-catalog roots +and preserve shared objects. Candidate sets are explicit; the invalidator lets applications evict swept process caches. ## Proofs @@ -422,9 +464,9 @@ Membership proofs bind PRXI bytes, the ordered path, and exact PRVR bytes. Structural proofs carry the exact typed closure and replay every summary, radius, routing, vector, and directory invariant in an isolated store. Native search proofs commit request/filter/budgets/kernel and record frontier, visited -objects, candidates, and completion. PQ, HNSW, and composite proofs authenticate -sidecar closures and replay execution. Only exact native L2 returns -`ExactL2Optimal`; other modes return `HonestExecution`. +objects, candidates, and completion. PQ, TurboQuant, HNSW, and composite proofs +authenticate sidecar closures and replay execution. Only exact native L2 +returns `ExactL2Optimal`; other modes return `HonestExecution`. ## Verification and operational limits @@ -452,14 +494,17 @@ claim Dolt byte compatibility. ## Benchmarking The harness covers dimensions 8/128/768/1536, build worker counts, localized -mutation, exact/adaptive/SQ8 search, scalar/SIMD, PQ/HNSW/composite, overflow, content -graph copy/GC, and proofs. Async parity is exercised by the all-feature test -suite and benchmark compilation. +mutation, exact/adaptive/SQ8 search, scalar/SIMD, TurboQuant/PQ/HNSW/composite, +overflow, content graph copy/GC, and proofs. TurboQuant rows report build work, +encoded bytes, scalar/SIMD search work, quantized and exact evaluation counts, +recall, and persisted mean-squared error. Async parity is exercised by the +all-feature test suite and can be measured through the benchmark's native +async/batched search path. ```sh PROLLY_PROXIMITY_BENCH_RECORDS=10000 \ PROLLY_PROXIMITY_BENCH_DIMENSIONS=8,128,768,1536 \ -cargo bench --all-features --bench proximity_bench +cargo bench --all-features --bench prolly_proximity_bench ``` For large cardinality tests, set `PROLLY_PROXIMITY_BENCH_SCALE_ONLY=1`. The @@ -472,9 +517,56 @@ PROLLY_PROXIMITY_BENCH_RECORDS=10000000 \ PROLLY_PROXIMITY_BENCH_DIMENSIONS=8 \ PROLLY_PROXIMITY_BENCH_THREADS=1 \ PROLLY_PROXIMITY_BENCH_SCALE_ONLY=1 \ -cargo bench --all-features --bench proximity_bench +cargo bench --all-features --bench prolly_proximity_bench +``` + +For TurboQuant/PQ qualification cells, use +`PROLLY_PROXIMITY_BENCH_QUANTIZERS_ONLY=1`. This builds the authoritative map +once, skips unrelated accelerator and lifecycle rows, and applies +`PROLLY_PROXIMITY_BENCH_THREADS` to both quantizer builders. The harness +asserts byte-identical manifests and identical logical build statistics across +the requested worker counts. This mode cannot be combined with scale-only. + +```sh +PROLLY_PROXIMITY_BENCH_RECORDS=100000 \ +PROLLY_PROXIMITY_BENCH_DIMENSIONS=768,1536 \ +PROLLY_PROXIMITY_BENCH_THREADS=1,2,4 \ +PROLLY_PROXIMITY_BENCH_QUANTIZERS_ONLY=1 \ +cargo bench --all-features --bench prolly_proximity_bench +``` + +Use `PROLLY_PROXIMITY_BENCH_STORE=file` with an existing +`PROLLY_PROXIMITY_BENCH_STORE_PATH` directory for durable-local cells. The +harness creates isolated child stores and removes its uniquely named run +directory on ordinary exit; a process interruption may leave that child for +diagnosis. + +Set `PROLLY_PROXIMITY_BENCH_ASYNC_QUANTIZERS=1` to add async TurboQuant and PQ +build/publication, search, percentile/work, and recall rows. Each async build +asserts manifest and logical-statistic identity with the synchronous build for +every requested worker count. Warm measurements reuse one authenticated +runtime after an untimed warmup; combining the option with +`PROLLY_PROXIMITY_BENCH_RESET_SEARCH_CACHE=1` reloads the source and sidecar in +a fresh runtime inside every timed sample. + +Run the versioned six-environment smoke contract with: + +```sh +python3 scripts/run_turboquant_qualification.py \ + --profile smoke \ + --output /tmp/prolly-turboquant-smoke ``` +The same runner's `full` profile enumerates and hash-shards the complete native +qualification matrix, validates each cell before recording completion, and +runs the unskipped browser-WASM TurboQuant smoke gate on shard zero. See the +qualification ledger for resumable full-run and strict cross-shard summary +commands. A shard is not release evidence until the summarizer proves complete +coverage and emits separate forced-backend and `Auto` gate results. + Benchmark rows are machine-specific evidence, not performance guarantees. See [`proximity-map-completion-audit.md`](proximity-map-completion-audit.md) for the release evidence matrix. +TurboQuant's larger release/qualification matrix and its current explicit-only +status are recorded in +[`proximity-turboquant-qualification.md`](proximity-turboquant-qualification.md). diff --git a/docs/proximity-turboquant-100k-qualification.md b/docs/proximity-turboquant-100k-qualification.md new file mode 100644 index 00000000..211dd226 --- /dev/null +++ b/docs/proximity-turboquant-100k-qualification.md @@ -0,0 +1,140 @@ +# TurboQuant 100K Qualification Evidence + +This report retains nine real, schema-v2 100K-record qualification cells for +the native TurboQuant accelerator. The frozen four-bit, 8× default is covered +at both design-mandated build dimensions across every metric. Three additional +768-dimensional cells isolate the approved 16× rerank setting. These are the +first retained cells at the design's 100K build-gate scale. They expose +forced-backend recall failures and do not qualify either forced-backend GA or +`Auto` selection. + +> **Superseded qualification dataset:** A subsequent audit found that the v2 +> benchmark generator repeated complete vectors every 20,003 records and used +> architecture-width `usize` wrapping. At 100K, each vector therefore appears +> about five times and Recall@10 changes in coarse duplicate groups. These +> rows remain reproducible performance and rank-depth diagnostics, but they do +> not count toward the current architecture-stable production matrix. + +## Environment and contract + +- Date: 2026-09-12 +- Benchmark revisions: 768-dimensional 8× default at + `430a744df2832f5a1d5bc927e33e1f9c4cfe0d1a`; 768-dimensional 16× and + 1536-dimensional 8× cells at + `d5a24d63fd14a8fae454b16aee67050bdf0db8fc` +- Compiler: Rust 1.97.0, LLVM 22.1.6 +- Target: `aarch64-apple-darwin` +- Machine: `Haipings-Mac-Studio.local` +- Store/cache: in-memory, warm bounded search runtime +- Records/dimensions/metrics: 100,000 × 768/1536, squared L2, cosine, and inner + product +- Query: `k=10`, all records eligible, four-bit codes, rerank multiplier 8; + the 768-dimensional diagnostic also covers multiplier 16 +- Build workers: 1, 2, and 4 +- Search samples: 30 per implementation +- Qualification contracts: schema v2 full-matrix shards, each with exactly one + selected cell from the frozen 45,360-cell matrix. The 768-dimensional 8× + shards are `472514`, `550539`, and `626636`; the matching 16× shards are + `222470`, `198811`, and `729950`; and the 1536-dimensional 8× shards are + `2322889/5000000`, `488292/1000000`, and `655396/1000000`, in L2, cosine, + and inner-product order. Unqualified indices use a shard count of 1,000,000. + +Each resumable shard—including its contract, raw CSV, exact digest, compile +record, stderr log, and terminal status—is retained under the corresponding +`performance-results/proximity-turboquant/qualification-100k--warm-sync-shard/` +directory. The benchmarks produced no stderr. Exact `--resume` runs accepted +all nine retained states without rerunning a cell. + +## Recall and search results + +| Metric | TQ recall@10 | PQ recall@10 | TQ median | PQ median | TQ warm p95 | PQ warm p95 | +| --- | ---: | ---: | ---: | ---: | ---: | ---: | +| Squared L2 | 0.00 | 0.10 | 149,835.334 µs | 13,000.125 µs | 156,191.667 µs | 19,097.333 µs | +| Cosine | 0.50 | 0.00 | 150,906.250 µs | 13,304.042 µs | 166,749.333 µs | 16,702.000 µs | +| Inner product | 0.00 | 0.20 | 147,554.958 µs | 13,248.708 µs | 153,081.417 µs | 16,369.083 µs | + +TurboQuant is 11.53×/11.34×/11.14× slower at the median and +8.18×/9.98×/9.35× slower at p95 for L2/cosine/inner product, respectively. +Every search scanned 100,000 codes and reranked 80 authoritative candidates. + +The 39,757,465-byte TurboQuant sidecar is 30.43× the 1,306,641-byte PQ +sidecar. It exceeds the default 32 MiB TurboQuant runtime-cache partition, so +the shared, warmed runtime legitimately performs physical reads as its +authenticated working set is evicted. This finding exposed and corrected a +runner defect that had incorrectly equated `warm` with an unbounded, +fully-resident cache. Cold cells continue to require physical I/O and every +counter must be finite and nonnegative. + +The 1536-dimensional default cells produced: + +| Metric | TQ recall@10 | PQ recall@10 | TQ median | PQ median | TQ warm p95 | PQ warm p95 | +| --- | ---: | ---: | ---: | ---: | ---: | ---: | +| Squared L2 | 0.00 | 0.00 | 288,257.083 µs | 12,924.709 µs | 322,335.584 µs | 13,725.125 µs | +| Cosine | 0.00 | 0.00 | 286,003.000 µs | 12,836.000 µs | 307,674.667 µs | 13,390.209 µs | +| Inner product | 0.00 | 0.20 | 264,753.708 µs | 13,038.833 µs | 276,385.750 µs | 13,512.833 µs | + +TurboQuant is 22.30×/22.28×/20.31× slower at the median and +23.49×/22.98×/20.45× slower at p95 for 1536-dimensional L2/cosine/inner +product, respectively. The 78,157,465-byte TurboQuant sidecar is 57.65× the +1,355,801-byte PQ sidecar. Every search reranked 80 authoritative candidates. + +## Rerank-window diagnostic + +At 768 dimensions, increasing the approved rerank multiplier from the frozen +8× default to 16× changes the deterministic result as follows: + +| Metric | TQ recall 8× → 16× | PQ recall 8× → 16× | TQ 16× p95 | PQ 16× p95 | +| --- | ---: | ---: | ---: | ---: | +| Squared L2 | 0.00 → 1.00 | 0.10 → 0.20 | 164,063.375 µs | 13,821.584 µs | +| Cosine | 0.50 → 0.50 | 0.00 → 0.10 | 168,200.167 µs | 13,116.750 µs | +| Inner product | 0.00 → 0.00 | 0.20 → 0.20 | 164,023.208 µs | 14,303.750 µs | + +The larger 160-candidate window restores L2 recall but does not improve +TurboQuant cosine or inner-product recall. It therefore rules out a universal +shortlist-only correction within the approved fixed settings. The 16× p95 is +11.87×/12.82×/11.47× PQ for L2/cosine/inner product. + +## Build results + +| Metric | Workers | TurboQuant | PQ | TQ as percentage of PQ | +| --- | ---: | ---: | ---: | ---: | +| Squared L2 | 1 / 2 / 4 | 1.339 / 0.884 / 0.652 s | 7.100 / 4.393 / 3.727 s | 18.86% / 20.13% / 17.50% | +| Cosine | 1 / 2 / 4 | 1.997 / 2.671 / 1.168 s | 3.531 / 2.617 / 2.182 s | 56.55% / 102.07% / 53.50% | +| Inner product | 1 / 2 / 4 | 1.369 / 0.898 / 0.679 s | 6.866 / 4.325 / 2.836 s | 19.93% / 20.75% / 23.95% | + +All worker counts produced the same accelerator manifest and canonical +logical build statistics within each cell. TurboQuant built faster in eight +of nine development-host worker/metric observations. The isolated two-worker +cosine result was 2.07% slower than PQ and should be treated as host timing +evidence, not as a determinism failure. + +For the 1536-dimensional default cells, build results were: + +| Metric | Workers | TurboQuant | PQ | TQ as percentage of PQ | +| --- | ---: | ---: | ---: | ---: | +| Squared L2 | 1 / 2 / 4 | 2.810 / 2.395 / 1.831 s | 8.287 / 5.334 / 4.534 s | 33.90% / 44.90% / 40.39% | +| Cosine | 1 / 2 / 4 | 2.821 / 1.906 / 1.337 s | 7.604 / 5.364 / 4.717 s | 37.10% / 35.53% / 28.35% | +| Inner product | 1 / 2 / 4 | 2.564 / 1.633 / 1.194 s | 7.425 / 5.286 / 4.717 s | 34.53% / 30.90% / 25.31% | + +TurboQuant built faster than PQ for every 1536-dimensional worker/metric +observation. As required, timing does not alter the byte-identical worker +results. + +## Disposition + +- The required four-bit forced-backend recall floor is 0.95 for every checked + dataset/metric row. All six default cells fail that floor; 768-dimensional + L2 and inner product plus 1536-dimensional inner product also trail + equal-shortlist PQ by more than the allowed 0.01. +- The warm-p95 `Auto` ceiling is 1.25× PQ at recall of at least 0.95. These + cells fail both prerequisites. +- The sidecar does not meet the comparative size criterion, while the build + advantage alone cannot override recall and search-latency failures. +- Forced-backend GA qualification and `Auto` therefore remain disabled. The + result is retained as a regression target for candidate-quality work. +- The other record counts, `k`, eligibility, bit-width, rerank, store/cache, + async, cross-target, and pinned-production-host configurations remain open. + +These timings are a single development-machine observation, not a production +capacity claim. The recall failures are deterministic output-quality evidence +and may not be averaged away by successful smaller cells. diff --git a/docs/proximity-turboquant-10k-qualification.md b/docs/proximity-turboquant-10k-qualification.md new file mode 100644 index 00000000..ce14bba7 --- /dev/null +++ b/docs/proximity-turboquant-10k-qualification.md @@ -0,0 +1,82 @@ +# TurboQuant 10K Qualification Evidence + +This report retains three real, schema-v2 10K-record qualification cells for +the native TurboQuant accelerator: one for every supported metric. They +advance scale evidence beyond the complete 1K bounded tier, but they are not +the complete production matrix and do not qualify `Auto` selection. + +## Environment and contract + +- Date: 2026-09-12 +- Benchmark revisions: L2 at + `92be88dc3933259f4d75dffce91645a7ce67afb9`; cosine and inner product at + `915bbbaa55f8f6ab8fde12a68ad57fb924ebce2c` +- Compiler: Rust 1.97.0, LLVM 22.1.6 +- Target: `aarch64-apple-darwin` +- Machine: `Haipings-Mac-Studio.local` +- Store/cache: in-memory, warm search cache +- Records/dimensions/metrics: 10,000 × 768, squared L2, cosine, and inner + product +- Query: `k=10`, all records eligible, four-bit codes, rerank multiplier 8 +- Build workers: 1, 2, and 4 +- Search samples: 30 per implementation +- Qualification contracts: schema v2 full-matrix shards `131629/1000000` + (L2), `79516/1000000` (cosine), and `513486/1000000` (inner product), each + with exactly one selected cell from the frozen 45,360-cell matrix + +Each resumable shard—including its contract, raw CSV, exact digest, compile +record, and terminal status—is retained under the corresponding +`performance-results/proximity-turboquant/qualification-10k-d768--k10-all-b4-r8-warm-sync-shard/` +directory. The benchmarks produced no stderr. Exact `--resume` runs accepted +all three retained states without rerunning a cell. + +## Results + +| Measure | TurboQuant | PQ | Interpretation | +| --- | ---: | ---: | --- | +| Recall@10 | 1.00 | 0.60 | TurboQuant clears the 0.95 forced-backend recall floor for this cell | +| Median search | 22,489.166 µs | 8,236.750 µs | TurboQuant is 2.73× slower | +| Warm p95 search | 23,566.625 µs | 8,966.542 µs | TurboQuant is 2.63× slower | +| Derived sidecar | 3,975,264 bytes | 174,439 bytes | TurboQuant is 22.79× larger | +| One-worker build | 134,577.167 µs | 425,243.459 µs | TurboQuant uses 31.65% of PQ build time | +| Two-worker build | 71,899.125 µs | 287,599.334 µs | TurboQuant uses 25.00% of PQ build time | +| Four-worker build | 54,231.250 µs | 219,576.375 µs | TurboQuant uses 24.70% of PQ build time | + +TurboQuant reranked 80 authoritative candidates and reported mean squared +reconstruction error `0.00942432544887716`. All worker counts produced the +same manifest and canonical logical build statistics; the runner rejected any +missing or duplicated operation row and confirmed zero warm-cache physical +reads. + +The matching cosine and inner-product cells produced: + +| Metric | TQ recall | PQ recall | TQ median | PQ median | TQ warm p95 | PQ warm p95 | +| --- | ---: | ---: | ---: | ---: | ---: | ---: | +| Cosine | 1.00 | 0.80 | 9,594.500 µs | 1,643.000 µs | 10,214.666 µs | 2,233.750 µs | +| Inner product | 1.00 | 0.40 | 9,982.750 µs | 1,533.084 µs | 10,693.750 µs | 1,968.167 µs | + +Both additional metrics retained the same 3,975,264-byte TurboQuant sidecar +and 174,439-byte PQ sidecar. TurboQuant was 5.84×/6.51× slower at the median +and 4.57×/5.43× slower at p95 for cosine/inner product, respectively. Its +one-, two-, and four-worker build times were 30.71%/24.13%/19.86% of PQ for +cosine and 30.34%/25.22%/23.92% for inner product. Each cell reranked 80 +authoritative candidates, produced identical canonical manifests and logical +build statistics across worker counts, and recorded zero warm-cache physical +reads. + +## Disposition + +- These individual forced-backend recall cells pass: TurboQuant recall is at + least 0.95 and is not below the equal-shortlist PQ result for every metric. +- The cells demonstrate a substantial training-free build-time advantage, but + the design's build gate is specifically 100K × 768/1536 on a pinned + production host, so this observation does not satisfy that gate. +- The warm-p95 and comparative-value gates do not pass in these cells. Higher + recall does not offset 2.63× to 5.43× p95 latency under the approved 1.25× + ceiling, and the sidecar is larger rather than at least 25% smaller. +- `Auto` therefore remains disabled. The remaining 10K configurations and the + full 100K/1M, metric, `k`, eligibility, bit-width, rerank, store/cache, + async, cross-target, and production-host matrix remain open. + +These timings are a single development-machine observation, not a production +capacity claim. diff --git a/docs/proximity-turboquant-1k-qualification.md b/docs/proximity-turboquant-1k-qualification.md new file mode 100644 index 00000000..651876f4 --- /dev/null +++ b/docs/proximity-turboquant-1k-qualification.md @@ -0,0 +1,71 @@ +# TurboQuant 1K Qualification Evidence + +This report retains the bounded 1K-record qualification tier for the native +TurboQuant accelerator. It is reproducible evidence for the default +four-bit, rerank-eight, unfiltered `k=10` path. It is not the production GA +matrix and does not qualify `Auto` selection. + +## Environment and inputs + +- Date: 2026-09-12 +- Benchmark revision: `71aae3d6d3dd0df11b92959a1579188117d8e079` +- Compiler: Rust 1.97.0, LLVM 22.1.6 +- Target: `aarch64-apple-darwin` +- Store/cache: in-memory, warm search cache +- Records: 1,000 deterministic synthetic records +- Dimensions: 128, 200, 768, 1536, and 3072 +- Metrics: squared L2, cosine, and inner product +- Search samples: 30 per implementation and dimension +- Query: `k=10`, all records eligible, four-bit TurboQuant, rerank multiplier 8 + +Raw benchmark output is retained in: + +- `performance-results/proximity-turboquant/qualification-1k-l2-k10-all-b4-r8-arm64.csv` +- `performance-results/proximity-turboquant/qualification-1k-cosine-k10-all-b4-r8-arm64.csv` +- `performance-results/proximity-turboquant/qualification-1k-inner-product-k10-all-b4-r8-arm64.csv` + +These retained files predate benchmark `schema_version=2`. Their latency, +recall, sidecar-size, and build values remain valid for this report, but the +quantized-search `metric_a`/`metric_b` columns use the legacy counter layout. +New evidence must retain the schema version printed by the harness and must not +merge rows from different schemas without an explicit conversion. + +## Results + +Every one of the 15 TurboQuant metric/dimension rows produced recall@10 of +`1.0`; the equal-shortlist PQ comparison also produced `1.0`. This bounded +tier therefore clears both recall checks: recall is at least `0.95`, and no +TurboQuant row is more than `0.01` below PQ. + +The storage numbers below exclude the authoritative proximity-map closure and +count only derived manifest and code-tree objects. Search ratios compare the +30-sample TurboQuant automatic-kernel median with the PQ median; the range is +across the three metrics. + +| Dimensions | TurboQuant sidecar bytes | PQ sidecar bytes | TQ `Auto`/PQ median search ratio | TQ recall range | PQ recall range | +| ---: | ---: | ---: | ---: | ---: | ---: | +| 128 | 76,699 | 20,914 | 1.86–1.93× | 1.0–1.0 | 1.0–1.0 | +| 200 | 112,699 | 25,522 | 2.28–2.36× | 1.0–1.0 | 1.0–1.0 | +| 768 | 397,699 | 61,874 | 4.35–4.71× | 1.0–1.0 | 1.0–1.0 | +| 1536 | 781,699 | 111,034 | 5.51–5.63× | 1.0–1.0 | 1.0–1.0 | +| 3072 | 1,549,699 | 209,338 | 6.47–6.66× | 1.0–1.0 | 1.0–1.0 | + +The exact rerank path explains the perfect result on this small deterministic +fixture: TurboQuant admits and reranks 80 candidates for each search. This is +useful correctness evidence, but it is not evidence that the same recall will +hold at production scale or under selective filters. + +## Disposition + +- Bounded 1K default-path recall criterion: passed for all 15 rows. +- Production forced-backend qualification: still open. The retained matrix + must also cover 10K/100K/1M scale, all requested `k`, eligibility, bit-width, + rerank, cache/store, async/batched, and WASM configurations. +- `Auto` qualification: failed to establish an advantage. On this tier, + TurboQuant search and sidecar size are both worse than PQ. The production + 100K build and warm-p95 gates have not been run. `Auto` therefore remains + disabled. + +These values are a single development-machine observation, not a capacity +claim. Timing comparisons require retained production-host runs before a +release decision. diff --git a/docs/proximity-turboquant-cross-target.md b/docs/proximity-turboquant-cross-target.md new file mode 100644 index 00000000..5e07930b --- /dev/null +++ b/docs/proximity-turboquant-cross-target.md @@ -0,0 +1,34 @@ +# TurboQuant Cross-Target Conformance + +TurboQuant persisted construction is checked against one shared canonical +fixture rather than against target-specific expected values. The fixture is +`conformance/proximity-fixtures.json` and fixes the SplitMix stream, +transform-plan/input/output hashes for dimensions 8, 24, 128, 200, 768, 1536, +and 3072, all codebook bits, 2/3/4-bit packing, and a complete three-record +persisted closure. + +The persisted wire fixture has these target-independent identities: + +- authoritative descriptor CID: + `aa33d78f3fa8e8df48bb18b4f03756dba1a5ca4b78c6f09512c81e2bf07927dd` +- TurboQuant manifest CID: + `f927847b6f9d119d728e1145d835d11b2720f5171248b308a38f3ae72ddac338` + +## Evidence + +| Target | Evidence | Result | +| --- | --- | --- | +| x86_64 Linux | [`core` CI job at fixture commit `0d1b3a9a`](https://github.com/crabbuild/prolly/actions/runs/34686866431/job/103535258271), `cargo test --all-targets` | 534 unit tests passed, including every TurboQuant algorithm hash; the complete TurboQuant wire-closure test also passed | +| aarch64 macOS | Rust 1.97.0 on `aarch64-apple-darwin`, `cargo test --all-features turboquant::tests::` and focused wire suite | algorithm hashes, grouped decode parity, and complete wire closure passed | +| browser WASM | `bindings/wasm/test/portable-parity.test.ts`, `npm --prefix bindings/wasm run build`, `typecheck`, and `test` on `wasm32-unknown-unknown` | 37/37 package tests passed; the browser build reproduced both canonical CIDs above | + +The x86 fixture commit replaced host-libm-generated input vectors with direct +SplitMix-derived IEEE-754 bits. This makes the input itself part of the frozen +contract, so matching output hashes cannot be invalidated by platform `sin` +implementations. The later grouped decode optimization changes only query-time +unpacking and is separately required to match the canonical decoder and +scalar/SIMD result bits. + +Any future target is conformant only when it consumes the same fixture and +reproduces the same hashes and CIDs. A successful compile alone is not +cross-target conformance evidence. diff --git a/docs/proximity-turboquant-dense-reference.md b/docs/proximity-turboquant-dense-reference.md new file mode 100644 index 00000000..092fdc0e --- /dev/null +++ b/docs/proximity-turboquant-dense-reference.md @@ -0,0 +1,75 @@ +# TurboQuant Dense-Reference Comparison + +This report records the development-only comparison required by Phase 1 of +the native TurboQuant design. It is not a production benchmark, a portable +latency claim, or evidence sufficient to enable `Auto`. + +## Method + +[`scripts/turboquant_dense_reference.py`](../scripts/turboquant_dense_reference.py) +implements the paper's Algorithm 1 reference rotation by QR-decomposing a +dense matrix of independent standard-normal values. The signs of the QR +factor are canonicalized by multiplying each column of `Q` by the sign of the +corresponding diagonal entry of `R`. + +The same program independently reproduces Prolly's two-round structured +rotation and refuses to run unless that reproduction matches every frozen +SplitMix, plan, and rotation-output fixture. Both paths use the checked-in +2/3/4-bit Lloyd-Max tables. Neither the script nor its output is linked, +loaded, or consulted by production code. + +The retained run used: + +- source implementation revision `8a90bb970214d27811595a75db1b3bb0ba4721f9`; +- 1,024 deterministic synthetic records and 32 queries per dimension; +- dimensions 128, 200, 768, 1536, and 3072; +- bit widths 2, 3, and 4; +- L2 squared, cosine, and inner-product recall@10; +- an 8x shortlist (80 candidates from 1,024 records); +- seed zero and NumPy PCG64 for the development data and dense matrix; +- Python 3.12.13 and NumPy 2.5.3 on arm64 macOS 26.5.2. + +Raw inputs, environment metadata, generator digest, distortion, norm error, +and recall values are retained in +[`dense-reference-2026-09-12-arm64.json`](../performance-results/proximity-turboquant/dense-reference-2026-09-12-arm64.json). + +Reproduce the run with: + +```sh +uv run scripts/turboquant_dense_reference.py \ + --records 1024 \ + --queries 32 \ + --output performance-results/proximity-turboquant/dense-reference-2026-09-12-arm64.json +``` + +## Results + +The following table shows mean routing MSE for structured/dense rotation and +recall@10 for structured rotation in L2/cosine/inner-product order. The raw +artifact also contains maximum MSE, norm error, and dense-reference recall. + +| Dimensions | Bits | Mean MSE structured / dense | Structured recall@10 L2 / cosine / IP | +| ---: | ---: | ---: | ---: | +| 128 | 2 | 0.116490 / 0.115731 | 1.000 / 0.991 / 0.984 | +| 128 | 3 | 0.034171 / 0.034001 | 1.000 / 1.000 / 1.000 | +| 128 | 4 | 0.009414 / 0.009292 | 1.000 / 1.000 / 1.000 | +| 200 | 2 | 0.116524 / 0.116051 | 0.997 / 0.997 / 0.997 | +| 200 | 3 | 0.034161 / 0.034107 | 1.000 / 1.000 / 1.000 | +| 200 | 4 | 0.009394 / 0.009360 | 1.000 / 1.000 / 1.000 | +| 768 | 2 | 0.117217 / 0.116854 | 1.000 / 1.000 / 0.997 | +| 768 | 3 | 0.034494 / 0.034306 | 1.000 / 1.000 / 1.000 | +| 768 | 4 | 0.009460 / 0.009438 | 1.000 / 1.000 / 1.000 | +| 1536 | 2 | 0.117238 / 0.117427 | 1.000 / 0.994 / 0.994 | +| 1536 | 3 | 0.034500 / 0.034409 | 1.000 / 1.000 / 1.000 | +| 1536 | 4 | 0.009492 / 0.009463 | 1.000 / 1.000 / 1.000 | +| 3072 | 2 | 0.117437 / 0.117389 | 0.997 / 0.994 / 0.994 | +| 3072 | 3 | 0.034562 / 0.034482 | 1.000 / 1.000 / 1.000 | +| 3072 | 4 | 0.009509 / 0.009485 | 1.000 / 1.000 / 1.000 | + +Across these 15 development rows, structured mean MSE is between 0.9984 and +1.0132 times dense Gaussian-QR MSE. The default four-bit configuration has +recall@10 of 1.0 for every checked dimension and metric in this fixture. + +This closes the development-oracle comparison requirement. It does not close +the GA recall gate: the larger retained dataset/store matrix remains required, +and no aggregate here may hide a failing production qualification row. diff --git a/docs/proximity-turboquant-fault-injection.md b/docs/proximity-turboquant-fault-injection.md new file mode 100644 index 00000000..dfe1de68 --- /dev/null +++ b/docs/proximity-turboquant-fault-injection.md @@ -0,0 +1,64 @@ +# TurboQuant Fault-Injection Report + +This report records deterministic store-boundary fault coverage for the native +TurboQuant accelerator. The executable evidence is in +[`tests/proximity_turboquant.rs`](../tests/proximity_turboquant.rs), in: + +- `turboquant_fails_closed_at_every_publication_boundary`; and +- `turboquant_fails_closed_at_every_manifest_tree_proof_and_rerank_read`. + +## Method + +The test store wraps an immutable in-memory store and numbers every cold +`Store::get` and `Store::publish_nodes` boundary. It first runs each lifecycle +without a fault to discover the complete boundary count. It then reconstructs +cold map and accelerator handles and repeats the lifecycle once for every +ordinal, failing exactly that store operation. + +Every injected read must return `Error::Store`; explicit TurboQuant execution +must not fall back to another backend. Every injected publication must fail the +build, stop subsequent publication calls, and leave the expected manifest CID +absent. Unreachable code-tree descendants from a failed build remain safe for +ordinary content-addressed GC. + +The fixture uses 193 records at 128 dimensions so the source directory, +proximity hierarchy, and TurboQuant code tree all cross real persisted tree +boundaries. On revision `8a90bb970214d27811595a75db1b3bb0ba4721f9` plus +the fault-harness change, it exercised: + +| Lifecycle | Store boundaries injected | +| --- | ---: | +| TurboQuant code-tree and manifest publication | 2 writes | +| cold load plus full source/code verification | 16 reads | +| cold load plus forced scan and authoritative rerank | 16 reads | +| cold load plus search-proof generation and closure collection | 43 reads | + +The ordinal loops are derived from the successful run rather than frozen to +these counts. Future tree-shape or proof-closure changes therefore expand the +fault matrix automatically instead of silently leaving new read boundaries +untested. + +Run the retained check with: + +```sh +cargo test --test proximity_turboquant \ + turboquant_fails_closed_at_every_ -- --nocapture +``` + +Malformed bytes, missing objects, CID mismatches, and noncanonical +padding/norms are covered separately by the same test module and +`tests/proximity_wire.rs`. The deterministic bounded fuzz smoke in the +TurboQuant unit and proof tests exercises arbitrary manifest bytes, arbitrary +packed code bits and lengths, supported and maximum-size transform derivation, +code scoring for every metric, and randomized proof-transcript replay +mutations. Every case must finish without panic or unbounded allocation, and +every altered proof transcript must fail closed. +`every_turboquant_manifest_binding_mutation_fails_closed` separately mutates +each semantic manifest binding named by the design: source CID, dimensions, +metric, count, seed, transform ID, codebook ID, bit width, quality bits, +zero-vector count, code root, and configuration fingerprint. Each candidate is +rehash-addressed where applicable and must fail either trusted open or full +source verification. +An old TurboQuant proof version is rejected immediately with the typed +`UnsupportedProximityVersion` error and exact required version, before request +commitment or authenticated closure work. diff --git a/docs/proximity-turboquant-provenance.md b/docs/proximity-turboquant-provenance.md new file mode 100644 index 00000000..0b9e9ed7 --- /dev/null +++ b/docs/proximity-turboquant-provenance.md @@ -0,0 +1,56 @@ +# TurboQuant Provenance Record + +## Research basis + +The algorithmic reference is +[TurboQuant: Online Vector Quantization with Near-optimal Distortion Rate](https://arxiv.org/abs/2504.19874), +arXiv:2504.19874v1, submitted April 28, 2025, by Amir Zandieh, Majid Daliri, +Majid Hadian, and Vahab Mirrokni. The +[Google Research overview](https://research.google/blog/turboquant-redefining-ai-efficiency-with-extreme-compression/) +is explanatory background, not the source-level specification. + +The paper page identifies its text as CC BY 4.0. This implementation is source +code under the repository's MIT OR Apache-2.0 license and includes attribution +without implying endorsement by the paper's authors or Google. The paper's +license is not treated as a patent grant. + +## Independent implementation declaration + +The production implementation was written against the approved Prolly design, +the public paper's mathematical description, and the existing Prolly PQ/HNSW +integration boundaries. It does not link, copy, translate, or persist Turbovec +source code, APIs, or wire formats. + +An earlier feasibility discussion considered whether Turbovec could be +integrated. That review is disclosed here because it motivated choosing a +Prolly-native implementation. It did not provide source-level material for the +implementation. The frozen `TQTQ` manifest, structured transform, scalar +codebooks, packed-code layout, content kinds, and binding APIs are Prolly +formats. + +## Engineering deviation + +The GA candidate generator implements the MSE-oriented rotate-then-scalar- +quantize structure. It uses two deterministic signed/permuted Hadamard rounds +instead of a dense Gaussian-QR/Haar rotation. This keeps construction and +search bounded and portable across CPU and browser WASM targets, but it means +the dense-rotation theorem from the paper is not claimed. Quality and +performance claims require Prolly's retained empirical evidence. + +The product-oriented residual/QJL estimator is not implemented. Adding it +requires a separately approved design and independent qualification. + +## Release disposition + +- Provenance owner: the Prolly release maintainer approving the release. +- Legal/patent disposition owner: the organization or maintainer authorizing + commercial/default enablement. +- Current legal/patent disposition: pending; no approval is inferred by this + technical record. +- Enforcement: TurboQuant remains excluded from `Auto`, and the release ledger + treats the missing disposition as a closed GA gate. + +The approving owner must replace the pending disposition with a dated, +reviewable decision before commercial release or default enablement. Technical +contributors must not convert successful tests or benchmarks into legal +approval. diff --git a/docs/proximity-turboquant-qualification.md b/docs/proximity-turboquant-qualification.md new file mode 100644 index 00000000..ea9b22e6 --- /dev/null +++ b/docs/proximity-turboquant-qualification.md @@ -0,0 +1,405 @@ +# TurboQuant Qualification + +This document is the release evidence ledger for Prolly's native, +independently implemented `TurboQuant_mse` routing accelerator. It separates +forced-backend availability from `Auto` eligibility. Missing evidence is a +closed gate, never an inferred pass. + +## Current disposition + +- Forced backend: implemented; release remains gated by the unchecked items + below. +- `Auto`: disabled. The planner deliberately treats TurboQuant as unavailable + during automatic selection. +- QJL/product residual mode: out of scope and not implemented. +- Turbovec compatibility or dependency: none. + +The implementation follows the algorithmic structure described in +[TurboQuant: Online Vector Quantization with Near-optimal Distortion Rate](https://arxiv.org/abs/2504.19874), +but uses a deterministic structured orthogonal transform instead of the +paper's dense Gaussian-QR/Haar rotation. Consequently, Prolly makes no claim +to the paper's exact dense-rotation theorem. No Turbovec source code, API, or +wire format is used. +The detailed independent-implementation and release-owner record is in +[`proximity-turboquant-provenance.md`](proximity-turboquant-provenance.md). + +The development-only dense Gaussian-QR oracle and all-dimension comparison are +documented in +[`proximity-turboquant-dense-reference.md`](proximity-turboquant-dense-reference.md). +That evidence checks the structured-transform engineering deviation; it does +not replace the production-scale recall and performance matrix below. + +## Checked-in correctness evidence + +| Requirement | Evidence | Status | +| --- | --- | --- | +| Frozen PRNG, transform, codebook, packing, and wire bytes | `conformance/proximity-fixtures.json`, `scripts/generate_turboquant_codebooks.py`, TurboQuant unit tests, `tests/proximity_wire.rs` | Implemented | +| Source-bound canonical build and validation | `src/prolly/proximity/accelerator/turboquant.rs`, sync/async trusted-open root-count unit tests, a CID-valid partial-sidecar regression proving direct and composite source-count binding, and adaptive pre-encoding temporary-budget tests that preserve the canonical manifest while accounting for transform scratch, retained input/output, the live code-tree hierarchy, pending publications, and transient raw/encoded node overlap; unbounded builds cap code-tree publication batches at 16 nodes | Implemented | +| Authoritative exact reranking and bounded candidate admission | `src/prolly/proximity/accelerator/quantized.rs`, TurboQuant/PQ search tests | Implemented | +| Scalar/SIMD bit identity | `src/prolly/proximity/distance/simd.rs`, TurboQuant unit tests | Implemented | +| Sync/async, catalog, composite, proof, content graph, and GC integration | focused proximity accelerator, async, proof, and content-graph tests, including manifest-context validation of every TurboQuant tree node, child count, and packed leaf value; `turboquant_async_cancellation_covers_every_store_read_boundary` for full-scan/direct-lookup/final-rerank cancellation and zero-I/O pre-cancellation; explicit deadline completion; and typed rejection of old proof versions before closure work | Implemented | +| Maintained portable binding lifecycle and cookbook | UniFFI plus Python, Go, Node, Kotlin, Java, Ruby, Swift, and WASM facades/tests; every language lifecycle asserts TurboQuant build/search statistics and pre-cancelled search, then executes direct TurboQuant catalog dispatch and TurboQuant-based composite construction/search; each language's `bindings/*/COOKBOOK.md` includes a forced TurboQuant RAG sidecar lifecycle | Implemented | +| Cross-target fixture execution on x86_64, aarch64, and browser WASM | [`proximity-turboquant-cross-target.md`](proximity-turboquant-cross-target.md), Linux CI, local aarch64 suite, browser-WASM canonical CID test | Implemented | +| Dense paper-reference distortion and recall comparison | [`proximity-turboquant-dense-reference.md`](proximity-turboquant-dense-reference.md), retained raw JSON, reproducible generator | Implemented | +| Complete adversarial fault injection and tamper rejection | [`proximity-turboquant-fault-injection.md`](proximity-turboquant-fault-injection.md), ordinal cold-read/publication tests, and explicit source CID, dimensions, metric, count, seed, transform ID, codebook ID, bit width, quality, zero-count, code-root, and fingerprint mutation coverage | Implemented | +| Bounded fuzz smoke | `fuzz/fuzz_targets/proximity_turboquant_decode.rs` and `proximity_turboquant_lifecycle.rs` exercise arbitrary manifest bytes plus bounded build/load/verify/search/corruption lifecycles across every metric, bit width, and query kernel; unit and proof tests additionally cover packed-bit validation/unpacking, maximum-dimension transform derivation, all-metric scoring, and randomized proof-transcript replay mutations | Implemented | + +## Benchmark protocol + +The ordinary proximity harness contains `turboquant_build`, +`turboquant_search_scalar`, `turboquant_search_simd`, and +`turboquant_recall` rows beside equivalent PQ rows. A bounded smoke run is: + +```sh +PROLLY_PROXIMITY_BENCH_RECORDS=1000 \ +PROLLY_PROXIMITY_BENCH_DIMENSIONS=128,200,768,1536,3072 \ +PROLLY_PROXIMITY_BENCH_THREADS=1,2,4 \ +PROLLY_PROXIMITY_BENCH_SEARCH_REPEATS=30 \ +cargo bench --all-features --bench prolly_proximity_bench +``` + +For the large qualification matrix, set +`PROLLY_PROXIMITY_BENCH_QUANTIZERS_ONLY=1`. This profile builds the +authoritative source once, then runs only TurboQuant and the equal-shortlist +PQ baseline. It omits exact/adaptive source searches, mutation, proof, +copy/GC, HNSW, composite, and generic async rows so those unrelated costs do +not make every matrix cell repeat them. `PROLLY_PROXIMITY_BENCH_THREADS` +applies to both quantizer builds in this profile and in the complete profile. +Each requested worker count emits a build row. The harness also asserts that +all requested worker counts produce the same manifest CID and logical build +statistics before it emits search evidence. + +```sh +PROLLY_PROXIMITY_BENCH_RECORDS=100000 \ +PROLLY_PROXIMITY_BENCH_DIMENSIONS=768,1536 \ +PROLLY_PROXIMITY_BENCH_THREADS=1,2,4 \ +PROLLY_PROXIMITY_BENCH_SEARCH_REPEATS=30 \ +PROLLY_PROXIMITY_BENCH_QUANTIZERS_ONLY=1 \ +cargo bench --all-features --bench prolly_proximity_bench +``` + +The scale-only and quantizers-only profiles are mutually exclusive. Worker +counts must be positive and unique; invalid lists fail before data generation +so retained CSVs cannot contain ambiguous duplicate cells. + +The default store is `memory`. Durable-local cells use the repository +`FileNodeStore` by selecting `PROLLY_PROXIMITY_BENCH_STORE=file` and providing +an existing parent directory. The harness creates a uniquely named child for +the run, reports its canonical path, isolates each build in a separate store, +and removes the owned run directory on ordinary exit. An interrupted process +may leave that uniquely named child for diagnosis and manual cleanup. + +```sh +mkdir -p /var/tmp/prolly-turboquant-bench +PROLLY_PROXIMITY_BENCH_STORE=file \ +PROLLY_PROXIMITY_BENCH_STORE_PATH=/var/tmp/prolly-turboquant-bench \ +PROLLY_PROXIMITY_BENCH_RECORDS=100000 \ +PROLLY_PROXIMITY_BENCH_DIMENSIONS=768,1536 \ +PROLLY_PROXIMITY_BENCH_THREADS=1,2,4 \ +PROLLY_PROXIMITY_BENCH_QUANTIZERS_ONLY=1 \ +cargo bench --all-features --bench prolly_proximity_bench +``` + +Search rows report the sample median; `_p95` and `_p99` companion rows report +nearest-rank tail latency. The main quantized-search row records quantized and +exact distance evaluations in `metric_a` and `metric_b`; `_p95` records logical +and physical bytes read; `_p99` records candidate-handle and retained-byte +peaks. `_work` rows retain frontier peak and the completion discriminator (`0` +exact, `1` approximate-policy-satisfied, `2` budget-exhausted, `3` cancelled, +`4` deadline-exceeded). `_io` records logical nodes consumed and actual store +read operations, while `_rerank` records authoritative candidates reranked and +committed logical bytes. The output preamble's `schema_version=4` identifies +these counter meanings, the corrected architecture-stable dataset, and the +authoritative exact-search recall oracle contract. +`turboquant_build_resources` reports peak owned scratch bytes and butterfly +operations, while +`source_closure_bytes` reports the authoritative map closure and +`turboquant_sidecar_bytes` and `pq_sidecar_bytes` report only derived +accelerator bytes beside encoded payload counts. Referenced source objects are +excluded from the sidecar totals even though they are part of each typed +closure. The corresponding `*_manifest_code_bytes` rows split manifest bytes +from code-tree bytes. The harness emits the git revision, compiler, target +architecture/OS, store, seed, cache mode, and repetition count before the CSV +rows. + +The scalar and automatic TurboQuant scan kernels precompute the finite +query-by-codebook product table once per search. Candidate scoring then decodes +packed codes, reconstructs the exact positive half from the codebook's frozen +bit-symmetric negative half, and performs the same coordinate-ordered scalar +reduction without repeating a floating-point multiply for every candidate +component. L2, cosine, and inner-product scoring accumulate the reconstructed +norm in that same packed-code traversal; cosine and inner product use it to +remove reconstruction-direction norm drift, while L2 uses it in the full MSE +distance. The private table uses fixed-size product rows for each supported bit +width, so every dynamic lookup is safe and statically bounded; the complete +TurboQuant algorithm module forbids unsafe code. This halves the +scalar/automatic query table to +`dimensions * 2^(bit_width - 1) * 8` bytes (1 MiB at the maximum supported +shape). The +explicit SIMD kernel remains an independent conformance path and reconstructs +only one bounded coordinate chunk at a time. Its query preparation therefore +does not allocate the scalar product table, avoiding +`dimensions * 2^(bit_width - 1) * 8` unused bytes per query (1 MiB at the maximum +16,384-dimension four-bit configuration). Tests require all three kernels to +return bit-identical scores, plans, neighbors, and logical statistics. + +Production qualification must retain raw outputs under +`performance-results/proximity-turboquant/` and cover the full matrix in the +approved design: 1K/10K/100K/1M records; dimensions +128/200/768/1536/3072; every metric; `k` 1/10/100; all and +10%/1%/0.1% eligibility; bit widths 2/3/4; rerank multipliers 4/8/16 and +exhaustive where feasible; warm/cold memory, durable local, async/batched, and +WASM smoke environments. Each retained run must identify the revision, +compiler, target, host, store, seed, and repetition count. + +One harness invocation selects a single matrix configuration with +`PROLLY_PROXIMITY_BENCH_METRIC` (`l2`, `cosine`, or `inner_product`), +`PROLLY_PROXIMITY_BENCH_K`, `PROLLY_PROXIMITY_BENCH_ELIGIBILITY_PPM` +(`1000000`, `100000`, `10000`, or `1000`), +`PROLLY_PROXIMITY_BENCH_TURBOQUANT_BITS`, and +`PROLLY_PROXIMITY_BENCH_RERANK_MULTIPLIER`. Set +`PROLLY_PROXIMITY_BENCH_RESET_SEARCH_CACHE=1` for cold-cache rows. Invalid +metric text, malformed numeric values, duplicate/non-positive worker counts, +and unsupported TurboQuant configurations fail instead of being silently +normalized. + +Set `PROLLY_PROXIMITY_BENCH_ASYNC_QUANTIZERS=1` with the `async-store` feature +to add async build, publication, search, percentile/work, and +environment-specific recall rows for TurboQuant and PQ. The async builders +construct canonical sidecars, publish their complete catalog closures in +bounded batches, and assert that each accelerator manifest and its logical +statistics match the synchronous build for every requested worker count. +TurboQuant reads the immutable async directory in key order, encodes at most +128 source vectors at a time, and feeds a memory-bounded async sorted builder; +it does not materialize or restage the corpus. Async verification likewise +streams the source and code trees in lockstep. PQ retains its established +staging path. `*_build_async_publication` rows record published object and byte +counts. + +For the normal co-resident ancestor/current case, TurboQuant composite +construction also stays on the native async path. It structurally diffs the +immutable directories, streams ordered delta and shadow entries into bounded +async sorted builders, and publishes the canonical composite manifest last. +It does not collect or rebuild either complete source corpus, and its manifest +and logical build statistics must match synchronous construction exactly. A +cross-store base whose authenticated closure is absent from the destination +retains the established compatibility staging path so the operation still +copies a complete closure rather than publishing dangling references. +Searches execute the native async/batched engine through `SyncStoreAsAsync`, +preserving the selected memory or file store. Warm samples share one +authenticated `SearchIo` runtime after an untimed warmup. Cold samples create a +new runtime/namespace and reload the descriptor and sidecar metadata inside +each timed sample; their physical byte count therefore includes source, +manifest, and code-tree reads. + +Cold-cache quantizer samples clear the authoritative map caches and use a new +`SearchIo` runtime/namespace for each timed query, so descriptor, manifest, +source, and code-tree physical reads are measured rather than inherited from a +prior sample. Warm rows perform one untimed warmup through the same instrumented +runtime used by every measured sample. Warm cells may still report physical +reads when the authenticated working set exceeds a bounded runtime cache +partition; `warm` means shared primed runtime, not an unbounded or +fully-resident cache. Cold cells must report physical I/O, while all physical +counters must remain finite and nonnegative. The output preamble records the +machine hostname and the frozen TurboQuant seed in addition to revision, +compiler, target, store, and cache mode. + +### Qualification runner + +`scripts/run_turboquant_qualification.py` is the authoritative native-matrix +orchestrator. Qualification schema v4 requires the +`linear-mod-2000003-v2` dataset identifier. Its `u64` arithmetic is identical +on native and WASM targets, and its 2,000,003-record period exceeds the largest +1M matrix tier. The superseded generator repeated complete vectors every +20,003 records and used architecture-width `usize` wrapping; retained v2 rows +remain reproducible diagnostics but are not GA matrix evidence. + +Schema 4 obtains recall truth from an exact scalar ProximityMap search over +the persisted canonical vectors. Schema 3 independently rescored raw +pre-ingestion vectors and used platform `sqrt` for cosine. That formula is +mathematically equivalent before rounding, but it can choose different +neighbors after canonical fixed-point normalization when distances are nearly +tied. Schema-3 cosine recall is invalid for release qualification; the runner +and summarizer reject every older-schema row rather than migrating or +averaging it into current evidence. + +The full profile deterministically enumerates 45,360 cells: all +required count, dimension, metric, requested-`k`, eligibility, bit-width, and +fixed rerank combinations across warm/cold memory, warm/cold file, and +warm/cold async/batched environments, plus exhaustive reranking through 10K +records. When eligibility contains fewer records than the requested `k`, the +harness records both `k` and `effective_k`; recall is computed at the largest +mathematically possible result count. + +Each cell has an immutable ID and isolated raw CSV, stderr log, completion +record, and SHA-256 digest. A cell is complete only after the runner validates +the exact revision and schema, every required operation and worker row, finite +counters, warm/cold physical-I/O behavior, and sync/async logical parity. +The benchmark itself additionally asserts identical neighbors (including exact +distances and order), committed plans, completion states, and every logical +statistic across scalar/SIMD/automatic kernels and the async engine before a +cell can emit successful evidence. +Resume revalidates both the content digest and the entire row contract before +skipping a cell. Mixed revisions, schemas, shard definitions, repetitions, or +worker lists fail closed. Hash sharding is stable and disjoint: + +```sh +python3 scripts/run_turboquant_qualification.py \ + --profile full \ + --output performance-results/proximity-turboquant/full-REV/shard-00-of-64 \ + --shard-index 0 \ + --shard-count 64 + +# Restart the exact same shard after interruption. +python3 scripts/run_turboquant_qualification.py \ + --profile full \ + --output performance-results/proximity-turboquant/full-REV/shard-00-of-64 \ + --shard-index 0 \ + --shard-count 64 \ + --resume +``` + +On a qualification host that cannot safely execute the 1M tier, pass an +explicit record ceiling of at least 100K. For example, +`--max-cell-records 100000` executes every 1K/10K/100K cell and records each +1M cell as a versioned `ProximityResourceLimitExceeded` disposition with the +exact resource, limit, actual count, and preflight phase. This mirrors the +production builder's typed `max_records` failure and is accepted only for 1M +cells; it never creates a synthetic benchmark CSV or counts as performance or +recall evidence. The ceiling is part of the immutable shard contract, resume +revalidates every disposition, and the summarizer emits the complete list in +`scalability-failures.json`. Omitting the option requires every 1M cell to run. + +Shard zero also rebuilds the browser WASM package and requires the package test +suite to report zero failures and zero skips, including the TurboQuant lifecycle +and Rust-wire-fixture tests. This is the required WASM smoke gate; native +latency is not presented as browser performance. Production runs reject a +tracked-dirty worktree. `--allow-dirty` exists only for the six-cell smoke +profile and its output is never publishable qualification evidence. + +After every shard completes, the strict summarizer must receive the complete +shard set. It revalidates manifests, raw/state digests, every cell, WASM logs, +and disjoint full-matrix coverage before emitting `summary.csv`, `gates.json`, +and `report.md`. It refuses incomplete, duplicate, mixed-provenance, or extra +cells. The report evaluates forced-backend matrix gates separately from the +stricter `Auto` gates and explicitly leaves legal, global binding inventory, +and final supported-host release commands unevaluated: + +```sh +python3 scripts/summarize_turboquant_qualification.py \ + --input performance-results/proximity-turboquant/full-REV/shard-* \ + --output performance-results/proximity-turboquant/full-REV/summary +``` + +## Release gates + +Forced-backend GA still requires: + +- recall@10 at least 0.95 for the default four-bit configuration on every + checked dataset/metric row, and no row more than 0.01 below PQ at an equal + shortlist; +- the complete correctness, resource, binding, and release command suites; +- retained cross-target and benchmark evidence; and +- a release-owner legal/provenance disposition. CC BY 4.0 attribution is not a + patent grant, so this repository cannot infer that disposition from the + paper's publication. + +`Auto` additionally requires default four-bit TurboQuant to build faster than +default PQ at 100K × 768 and 100K × 1536, have warm p95 search no worse than +1.25 times PQ at equal recall of at least 0.95, and show a qualifying speed, +size, or recall advantage for every enabled benchmark family. Until retained +evidence satisfies every comparative rule, `Auto` remains disabled. + +## Release-command audit + +The local release-command audit on 2026-09-12 records each gate separately: + +| Command or suite | Result | +| --- | --- | +| `cargo fmt --all -- --check` and `git diff --check` | Passed | +| warnings-denied all-target/all-feature Clippy | Passed | +| Rust 1.89 all-target/all-feature check | Passed; repository-wide unfulfilled-lint-expectation warnings remain non-fatal under that compiler | +| all-feature tests | Passed at `88ef05f9084d035bb6b1e257f1d3127bba05e7ea`: 551 library tests plus every integration suite and 74 doc tests; one unrelated extended splice stress test remains explicitly ignored | +| scalar scorer safety and strict-provenance Miri checks | The TurboQuant algorithm module has `#![forbid(unsafe_code)]`; Miri passed the every-code signed-zero/extreme-weight symmetry oracle and scalar/SIMD bit-identity test | +| bounded coverage-guided fuzz smoke | Passed: 2,048 arbitrary-decode executions and 256 bounded lifecycle executions under `cargo-fuzz` 0.13.2; the lifecycle target found a repeated-equal-error quality rounding defect, whose minimized input now has an exact build/verify/reopen regression test | +| all-feature doctests | Passed: 74/74 | +| all-feature benchmark compilation | Passed | +| browser-WASM build, typecheck, and package tests | Passed: 37/37, including canonical TurboQuant wire parity | +| maintained binding TurboQuant lifecycle | Python, Go, Node/TypeScript, Kotlin, Java, Ruby, Swift, and browser WASM lifecycle tests exercise pre-cancelled search, reported TurboQuant statistics, direct TurboQuant catalog dispatch, and TurboQuant-based composite search; Ruby passes 23/23 with 264 assertions, and the full 18-module Kotlin/Java reactor passes locally | +| maintained binding cookbooks | Python, Go, Node/TypeScript, Kotlin, Java, Ruby, Swift, and browser WASM document build, forced search, verification, and manifest reopen | +| generated classification audit | Regenerated from current-head async-feature rustdoc: all 73 TurboQuant rows are `implemented` and `release_complete`; the normal 3,418-operation inventory check passes, including the four Rust-owned validated-read store defaults | +| release binding inventory | Repository gate remains open: 2,998 pre-existing public Rust entries are classified incomplete; none is a TurboQuant entry | + +The binding inventory distinction is intentional. TurboQuant's production +cells are implemented, but the approved release command requires the global +repository inventory to pass, so forced-backend GA cannot claim this gate yet. + +## Local smoke evidence + +The implementation PR records a development-machine 64-record × 8-dimension +smoke run. It demonstrates executable benchmark coverage and exact reranking, +not production capacity or `Auto` qualification. Production evidence must not +replace or average away a failing dataset/metric row. + +A controlled 10K-record × 768-dimension warm-search diagnostic measured the +default four-bit scalar median at 9.016 ms before compact-table work and +8.627/8.333 ms in two current-head safe fixed-array runs. Relative to the PQ +control paired with each run, the TurboQuant/PQ median ratio improved from +6.177× to 6.071×/6.008×. Recall, candidate/rerank counts, and +logical/physical work were unchanged. This is implementation diagnostic +evidence, not a retained matrix cell or an `Auto` qualification result. + +The retained +[`proximity-turboquant-1k-qualification.md`](proximity-turboquant-1k-qualification.md) +report covers the next bounded tier across every supported dimension and +metric. Its default-path recall rows pass, but its comparative timing and size +results reinforce the decision to keep `Auto` disabled. The report explicitly +does not close the remaining production-matrix gates. + +The retained +[`proximity-turboquant-10k-qualification.md`](proximity-turboquant-10k-qualification.md) +report adds one real schema-v2 10K × 768 default-path cell for each supported +metric. Every cell demonstrates 1.0 TurboQuant recall and materially faster +construction than PQ, but warm p95 search is 2.63× to 5.43× PQ and the +sidecar is 22.79× larger. These cells are therefore evidence for the forced +path and against enabling `Auto`. They predate the v3 dataset contract and do +not substitute for any of its 45,360 production cells. + +The retained +[`proximity-turboquant-100k-qualification.md`](proximity-turboquant-100k-qualification.md) +report adds one schema-v2 100K × 768 default-path cell for each supported +metric. The first build-gate-scale evidence is negative: TurboQuant recall@10 +is 0.00/0.50/0.00 for L2/cosine/inner product, and warm p95 is +8.18×/9.98×/9.35× PQ. Those deterministic per-row failures keep +forced-backend GA and `Auto` unqualified; they cannot be averaged away by the +successful smaller cells. Three 16× rerank cells restore 768-dimensional L2 +recall to 1.00 but leave cosine at 0.50 and inner product at 0.00. The matching +100K × 1536 default cells have 0.00 TurboQuant recall for every metric and +20.45× to 23.49× PQ p95, despite faster builds. The remaining 45,348 +production cells and the pinned-host rerun appeared open under v2. Subsequent +audit found that v2 repeated every vector after 20,003 records, making its +100K Recall@10 quantized in coarse duplicate groups. Those rows remain useful +performance and rank-depth diagnostics, but none counts toward the corrected +current production matrix. + +The retained +[`proximity-turboquant-v3-qualification.md`](proximity-turboquant-v3-qualification.md) +report is superseded because its raw-vector cosine oracle did not implement +ProximityMap's canonical fixed-point metric semantics. An exhaustive 10K +cosine run incorrectly reported recall 0.50 instead of 1.00, proving that the +old oracle could not validate candidate quality. Its latency, size, and +non-cosine results remain useful diagnostics, but none of its rows counts as +current qualification evidence. + +The current +[`proximity-turboquant-v4-qualification.md`](proximity-turboquant-v4-qualification.md) +report retains eleven schema-4 cells at one implementation revision: the 10K +and 100K × 768 default rows for all metrics, matching 16× cosine and +inner-product diagnostics, and an exhaustive 10K cosine oracle. The corrected +oracle reports 0.00 TurboQuant versus 1.00 PQ recall for 10K cosine at both 8× +and 16×; exhaustive reranking returns 1.00 for both. A qualification-scale +regression proves that 222 lower-key records share the exact top-10 vectors' +packed code, making the frozen 80-candidate default incapable of selecting any +of them. All 45,360 schema-4 cells still require execution from one final +frozen revision; `Auto`, forced-backend GA, pinned-host, binding-inventory, and +legal gates remain open. diff --git a/docs/proximity-turboquant-v3-qualification.md b/docs/proximity-turboquant-v3-qualification.md new file mode 100644 index 00000000..acc068ac --- /dev/null +++ b/docs/proximity-turboquant-v3-qualification.md @@ -0,0 +1,142 @@ +# TurboQuant Schema-v3 Superseded Qualification Evidence + +> **Superseded recall oracle:** Benchmark schema 3 rescored raw +> pre-ingestion vectors and used platform `sqrt` for cosine instead of using +> ProximityMap's persisted canonical vectors and deterministic exact scorer. +> On the nearly tied schema-v3 cosine fixture, exhaustive reranking reported +> recall 0.50 instead of the required 1.00. Benchmark schema 4 fixes the +> oracle. None of the rows in this document is GA qualification evidence; +> latency, size, and non-cosine results are retained only as diagnostics. + +This report retains ten real cells from the corrected TurboQuant production +matrix: the default four-bit, 8× rerank path at 10K and 100K records, 768 +dimensions, and every supported metric, plus matching 16× cosine and +inner-product diagnostics. These cells use the unique, +architecture-stable dataset. They are superseded diagnostics, not production +qualification evidence, and `Auto` remains disabled. + +## Environment and contract + +- Date: 2026-09-12 +- Revisions: squared-L2 cells at + `f08e7dfa604bcc4bfd1c406d4c5e4dfcc8550d09`, cosine cells at + `be8e5aef66447059f06a5fb54c2f6ed213e265bd`, and all inner-product + cells at `d79fbf0c267711b2707582f4a1d2bbd8a6cde6d9` +- Qualification schema: `prolly-turboquant-qualification-v3` +- Benchmark schema: 3 +- Dataset: `linear-mod-2000003-v2` +- Compiler: Rust 1.97.0, LLVM 22.1.6 +- Target: `aarch64-apple-darwin` +- Machine: `Haipings-Mac-Studio.local` +- Store/cache: in-memory, warm bounded search runtime +- Records/dimensions/metrics: 10,000 and 100,000 × 768; squared L2, + cosine, and inner product +- Query: `k=10`, all records eligible, four-bit codes, rerank multiplier 8 +- Build workers: 1, 2, and 4 +- Search samples: 30 per implementation + +The ten retained directories contain the immutable manifest, raw CSV, stderr +log, completion state, and content digest for one stable full-matrix shard. +An exact `--resume` invocation revalidated every directory without rerunning +its benchmark. + +These cells span scorer revisions as correctness defects were found and fixed. +They characterize ten matrix configurations, but they are not a combinable +qualification shard set: the strict summarizer rejects mixed revisions. The +complete production matrix must be rerun from one final frozen revision. + +## Recall and search results + +| Records | Metric | TQ recall@10 | PQ recall@10 | TQ median | PQ median | TQ warm p95 | PQ warm p95 | +| ---: | --- | ---: | ---: | ---: | ---: | ---: | ---: | +| 10K | Squared L2 | 1.00 | 1.00 | 9,078.458 µs | 1,362.500 µs | 9,467.416 µs | 1,555.000 µs | +| 10K | Cosine | 0.40 | 0.50 | 9,395.834 µs | 1,315.833 µs | 9,878.500 µs | 1,515.917 µs | +| 10K | Inner product | 1.00 | 0.00 | 8,754.041 µs | 1,268.584 µs | 9,059.792 µs | 1,397.708 µs | +| 100K | Squared L2 | 1.00 | 0.00 | 112,362.791 µs | 21,696.166 µs | 116,111.541 µs | 40,152.750 µs | +| 100K | Cosine | 0.00 | 0.00 | 123,336.708 µs | 12,494.084 µs | 133,789.417 µs | 12,777.958 µs | +| 100K | Inner product | 0.00 | 0.00 | 115,012.917 µs | 11,637.458 µs | 125,509.125 µs | 12,944.125 µs | + +The squared-L2 rows validate the corrected distance calculation. A quantized +Lloyd–Max reconstruction is not exactly unit length, so its squared norm must +be derived from the packed codes instead of being replaced by one. With that +correction, TurboQuant L2 recall moved from 0.00 in the pre-fix v3 diagnostic +to 1.00 at both retained scales. Cosine source-scale invariance is separately +enforced by regression test. Normalizing by the packed-code reconstruction +norm raises 10K cosine recall from 0.00 to 0.40, but the fixed 80-candidate +shortlist still misses the recall floor and does not improve the 100K row. +Projecting the inner-product reconstruction back to unit length before +restoring the exact persisted source norm raises 10K default-path recall from +0.00 to 1.00. The 100K default 80-candidate window still misses the floor. + +TurboQuant search is 6.66×/7.14×/6.90× PQ at the median and +6.09×/6.52×/6.48× at p95 for 10K L2/cosine/inner product. At 100K it is +5.18×/9.87×/9.88× at the median and 2.89×/10.47×/9.70× at p95. +Absolute and paired ratios are individual development-host observations; the +logical counters and gate disposition are deterministic. + +The corrected L2 scorer initially decoded every packed code twice: once for +the query dot product and again for the reconstruction norm. The retained +current scorer precomputes the finite centroid-square table once per query and +accumulates both values in the same coordinate-ordered packed-code traversal. +Relative to the retained two-pass baseline, this reduces TurboQuant L2 median +search time by 44.52% at 10K and 41.63% at 100K, and p95 by 43.90% and 45.70%, +without changing score bits, recall, sidecar bytes, candidates, I/O, +completion, rerank work, or any logical statistic. + +The TurboQuant sidecar is 3,975,264 bytes at 10K and 39,757,465 bytes at +100K, respectively 22.79× and 30.43× the matching PQ sidecar. The 100K +working set exceeds the default 32 MiB TurboQuant runtime-cache partition, so +physical reads after warmup are valid bounded-cache behavior. + +## Rerank-window diagnostic + +Doubling the approved rerank multiplier from 8× to 16× does not provide a +general quality correction: + +| Records | Metric | TQ recall, 8× → 16× | PQ recall, 8× → 16× | TQ/PQ 16× p95 | +| ---: | --- | ---: | ---: | ---: | +| 10K | Cosine | 0.40 → 0.40 | 0.50 → 0.50 | 6.15× | +| 10K | Inner product | 1.00 → 1.00 | 0.00 → 1.00 | 6.12× | +| 100K | Cosine | 0.00 → 0.50 | 0.00 → 0.00 | 11.75× | +| 100K | Inner product | 0.00 → 1.00 | 0.00 → 0.00 | 10.02× | + +The approved 160-candidate window now passes inner product at both sampled +scales, demonstrating that the direction correction materially improves rank +depth. It still fails cosine at both scales and increases rerank work, so +changing the frozen default from 8× to 16× is not a sufficient general remedy. + +## Build results + +| Records | Metric | TQ/PQ build time, 1 worker | 2 workers | 4 workers | +| ---: | --- | ---: | ---: | ---: | +| 10K | Squared L2 | 30.91% | 25.32% | 23.14% | +| 10K | Cosine | 30.01% | 24.33% | 20.97% | +| 10K | Inner product | 32.06% | 25.85% | 25.09% | +| 100K | Squared L2 | 31.94% | 36.71% | 31.68% | +| 100K | Cosine | 40.96% | 36.70% | 30.88% | +| 100K | Inner product | 37.08% | 32.24% | 31.27% | + +Every sampled build is faster than its paired PQ build. All worker counts +produce identical manifests and canonical logical statistics within a cell. +These development-host observations do not replace the required pinned-host +100K × 768/1536 build gate. + +## Gate disposition + +- The two squared-L2 cells pass the forced-backend recall floor: recall is at + least 0.95 and does not trail equal-shortlist PQ by more than 0.01. +- The 10K inner-product default cell now also passes and exceeds the + equal-shortlist PQ recall. Both cosine cells and the 100K inner-product + default cell still fail the 0.95 floor; passing rows cannot hide them. +- All six cells fail `Auto`: the L2 rows exceed the 1.25× PQ warm-p95 ceiling, + every other row also exceeds the ceiling, and three rows additionally fail + recall. +- Both sampled scales fail the comparative-size gate; the TurboQuant sidecar + is larger than PQ rather than at least 25% smaller. +- Ten schema-v3 matrix configurations are characterized across development + revisions. All 45,360 cells still require same-revision execution before + complete-shard summarization; the pinned production-host rerun, global + binding inventory, and legal/patent disposition also remain open. + +TurboQuant therefore remains available only through explicit backend +selection. `Auto` and a forced-backend GA claim remain closed. diff --git a/docs/proximity-turboquant-v4-qualification.md b/docs/proximity-turboquant-v4-qualification.md new file mode 100644 index 00000000..519c95b3 --- /dev/null +++ b/docs/proximity-turboquant-v4-qualification.md @@ -0,0 +1,133 @@ +# TurboQuant Schema-v4 Partial Qualification Evidence + +This report retains eleven real cells from the corrected TurboQuant +production matrix. Ten cover 10K and 100K records, 768 dimensions, the +default four-bit encoding, every supported metric at 8× reranking, and +matching 16× cosine and inner-product diagnostics. The eleventh exhaustively +reranks the 10K cosine fixture. These cells are partial evidence, not a +complete production qualification, and `Auto` remains disabled. + +## Environment and contract + +- Date: 2026-09-12 +- Implementation revision: + `729c2ffac8835db9c99d7706746c321067abfa1d` +- Qualification schema: `prolly-turboquant-qualification-v4` +- Benchmark schema: 4 +- Dataset: `linear-mod-2000003-v2` +- Recall oracle: authoritative exact scalar ProximityMap search over persisted + canonical vectors, with the same filter, effective `k`, metric, and + `(exact_score, key)` order as reranking +- Compiler: Rust 1.97.0, LLVM 22.1.6 +- Target: `aarch64-apple-darwin` +- Machine: `Haipings-Mac-Studio.local` +- Store/cache: in-memory, warm bounded search runtime +- Query: `k=10`, all records eligible, seed 0 +- Build workers: 1, 2, and 4 +- Search samples: 30 per implementation + +Each retained directory contains an immutable manifest, raw CSV, stderr log, +completion state, and content digest. Exact `--resume` invocations revalidated +all eleven directories without rerunning their benchmarks. The focused +directories use sparse shard contracts and do not form a complete shard set; +the strict summarizer therefore cannot mistake them for the 45,360-cell +production matrix. + +## Default recall and search results + +| Records | Metric | TQ recall@10 | PQ recall@10 | TQ median | PQ median | TQ warm p95 | PQ warm p95 | +| ---: | --- | ---: | ---: | ---: | ---: | ---: | ---: | +| 10K | Squared L2 | 1.00 | 1.00 | 9,708.208 µs | 1,465.208 µs | 10,524.875 µs | 1,688.750 µs | +| 10K | Cosine | 0.00 | 1.00 | 9,621.000 µs | 1,476.583 µs | 10,089.584 µs | 3,484.167 µs | +| 10K | Inner product | 1.00 | 0.00 | 10,132.541 µs | 1,395.791 µs | 12,858.416 µs | 1,605.208 µs | +| 100K | Squared L2 | 1.00 | 0.00 | 127,451.292 µs | 13,391.416 µs | 139,941.542 µs | 14,667.166 µs | +| 100K | Cosine | 0.00 | 0.00 | 120,933.000 µs | 14,795.041 µs | 124,382.667 µs | 16,910.375 µs | +| 100K | Inner product | 0.00 | 0.00 | 122,724.667 µs | 12,751.167 µs | 123,636.375 µs | 13,039.750 µs | + +TurboQuant/PQ median ratios are 6.63×/6.52×/7.26× at 10K and +9.52×/8.17×/9.63× at 100K for L2/cosine/inner product. Corresponding p95 +ratios are 6.23×/2.90×/8.01× and 9.54×/7.36×/9.48×. The unusually high 10K +PQ cosine p95 is a retained observation, not a portable performance claim. + +The TurboQuant sidecar is 3,975,264 bytes at 10K and 39,757,465 bytes at +100K, respectively 22.79× and 30.43× the matching PQ sidecar. The 100K +working set exceeds the default 32 MiB TurboQuant runtime-cache partition, so +physical reads after warmup are expected bounded-cache behavior. + +## Oracle and collision diagnosis + +Exhaustive 10K cosine reranking returns recall 1.00 for both TurboQuant and PQ, +with exactly 10,000 authoritative reranks. This validates the schema-4 oracle +and exact reranking path. Its TurboQuant/PQ p95 ratio is 1.51×, but exhaustive +work is an oracle, not an acceptable approximate-search default. + +The ignored qualification regression +`qualification_cosine_fixture_exposes_default_shortlist_code_ties` derives the +same dataset through production preparation, rotation, codebook, and packing. +It proves that the authoritative exact top-10 keys are indices 3313 through +3331 at odd intervals, all ten have the query's exact packed code, and 222 +lower-key records have that same packed code. Because approximate candidates +are totally ordered by `(approximate_score, key)`, all 222 lower keys outrank +the exact top 10 inside that tie. The frozen 80-candidate default shortlist +therefore has a deterministic recall upper bound of zero for this fixture, +independent of any scoring-formula change that preserves the packed code and +ordering contract. + +The regression is reproducible with: + +```sh +cargo test --release --all-features --lib \ + qualification_cosine_fixture_exposes_default_shortlist_code_ties \ + -- --ignored +``` + +## Rerank-window diagnostics + +| Records | Metric | TQ recall, 8× → 16× | PQ recall, 8× → 16× | TQ/PQ 16× p95 | +| ---: | --- | ---: | ---: | ---: | +| 10K | Cosine | 0.00 → 0.00 | 1.00 → 1.00 | 6.06× | +| 10K | Inner product | 1.00 → 1.00 | 0.00 → 1.00 | 5.05× | +| 100K | Cosine | 0.00 → 1.00 | 0.00 → 0.00 | 6.90× | +| 100K | Inner product | 0.00 → 1.00 | 0.00 → 0.00 | 5.11× | + +The approved 16× window corrects both sampled 100K product-like rows and does +not correct the deterministic 10K cosine collision. Increasing the frozen +default from 8× to 16× is therefore not a general remedy. + +## Build results + +| Records | Metric | TQ/PQ build time, 1 worker | 2 workers | 4 workers | +| ---: | --- | ---: | ---: | ---: | +| 10K | Squared L2 | 36.85% | 35.89% | 31.05% | +| 10K | Cosine | 31.13% | 28.42% | 22.33% | +| 10K | Inner product | 28.72% | 36.15% | 32.50% | +| 100K | Squared L2 | 33.62% | 33.88% | 27.84% | +| 100K | Cosine | 34.49% | 35.49% | 29.10% | +| 100K | Inner product | 47.72% | 40.29% | 47.38% | + +Every sampled TurboQuant build is faster than its paired PQ build and every +worker count produces an identical manifest and canonical logical statistics +within a cell. These development-host observations do not replace the pinned +100K × 768/1536 production-host gate. + +## Gate disposition + +- Squared L2 passes the sampled forced-backend recall floor at both scales. +- Inner product passes at 10K with the default window and at 100K with 16×, + but fails the 100K default row. +- Cosine fails both default rows. The 10K failure is unavoidable under the + frozen packed-code, key-tie, and 8× shortlist contract. +- Every sampled default row fails the `Auto` p95 ceiling, and both sampled + scales fail the comparative-size gate. +- Eleven current-schema cells are characterized at one implementation + revision. All 45,360 cells still require one final frozen-revision run; the + pinned-host, global binding-inventory, and legal/patent gates also remain + open. + +TurboQuant remains available only through explicit backend selection. `Auto` +and a forced-backend GA claim remain closed. Closing the 10K cosine gate +requires an approved contract change: a larger bounded shortlist, additional +query-comparable routing information with a new wire/objective identifier, or +a replacement deterministic fixture whose neighbor separations are suitable +for the frozen four-bit MSE objective. The measured gate must not be weakened +or averaged away. diff --git a/docs/superpowers/specs/2026-08-30-native-turboquant-proximity-accelerator-design.md b/docs/superpowers/specs/2026-08-30-native-turboquant-proximity-accelerator-design.md index 2d5b58a5..8fe0fbad 100644 --- a/docs/superpowers/specs/2026-08-30-native-turboquant-proximity-accelerator-design.md +++ b/docs/superpowers/specs/2026-08-30-native-turboquant-proximity-accelerator-design.md @@ -504,12 +504,29 @@ The transform is applied to the query once per search. Search precomputes order. It also computes L2 `query_norm_squared` from the prepared query with the canonical scalar accumulation. -For one encoded vector: +For one encoded vector, define the ordered reconstructed-direction dot product: ```text -approx_dot = stored_norm * - sum_i(transformed_query_i * reconstructed_centroid[code_i] - / sqrt(dimensions)) +reconstructed_unit_dot = + sum_i(transformed_query_i * reconstructed_centroid[code_i] + / sqrt(dimensions)) +``` + +The scalar Lloyd–Max reconstruction is not exactly unit length. For cosine and +inner product, project that reconstruction back onto the unit sphere before +scoring. This is a Prolly routing correction layered on the unchanged +TurboQuant-MSE encoding: the persisted `stored_norm` already carries the exact +source magnitude, so allowing codebook norm drift to change magnitude twice is +incorrect and measurably harms candidate recall. Cosine preparation normalizes +both source and query and therefore omits `stored_norm`; inner product restores +it after the direction correction: + +```text +reconstructed_unit_norm_squared = + sum_i((reconstructed_centroid[code_i] / sqrt(dimensions))^2) +approx_direction_dot = + reconstructed_unit_dot / sqrt(reconstructed_unit_norm_squared) +approx_inner_product_dot = stored_norm * approx_direction_dot ``` Products are generated in coordinate order and reduced in canonical scalar @@ -517,14 +534,30 @@ Products are generated in coordinate order and reduced in canonical scalar reduction must remain scalar and ordered, matching the existing deterministic SIMD strategy. +L2 retains the MSE reconstruction itself rather than the spherical projection. Metric scores are: ```text -L2Squared = query_norm_squared + stored_norm^2 - 2 * approx_dot -Cosine = 1 - clamp(approx_dot, -1, 1) -InnerProduct = -approx_dot +L2Squared = query_norm_squared + + stored_norm^2 * reconstructed_unit_norm_squared + - 2 * stored_norm * reconstructed_unit_dot +Cosine = 1 - clamp(approx_direction_dot, -1, 1) +InnerProduct = -approx_inner_product_dot ``` +The reconstruction norm is derived deterministically from the packed codes in +the same traversal as the dot product. It cannot be replaced by one for L2: a +particular Lloyd–Max reconstruction is not exactly unit length, and that +substitution would no longer rank by squared +distance to the reconstructed source vector. Implementations accumulate the +dot product and this norm in the same coordinate-ordered packed-code traversal; +they must not decode the complete code a second time. + +Cosine ignores the persisted original source norm, preserving invariance under +positive source scaling, but it must normalize by the packed-code +reconstruction norm. Quantization does not produce an exactly unit-length +reconstruction, so omitting this divisor does not compute cosine distance. + Small negative L2 estimates caused by approximation or rounding are clamped to positive zero for candidate ordering. This clamp affects routing only. @@ -687,8 +720,21 @@ per coordinate per round, plus one standard-normal scaling multiplication. `max_temporary_bytes` includes the derived transform plan, every worker's two `dimensions * 8` transform buffers, bounded key/code batch output, ordered -reassembly state, and statistics. The builder computes a conservative checked -upper bound before starting workers and tracks the actual peak at or below it. +reassembly state, and the code tree builder's current hierarchy, pending +publication payload, and transient raw/encoded node overlap. The builder +computes a conservative checked upper bound before starting workers and tracks +the accounted peak at or below it. Payload accounting excludes allocator +metadata and provider-owned publication buffers. A bounded build publishes +completed code-tree nodes immediately so the pending publication payload +cannot grow with source cardinality. Unbounded builds cap code-tree publication +batches at 16 nodes so large-dimension leaves cannot turn a generic provider +batch setting into excessive process memory. + +Build statistics normalize worker scratch to one worker so parallelism does +not change their canonical logical counters. `peak_temporary_bytes` also +reflects the build limit and node-publication batch, however, and may therefore +differ between sync and async builds that use different publication batching; +limit enforcement always accounts for every requested worker. Parallel construction assigns contiguous key-ordered batches to workers. Results are committed only in batch sequence order. If several records fail, @@ -1005,6 +1051,14 @@ store, and WASM smoke coverage. Every row records: Raw rows are retained under `performance-results/proximity-turboquant/`. Absolute latency is evidence, not a portable correctness claim. +The brute-force recall oracle is an authoritative exact ProximityMap search +over the persisted canonical vectors, using the same deterministic scalar +metric implementation, filter, `k`, and `(exact_score, key)` ordering as +reranking. It must not independently rescore the pre-ingestion input vectors +or use platform `sqrt`: cosine ingestion projects vectors to a canonical +fixed point, and a mathematically equivalent raw-vector formula can produce a +different order when exact distances are separated only by rounding noise. + ## GA Acceptance Gates Every item is mandatory unless explicitly scoped to `Auto` qualification. diff --git a/docs/wire-format.md b/docs/wire-format.md index 6e50ca4c..bd708a4b 100644 --- a/docs/wire-format.md +++ b/docs/wire-format.md @@ -127,6 +127,7 @@ bad ordering/counts/references, unsupported encodings, and trailing bytes. | `PRXV` | external vector | current vector encoding and components | | `PQS8` | local scalar quantizer | dimensions/grouping/count, scales, signed codes, maximum error | | `PQPQ` | product-quantization manifest | source PRXI, metric/config, code-tree root, codebooks, quality | +| `TQTQ` | TurboQuant-MSE manifest | source PRXI, dimension/metric/count, bit width/rerank/seed, frozen transform and codebook IDs, code-tree root, routing reconstruction quality, zero-vector count, configuration fingerprint | | `HNSW` | HNSW manifest | source PRXI, metric/config/fingerprint, graph root, entry point, level, canonical flag | | `HNSN` | HNSW graph value | level and key-sorted neighbors by layer | | `CRMF` | typed content-root manifest | typed CID, optional PRXN dimensions, logical version/time, sorted metadata | @@ -137,8 +138,15 @@ CIDs use explicit tags. The descriptor commits Euclidean-radius rounding and metric normalization policies, preventing a reader from interpreting bounds under different math. -Search policies, budgets, async settings, query kernels, and caches are runtime -only. PQ and HNSW have independent manifests because they are rebuildable -source-bound accelerators. Frozen exact bytes and CIDs are maintained in -`conformance/proximity-fixtures.json`; legacy canonical fixtures are -test-only rejection inputs. +TurboQuant code-tree values contain one canonical finite nonnegative `f64-le` +norm followed by exactly `ceil(dimensions * bit_width / 8)` bytes of packed +little-endian centroid indices. Supported dimensions are divisible by eight, +so persisted production codes have no unused tail bits; the decoder still +rejects nonzero padding in bounded codec tests. A zero norm requires positive +zero and all-zero codes. + +Search policies, budgets, async settings, query kernels, transform-plan caches, +and worker counts are runtime only. PQ, TurboQuant, and HNSW have independent +manifests because they are rebuildable source-bound accelerators. Frozen exact +bytes and CIDs are maintained in `conformance/proximity-fixtures.json`; legacy +canonical fixtures are test-only rejection inputs. diff --git a/extensions/dynamodb/admin/Cargo.lock b/extensions/dynamodb/admin/Cargo.lock index 39fc1820..fe2638fd 100644 --- a/extensions/dynamodb/admin/Cargo.lock +++ b/extensions/dynamodb/admin/Cargo.lock @@ -1585,7 +1585,7 @@ dependencies = [ [[package]] name = "prolly-map" -version = "0.7.0" +version = "0.7.2" dependencies = [ "futures-util", "js-sys", @@ -1601,7 +1601,7 @@ dependencies = [ [[package]] name = "prolly-store-dynamodb" -version = "0.6.0" +version = "0.6.1" dependencies = [ "aws-credential-types", "aws-lc-rs", diff --git a/extensions/dynamodb/client/Cargo.lock b/extensions/dynamodb/client/Cargo.lock index 1632fcf7..3fb1a87b 100644 --- a/extensions/dynamodb/client/Cargo.lock +++ b/extensions/dynamodb/client/Cargo.lock @@ -1450,7 +1450,7 @@ dependencies = [ [[package]] name = "prolly-map" -version = "0.7.0" +version = "0.7.2" dependencies = [ "futures-util", "js-sys", @@ -1466,7 +1466,7 @@ dependencies = [ [[package]] name = "prolly-store-dynamodb" -version = "0.6.0" +version = "0.6.1" dependencies = [ "aws-credential-types", "aws-lc-rs", diff --git a/extensions/dynamodb/client/src/client.rs b/extensions/dynamodb/client/src/client.rs index 8f979ce0..b60780a2 100644 --- a/extensions/dynamodb/client/src/client.rs +++ b/extensions/dynamodb/client/src/client.rs @@ -4,9 +4,8 @@ use std::sync::Arc; use prolly::{ProllyCacheUsage, RemoteProllyStore, RemoteStoreConfig}; use prolly_dynamodb_core::{ BulkImportOptions, BulkImportResult, Clock, Database, IdGenerator, ImportAuditRecord, - ImportPlanId, KeyAttribute, LargeValueConfig, - MaintenanceContext, MaintenanceLease, MaintenanceLeaseId, MaintenanceLeaseRelease, - StoragePublicationMode, + ImportPlanId, KeyAttribute, LargeValueConfig, MaintenanceContext, MaintenanceLease, + MaintenanceLeaseId, MaintenanceLeaseRelease, StoragePublicationMode, }; use prolly_store_dynamodb::{ dynamodb_safe_config, DynamoDbBackend, DynamoDbStore, TransactionPublicationMode, diff --git a/extensions/dynamodb/client/src/lib.rs b/extensions/dynamodb/client/src/lib.rs index a9f22c36..3040eee3 100644 --- a/extensions/dynamodb/client/src/lib.rs +++ b/extensions/dynamodb/client/src/lib.rs @@ -23,21 +23,20 @@ pub use gc::{ pub use metadata::{TableTransitionMetadata, WithMetadata}; pub use prolly_dynamodb_core::{ BulkImportOptions, BulkImportResult, CommitId, ImportAuditRecord, ImportPlan, ImportPlanId, - ImportResult, LargeWriteOptions, - IndexReconfigurationAuditRecord, IndexReconfigurationPlan, IndexReconfigurationPlanId, - IndexReconfigurationResult, KeyAttribute, KeyKind, MaintenanceContext, MaintenanceLease, - MaintenanceLeaseId, MaintenanceLeaseRelease, RetentionAuditRecord, RetentionPlan, - RetentionPlanId, RetentionPolicy, RetentionResult, SecondaryIndexDefinition, - SecondaryIndexKind, SecondaryIndexProjection, TableArchive, TableArchiveBlob, - TableArchiveLimits, TableArchiveSummary, TableCommit, TableCommitPage, - TransactWriteResult as Commit, WorkerCheckpoint, WorkerJobId, WorkerKind, WorkerLease, - WorkerLeaseRelease, WorkerProgress, DEFAULT_LOGICAL_RETRY_LIMIT, MAX_GC_PLAN_DELETES, - MAX_LOGICAL_RETRY_LIMIT, MAX_MAINTENANCE_LEASE_MILLIS, MAX_RETENTION_PROTECTED_VERSIONS, - MAX_RETENTION_REMOVALS, MAX_WORKER_LEASE_MILLIS, MIN_MAINTENANCE_LEASE_MILLIS, - MIN_WORKER_LEASE_MILLIS, TABLE_ARCHIVE_FORMAT_VERSION, DEFAULT_BULK_IMPORT_MAX_BYTES, + ImportResult, IndexReconfigurationAuditRecord, IndexReconfigurationPlan, + IndexReconfigurationPlanId, IndexReconfigurationResult, KeyAttribute, KeyKind, + LargeWriteOptions, MaintenanceContext, MaintenanceLease, MaintenanceLeaseId, + MaintenanceLeaseRelease, RetentionAuditRecord, RetentionPlan, RetentionPlanId, RetentionPolicy, + RetentionResult, SecondaryIndexDefinition, SecondaryIndexKind, SecondaryIndexProjection, + TableArchive, TableArchiveBlob, TableArchiveLimits, TableArchiveSummary, TableCommit, + TableCommitPage, TransactWriteResult as Commit, WorkerCheckpoint, WorkerJobId, WorkerKind, + WorkerLease, WorkerLeaseRelease, WorkerProgress, DEFAULT_BULK_IMPORT_MAX_BYTES, DEFAULT_BULK_IMPORT_MAX_ITEMS, DEFAULT_IMMUTABLE_UPLOAD_PARALLELISM, - DEFAULT_LARGE_WRITE_MAX_BYTES, DEFAULT_LARGE_WRITE_MAX_ITEMS, - MAX_IMMUTABLE_UPLOAD_PARALLELISM, + DEFAULT_LARGE_WRITE_MAX_BYTES, DEFAULT_LARGE_WRITE_MAX_ITEMS, DEFAULT_LOGICAL_RETRY_LIMIT, + MAX_GC_PLAN_DELETES, MAX_IMMUTABLE_UPLOAD_PARALLELISM, MAX_LOGICAL_RETRY_LIMIT, + MAX_MAINTENANCE_LEASE_MILLIS, MAX_RETENTION_PROTECTED_VERSIONS, MAX_RETENTION_REMOVALS, + MAX_WORKER_LEASE_MILLIS, MIN_MAINTENANCE_LEASE_MILLIS, MIN_WORKER_LEASE_MILLIS, + TABLE_ARCHIVE_FORMAT_VERSION, }; pub use table::{ ConditionalTable, DiffPaginator, Import, Indexes, Restore, RetentionPlanner, Snapshot, Table, diff --git a/extensions/dynamodb/client/tests/fluent_compile.rs b/extensions/dynamodb/client/tests/fluent_compile.rs index c5334fdc..36262c61 100644 --- a/extensions/dynamodb/client/tests/fluent_compile.rs +++ b/extensions/dynamodb/client/tests/fluent_compile.rs @@ -10,10 +10,10 @@ use aws_sdk_dynamodb::types::{ }; use prolly::MapVersionId; use prolly_dynamodb_client::{ - BulkImportOptions, Client, IndexReconfigurationPlan, KeyAttribute, KeyKind, - LargeWriteOptions, MaintenanceContext, RetentionPolicy, SecondaryIndexDefinition, - SecondaryIndexKind, SecondaryIndexProjection, StreamWorkerOptions, TableArchive, - TableArchiveLimits, TtlWorkerOptions, + BulkImportOptions, Client, IndexReconfigurationPlan, KeyAttribute, KeyKind, LargeWriteOptions, + MaintenanceContext, RetentionPolicy, SecondaryIndexDefinition, SecondaryIndexKind, + SecondaryIndexProjection, StreamWorkerOptions, TableArchive, TableArchiveLimits, + TtlWorkerOptions, }; #[allow(dead_code)] @@ -210,8 +210,8 @@ fn advertised_fluent_chains_compile( .request_token("large-write"); session .put(HashMap::from([( - "accountId".into(), - AttributeValue::S("acct-bulk".into()), + "accountId".into(), + AttributeValue::S("acct-bulk".into()), )])) .unwrap(); assert_send(session.commit()); diff --git a/extensions/dynamodb/core/Cargo.lock b/extensions/dynamodb/core/Cargo.lock index 1c90c8b6..7b4cd54d 100644 --- a/extensions/dynamodb/core/Cargo.lock +++ b/extensions/dynamodb/core/Cargo.lock @@ -340,7 +340,7 @@ dependencies = [ [[package]] name = "prolly-map" -version = "0.7.0" +version = "0.7.2" dependencies = [ "futures-util", "js-sys", diff --git a/extensions/dynamodb/core/src/database.rs b/extensions/dynamodb/core/src/database.rs index 768c76c5..ad972944 100644 --- a/extensions/dynamodb/core/src/database.rs +++ b/extensions/dynamodb/core/src/database.rs @@ -756,6 +756,14 @@ impl LargeWriteOptions { } } +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +struct TransactionLimits<'a> { + max_items: usize, + max_logical_bytes: usize, + blob_upload_parallelism: usize, + operation: &'a str, +} + impl TransactWriteAction { pub fn table_name(&self) -> &str { match self { @@ -2653,10 +2661,7 @@ where root_names.push(COMMIT_CATALOG_ROOT_NAME); root_names.extend(log_names.iter().map(Vec::as_slice)); let mut roots = tx.load_named_roots_ordered(&root_names).await?.into_iter(); - let commit_catalog = roots - .next() - .flatten() - .unwrap_or_else(|| tx.create()); + let commit_catalog = roots.next().flatten().unwrap_or_else(|| tx.create()); if tx .get(&commit_catalog, &result.commit_id.0) .await? @@ -3285,14 +3290,10 @@ where }; description.validate()?; - let mut base = AsyncSortedBatchBuilder::new( - self.engine.store().clone(), - self.engine.config().clone(), - ); - let mut index_source = AsyncSortedBatchBuilder::new( - self.engine.store().clone(), - self.engine.config().clone(), - ); + let mut base = + AsyncSortedBatchBuilder::new(self.engine.store().clone(), self.engine.config().clone()); + let mut index_source = + AsyncSortedBatchBuilder::new(self.engine.store().clone(), self.engine.config().clone()); let mut previous_key: Option> = None; let mut item_count = 0usize; let mut logical_bytes = 0usize; @@ -3303,25 +3304,26 @@ where .map(move |item| async move { let item = item?; let item_bytes = item_size(&item)?; - let key = encode_primary_key( - bulk_description, - &key_from_item(bulk_description, &item)?, - )?; + let key = + encode_primary_key(bulk_description, &key_from_item(bulk_description, &item)?)?; let stored = bulk_blobs.prepare(encode_item(&item)?).await?; let blob = match ValueRef::from_stored_bytes(&stored)? { ValueRef::Blob(reference) => Some(reference), ValueRef::Inline(_) => None, }; - let indexed = - prepare_index_source_record(bulk_description, &item, stored.clone(), bulk_blobs) - .await?; + let indexed = prepare_index_source_record( + bulk_description, + &item, + stored.clone(), + bulk_blobs, + ) + .await?; Ok::<_, Error>((item_bytes, key, stored, indexed, blob)) }) // Preserve sorted source order while overlapping independent // content-addressed blob uploads. .buffered(options.blob_upload_parallelism); - while let Some((item_bytes, key, stored, indexed, blob)) = - prepared_items.try_next().await? + while let Some((item_bytes, key, stored, indexed, blob)) = prepared_items.try_next().await? { item_count = item_count .checked_add(1) @@ -3341,7 +3343,10 @@ where options.max_logical_bytes ))); } - if previous_key.as_ref().is_some_and(|previous| key <= *previous) { + if previous_key + .as_ref() + .is_some_and(|previous| key <= *previous) + { return Err(Error::Validation( "bulk import items must have strictly increasing primary keys".into(), )); @@ -3401,7 +3406,9 @@ where tx.rollback(); return Err(Error::ConflictExhausted); } - let table_map = self.engine.versioned_map(Self::table_map_id(&description.id)); + let table_map = self + .engine + .versioned_map(Self::table_map_id(&description.id)); tx.publish_named_root_at_millis( &table_map.version_root_name(&version), &base, @@ -4584,10 +4591,12 @@ where actions, client_request_token, expected_heads, - MAX_TRANSACTION_ITEMS, - MAX_TRANSACTION_BYTES, - DEFAULT_IMMUTABLE_UPLOAD_PARALLELISM, - "TransactWriteItems", + TransactionLimits { + max_items: MAX_TRANSACTION_ITEMS, + max_logical_bytes: MAX_TRANSACTION_BYTES, + blob_upload_parallelism: DEFAULT_IMMUTABLE_UPLOAD_PARALLELISM, + operation: "TransactWriteItems", + }, ) .await } @@ -4612,10 +4621,12 @@ where actions, client_request_token, expected_heads, - options.max_items, - options.max_logical_bytes, - options.blob_upload_parallelism, - "large write", + TransactionLimits { + max_items: options.max_items, + max_logical_bytes: options.max_logical_bytes, + blob_upload_parallelism: options.blob_upload_parallelism, + operation: "large write", + }, ) .await } @@ -4625,14 +4636,12 @@ where actions: Vec, client_request_token: Option<&str>, expected_heads: &BTreeMap, - max_items: usize, - max_logical_bytes: usize, - blob_upload_parallelism: usize, - operation: &str, + limits: TransactionLimits<'_>, ) -> Result { - if actions.is_empty() || actions.len() > max_items { + if actions.is_empty() || actions.len() > limits.max_items { return Err(Error::Validation(format!( - "{operation} requires 1..={max_items} actions" + "{} requires 1..={} actions", + limits.operation, limits.max_items ))); } validate_client_request_token(client_request_token)?; @@ -4775,8 +4784,8 @@ where // image. Avoid one tree/blob read per action; batch mutation // and index maintenance remain authoritative for replacement // and deletion semantics. - let needs_old_item = condition.is_some() - || matches!(action, TransactWriteAction::Update { .. }); + let needs_old_item = + condition.is_some() || matches!(action, TransactWriteAction::Update { .. }); let old_item = match needs_old_item { true => match maps.get(&map_id, &encoded_key).await? { Some(bytes) => Some(decode_item(&self.blobs.resolve(&bytes).await?)?), @@ -4825,9 +4834,10 @@ where transaction_bytes = transaction_bytes .checked_add(logical_bytes) .ok_or_else(|| Error::Validation("transaction item size overflow".into()))?; - if transaction_bytes > max_logical_bytes { + if transaction_bytes > limits.max_logical_bytes { return Err(Error::Validation(format!( - "{operation} aggregate item size exceeds {max_logical_bytes} bytes" + "{} aggregate item size exceeds {} bytes", + limits.operation, limits.max_logical_bytes ))); } if let Some(mutation) = mutation { @@ -4873,33 +4883,33 @@ where let prepared_pairs = stream::iter(mutations) .map(|mutation| async move { Ok::<_, Error>(match mutation { - PendingMutation::Upsert { key, item } => { - let stored_item = self.blobs.prepare(encode_item(&item)?).await?; - let index_source = prepare_index_source_record( - description, - &item, - stored_item.clone(), - &self.blobs, - ) - .await?; - ( - Mutation::Upsert { - key: key.clone(), - val: stored_item, - }, - Mutation::Upsert { - key, - val: index_source, - }, - ) - } - PendingMutation::Delete { key } => ( - Mutation::Delete { key: key.clone() }, - Mutation::Delete { key }, - ), - }) + PendingMutation::Upsert { key, item } => { + let stored_item = self.blobs.prepare(encode_item(&item)?).await?; + let index_source = prepare_index_source_record( + description, + &item, + stored_item.clone(), + &self.blobs, + ) + .await?; + ( + Mutation::Upsert { + key: key.clone(), + val: stored_item, + }, + Mutation::Upsert { + key, + val: index_source, + }, + ) + } + PendingMutation::Delete { key } => ( + Mutation::Delete { key: key.clone() }, + Mutation::Delete { key }, + ), + }) }) - .buffer_unordered(blob_upload_parallelism) + .buffer_unordered(limits.blob_upload_parallelism) .try_collect::>() .await?; let (prepared, indexed_mutations): (Vec<_>, Vec<_>) = diff --git a/extensions/dynamodb/core/src/lib.rs b/extensions/dynamodb/core/src/lib.rs index 572a2555..9be7b442 100644 --- a/extensions/dynamodb/core/src/lib.rs +++ b/extensions/dynamodb/core/src/lib.rs @@ -11,28 +11,27 @@ mod model; pub use blob::{BlobFuture, BlobStorage, InlineBlobStorage}; pub use database::{ - BatchGetResult, BatchGetTableRequest, BatchGetTableResult, BatchWriteAction, BulkImportOptions, - BulkImportResult, - BatchWriteExecutionError, BatchWriteResult, BatchWriteTransition, Clock, CommitId, Database, - GcExecutionRecord, GcExecutionResult, GcExecutionState, IdGenerator, ImportAuditRecord, - ImportPlan, ImportPlanId, ImportResult, IndexQueryRequest, IndexReadPage, LargeWriteOptions, - IndexReconfigurationAuditRecord, IndexReconfigurationPlan, IndexReconfigurationPlanId, - IndexReconfigurationResult, ItemRead, ItemUpdate, ItemWrite, MaintenanceContext, - MaintenanceLease, MaintenanceLeaseId, MaintenanceLeaseRelease, ReadPage, RestoreResult, - RetentionAuditRecord, RetentionPlan, RetentionPlanId, RetentionPolicy, RetentionResult, - SystemClock, SystemIdGenerator, TableCommit, TableCommitPage, TableLifecycleResult, - TransactGetRequest, TransactGetResponse, TransactGetResult, TransactWriteAction, - TransactWriteResult, TransactionCancellationCode, TransactionCancellationReason, - TransactionTableTransition, TtlCandidate, TtlCandidatePage, WorkerCheckpoint, WorkerJobId, - WorkerKind, WorkerLease, WorkerLeaseRelease, WorkerProgress, DEFAULT_LOGICAL_RETRY_LIMIT, - MAX_BATCH_GET_ITEMS, MAX_BATCH_GET_PARTITION_BYTES, MAX_BATCH_GET_RESPONSE_BYTES, - MAX_BATCH_WRITE_ITEMS, MAX_COLLECTED_DIFF_ITEMS, MAX_COLLECTED_VERSIONS, MAX_COMMIT_PAGE_ITEMS, - MAX_DIFF_PAGE_ITEMS, MAX_GC_PLAN_DELETES, MAX_LOGICAL_RETRY_LIMIT, - MAX_MAINTENANCE_LEASE_MILLIS, MAX_RETENTION_PROTECTED_VERSIONS, MAX_RETENTION_REMOVALS, + BatchGetResult, BatchGetTableRequest, BatchGetTableResult, BatchWriteAction, + BatchWriteExecutionError, BatchWriteResult, BatchWriteTransition, BulkImportOptions, + BulkImportResult, Clock, CommitId, Database, GcExecutionRecord, GcExecutionResult, + GcExecutionState, IdGenerator, ImportAuditRecord, ImportPlan, ImportPlanId, ImportResult, + IndexQueryRequest, IndexReadPage, IndexReconfigurationAuditRecord, IndexReconfigurationPlan, + IndexReconfigurationPlanId, IndexReconfigurationResult, ItemRead, ItemUpdate, ItemWrite, + LargeWriteOptions, MaintenanceContext, MaintenanceLease, MaintenanceLeaseId, + MaintenanceLeaseRelease, ReadPage, RestoreResult, RetentionAuditRecord, RetentionPlan, + RetentionPlanId, RetentionPolicy, RetentionResult, SystemClock, SystemIdGenerator, TableCommit, + TableCommitPage, TableLifecycleResult, TransactGetRequest, TransactGetResponse, + TransactGetResult, TransactWriteAction, TransactWriteResult, TransactionCancellationCode, + TransactionCancellationReason, TransactionTableTransition, TtlCandidate, TtlCandidatePage, + WorkerCheckpoint, WorkerJobId, WorkerKind, WorkerLease, WorkerLeaseRelease, WorkerProgress, DEFAULT_BULK_IMPORT_MAX_BYTES, DEFAULT_BULK_IMPORT_MAX_ITEMS, DEFAULT_IMMUTABLE_UPLOAD_PARALLELISM, DEFAULT_LARGE_WRITE_MAX_BYTES, - DEFAULT_LARGE_WRITE_MAX_ITEMS, MAX_IMMUTABLE_UPLOAD_PARALLELISM, MAX_TRANSACTION_BYTES, - MAX_TRANSACTION_ITEMS, MAX_VERSION_PAGE_ITEMS, MAX_WORKER_LEASE_MILLIS, + DEFAULT_LARGE_WRITE_MAX_ITEMS, DEFAULT_LOGICAL_RETRY_LIMIT, MAX_BATCH_GET_ITEMS, + MAX_BATCH_GET_PARTITION_BYTES, MAX_BATCH_GET_RESPONSE_BYTES, MAX_BATCH_WRITE_ITEMS, + MAX_COLLECTED_DIFF_ITEMS, MAX_COLLECTED_VERSIONS, MAX_COMMIT_PAGE_ITEMS, MAX_DIFF_PAGE_ITEMS, + MAX_GC_PLAN_DELETES, MAX_IMMUTABLE_UPLOAD_PARALLELISM, MAX_LOGICAL_RETRY_LIMIT, + MAX_MAINTENANCE_LEASE_MILLIS, MAX_RETENTION_PROTECTED_VERSIONS, MAX_RETENTION_REMOVALS, + MAX_TRANSACTION_BYTES, MAX_TRANSACTION_ITEMS, MAX_VERSION_PAGE_ITEMS, MAX_WORKER_LEASE_MILLIS, MIN_MAINTENANCE_LEASE_MILLIS, MIN_WORKER_LEASE_MILLIS, TTL_MAX_PAST_SECONDS, }; pub use error::{Error, Result}; diff --git a/extensions/dynamodb/core/tests/core_contract.rs b/extensions/dynamodb/core/tests/core_contract.rs index 6c869208..563d1930 100644 --- a/extensions/dynamodb/core/tests/core_contract.rs +++ b/extensions/dynamodb/core/tests/core_contract.rs @@ -17,9 +17,9 @@ use prolly_dynamodb_core::{ BlobFuture, BlobStorage, BulkImportOptions, Clock, Condition, Database, DatabaseFormatRecord, DynamoNumber, IdGenerator, IndexQueryRequest, Item, KeyAttribute, KeyCondition, KeyKind, LargeValueConfig, LargeWriteOptions, MaintenanceContext, Result, RetentionPolicy, - SecondaryIndexDefinition, SecondaryIndexKind, SecondaryIndexProjection, - StoragePublicationMode, TableArchive, TableArchiveLimits, TableId, TransactGetRequest, - TransactWriteAction, TransactionCancellationCode, + SecondaryIndexDefinition, SecondaryIndexKind, SecondaryIndexProjection, StoragePublicationMode, + TableArchive, TableArchiveLimits, TableId, TransactGetRequest, TransactWriteAction, + TransactionCancellationCode, }; #[test] @@ -109,10 +109,7 @@ fn explicit_large_write_exceeds_aws_action_limit_in_one_commit() { let actions = (0..101) .map(|index| TransactWriteAction::Put { table_name: "Large".into(), - item: Item::from([( - "id".into(), - AttributeValue::S(format!("{index:08}")), - )]), + item: Item::from([("id".into(), AttributeValue::S(format!("{index:08}")))]), condition: None, return_failure_old: false, }) diff --git a/extensions/s3/Cargo.lock b/extensions/s3/Cargo.lock index b96ed05a..b924e0f4 100644 --- a/extensions/s3/Cargo.lock +++ b/extensions/s3/Cargo.lock @@ -655,9 +655,9 @@ checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" [[package]] name = "chacha20" -version = "0.10.1" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d524456ba66e72eb8b115ff89e01e497f8e6d11d78b70b1aa13c0fbd97540a81" +checksum = "65c35e4b699c7e15ccbe7ee35c005e4fc0a278d22238a2857e6ce2dadeda1b06" dependencies = [ "cfg-if", "cpufeatures 0.3.0", @@ -943,7 +943,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] @@ -1236,9 +1236,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.4.15" +version = "0.4.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6cb093c84e8bd9b188d4c4a8cb6579fc016968d14c99882163cd3ff402a4f155" +checksum = "a9f37a958b41b3b19ee2707c06439c0e9e547e847223eb791ecb0cb821c65e27" dependencies = [ "atomic-waker", "bytes", @@ -1964,7 +1964,7 @@ dependencies = [ [[package]] name = "prolly-map" -version = "0.7.0" +version = "0.7.2" dependencies = [ "futures-util", "js-sys", @@ -2220,7 +2220,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys", - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] @@ -2581,10 +2581,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd" dependencies = [ "fastrand", - "getrandom 0.4.3", + "getrandom 0.3.4", "once_cell", "rustix", - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] diff --git a/extensions/s3/qualification/downstream-client/Cargo.lock b/extensions/s3/qualification/downstream-client/Cargo.lock index bb3187e1..8556cfed 100644 --- a/extensions/s3/qualification/downstream-client/Cargo.lock +++ b/extensions/s3/qualification/downstream-client/Cargo.lock @@ -517,9 +517,9 @@ checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" [[package]] name = "chacha20" -version = "0.10.1" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d524456ba66e72eb8b115ff89e01e497f8e6d11d78b70b1aa13c0fbd97540a81" +checksum = "65c35e4b699c7e15ccbe7ee35c005e4fc0a278d22238a2857e6ce2dadeda1b06" dependencies = [ "cfg-if", "cpufeatures 0.3.0", @@ -805,7 +805,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] @@ -1098,9 +1098,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.4.15" +version = "0.4.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6cb093c84e8bd9b188d4c4a8cb6579fc016968d14c99882163cd3ff402a4f155" +checksum = "a9f37a958b41b3b19ee2707c06439c0e9e547e847223eb791ecb0cb821c65e27" dependencies = [ "atomic-waker", "bytes", @@ -2039,7 +2039,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys", - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] @@ -2370,7 +2370,7 @@ dependencies = [ "getrandom 0.4.3", "once_cell", "rustix", - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] diff --git a/fuzz/.gitignore b/fuzz/.gitignore new file mode 100644 index 00000000..f83457ae --- /dev/null +++ b/fuzz/.gitignore @@ -0,0 +1,4 @@ +artifacts/ +corpus/ +coverage/ +target/ diff --git a/fuzz/Cargo.lock b/fuzz/Cargo.lock new file mode 100644 index 00000000..4f7d3980 --- /dev/null +++ b/fuzz/Cargo.lock @@ -0,0 +1,495 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "arbitrary" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3d036a3c4ab069c7b410a2ce876bd74808d2d0888a82667669f8e783a898bf1" + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "bumpalo" +version = "3.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72f5acc6cb2ba439de613abc23857ec3d78374d8ed5ac84e9d11336e87da8649" + +[[package]] +name = "cc" +version = "1.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "005ec2760ca554fae18df7a11195552ec576cd665632a881bc011d5bb2fd4d80" +dependencies = [ + "find-msvc-tools", + "jobserver", + "libc", + "shlex", +] + +[[package]] +name = "cfg-if" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" + +[[package]] +name = "cpufeatures" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" +dependencies = [ + "libc", +] + +[[package]] +name = "crossbeam-deque" +version = "0.8.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "622f3fc73690be383c7214310406f28a90e6edeadc3cea882f9d71e495b9711a" +dependencies = [ + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc74980687109a3b14c72fd458107bf0baa1da1a1a805e178d15501ba9b86d9d" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a31eee39dddec8330830986fcd7625edb5a24ec90ea038215273bbc3adb08ac6" + +[[package]] +name = "crypto-common" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a" +dependencies = [ + "generic-array", + "typenum", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer", + "crypto-common", +] + +[[package]] +name = "either" +version = "1.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "252afb9ae5eaa683babdc6a068b3f5726eb19e05070c731f9b2a23a7c3e8ed34" + +[[package]] +name = "find-msvc-tools" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e0f1c7c3a72c66fd80abe965175f7523475c0489a87d3ff9d6e8c87d87a9d2d" + +[[package]] +name = "futures-core" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92d699e522242e69e3003b94ecc1f960f3a5e015aa7c5d7486e65ad01dd94f5e" + +[[package]] +name = "futures-macro" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fb9654ba8355388abeb8dcb4fc62f511300867002afc858860463bdd9fe0c44" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "futures-task" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd417de3d1d015fc3bfd2b1ea46dfc7bab72ef86f1cc7cc9c78e728b34a6d1fd" + +[[package]] +name = "futures-util" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d50a92467f8ba5dd6e3ee5d4bd04d73ab2e4e1c44474a0674821dfce14b79bc" +dependencies = [ + "futures-core", + "futures-macro", + "futures-task", + "pin-project-lite", + "slab", +] + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", +] + +[[package]] +name = "getrandom" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "300e883d756b2e4ec94e02791f39b04b522276138852cfc41d9fb7e904106099" +dependencies = [ + "cfg-if", + "libc", + "r-efi", +] + +[[package]] +name = "half" +version = "1.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b43ede17f21864e81be2fa654110bf1e793774238d86ef8555c37e6519c0403" + +[[package]] +name = "itoa" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" + +[[package]] +name = "jobserver" +version = "0.1.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c00acbd29eabad4a2392fa0e921c874934dbbf4194312ad20f04a0ed67a3cb3" +dependencies = [ + "getrandom", + "libc", +] + +[[package]] +name = "js-sys" +version = "0.3.105" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce57d20d1ea864ce2ac172ab472d409214f4fd359f0b2a2775abdf522e2af99e" +dependencies = [ + "cfg-if", + "futures-util", + "wasm-bindgen", +] + +[[package]] +name = "libc" +version = "0.2.189" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3eaf3ede3fee6db1a4c2ee091bf8a8b4dccdc6d17f656fb07896ee72867612f2" + +[[package]] +name = "libfuzzer-sys" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9fd2f41a1cba099f79a0b6b6c35656cf7c03351a7bae8ff0f28f25270f929d2" +dependencies = [ + "arbitrary", + "cc", +] + +[[package]] +name = "libmimalloc-sys" +version = "0.1.49" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a45a52f43e1c16f667ccfe4dd8c85b7f7c204fd5e3bf46c5b0db9a5c3c0b8e9" +dependencies = [ + "cc", +] + +[[package]] +name = "memchr" +version = "2.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98" + +[[package]] +name = "mimalloc" +version = "0.1.52" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d4139bb28d14ad1facf21d5eb8825051b326e172d216b39f6d31df53cc97862" +dependencies = [ + "libmimalloc-sys", +] + +[[package]] +name = "once_cell" +version = "1.21.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" + +[[package]] +name = "pin-project-lite" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" + +[[package]] +name = "proc-macro2" +version = "1.0.107" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "prolly-map" +version = "0.7.2" +dependencies = [ + "futures-util", + "js-sys", + "mimalloc", + "rayon", + "serde", + "serde_cbor", + "serde_json", + "sha2", + "xxhash-rust", +] + +[[package]] +name = "prolly-map-fuzz" +version = "0.0.0" +dependencies = [ + "libfuzzer-sys", + "prolly-map", +] + +[[package]] +name = "quote" +version = "1.0.47" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "r-efi" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" + +[[package]] +name = "rayon" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb39b166781f92d482534ef4b4b1b2568f42613b53e5b6c160e24cfbfa30926d" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22e18b0f0062d30d4230b2e85ff77fdfe4326feb054b9783a3460d8435c8ab91" +dependencies = [ + "crossbeam-deque", + "crossbeam-utils", +] + +[[package]] +name = "rustversion" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf54715a573b99ac80df0bc206da022bcd442c974952c7b9720069370852e21f" + +[[package]] +name = "serde" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4148590afebada386688f18773da617792bf2ef03ffc1e4cbd2b1d45b023e0ba" +dependencies = [ + "serde_core", + "serde_derive", +] + +[[package]] +name = "serde_cbor" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bef2ebfde456fb76bbcf9f59315333decc4fda0b2b44b420243c11e0f5ec1f5" +dependencies = [ + "half", + "serde", +] + +[[package]] +name = "serde_core" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67dca2c9c51e58a4791a4b1ed58308b39c64224d349a935ab5039aa360942a48" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_json" +version = "1.0.151" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c841b55ecdae098c80dcae9cf767f6f8a0c2cdb3416bbef72181df4d0fe73f14" +dependencies = [ + "itoa", + "memchr", + "serde", + "serde_core", + "zmij", +] + +[[package]] +name = "sha2" +version = "0.10.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", + "sha2-asm", +] + +[[package]] +name = "sha2-asm" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b845214d6175804686b2bd482bcffe96651bb2d1200742b712003504a2dac1ab" +dependencies = [ + "cc", +] + +[[package]] +name = "shlex" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8fadd59c855ef2080decdef8ff161eb6661b86933c9d82e5ba29dc602a55aba" + +[[package]] +name = "slab" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" + +[[package]] +name = "syn" +version = "3.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12df2e0110f65b775f769bb17ef989067a1d931b2eb822bd4346631eeada89f9" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "typenum" +version = "1.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6f5e870be6c3b371b77fe0ee0bafb859fa4964b4404c27de1d380043c4dda20" + +[[package]] +name = "unicode-ident" +version = "1.0.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" + +[[package]] +name = "version_check" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" + +[[package]] +name = "wasm-bindgen" +version = "0.2.128" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aecb87a33d3b0c5e3b7aa46336eaf486cffafbd281b195e4c8b80d50df2351bf" +dependencies = [ + "cfg-if", + "once_cell", + "rustversion", + "wasm-bindgen-macro", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.128" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a690d511e3c1a8b3a55e33511e3c2c00c78415cd23650f32b808627f5696b9ed" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.128" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "411e4887f0071ef2d2164a9d5fdf2d20efbef78fccd3a78b0c10a1dc5295e48a" +dependencies = [ + "bumpalo", + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.128" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81941cd78d0c92026c33e5e01312845a4cb1e9af3407f9134b100dd03144103e" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "xxhash-rust" +version = "0.8.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aee1b19627c7c60102ab80d3a9cbe18de90bfe03bfa6c3715447681f0e8c8af6" + +[[package]] +name = "zmij" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b" diff --git a/fuzz/Cargo.toml b/fuzz/Cargo.toml new file mode 100644 index 00000000..d2fda34c --- /dev/null +++ b/fuzz/Cargo.toml @@ -0,0 +1,26 @@ +[package] +name = "prolly-map-fuzz" +version = "0.0.0" +publish = false +edition = "2021" + +[package.metadata] +cargo-fuzz = true + +[dependencies] +libfuzzer-sys = "0.4" +prolly-map = { path = ".." } + +[[bin]] +name = "proximity_turboquant_decode" +path = "fuzz_targets/proximity_turboquant_decode.rs" +test = false +doc = false +bench = false + +[[bin]] +name = "proximity_turboquant_lifecycle" +path = "fuzz_targets/proximity_turboquant_lifecycle.rs" +test = false +doc = false +bench = false diff --git a/fuzz/README.md b/fuzz/README.md new file mode 100644 index 00000000..44b4763b --- /dev/null +++ b/fuzz/README.md @@ -0,0 +1,23 @@ +# Fuzzing + +The TurboQuant fuzz targets supplement the deterministic 10,000-case unit +smoke with coverage-guided execution through public production APIs. + +- `proximity_turboquant_decode` feeds at most 4 KiB of arbitrary bytes into + source-bound manifest loading and bounded typed-content traversal. +- `proximity_turboquant_lifecycle` constructs at most eight 64-dimensional + records, exercises every metric, bit width, and query kernel, then corrupts + one authenticated ordered node and requires a fresh reopen or verification + to fail closed. + +Run bounded local smoke coverage with: + +```sh +cargo +nightly fuzz run proximity_turboquant_decode -- \ + -runs=2048 -max_len=4096 -timeout=5 +cargo +nightly fuzz run proximity_turboquant_lifecycle -- \ + -runs=256 -max_len=1024 -timeout=5 +``` + +Long-running fuzz campaigns should retain corpora outside the repository and +must preserve the same target-side allocation and record-count bounds. diff --git a/fuzz/fuzz_targets/proximity_turboquant_decode.rs b/fuzz/fuzz_targets/proximity_turboquant_decode.rs new file mode 100644 index 00000000..6b062d0f --- /dev/null +++ b/fuzz/fuzz_targets/proximity_turboquant_decode.rs @@ -0,0 +1,27 @@ +#![no_main] + +use libfuzzer_sys::fuzz_target; +use prolly::{ + walk_content_graph, Cid, ContentGraphLimits, ContentObjectKind, MemStore, Store, + TurboQuantizer, TypedContentRoot, +}; +use std::sync::Arc; + +const MAX_INPUT_BYTES: usize = 4 * 1024; + +fuzz_target!(|input: &[u8]| { + let bytes = &input[..input.len().min(MAX_INPUT_BYTES)]; + let store = Arc::new(MemStore::new()); + let manifest = Cid::from_bytes(bytes); + Store::put(&store, manifest.as_bytes(), bytes).expect("in-memory publication"); + + let _ = TurboQuantizer::load(store.clone(), manifest.clone()); + let limits = ContentGraphLimits { + max_objects: 64, + max_depth: 16, + max_bytes: 4 * MAX_INPUT_BYTES, + max_references_per_object: 64, + }; + let root = TypedContentRoot::new(ContentObjectKind::TurboQuantization, manifest); + let _ = walk_content_graph(&store, &[root], &limits); +}); diff --git a/fuzz/fuzz_targets/proximity_turboquant_lifecycle.rs b/fuzz/fuzz_targets/proximity_turboquant_lifecycle.rs new file mode 100644 index 00000000..a19f55d7 --- /dev/null +++ b/fuzz/fuzz_targets/proximity_turboquant_lifecycle.rs @@ -0,0 +1,117 @@ +#![no_main] + +use libfuzzer_sys::fuzz_target; +use prolly::{ + walk_content_graph, BuildParallelism, ContentGraphLimits, ContentObjectKind, DistanceMetric, + MemStore, ProximityConfig, ProximityMap, ProximityRecord, QueryKernel, SearchBackend, + SearchPolicy, SearchRequest, Store, TurboQuantizationConfig, TurboQuantizer, TypedContentRoot, +}; +use std::sync::Arc; + +const DIMENSIONS: [usize; 5] = [8, 16, 24, 32, 64]; + +fn byte(input: &[u8], index: usize) -> u8 { + input[index % input.len()] +} + +fn component(input: &[u8], index: usize, first: bool) -> f32 { + let value = f32::from(byte(input, index) as i8) / 16.0; + if first { + value + 16.0 + } else { + value + } +} + +fuzz_target!(|input: &[u8]| { + if input.is_empty() { + return; + } + + let dimensions = DIMENSIONS[usize::from(byte(input, 0)) % DIMENSIONS.len()]; + let count = 1 + usize::from(byte(input, 1)) % 8; + let metric = match byte(input, 2) % 3 { + 0 => DistanceMetric::L2Squared, + 1 => DistanceMetric::Cosine, + _ => DistanceMetric::InnerProduct, + }; + let bit_width = 2 + byte(input, 3) % 3; + let mut seed_bytes = [0u8; 8]; + for (index, output) in seed_bytes.iter_mut().enumerate() { + *output = byte(input, 4 + index); + } + let seed = u64::from_le_bytes(seed_bytes); + + let records = (0..count) + .map(|record| ProximityRecord { + key: (record as u64).to_be_bytes().to_vec(), + vector: (0..dimensions) + .map(|dimension| { + component(input, 12 + record * dimensions + dimension, dimension == 0) + }) + .collect(), + value: vec![byte(input, 12 + count * dimensions + record)], + }) + .collect::>(); + + let store = Arc::new(MemStore::new()); + let mut map_config = ProximityConfig::new(dimensions as u32); + map_config.metric = metric; + let map = ProximityMap::build(store.clone(), map_config, records) + .expect("bounded generated source is valid"); + let config = TurboQuantizationConfig { + bit_width, + seed, + rerank_multiplier: u32::from(1 + byte(input, 11) % 16), + }; + let (index, _) = TurboQuantizer::build(&map, config, BuildParallelism::serial()) + .expect("bounded generated accelerator is valid"); + let verification = index.verify(&map).expect("fresh accelerator verifies"); + assert_eq!(verification.encoded_vectors, count as u64); + + let manifest = index.manifest_cid().clone(); + let reopened = + TurboQuantizer::load(store.clone(), manifest.clone()).expect("fresh accelerator reopens"); + let query = (0..dimensions) + .map(|dimension| component(input, 20 + count * dimensions + dimension, dimension == 0)) + .collect::>(); + let k = 1 + usize::from(byte(input, 19)) % count; + let mut request = SearchRequest::exact(&query, k); + request.policy = SearchPolicy::FixedBudget; + request.options.backend = SearchBackend::TurboQuantized; + request.kernel = match byte(input, 18) % 3 { + 0 => QueryKernel::ScalarDeterministic, + 1 => QueryKernel::SimdDeterministic, + _ => QueryKernel::AutoDeterministic, + }; + let result = reopened + .search(&map, request) + .expect("fresh accelerator searches"); + assert_eq!(result.neighbors.len(), k); + + let limits = ContentGraphLimits { + max_objects: 4_096, + max_depth: 64, + max_bytes: 16 * 1024 * 1024, + max_references_per_object: 4_096, + }; + let root = TypedContentRoot::new(ContentObjectKind::TurboQuantization, manifest.clone()); + let walk = walk_content_graph(&store, &[root], &limits).expect("fresh closure walks"); + let ordered = walk + .objects + .iter() + .filter(|object| object.root.kind == ContentObjectKind::OrderedNode) + .collect::>(); + let selected = ordered[usize::from(byte(input, 17)) % ordered.len()]; + let mut corrupted = selected.bytes.clone(); + let offset = usize::from(byte(input, 16)) % corrupted.len(); + corrupted[offset] ^= 1; + Store::put(&store, selected.root.cid.as_bytes(), &corrupted) + .expect("in-memory corruption injection"); + + let reopened_map = ProximityMap::load(store.clone(), map.tree().descriptor.clone()); + let reopened_index = TurboQuantizer::load(store.clone(), manifest); + if let (Ok(reopened_map), Ok(reopened_index)) = (reopened_map, reopened_index) { + assert!(reopened_index.verify(&reopened_map).is_err()); + } +}); diff --git a/performance-results/proximity-turboquant/dense-reference-2026-09-12-arm64.json b/performance-results/proximity-turboquant/dense-reference-2026-09-12-arm64.json new file mode 100644 index 00000000..6e832dc2 --- /dev/null +++ b/performance-results/proximity-turboquant/dense-reference-2026-09-12-arm64.json @@ -0,0 +1,474 @@ +{ + "algorithm": "Algorithm 1 dense i.i.d. Gaussian QR rotation compared with Prolly STRUCTURED_ROTATION_ID=1", + "elapsed_seconds": 7.12515133433044, + "environment": { + "logical_cpus": 12, + "machine": "arm64", + "numpy": "2.5.3", + "platform": "macOS-26.5.2-arm64-arm-64bit", + "processor": "arm", + "python": "3.12.13" + }, + "generator": { + "path": "scripts/turboquant_dense_reference.py", + "sha256": "c370cad5455cfce6d69621aca885d9f0d05dc7ad13d76a3c341b06174000ab32" + }, + "parameters": { + "dataset_rng": "NumPy PCG64", + "dense_matrix_rng": "NumPy PCG64", + "dense_qr_sign_rule": "multiply Q columns by sign(diag(R))", + "dimensions": [ + 128, + 200, + 768, + 1536, + 3072 + ], + "k": 10, + "queries": 32, + "records": 1024, + "rerank_multiplier": 8, + "seed": 0 + }, + "research_basis": "https://arxiv.org/abs/2504.19874", + "revision": "8a90bb970214d27811595a75db1b3bb0ba4721f9", + "rows": [ + { + "bit_width": 2, + "dense_gaussian_qr": { + "maximum_routing_mse": 0.1706700269509385, + "mean_norm_error": 6.700369425960417e-17, + "mean_routing_mse": 0.11573064610890721, + "recall_at_k": { + "cosine": 0.996875, + "inner_product": 1.0, + "l2": 1.0 + } + }, + "dense_qr_seconds": 0.0006560417823493481, + "dimensions": 128, + "k": 10, + "queries": 32, + "records": 1024, + "rerank_multiplier": 8, + "structured": { + "maximum_routing_mse": 0.18889520001132115, + "mean_norm_error": 9.963817965141786e-17, + "mean_routing_mse": 0.11649011624453778, + "recall_at_k": { + "cosine": 0.9906250000000001, + "inner_product": 0.984375, + "l2": 1.0 + } + } + }, + { + "bit_width": 3, + "dense_gaussian_qr": { + "maximum_routing_mse": 0.06920646111291749, + "mean_norm_error": 6.700369425960417e-17, + "mean_routing_mse": 0.0340012867475304, + "recall_at_k": { + "cosine": 1.0, + "inner_product": 1.0, + "l2": 1.0 + } + }, + "dense_qr_seconds": 0.0006560417823493481, + "dimensions": 128, + "k": 10, + "queries": 32, + "records": 1024, + "rerank_multiplier": 8, + "structured": { + "maximum_routing_mse": 0.07127063756987957, + "mean_norm_error": 9.963817965141786e-17, + "mean_routing_mse": 0.03417139121143275, + "recall_at_k": { + "cosine": 1.0, + "inner_product": 1.0, + "l2": 1.0 + } + } + }, + { + "bit_width": 4, + "dense_gaussian_qr": { + "maximum_routing_mse": 0.03435717810064062, + "mean_norm_error": 6.700369425960417e-17, + "mean_routing_mse": 0.00929183054339594, + "recall_at_k": { + "cosine": 1.0, + "inner_product": 1.0, + "l2": 1.0 + } + }, + "dense_qr_seconds": 0.0006560417823493481, + "dimensions": 128, + "k": 10, + "queries": 32, + "records": 1024, + "rerank_multiplier": 8, + "structured": { + "maximum_routing_mse": 0.027987520024129416, + "mean_norm_error": 9.963817965141786e-17, + "mean_routing_mse": 0.009414449019646876, + "recall_at_k": { + "cosine": 1.0, + "inner_product": 1.0, + "l2": 1.0 + } + } + }, + { + "bit_width": 2, + "dense_gaussian_qr": { + "maximum_routing_mse": 0.17268926559526598, + "mean_norm_error": 7.014788055981214e-17, + "mean_routing_mse": 0.11605108216263214, + "recall_at_k": { + "cosine": 0.996875, + "inner_product": 0.9906250000000001, + "l2": 1.0 + } + }, + "dense_qr_seconds": 0.0011445828713476658, + "dimensions": 200, + "k": 10, + "queries": 32, + "records": 1024, + "rerank_multiplier": 8, + "structured": { + "maximum_routing_mse": 0.16880762768140983, + "mean_norm_error": 8.933825901280557e-17, + "mean_routing_mse": 0.11652362465219643, + "recall_at_k": { + "cosine": 0.996875, + "inner_product": 0.996875, + "l2": 0.996875 + } + } + }, + { + "bit_width": 3, + "dense_gaussian_qr": { + "maximum_routing_mse": 0.06449017682881894, + "mean_norm_error": 7.014788055981214e-17, + "mean_routing_mse": 0.034106567253106825, + "recall_at_k": { + "cosine": 1.0, + "inner_product": 1.0, + "l2": 1.0 + } + }, + "dense_qr_seconds": 0.0011445828713476658, + "dimensions": 200, + "k": 10, + "queries": 32, + "records": 1024, + "rerank_multiplier": 8, + "structured": { + "maximum_routing_mse": 0.06063435132225647, + "mean_norm_error": 8.933825901280557e-17, + "mean_routing_mse": 0.03416101667698106, + "recall_at_k": { + "cosine": 1.0, + "inner_product": 1.0, + "l2": 1.0 + } + } + }, + { + "bit_width": 4, + "dense_gaussian_qr": { + "maximum_routing_mse": 0.022301138269532627, + "mean_norm_error": 7.014788055981214e-17, + "mean_routing_mse": 0.009359726215923287, + "recall_at_k": { + "cosine": 1.0, + "inner_product": 1.0, + "l2": 1.0 + } + }, + "dense_qr_seconds": 0.0011445828713476658, + "dimensions": 200, + "k": 10, + "queries": 32, + "records": 1024, + "rerank_multiplier": 8, + "structured": { + "maximum_routing_mse": 0.025342256283560315, + "mean_norm_error": 8.933825901280557e-17, + "mean_routing_mse": 0.009394470600496873, + "recall_at_k": { + "cosine": 1.0, + "inner_product": 1.0, + "l2": 1.0 + } + } + }, + { + "bit_width": 2, + "dense_gaussian_qr": { + "maximum_routing_mse": 0.14718891884769256, + "mean_norm_error": 5.4643789493269423e-17, + "mean_routing_mse": 0.11685438757516828, + "recall_at_k": { + "cosine": 0.99375, + "inner_product": 0.99375, + "l2": 0.996875 + } + }, + "dense_qr_seconds": 0.025052750017493963, + "dimensions": 768, + "k": 10, + "queries": 32, + "records": 1024, + "rerank_multiplier": 8, + "structured": { + "maximum_routing_mse": 0.14415972751056322, + "mean_norm_error": 3.209238430557093e-17, + "mean_routing_mse": 0.11721714532715818, + "recall_at_k": { + "cosine": 1.0, + "inner_product": 0.996875, + "l2": 1.0 + } + } + }, + { + "bit_width": 3, + "dense_gaussian_qr": { + "maximum_routing_mse": 0.04709543899648814, + "mean_norm_error": 5.4643789493269423e-17, + "mean_routing_mse": 0.03430564197999451, + "recall_at_k": { + "cosine": 1.0, + "inner_product": 1.0, + "l2": 1.0 + } + }, + "dense_qr_seconds": 0.025052750017493963, + "dimensions": 768, + "k": 10, + "queries": 32, + "records": 1024, + "rerank_multiplier": 8, + "structured": { + "maximum_routing_mse": 0.046022711383771134, + "mean_norm_error": 3.209238430557093e-17, + "mean_routing_mse": 0.0344939085399639, + "recall_at_k": { + "cosine": 1.0, + "inner_product": 1.0, + "l2": 1.0 + } + } + }, + { + "bit_width": 4, + "dense_gaussian_qr": { + "maximum_routing_mse": 0.01770999799386992, + "mean_norm_error": 5.4643789493269423e-17, + "mean_routing_mse": 0.009438386920762105, + "recall_at_k": { + "cosine": 1.0, + "inner_product": 1.0, + "l2": 1.0 + } + }, + "dense_qr_seconds": 0.025052750017493963, + "dimensions": 768, + "k": 10, + "queries": 32, + "records": 1024, + "rerank_multiplier": 8, + "structured": { + "maximum_routing_mse": 0.014273307217716334, + "mean_norm_error": 3.209238430557093e-17, + "mean_routing_mse": 0.009459620892844259, + "recall_at_k": { + "cosine": 1.0, + "inner_product": 1.0, + "l2": 1.0 + } + } + }, + { + "bit_width": 2, + "dense_gaussian_qr": { + "maximum_routing_mse": 0.1355175941111022, + "mean_norm_error": 6.277530578691071e-17, + "mean_routing_mse": 0.11742721063758749, + "recall_at_k": { + "cosine": 1.0, + "inner_product": 1.0, + "l2": 1.0 + } + }, + "dense_qr_seconds": 0.17666150024160743, + "dimensions": 1536, + "k": 10, + "queries": 32, + "records": 1024, + "rerank_multiplier": 8, + "structured": { + "maximum_routing_mse": 0.1338478746342895, + "mean_norm_error": 1.0039712117215771e-16, + "mean_routing_mse": 0.11723808034410506, + "recall_at_k": { + "cosine": 0.99375, + "inner_product": 0.99375, + "l2": 1.0 + } + } + }, + { + "bit_width": 3, + "dense_gaussian_qr": { + "maximum_routing_mse": 0.04240905495272206, + "mean_norm_error": 6.277530578691071e-17, + "mean_routing_mse": 0.03440869761280467, + "recall_at_k": { + "cosine": 1.0, + "inner_product": 1.0, + "l2": 1.0 + } + }, + "dense_qr_seconds": 0.17666150024160743, + "dimensions": 1536, + "k": 10, + "queries": 32, + "records": 1024, + "rerank_multiplier": 8, + "structured": { + "maximum_routing_mse": 0.04302154433102805, + "mean_norm_error": 1.0039712117215771e-16, + "mean_routing_mse": 0.034500389876247414, + "recall_at_k": { + "cosine": 1.0, + "inner_product": 1.0, + "l2": 1.0 + } + } + }, + { + "bit_width": 4, + "dense_gaussian_qr": { + "maximum_routing_mse": 0.012969888472004549, + "mean_norm_error": 6.277530578691071e-17, + "mean_routing_mse": 0.00946251264561507, + "recall_at_k": { + "cosine": 1.0, + "inner_product": 1.0, + "l2": 1.0 + } + }, + "dense_qr_seconds": 0.17666150024160743, + "dimensions": 1536, + "k": 10, + "queries": 32, + "records": 1024, + "rerank_multiplier": 8, + "structured": { + "maximum_routing_mse": 0.012524315507508075, + "mean_norm_error": 1.0039712117215771e-16, + "mean_routing_mse": 0.00949163531909171, + "recall_at_k": { + "cosine": 1.0, + "inner_product": 1.0, + "l2": 1.0 + } + } + }, + { + "bit_width": 2, + "dense_gaussian_qr": { + "maximum_routing_mse": 0.12866334720927933, + "mean_norm_error": 5.312590645178972e-17, + "mean_routing_mse": 0.11738902891664077, + "recall_at_k": { + "cosine": 0.996875, + "inner_product": 0.996875, + "l2": 0.996875 + } + }, + "dense_qr_seconds": 1.2061929167248309, + "dimensions": 3072, + "k": 10, + "queries": 32, + "records": 1024, + "rerank_multiplier": 8, + "structured": { + "maximum_routing_mse": 0.1290763539963784, + "mean_norm_error": 3.176712365382528e-17, + "mean_routing_mse": 0.11743655893380933, + "recall_at_k": { + "cosine": 0.99375, + "inner_product": 0.99375, + "l2": 0.996875 + } + } + }, + { + "bit_width": 3, + "dense_gaussian_qr": { + "maximum_routing_mse": 0.03962099950732533, + "mean_norm_error": 5.312590645178972e-17, + "mean_routing_mse": 0.03448202927104403, + "recall_at_k": { + "cosine": 1.0, + "inner_product": 1.0, + "l2": 1.0 + } + }, + "dense_qr_seconds": 1.2061929167248309, + "dimensions": 3072, + "k": 10, + "queries": 32, + "records": 1024, + "rerank_multiplier": 8, + "structured": { + "maximum_routing_mse": 0.03923111137358158, + "mean_norm_error": 3.176712365382528e-17, + "mean_routing_mse": 0.034561884595446936, + "recall_at_k": { + "cosine": 1.0, + "inner_product": 1.0, + "l2": 1.0 + } + } + }, + { + "bit_width": 4, + "dense_gaussian_qr": { + "maximum_routing_mse": 0.011961864272438566, + "mean_norm_error": 5.312590645178972e-17, + "mean_routing_mse": 0.009484795350166593, + "recall_at_k": { + "cosine": 1.0, + "inner_product": 1.0, + "l2": 1.0 + } + }, + "dense_qr_seconds": 1.2061929167248309, + "dimensions": 3072, + "k": 10, + "queries": 32, + "records": 1024, + "rerank_multiplier": 8, + "structured": { + "maximum_routing_mse": 0.012311834002227557, + "mean_norm_error": 3.176712365382528e-17, + "mean_routing_mse": 0.009509003489557749, + "recall_at_k": { + "cosine": 1.0, + "inner_product": 1.0, + "l2": 1.0 + } + } + } + ], + "schema": "prolly-turboquant-dense-reference-v1", + "scope": "development qualification only; not production, persistence, wire-format, or Auto-planner input" +} diff --git a/performance-results/proximity-turboquant/qualification-100k-d1536-cosine-k10-all-b4-r8-warm-sync-shard/compile.log b/performance-results/proximity-turboquant/qualification-100k-d1536-cosine-k10-all-b4-r8-warm-sync-shard/compile.log new file mode 100644 index 00000000..a03f45fb --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-100k-d1536-cosine-k10-all-b4-r8-warm-sync-shard/compile.log @@ -0,0 +1,2 @@ + Finished `bench` profile [optimized] target(s) in 0.07s + Executable benches/prolly_proximity_bench.rs (target/release/deps/prolly_proximity_bench-88edf17ca838c569) diff --git a/performance-results/proximity-turboquant/qualification-100k-d1536-cosine-k10-all-b4-r8-warm-sync-shard/manifest.json b/performance-results/proximity-turboquant/qualification-100k-d1536-cosine-k10-all-b4-r8-warm-sync-shard/manifest.json new file mode 100644 index 00000000..8a1b1eca --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-100k-d1536-cosine-k10-all-b4-r8-warm-sync-shard/manifest.json @@ -0,0 +1,62 @@ +{ + "contract": { + "benchmark_schema_version": 2, + "environments": [ + { + "async_quantizers": false, + "cold": false, + "name": "memory-warm-sync", + "store": "memory" + }, + { + "async_quantizers": false, + "cold": true, + "name": "memory-cold-sync", + "store": "memory" + }, + { + "async_quantizers": false, + "cold": false, + "name": "file-warm-sync", + "store": "file" + }, + { + "async_quantizers": false, + "cold": true, + "name": "file-cold-sync", + "store": "file" + }, + { + "async_quantizers": true, + "cold": false, + "name": "memory-warm-async", + "store": "memory" + }, + { + "async_quantizers": true, + "cold": true, + "name": "memory-cold-async", + "store": "memory" + } + ], + "exhaustive_max_records": 10000, + "full_cell_count": 45360, + "full_matrix_digest": "a4c137363c5cffe5390a2959217017321f5f17daabf2babb83c52f17a3571d9f", + "max_cell_records": null, + "profile": "full", + "revision": "d5a24d63fd14a8fae454b16aee67050bdf0db8fc", + "schema": "prolly-turboquant-qualification-v2", + "search_repeats": 30, + "shard_cell_count": 1, + "shard_count": 1000000, + "shard_index": 488292, + "shard_matrix_digest": "c023c4812c715ae4fe4fc697835ea65637fc48be309c811f2fc66eb1beb6f5de", + "wasm_smoke": false, + "workers": [ + 1, + 2, + 4 + ] + }, + "created_at": "2026-09-12T18:24:37.067584+00:00" +} diff --git a/performance-results/proximity-turboquant/qualification-100k-d1536-cosine-k10-all-b4-r8-warm-sync-shard/raw/n100000-d1536-cosine-k10-eall-b4-r8-fixed-memory-warm-sync.csv b/performance-results/proximity-turboquant/qualification-100k-d1536-cosine-k10-all-b4-r8-warm-sync-shard/raw/n100000-d1536-cosine-k10-eall-b4-r8-fixed-memory-warm-sync.csv new file mode 100644 index 00000000..05a29ca8 --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-100k-d1536-cosine-k10-all-b4-r8-warm-sync-shard/raw/n100000-d1536-cosine-k10-eall-b4-r8-fixed-memory-warm-sync.csv @@ -0,0 +1,63 @@ +prolly proximity benchmark +schema_version=2 +revision=d5a24d63fd14a8fae454b16aee67050bdf0db8fc +compiler=rustc 1.97.0 (2d8144b78 2026-07-07) | binary: rustc | commit-hash: 2d8144b7880597b6e6d3dfd63a9a9efae3f533d3 | commit-date: 2026-07-07 | host: aarch64-apple-darwin | release: 1.97.0 | LLVM version: 22.1.6 +target_arch=aarch64 +target_os=macos +machine=Haipings-Mac-Studio.local +store=memory +seed=0 +records=100000 +profile=quantizers +search_repeats=30 +metric=Cosine +k=10 +eligibility_ppm=1000000 +effective_k=10 +turboquant_bits=4 +rerank_multiplier=8 +search_cache=warm +search_order=scalar-first +async_quantizers=false +operation,dimensions,threads,micros,metric_a,metric_b +source_build,1536,0,17326899.083,100000,0 +source_closure_bytes,1536,0,0.000,903109817,21781 +turboquant_build,1536,1,2821103.833,153600000,77600000 +turboquant_build_resources,1536,1,0.000,3671614,2764800000 +turboquant_build,1536,2,1905607.542,153600000,77600000 +turboquant_build_resources,1536,2,0.000,3671614,2764800000 +turboquant_build,1536,4,1337253.083,153600000,77600000 +turboquant_build_resources,1536,4,0.000,3671614,2764800000 +turboquant_sidecar_bytes,1536,0,0.000,78157465,77600000 +turboquant_manifest_code_bytes,1536,0,0.000,137,78157328 +turboquant_search_scalar,1536,0,286003.000,100000,80 +turboquant_search_scalar_p95,1536,0,307674.667,78092880,201677645 +turboquant_search_scalar_p99,1536,0,362429.875,80,124431727 +turboquant_search_scalar_work,1536,0,0.000,80,1 +turboquant_search_scalar_io,1536,0,0.000,100080,737 +turboquant_search_scalar_rerank,1536,0,0.000,80,78092880 +turboquant_recall,1536,0,0,0.000000,0.00952289260277185 +turboquant_search_simd,1536,0,303596.292,100000,80 +turboquant_search_simd_p95,1536,0,335537.375,78092880,201677645 +turboquant_search_simd_p99,1536,0,337567.209,80,124431727 +turboquant_search_simd_work,1536,0,0.000,80,1 +turboquant_search_simd_io,1536,0,0.000,100080,737 +turboquant_search_simd_rerank,1536,0,0.000,80,78092880 +turboquant_search_auto,1536,0,266777.416,100000,80 +turboquant_search_auto_p95,1536,0,298528.792,78092880,201677645 +turboquant_search_auto_p99,1536,0,356920.666,80,124431727 +turboquant_search_auto_work,1536,0,0.000,80,1 +turboquant_search_auto_io,1536,0,0.000,100080,737 +turboquant_search_auto_rerank,1536,0,0.000,80,78092880 +pq_build,1536,1,7603932.041,33554432,100000 +pq_build,1536,2,5363713.167,33554432,100000 +pq_build,1536,4,4717325.167,33554432,100000 +pq_sidecar_bytes,1536,0,0.000,1355801,100000 +pq_manifest_code_bytes,1536,0,0.000,98473,1257328 +pq_search,1536,0,12836.000,100000,80 +pq_search_p95,1536,0,13390.209,1292880,0 +pq_search_p99,1536,0,13523.875,80,47965995 +pq_search_work,1536,0,0.000,80,1 +pq_search_io,1536,0,0.000,100080,0 +pq_search_rerank,1536,0,0.000,80,1292880 +pq_recall,1536,0,0,0.000000,0 diff --git a/performance-results/proximity-turboquant/qualification-100k-d1536-cosine-k10-all-b4-r8-warm-sync-shard/state/n100000-d1536-cosine-k10-eall-b4-r8-fixed-memory-warm-sync.json b/performance-results/proximity-turboquant/qualification-100k-d1536-cosine-k10-all-b4-r8-warm-sync-shard/state/n100000-d1536-cosine-k10-eall-b4-r8-fixed-memory-warm-sync.json new file mode 100644 index 00000000..8f8d3e58 --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-100k-d1536-cosine-k10-all-b4-r8-warm-sync-shard/state/n100000-d1536-cosine-k10-eall-b4-r8-fixed-memory-warm-sync.json @@ -0,0 +1,29 @@ +{ + "cell": { + "bits": 4, + "dimensions": 1536, + "eligibility_ppm": 1000000, + "environment": { + "async_quantizers": false, + "cold": false, + "name": "memory-warm-sync", + "store": "memory" + }, + "k": 10, + "metric": "cosine", + "records": 100000, + "rerank": "fixed", + "rerank_multiplier": 8 + }, + "command": [ + "cargo", + "bench", + "--quiet", + "--all-features", + "--bench", + "prolly_proximity_bench" + ], + "completed_at": "2026-09-12T18:25:53.449973+00:00", + "disposition": "completed", + "sha256": "5135eb83427eed28daa1e88ffe6742c2fe9c5604acc1b79acf5992f03ce60945" +} diff --git a/performance-results/proximity-turboquant/qualification-100k-d1536-cosine-k10-all-b4-r8-warm-sync-shard/status.json b/performance-results/proximity-turboquant/qualification-100k-d1536-cosine-k10-all-b4-r8-warm-sync-shard/status.json new file mode 100644 index 00000000..e6492cf6 --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-100k-d1536-cosine-k10-all-b4-r8-warm-sync-shard/status.json @@ -0,0 +1,11 @@ +{ + "complete": true, + "completed_cells": 1, + "expected_cells": 1, + "failed": [], + "finished_at": "2026-09-12T18:25:58.104614+00:00", + "revision": "d5a24d63fd14a8fae454b16aee67050bdf0db8fc", + "schema": "prolly-turboquant-qualification-v2", + "typed_scalability_failures": 0, + "wasm_smoke": false +} diff --git a/performance-results/proximity-turboquant/qualification-100k-d1536-cosine-k10-all-b4-r8-warm-sync-shard/stderr/n100000-d1536-cosine-k10-eall-b4-r8-fixed-memory-warm-sync.log b/performance-results/proximity-turboquant/qualification-100k-d1536-cosine-k10-all-b4-r8-warm-sync-shard/stderr/n100000-d1536-cosine-k10-eall-b4-r8-fixed-memory-warm-sync.log new file mode 100644 index 00000000..e69de29b diff --git a/performance-results/proximity-turboquant/qualification-100k-d1536-inner-product-k10-all-b4-r8-warm-sync-shard/compile.log b/performance-results/proximity-turboquant/qualification-100k-d1536-inner-product-k10-all-b4-r8-warm-sync-shard/compile.log new file mode 100644 index 00000000..e4c83164 --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-100k-d1536-inner-product-k10-all-b4-r8-warm-sync-shard/compile.log @@ -0,0 +1,2 @@ + Finished `bench` profile [optimized] target(s) in 0.10s + Executable benches/prolly_proximity_bench.rs (target/release/deps/prolly_proximity_bench-88edf17ca838c569) diff --git a/performance-results/proximity-turboquant/qualification-100k-d1536-inner-product-k10-all-b4-r8-warm-sync-shard/manifest.json b/performance-results/proximity-turboquant/qualification-100k-d1536-inner-product-k10-all-b4-r8-warm-sync-shard/manifest.json new file mode 100644 index 00000000..bc917e26 --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-100k-d1536-inner-product-k10-all-b4-r8-warm-sync-shard/manifest.json @@ -0,0 +1,62 @@ +{ + "contract": { + "benchmark_schema_version": 2, + "environments": [ + { + "async_quantizers": false, + "cold": false, + "name": "memory-warm-sync", + "store": "memory" + }, + { + "async_quantizers": false, + "cold": true, + "name": "memory-cold-sync", + "store": "memory" + }, + { + "async_quantizers": false, + "cold": false, + "name": "file-warm-sync", + "store": "file" + }, + { + "async_quantizers": false, + "cold": true, + "name": "file-cold-sync", + "store": "file" + }, + { + "async_quantizers": true, + "cold": false, + "name": "memory-warm-async", + "store": "memory" + }, + { + "async_quantizers": true, + "cold": true, + "name": "memory-cold-async", + "store": "memory" + } + ], + "exhaustive_max_records": 10000, + "full_cell_count": 45360, + "full_matrix_digest": "a4c137363c5cffe5390a2959217017321f5f17daabf2babb83c52f17a3571d9f", + "max_cell_records": null, + "profile": "full", + "revision": "d5a24d63fd14a8fae454b16aee67050bdf0db8fc", + "schema": "prolly-turboquant-qualification-v2", + "search_repeats": 30, + "shard_cell_count": 1, + "shard_count": 1000000, + "shard_index": 655396, + "shard_matrix_digest": "7338521e3c4c8be4289b075ddf259c54a8e67cb56e009145a319c47b83d082aa", + "wasm_smoke": false, + "workers": [ + 1, + 2, + 4 + ] + }, + "created_at": "2026-09-12T18:26:03.811912+00:00" +} diff --git a/performance-results/proximity-turboquant/qualification-100k-d1536-inner-product-k10-all-b4-r8-warm-sync-shard/raw/n100000-d1536-inner_product-k10-eall-b4-r8-fixed-memory-warm-sync.csv b/performance-results/proximity-turboquant/qualification-100k-d1536-inner-product-k10-all-b4-r8-warm-sync-shard/raw/n100000-d1536-inner_product-k10-eall-b4-r8-fixed-memory-warm-sync.csv new file mode 100644 index 00000000..a241f5e9 --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-100k-d1536-inner-product-k10-all-b4-r8-warm-sync-shard/raw/n100000-d1536-inner_product-k10-eall-b4-r8-fixed-memory-warm-sync.csv @@ -0,0 +1,63 @@ +prolly proximity benchmark +schema_version=2 +revision=d5a24d63fd14a8fae454b16aee67050bdf0db8fc +compiler=rustc 1.97.0 (2d8144b78 2026-07-07) | binary: rustc | commit-hash: 2d8144b7880597b6e6d3dfd63a9a9efae3f533d3 | commit-date: 2026-07-07 | host: aarch64-apple-darwin | release: 1.97.0 | LLVM version: 22.1.6 +target_arch=aarch64 +target_os=macos +machine=Haipings-Mac-Studio.local +store=memory +seed=0 +records=100000 +profile=quantizers +search_repeats=30 +metric=InnerProduct +k=10 +eligibility_ppm=1000000 +effective_k=10 +turboquant_bits=4 +rerank_multiplier=8 +search_cache=warm +search_order=scalar-first +async_quantizers=false +operation,dimensions,threads,micros,metric_a,metric_b +source_build,1536,0,15356183.333,100000,0 +source_closure_bytes,1536,0,0.000,903319506,21777 +turboquant_build,1536,1,2563711.292,153600000,77600000 +turboquant_build_resources,1536,1,0.000,3671614,2764800000 +turboquant_build,1536,2,1633156.166,153600000,77600000 +turboquant_build_resources,1536,2,0.000,3671614,2764800000 +turboquant_build,1536,4,1193656.166,153600000,77600000 +turboquant_build_resources,1536,4,0.000,3671614,2764800000 +turboquant_sidecar_bytes,1536,0,0.000,78157465,77600000 +turboquant_manifest_code_bytes,1536,0,0.000,137,78157328 +turboquant_search_scalar,1536,0,264753.708,100000,80 +turboquant_search_scalar_p95,1536,0,276385.750,78092880,201677645 +turboquant_search_scalar_p99,1536,0,277026.042,80,124431727 +turboquant_search_scalar_work,1536,0,0.000,80,1 +turboquant_search_scalar_io,1536,0,0.000,100080,737 +turboquant_search_scalar_rerank,1536,0,0.000,80,78092880 +turboquant_recall,1536,0,0,0.000000,0.00952289260427417 +turboquant_search_simd,1536,0,314855.209,100000,80 +turboquant_search_simd_p95,1536,0,324129.958,78092880,201677645 +turboquant_search_simd_p99,1536,0,329666.667,80,124431727 +turboquant_search_simd_work,1536,0,0.000,80,1 +turboquant_search_simd_io,1536,0,0.000,100080,737 +turboquant_search_simd_rerank,1536,0,0.000,80,78092880 +turboquant_search_auto,1536,0,284275.042,100000,80 +turboquant_search_auto_p95,1536,0,305906.708,78092880,201677645 +turboquant_search_auto_p99,1536,0,316330.333,80,124431727 +turboquant_search_auto_work,1536,0,0.000,80,1 +turboquant_search_auto_io,1536,0,0.000,100080,737 +turboquant_search_auto_rerank,1536,0,0.000,80,78092880 +pq_build,1536,1,7424733.458,33554432,100000 +pq_build,1536,2,5285757.125,33554432,100000 +pq_build,1536,4,4716965.041,33554432,100000 +pq_sidecar_bytes,1536,0,0.000,1355801,100000 +pq_manifest_code_bytes,1536,0,0.000,98473,1257328 +pq_search,1536,0,13038.833,100000,80 +pq_search_p95,1536,0,13512.833,1292880,0 +pq_search_p99,1536,0,13534.584,80,47965995 +pq_search_work,1536,0,0.000,80,1 +pq_search_io,1536,0,0.000,100080,0 +pq_search_rerank,1536,0,0.000,80,1292880 +pq_recall,1536,0,0,0.200000,0 diff --git a/performance-results/proximity-turboquant/qualification-100k-d1536-inner-product-k10-all-b4-r8-warm-sync-shard/state/n100000-d1536-inner_product-k10-eall-b4-r8-fixed-memory-warm-sync.json b/performance-results/proximity-turboquant/qualification-100k-d1536-inner-product-k10-all-b4-r8-warm-sync-shard/state/n100000-d1536-inner_product-k10-eall-b4-r8-fixed-memory-warm-sync.json new file mode 100644 index 00000000..0f71b69a --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-100k-d1536-inner-product-k10-all-b4-r8-warm-sync-shard/state/n100000-d1536-inner_product-k10-eall-b4-r8-fixed-memory-warm-sync.json @@ -0,0 +1,29 @@ +{ + "cell": { + "bits": 4, + "dimensions": 1536, + "eligibility_ppm": 1000000, + "environment": { + "async_quantizers": false, + "cold": false, + "name": "memory-warm-sync", + "store": "memory" + }, + "k": 10, + "metric": "inner_product", + "records": 100000, + "rerank": "fixed", + "rerank_multiplier": 8 + }, + "command": [ + "cargo", + "bench", + "--quiet", + "--all-features", + "--bench", + "prolly_proximity_bench" + ], + "completed_at": "2026-09-12T18:27:14.432680+00:00", + "disposition": "completed", + "sha256": "4618cb8296c1bd0c1c9fea7f09d4286a3fdd656c79579d414987f4b299ba2fb7" +} diff --git a/performance-results/proximity-turboquant/qualification-100k-d1536-inner-product-k10-all-b4-r8-warm-sync-shard/status.json b/performance-results/proximity-turboquant/qualification-100k-d1536-inner-product-k10-all-b4-r8-warm-sync-shard/status.json new file mode 100644 index 00000000..0a04f08d --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-100k-d1536-inner-product-k10-all-b4-r8-warm-sync-shard/status.json @@ -0,0 +1,11 @@ +{ + "complete": true, + "completed_cells": 1, + "expected_cells": 1, + "failed": [], + "finished_at": "2026-09-12T18:27:21.915656+00:00", + "revision": "d5a24d63fd14a8fae454b16aee67050bdf0db8fc", + "schema": "prolly-turboquant-qualification-v2", + "typed_scalability_failures": 0, + "wasm_smoke": false +} diff --git a/performance-results/proximity-turboquant/qualification-100k-d1536-inner-product-k10-all-b4-r8-warm-sync-shard/stderr/n100000-d1536-inner_product-k10-eall-b4-r8-fixed-memory-warm-sync.log b/performance-results/proximity-turboquant/qualification-100k-d1536-inner-product-k10-all-b4-r8-warm-sync-shard/stderr/n100000-d1536-inner_product-k10-eall-b4-r8-fixed-memory-warm-sync.log new file mode 100644 index 00000000..e69de29b diff --git a/performance-results/proximity-turboquant/qualification-100k-d1536-l2-k10-all-b4-r8-warm-sync-shard/compile.log b/performance-results/proximity-turboquant/qualification-100k-d1536-l2-k10-all-b4-r8-warm-sync-shard/compile.log new file mode 100644 index 00000000..da32c7ba --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-100k-d1536-l2-k10-all-b4-r8-warm-sync-shard/compile.log @@ -0,0 +1,2 @@ + Finished `bench` profile [optimized] target(s) in 0.08s + Executable benches/prolly_proximity_bench.rs (target/release/deps/prolly_proximity_bench-88edf17ca838c569) diff --git a/performance-results/proximity-turboquant/qualification-100k-d1536-l2-k10-all-b4-r8-warm-sync-shard/manifest.json b/performance-results/proximity-turboquant/qualification-100k-d1536-l2-k10-all-b4-r8-warm-sync-shard/manifest.json new file mode 100644 index 00000000..24b4cee1 --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-100k-d1536-l2-k10-all-b4-r8-warm-sync-shard/manifest.json @@ -0,0 +1,62 @@ +{ + "contract": { + "benchmark_schema_version": 2, + "environments": [ + { + "async_quantizers": false, + "cold": false, + "name": "memory-warm-sync", + "store": "memory" + }, + { + "async_quantizers": false, + "cold": true, + "name": "memory-cold-sync", + "store": "memory" + }, + { + "async_quantizers": false, + "cold": false, + "name": "file-warm-sync", + "store": "file" + }, + { + "async_quantizers": false, + "cold": true, + "name": "file-cold-sync", + "store": "file" + }, + { + "async_quantizers": true, + "cold": false, + "name": "memory-warm-async", + "store": "memory" + }, + { + "async_quantizers": true, + "cold": true, + "name": "memory-cold-async", + "store": "memory" + } + ], + "exhaustive_max_records": 10000, + "full_cell_count": 45360, + "full_matrix_digest": "a4c137363c5cffe5390a2959217017321f5f17daabf2babb83c52f17a3571d9f", + "max_cell_records": null, + "profile": "full", + "revision": "d5a24d63fd14a8fae454b16aee67050bdf0db8fc", + "schema": "prolly-turboquant-qualification-v2", + "search_repeats": 30, + "shard_cell_count": 1, + "shard_count": 5000000, + "shard_index": 2322889, + "shard_matrix_digest": "809d5e05c345b9c9bd673bfbcdc38e70db93e16b99966b9d84c5cfe7afa72346", + "wasm_smoke": false, + "workers": [ + 1, + 2, + 4 + ] + }, + "created_at": "2026-09-12T18:23:11.613958+00:00" +} diff --git a/performance-results/proximity-turboquant/qualification-100k-d1536-l2-k10-all-b4-r8-warm-sync-shard/raw/n100000-d1536-l2-k10-eall-b4-r8-fixed-memory-warm-sync.csv b/performance-results/proximity-turboquant/qualification-100k-d1536-l2-k10-all-b4-r8-warm-sync-shard/raw/n100000-d1536-l2-k10-eall-b4-r8-fixed-memory-warm-sync.csv new file mode 100644 index 00000000..e831cca6 --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-100k-d1536-l2-k10-all-b4-r8-warm-sync-shard/raw/n100000-d1536-l2-k10-eall-b4-r8-fixed-memory-warm-sync.csv @@ -0,0 +1,63 @@ +prolly proximity benchmark +schema_version=2 +revision=d5a24d63fd14a8fae454b16aee67050bdf0db8fc +compiler=rustc 1.97.0 (2d8144b78 2026-07-07) | binary: rustc | commit-hash: 2d8144b7880597b6e6d3dfd63a9a9efae3f533d3 | commit-date: 2026-07-07 | host: aarch64-apple-darwin | release: 1.97.0 | LLVM version: 22.1.6 +target_arch=aarch64 +target_os=macos +machine=Haipings-Mac-Studio.local +store=memory +seed=0 +records=100000 +profile=quantizers +search_repeats=30 +metric=L2Squared +k=10 +eligibility_ppm=1000000 +effective_k=10 +turboquant_bits=4 +rerank_multiplier=8 +search_cache=warm +search_order=scalar-first +async_quantizers=false +operation,dimensions,threads,micros,metric_a,metric_b +source_build,1536,0,15756751.000,100000,0 +source_closure_bytes,1536,0,0.000,903154774,21750 +turboquant_build,1536,1,2809743.583,153600000,77600000 +turboquant_build_resources,1536,1,0.000,3671614,2764800000 +turboquant_build,1536,2,2395256.250,153600000,77600000 +turboquant_build_resources,1536,2,0.000,3671614,2764800000 +turboquant_build,1536,4,1831466.166,153600000,77600000 +turboquant_build_resources,1536,4,0.000,3671614,2764800000 +turboquant_sidecar_bytes,1536,0,0.000,78157465,77600000 +turboquant_manifest_code_bytes,1536,0,0.000,137,78157328 +turboquant_search_scalar,1536,0,288257.083,100000,80 +turboquant_search_scalar_p95,1536,0,322335.584,78092880,201677645 +turboquant_search_scalar_p99,1536,0,328593.250,80,124431727 +turboquant_search_scalar_work,1536,0,0.000,80,1 +turboquant_search_scalar_io,1536,0,0.000,100080,737 +turboquant_search_scalar_rerank,1536,0,0.000,80,78092880 +turboquant_recall,1536,0,0,0.000000,0.00952289260427417 +turboquant_search_simd,1536,0,322679.208,100000,80 +turboquant_search_simd_p95,1536,0,345000.792,78092880,201677645 +turboquant_search_simd_p99,1536,0,355084.417,80,124431727 +turboquant_search_simd_work,1536,0,0.000,80,1 +turboquant_search_simd_io,1536,0,0.000,100080,737 +turboquant_search_simd_rerank,1536,0,0.000,80,78092880 +turboquant_search_auto,1536,0,286671.958,100000,80 +turboquant_search_auto_p95,1536,0,304349.917,78092880,201677645 +turboquant_search_auto_p99,1536,0,340455.542,80,124431727 +turboquant_search_auto_work,1536,0,0.000,80,1 +turboquant_search_auto_io,1536,0,0.000,100080,737 +turboquant_search_auto_rerank,1536,0,0.000,80,78092880 +pq_build,1536,1,8287180.833,33554432,100000 +pq_build,1536,2,5334456.667,33554432,100000 +pq_build,1536,4,4534129.375,33554432,100000 +pq_sidecar_bytes,1536,0,0.000,1355801,100000 +pq_manifest_code_bytes,1536,0,0.000,98473,1257328 +pq_search,1536,0,12924.709,100000,80 +pq_search_p95,1536,0,13725.125,1292880,0 +pq_search_p99,1536,0,13830.166,80,47965995 +pq_search_work,1536,0,0.000,80,1 +pq_search_io,1536,0,0.000,100080,0 +pq_search_rerank,1536,0,0.000,80,1292880 +pq_recall,1536,0,0,0.000000,0 diff --git a/performance-results/proximity-turboquant/qualification-100k-d1536-l2-k10-all-b4-r8-warm-sync-shard/state/n100000-d1536-l2-k10-eall-b4-r8-fixed-memory-warm-sync.json b/performance-results/proximity-turboquant/qualification-100k-d1536-l2-k10-all-b4-r8-warm-sync-shard/state/n100000-d1536-l2-k10-eall-b4-r8-fixed-memory-warm-sync.json new file mode 100644 index 00000000..f246942d --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-100k-d1536-l2-k10-all-b4-r8-warm-sync-shard/state/n100000-d1536-l2-k10-eall-b4-r8-fixed-memory-warm-sync.json @@ -0,0 +1,29 @@ +{ + "cell": { + "bits": 4, + "dimensions": 1536, + "eligibility_ppm": 1000000, + "environment": { + "async_quantizers": false, + "cold": false, + "name": "memory-warm-sync", + "store": "memory" + }, + "k": 10, + "metric": "l2", + "records": 100000, + "rerank": "fixed", + "rerank_multiplier": 8 + }, + "command": [ + "cargo", + "bench", + "--quiet", + "--all-features", + "--bench", + "prolly_proximity_bench" + ], + "completed_at": "2026-09-12T18:24:28.245784+00:00", + "disposition": "completed", + "sha256": "f1fb78f49bc4422186edbfc0189a348840b6966747bd0fd775df88ae8ef2edc9" +} diff --git a/performance-results/proximity-turboquant/qualification-100k-d1536-l2-k10-all-b4-r8-warm-sync-shard/status.json b/performance-results/proximity-turboquant/qualification-100k-d1536-l2-k10-all-b4-r8-warm-sync-shard/status.json new file mode 100644 index 00000000..b10923ff --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-100k-d1536-l2-k10-all-b4-r8-warm-sync-shard/status.json @@ -0,0 +1,11 @@ +{ + "complete": true, + "completed_cells": 1, + "expected_cells": 1, + "failed": [], + "finished_at": "2026-09-12T18:24:32.802633+00:00", + "revision": "d5a24d63fd14a8fae454b16aee67050bdf0db8fc", + "schema": "prolly-turboquant-qualification-v2", + "typed_scalability_failures": 0, + "wasm_smoke": false +} diff --git a/performance-results/proximity-turboquant/qualification-100k-d1536-l2-k10-all-b4-r8-warm-sync-shard/stderr/n100000-d1536-l2-k10-eall-b4-r8-fixed-memory-warm-sync.log b/performance-results/proximity-turboquant/qualification-100k-d1536-l2-k10-all-b4-r8-warm-sync-shard/stderr/n100000-d1536-l2-k10-eall-b4-r8-fixed-memory-warm-sync.log new file mode 100644 index 00000000..e69de29b diff --git a/performance-results/proximity-turboquant/qualification-100k-d768-cosine-k10-all-b4-r16-warm-sync-shard/compile.log b/performance-results/proximity-turboquant/qualification-100k-d768-cosine-k10-all-b4-r16-warm-sync-shard/compile.log new file mode 100644 index 00000000..a03f45fb --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-100k-d768-cosine-k10-all-b4-r16-warm-sync-shard/compile.log @@ -0,0 +1,2 @@ + Finished `bench` profile [optimized] target(s) in 0.07s + Executable benches/prolly_proximity_bench.rs (target/release/deps/prolly_proximity_bench-88edf17ca838c569) diff --git a/performance-results/proximity-turboquant/qualification-100k-d768-cosine-k10-all-b4-r16-warm-sync-shard/manifest.json b/performance-results/proximity-turboquant/qualification-100k-d768-cosine-k10-all-b4-r16-warm-sync-shard/manifest.json new file mode 100644 index 00000000..a0475879 --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-100k-d768-cosine-k10-all-b4-r16-warm-sync-shard/manifest.json @@ -0,0 +1,62 @@ +{ + "contract": { + "benchmark_schema_version": 2, + "environments": [ + { + "async_quantizers": false, + "cold": false, + "name": "memory-warm-sync", + "store": "memory" + }, + { + "async_quantizers": false, + "cold": true, + "name": "memory-cold-sync", + "store": "memory" + }, + { + "async_quantizers": false, + "cold": false, + "name": "file-warm-sync", + "store": "file" + }, + { + "async_quantizers": false, + "cold": true, + "name": "file-cold-sync", + "store": "file" + }, + { + "async_quantizers": true, + "cold": false, + "name": "memory-warm-async", + "store": "memory" + }, + { + "async_quantizers": true, + "cold": true, + "name": "memory-cold-async", + "store": "memory" + } + ], + "exhaustive_max_records": 10000, + "full_cell_count": 45360, + "full_matrix_digest": "a4c137363c5cffe5390a2959217017321f5f17daabf2babb83c52f17a3571d9f", + "max_cell_records": null, + "profile": "full", + "revision": "d5a24d63fd14a8fae454b16aee67050bdf0db8fc", + "schema": "prolly-turboquant-qualification-v2", + "search_repeats": 30, + "shard_cell_count": 1, + "shard_count": 1000000, + "shard_index": 198811, + "shard_matrix_digest": "bee644e22810145bf22a6200ab09019eb96486af6153b25788233cb390e94825", + "wasm_smoke": false, + "workers": [ + 1, + 2, + 4 + ] + }, + "created_at": "2026-09-12T18:19:50.337048+00:00" +} diff --git a/performance-results/proximity-turboquant/qualification-100k-d768-cosine-k10-all-b4-r16-warm-sync-shard/raw/n100000-d768-cosine-k10-eall-b4-r16-fixed-memory-warm-sync.csv b/performance-results/proximity-turboquant/qualification-100k-d768-cosine-k10-all-b4-r16-warm-sync-shard/raw/n100000-d768-cosine-k10-eall-b4-r16-fixed-memory-warm-sync.csv new file mode 100644 index 00000000..33e55e35 --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-100k-d768-cosine-k10-all-b4-r16-warm-sync-shard/raw/n100000-d768-cosine-k10-eall-b4-r16-fixed-memory-warm-sync.csv @@ -0,0 +1,63 @@ +prolly proximity benchmark +schema_version=2 +revision=d5a24d63fd14a8fae454b16aee67050bdf0db8fc +compiler=rustc 1.97.0 (2d8144b78 2026-07-07) | binary: rustc | commit-hash: 2d8144b7880597b6e6d3dfd63a9a9efae3f533d3 | commit-date: 2026-07-07 | host: aarch64-apple-darwin | release: 1.97.0 | LLVM version: 22.1.6 +target_arch=aarch64 +target_os=macos +machine=Haipings-Mac-Studio.local +store=memory +seed=0 +records=100000 +profile=quantizers +search_repeats=30 +metric=Cosine +k=10 +eligibility_ppm=1000000 +effective_k=10 +turboquant_bits=4 +rerank_multiplier=16 +search_cache=warm +search_order=scalar-first +async_quantizers=false +operation,dimensions,threads,micros,metric_a,metric_b +source_build,768,0,9899813.167,100000,0 +source_closure_bytes,768,0,0.000,889800353,94426 +turboquant_build,768,1,1290296.083,76800000,39200000 +turboquant_build_resources,768,1,0.000,1864126,1228800000 +turboquant_build,768,2,851060.250,76800000,39200000 +turboquant_build_resources,768,2,0.000,1864126,1228800000 +turboquant_build,768,4,636131.958,76800000,39200000 +turboquant_build_resources,768,4,0.000,1864126,1228800000 +turboquant_sidecar_bytes,768,0,0.000,39757465,39200000 +turboquant_manifest_code_bytes,768,0,0.000,137,39757328 +turboquant_search_scalar,768,0,162468.125,100000,160 +turboquant_search_scalar_p95,768,0,168200.167,39694240,133879091 +turboquant_search_scalar_p99,768,0,171545.000,160,95518040 +turboquant_search_scalar_work,768,0,0.000,160,1 +turboquant_search_scalar_io,768,0,0.000,100160,796 +turboquant_search_scalar_rerank,768,0,0.000,160,39694240 +turboquant_recall,768,0,0,0.500000,0.009427194832802563 +turboquant_search_simd,768,0,180048.416,100000,160 +turboquant_search_simd_p95,768,0,189416.083,39694240,133879091 +turboquant_search_simd_p99,768,0,260327.084,160,95518040 +turboquant_search_simd_work,768,0,0.000,160,1 +turboquant_search_simd_io,768,0,0.000,100160,796 +turboquant_search_simd_rerank,768,0,0.000,160,39694240 +turboquant_search_auto,768,0,162453.625,100000,160 +turboquant_search_auto_p95,768,0,164138.833,39694240,133879091 +turboquant_search_auto_p99,768,0,165662.667,160,95518040 +turboquant_search_auto_work,768,0,0.000,160,1 +turboquant_search_auto_io,768,0,0.000,100160,796 +turboquant_search_auto_rerank,768,0,0.000,160,39694240 +pq_build,768,1,3464103.333,33554432,100000 +pq_build,768,2,2579630.833,33554432,100000 +pq_build,768,4,2134221.750,33554432,100000 +pq_sidecar_bytes,768,0,0.000,1306641,100000 +pq_manifest_code_bytes,768,0,0.000,49313,1257328 +pq_search,768,0,12256.083,100000,160 +pq_search_p95,768,0,13116.750,1294240,0 +pq_search_p99,768,0,13255.167,160,45535164 +pq_search_work,768,0,0.000,160,1 +pq_search_io,768,0,0.000,100160,0 +pq_search_rerank,768,0,0.000,160,1294240 +pq_recall,768,0,0,0.100000,0 diff --git a/performance-results/proximity-turboquant/qualification-100k-d768-cosine-k10-all-b4-r16-warm-sync-shard/state/n100000-d768-cosine-k10-eall-b4-r16-fixed-memory-warm-sync.json b/performance-results/proximity-turboquant/qualification-100k-d768-cosine-k10-all-b4-r16-warm-sync-shard/state/n100000-d768-cosine-k10-eall-b4-r16-fixed-memory-warm-sync.json new file mode 100644 index 00000000..6c4d0547 --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-100k-d768-cosine-k10-all-b4-r16-warm-sync-shard/state/n100000-d768-cosine-k10-eall-b4-r16-fixed-memory-warm-sync.json @@ -0,0 +1,29 @@ +{ + "cell": { + "bits": 4, + "dimensions": 768, + "eligibility_ppm": 1000000, + "environment": { + "async_quantizers": false, + "cold": false, + "name": "memory-warm-sync", + "store": "memory" + }, + "k": 10, + "metric": "cosine", + "records": 100000, + "rerank": "fixed", + "rerank_multiplier": 16 + }, + "command": [ + "cargo", + "bench", + "--quiet", + "--all-features", + "--bench", + "prolly_proximity_bench" + ], + "completed_at": "2026-09-12T18:20:32.479251+00:00", + "disposition": "completed", + "sha256": "11339efd768d3d6e64cecdb649f42b1f45eaacd8cdd6d2e7622ad19e9322b32c" +} diff --git a/performance-results/proximity-turboquant/qualification-100k-d768-cosine-k10-all-b4-r16-warm-sync-shard/status.json b/performance-results/proximity-turboquant/qualification-100k-d768-cosine-k10-all-b4-r16-warm-sync-shard/status.json new file mode 100644 index 00000000..e673794e --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-100k-d768-cosine-k10-all-b4-r16-warm-sync-shard/status.json @@ -0,0 +1,11 @@ +{ + "complete": true, + "completed_cells": 1, + "expected_cells": 1, + "failed": [], + "finished_at": "2026-09-12T18:20:37.141320+00:00", + "revision": "d5a24d63fd14a8fae454b16aee67050bdf0db8fc", + "schema": "prolly-turboquant-qualification-v2", + "typed_scalability_failures": 0, + "wasm_smoke": false +} diff --git a/performance-results/proximity-turboquant/qualification-100k-d768-cosine-k10-all-b4-r16-warm-sync-shard/stderr/n100000-d768-cosine-k10-eall-b4-r16-fixed-memory-warm-sync.log b/performance-results/proximity-turboquant/qualification-100k-d768-cosine-k10-all-b4-r16-warm-sync-shard/stderr/n100000-d768-cosine-k10-eall-b4-r16-fixed-memory-warm-sync.log new file mode 100644 index 00000000..e69de29b diff --git a/performance-results/proximity-turboquant/qualification-100k-d768-cosine-k10-all-b4-r8-warm-sync-shard/compile.log b/performance-results/proximity-turboquant/qualification-100k-d768-cosine-k10-all-b4-r8-warm-sync-shard/compile.log new file mode 100644 index 00000000..4c61e6de --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-100k-d768-cosine-k10-all-b4-r8-warm-sync-shard/compile.log @@ -0,0 +1,2 @@ + Finished `bench` profile [optimized] target(s) in 0.11s + Executable benches/prolly_proximity_bench.rs (target/release/deps/prolly_proximity_bench-88edf17ca838c569) diff --git a/performance-results/proximity-turboquant/qualification-100k-d768-cosine-k10-all-b4-r8-warm-sync-shard/manifest.json b/performance-results/proximity-turboquant/qualification-100k-d768-cosine-k10-all-b4-r8-warm-sync-shard/manifest.json new file mode 100644 index 00000000..c607c4d4 --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-100k-d768-cosine-k10-all-b4-r8-warm-sync-shard/manifest.json @@ -0,0 +1,62 @@ +{ + "contract": { + "benchmark_schema_version": 2, + "environments": [ + { + "async_quantizers": false, + "cold": false, + "name": "memory-warm-sync", + "store": "memory" + }, + { + "async_quantizers": false, + "cold": true, + "name": "memory-cold-sync", + "store": "memory" + }, + { + "async_quantizers": false, + "cold": false, + "name": "file-warm-sync", + "store": "file" + }, + { + "async_quantizers": false, + "cold": true, + "name": "file-cold-sync", + "store": "file" + }, + { + "async_quantizers": true, + "cold": false, + "name": "memory-warm-async", + "store": "memory" + }, + { + "async_quantizers": true, + "cold": true, + "name": "memory-cold-async", + "store": "memory" + } + ], + "exhaustive_max_records": 10000, + "full_cell_count": 45360, + "full_matrix_digest": "a4c137363c5cffe5390a2959217017321f5f17daabf2babb83c52f17a3571d9f", + "max_cell_records": null, + "profile": "full", + "revision": "430a744df2832f5a1d5bc927e33e1f9c4cfe0d1a", + "schema": "prolly-turboquant-qualification-v2", + "search_repeats": 30, + "shard_cell_count": 1, + "shard_count": 1000000, + "shard_index": 550539, + "shard_matrix_digest": "0753eff1c0b2594bb15ce5b41d67229ef040916817c208c3cb9256a1cc4ccd01", + "wasm_smoke": false, + "workers": [ + 1, + 2, + 4 + ] + }, + "created_at": "2026-09-12T18:13:53.380424+00:00" +} diff --git a/performance-results/proximity-turboquant/qualification-100k-d768-cosine-k10-all-b4-r8-warm-sync-shard/raw/n100000-d768-cosine-k10-eall-b4-r8-fixed-memory-warm-sync.csv b/performance-results/proximity-turboquant/qualification-100k-d768-cosine-k10-all-b4-r8-warm-sync-shard/raw/n100000-d768-cosine-k10-eall-b4-r8-fixed-memory-warm-sync.csv new file mode 100644 index 00000000..a4657971 --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-100k-d768-cosine-k10-all-b4-r8-warm-sync-shard/raw/n100000-d768-cosine-k10-eall-b4-r8-fixed-memory-warm-sync.csv @@ -0,0 +1,63 @@ +prolly proximity benchmark +schema_version=2 +revision=430a744df2832f5a1d5bc927e33e1f9c4cfe0d1a +compiler=rustc 1.97.0 (2d8144b78 2026-07-07) | binary: rustc | commit-hash: 2d8144b7880597b6e6d3dfd63a9a9efae3f533d3 | commit-date: 2026-07-07 | host: aarch64-apple-darwin | release: 1.97.0 | LLVM version: 22.1.6 +target_arch=aarch64 +target_os=macos +machine=Haipings-Mac-Studio.local +store=memory +seed=0 +records=100000 +profile=quantizers +search_repeats=30 +metric=Cosine +k=10 +eligibility_ppm=1000000 +effective_k=10 +turboquant_bits=4 +rerank_multiplier=8 +search_cache=warm +search_order=scalar-first +async_quantizers=false +operation,dimensions,threads,micros,metric_a,metric_b +source_build,768,0,18950741.708,100000,0 +source_closure_bytes,768,0,0.000,889800353,94426 +turboquant_build,768,1,1996706.708,76800000,39200000 +turboquant_build_resources,768,1,0.000,1864126,1228800000 +turboquant_build,768,2,2670902.000,76800000,39200000 +turboquant_build_resources,768,2,0.000,1864126,1228800000 +turboquant_build,768,4,1167661.500,76800000,39200000 +turboquant_build_resources,768,4,0.000,1864126,1228800000 +turboquant_sidecar_bytes,768,0,0.000,39757465,39200000 +turboquant_manifest_code_bytes,768,0,0.000,137,39757328 +turboquant_search_scalar,768,0,150906.250,100000,80 +turboquant_search_scalar_p95,768,0,166749.333,39447120,100309786 +turboquant_search_scalar_p99,768,0,179814.459,80,61438832 +turboquant_search_scalar_work,768,0,0.000,80,1 +turboquant_search_scalar_io,768,0,0.000,100080,741 +turboquant_search_scalar_rerank,768,0,0.000,80,39447120 +turboquant_recall,768,0,0,0.500000,0.009427194832802563 +turboquant_search_simd,768,0,165094.417,100000,80 +turboquant_search_simd_p95,768,0,169765.917,39447120,100309786 +turboquant_search_simd_p99,768,0,175379.708,80,61438832 +turboquant_search_simd_work,768,0,0.000,80,1 +turboquant_search_simd_io,768,0,0.000,100080,741 +turboquant_search_simd_rerank,768,0,0.000,80,39447120 +turboquant_search_auto,768,0,147916.416,100000,80 +turboquant_search_auto_p95,768,0,150962.708,39447120,100309786 +turboquant_search_auto_p99,768,0,151497.916,80,61438832 +turboquant_search_auto_work,768,0,0.000,80,1 +turboquant_search_auto_io,768,0,0.000,100080,741 +turboquant_search_auto_rerank,768,0,0.000,80,39447120 +pq_build,768,1,3530800.667,33554432,100000 +pq_build,768,2,2616667.250,33554432,100000 +pq_build,768,4,2182476.750,33554432,100000 +pq_sidecar_bytes,768,0,0.000,1306641,100000 +pq_manifest_code_bytes,768,0,0.000,49313,1257328 +pq_search,768,0,13304.042,100000,80 +pq_search_p95,768,0,16702.000,1047120,0 +pq_search_p99,768,0,16949.792,80,24250155 +pq_search_work,768,0,0.000,80,1 +pq_search_io,768,0,0.000,100080,0 +pq_search_rerank,768,0,0.000,80,1047120 +pq_recall,768,0,0,0.000000,0 diff --git a/performance-results/proximity-turboquant/qualification-100k-d768-cosine-k10-all-b4-r8-warm-sync-shard/state/n100000-d768-cosine-k10-eall-b4-r8-fixed-memory-warm-sync.json b/performance-results/proximity-turboquant/qualification-100k-d768-cosine-k10-all-b4-r8-warm-sync-shard/state/n100000-d768-cosine-k10-eall-b4-r8-fixed-memory-warm-sync.json new file mode 100644 index 00000000..633ebd28 --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-100k-d768-cosine-k10-all-b4-r8-warm-sync-shard/state/n100000-d768-cosine-k10-eall-b4-r8-fixed-memory-warm-sync.json @@ -0,0 +1,29 @@ +{ + "cell": { + "bits": 4, + "dimensions": 768, + "eligibility_ppm": 1000000, + "environment": { + "async_quantizers": false, + "cold": false, + "name": "memory-warm-sync", + "store": "memory" + }, + "k": 10, + "metric": "cosine", + "records": 100000, + "rerank": "fixed", + "rerank_multiplier": 8 + }, + "command": [ + "cargo", + "bench", + "--quiet", + "--all-features", + "--bench", + "prolly_proximity_bench" + ], + "completed_at": "2026-09-12T18:14:48.841883+00:00", + "disposition": "completed", + "sha256": "f059abb93e1ef61183820367e9a1649c1bf38fe02ec6d13c8884379362b6c2c9" +} diff --git a/performance-results/proximity-turboquant/qualification-100k-d768-cosine-k10-all-b4-r8-warm-sync-shard/status.json b/performance-results/proximity-turboquant/qualification-100k-d768-cosine-k10-all-b4-r8-warm-sync-shard/status.json new file mode 100644 index 00000000..8134c2e6 --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-100k-d768-cosine-k10-all-b4-r8-warm-sync-shard/status.json @@ -0,0 +1,11 @@ +{ + "complete": true, + "completed_cells": 1, + "expected_cells": 1, + "failed": [], + "finished_at": "2026-09-12T18:14:53.636022+00:00", + "revision": "430a744df2832f5a1d5bc927e33e1f9c4cfe0d1a", + "schema": "prolly-turboquant-qualification-v2", + "typed_scalability_failures": 0, + "wasm_smoke": false +} diff --git a/performance-results/proximity-turboquant/qualification-100k-d768-cosine-k10-all-b4-r8-warm-sync-shard/stderr/n100000-d768-cosine-k10-eall-b4-r8-fixed-memory-warm-sync.log b/performance-results/proximity-turboquant/qualification-100k-d768-cosine-k10-all-b4-r8-warm-sync-shard/stderr/n100000-d768-cosine-k10-eall-b4-r8-fixed-memory-warm-sync.log new file mode 100644 index 00000000..e69de29b diff --git a/performance-results/proximity-turboquant/qualification-100k-d768-inner-product-k10-all-b4-r16-warm-sync-shard/compile.log b/performance-results/proximity-turboquant/qualification-100k-d768-inner-product-k10-all-b4-r16-warm-sync-shard/compile.log new file mode 100644 index 00000000..e4c83164 --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-100k-d768-inner-product-k10-all-b4-r16-warm-sync-shard/compile.log @@ -0,0 +1,2 @@ + Finished `bench` profile [optimized] target(s) in 0.10s + Executable benches/prolly_proximity_bench.rs (target/release/deps/prolly_proximity_bench-88edf17ca838c569) diff --git a/performance-results/proximity-turboquant/qualification-100k-d768-inner-product-k10-all-b4-r16-warm-sync-shard/manifest.json b/performance-results/proximity-turboquant/qualification-100k-d768-inner-product-k10-all-b4-r16-warm-sync-shard/manifest.json new file mode 100644 index 00000000..a6450f49 --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-100k-d768-inner-product-k10-all-b4-r16-warm-sync-shard/manifest.json @@ -0,0 +1,62 @@ +{ + "contract": { + "benchmark_schema_version": 2, + "environments": [ + { + "async_quantizers": false, + "cold": false, + "name": "memory-warm-sync", + "store": "memory" + }, + { + "async_quantizers": false, + "cold": true, + "name": "memory-cold-sync", + "store": "memory" + }, + { + "async_quantizers": false, + "cold": false, + "name": "file-warm-sync", + "store": "file" + }, + { + "async_quantizers": false, + "cold": true, + "name": "file-cold-sync", + "store": "file" + }, + { + "async_quantizers": true, + "cold": false, + "name": "memory-warm-async", + "store": "memory" + }, + { + "async_quantizers": true, + "cold": true, + "name": "memory-cold-async", + "store": "memory" + } + ], + "exhaustive_max_records": 10000, + "full_cell_count": 45360, + "full_matrix_digest": "a4c137363c5cffe5390a2959217017321f5f17daabf2babb83c52f17a3571d9f", + "max_cell_records": null, + "profile": "full", + "revision": "d5a24d63fd14a8fae454b16aee67050bdf0db8fc", + "schema": "prolly-turboquant-qualification-v2", + "search_repeats": 30, + "shard_cell_count": 1, + "shard_count": 1000000, + "shard_index": 729950, + "shard_matrix_digest": "1bbc2d29edc5cd1e53d71067b73f00b21e338481bacdf4d2f1fd4149bacad28e", + "wasm_smoke": false, + "workers": [ + 1, + 2, + 4 + ] + }, + "created_at": "2026-09-12T18:20:41.699835+00:00" +} diff --git a/performance-results/proximity-turboquant/qualification-100k-d768-inner-product-k10-all-b4-r16-warm-sync-shard/raw/n100000-d768-inner_product-k10-eall-b4-r16-fixed-memory-warm-sync.csv b/performance-results/proximity-turboquant/qualification-100k-d768-inner-product-k10-all-b4-r16-warm-sync-shard/raw/n100000-d768-inner_product-k10-eall-b4-r16-fixed-memory-warm-sync.csv new file mode 100644 index 00000000..7aa7c05d --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-100k-d768-inner-product-k10-all-b4-r16-warm-sync-shard/raw/n100000-d768-inner_product-k10-eall-b4-r16-fixed-memory-warm-sync.csv @@ -0,0 +1,63 @@ +prolly proximity benchmark +schema_version=2 +revision=d5a24d63fd14a8fae454b16aee67050bdf0db8fc +compiler=rustc 1.97.0 (2d8144b78 2026-07-07) | binary: rustc | commit-hash: 2d8144b7880597b6e6d3dfd63a9a9efae3f533d3 | commit-date: 2026-07-07 | host: aarch64-apple-darwin | release: 1.97.0 | LLVM version: 22.1.6 +target_arch=aarch64 +target_os=macos +machine=Haipings-Mac-Studio.local +store=memory +seed=0 +records=100000 +profile=quantizers +search_repeats=30 +metric=InnerProduct +k=10 +eligibility_ppm=1000000 +effective_k=10 +turboquant_bits=4 +rerank_multiplier=16 +search_cache=warm +search_order=scalar-first +async_quantizers=false +operation,dimensions,threads,micros,metric_a,metric_b +source_build,768,0,9544537.583,100000,0 +source_closure_bytes,768,0,0.000,891108381,95114 +turboquant_build,768,1,1315253.542,76800000,39200000 +turboquant_build_resources,768,1,0.000,1864126,1228800000 +turboquant_build,768,2,841884.708,76800000,39200000 +turboquant_build_resources,768,2,0.000,1864126,1228800000 +turboquant_build,768,4,616050.750,76800000,39200000 +turboquant_build_resources,768,4,0.000,1864126,1228800000 +turboquant_sidecar_bytes,768,0,0.000,39757465,39200000 +turboquant_manifest_code_bytes,768,0,0.000,137,39757328 +turboquant_search_scalar,768,0,161849.334,100000,160 +turboquant_search_scalar_p95,768,0,164023.208,39694240,132183472 +turboquant_search_scalar_p99,768,0,165786.291,160,93796665 +turboquant_search_scalar_work,768,0,0.000,160,1 +turboquant_search_scalar_io,768,0,0.000,100160,794 +turboquant_search_scalar_rerank,768,0,0.000,160,39694240 +turboquant_recall,768,0,0,0.000000,0.009427194832500568 +turboquant_search_simd,768,0,188239.417,100000,160 +turboquant_search_simd_p95,768,0,190780.333,39694240,132183472 +turboquant_search_simd_p99,768,0,191823.708,160,93796665 +turboquant_search_simd_work,768,0,0.000,160,1 +turboquant_search_simd_io,768,0,0.000,100160,794 +turboquant_search_simd_rerank,768,0,0.000,160,39694240 +turboquant_search_auto,768,0,172964.666,100000,160 +turboquant_search_auto_p95,768,0,175590.250,39694240,132183472 +turboquant_search_auto_p99,768,0,177101.000,160,93796665 +turboquant_search_auto_work,768,0,0.000,160,1 +turboquant_search_auto_io,768,0,0.000,100160,794 +turboquant_search_auto_rerank,768,0,0.000,160,39694240 +pq_build,768,1,3700086.750,33554432,100000 +pq_build,768,2,2768157.959,33554432,100000 +pq_build,768,4,2257793.334,33554432,100000 +pq_sidecar_bytes,768,0,0.000,1306641,100000 +pq_manifest_code_bytes,768,0,0.000,49313,1257328 +pq_search,768,0,13232.000,100000,160 +pq_search_p95,768,0,14303.750,1294240,0 +pq_search_p99,768,0,14506.042,160,45535164 +pq_search_work,768,0,0.000,160,1 +pq_search_io,768,0,0.000,100160,0 +pq_search_rerank,768,0,0.000,160,1294240 +pq_recall,768,0,0,0.200000,0 diff --git a/performance-results/proximity-turboquant/qualification-100k-d768-inner-product-k10-all-b4-r16-warm-sync-shard/state/n100000-d768-inner_product-k10-eall-b4-r16-fixed-memory-warm-sync.json b/performance-results/proximity-turboquant/qualification-100k-d768-inner-product-k10-all-b4-r16-warm-sync-shard/state/n100000-d768-inner_product-k10-eall-b4-r16-fixed-memory-warm-sync.json new file mode 100644 index 00000000..d6684c71 --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-100k-d768-inner-product-k10-all-b4-r16-warm-sync-shard/state/n100000-d768-inner_product-k10-eall-b4-r16-fixed-memory-warm-sync.json @@ -0,0 +1,29 @@ +{ + "cell": { + "bits": 4, + "dimensions": 768, + "eligibility_ppm": 1000000, + "environment": { + "async_quantizers": false, + "cold": false, + "name": "memory-warm-sync", + "store": "memory" + }, + "k": 10, + "metric": "inner_product", + "records": 100000, + "rerank": "fixed", + "rerank_multiplier": 16 + }, + "command": [ + "cargo", + "bench", + "--quiet", + "--all-features", + "--bench", + "prolly_proximity_bench" + ], + "completed_at": "2026-09-12T18:21:24.875542+00:00", + "disposition": "completed", + "sha256": "ea1a295b5875d5fa706ef46450ad5cd4bd0e3b38937b75ce8f94a7fd12881d2a" +} diff --git a/performance-results/proximity-turboquant/qualification-100k-d768-inner-product-k10-all-b4-r16-warm-sync-shard/status.json b/performance-results/proximity-turboquant/qualification-100k-d768-inner-product-k10-all-b4-r16-warm-sync-shard/status.json new file mode 100644 index 00000000..f9c0a7cc --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-100k-d768-inner-product-k10-all-b4-r16-warm-sync-shard/status.json @@ -0,0 +1,11 @@ +{ + "complete": true, + "completed_cells": 1, + "expected_cells": 1, + "failed": [], + "finished_at": "2026-09-12T18:21:29.121968+00:00", + "revision": "d5a24d63fd14a8fae454b16aee67050bdf0db8fc", + "schema": "prolly-turboquant-qualification-v2", + "typed_scalability_failures": 0, + "wasm_smoke": false +} diff --git a/performance-results/proximity-turboquant/qualification-100k-d768-inner-product-k10-all-b4-r16-warm-sync-shard/stderr/n100000-d768-inner_product-k10-eall-b4-r16-fixed-memory-warm-sync.log b/performance-results/proximity-turboquant/qualification-100k-d768-inner-product-k10-all-b4-r16-warm-sync-shard/stderr/n100000-d768-inner_product-k10-eall-b4-r16-fixed-memory-warm-sync.log new file mode 100644 index 00000000..e69de29b diff --git a/performance-results/proximity-turboquant/qualification-100k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/compile.log b/performance-results/proximity-turboquant/qualification-100k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/compile.log new file mode 100644 index 00000000..a91fb16e --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-100k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/compile.log @@ -0,0 +1,2 @@ + Finished `bench` profile [optimized] target(s) in 0.09s + Executable benches/prolly_proximity_bench.rs (target/release/deps/prolly_proximity_bench-88edf17ca838c569) diff --git a/performance-results/proximity-turboquant/qualification-100k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/manifest.json b/performance-results/proximity-turboquant/qualification-100k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/manifest.json new file mode 100644 index 00000000..af5cdb1b --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-100k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/manifest.json @@ -0,0 +1,62 @@ +{ + "contract": { + "benchmark_schema_version": 2, + "environments": [ + { + "async_quantizers": false, + "cold": false, + "name": "memory-warm-sync", + "store": "memory" + }, + { + "async_quantizers": false, + "cold": true, + "name": "memory-cold-sync", + "store": "memory" + }, + { + "async_quantizers": false, + "cold": false, + "name": "file-warm-sync", + "store": "file" + }, + { + "async_quantizers": false, + "cold": true, + "name": "file-cold-sync", + "store": "file" + }, + { + "async_quantizers": true, + "cold": false, + "name": "memory-warm-async", + "store": "memory" + }, + { + "async_quantizers": true, + "cold": true, + "name": "memory-cold-async", + "store": "memory" + } + ], + "exhaustive_max_records": 10000, + "full_cell_count": 45360, + "full_matrix_digest": "a4c137363c5cffe5390a2959217017321f5f17daabf2babb83c52f17a3571d9f", + "max_cell_records": null, + "profile": "full", + "revision": "430a744df2832f5a1d5bc927e33e1f9c4cfe0d1a", + "schema": "prolly-turboquant-qualification-v2", + "search_repeats": 30, + "shard_cell_count": 1, + "shard_count": 1000000, + "shard_index": 626636, + "shard_matrix_digest": "9d48ef6289ebec0c3211bb34e518969a75e9fd6cb7d3c46a3cb34f76762a0e08", + "wasm_smoke": false, + "workers": [ + 1, + 2, + 4 + ] + }, + "created_at": "2026-09-12T18:14:59.124690+00:00" +} diff --git a/performance-results/proximity-turboquant/qualification-100k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/raw/n100000-d768-inner_product-k10-eall-b4-r8-fixed-memory-warm-sync.csv b/performance-results/proximity-turboquant/qualification-100k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/raw/n100000-d768-inner_product-k10-eall-b4-r8-fixed-memory-warm-sync.csv new file mode 100644 index 00000000..c122b925 --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-100k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/raw/n100000-d768-inner_product-k10-eall-b4-r8-fixed-memory-warm-sync.csv @@ -0,0 +1,63 @@ +prolly proximity benchmark +schema_version=2 +revision=430a744df2832f5a1d5bc927e33e1f9c4cfe0d1a +compiler=rustc 1.97.0 (2d8144b78 2026-07-07) | binary: rustc | commit-hash: 2d8144b7880597b6e6d3dfd63a9a9efae3f533d3 | commit-date: 2026-07-07 | host: aarch64-apple-darwin | release: 1.97.0 | LLVM version: 22.1.6 +target_arch=aarch64 +target_os=macos +machine=Haipings-Mac-Studio.local +store=memory +seed=0 +records=100000 +profile=quantizers +search_repeats=30 +metric=InnerProduct +k=10 +eligibility_ppm=1000000 +effective_k=10 +turboquant_bits=4 +rerank_multiplier=8 +search_cache=warm +search_order=scalar-first +async_quantizers=false +operation,dimensions,threads,micros,metric_a,metric_b +source_build,768,0,12482231.167,100000,0 +source_closure_bytes,768,0,0.000,891108381,95114 +turboquant_build,768,1,1368685.708,76800000,39200000 +turboquant_build_resources,768,1,0.000,1864126,1228800000 +turboquant_build,768,2,897519.291,76800000,39200000 +turboquant_build_resources,768,2,0.000,1864126,1228800000 +turboquant_build,768,4,679050.333,76800000,39200000 +turboquant_build_resources,768,4,0.000,1864126,1228800000 +turboquant_sidecar_bytes,768,0,0.000,39757465,39200000 +turboquant_manifest_code_bytes,768,0,0.000,137,39757328 +turboquant_search_scalar,768,0,147554.958,100000,80 +turboquant_search_scalar_p95,768,0,153081.417,39447120,97936602 +turboquant_search_scalar_p99,768,0,153299.459,80,59029599 +turboquant_search_scalar_work,768,0,0.000,80,1 +turboquant_search_scalar_io,768,0,0.000,100080,741 +turboquant_search_scalar_rerank,768,0,0.000,80,39447120 +turboquant_recall,768,0,0,0.000000,0.009427194832500568 +turboquant_search_simd,768,0,164262.375,100000,80 +turboquant_search_simd_p95,768,0,170387.667,39447120,97936602 +turboquant_search_simd_p99,768,0,170439.500,80,59029599 +turboquant_search_simd_work,768,0,0.000,80,1 +turboquant_search_simd_io,768,0,0.000,100080,741 +turboquant_search_simd_rerank,768,0,0.000,80,39447120 +turboquant_search_auto,768,0,146854.875,100000,80 +turboquant_search_auto_p95,768,0,349700.334,39447120,97936602 +turboquant_search_auto_p99,768,0,589580.416,80,59029599 +turboquant_search_auto_work,768,0,0.000,80,1 +turboquant_search_auto_io,768,0,0.000,100080,741 +turboquant_search_auto_rerank,768,0,0.000,80,39447120 +pq_build,768,1,6866202.875,33554432,100000 +pq_build,768,2,4325392.500,33554432,100000 +pq_build,768,4,2835526.667,33554432,100000 +pq_sidecar_bytes,768,0,0.000,1306641,100000 +pq_manifest_code_bytes,768,0,0.000,49313,1257328 +pq_search,768,0,13248.708,100000,80 +pq_search_p95,768,0,16369.083,1047120,0 +pq_search_p99,768,0,17634.708,80,24250155 +pq_search_work,768,0,0.000,80,1 +pq_search_io,768,0,0.000,100080,0 +pq_search_rerank,768,0,0.000,80,1047120 +pq_recall,768,0,0,0.200000,0 diff --git a/performance-results/proximity-turboquant/qualification-100k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/state/n100000-d768-inner_product-k10-eall-b4-r8-fixed-memory-warm-sync.json b/performance-results/proximity-turboquant/qualification-100k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/state/n100000-d768-inner_product-k10-eall-b4-r8-fixed-memory-warm-sync.json new file mode 100644 index 00000000..5142dbf9 --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-100k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/state/n100000-d768-inner_product-k10-eall-b4-r8-fixed-memory-warm-sync.json @@ -0,0 +1,29 @@ +{ + "cell": { + "bits": 4, + "dimensions": 768, + "eligibility_ppm": 1000000, + "environment": { + "async_quantizers": false, + "cold": false, + "name": "memory-warm-sync", + "store": "memory" + }, + "k": 10, + "metric": "inner_product", + "records": 100000, + "rerank": "fixed", + "rerank_multiplier": 8 + }, + "command": [ + "cargo", + "bench", + "--quiet", + "--all-features", + "--bench", + "prolly_proximity_bench" + ], + "completed_at": "2026-09-12T18:15:51.218120+00:00", + "disposition": "completed", + "sha256": "2adf26264836f28c47b6eabbefa025f4aa7c9fa92814e99f158d692d6ec6cb57" +} diff --git a/performance-results/proximity-turboquant/qualification-100k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/status.json b/performance-results/proximity-turboquant/qualification-100k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/status.json new file mode 100644 index 00000000..8751a935 --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-100k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/status.json @@ -0,0 +1,11 @@ +{ + "complete": true, + "completed_cells": 1, + "expected_cells": 1, + "failed": [], + "finished_at": "2026-09-12T18:15:55.438011+00:00", + "revision": "430a744df2832f5a1d5bc927e33e1f9c4cfe0d1a", + "schema": "prolly-turboquant-qualification-v2", + "typed_scalability_failures": 0, + "wasm_smoke": false +} diff --git a/performance-results/proximity-turboquant/qualification-100k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/stderr/n100000-d768-inner_product-k10-eall-b4-r8-fixed-memory-warm-sync.log b/performance-results/proximity-turboquant/qualification-100k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/stderr/n100000-d768-inner_product-k10-eall-b4-r8-fixed-memory-warm-sync.log new file mode 100644 index 00000000..e69de29b diff --git a/performance-results/proximity-turboquant/qualification-100k-d768-l2-k10-all-b4-r16-warm-sync-shard/compile.log b/performance-results/proximity-turboquant/qualification-100k-d768-l2-k10-all-b4-r16-warm-sync-shard/compile.log new file mode 100644 index 00000000..a03f45fb --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-100k-d768-l2-k10-all-b4-r16-warm-sync-shard/compile.log @@ -0,0 +1,2 @@ + Finished `bench` profile [optimized] target(s) in 0.07s + Executable benches/prolly_proximity_bench.rs (target/release/deps/prolly_proximity_bench-88edf17ca838c569) diff --git a/performance-results/proximity-turboquant/qualification-100k-d768-l2-k10-all-b4-r16-warm-sync-shard/manifest.json b/performance-results/proximity-turboquant/qualification-100k-d768-l2-k10-all-b4-r16-warm-sync-shard/manifest.json new file mode 100644 index 00000000..977f0412 --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-100k-d768-l2-k10-all-b4-r16-warm-sync-shard/manifest.json @@ -0,0 +1,62 @@ +{ + "contract": { + "benchmark_schema_version": 2, + "environments": [ + { + "async_quantizers": false, + "cold": false, + "name": "memory-warm-sync", + "store": "memory" + }, + { + "async_quantizers": false, + "cold": true, + "name": "memory-cold-sync", + "store": "memory" + }, + { + "async_quantizers": false, + "cold": false, + "name": "file-warm-sync", + "store": "file" + }, + { + "async_quantizers": false, + "cold": true, + "name": "file-cold-sync", + "store": "file" + }, + { + "async_quantizers": true, + "cold": false, + "name": "memory-warm-async", + "store": "memory" + }, + { + "async_quantizers": true, + "cold": true, + "name": "memory-cold-async", + "store": "memory" + } + ], + "exhaustive_max_records": 10000, + "full_cell_count": 45360, + "full_matrix_digest": "a4c137363c5cffe5390a2959217017321f5f17daabf2babb83c52f17a3571d9f", + "max_cell_records": null, + "profile": "full", + "revision": "d5a24d63fd14a8fae454b16aee67050bdf0db8fc", + "schema": "prolly-turboquant-qualification-v2", + "search_repeats": 30, + "shard_cell_count": 1, + "shard_count": 1000000, + "shard_index": 222470, + "shard_matrix_digest": "a3fa620c5290190629bb6ae5bdb5ec1f99c05bd80448f671c31f453df20d8c50", + "wasm_smoke": false, + "workers": [ + 1, + 2, + 4 + ] + }, + "created_at": "2026-09-12T18:18:52.556042+00:00" +} diff --git a/performance-results/proximity-turboquant/qualification-100k-d768-l2-k10-all-b4-r16-warm-sync-shard/raw/n100000-d768-l2-k10-eall-b4-r16-fixed-memory-warm-sync.csv b/performance-results/proximity-turboquant/qualification-100k-d768-l2-k10-all-b4-r16-warm-sync-shard/raw/n100000-d768-l2-k10-eall-b4-r16-fixed-memory-warm-sync.csv new file mode 100644 index 00000000..5109efa5 --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-100k-d768-l2-k10-all-b4-r16-warm-sync-shard/raw/n100000-d768-l2-k10-eall-b4-r16-fixed-memory-warm-sync.csv @@ -0,0 +1,63 @@ +prolly proximity benchmark +schema_version=2 +revision=d5a24d63fd14a8fae454b16aee67050bdf0db8fc +compiler=rustc 1.97.0 (2d8144b78 2026-07-07) | binary: rustc | commit-hash: 2d8144b7880597b6e6d3dfd63a9a9efae3f533d3 | commit-date: 2026-07-07 | host: aarch64-apple-darwin | release: 1.97.0 | LLVM version: 22.1.6 +target_arch=aarch64 +target_os=macos +machine=Haipings-Mac-Studio.local +store=memory +seed=0 +records=100000 +profile=quantizers +search_repeats=30 +metric=L2Squared +k=10 +eligibility_ppm=1000000 +effective_k=10 +turboquant_bits=4 +rerank_multiplier=16 +search_cache=warm +search_order=scalar-first +async_quantizers=false +operation,dimensions,threads,micros,metric_a,metric_b +source_build,768,0,9795771.625,100000,0 +source_closure_bytes,768,0,0.000,889809682,94426 +turboquant_build,768,1,1289188.333,76800000,39200000 +turboquant_build_resources,768,1,0.000,1864126,1228800000 +turboquant_build,768,2,846960.834,76800000,39200000 +turboquant_build_resources,768,2,0.000,1864126,1228800000 +turboquant_build,768,4,618705.167,76800000,39200000 +turboquant_build_resources,768,4,0.000,1864126,1228800000 +turboquant_sidecar_bytes,768,0,0.000,39757465,39200000 +turboquant_manifest_code_bytes,768,0,0.000,137,39757328 +turboquant_search_scalar,768,0,162348.291,100000,160 +turboquant_search_scalar_p95,768,0,164063.375,39694240,134494843 +turboquant_search_scalar_p99,768,0,164350.459,160,96143145 +turboquant_search_scalar_work,768,0,0.000,160,1 +turboquant_search_scalar_io,768,0,0.000,100160,797 +turboquant_search_scalar_rerank,768,0,0.000,160,39694240 +turboquant_recall,768,0,0,1.000000,0.009427194832500568 +turboquant_search_simd,768,0,179766.458,100000,160 +turboquant_search_simd_p95,768,0,181322.041,39694240,134494843 +turboquant_search_simd_p99,768,0,183850.667,160,96143145 +turboquant_search_simd_work,768,0,0.000,160,1 +turboquant_search_simd_io,768,0,0.000,100160,797 +turboquant_search_simd_rerank,768,0,0.000,160,39694240 +turboquant_search_auto,768,0,162579.250,100000,160 +turboquant_search_auto_p95,768,0,165812.000,39694240,134494843 +turboquant_search_auto_p99,768,0,165812.417,160,96143145 +turboquant_search_auto_work,768,0,0.000,160,1 +turboquant_search_auto_io,768,0,0.000,100160,797 +turboquant_search_auto_rerank,768,0,0.000,160,39694240 +pq_build,768,1,3453095.500,33554432,100000 +pq_build,768,2,2561879.791,33554432,100000 +pq_build,768,4,2175833.333,33554432,100000 +pq_sidecar_bytes,768,0,0.000,1306641,100000 +pq_manifest_code_bytes,768,0,0.000,49313,1257328 +pq_search,768,0,12998.542,100000,160 +pq_search_p95,768,0,13821.584,1294240,0 +pq_search_p99,768,0,13863.041,160,45535164 +pq_search_work,768,0,0.000,160,1 +pq_search_io,768,0,0.000,100160,0 +pq_search_rerank,768,0,0.000,160,1294240 +pq_recall,768,0,0,0.200000,0 diff --git a/performance-results/proximity-turboquant/qualification-100k-d768-l2-k10-all-b4-r16-warm-sync-shard/state/n100000-d768-l2-k10-eall-b4-r16-fixed-memory-warm-sync.json b/performance-results/proximity-turboquant/qualification-100k-d768-l2-k10-all-b4-r16-warm-sync-shard/state/n100000-d768-l2-k10-eall-b4-r16-fixed-memory-warm-sync.json new file mode 100644 index 00000000..66e8833e --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-100k-d768-l2-k10-all-b4-r16-warm-sync-shard/state/n100000-d768-l2-k10-eall-b4-r16-fixed-memory-warm-sync.json @@ -0,0 +1,29 @@ +{ + "cell": { + "bits": 4, + "dimensions": 768, + "eligibility_ppm": 1000000, + "environment": { + "async_quantizers": false, + "cold": false, + "name": "memory-warm-sync", + "store": "memory" + }, + "k": 10, + "metric": "l2", + "records": 100000, + "rerank": "fixed", + "rerank_multiplier": 16 + }, + "command": [ + "cargo", + "bench", + "--quiet", + "--all-features", + "--bench", + "prolly_proximity_bench" + ], + "completed_at": "2026-09-12T18:19:34.311582+00:00", + "disposition": "completed", + "sha256": "3199cf45330b09e54efe176251dedca5d6960242f8702789f465432d3cef813b" +} diff --git a/performance-results/proximity-turboquant/qualification-100k-d768-l2-k10-all-b4-r16-warm-sync-shard/status.json b/performance-results/proximity-turboquant/qualification-100k-d768-l2-k10-all-b4-r16-warm-sync-shard/status.json new file mode 100644 index 00000000..4957c1b6 --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-100k-d768-l2-k10-all-b4-r16-warm-sync-shard/status.json @@ -0,0 +1,11 @@ +{ + "complete": true, + "completed_cells": 1, + "expected_cells": 1, + "failed": [], + "finished_at": "2026-09-12T18:19:38.519416+00:00", + "revision": "d5a24d63fd14a8fae454b16aee67050bdf0db8fc", + "schema": "prolly-turboquant-qualification-v2", + "typed_scalability_failures": 0, + "wasm_smoke": false +} diff --git a/performance-results/proximity-turboquant/qualification-100k-d768-l2-k10-all-b4-r16-warm-sync-shard/stderr/n100000-d768-l2-k10-eall-b4-r16-fixed-memory-warm-sync.log b/performance-results/proximity-turboquant/qualification-100k-d768-l2-k10-all-b4-r16-warm-sync-shard/stderr/n100000-d768-l2-k10-eall-b4-r16-fixed-memory-warm-sync.log new file mode 100644 index 00000000..e69de29b diff --git a/performance-results/proximity-turboquant/qualification-100k-d768-l2-k10-all-b4-r8-warm-sync-shard/compile.log b/performance-results/proximity-turboquant/qualification-100k-d768-l2-k10-all-b4-r8-warm-sync-shard/compile.log new file mode 100644 index 00000000..a91fb16e --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-100k-d768-l2-k10-all-b4-r8-warm-sync-shard/compile.log @@ -0,0 +1,2 @@ + Finished `bench` profile [optimized] target(s) in 0.09s + Executable benches/prolly_proximity_bench.rs (target/release/deps/prolly_proximity_bench-88edf17ca838c569) diff --git a/performance-results/proximity-turboquant/qualification-100k-d768-l2-k10-all-b4-r8-warm-sync-shard/manifest.json b/performance-results/proximity-turboquant/qualification-100k-d768-l2-k10-all-b4-r8-warm-sync-shard/manifest.json new file mode 100644 index 00000000..57131ea0 --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-100k-d768-l2-k10-all-b4-r8-warm-sync-shard/manifest.json @@ -0,0 +1,62 @@ +{ + "contract": { + "benchmark_schema_version": 2, + "environments": [ + { + "async_quantizers": false, + "cold": false, + "name": "memory-warm-sync", + "store": "memory" + }, + { + "async_quantizers": false, + "cold": true, + "name": "memory-cold-sync", + "store": "memory" + }, + { + "async_quantizers": false, + "cold": false, + "name": "file-warm-sync", + "store": "file" + }, + { + "async_quantizers": false, + "cold": true, + "name": "file-cold-sync", + "store": "file" + }, + { + "async_quantizers": true, + "cold": false, + "name": "memory-warm-async", + "store": "memory" + }, + { + "async_quantizers": true, + "cold": true, + "name": "memory-cold-async", + "store": "memory" + } + ], + "exhaustive_max_records": 10000, + "full_cell_count": 45360, + "full_matrix_digest": "a4c137363c5cffe5390a2959217017321f5f17daabf2babb83c52f17a3571d9f", + "max_cell_records": null, + "profile": "full", + "revision": "430a744df2832f5a1d5bc927e33e1f9c4cfe0d1a", + "schema": "prolly-turboquant-qualification-v2", + "search_repeats": 30, + "shard_cell_count": 1, + "shard_count": 1000000, + "shard_index": 472514, + "shard_matrix_digest": "e20020960a8655029a5bd5f01b52b87fdcb690bff5450684c14f10c2ff3b54f4", + "wasm_smoke": false, + "workers": [ + 1, + 2, + 4 + ] + }, + "created_at": "2026-09-12T18:12:42.050148+00:00" +} diff --git a/performance-results/proximity-turboquant/qualification-100k-d768-l2-k10-all-b4-r8-warm-sync-shard/raw/n100000-d768-l2-k10-eall-b4-r8-fixed-memory-warm-sync.csv b/performance-results/proximity-turboquant/qualification-100k-d768-l2-k10-all-b4-r8-warm-sync-shard/raw/n100000-d768-l2-k10-eall-b4-r8-fixed-memory-warm-sync.csv new file mode 100644 index 00000000..c50aed7c --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-100k-d768-l2-k10-all-b4-r8-warm-sync-shard/raw/n100000-d768-l2-k10-eall-b4-r8-fixed-memory-warm-sync.csv @@ -0,0 +1,63 @@ +prolly proximity benchmark +schema_version=2 +revision=430a744df2832f5a1d5bc927e33e1f9c4cfe0d1a +compiler=rustc 1.97.0 (2d8144b78 2026-07-07) | binary: rustc | commit-hash: 2d8144b7880597b6e6d3dfd63a9a9efae3f533d3 | commit-date: 2026-07-07 | host: aarch64-apple-darwin | release: 1.97.0 | LLVM version: 22.1.6 +target_arch=aarch64 +target_os=macos +machine=Haipings-Mac-Studio.local +store=memory +seed=0 +records=100000 +profile=quantizers +search_repeats=30 +metric=L2Squared +k=10 +eligibility_ppm=1000000 +effective_k=10 +turboquant_bits=4 +rerank_multiplier=8 +search_cache=warm +search_order=scalar-first +async_quantizers=false +operation,dimensions,threads,micros,metric_a,metric_b +source_build,768,0,10428258.000,100000,0 +source_closure_bytes,768,0,0.000,889809682,94426 +turboquant_build,768,1,1339400.583,76800000,39200000 +turboquant_build_resources,768,1,0.000,1864126,1228800000 +turboquant_build,768,2,884398.125,76800000,39200000 +turboquant_build_resources,768,2,0.000,1864126,1228800000 +turboquant_build,768,4,652178.583,76800000,39200000 +turboquant_build_resources,768,4,0.000,1864126,1228800000 +turboquant_sidecar_bytes,768,0,0.000,39757465,39200000 +turboquant_manifest_code_bytes,768,0,0.000,137,39757328 +turboquant_search_scalar,768,0,149835.334,100000,80 +turboquant_search_scalar_p95,768,0,156191.667,39447120,101244209 +turboquant_search_scalar_p99,768,0,156963.708,80,62387449 +turboquant_search_scalar_work,768,0,0.000,80,1 +turboquant_search_scalar_io,768,0,0.000,100080,741 +turboquant_search_scalar_rerank,768,0,0.000,80,39447120 +turboquant_recall,768,0,0,0.000000,0.009427194832500568 +turboquant_search_simd,768,0,167233.417,100000,80 +turboquant_search_simd_p95,768,0,174248.750,39447120,101244209 +turboquant_search_simd_p99,768,0,176214.084,80,62387449 +turboquant_search_simd_work,768,0,0.000,80,1 +turboquant_search_simd_io,768,0,0.000,100080,741 +turboquant_search_simd_rerank,768,0,0.000,80,39447120 +turboquant_search_auto,768,0,172725.666,100000,80 +turboquant_search_auto_p95,768,0,227178.083,39447120,101244209 +turboquant_search_auto_p99,768,0,234677.667,80,62387449 +turboquant_search_auto_work,768,0,0.000,80,1 +turboquant_search_auto_io,768,0,0.000,100080,741 +turboquant_search_auto_rerank,768,0,0.000,80,39447120 +pq_build,768,1,7099980.084,33554432,100000 +pq_build,768,2,4392831.416,33554432,100000 +pq_build,768,4,3726735.167,33554432,100000 +pq_sidecar_bytes,768,0,0.000,1306641,100000 +pq_manifest_code_bytes,768,0,0.000,49313,1257328 +pq_search,768,0,13000.125,100000,80 +pq_search_p95,768,0,19097.333,1047120,0 +pq_search_p99,768,0,19125.666,80,24250155 +pq_search_work,768,0,0.000,80,1 +pq_search_io,768,0,0.000,100080,0 +pq_search_rerank,768,0,0.000,80,1047120 +pq_recall,768,0,0,0.100000,0 diff --git a/performance-results/proximity-turboquant/qualification-100k-d768-l2-k10-all-b4-r8-warm-sync-shard/state/n100000-d768-l2-k10-eall-b4-r8-fixed-memory-warm-sync.json b/performance-results/proximity-turboquant/qualification-100k-d768-l2-k10-all-b4-r8-warm-sync-shard/state/n100000-d768-l2-k10-eall-b4-r8-fixed-memory-warm-sync.json new file mode 100644 index 00000000..259b6492 --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-100k-d768-l2-k10-all-b4-r8-warm-sync-shard/state/n100000-d768-l2-k10-eall-b4-r8-fixed-memory-warm-sync.json @@ -0,0 +1,29 @@ +{ + "cell": { + "bits": 4, + "dimensions": 768, + "eligibility_ppm": 1000000, + "environment": { + "async_quantizers": false, + "cold": false, + "name": "memory-warm-sync", + "store": "memory" + }, + "k": 10, + "metric": "l2", + "records": 100000, + "rerank": "fixed", + "rerank_multiplier": 8 + }, + "command": [ + "cargo", + "bench", + "--quiet", + "--all-features", + "--bench", + "prolly_proximity_bench" + ], + "completed_at": "2026-09-12T18:13:39.759165+00:00", + "disposition": "completed", + "sha256": "97a06de26d1ef19001cc63aa5c3b96321f7765637de0b39b189d59b4780eabdf" +} diff --git a/performance-results/proximity-turboquant/qualification-100k-d768-l2-k10-all-b4-r8-warm-sync-shard/status.json b/performance-results/proximity-turboquant/qualification-100k-d768-l2-k10-all-b4-r8-warm-sync-shard/status.json new file mode 100644 index 00000000..9e9ce252 --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-100k-d768-l2-k10-all-b4-r8-warm-sync-shard/status.json @@ -0,0 +1,11 @@ +{ + "complete": true, + "completed_cells": 1, + "expected_cells": 1, + "failed": [], + "finished_at": "2026-09-12T18:13:44.527563+00:00", + "revision": "430a744df2832f5a1d5bc927e33e1f9c4cfe0d1a", + "schema": "prolly-turboquant-qualification-v2", + "typed_scalability_failures": 0, + "wasm_smoke": false +} diff --git a/performance-results/proximity-turboquant/qualification-100k-d768-l2-k10-all-b4-r8-warm-sync-shard/stderr/n100000-d768-l2-k10-eall-b4-r8-fixed-memory-warm-sync.log b/performance-results/proximity-turboquant/qualification-100k-d768-l2-k10-all-b4-r8-warm-sync-shard/stderr/n100000-d768-l2-k10-eall-b4-r8-fixed-memory-warm-sync.log new file mode 100644 index 00000000..e69de29b diff --git a/performance-results/proximity-turboquant/qualification-10k-d768-cosine-k10-all-b4-r8-warm-sync-shard/compile.log b/performance-results/proximity-turboquant/qualification-10k-d768-cosine-k10-all-b4-r8-warm-sync-shard/compile.log new file mode 100644 index 00000000..234356d7 --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-10k-d768-cosine-k10-all-b4-r8-warm-sync-shard/compile.log @@ -0,0 +1,2 @@ + Finished `bench` profile [optimized] target(s) in 0.04s + Executable benches/prolly_proximity_bench.rs (target/release/deps/prolly_proximity_bench-88edf17ca838c569) diff --git a/performance-results/proximity-turboquant/qualification-10k-d768-cosine-k10-all-b4-r8-warm-sync-shard/manifest.json b/performance-results/proximity-turboquant/qualification-10k-d768-cosine-k10-all-b4-r8-warm-sync-shard/manifest.json new file mode 100644 index 00000000..9e5f065a --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-10k-d768-cosine-k10-all-b4-r8-warm-sync-shard/manifest.json @@ -0,0 +1,62 @@ +{ + "contract": { + "benchmark_schema_version": 2, + "environments": [ + { + "async_quantizers": false, + "cold": false, + "name": "memory-warm-sync", + "store": "memory" + }, + { + "async_quantizers": false, + "cold": true, + "name": "memory-cold-sync", + "store": "memory" + }, + { + "async_quantizers": false, + "cold": false, + "name": "file-warm-sync", + "store": "file" + }, + { + "async_quantizers": false, + "cold": true, + "name": "file-cold-sync", + "store": "file" + }, + { + "async_quantizers": true, + "cold": false, + "name": "memory-warm-async", + "store": "memory" + }, + { + "async_quantizers": true, + "cold": true, + "name": "memory-cold-async", + "store": "memory" + } + ], + "exhaustive_max_records": 10000, + "full_cell_count": 45360, + "full_matrix_digest": "a4c137363c5cffe5390a2959217017321f5f17daabf2babb83c52f17a3571d9f", + "max_cell_records": null, + "profile": "full", + "revision": "915bbbaa55f8f6ab8fde12a68ad57fb924ebce2c", + "schema": "prolly-turboquant-qualification-v2", + "search_repeats": 30, + "shard_cell_count": 1, + "shard_count": 1000000, + "shard_index": 79516, + "shard_matrix_digest": "bad24b6c59267c9cadb8895d87a693f58e32af946bfbeed4bbe15b662221d72f", + "wasm_smoke": false, + "workers": [ + 1, + 2, + 4 + ] + }, + "created_at": "2026-09-12T18:05:14.925498+00:00" +} diff --git a/performance-results/proximity-turboquant/qualification-10k-d768-cosine-k10-all-b4-r8-warm-sync-shard/raw/n10000-d768-cosine-k10-eall-b4-r8-fixed-memory-warm-sync.csv b/performance-results/proximity-turboquant/qualification-10k-d768-cosine-k10-all-b4-r8-warm-sync-shard/raw/n10000-d768-cosine-k10-eall-b4-r8-fixed-memory-warm-sync.csv new file mode 100644 index 00000000..1892e4f8 --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-10k-d768-cosine-k10-all-b4-r8-warm-sync-shard/raw/n10000-d768-cosine-k10-eall-b4-r8-fixed-memory-warm-sync.csv @@ -0,0 +1,63 @@ +prolly proximity benchmark +schema_version=2 +revision=915bbbaa55f8f6ab8fde12a68ad57fb924ebce2c +compiler=rustc 1.97.0 (2d8144b78 2026-07-07) | binary: rustc | commit-hash: 2d8144b7880597b6e6d3dfd63a9a9efae3f533d3 | commit-date: 2026-07-07 | host: aarch64-apple-darwin | release: 1.97.0 | LLVM version: 22.1.6 +target_arch=aarch64 +target_os=macos +machine=Haipings-Mac-Studio.local +store=memory +seed=0 +records=10000 +profile=quantizers +search_repeats=30 +metric=Cosine +k=10 +eligibility_ppm=1000000 +effective_k=10 +turboquant_bits=4 +rerank_multiplier=8 +search_cache=warm +search_order=scalar-first +async_quantizers=false +operation,dimensions,threads,micros,metric_a,metric_b +source_build,768,0,831455.000,10000,0 +source_closure_bytes,768,0,0.000,90578506,10180 +turboquant_build,768,1,139475.417,7680000,3920000 +turboquant_build_resources,768,1,0.000,1709751,122880000 +turboquant_build,768,2,77546.917,7680000,3920000 +turboquant_build_resources,768,2,0.000,1709751,122880000 +turboquant_build,768,4,51342.792,7680000,3920000 +turboquant_build_resources,768,4,0.000,1709751,122880000 +turboquant_sidecar_bytes,768,0,0.000,3975264,3920000 +turboquant_manifest_code_bytes,768,0,0.000,136,3975128 +turboquant_search_scalar,768,0,9594.500,10000,80 +turboquant_search_scalar_p95,768,0,10214.666,4167120,0 +turboquant_search_scalar_p99,768,0,10527.166,80,28503358 +turboquant_search_scalar_work,768,0,0.000,80,1 +turboquant_search_scalar_io,768,0,0.000,10080,0 +turboquant_search_scalar_rerank,768,0,0.000,80,4167120 +turboquant_recall,768,0,0,1.000000,0.009424325451446206 +turboquant_search_simd,768,0,11958.292,10000,80 +turboquant_search_simd_p95,768,0,12343.792,4167120,0 +turboquant_search_simd_p99,768,0,12593.959,80,28503358 +turboquant_search_simd_work,768,0,0.000,80,1 +turboquant_search_simd_io,768,0,0.000,10080,0 +turboquant_search_simd_rerank,768,0,0.000,80,4167120 +turboquant_search_auto,768,0,9977.917,10000,80 +turboquant_search_auto_p95,768,0,10739.208,4167120,0 +turboquant_search_auto_p99,768,0,10740.958,80,28503358 +turboquant_search_auto_work,768,0,0.000,80,1 +turboquant_search_auto_io,768,0,0.000,10080,0 +turboquant_search_auto_rerank,768,0,0.000,80,4167120 +pq_build,768,1,454235.209,5120000,10000 +pq_build,768,2,321396.875,5120000,10000 +pq_build,768,4,258541.041,5120000,10000 +pq_sidecar_bytes,768,0,0.000,174439,10000 +pq_manifest_code_bytes,768,0,0.000,49311,125128 +pq_search,768,0,1643.000,10000,80 +pq_search_p95,768,0,2233.750,327120,0 +pq_search_p99,768,0,2424.833,80,23719283 +pq_search_work,768,0,0.000,80,1 +pq_search_io,768,0,0.000,10080,0 +pq_search_rerank,768,0,0.000,80,327120 +pq_recall,768,0,0,0.800000,0 diff --git a/performance-results/proximity-turboquant/qualification-10k-d768-cosine-k10-all-b4-r8-warm-sync-shard/state/n10000-d768-cosine-k10-eall-b4-r8-fixed-memory-warm-sync.json b/performance-results/proximity-turboquant/qualification-10k-d768-cosine-k10-all-b4-r8-warm-sync-shard/state/n10000-d768-cosine-k10-eall-b4-r8-fixed-memory-warm-sync.json new file mode 100644 index 00000000..1c6346c3 --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-10k-d768-cosine-k10-all-b4-r8-warm-sync-shard/state/n10000-d768-cosine-k10-eall-b4-r8-fixed-memory-warm-sync.json @@ -0,0 +1,29 @@ +{ + "cell": { + "bits": 4, + "dimensions": 768, + "eligibility_ppm": 1000000, + "environment": { + "async_quantizers": false, + "cold": false, + "name": "memory-warm-sync", + "store": "memory" + }, + "k": 10, + "metric": "cosine", + "records": 10000, + "rerank": "fixed", + "rerank_multiplier": 8 + }, + "command": [ + "cargo", + "bench", + "--quiet", + "--all-features", + "--bench", + "prolly_proximity_bench" + ], + "completed_at": "2026-09-12T18:05:19.016478+00:00", + "disposition": "completed", + "sha256": "4a4f2c37bace180e67a15b273062325fc9ade77cdd195797af557029a0499ada" +} diff --git a/performance-results/proximity-turboquant/qualification-10k-d768-cosine-k10-all-b4-r8-warm-sync-shard/status.json b/performance-results/proximity-turboquant/qualification-10k-d768-cosine-k10-all-b4-r8-warm-sync-shard/status.json new file mode 100644 index 00000000..b2cb6c1f --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-10k-d768-cosine-k10-all-b4-r8-warm-sync-shard/status.json @@ -0,0 +1,11 @@ +{ + "complete": true, + "completed_cells": 1, + "expected_cells": 1, + "failed": [], + "finished_at": "2026-09-12T18:05:23.073068+00:00", + "revision": "915bbbaa55f8f6ab8fde12a68ad57fb924ebce2c", + "schema": "prolly-turboquant-qualification-v2", + "typed_scalability_failures": 0, + "wasm_smoke": false +} diff --git a/performance-results/proximity-turboquant/qualification-10k-d768-cosine-k10-all-b4-r8-warm-sync-shard/stderr/n10000-d768-cosine-k10-eall-b4-r8-fixed-memory-warm-sync.log b/performance-results/proximity-turboquant/qualification-10k-d768-cosine-k10-all-b4-r8-warm-sync-shard/stderr/n10000-d768-cosine-k10-eall-b4-r8-fixed-memory-warm-sync.log new file mode 100644 index 00000000..e69de29b diff --git a/performance-results/proximity-turboquant/qualification-10k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/compile.log b/performance-results/proximity-turboquant/qualification-10k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/compile.log new file mode 100644 index 00000000..234356d7 --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-10k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/compile.log @@ -0,0 +1,2 @@ + Finished `bench` profile [optimized] target(s) in 0.04s + Executable benches/prolly_proximity_bench.rs (target/release/deps/prolly_proximity_bench-88edf17ca838c569) diff --git a/performance-results/proximity-turboquant/qualification-10k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/manifest.json b/performance-results/proximity-turboquant/qualification-10k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/manifest.json new file mode 100644 index 00000000..4cde5224 --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-10k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/manifest.json @@ -0,0 +1,62 @@ +{ + "contract": { + "benchmark_schema_version": 2, + "environments": [ + { + "async_quantizers": false, + "cold": false, + "name": "memory-warm-sync", + "store": "memory" + }, + { + "async_quantizers": false, + "cold": true, + "name": "memory-cold-sync", + "store": "memory" + }, + { + "async_quantizers": false, + "cold": false, + "name": "file-warm-sync", + "store": "file" + }, + { + "async_quantizers": false, + "cold": true, + "name": "file-cold-sync", + "store": "file" + }, + { + "async_quantizers": true, + "cold": false, + "name": "memory-warm-async", + "store": "memory" + }, + { + "async_quantizers": true, + "cold": true, + "name": "memory-cold-async", + "store": "memory" + } + ], + "exhaustive_max_records": 10000, + "full_cell_count": 45360, + "full_matrix_digest": "a4c137363c5cffe5390a2959217017321f5f17daabf2babb83c52f17a3571d9f", + "max_cell_records": null, + "profile": "full", + "revision": "915bbbaa55f8f6ab8fde12a68ad57fb924ebce2c", + "schema": "prolly-turboquant-qualification-v2", + "search_repeats": 30, + "shard_cell_count": 1, + "shard_count": 1000000, + "shard_index": 513486, + "shard_matrix_digest": "d60f077a3a0c16ce8513637c65ecb013386be149c36bdaa75825f7cd86ec75bd", + "wasm_smoke": false, + "workers": [ + 1, + 2, + 4 + ] + }, + "created_at": "2026-09-12T18:05:27.223585+00:00" +} diff --git a/performance-results/proximity-turboquant/qualification-10k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/raw/n10000-d768-inner_product-k10-eall-b4-r8-fixed-memory-warm-sync.csv b/performance-results/proximity-turboquant/qualification-10k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/raw/n10000-d768-inner_product-k10-eall-b4-r8-fixed-memory-warm-sync.csv new file mode 100644 index 00000000..f7077182 --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-10k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/raw/n10000-d768-inner_product-k10-eall-b4-r8-fixed-memory-warm-sync.csv @@ -0,0 +1,63 @@ +prolly proximity benchmark +schema_version=2 +revision=915bbbaa55f8f6ab8fde12a68ad57fb924ebce2c +compiler=rustc 1.97.0 (2d8144b78 2026-07-07) | binary: rustc | commit-hash: 2d8144b7880597b6e6d3dfd63a9a9efae3f533d3 | commit-date: 2026-07-07 | host: aarch64-apple-darwin | release: 1.97.0 | LLVM version: 22.1.6 +target_arch=aarch64 +target_os=macos +machine=Haipings-Mac-Studio.local +store=memory +seed=0 +records=10000 +profile=quantizers +search_repeats=30 +metric=InnerProduct +k=10 +eligibility_ppm=1000000 +effective_k=10 +turboquant_bits=4 +rerank_multiplier=8 +search_cache=warm +search_order=scalar-first +async_quantizers=false +operation,dimensions,threads,micros,metric_a,metric_b +source_build,768,0,859434.917,10000,0 +source_closure_bytes,768,0,0.000,90568013,10176 +turboquant_build,768,1,138192.125,7680000,3920000 +turboquant_build_resources,768,1,0.000,1709751,122880000 +turboquant_build,768,2,79670.833,7680000,3920000 +turboquant_build_resources,768,2,0.000,1709751,122880000 +turboquant_build,768,4,54277.375,7680000,3920000 +turboquant_build_resources,768,4,0.000,1709751,122880000 +turboquant_sidecar_bytes,768,0,0.000,3975264,3920000 +turboquant_manifest_code_bytes,768,0,0.000,136,3975128 +turboquant_search_scalar,768,0,9982.750,10000,80 +turboquant_search_scalar_p95,768,0,10693.750,4167120,0 +turboquant_search_scalar_p99,768,0,10901.791,80,28503358 +turboquant_search_scalar_work,768,0,0.000,80,1 +turboquant_search_scalar_io,768,0,0.000,10080,0 +turboquant_search_scalar_rerank,768,0,0.000,80,4167120 +turboquant_recall,768,0,0,1.000000,0.00942432544887716 +turboquant_search_simd,768,0,12370.625,10000,80 +turboquant_search_simd_p95,768,0,13124.833,4167120,0 +turboquant_search_simd_p99,768,0,13260.375,80,28503358 +turboquant_search_simd_work,768,0,0.000,80,1 +turboquant_search_simd_io,768,0,0.000,10080,0 +turboquant_search_simd_rerank,768,0,0.000,80,4167120 +turboquant_search_auto,768,0,10204.833,10000,80 +turboquant_search_auto_p95,768,0,11001.292,4167120,0 +turboquant_search_auto_p99,768,0,11257.375,80,28503358 +turboquant_search_auto_work,768,0,0.000,80,1 +turboquant_search_auto_io,768,0,0.000,10080,0 +turboquant_search_auto_rerank,768,0,0.000,80,4167120 +pq_build,768,1,455489.459,5120000,10000 +pq_build,768,2,315860.208,5120000,10000 +pq_build,768,4,226912.542,5120000,10000 +pq_sidecar_bytes,768,0,0.000,174439,10000 +pq_manifest_code_bytes,768,0,0.000,49311,125128 +pq_search,768,0,1533.084,10000,80 +pq_search_p95,768,0,1968.167,327120,0 +pq_search_p99,768,0,2145.166,80,19861880 +pq_search_work,768,0,0.000,80,1 +pq_search_io,768,0,0.000,10080,0 +pq_search_rerank,768,0,0.000,80,327120 +pq_recall,768,0,0,0.400000,0 diff --git a/performance-results/proximity-turboquant/qualification-10k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/state/n10000-d768-inner_product-k10-eall-b4-r8-fixed-memory-warm-sync.json b/performance-results/proximity-turboquant/qualification-10k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/state/n10000-d768-inner_product-k10-eall-b4-r8-fixed-memory-warm-sync.json new file mode 100644 index 00000000..f65531c5 --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-10k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/state/n10000-d768-inner_product-k10-eall-b4-r8-fixed-memory-warm-sync.json @@ -0,0 +1,29 @@ +{ + "cell": { + "bits": 4, + "dimensions": 768, + "eligibility_ppm": 1000000, + "environment": { + "async_quantizers": false, + "cold": false, + "name": "memory-warm-sync", + "store": "memory" + }, + "k": 10, + "metric": "inner_product", + "records": 10000, + "rerank": "fixed", + "rerank_multiplier": 8 + }, + "command": [ + "cargo", + "bench", + "--quiet", + "--all-features", + "--bench", + "prolly_proximity_bench" + ], + "completed_at": "2026-09-12T18:05:31.153705+00:00", + "disposition": "completed", + "sha256": "00275b2ba9a088058de764feb33b1648f442a3660d2ece4a20968de237684d06" +} diff --git a/performance-results/proximity-turboquant/qualification-10k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/status.json b/performance-results/proximity-turboquant/qualification-10k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/status.json new file mode 100644 index 00000000..a882a2fe --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-10k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/status.json @@ -0,0 +1,11 @@ +{ + "complete": true, + "completed_cells": 1, + "expected_cells": 1, + "failed": [], + "finished_at": "2026-09-12T18:05:35.810377+00:00", + "revision": "915bbbaa55f8f6ab8fde12a68ad57fb924ebce2c", + "schema": "prolly-turboquant-qualification-v2", + "typed_scalability_failures": 0, + "wasm_smoke": false +} diff --git a/performance-results/proximity-turboquant/qualification-10k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/stderr/n10000-d768-inner_product-k10-eall-b4-r8-fixed-memory-warm-sync.log b/performance-results/proximity-turboquant/qualification-10k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/stderr/n10000-d768-inner_product-k10-eall-b4-r8-fixed-memory-warm-sync.log new file mode 100644 index 00000000..e69de29b diff --git a/performance-results/proximity-turboquant/qualification-10k-d768-l2-k10-all-b4-r8-warm-sync-shard/compile.log b/performance-results/proximity-turboquant/qualification-10k-d768-l2-k10-all-b4-r8-warm-sync-shard/compile.log new file mode 100644 index 00000000..a88116fb --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-10k-d768-l2-k10-all-b4-r8-warm-sync-shard/compile.log @@ -0,0 +1,2 @@ + Finished `bench` profile [optimized] target(s) in 0.03s + Executable benches/prolly_proximity_bench.rs (target/release/deps/prolly_proximity_bench-88edf17ca838c569) diff --git a/performance-results/proximity-turboquant/qualification-10k-d768-l2-k10-all-b4-r8-warm-sync-shard/manifest.json b/performance-results/proximity-turboquant/qualification-10k-d768-l2-k10-all-b4-r8-warm-sync-shard/manifest.json new file mode 100644 index 00000000..16d75e4f --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-10k-d768-l2-k10-all-b4-r8-warm-sync-shard/manifest.json @@ -0,0 +1,62 @@ +{ + "contract": { + "benchmark_schema_version": 2, + "environments": [ + { + "async_quantizers": false, + "cold": false, + "name": "memory-warm-sync", + "store": "memory" + }, + { + "async_quantizers": false, + "cold": true, + "name": "memory-cold-sync", + "store": "memory" + }, + { + "async_quantizers": false, + "cold": false, + "name": "file-warm-sync", + "store": "file" + }, + { + "async_quantizers": false, + "cold": true, + "name": "file-cold-sync", + "store": "file" + }, + { + "async_quantizers": true, + "cold": false, + "name": "memory-warm-async", + "store": "memory" + }, + { + "async_quantizers": true, + "cold": true, + "name": "memory-cold-async", + "store": "memory" + } + ], + "exhaustive_max_records": 10000, + "full_cell_count": 45360, + "full_matrix_digest": "a4c137363c5cffe5390a2959217017321f5f17daabf2babb83c52f17a3571d9f", + "max_cell_records": null, + "profile": "full", + "revision": "92be88dc3933259f4d75dffce91645a7ce67afb9", + "schema": "prolly-turboquant-qualification-v2", + "search_repeats": 30, + "shard_cell_count": 1, + "shard_count": 1000000, + "shard_index": 131629, + "shard_matrix_digest": "f7c83f9de4e79f6dae2881f65225a13b91148b92980f987d210da92e90a5c703", + "wasm_smoke": false, + "workers": [ + 1, + 2, + 4 + ] + }, + "created_at": "2026-09-12T14:51:27.820819+00:00" +} diff --git a/performance-results/proximity-turboquant/qualification-10k-d768-l2-k10-all-b4-r8-warm-sync-shard/raw/n10000-d768-l2-k10-eall-b4-r8-fixed-memory-warm-sync.csv b/performance-results/proximity-turboquant/qualification-10k-d768-l2-k10-all-b4-r8-warm-sync-shard/raw/n10000-d768-l2-k10-eall-b4-r8-fixed-memory-warm-sync.csv new file mode 100644 index 00000000..c32ccacd --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-10k-d768-l2-k10-all-b4-r8-warm-sync-shard/raw/n10000-d768-l2-k10-eall-b4-r8-fixed-memory-warm-sync.csv @@ -0,0 +1,63 @@ +prolly proximity benchmark +schema_version=2 +revision=92be88dc3933259f4d75dffce91645a7ce67afb9 +compiler=rustc 1.97.0 (2d8144b78 2026-07-07) | binary: rustc | commit-hash: 2d8144b7880597b6e6d3dfd63a9a9efae3f533d3 | commit-date: 2026-07-07 | host: aarch64-apple-darwin | release: 1.97.0 | LLVM version: 22.1.6 +target_arch=aarch64 +target_os=macos +machine=Haipings-Mac-Studio.local +store=memory +seed=0 +records=10000 +profile=quantizers +search_repeats=30 +metric=L2Squared +k=10 +eligibility_ppm=1000000 +effective_k=10 +turboquant_bits=4 +rerank_multiplier=8 +search_cache=warm +search_order=scalar-first +async_quantizers=false +operation,dimensions,threads,micros,metric_a,metric_b +source_build,768,0,752086.625,10000,0 +source_closure_bytes,768,0,0.000,90558970,10171 +turboquant_build,768,1,134577.167,7680000,3920000 +turboquant_build_resources,768,1,0.000,478720,122880000 +turboquant_build,768,2,71899.125,7680000,3920000 +turboquant_build_resources,768,2,0.000,478720,122880000 +turboquant_build,768,4,54231.250,7680000,3920000 +turboquant_build_resources,768,4,0.000,478720,122880000 +turboquant_sidecar_bytes,768,0,0.000,3975264,3920000 +turboquant_manifest_code_bytes,768,0,0.000,136,3975128 +turboquant_search_scalar,768,0,22544.125,10000,80 +turboquant_search_scalar_p95,768,0,25392.333,4167120,0 +turboquant_search_scalar_p99,768,0,26361.250,80,28503358 +turboquant_search_scalar_work,768,0,0.000,80,1 +turboquant_search_scalar_io,768,0,0.000,10080,0 +turboquant_search_scalar_rerank,768,0,0.000,80,4167120 +turboquant_recall,768,0,0,1.000000,0.00942432544887716 +turboquant_search_simd,768,0,24117.917,10000,80 +turboquant_search_simd_p95,768,0,25543.625,4167120,0 +turboquant_search_simd_p99,768,0,25651.625,80,28503358 +turboquant_search_simd_work,768,0,0.000,80,1 +turboquant_search_simd_io,768,0,0.000,10080,0 +turboquant_search_simd_rerank,768,0,0.000,80,4167120 +turboquant_search_auto,768,0,22489.166,10000,80 +turboquant_search_auto_p95,768,0,23566.625,4167120,0 +turboquant_search_auto_p99,768,0,23663.334,80,28503358 +turboquant_search_auto_work,768,0,0.000,80,1 +turboquant_search_auto_io,768,0,0.000,10080,0 +turboquant_search_auto_rerank,768,0,0.000,80,4167120 +pq_build,768,1,425243.459,5120000,10000 +pq_build,768,2,287599.334,5120000,10000 +pq_build,768,4,219576.375,5120000,10000 +pq_sidecar_bytes,768,0,0.000,174439,10000 +pq_manifest_code_bytes,768,0,0.000,49311,125128 +pq_search,768,0,8236.750,10000,80 +pq_search_p95,768,0,8966.542,327120,0 +pq_search_p99,768,0,9216.333,80,15919739 +pq_search_work,768,0,0.000,80,1 +pq_search_io,768,0,0.000,10080,0 +pq_search_rerank,768,0,0.000,80,327120 +pq_recall,768,0,0,0.600000,0 diff --git a/performance-results/proximity-turboquant/qualification-10k-d768-l2-k10-all-b4-r8-warm-sync-shard/state/n10000-d768-l2-k10-eall-b4-r8-fixed-memory-warm-sync.json b/performance-results/proximity-turboquant/qualification-10k-d768-l2-k10-all-b4-r8-warm-sync-shard/state/n10000-d768-l2-k10-eall-b4-r8-fixed-memory-warm-sync.json new file mode 100644 index 00000000..451b8c1f --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-10k-d768-l2-k10-all-b4-r8-warm-sync-shard/state/n10000-d768-l2-k10-eall-b4-r8-fixed-memory-warm-sync.json @@ -0,0 +1,29 @@ +{ + "cell": { + "bits": 4, + "dimensions": 768, + "eligibility_ppm": 1000000, + "environment": { + "async_quantizers": false, + "cold": false, + "name": "memory-warm-sync", + "store": "memory" + }, + "k": 10, + "metric": "l2", + "records": 10000, + "rerank": "fixed", + "rerank_multiplier": 8 + }, + "command": [ + "cargo", + "bench", + "--quiet", + "--all-features", + "--bench", + "prolly_proximity_bench" + ], + "completed_at": "2026-09-12T14:52:10.325340+00:00", + "disposition": "completed", + "sha256": "e9d86b21452d82bf3d5cbcd9aff4d1a7a8750724785b571a6d5eed62f701aef3" +} diff --git a/performance-results/proximity-turboquant/qualification-10k-d768-l2-k10-all-b4-r8-warm-sync-shard/status.json b/performance-results/proximity-turboquant/qualification-10k-d768-l2-k10-all-b4-r8-warm-sync-shard/status.json new file mode 100644 index 00000000..089aefd0 --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-10k-d768-l2-k10-all-b4-r8-warm-sync-shard/status.json @@ -0,0 +1,11 @@ +{ + "complete": true, + "completed_cells": 1, + "expected_cells": 1, + "failed": [], + "finished_at": "2026-09-12T14:52:16.388380+00:00", + "revision": "92be88dc3933259f4d75dffce91645a7ce67afb9", + "schema": "prolly-turboquant-qualification-v2", + "typed_scalability_failures": 0, + "wasm_smoke": false +} diff --git a/performance-results/proximity-turboquant/qualification-1k-cosine-k10-all-b4-r8-arm64.csv b/performance-results/proximity-turboquant/qualification-1k-cosine-k10-all-b4-r8-arm64.csv new file mode 100644 index 00000000..eaf489f6 --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-1k-cosine-k10-all-b4-r8-arm64.csv @@ -0,0 +1,222 @@ +prolly proximity benchmark +revision=71aae3d6d3dd0df11b92959a1579188117d8e079 +compiler=rustc 1.97.0 (2d8144b78 2026-07-07) | binary: rustc | commit-hash: 2d8144b7880597b6e6d3dfd63a9a9efae3f533d3 | commit-date: 2026-07-07 | host: aarch64-apple-darwin | release: 1.97.0 | LLVM version: 22.1.6 +target_arch=aarch64 +target_os=macos +store=memory +records=1000 +profile=complete +search_repeats=30 +metric=Cosine +k=10 +eligibility_ppm=1000000 +turboquant_bits=4 +rerank_multiplier=8 +search_cache=warm +search_order=scalar-first +operation,dimensions,threads,micros,metric_a,metric_b +build,128,2,19283.833,4975,196 +source_closure_bytes,128,0,0.000,1310732,205 +search_exact_scalar,128,0,267.122,98,1000 +recall_exact,128,0,0,1.000000,0 +search_exact_simd,128,0,254.356,98,1000 +search_adaptive_sq8,128,0,24.549,4,56 +localized_mutation,128,0,15692.250,31,130 +content_graph_copy,128,0,1466.583,205,1310732 +content_graph_gc_plan,128,0,1272.875,205,0 +search_proof_generate,128,0,1530.042,1296,205 +search_proof_verify,128,0,6647.458,1296,10 +turboquant_build,128,2,2943.625,128000,72000 +turboquant_build_resources,128,2,0.000,82176,1792000 +turboquant_sidecar_bytes,128,0,0.000,76699,72000 +turboquant_manifest_code_bytes,128,0,0.000,136,76563 +turboquant_search_scalar,128,0,266.333,1000,80 +turboquant_search_scalar_p95,128,0,375.750,114320,0 +turboquant_search_scalar_p99,128,0,406.125,80,510912 +turboquant_search_scalar_work,128,0,0.000,80,1 +turboquant_recall,128,0,0,1.000000,0.009084863929752423 +turboquant_search_simd,128,0,277.750,1000,80 +turboquant_search_simd_p95,128,0,313.292,114320,0 +turboquant_search_simd_p99,128,0,313.541,80,510912 +turboquant_search_simd_work,128,0,0.000,80,1 +turboquant_search_auto,128,0,267.041,1000,80 +turboquant_search_auto_p95,128,0,289.375,114320,0 +turboquant_search_auto_p99,128,0,405.542,80,510912 +turboquant_search_auto_work,128,0,0.000,80,1 +pq_build,128,2,3720.834,512000,1000 +pq_sidecar_bytes,128,0,0.000,20914,1000 +pq_manifest_code_bytes,128,0,0.000,8351,12563 +pq_search,128,0,140.333,80,80 +pq_search_p95,128,0,206.042,50320,0 +pq_search_p99,128,0,261.625,80,510912 +pq_search_work,128,0,0.000,80,1 +pq_recall,128,0,0,1.000000,0 +hnsw_build,128,0,124874.667,906255,17170 +hnsw_search,128,0,735.500,193,212 +composite_build,128,0,487.125,1,854 +composite_search,128,0,2095.375,351,370 +async_search,128,0,1558.250,98,1000 +build,200,2,22075.791,4975,266 +source_closure_bytes,200,0,0.000,2035953,275 +search_exact_scalar,200,0,346.407,133,1000 +recall_exact,200,0,0,1.000000,0 +search_exact_simd,200,0,324.192,133,1000 +search_adaptive_sq8,200,0,31.744,4,62 +localized_mutation,200,0,19041.500,10,209 +content_graph_copy,200,0,1940.125,275,2035953 +content_graph_gc_plan,200,0,1773.500,275,0 +search_proof_generate,200,0,2034.583,1401,275 +search_proof_verify,200,0,9576.083,1401,10 +turboquant_build,200,2,4230.750,200000,108000 +turboquant_build_resources,200,2,0.000,126744,1200000 +turboquant_sidecar_bytes,200,0,0.000,112699,108000 +turboquant_manifest_code_bytes,200,0,0.000,136,112563 +turboquant_search_scalar,200,0,348.750,1000,80 +turboquant_search_scalar_p95,200,0,453.458,173360,0 +turboquant_search_scalar_p99,200,0,461.541,80,764064 +turboquant_search_scalar_work,200,0,0.000,80,1 +turboquant_recall,200,0,0,1.000000,0.0092870686046772 +turboquant_search_simd,200,0,363.916,1000,80 +turboquant_search_simd_p95,200,0,371.583,173360,0 +turboquant_search_simd_p99,200,0,408.125,80,764064 +turboquant_search_simd_work,200,0,0.000,80,1 +turboquant_search_auto,200,0,407.417,1000,80 +turboquant_search_auto_p95,200,0,450.583,173360,0 +turboquant_search_auto_p99,200,0,460.958,80,764064 +turboquant_search_auto_work,200,0,0.000,80,1 +pq_build,200,2,6349.375,512000,1000 +pq_sidecar_bytes,200,0,0.000,25522,1000 +pq_manifest_code_bytes,200,0,0.000,12959,12563 +pq_search,200,0,172.792,80,80 +pq_search_p95,200,0,211.792,73360,0 +pq_search_p99,200,0,253.750,80,764064 +pq_search_work,200,0,0.000,80,1 +pq_recall,200,0,0,1.000000,0 +hnsw_build,200,0,174881.583,913060,17170 +hnsw_search,200,0,897.333,193,212 +composite_build,200,0,662.583,1,1142 +composite_search,200,0,2691.292,349,369 +async_search,200,0,2013.333,133,1000 +build,768,2,72284.500,4975,984 +source_closure_bytes,768,0,0.000,8997674,993 +search_exact_scalar,768,0,1103.851,492,1000 +recall_exact,768,0,0,1.000000,0 +search_exact_simd,768,0,926.988,492,1000 +search_adaptive_sq8,768,0,71.967,13,47 +localized_mutation,768,0,61738.666,15,726 +content_graph_copy,768,0,8158.125,993,8997674 +content_graph_gc_plan,768,0,7458.917,993,0 +search_proof_generate,768,0,8172.208,2478,993 +search_proof_verify,768,0,40757.750,2478,10 +turboquant_build,768,2,15481.083,768000,392000 +turboquant_build_resources,768,2,0.000,478336,12288000 +turboquant_sidecar_bytes,768,0,0.000,397699,392000 +turboquant_manifest_code_bytes,768,0,0.000,136,397563 +turboquant_search_scalar,768,0,982.834,1000,80 +turboquant_search_scalar_p95,768,0,1131.500,639120,0 +turboquant_search_scalar_p99,768,0,1253.542,80,2761152 +turboquant_search_scalar_work,768,0,0.000,80,1 +turboquant_recall,768,0,0,1.000000,0.009398999275658305 +turboquant_search_simd,768,0,1045.500,1000,80 +turboquant_search_simd_p95,768,0,1151.334,639120,0 +turboquant_search_simd_p99,768,0,1209.875,80,2761152 +turboquant_search_simd_work,768,0,0.000,80,1 +turboquant_search_auto,768,0,986.083,1000,80 +turboquant_search_auto_p95,768,0,1033.250,639120,0 +turboquant_search_auto_p99,768,0,1141.208,80,2761152 +turboquant_search_auto_work,768,0,0.000,80,1 +pq_build,768,2,25951.084,512000,1000 +pq_sidecar_bytes,768,0,0.000,61874,1000 +pq_manifest_code_bytes,768,0,0.000,49311,12563 +pq_search,768,0,226.667,80,80 +pq_search_p95,768,0,244.709,255120,0 +pq_search_p99,768,0,318.042,80,2761152 +pq_search_work,768,0,0.000,80,1 +pq_recall,768,0,0,1.000000,0 +hnsw_build,768,0,623919.791,906070,17170 +hnsw_search,768,0,2143.083,191,210 +composite_build,768,0,2126.583,1,3414 +composite_search,768,0,7572.208,352,372 +async_search,768,0,7123.833,492,1000 +build,1536,2,49739.583,4975,1012 +source_closure_bytes,1536,0,0.000,13955558,1021 +search_exact_scalar,1536,0,1793.240,6,1000 +recall_exact,1536,0,0,1.000000,0 +search_exact_simd,1536,0,1475.190,6,1000 +search_adaptive_sq8,1536,0,1496.879,6,1005 +localized_mutation,1536,0,46543.542,6,738 +content_graph_copy,1536,0,12854.791,1021,13955558 +content_graph_gc_plan,1536,0,11687.250,1021,0 +search_proof_generate,1536,0,12623.458,1020,1021 +search_proof_verify,1536,0,59182.459,1020,10 +turboquant_build,1536,2,30199.375,1536000,776000 +turboquant_build_resources,1536,2,0.000,953728,27648000 +turboquant_sidecar_bytes,1536,0,0.000,781699,776000 +turboquant_manifest_code_bytes,1536,0,0.000,136,781563 +turboquant_search_scalar,1536,0,1854.375,1000,80 +turboquant_search_scalar_p95,1536,0,2021.917,1268880,0 +turboquant_search_scalar_p99,1536,0,2273.417,80,5461440 +turboquant_search_scalar_work,1536,0,0.000,80,1 +turboquant_recall,1536,0,0,1.000000,0.009506780434081168 +turboquant_search_simd,1536,0,1981.084,1000,80 +turboquant_search_simd_p95,1536,0,2127.667,1268880,0 +turboquant_search_simd_p99,1536,0,2202.084,80,5461440 +turboquant_search_simd_work,1536,0,0.000,80,1 +turboquant_search_auto,1536,0,1859.292,1000,80 +turboquant_search_auto_p95,1536,0,2005.208,1268880,0 +turboquant_search_auto_p99,1536,0,2036.167,80,5461440 +turboquant_search_auto_work,1536,0,0.000,80,1 +pq_build,1536,2,52472.333,512000,1000 +pq_sidecar_bytes,1536,0,0.000,111034,1000 +pq_manifest_code_bytes,1536,0,0.000,98471,12563 +pq_search,1536,0,331.875,80,80 +pq_search_p95,1536,0,396.416,500880,0 +pq_search_p99,1536,0,430.042,80,5461440 +pq_search_work,1536,0,0.000,80,1 +pq_recall,1536,0,0,1.000000,0 +hnsw_build,1536,0,1232662.292,900899,17170 +hnsw_search,1536,0,3831.833,192,212 +composite_build,1536,0,4482.500,1,6486 +composite_search,1536,0,14464.125,352,371 +async_search,1536,0,10977.416,6,1000 +build,3072,2,99477.875,4975,1012 +source_closure_bytes,3072,0,0.000,27788390,1021 +search_exact_scalar,3072,0,3457.092,6,1000 +recall_exact,3072,0,0,1.000000,0 +search_exact_simd,3072,0,2884.525,6,1000 +search_adaptive_sq8,3072,0,2915.381,6,1005 +localized_mutation,3072,0,92917.083,6,738 +content_graph_copy,3072,0,24611.500,1021,27788390 +content_graph_gc_plan,3072,0,22432.208,1021,0 +search_proof_generate,3072,0,24593.417,1020,1021 +search_proof_verify,3072,0,116521.500,1020,10 +turboquant_build,3072,2,59693.833,3072000,1544000 +turboquant_build_resources,3072,2,0.000,1904512,61440000 +turboquant_sidecar_bytes,3072,0,0.000,1549699,1544000 +turboquant_manifest_code_bytes,3072,0,0.000,136,1549563 +turboquant_search_scalar,3072,0,3594.042,1000,80 +turboquant_search_scalar_p95,3072,0,4461.625,2528400,0 +turboquant_search_scalar_p99,3072,0,4503.667,80,10862016 +turboquant_search_scalar_work,3072,0,0.000,80,1 +turboquant_recall,3072,0,0,1.000000,0.009414197352732821 +turboquant_search_simd,3072,0,3828.167,1000,80 +turboquant_search_simd_p95,3072,0,3982.917,2528400,0 +turboquant_search_simd_p99,3072,0,4005.083,80,10862016 +turboquant_search_simd_work,3072,0,0.000,80,1 +turboquant_search_auto,3072,0,3586.083,1000,80 +turboquant_search_auto_p95,3072,0,3768.917,2528400,0 +turboquant_search_auto_p99,3072,0,3851.042,80,10862016 +turboquant_search_auto_work,3072,0,0.000,80,1 +pq_build,3072,2,127792.875,512000,1000 +pq_sidecar_bytes,3072,0,0.000,209338,1000 +pq_manifest_code_bytes,3072,0,0.000,196775,12563 +pq_search,3072,0,551.083,80,80 +pq_search_p95,3072,0,647.125,992400,0 +pq_search_p99,3072,0,647.291,80,10862016 +pq_search_work,3072,0,0.000,80,1 +pq_recall,3072,0,0,1.000000,0 +hnsw_build,3072,0,2469927.291,888161,17170 +hnsw_search,3072,0,8085.334,191,211 +composite_build,3072,0,9201.209,1,12630 +composite_search,3072,0,29072.166,352,371 +async_search,3072,0,20745.333,6,1000 diff --git a/performance-results/proximity-turboquant/qualification-1k-inner-product-k10-all-b4-r8-arm64.csv b/performance-results/proximity-turboquant/qualification-1k-inner-product-k10-all-b4-r8-arm64.csv new file mode 100644 index 00000000..2370e9ed --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-1k-inner-product-k10-all-b4-r8-arm64.csv @@ -0,0 +1,222 @@ +prolly proximity benchmark +revision=71aae3d6d3dd0df11b92959a1579188117d8e079 +compiler=rustc 1.97.0 (2d8144b78 2026-07-07) | binary: rustc | commit-hash: 2d8144b7880597b6e6d3dfd63a9a9efae3f533d3 | commit-date: 2026-07-07 | host: aarch64-apple-darwin | release: 1.97.0 | LLVM version: 22.1.6 +target_arch=aarch64 +target_os=macos +store=memory +records=1000 +profile=complete +search_repeats=30 +metric=InnerProduct +k=10 +eligibility_ppm=1000000 +turboquant_bits=4 +rerank_multiplier=8 +search_cache=warm +search_order=scalar-first +operation,dimensions,threads,micros,metric_a,metric_b +build,128,2,18600.791,4975,196 +source_closure_bytes,128,0,0.000,1310732,205 +search_exact_scalar,128,0,255.701,98,1000 +recall_exact,128,0,0,1.000000,0 +search_exact_simd,128,0,249.110,98,1000 +search_adaptive_sq8,128,0,22.826,4,56 +localized_mutation,128,0,15685.875,31,130 +content_graph_copy,128,0,1361.958,205,1310732 +content_graph_gc_plan,128,0,1257.917,205,0 +search_proof_generate,128,0,1452.833,1296,205 +search_proof_verify,128,0,6525.833,1296,10 +turboquant_build,128,2,3031.459,128000,72000 +turboquant_build_resources,128,2,0.000,82176,1792000 +turboquant_sidecar_bytes,128,0,0.000,76699,72000 +turboquant_manifest_code_bytes,128,0,0.000,136,76563 +turboquant_search_scalar,128,0,265.083,1000,80 +turboquant_search_scalar_p95,128,0,274.416,114320,0 +turboquant_search_scalar_p99,128,0,371.084,80,510912 +turboquant_search_scalar_work,128,0,0.000,80,1 +turboquant_recall,128,0,0,1.000000,0.009084863923947771 +turboquant_search_simd,128,0,277.041,1000,80 +turboquant_search_simd_p95,128,0,286.000,114320,0 +turboquant_search_simd_p99,128,0,428.875,80,510912 +turboquant_search_simd_work,128,0,0.000,80,1 +turboquant_search_auto,128,0,268.375,1000,80 +turboquant_search_auto_p95,128,0,282.291,114320,0 +turboquant_search_auto_p99,128,0,373.292,80,510912 +turboquant_search_auto_work,128,0,0.000,80,1 +pq_build,128,2,3682.084,512000,1000 +pq_sidecar_bytes,128,0,0.000,20914,1000 +pq_manifest_code_bytes,128,0,0.000,8351,12563 +pq_search,128,0,139.000,80,80 +pq_search_p95,128,0,145.458,50320,0 +pq_search_p99,128,0,205.708,80,510912 +pq_search_work,128,0,0.000,80,1 +pq_recall,128,0,0,1.000000,0 +hnsw_build,128,0,121726.833,935292,17170 +hnsw_search,128,0,719.834,186,205 +composite_build,128,0,506.625,1,854 +composite_search,128,0,2140.459,315,337 +async_search,128,0,1450.833,98,1000 +build,200,2,21641.417,4975,266 +source_closure_bytes,200,0,0.000,2035953,275 +search_exact_scalar,200,0,349.861,133,1000 +recall_exact,200,0,0,1.000000,0 +search_exact_simd,200,0,318.194,133,1000 +search_adaptive_sq8,200,0,30.929,4,62 +localized_mutation,200,0,19713.375,10,209 +content_graph_copy,200,0,1897.583,275,2035953 +content_graph_gc_plan,200,0,1911.000,275,0 +search_proof_generate,200,0,2115.041,1401,275 +search_proof_verify,200,0,9252.584,1401,10 +turboquant_build,200,2,4097.500,200000,108000 +turboquant_build_resources,200,2,0.000,126744,1200000 +turboquant_sidecar_bytes,200,0,0.000,112699,108000 +turboquant_manifest_code_bytes,200,0,0.000,136,112563 +turboquant_search_scalar,200,0,345.083,1000,80 +turboquant_search_scalar_p95,200,0,468.958,173360,0 +turboquant_search_scalar_p99,200,0,470.334,80,764064 +turboquant_search_scalar_work,200,0,0.000,80,1 +turboquant_recall,200,0,0,1.000000,0.009287068601969777 +turboquant_search_simd,200,0,361.292,1000,80 +turboquant_search_simd_p95,200,0,387.167,173360,0 +turboquant_search_simd_p99,200,0,460.208,80,764064 +turboquant_search_simd_work,200,0,0.000,80,1 +turboquant_search_auto,200,0,346.334,1000,80 +turboquant_search_auto_p95,200,0,389.084,173360,0 +turboquant_search_auto_p99,200,0,416.291,80,764064 +turboquant_search_auto_work,200,0,0.000,80,1 +pq_build,200,2,5467.167,512000,1000 +pq_sidecar_bytes,200,0,0.000,25522,1000 +pq_manifest_code_bytes,200,0,0.000,12959,12563 +pq_search,200,0,149.250,80,80 +pq_search_p95,200,0,187.625,73360,0 +pq_search_p99,200,0,219.166,80,764064 +pq_search_work,200,0,0.000,80,1 +pq_recall,200,0,0,1.000000,0 +hnsw_build,200,0,170410.667,941789,17170 +hnsw_search,200,0,894.208,189,208 +composite_build,200,0,669.708,1,1142 +composite_search,200,0,2693.375,347,368 +async_search,200,0,2127.250,133,1000 +build,768,2,70152.833,4975,984 +source_closure_bytes,768,0,0.000,8997674,993 +search_exact_scalar,768,0,1140.526,492,1000 +recall_exact,768,0,0,1.000000,0 +search_exact_simd,768,0,975.672,492,1000 +search_adaptive_sq8,768,0,70.835,13,47 +localized_mutation,768,0,62076.542,15,726 +content_graph_copy,768,0,8749.167,993,8997674 +content_graph_gc_plan,768,0,7513.166,993,0 +search_proof_generate,768,0,8509.166,2478,993 +search_proof_verify,768,0,40250.834,2478,10 +turboquant_build,768,2,15228.208,768000,392000 +turboquant_build_resources,768,2,0.000,478336,12288000 +turboquant_sidecar_bytes,768,0,0.000,397699,392000 +turboquant_manifest_code_bytes,768,0,0.000,136,397563 +turboquant_search_scalar,768,0,981.875,1000,80 +turboquant_search_scalar_p95,768,0,1120.000,639120,0 +turboquant_search_scalar_p99,768,0,1249.042,80,2761152 +turboquant_search_scalar_work,768,0,0.000,80,1 +turboquant_recall,768,0,0,1.000000,0.009398999273620362 +turboquant_search_simd,768,0,1046.500,1000,80 +turboquant_search_simd_p95,768,0,1120.041,639120,0 +turboquant_search_simd_p99,768,0,1208.541,80,2761152 +turboquant_search_simd_work,768,0,0.000,80,1 +turboquant_search_auto,768,0,983.917,1000,80 +turboquant_search_auto_p95,768,0,1129.875,639120,0 +turboquant_search_auto_p99,768,0,1146.375,80,2761152 +turboquant_search_auto_work,768,0,0.000,80,1 +pq_build,768,2,25760.833,512000,1000 +pq_sidecar_bytes,768,0,0.000,61874,1000 +pq_manifest_code_bytes,768,0,0.000,49311,12563 +pq_search,768,0,223.958,80,80 +pq_search_p95,768,0,283.083,255120,0 +pq_search_p99,768,0,308.333,80,2761152 +pq_search_work,768,0,0.000,80,1 +pq_recall,768,0,0,1.000000,0 +hnsw_build,768,0,631268.083,917553,17170 +hnsw_search,768,0,2107.584,190,209 +composite_build,768,0,2240.667,1,3414 +composite_search,768,0,7741.958,352,372 +async_search,768,0,7177.125,492,1000 +build,1536,2,45622.000,4975,1012 +source_closure_bytes,1536,0,0.000,13955558,1021 +search_exact_scalar,1536,0,1759.942,6,1000 +recall_exact,1536,0,0,1.000000,0 +search_exact_simd,1536,0,1466.951,6,1000 +search_adaptive_sq8,1536,0,1480.669,6,1005 +localized_mutation,1536,0,46543.542,6,738 +content_graph_copy,1536,0,13227.583,1021,13955558 +content_graph_gc_plan,1536,0,11722.292,1021,0 +search_proof_generate,1536,0,12637.458,1020,1021 +search_proof_verify,1536,0,58479.667,1020,10 +turboquant_build,1536,2,30274.333,1536000,776000 +turboquant_build_resources,1536,2,0.000,953728,27648000 +turboquant_sidecar_bytes,1536,0,0.000,781699,776000 +turboquant_manifest_code_bytes,1536,0,0.000,136,781563 +turboquant_search_scalar,1536,0,1854.667,1000,80 +turboquant_search_scalar_p95,1536,0,1987.625,1268880,0 +turboquant_search_scalar_p99,1536,0,2386.292,80,5461440 +turboquant_search_scalar_work,1536,0,0.000,80,1 +turboquant_recall,1536,0,0,1.000000,0.009506780434235784 +turboquant_search_simd,1536,0,1975.042,1000,80 +turboquant_search_simd_p95,1536,0,2121.166,1268880,0 +turboquant_search_simd_p99,1536,0,2126.916,80,5461440 +turboquant_search_simd_work,1536,0,0.000,80,1 +turboquant_search_auto,1536,0,1846.667,1000,80 +turboquant_search_auto_p95,1536,0,1986.834,1268880,0 +turboquant_search_auto_p99,1536,0,1997.416,80,5461440 +turboquant_search_auto_work,1536,0,0.000,80,1 +pq_build,1536,2,52293.791,512000,1000 +pq_sidecar_bytes,1536,0,0.000,111034,1000 +pq_manifest_code_bytes,1536,0,0.000,98471,12563 +pq_search,1536,0,328.208,80,80 +pq_search_p95,1536,0,437.334,500880,0 +pq_search_p99,1536,0,476.583,80,5461440 +pq_search_work,1536,0,0.000,80,1 +pq_recall,1536,0,0,1.000000,0 +hnsw_build,1536,0,1238848.834,903459,17170 +hnsw_search,1536,0,3879.125,191,211 +composite_build,1536,0,4795.000,1,6486 +composite_search,1536,0,14691.959,352,371 +async_search,1536,0,10611.958,6,1000 +build,3072,2,91374.792,4975,1012 +source_closure_bytes,3072,0,0.000,27788390,1021 +search_exact_scalar,3072,0,3406.110,6,1000 +recall_exact,3072,0,0,1.000000,0 +search_exact_simd,3072,0,2868.171,6,1000 +search_adaptive_sq8,3072,0,2887.222,6,1005 +localized_mutation,3072,0,93648.583,6,738 +content_graph_copy,3072,0,25388.875,1021,27788390 +content_graph_gc_plan,3072,0,23412.500,1021,0 +search_proof_generate,3072,0,24444.375,1020,1021 +search_proof_verify,3072,0,119839.167,1020,10 +turboquant_build,3072,2,60331.625,3072000,1544000 +turboquant_build_resources,3072,2,0.000,1904512,61440000 +turboquant_sidecar_bytes,3072,0,0.000,1549699,1544000 +turboquant_manifest_code_bytes,3072,0,0.000,136,1549563 +turboquant_search_scalar,3072,0,3572.291,1000,80 +turboquant_search_scalar_p95,3072,0,4342.459,2528400,0 +turboquant_search_scalar_p99,3072,0,4789.667,80,10862016 +turboquant_search_scalar_work,3072,0,0.000,80,1 +turboquant_recall,3072,0,0,1.000000,0.00941419735177133 +turboquant_search_simd,3072,0,3817.333,1000,80 +turboquant_search_simd_p95,3072,0,3984.541,2528400,0 +turboquant_search_simd_p99,3072,0,4009.875,80,10862016 +turboquant_search_simd_work,3072,0,0.000,80,1 +turboquant_search_auto,3072,0,3564.166,1000,80 +turboquant_search_auto_p95,3072,0,3732.542,2528400,0 +turboquant_search_auto_p99,3072,0,3819.125,80,10862016 +turboquant_search_auto_work,3072,0,0.000,80,1 +pq_build,3072,2,127527.625,512000,1000 +pq_sidecar_bytes,3072,0,0.000,209338,1000 +pq_manifest_code_bytes,3072,0,0.000,196775,12563 +pq_search,3072,0,535.208,80,80 +pq_search_p95,3072,0,652.833,992400,0 +pq_search_p99,3072,0,653.250,80,10862016 +pq_search_work,3072,0,0.000,80,1 +pq_recall,3072,0,0,1.000000,0 +hnsw_build,3072,0,2440067.042,888143,17170 +hnsw_search,3072,0,7313.666,191,211 +composite_build,3072,0,11184.500,1,12630 +composite_search,3072,0,28829.333,352,371 +async_search,3072,0,21148.291,6,1000 diff --git a/performance-results/proximity-turboquant/qualification-1k-l2-k10-all-b4-r8-arm64.csv b/performance-results/proximity-turboquant/qualification-1k-l2-k10-all-b4-r8-arm64.csv new file mode 100644 index 00000000..d677e637 --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-1k-l2-k10-all-b4-r8-arm64.csv @@ -0,0 +1,222 @@ +prolly proximity benchmark +revision=71aae3d6d3dd0df11b92959a1579188117d8e079 +compiler=rustc 1.97.0 (2d8144b78 2026-07-07) | binary: rustc | commit-hash: 2d8144b7880597b6e6d3dfd63a9a9efae3f533d3 | commit-date: 2026-07-07 | host: aarch64-apple-darwin | release: 1.97.0 | LLVM version: 22.1.6 +target_arch=aarch64 +target_os=macos +store=memory +records=1000 +profile=complete +search_repeats=30 +metric=L2Squared +k=10 +eligibility_ppm=1000000 +turboquant_bits=4 +rerank_multiplier=8 +search_cache=warm +search_order=scalar-first +operation,dimensions,threads,micros,metric_a,metric_b +build,128,2,22825.291,4975,196 +source_closure_bytes,128,0,0.000,1310732,205 +search_exact_scalar,128,0,161.558,42,434 +recall_exact,128,0,0,1.000000,0 +search_exact_simd,128,0,121.149,42,434 +search_adaptive_sq8,128,0,24.479,4,56 +localized_mutation,128,0,16346.000,31,130 +content_graph_copy,128,0,1432.583,205,1310732 +content_graph_gc_plan,128,0,1250.583,205,0 +search_proof_generate,128,0,2004.416,560,205 +search_proof_verify,128,0,7306.542,560,10 +turboquant_build,128,2,2904.042,128000,72000 +turboquant_build_resources,128,2,0.000,82176,1792000 +turboquant_sidecar_bytes,128,0,0.000,76699,72000 +turboquant_manifest_code_bytes,128,0,0.000,136,76563 +turboquant_search_scalar,128,0,282.917,1000,80 +turboquant_search_scalar_p95,128,0,299.875,114320,0 +turboquant_search_scalar_p99,128,0,397.042,80,510912 +turboquant_search_scalar_work,128,0,0.000,80,1 +turboquant_recall,128,0,0,1.000000,0.009084863923947771 +turboquant_search_simd,128,0,286.333,1000,80 +turboquant_search_simd_p95,128,0,301.291,114320,0 +turboquant_search_simd_p99,128,0,333.625,80,510912 +turboquant_search_simd_work,128,0,0.000,80,1 +turboquant_search_auto,128,0,274.958,1000,80 +turboquant_search_auto_p95,128,0,283.917,114320,0 +turboquant_search_auto_p99,128,0,288.250,80,510912 +turboquant_search_auto_work,128,0,0.000,80,1 +pq_build,128,2,3871.333,512000,1000 +pq_sidecar_bytes,128,0,0.000,20914,1000 +pq_manifest_code_bytes,128,0,0.000,8351,12563 +pq_search,128,0,147.625,80,80 +pq_search_p95,128,0,151.375,50320,0 +pq_search_p99,128,0,212.959,80,510912 +pq_search_work,128,0,0.000,80,1 +pq_recall,128,0,0,1.000000,0 +hnsw_build,128,0,129759.250,905481,17170 +hnsw_search,128,0,763.833,194,212 +composite_build,128,0,438.458,1,854 +composite_search,128,0,2129.000,355,373 +async_search,128,0,1007.708,42,434 +build,200,2,22677.959,4975,266 +source_closure_bytes,200,0,0.000,2035953,275 +search_exact_scalar,200,0,156.063,45,381 +recall_exact,200,0,0,1.000000,0 +search_exact_simd,200,0,146.582,45,381 +search_adaptive_sq8,200,0,43.478,7,85 +localized_mutation,200,0,19759.708,7,212 +content_graph_copy,200,0,1950.250,275,2035953 +content_graph_gc_plan,200,0,2123.375,275,0 +search_proof_generate,200,0,2711.291,516,275 +search_proof_verify,200,0,9375.583,516,10 +turboquant_build,200,2,4175.958,200000,108000 +turboquant_build_resources,200,2,0.000,126744,1200000 +turboquant_sidecar_bytes,200,0,0.000,112699,108000 +turboquant_manifest_code_bytes,200,0,0.000,136,112563 +turboquant_search_scalar,200,0,370.125,1000,80 +turboquant_search_scalar_p95,200,0,401.375,173360,0 +turboquant_search_scalar_p99,200,0,497.458,80,764064 +turboquant_search_scalar_work,200,0,0.000,80,1 +turboquant_recall,200,0,0,1.000000,0.009287068601969777 +turboquant_search_simd,200,0,380.416,1000,80 +turboquant_search_simd_p95,200,0,392.292,173360,0 +turboquant_search_simd_p99,200,0,467.000,80,764064 +turboquant_search_simd_work,200,0,0.000,80,1 +turboquant_search_auto,200,0,347.625,1000,80 +turboquant_search_auto_p95,200,0,383.958,173360,0 +turboquant_search_auto_p99,200,0,413.833,80,764064 +turboquant_search_auto_work,200,0,0.000,80,1 +pq_build,200,2,5702.667,512000,1000 +pq_sidecar_bytes,200,0,0.000,25522,1000 +pq_manifest_code_bytes,200,0,0.000,12959,12563 +pq_search,200,0,152.292,80,80 +pq_search_p95,200,0,165.333,73360,0 +pq_search_p99,200,0,215.125,80,764064 +pq_search_work,200,0,0.000,80,1 +pq_recall,200,0,0,1.000000,0 +hnsw_build,200,0,178412.834,913579,17170 +hnsw_search,200,0,917.834,197,217 +composite_build,200,0,635.708,1,1142 +composite_search,200,0,2869.458,350,373 +async_search,200,0,1430.292,45,381 +build,768,2,75232.584,4975,978 +source_closure_bytes,768,0,0.000,8985425,987 +search_exact_scalar,768,0,377.140,119,275 +recall_exact,768,0,0,1.000000,0 +search_exact_simd,768,0,303.368,119,275 +search_adaptive_sq8,768,0,74.288,13,46 +localized_mutation,768,0,64090.208,15,722 +content_graph_copy,768,0,9243.292,987,8985425 +content_graph_gc_plan,768,0,8253.750,987,0 +search_proof_generate,768,0,9702.708,632,987 +search_proof_verify,768,0,39503.375,632,10 +turboquant_build,768,2,15636.708,768000,392000 +turboquant_build_resources,768,2,0.000,478336,12288000 +turboquant_sidecar_bytes,768,0,0.000,397699,392000 +turboquant_manifest_code_bytes,768,0,0.000,136,397563 +turboquant_search_scalar,768,0,1017.250,1000,80 +turboquant_search_scalar_p95,768,0,1122.209,639120,0 +turboquant_search_scalar_p99,768,0,1329.000,80,2761152 +turboquant_search_scalar_work,768,0,0.000,80,1 +turboquant_recall,768,0,0,1.000000,0.009398999273620362 +turboquant_search_simd,768,0,1110.875,1000,80 +turboquant_search_simd_p95,768,0,1174.583,639120,0 +turboquant_search_simd_p99,768,0,1179.875,80,2761152 +turboquant_search_simd_work,768,0,0.000,80,1 +turboquant_search_auto,768,0,1052.833,1000,80 +turboquant_search_auto_p95,768,0,1103.458,639120,0 +turboquant_search_auto_p99,768,0,1273.417,80,2761152 +turboquant_search_auto_work,768,0,0.000,80,1 +pq_build,768,2,27193.916,512000,1000 +pq_sidecar_bytes,768,0,0.000,61874,1000 +pq_manifest_code_bytes,768,0,0.000,49311,12563 +pq_search,768,0,223.458,80,80 +pq_search_p95,768,0,269.750,255120,0 +pq_search_p99,768,0,351.916,80,2761152 +pq_search_work,768,0,0.000,80,1 +pq_recall,768,0,0,1.000000,0 +hnsw_build,768,0,650496.750,906724,17170 +hnsw_search,768,0,2103.333,193,212 +composite_build,768,0,2297.792,1,3414 +composite_search,768,0,7993.625,353,373 +async_search,768,0,4023.584,119,275 +build,1536,2,50782.875,4975,1012 +source_closure_bytes,1536,0,0.000,13955558,1021 +search_exact_scalar,1536,0,1379.529,3,735 +recall_exact,1536,0,0,1.000000,0 +search_exact_simd,1536,0,1093.810,3,735 +search_adaptive_sq8,1536,0,1636.054,6,1005 +localized_mutation,1536,0,48509.833,6,738 +content_graph_copy,1536,0,13030.708,1021,13955558 +content_graph_gc_plan,1536,0,12532.833,1021,0 +search_proof_generate,1536,0,15476.709,746,1021 +search_proof_verify,1536,0,63478.291,746,10 +turboquant_build,1536,2,31542.250,1536000,776000 +turboquant_build_resources,1536,2,0.000,953728,27648000 +turboquant_sidecar_bytes,1536,0,0.000,781699,776000 +turboquant_manifest_code_bytes,1536,0,0.000,136,781563 +turboquant_search_scalar,1536,0,2011.500,1000,80 +turboquant_search_scalar_p95,1536,0,2095.541,1268880,0 +turboquant_search_scalar_p99,1536,0,2473.792,80,5461440 +turboquant_search_scalar_work,1536,0,0.000,80,1 +turboquant_recall,1536,0,0,1.000000,0.009506780434235784 +turboquant_search_simd,1536,0,2145.041,1000,80 +turboquant_search_simd_p95,1536,0,2214.916,1268880,0 +turboquant_search_simd_p99,1536,0,2218.000,80,5461440 +turboquant_search_simd_work,1536,0,0.000,80,1 +turboquant_search_auto,1536,0,1981.875,1000,80 +turboquant_search_auto_p95,1536,0,2070.542,1268880,0 +turboquant_search_auto_p99,1536,0,2122.375,80,5461440 +turboquant_search_auto_work,1536,0,0.000,80,1 +pq_build,1536,2,57376.083,512000,1000 +pq_sidecar_bytes,1536,0,0.000,111034,1000 +pq_manifest_code_bytes,1536,0,0.000,98471,12563 +pq_search,1536,0,359.708,80,80 +pq_search_p95,1536,0,469.708,500880,0 +pq_search_p99,1536,0,502.208,80,5461440 +pq_search_work,1536,0,0.000,80,1 +pq_recall,1536,0,0,1.000000,0 +hnsw_build,1536,0,1295282.208,900520,17170 +hnsw_search,1536,0,3733.542,192,212 +composite_build,1536,0,4706.709,1,6486 +composite_search,1536,0,15117.292,352,372 +async_search,1536,0,8613.791,3,735 +build,3072,2,95718.000,4975,1012 +source_closure_bytes,3072,0,0.000,27788390,1021 +search_exact_scalar,3072,0,2699.600,3,735 +recall_exact,3072,0,0,1.000000,0 +search_exact_simd,3072,0,2218.981,3,735 +search_adaptive_sq8,3072,0,3105.179,6,1005 +localized_mutation,3072,0,97302.166,6,738 +content_graph_copy,3072,0,25338.750,1021,27788390 +content_graph_gc_plan,3072,0,23222.750,1021,0 +search_proof_generate,3072,0,30489.625,746,1021 +search_proof_verify,3072,0,125872.000,746,10 +turboquant_build,3072,2,62204.917,3072000,1544000 +turboquant_build_resources,3072,2,0.000,1904512,61440000 +turboquant_sidecar_bytes,3072,0,0.000,1549699,1544000 +turboquant_manifest_code_bytes,3072,0,0.000,136,1549563 +turboquant_search_scalar,3072,0,3752.000,1000,80 +turboquant_search_scalar_p95,3072,0,3945.500,2528400,0 +turboquant_search_scalar_p99,3072,0,4430.708,80,10862016 +turboquant_search_scalar_work,3072,0,0.000,80,1 +turboquant_recall,3072,0,0,1.000000,0.00941419735177133 +turboquant_search_simd,3072,0,4097.167,1000,80 +turboquant_search_simd_p95,3072,0,4229.916,2528400,0 +turboquant_search_simd_p99,3072,0,4362.833,80,10862016 +turboquant_search_simd_work,3072,0,0.000,80,1 +turboquant_search_auto,3072,0,3790.375,1000,80 +turboquant_search_auto_p95,3072,0,3949.791,2528400,0 +turboquant_search_auto_p99,3072,0,3950.667,80,10862016 +turboquant_search_auto_work,3072,0,0.000,80,1 +pq_build,3072,2,134326.000,512000,1000 +pq_sidecar_bytes,3072,0,0.000,209338,1000 +pq_manifest_code_bytes,3072,0,0.000,196775,12563 +pq_search,3072,0,586.083,80,80 +pq_search_p95,3072,0,627.584,992400,0 +pq_search_p99,3072,0,719.125,80,10862016 +pq_search_work,3072,0,0.000,80,1 +pq_recall,3072,0,0,1.000000,0 +hnsw_build,3072,0,2479822.333,887380,17170 +hnsw_search,3072,0,7054.375,191,211 +composite_build,3072,0,9075.959,1,12630 +composite_search,3072,0,27939.625,352,371 +async_search,3072,0,16581.250,3,735 diff --git a/performance-results/proximity-turboquant/qualification-v3-100k-d768-cosine-k10-all-b4-r16-warm-sync-shard/compile.log b/performance-results/proximity-turboquant/qualification-v3-100k-d768-cosine-k10-all-b4-r16-warm-sync-shard/compile.log new file mode 100644 index 00000000..a03f45fb --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v3-100k-d768-cosine-k10-all-b4-r16-warm-sync-shard/compile.log @@ -0,0 +1,2 @@ + Finished `bench` profile [optimized] target(s) in 0.07s + Executable benches/prolly_proximity_bench.rs (target/release/deps/prolly_proximity_bench-88edf17ca838c569) diff --git a/performance-results/proximity-turboquant/qualification-v3-100k-d768-cosine-k10-all-b4-r16-warm-sync-shard/manifest.json b/performance-results/proximity-turboquant/qualification-v3-100k-d768-cosine-k10-all-b4-r16-warm-sync-shard/manifest.json new file mode 100644 index 00000000..aad62cd2 --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v3-100k-d768-cosine-k10-all-b4-r16-warm-sync-shard/manifest.json @@ -0,0 +1,63 @@ +{ + "contract": { + "benchmark_schema_version": 3, + "dataset": "linear-mod-2000003-v2", + "environments": [ + { + "async_quantizers": false, + "cold": false, + "name": "memory-warm-sync", + "store": "memory" + }, + { + "async_quantizers": false, + "cold": true, + "name": "memory-cold-sync", + "store": "memory" + }, + { + "async_quantizers": false, + "cold": false, + "name": "file-warm-sync", + "store": "file" + }, + { + "async_quantizers": false, + "cold": true, + "name": "file-cold-sync", + "store": "file" + }, + { + "async_quantizers": true, + "cold": false, + "name": "memory-warm-async", + "store": "memory" + }, + { + "async_quantizers": true, + "cold": true, + "name": "memory-cold-async", + "store": "memory" + } + ], + "exhaustive_max_records": 10000, + "full_cell_count": 45360, + "full_matrix_digest": "a4c137363c5cffe5390a2959217017321f5f17daabf2babb83c52f17a3571d9f", + "max_cell_records": null, + "profile": "full", + "revision": "be8e5aef66447059f06a5fb54c2f6ed213e265bd", + "schema": "prolly-turboquant-qualification-v3", + "search_repeats": 30, + "shard_cell_count": 1, + "shard_count": 1000000, + "shard_index": 198811, + "shard_matrix_digest": "bee644e22810145bf22a6200ab09019eb96486af6153b25788233cb390e94825", + "wasm_smoke": false, + "workers": [ + 1, + 2, + 4 + ] + }, + "created_at": "2026-09-12T19:45:36.260590+00:00" +} diff --git a/performance-results/proximity-turboquant/qualification-v3-100k-d768-cosine-k10-all-b4-r16-warm-sync-shard/raw/n100000-d768-cosine-k10-eall-b4-r16-fixed-memory-warm-sync.csv b/performance-results/proximity-turboquant/qualification-v3-100k-d768-cosine-k10-all-b4-r16-warm-sync-shard/raw/n100000-d768-cosine-k10-eall-b4-r16-fixed-memory-warm-sync.csv new file mode 100644 index 00000000..aec35651 --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v3-100k-d768-cosine-k10-all-b4-r16-warm-sync-shard/raw/n100000-d768-cosine-k10-eall-b4-r16-fixed-memory-warm-sync.csv @@ -0,0 +1,64 @@ +prolly proximity benchmark +schema_version=3 +dataset=linear-mod-2000003-v2 +revision=be8e5aef66447059f06a5fb54c2f6ed213e265bd +compiler=rustc 1.97.0 (2d8144b78 2026-07-07) | binary: rustc | commit-hash: 2d8144b7880597b6e6d3dfd63a9a9efae3f533d3 | commit-date: 2026-07-07 | host: aarch64-apple-darwin | release: 1.97.0 | LLVM version: 22.1.6 +target_arch=aarch64 +target_os=macos +machine=Haipings-Mac-Studio.local +store=memory +seed=0 +records=100000 +profile=quantizers +search_repeats=30 +metric=Cosine +k=10 +eligibility_ppm=1000000 +effective_k=10 +turboquant_bits=4 +rerank_multiplier=16 +search_cache=warm +search_order=scalar-first +async_quantizers=false +operation,dimensions,threads,micros,metric_a,metric_b +source_build,768,0,10874425.583,100000,0 +source_closure_bytes,768,0,0.000,904537606,101255 +turboquant_build,768,1,1374123.083,76800000,39200000 +turboquant_build_resources,768,1,0.000,1864126,1228800000 +turboquant_build,768,2,885350.667,76800000,39200000 +turboquant_build_resources,768,2,0.000,1864126,1228800000 +turboquant_build,768,4,650412.584,76800000,39200000 +turboquant_build_resources,768,4,0.000,1864126,1228800000 +turboquant_sidecar_bytes,768,0,0.000,39757465,39200000 +turboquant_manifest_code_bytes,768,0,0.000,137,39757328 +turboquant_search_scalar,768,0,168466.125,100000,160 +turboquant_search_scalar_p95,768,0,363069.458,39694240,41430374 +turboquant_search_scalar_p99,768,0,395284.084,160,1683729 +turboquant_search_scalar_work,768,0,0.000,160,1 +turboquant_search_scalar_io,768,0,0.000,100160,662 +turboquant_search_scalar_rerank,768,0,0.000,160,39694240 +turboquant_recall,768,0,0,0.500000,0.009057112353809613 +turboquant_search_simd,768,0,196625.791,100000,160 +turboquant_search_simd_p95,768,0,266242.042,39694240,41430374 +turboquant_search_simd_p99,768,0,293127.833,160,1683729 +turboquant_search_simd_work,768,0,0.000,160,1 +turboquant_search_simd_io,768,0,0.000,100160,662 +turboquant_search_simd_rerank,768,0,0.000,160,39694240 +turboquant_search_auto,768,0,144205.917,100000,160 +turboquant_search_auto_p95,768,0,199518.375,39694240,41430374 +turboquant_search_auto_p99,768,0,206676.041,160,1683729 +turboquant_search_auto_work,768,0,0.000,160,1 +turboquant_search_auto_io,768,0,0.000,100160,662 +turboquant_search_auto_rerank,768,0,0.000,160,39694240 +pq_build,768,1,4578507.209,33554432,100000 +pq_build,768,2,2868392.791,33554432,100000 +pq_build,768,4,2312583.791,33554432,100000 +pq_sidecar_bytes,768,0,0.000,1306641,100000 +pq_manifest_code_bytes,768,0,0.000,49313,1257328 +pq_search,768,0,13402.375,100000,160 +pq_search_p95,768,0,16979.917,1294240,0 +pq_search_p99,768,0,17927.584,160,1099458 +pq_search_work,768,0,0.000,160,1 +pq_search_io,768,0,0.000,100160,0 +pq_search_rerank,768,0,0.000,160,1294240 +pq_recall,768,0,0,0.000000,0 diff --git a/performance-results/proximity-turboquant/qualification-v3-100k-d768-cosine-k10-all-b4-r16-warm-sync-shard/state/n100000-d768-cosine-k10-eall-b4-r16-fixed-memory-warm-sync.json b/performance-results/proximity-turboquant/qualification-v3-100k-d768-cosine-k10-all-b4-r16-warm-sync-shard/state/n100000-d768-cosine-k10-eall-b4-r16-fixed-memory-warm-sync.json new file mode 100644 index 00000000..a2e2886e --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v3-100k-d768-cosine-k10-all-b4-r16-warm-sync-shard/state/n100000-d768-cosine-k10-eall-b4-r16-fixed-memory-warm-sync.json @@ -0,0 +1,29 @@ +{ + "cell": { + "bits": 4, + "dimensions": 768, + "eligibility_ppm": 1000000, + "environment": { + "async_quantizers": false, + "cold": false, + "name": "memory-warm-sync", + "store": "memory" + }, + "k": 10, + "metric": "cosine", + "records": 100000, + "rerank": "fixed", + "rerank_multiplier": 16 + }, + "command": [ + "cargo", + "bench", + "--quiet", + "--all-features", + "--bench", + "prolly_proximity_bench" + ], + "completed_at": "2026-09-12T19:46:27.648144+00:00", + "disposition": "completed", + "sha256": "29d14e6c70db0c5ba348fa6e8d3cc359167dde6c596f171990e3f6cf9d1c4c93" +} diff --git a/performance-results/proximity-turboquant/qualification-v3-100k-d768-cosine-k10-all-b4-r16-warm-sync-shard/status.json b/performance-results/proximity-turboquant/qualification-v3-100k-d768-cosine-k10-all-b4-r16-warm-sync-shard/status.json new file mode 100644 index 00000000..c1006c95 --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v3-100k-d768-cosine-k10-all-b4-r16-warm-sync-shard/status.json @@ -0,0 +1,11 @@ +{ + "complete": true, + "completed_cells": 1, + "expected_cells": 1, + "failed": [], + "finished_at": "2026-09-12T19:46:28.004400+00:00", + "revision": "be8e5aef66447059f06a5fb54c2f6ed213e265bd", + "schema": "prolly-turboquant-qualification-v3", + "typed_scalability_failures": 0, + "wasm_smoke": false +} diff --git a/performance-results/proximity-turboquant/qualification-v3-100k-d768-cosine-k10-all-b4-r16-warm-sync-shard/stderr/n100000-d768-cosine-k10-eall-b4-r16-fixed-memory-warm-sync.log b/performance-results/proximity-turboquant/qualification-v3-100k-d768-cosine-k10-all-b4-r16-warm-sync-shard/stderr/n100000-d768-cosine-k10-eall-b4-r16-fixed-memory-warm-sync.log new file mode 100644 index 00000000..e69de29b diff --git a/performance-results/proximity-turboquant/qualification-v3-100k-d768-cosine-k10-all-b4-r8-warm-sync-shard/compile.log b/performance-results/proximity-turboquant/qualification-v3-100k-d768-cosine-k10-all-b4-r8-warm-sync-shard/compile.log new file mode 100644 index 00000000..a03f45fb --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v3-100k-d768-cosine-k10-all-b4-r8-warm-sync-shard/compile.log @@ -0,0 +1,2 @@ + Finished `bench` profile [optimized] target(s) in 0.07s + Executable benches/prolly_proximity_bench.rs (target/release/deps/prolly_proximity_bench-88edf17ca838c569) diff --git a/performance-results/proximity-turboquant/qualification-v3-100k-d768-cosine-k10-all-b4-r8-warm-sync-shard/manifest.json b/performance-results/proximity-turboquant/qualification-v3-100k-d768-cosine-k10-all-b4-r8-warm-sync-shard/manifest.json new file mode 100644 index 00000000..55f913aa --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v3-100k-d768-cosine-k10-all-b4-r8-warm-sync-shard/manifest.json @@ -0,0 +1,63 @@ +{ + "contract": { + "benchmark_schema_version": 3, + "dataset": "linear-mod-2000003-v2", + "environments": [ + { + "async_quantizers": false, + "cold": false, + "name": "memory-warm-sync", + "store": "memory" + }, + { + "async_quantizers": false, + "cold": true, + "name": "memory-cold-sync", + "store": "memory" + }, + { + "async_quantizers": false, + "cold": false, + "name": "file-warm-sync", + "store": "file" + }, + { + "async_quantizers": false, + "cold": true, + "name": "file-cold-sync", + "store": "file" + }, + { + "async_quantizers": true, + "cold": false, + "name": "memory-warm-async", + "store": "memory" + }, + { + "async_quantizers": true, + "cold": true, + "name": "memory-cold-async", + "store": "memory" + } + ], + "exhaustive_max_records": 10000, + "full_cell_count": 45360, + "full_matrix_digest": "a4c137363c5cffe5390a2959217017321f5f17daabf2babb83c52f17a3571d9f", + "max_cell_records": null, + "profile": "full", + "revision": "be8e5aef66447059f06a5fb54c2f6ed213e265bd", + "schema": "prolly-turboquant-qualification-v3", + "search_repeats": 30, + "shard_cell_count": 1, + "shard_count": 1000000, + "shard_index": 550539, + "shard_matrix_digest": "0753eff1c0b2594bb15ce5b41d67229ef040916817c208c3cb9256a1cc4ccd01", + "wasm_smoke": false, + "workers": [ + 1, + 2, + 4 + ] + }, + "created_at": "2026-09-12T19:44:51.650940+00:00" +} diff --git a/performance-results/proximity-turboquant/qualification-v3-100k-d768-cosine-k10-all-b4-r8-warm-sync-shard/raw/n100000-d768-cosine-k10-eall-b4-r8-fixed-memory-warm-sync.csv b/performance-results/proximity-turboquant/qualification-v3-100k-d768-cosine-k10-all-b4-r8-warm-sync-shard/raw/n100000-d768-cosine-k10-eall-b4-r8-fixed-memory-warm-sync.csv new file mode 100644 index 00000000..7c8fbe64 --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v3-100k-d768-cosine-k10-all-b4-r8-warm-sync-shard/raw/n100000-d768-cosine-k10-eall-b4-r8-fixed-memory-warm-sync.csv @@ -0,0 +1,64 @@ +prolly proximity benchmark +schema_version=3 +dataset=linear-mod-2000003-v2 +revision=be8e5aef66447059f06a5fb54c2f6ed213e265bd +compiler=rustc 1.97.0 (2d8144b78 2026-07-07) | binary: rustc | commit-hash: 2d8144b7880597b6e6d3dfd63a9a9efae3f533d3 | commit-date: 2026-07-07 | host: aarch64-apple-darwin | release: 1.97.0 | LLVM version: 22.1.6 +target_arch=aarch64 +target_os=macos +machine=Haipings-Mac-Studio.local +store=memory +seed=0 +records=100000 +profile=quantizers +search_repeats=30 +metric=Cosine +k=10 +eligibility_ppm=1000000 +effective_k=10 +turboquant_bits=4 +rerank_multiplier=8 +search_cache=warm +search_order=scalar-first +async_quantizers=false +operation,dimensions,threads,micros,metric_a,metric_b +source_build,768,0,12143495.000,100000,0 +source_closure_bytes,768,0,0.000,904537606,101255 +turboquant_build,768,1,1461024.708,76800000,39200000 +turboquant_build_resources,768,1,0.000,1864126,1228800000 +turboquant_build,768,2,946265.708,76800000,39200000 +turboquant_build_resources,768,2,0.000,1864126,1228800000 +turboquant_build,768,4,662580.250,76800000,39200000 +turboquant_build_resources,768,4,0.000,1864126,1228800000 +turboquant_sidecar_bytes,768,0,0.000,39757465,39200000 +turboquant_manifest_code_bytes,768,0,0.000,137,39757328 +turboquant_search_scalar,768,0,123932.084,100000,80 +turboquant_search_scalar_p95,768,0,130667.625,39447120,40542295 +turboquant_search_scalar_p99,768,0,159257.750,80,782161 +turboquant_search_scalar_work,768,0,0.000,80,1 +turboquant_search_scalar_io,768,0,0.000,100080,659 +turboquant_search_scalar_rerank,768,0,0.000,80,39447120 +turboquant_recall,768,0,0,0.000000,0.009057112353809613 +turboquant_search_simd,768,0,174764.792,100000,80 +turboquant_search_simd_p95,768,0,177818.917,39447120,40542295 +turboquant_search_simd_p99,768,0,180484.958,80,782161 +turboquant_search_simd_work,768,0,0.000,80,1 +turboquant_search_simd_io,768,0,0.000,100080,659 +turboquant_search_simd_rerank,768,0,0.000,80,39447120 +turboquant_search_auto,768,0,123336.708,100000,80 +turboquant_search_auto_p95,768,0,133789.417,39447120,40542295 +turboquant_search_auto_p99,768,0,150282.583,80,782161 +turboquant_search_auto_work,768,0,0.000,80,1 +turboquant_search_auto_io,768,0,0.000,100080,659 +turboquant_search_auto_rerank,768,0,0.000,80,39447120 +pq_build,768,1,3567232.334,33554432,100000 +pq_build,768,2,2578561.708,33554432,100000 +pq_build,768,4,2145767.458,33554432,100000 +pq_sidecar_bytes,768,0,0.000,1306641,100000 +pq_manifest_code_bytes,768,0,0.000,49313,1257328 +pq_search,768,0,12494.084,100000,80 +pq_search_p95,768,0,12777.958,1047120,0 +pq_search_p99,768,0,12941.458,80,829299 +pq_search_work,768,0,0.000,80,1 +pq_search_io,768,0,0.000,100080,0 +pq_search_rerank,768,0,0.000,80,1047120 +pq_recall,768,0,0,0.000000,0 diff --git a/performance-results/proximity-turboquant/qualification-v3-100k-d768-cosine-k10-all-b4-r8-warm-sync-shard/state/n100000-d768-cosine-k10-eall-b4-r8-fixed-memory-warm-sync.json b/performance-results/proximity-turboquant/qualification-v3-100k-d768-cosine-k10-all-b4-r8-warm-sync-shard/state/n100000-d768-cosine-k10-eall-b4-r8-fixed-memory-warm-sync.json new file mode 100644 index 00000000..7ef35109 --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v3-100k-d768-cosine-k10-all-b4-r8-warm-sync-shard/state/n100000-d768-cosine-k10-eall-b4-r8-fixed-memory-warm-sync.json @@ -0,0 +1,29 @@ +{ + "cell": { + "bits": 4, + "dimensions": 768, + "eligibility_ppm": 1000000, + "environment": { + "async_quantizers": false, + "cold": false, + "name": "memory-warm-sync", + "store": "memory" + }, + "k": 10, + "metric": "cosine", + "records": 100000, + "rerank": "fixed", + "rerank_multiplier": 8 + }, + "command": [ + "cargo", + "bench", + "--quiet", + "--all-features", + "--bench", + "prolly_proximity_bench" + ], + "completed_at": "2026-09-12T19:45:35.717222+00:00", + "disposition": "completed", + "sha256": "108882737efcbc2850b2c95c7b1477c124a8c665af94bca9cfb0b1d0e3a98724" +} diff --git a/performance-results/proximity-turboquant/qualification-v3-100k-d768-cosine-k10-all-b4-r8-warm-sync-shard/status.json b/performance-results/proximity-turboquant/qualification-v3-100k-d768-cosine-k10-all-b4-r8-warm-sync-shard/status.json new file mode 100644 index 00000000..a46aa068 --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v3-100k-d768-cosine-k10-all-b4-r8-warm-sync-shard/status.json @@ -0,0 +1,11 @@ +{ + "complete": true, + "completed_cells": 1, + "expected_cells": 1, + "failed": [], + "finished_at": "2026-09-12T19:45:36.054457+00:00", + "revision": "be8e5aef66447059f06a5fb54c2f6ed213e265bd", + "schema": "prolly-turboquant-qualification-v3", + "typed_scalability_failures": 0, + "wasm_smoke": false +} diff --git a/performance-results/proximity-turboquant/qualification-v3-100k-d768-cosine-k10-all-b4-r8-warm-sync-shard/stderr/n100000-d768-cosine-k10-eall-b4-r8-fixed-memory-warm-sync.log b/performance-results/proximity-turboquant/qualification-v3-100k-d768-cosine-k10-all-b4-r8-warm-sync-shard/stderr/n100000-d768-cosine-k10-eall-b4-r8-fixed-memory-warm-sync.log new file mode 100644 index 00000000..e69de29b diff --git a/performance-results/proximity-turboquant/qualification-v3-100k-d768-inner-product-k10-all-b4-r16-warm-sync-shard/compile.log b/performance-results/proximity-turboquant/qualification-v3-100k-d768-inner-product-k10-all-b4-r16-warm-sync-shard/compile.log new file mode 100644 index 00000000..c88a4385 --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v3-100k-d768-inner-product-k10-all-b4-r16-warm-sync-shard/compile.log @@ -0,0 +1,7 @@ + Blocking waiting for file lock on package cache + Blocking waiting for file lock on package cache + Blocking waiting for file lock on package cache + Blocking waiting for file lock on shared package cache + Blocking waiting for file lock on build directory + Finished `bench` profile [optimized] target(s) in 0.12s + Executable benches/prolly_proximity_bench.rs (target/release/deps/prolly_proximity_bench-88edf17ca838c569) diff --git a/performance-results/proximity-turboquant/qualification-v3-100k-d768-inner-product-k10-all-b4-r16-warm-sync-shard/manifest.json b/performance-results/proximity-turboquant/qualification-v3-100k-d768-inner-product-k10-all-b4-r16-warm-sync-shard/manifest.json new file mode 100644 index 00000000..891c1806 --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v3-100k-d768-inner-product-k10-all-b4-r16-warm-sync-shard/manifest.json @@ -0,0 +1,63 @@ +{ + "contract": { + "benchmark_schema_version": 3, + "dataset": "linear-mod-2000003-v2", + "environments": [ + { + "async_quantizers": false, + "cold": false, + "name": "memory-warm-sync", + "store": "memory" + }, + { + "async_quantizers": false, + "cold": true, + "name": "memory-cold-sync", + "store": "memory" + }, + { + "async_quantizers": false, + "cold": false, + "name": "file-warm-sync", + "store": "file" + }, + { + "async_quantizers": false, + "cold": true, + "name": "file-cold-sync", + "store": "file" + }, + { + "async_quantizers": true, + "cold": false, + "name": "memory-warm-async", + "store": "memory" + }, + { + "async_quantizers": true, + "cold": true, + "name": "memory-cold-async", + "store": "memory" + } + ], + "exhaustive_max_records": 10000, + "full_cell_count": 45360, + "full_matrix_digest": "a4c137363c5cffe5390a2959217017321f5f17daabf2babb83c52f17a3571d9f", + "max_cell_records": null, + "profile": "full", + "revision": "d79fbf0c267711b2707582f4a1d2bbd8a6cde6d9", + "schema": "prolly-turboquant-qualification-v3", + "search_repeats": 30, + "shard_cell_count": 1, + "shard_count": 1000000, + "shard_index": 729950, + "shard_matrix_digest": "1bbc2d29edc5cd1e53d71067b73f00b21e338481bacdf4d2f1fd4149bacad28e", + "wasm_smoke": false, + "workers": [ + 1, + 2, + 4 + ] + }, + "created_at": "2026-09-12T20:05:54.203542+00:00" +} diff --git a/performance-results/proximity-turboquant/qualification-v3-100k-d768-inner-product-k10-all-b4-r16-warm-sync-shard/raw/n100000-d768-inner_product-k10-eall-b4-r16-fixed-memory-warm-sync.csv b/performance-results/proximity-turboquant/qualification-v3-100k-d768-inner-product-k10-all-b4-r16-warm-sync-shard/raw/n100000-d768-inner_product-k10-eall-b4-r16-fixed-memory-warm-sync.csv new file mode 100644 index 00000000..46840c36 --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v3-100k-d768-inner-product-k10-all-b4-r16-warm-sync-shard/raw/n100000-d768-inner_product-k10-eall-b4-r16-fixed-memory-warm-sync.csv @@ -0,0 +1,64 @@ +prolly proximity benchmark +schema_version=3 +dataset=linear-mod-2000003-v2 +revision=d79fbf0c267711b2707582f4a1d2bbd8a6cde6d9 +compiler=rustc 1.97.0 (2d8144b78 2026-07-07) | binary: rustc | commit-hash: 2d8144b7880597b6e6d3dfd63a9a9efae3f533d3 | commit-date: 2026-07-07 | host: aarch64-apple-darwin | release: 1.97.0 | LLVM version: 22.1.6 +target_arch=aarch64 +target_os=macos +machine=Haipings-Mac-Studio.local +store=memory +seed=0 +records=100000 +profile=quantizers +search_repeats=30 +metric=InnerProduct +k=10 +eligibility_ppm=1000000 +effective_k=10 +turboquant_bits=4 +rerank_multiplier=16 +search_cache=warm +search_order=scalar-first +async_quantizers=false +operation,dimensions,threads,micros,metric_a,metric_b +source_build,768,0,10789215.584,100000,0 +source_closure_bytes,768,0,0.000,910057491,103980 +turboquant_build,768,1,1417253.625,76800000,39200000 +turboquant_build_resources,768,1,0.000,1864126,1228800000 +turboquant_build,768,2,932839.166,76800000,39200000 +turboquant_build_resources,768,2,0.000,1864126,1228800000 +turboquant_build,768,4,710876.250,76800000,39200000 +turboquant_build_resources,768,4,0.000,1864126,1228800000 +turboquant_sidecar_bytes,768,0,0.000,39757465,39200000 +turboquant_manifest_code_bytes,768,0,0.000,137,39757328 +turboquant_search_scalar,768,0,120730.417,100000,160 +turboquant_search_scalar_p95,768,0,129837.375,39694240,40904374 +turboquant_search_scalar_p99,768,0,164138.375,160,1149739 +turboquant_search_scalar_work,768,0,0.000,160,1 +turboquant_search_scalar_io,768,0,0.000,100160,662 +turboquant_search_scalar_rerank,768,0,0.000,160,39694240 +turboquant_recall,768,0,0,1.000000,0.009057112352759421 +turboquant_search_simd,768,0,164638.042,100000,160 +turboquant_search_simd_p95,768,0,169432.792,39694240,40904374 +turboquant_search_simd_p99,768,0,174781.208,160,1149739 +turboquant_search_simd_work,768,0,0.000,160,1 +turboquant_search_simd_io,768,0,0.000,100160,662 +turboquant_search_simd_rerank,768,0,0.000,160,39694240 +turboquant_search_auto,768,0,118069.708,100000,160 +turboquant_search_auto_p95,768,0,120171.541,39694240,40904374 +turboquant_search_auto_p99,768,0,129597.458,160,1149739 +turboquant_search_auto_work,768,0,0.000,160,1 +turboquant_search_auto_io,768,0,0.000,100160,662 +turboquant_search_auto_rerank,768,0,0.000,160,39694240 +pq_build,768,1,3531704.042,33554432,100000 +pq_build,768,2,2610059.542,33554432,100000 +pq_build,768,4,2171166.167,33554432,100000 +pq_sidecar_bytes,768,0,0.000,1306641,100000 +pq_manifest_code_bytes,768,0,0.000,49313,1257328 +pq_search,768,0,12610.333,100000,160 +pq_search_p95,768,0,12964.209,1294240,0 +pq_search_p99,768,0,13009.459,160,1099458 +pq_search_work,768,0,0.000,160,1 +pq_search_io,768,0,0.000,100160,0 +pq_search_rerank,768,0,0.000,160,1294240 +pq_recall,768,0,0,0.000000,0 diff --git a/performance-results/proximity-turboquant/qualification-v3-100k-d768-inner-product-k10-all-b4-r16-warm-sync-shard/state/n100000-d768-inner_product-k10-eall-b4-r16-fixed-memory-warm-sync.json b/performance-results/proximity-turboquant/qualification-v3-100k-d768-inner-product-k10-all-b4-r16-warm-sync-shard/state/n100000-d768-inner_product-k10-eall-b4-r16-fixed-memory-warm-sync.json new file mode 100644 index 00000000..4914c446 --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v3-100k-d768-inner-product-k10-all-b4-r16-warm-sync-shard/state/n100000-d768-inner_product-k10-eall-b4-r16-fixed-memory-warm-sync.json @@ -0,0 +1,29 @@ +{ + "cell": { + "bits": 4, + "dimensions": 768, + "eligibility_ppm": 1000000, + "environment": { + "async_quantizers": false, + "cold": false, + "name": "memory-warm-sync", + "store": "memory" + }, + "k": 10, + "metric": "inner_product", + "records": 100000, + "rerank": "fixed", + "rerank_multiplier": 16 + }, + "command": [ + "cargo", + "bench", + "--quiet", + "--all-features", + "--bench", + "prolly_proximity_bench" + ], + "completed_at": "2026-09-12T20:06:36.322043+00:00", + "disposition": "completed", + "sha256": "16bbf9a708c4f16b1da76f3971f1d440cfc4bf6e4c6b9db6b78484c380ba938e" +} diff --git a/performance-results/proximity-turboquant/qualification-v3-100k-d768-inner-product-k10-all-b4-r16-warm-sync-shard/status.json b/performance-results/proximity-turboquant/qualification-v3-100k-d768-inner-product-k10-all-b4-r16-warm-sync-shard/status.json new file mode 100644 index 00000000..e2a7464e --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v3-100k-d768-inner-product-k10-all-b4-r16-warm-sync-shard/status.json @@ -0,0 +1,11 @@ +{ + "complete": true, + "completed_cells": 1, + "expected_cells": 1, + "failed": [], + "finished_at": "2026-09-12T20:06:50.822251+00:00", + "revision": "d79fbf0c267711b2707582f4a1d2bbd8a6cde6d9", + "schema": "prolly-turboquant-qualification-v3", + "typed_scalability_failures": 0, + "wasm_smoke": false +} diff --git a/performance-results/proximity-turboquant/qualification-v3-100k-d768-inner-product-k10-all-b4-r16-warm-sync-shard/stderr/n100000-d768-inner_product-k10-eall-b4-r16-fixed-memory-warm-sync.log b/performance-results/proximity-turboquant/qualification-v3-100k-d768-inner-product-k10-all-b4-r16-warm-sync-shard/stderr/n100000-d768-inner_product-k10-eall-b4-r16-fixed-memory-warm-sync.log new file mode 100644 index 00000000..e69de29b diff --git a/performance-results/proximity-turboquant/qualification-v3-100k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/compile.log b/performance-results/proximity-turboquant/qualification-v3-100k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/compile.log new file mode 100644 index 00000000..33e432ba --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v3-100k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/compile.log @@ -0,0 +1,7 @@ + Blocking waiting for file lock on package cache + Blocking waiting for file lock on package cache + Blocking waiting for file lock on package cache + Blocking waiting for file lock on package cache + Blocking waiting for file lock on build directory + Finished `bench` profile [optimized] target(s) in 0.10s + Executable benches/prolly_proximity_bench.rs (target/release/deps/prolly_proximity_bench-88edf17ca838c569) diff --git a/performance-results/proximity-turboquant/qualification-v3-100k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/manifest.json b/performance-results/proximity-turboquant/qualification-v3-100k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/manifest.json new file mode 100644 index 00000000..3d331a03 --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v3-100k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/manifest.json @@ -0,0 +1,63 @@ +{ + "contract": { + "benchmark_schema_version": 3, + "dataset": "linear-mod-2000003-v2", + "environments": [ + { + "async_quantizers": false, + "cold": false, + "name": "memory-warm-sync", + "store": "memory" + }, + { + "async_quantizers": false, + "cold": true, + "name": "memory-cold-sync", + "store": "memory" + }, + { + "async_quantizers": false, + "cold": false, + "name": "file-warm-sync", + "store": "file" + }, + { + "async_quantizers": false, + "cold": true, + "name": "file-cold-sync", + "store": "file" + }, + { + "async_quantizers": true, + "cold": false, + "name": "memory-warm-async", + "store": "memory" + }, + { + "async_quantizers": true, + "cold": true, + "name": "memory-cold-async", + "store": "memory" + } + ], + "exhaustive_max_records": 10000, + "full_cell_count": 45360, + "full_matrix_digest": "a4c137363c5cffe5390a2959217017321f5f17daabf2babb83c52f17a3571d9f", + "max_cell_records": null, + "profile": "full", + "revision": "d79fbf0c267711b2707582f4a1d2bbd8a6cde6d9", + "schema": "prolly-turboquant-qualification-v3", + "search_repeats": 30, + "shard_cell_count": 1, + "shard_count": 1000000, + "shard_index": 626636, + "shard_matrix_digest": "9d48ef6289ebec0c3211bb34e518969a75e9fd6cb7d3c46a3cb34f76762a0e08", + "wasm_smoke": false, + "workers": [ + 1, + 2, + 4 + ] + }, + "created_at": "2026-09-12T20:05:06.344455+00:00" +} diff --git a/performance-results/proximity-turboquant/qualification-v3-100k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/raw/n100000-d768-inner_product-k10-eall-b4-r8-fixed-memory-warm-sync.csv b/performance-results/proximity-turboquant/qualification-v3-100k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/raw/n100000-d768-inner_product-k10-eall-b4-r8-fixed-memory-warm-sync.csv new file mode 100644 index 00000000..256f1f74 --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v3-100k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/raw/n100000-d768-inner_product-k10-eall-b4-r8-fixed-memory-warm-sync.csv @@ -0,0 +1,64 @@ +prolly proximity benchmark +schema_version=3 +dataset=linear-mod-2000003-v2 +revision=d79fbf0c267711b2707582f4a1d2bbd8a6cde6d9 +compiler=rustc 1.97.0 (2d8144b78 2026-07-07) | binary: rustc | commit-hash: 2d8144b7880597b6e6d3dfd63a9a9efae3f533d3 | commit-date: 2026-07-07 | host: aarch64-apple-darwin | release: 1.97.0 | LLVM version: 22.1.6 +target_arch=aarch64 +target_os=macos +machine=Haipings-Mac-Studio.local +store=memory +seed=0 +records=100000 +profile=quantizers +search_repeats=30 +metric=InnerProduct +k=10 +eligibility_ppm=1000000 +effective_k=10 +turboquant_bits=4 +rerank_multiplier=8 +search_cache=warm +search_order=scalar-first +async_quantizers=false +operation,dimensions,threads,micros,metric_a,metric_b +source_build,768,0,10850263.792,100000,0 +source_closure_bytes,768,0,0.000,910057491,103980 +turboquant_build,768,1,1307655.167,76800000,39200000 +turboquant_build_resources,768,1,0.000,1864126,1228800000 +turboquant_build,768,2,846273.792,76800000,39200000 +turboquant_build_resources,768,2,0.000,1864126,1228800000 +turboquant_build,768,4,678642.541,76800000,39200000 +turboquant_build_resources,768,4,0.000,1864126,1228800000 +turboquant_sidecar_bytes,768,0,0.000,39757465,39200000 +turboquant_manifest_code_bytes,768,0,0.000,137,39757328 +turboquant_search_scalar,768,0,115012.917,100000,80 +turboquant_search_scalar_p95,768,0,125509.125,39447120,40542295 +turboquant_search_scalar_p99,768,0,127345.625,80,782161 +turboquant_search_scalar_work,768,0,0.000,80,1 +turboquant_search_scalar_io,768,0,0.000,100080,659 +turboquant_search_scalar_rerank,768,0,0.000,80,39447120 +turboquant_recall,768,0,0,0.000000,0.009057112352759421 +turboquant_search_simd,768,0,161963.291,100000,80 +turboquant_search_simd_p95,768,0,170002.208,39447120,40542295 +turboquant_search_simd_p99,768,0,176371.084,80,782161 +turboquant_search_simd_work,768,0,0.000,80,1 +turboquant_search_simd_io,768,0,0.000,100080,659 +turboquant_search_simd_rerank,768,0,0.000,80,39447120 +turboquant_search_auto,768,0,117244.667,100000,80 +turboquant_search_auto_p95,768,0,157891.292,39447120,40542295 +turboquant_search_auto_p99,768,0,158014.000,80,782161 +turboquant_search_auto_work,768,0,0.000,80,1 +turboquant_search_auto_io,768,0,0.000,100080,659 +turboquant_search_auto_rerank,768,0,0.000,80,39447120 +pq_build,768,1,3526469.375,33554432,100000 +pq_build,768,2,2624969.541,33554432,100000 +pq_build,768,4,2170284.250,33554432,100000 +pq_sidecar_bytes,768,0,0.000,1306641,100000 +pq_manifest_code_bytes,768,0,0.000,49313,1257328 +pq_search,768,0,11637.458,100000,80 +pq_search_p95,768,0,12944.125,1047120,0 +pq_search_p99,768,0,14059.625,80,829299 +pq_search_work,768,0,0.000,80,1 +pq_search_io,768,0,0.000,100080,0 +pq_search_rerank,768,0,0.000,80,1047120 +pq_recall,768,0,0,0.000000,0 diff --git a/performance-results/proximity-turboquant/qualification-v3-100k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/state/n100000-d768-inner_product-k10-eall-b4-r8-fixed-memory-warm-sync.json b/performance-results/proximity-turboquant/qualification-v3-100k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/state/n100000-d768-inner_product-k10-eall-b4-r8-fixed-memory-warm-sync.json new file mode 100644 index 00000000..ffe38075 --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v3-100k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/state/n100000-d768-inner_product-k10-eall-b4-r8-fixed-memory-warm-sync.json @@ -0,0 +1,29 @@ +{ + "cell": { + "bits": 4, + "dimensions": 768, + "eligibility_ppm": 1000000, + "environment": { + "async_quantizers": false, + "cold": false, + "name": "memory-warm-sync", + "store": "memory" + }, + "k": 10, + "metric": "inner_product", + "records": 100000, + "rerank": "fixed", + "rerank_multiplier": 8 + }, + "command": [ + "cargo", + "bench", + "--quiet", + "--all-features", + "--bench", + "prolly_proximity_bench" + ], + "completed_at": "2026-09-12T20:05:48.244982+00:00", + "disposition": "completed", + "sha256": "d04b5c720c1d2084309211a949518d770e9dda20910907413d786d8707e61f8d" +} diff --git a/performance-results/proximity-turboquant/qualification-v3-100k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/status.json b/performance-results/proximity-turboquant/qualification-v3-100k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/status.json new file mode 100644 index 00000000..5b433c9c --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v3-100k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/status.json @@ -0,0 +1,11 @@ +{ + "complete": true, + "completed_cells": 1, + "expected_cells": 1, + "failed": [], + "finished_at": "2026-09-12T20:06:50.798102+00:00", + "revision": "d79fbf0c267711b2707582f4a1d2bbd8a6cde6d9", + "schema": "prolly-turboquant-qualification-v3", + "typed_scalability_failures": 0, + "wasm_smoke": false +} diff --git a/performance-results/proximity-turboquant/qualification-v3-100k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/stderr/n100000-d768-inner_product-k10-eall-b4-r8-fixed-memory-warm-sync.log b/performance-results/proximity-turboquant/qualification-v3-100k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/stderr/n100000-d768-inner_product-k10-eall-b4-r8-fixed-memory-warm-sync.log new file mode 100644 index 00000000..e69de29b diff --git a/performance-results/proximity-turboquant/qualification-v3-100k-d768-l2-k10-all-b4-r8-warm-sync-shard/compile.log b/performance-results/proximity-turboquant/qualification-v3-100k-d768-l2-k10-all-b4-r8-warm-sync-shard/compile.log new file mode 100644 index 00000000..da32c7ba --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v3-100k-d768-l2-k10-all-b4-r8-warm-sync-shard/compile.log @@ -0,0 +1,2 @@ + Finished `bench` profile [optimized] target(s) in 0.08s + Executable benches/prolly_proximity_bench.rs (target/release/deps/prolly_proximity_bench-88edf17ca838c569) diff --git a/performance-results/proximity-turboquant/qualification-v3-100k-d768-l2-k10-all-b4-r8-warm-sync-shard/manifest.json b/performance-results/proximity-turboquant/qualification-v3-100k-d768-l2-k10-all-b4-r8-warm-sync-shard/manifest.json new file mode 100644 index 00000000..13dd617f --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v3-100k-d768-l2-k10-all-b4-r8-warm-sync-shard/manifest.json @@ -0,0 +1,63 @@ +{ + "contract": { + "benchmark_schema_version": 3, + "dataset": "linear-mod-2000003-v2", + "environments": [ + { + "async_quantizers": false, + "cold": false, + "name": "memory-warm-sync", + "store": "memory" + }, + { + "async_quantizers": false, + "cold": true, + "name": "memory-cold-sync", + "store": "memory" + }, + { + "async_quantizers": false, + "cold": false, + "name": "file-warm-sync", + "store": "file" + }, + { + "async_quantizers": false, + "cold": true, + "name": "file-cold-sync", + "store": "file" + }, + { + "async_quantizers": true, + "cold": false, + "name": "memory-warm-async", + "store": "memory" + }, + { + "async_quantizers": true, + "cold": true, + "name": "memory-cold-async", + "store": "memory" + } + ], + "exhaustive_max_records": 10000, + "full_cell_count": 45360, + "full_matrix_digest": "a4c137363c5cffe5390a2959217017321f5f17daabf2babb83c52f17a3571d9f", + "max_cell_records": null, + "profile": "full", + "revision": "f08e7dfa604bcc4bfd1c406d4c5e4dfcc8550d09", + "schema": "prolly-turboquant-qualification-v3", + "search_repeats": 30, + "shard_cell_count": 1, + "shard_count": 1000000, + "shard_index": 472514, + "shard_matrix_digest": "e20020960a8655029a5bd5f01b52b87fdcb690bff5450684c14f10c2ff3b54f4", + "wasm_smoke": false, + "workers": [ + 1, + 2, + 4 + ] + }, + "created_at": "2026-09-12T19:24:39.854175+00:00" +} diff --git a/performance-results/proximity-turboquant/qualification-v3-100k-d768-l2-k10-all-b4-r8-warm-sync-shard/raw/n100000-d768-l2-k10-eall-b4-r8-fixed-memory-warm-sync.csv b/performance-results/proximity-turboquant/qualification-v3-100k-d768-l2-k10-all-b4-r8-warm-sync-shard/raw/n100000-d768-l2-k10-eall-b4-r8-fixed-memory-warm-sync.csv new file mode 100644 index 00000000..0a14f887 --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v3-100k-d768-l2-k10-all-b4-r8-warm-sync-shard/raw/n100000-d768-l2-k10-eall-b4-r8-fixed-memory-warm-sync.csv @@ -0,0 +1,64 @@ +prolly proximity benchmark +schema_version=3 +dataset=linear-mod-2000003-v2 +revision=f08e7dfa604bcc4bfd1c406d4c5e4dfcc8550d09 +compiler=rustc 1.97.0 (2d8144b78 2026-07-07) | binary: rustc | commit-hash: 2d8144b7880597b6e6d3dfd63a9a9efae3f533d3 | commit-date: 2026-07-07 | host: aarch64-apple-darwin | release: 1.97.0 | LLVM version: 22.1.6 +target_arch=aarch64 +target_os=macos +machine=Haipings-Mac-Studio.local +store=memory +seed=0 +records=100000 +profile=quantizers +search_repeats=30 +metric=L2Squared +k=10 +eligibility_ppm=1000000 +effective_k=10 +turboquant_bits=4 +rerank_multiplier=8 +search_cache=warm +search_order=scalar-first +async_quantizers=false +operation,dimensions,threads,micros,metric_a,metric_b +source_build,768,0,12875246.291,100000,0 +source_closure_bytes,768,0,0.000,904586853,101274 +turboquant_build,768,1,1408778.167,76800000,39200000 +turboquant_build_resources,768,1,0.000,1864126,1228800000 +turboquant_build,768,2,1071143.208,76800000,39200000 +turboquant_build_resources,768,2,0.000,1864126,1228800000 +turboquant_build,768,4,722967.708,76800000,39200000 +turboquant_build_resources,768,4,0.000,1864126,1228800000 +turboquant_sidecar_bytes,768,0,0.000,39757465,39200000 +turboquant_manifest_code_bytes,768,0,0.000,137,39757328 +turboquant_search_scalar,768,0,115857.917,100000,80 +turboquant_search_scalar_p95,768,0,158371.750,39447120,40594917 +turboquant_search_scalar_p99,768,0,272438.875,80,835582 +turboquant_search_scalar_work,768,0,0.000,80,1 +turboquant_search_scalar_io,768,0,0.000,100080,660 +turboquant_search_scalar_rerank,768,0,0.000,80,39447120 +turboquant_recall,768,0,0,1.000000,0.009057112352759421 +turboquant_search_simd,768,0,162522.500,100000,80 +turboquant_search_simd_p95,768,0,169085.167,39447120,40594917 +turboquant_search_simd_p99,768,0,169139.958,80,835582 +turboquant_search_simd_work,768,0,0.000,80,1 +turboquant_search_simd_io,768,0,0.000,100080,660 +turboquant_search_simd_rerank,768,0,0.000,80,39447120 +turboquant_search_auto,768,0,112362.791,100000,80 +turboquant_search_auto_p95,768,0,116111.541,39447120,40594917 +turboquant_search_auto_p99,768,0,116115.291,80,835582 +turboquant_search_auto_work,768,0,0.000,80,1 +turboquant_search_auto_io,768,0,0.000,100080,660 +turboquant_search_auto_rerank,768,0,0.000,80,39447120 +pq_build,768,1,4410690.041,33554432,100000 +pq_build,768,2,2917690.750,33554432,100000 +pq_build,768,4,2282139.000,33554432,100000 +pq_sidecar_bytes,768,0,0.000,1306641,100000 +pq_manifest_code_bytes,768,0,0.000,49313,1257328 +pq_search,768,0,21696.166,100000,80 +pq_search_p95,768,0,40152.750,1047120,0 +pq_search_p99,768,0,42831.458,80,829299 +pq_search_work,768,0,0.000,80,1 +pq_search_io,768,0,0.000,100080,0 +pq_search_rerank,768,0,0.000,80,1047120 +pq_recall,768,0,0,0.000000,0 diff --git a/performance-results/proximity-turboquant/qualification-v3-100k-d768-l2-k10-all-b4-r8-warm-sync-shard/state/n100000-d768-l2-k10-eall-b4-r8-fixed-memory-warm-sync.json b/performance-results/proximity-turboquant/qualification-v3-100k-d768-l2-k10-all-b4-r8-warm-sync-shard/state/n100000-d768-l2-k10-eall-b4-r8-fixed-memory-warm-sync.json new file mode 100644 index 00000000..186a28b8 --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v3-100k-d768-l2-k10-all-b4-r8-warm-sync-shard/state/n100000-d768-l2-k10-eall-b4-r8-fixed-memory-warm-sync.json @@ -0,0 +1,29 @@ +{ + "cell": { + "bits": 4, + "dimensions": 768, + "eligibility_ppm": 1000000, + "environment": { + "async_quantizers": false, + "cold": false, + "name": "memory-warm-sync", + "store": "memory" + }, + "k": 10, + "metric": "l2", + "records": 100000, + "rerank": "fixed", + "rerank_multiplier": 8 + }, + "command": [ + "cargo", + "bench", + "--quiet", + "--all-features", + "--bench", + "prolly_proximity_bench" + ], + "completed_at": "2026-09-12T19:25:28.528467+00:00", + "disposition": "completed", + "sha256": "fa4beafc4a937f0678ed3828869602cb4ab09ba6b23fbfb761eadf8d0da1ad9e" +} diff --git a/performance-results/proximity-turboquant/qualification-v3-100k-d768-l2-k10-all-b4-r8-warm-sync-shard/status.json b/performance-results/proximity-turboquant/qualification-v3-100k-d768-l2-k10-all-b4-r8-warm-sync-shard/status.json new file mode 100644 index 00000000..6f481b03 --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v3-100k-d768-l2-k10-all-b4-r8-warm-sync-shard/status.json @@ -0,0 +1,11 @@ +{ + "complete": true, + "completed_cells": 1, + "expected_cells": 1, + "failed": [], + "finished_at": "2026-09-12T19:25:29.076867+00:00", + "revision": "f08e7dfa604bcc4bfd1c406d4c5e4dfcc8550d09", + "schema": "prolly-turboquant-qualification-v3", + "typed_scalability_failures": 0, + "wasm_smoke": false +} diff --git a/performance-results/proximity-turboquant/qualification-v3-100k-d768-l2-k10-all-b4-r8-warm-sync-shard/stderr/n100000-d768-l2-k10-eall-b4-r8-fixed-memory-warm-sync.log b/performance-results/proximity-turboquant/qualification-v3-100k-d768-l2-k10-all-b4-r8-warm-sync-shard/stderr/n100000-d768-l2-k10-eall-b4-r8-fixed-memory-warm-sync.log new file mode 100644 index 00000000..e69de29b diff --git a/performance-results/proximity-turboquant/qualification-v3-10k-d768-cosine-k10-all-b4-r16-warm-sync-shard/compile.log b/performance-results/proximity-turboquant/qualification-v3-10k-d768-cosine-k10-all-b4-r16-warm-sync-shard/compile.log new file mode 100644 index 00000000..28dcb35b --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v3-10k-d768-cosine-k10-all-b4-r16-warm-sync-shard/compile.log @@ -0,0 +1,2 @@ + Finished `bench` profile [optimized] target(s) in 0.02s + Executable benches/prolly_proximity_bench.rs (target/release/deps/prolly_proximity_bench-88edf17ca838c569) diff --git a/performance-results/proximity-turboquant/qualification-v3-10k-d768-cosine-k10-all-b4-r16-warm-sync-shard/manifest.json b/performance-results/proximity-turboquant/qualification-v3-10k-d768-cosine-k10-all-b4-r16-warm-sync-shard/manifest.json new file mode 100644 index 00000000..28c2e1fa --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v3-10k-d768-cosine-k10-all-b4-r16-warm-sync-shard/manifest.json @@ -0,0 +1,63 @@ +{ + "contract": { + "benchmark_schema_version": 3, + "dataset": "linear-mod-2000003-v2", + "environments": [ + { + "async_quantizers": false, + "cold": false, + "name": "memory-warm-sync", + "store": "memory" + }, + { + "async_quantizers": false, + "cold": true, + "name": "memory-cold-sync", + "store": "memory" + }, + { + "async_quantizers": false, + "cold": false, + "name": "file-warm-sync", + "store": "file" + }, + { + "async_quantizers": false, + "cold": true, + "name": "file-cold-sync", + "store": "file" + }, + { + "async_quantizers": true, + "cold": false, + "name": "memory-warm-async", + "store": "memory" + }, + { + "async_quantizers": true, + "cold": true, + "name": "memory-cold-async", + "store": "memory" + } + ], + "exhaustive_max_records": 10000, + "full_cell_count": 45360, + "full_matrix_digest": "a4c137363c5cffe5390a2959217017321f5f17daabf2babb83c52f17a3571d9f", + "max_cell_records": null, + "profile": "full", + "revision": "be8e5aef66447059f06a5fb54c2f6ed213e265bd", + "schema": "prolly-turboquant-qualification-v3", + "search_repeats": 30, + "shard_cell_count": 1, + "shard_count": 1000000, + "shard_index": 999525, + "shard_matrix_digest": "ec95a1b36efa5aa5715bb4680ac12523dfaf073e229525e7c58df84cbbe667f1", + "wasm_smoke": false, + "workers": [ + 1, + 2, + 4 + ] + }, + "created_at": "2026-09-12T19:44:47.445188+00:00" +} diff --git a/performance-results/proximity-turboquant/qualification-v3-10k-d768-cosine-k10-all-b4-r16-warm-sync-shard/raw/n10000-d768-cosine-k10-eall-b4-r16-fixed-memory-warm-sync.csv b/performance-results/proximity-turboquant/qualification-v3-10k-d768-cosine-k10-all-b4-r16-warm-sync-shard/raw/n10000-d768-cosine-k10-eall-b4-r16-fixed-memory-warm-sync.csv new file mode 100644 index 00000000..5eb99f6e --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v3-10k-d768-cosine-k10-all-b4-r16-warm-sync-shard/raw/n10000-d768-cosine-k10-eall-b4-r16-fixed-memory-warm-sync.csv @@ -0,0 +1,64 @@ +prolly proximity benchmark +schema_version=3 +dataset=linear-mod-2000003-v2 +revision=be8e5aef66447059f06a5fb54c2f6ed213e265bd +compiler=rustc 1.97.0 (2d8144b78 2026-07-07) | binary: rustc | commit-hash: 2d8144b7880597b6e6d3dfd63a9a9efae3f533d3 | commit-date: 2026-07-07 | host: aarch64-apple-darwin | release: 1.97.0 | LLVM version: 22.1.6 +target_arch=aarch64 +target_os=macos +machine=Haipings-Mac-Studio.local +store=memory +seed=0 +records=10000 +profile=quantizers +search_repeats=30 +metric=Cosine +k=10 +eligibility_ppm=1000000 +effective_k=10 +turboquant_bits=4 +rerank_multiplier=16 +search_cache=warm +search_order=scalar-first +async_quantizers=false +operation,dimensions,threads,micros,metric_a,metric_b +source_build,768,0,761538.667,10000,0 +source_closure_bytes,768,0,0.000,90557210,10169 +turboquant_build,768,1,139980.000,7680000,3920000 +turboquant_build_resources,768,1,0.000,1709751,122880000 +turboquant_build,768,2,79044.250,7680000,3920000 +turboquant_build_resources,768,2,0.000,1709751,122880000 +turboquant_build,768,4,56168.959,7680000,3920000 +turboquant_build_resources,768,4,0.000,1709751,122880000 +turboquant_sidecar_bytes,768,0,0.000,3975264,3920000 +turboquant_manifest_code_bytes,768,0,0.000,136,3975128 +turboquant_search_scalar,768,0,9347.125,10000,160 +turboquant_search_scalar_p95,768,0,10473.417,4414240,0 +turboquant_search_scalar_p99,768,0,11423.167,160,3423880 +turboquant_search_scalar_work,768,0,0.000,160,1 +turboquant_search_scalar_io,768,0,0.000,10160,0 +turboquant_search_scalar_rerank,768,0,0.000,160,4414240 +turboquant_recall,768,0,0,0.400000,0.009584430615167594 +turboquant_search_simd,768,0,14104.292,10000,160 +turboquant_search_simd_p95,768,0,16276.125,4414240,0 +turboquant_search_simd_p99,768,0,17355.750,160,3423880 +turboquant_search_simd_work,768,0,0.000,160,1 +turboquant_search_simd_io,768,0,0.000,10160,0 +turboquant_search_simd_rerank,768,0,0.000,160,4414240 +turboquant_search_auto,768,0,9341.500,10000,160 +turboquant_search_auto_p95,768,0,10186.875,4414240,0 +turboquant_search_auto_p99,768,0,10327.000,160,3423880 +turboquant_search_auto_work,768,0,0.000,160,1 +turboquant_search_auto_io,768,0,0.000,10160,0 +turboquant_search_auto_rerank,768,0,0.000,160,4414240 +pq_build,768,1,426970.208,5120000,10000 +pq_build,768,2,303091.000,5120000,10000 +pq_build,768,4,229959.417,5120000,10000 +pq_sidecar_bytes,768,0,0.000,174439,10000 +pq_manifest_code_bytes,768,0,0.000,49311,125128 +pq_search,768,0,1463.666,10000,160 +pq_search_p95,768,0,1657.458,574240,0 +pq_search_p99,768,0,1661.083,160,3046949 +pq_search_work,768,0,0.000,160,1 +pq_search_io,768,0,0.000,10160,0 +pq_search_rerank,768,0,0.000,160,574240 +pq_recall,768,0,0,0.500000,0 diff --git a/performance-results/proximity-turboquant/qualification-v3-10k-d768-cosine-k10-all-b4-r16-warm-sync-shard/state/n10000-d768-cosine-k10-eall-b4-r16-fixed-memory-warm-sync.json b/performance-results/proximity-turboquant/qualification-v3-10k-d768-cosine-k10-all-b4-r16-warm-sync-shard/state/n10000-d768-cosine-k10-eall-b4-r16-fixed-memory-warm-sync.json new file mode 100644 index 00000000..cee834ba --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v3-10k-d768-cosine-k10-all-b4-r16-warm-sync-shard/state/n10000-d768-cosine-k10-eall-b4-r16-fixed-memory-warm-sync.json @@ -0,0 +1,29 @@ +{ + "cell": { + "bits": 4, + "dimensions": 768, + "eligibility_ppm": 1000000, + "environment": { + "async_quantizers": false, + "cold": false, + "name": "memory-warm-sync", + "store": "memory" + }, + "k": 10, + "metric": "cosine", + "records": 10000, + "rerank": "fixed", + "rerank_multiplier": 16 + }, + "command": [ + "cargo", + "bench", + "--quiet", + "--all-features", + "--bench", + "prolly_proximity_bench" + ], + "completed_at": "2026-09-12T19:44:51.159347+00:00", + "disposition": "completed", + "sha256": "3dcdf9ba14a0bd84b14e8831d7ababbb6e36b15e5d475e01ec773daa28c26c4b" +} diff --git a/performance-results/proximity-turboquant/qualification-v3-10k-d768-cosine-k10-all-b4-r16-warm-sync-shard/status.json b/performance-results/proximity-turboquant/qualification-v3-10k-d768-cosine-k10-all-b4-r16-warm-sync-shard/status.json new file mode 100644 index 00000000..58131f1c --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v3-10k-d768-cosine-k10-all-b4-r16-warm-sync-shard/status.json @@ -0,0 +1,11 @@ +{ + "complete": true, + "completed_cells": 1, + "expected_cells": 1, + "failed": [], + "finished_at": "2026-09-12T19:44:51.429236+00:00", + "revision": "be8e5aef66447059f06a5fb54c2f6ed213e265bd", + "schema": "prolly-turboquant-qualification-v3", + "typed_scalability_failures": 0, + "wasm_smoke": false +} diff --git a/performance-results/proximity-turboquant/qualification-v3-10k-d768-cosine-k10-all-b4-r16-warm-sync-shard/stderr/n10000-d768-cosine-k10-eall-b4-r16-fixed-memory-warm-sync.log b/performance-results/proximity-turboquant/qualification-v3-10k-d768-cosine-k10-all-b4-r16-warm-sync-shard/stderr/n10000-d768-cosine-k10-eall-b4-r16-fixed-memory-warm-sync.log new file mode 100644 index 00000000..e69de29b diff --git a/performance-results/proximity-turboquant/qualification-v3-10k-d768-cosine-k10-all-b4-r8-warm-sync-shard/compile.log b/performance-results/proximity-turboquant/qualification-v3-10k-d768-cosine-k10-all-b4-r8-warm-sync-shard/compile.log new file mode 100644 index 00000000..a88116fb --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v3-10k-d768-cosine-k10-all-b4-r8-warm-sync-shard/compile.log @@ -0,0 +1,2 @@ + Finished `bench` profile [optimized] target(s) in 0.03s + Executable benches/prolly_proximity_bench.rs (target/release/deps/prolly_proximity_bench-88edf17ca838c569) diff --git a/performance-results/proximity-turboquant/qualification-v3-10k-d768-cosine-k10-all-b4-r8-warm-sync-shard/manifest.json b/performance-results/proximity-turboquant/qualification-v3-10k-d768-cosine-k10-all-b4-r8-warm-sync-shard/manifest.json new file mode 100644 index 00000000..3ae8b095 --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v3-10k-d768-cosine-k10-all-b4-r8-warm-sync-shard/manifest.json @@ -0,0 +1,63 @@ +{ + "contract": { + "benchmark_schema_version": 3, + "dataset": "linear-mod-2000003-v2", + "environments": [ + { + "async_quantizers": false, + "cold": false, + "name": "memory-warm-sync", + "store": "memory" + }, + { + "async_quantizers": false, + "cold": true, + "name": "memory-cold-sync", + "store": "memory" + }, + { + "async_quantizers": false, + "cold": false, + "name": "file-warm-sync", + "store": "file" + }, + { + "async_quantizers": false, + "cold": true, + "name": "file-cold-sync", + "store": "file" + }, + { + "async_quantizers": true, + "cold": false, + "name": "memory-warm-async", + "store": "memory" + }, + { + "async_quantizers": true, + "cold": true, + "name": "memory-cold-async", + "store": "memory" + } + ], + "exhaustive_max_records": 10000, + "full_cell_count": 45360, + "full_matrix_digest": "a4c137363c5cffe5390a2959217017321f5f17daabf2babb83c52f17a3571d9f", + "max_cell_records": null, + "profile": "full", + "revision": "be8e5aef66447059f06a5fb54c2f6ed213e265bd", + "schema": "prolly-turboquant-qualification-v3", + "search_repeats": 30, + "shard_cell_count": 1, + "shard_count": 1000000, + "shard_index": 79516, + "shard_matrix_digest": "bad24b6c59267c9cadb8895d87a693f58e32af946bfbeed4bbe15b662221d72f", + "wasm_smoke": false, + "workers": [ + 1, + 2, + 4 + ] + }, + "created_at": "2026-09-12T19:44:06.036284+00:00" +} diff --git a/performance-results/proximity-turboquant/qualification-v3-10k-d768-cosine-k10-all-b4-r8-warm-sync-shard/raw/n10000-d768-cosine-k10-eall-b4-r8-fixed-memory-warm-sync.csv b/performance-results/proximity-turboquant/qualification-v3-10k-d768-cosine-k10-all-b4-r8-warm-sync-shard/raw/n10000-d768-cosine-k10-eall-b4-r8-fixed-memory-warm-sync.csv new file mode 100644 index 00000000..4c5065d5 --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v3-10k-d768-cosine-k10-all-b4-r8-warm-sync-shard/raw/n10000-d768-cosine-k10-eall-b4-r8-fixed-memory-warm-sync.csv @@ -0,0 +1,64 @@ +prolly proximity benchmark +schema_version=3 +dataset=linear-mod-2000003-v2 +revision=be8e5aef66447059f06a5fb54c2f6ed213e265bd +compiler=rustc 1.97.0 (2d8144b78 2026-07-07) | binary: rustc | commit-hash: 2d8144b7880597b6e6d3dfd63a9a9efae3f533d3 | commit-date: 2026-07-07 | host: aarch64-apple-darwin | release: 1.97.0 | LLVM version: 22.1.6 +target_arch=aarch64 +target_os=macos +machine=Haipings-Mac-Studio.local +store=memory +seed=0 +records=10000 +profile=quantizers +search_repeats=30 +metric=Cosine +k=10 +eligibility_ppm=1000000 +effective_k=10 +turboquant_bits=4 +rerank_multiplier=8 +search_cache=warm +search_order=scalar-first +async_quantizers=false +operation,dimensions,threads,micros,metric_a,metric_b +source_build,768,0,752538.708,10000,0 +source_closure_bytes,768,0,0.000,90557210,10169 +turboquant_build,768,1,131196.625,7680000,3920000 +turboquant_build_resources,768,1,0.000,1709751,122880000 +turboquant_build,768,2,71584.292,7680000,3920000 +turboquant_build_resources,768,2,0.000,1709751,122880000 +turboquant_build,768,4,49369.541,7680000,3920000 +turboquant_build_resources,768,4,0.000,1709751,122880000 +turboquant_sidecar_bytes,768,0,0.000,3975264,3920000 +turboquant_manifest_code_bytes,768,0,0.000,136,3975128 +turboquant_search_scalar,768,0,9324.000,10000,80 +turboquant_search_scalar_p95,768,0,9902.750,4167120,0 +turboquant_search_scalar_p99,768,0,10486.375,80,3153722 +turboquant_search_scalar_work,768,0,0.000,80,1 +turboquant_search_scalar_io,768,0,0.000,10080,0 +turboquant_search_scalar_rerank,768,0,0.000,80,4167120 +turboquant_recall,768,0,0,0.400000,0.009584430615167594 +turboquant_search_simd,768,0,14353.084,10000,80 +turboquant_search_simd_p95,768,0,14949.000,4167120,0 +turboquant_search_simd_p99,768,0,15536.375,80,3153722 +turboquant_search_simd_work,768,0,0.000,80,1 +turboquant_search_simd_io,768,0,0.000,10080,0 +turboquant_search_simd_rerank,768,0,0.000,80,4167120 +turboquant_search_auto,768,0,9395.834,10000,80 +turboquant_search_auto_p95,768,0,9878.500,4167120,0 +turboquant_search_auto_p99,768,0,10145.292,80,3153722 +turboquant_search_auto_work,768,0,0.000,80,1 +turboquant_search_auto_io,768,0,0.000,10080,0 +turboquant_search_auto_rerank,768,0,0.000,80,4167120 +pq_build,768,1,437129.667,5120000,10000 +pq_build,768,2,294193.750,5120000,10000 +pq_build,768,4,235386.500,5120000,10000 +pq_sidecar_bytes,768,0,0.000,174439,10000 +pq_manifest_code_bytes,768,0,0.000,49311,125128 +pq_search,768,0,1315.833,10000,80 +pq_search_p95,768,0,1515.917,327120,0 +pq_search_p99,768,0,1554.917,80,2198801 +pq_search_work,768,0,0.000,80,1 +pq_search_io,768,0,0.000,10080,0 +pq_search_rerank,768,0,0.000,80,327120 +pq_recall,768,0,0,0.500000,0 diff --git a/performance-results/proximity-turboquant/qualification-v3-10k-d768-cosine-k10-all-b4-r8-warm-sync-shard/state/n10000-d768-cosine-k10-eall-b4-r8-fixed-memory-warm-sync.json b/performance-results/proximity-turboquant/qualification-v3-10k-d768-cosine-k10-all-b4-r8-warm-sync-shard/state/n10000-d768-cosine-k10-eall-b4-r8-fixed-memory-warm-sync.json new file mode 100644 index 00000000..2960bd4a --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v3-10k-d768-cosine-k10-all-b4-r8-warm-sync-shard/state/n10000-d768-cosine-k10-eall-b4-r8-fixed-memory-warm-sync.json @@ -0,0 +1,29 @@ +{ + "cell": { + "bits": 4, + "dimensions": 768, + "eligibility_ppm": 1000000, + "environment": { + "async_quantizers": false, + "cold": false, + "name": "memory-warm-sync", + "store": "memory" + }, + "k": 10, + "metric": "cosine", + "records": 10000, + "rerank": "fixed", + "rerank_multiplier": 8 + }, + "command": [ + "cargo", + "bench", + "--quiet", + "--all-features", + "--bench", + "prolly_proximity_bench" + ], + "completed_at": "2026-09-12T19:44:46.948831+00:00", + "disposition": "completed", + "sha256": "6e885ca2b71f2ec5ad821c73c9ef0babf414bb5ed64a1b26749b61365fccb6c1" +} diff --git a/performance-results/proximity-turboquant/qualification-v3-10k-d768-cosine-k10-all-b4-r8-warm-sync-shard/status.json b/performance-results/proximity-turboquant/qualification-v3-10k-d768-cosine-k10-all-b4-r8-warm-sync-shard/status.json new file mode 100644 index 00000000..6389fa48 --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v3-10k-d768-cosine-k10-all-b4-r8-warm-sync-shard/status.json @@ -0,0 +1,11 @@ +{ + "complete": true, + "completed_cells": 1, + "expected_cells": 1, + "failed": [], + "finished_at": "2026-09-12T19:44:47.237876+00:00", + "revision": "be8e5aef66447059f06a5fb54c2f6ed213e265bd", + "schema": "prolly-turboquant-qualification-v3", + "typed_scalability_failures": 0, + "wasm_smoke": false +} diff --git a/performance-results/proximity-turboquant/qualification-v3-10k-d768-cosine-k10-all-b4-r8-warm-sync-shard/stderr/n10000-d768-cosine-k10-eall-b4-r8-fixed-memory-warm-sync.log b/performance-results/proximity-turboquant/qualification-v3-10k-d768-cosine-k10-all-b4-r8-warm-sync-shard/stderr/n10000-d768-cosine-k10-eall-b4-r8-fixed-memory-warm-sync.log new file mode 100644 index 00000000..e69de29b diff --git a/performance-results/proximity-turboquant/qualification-v3-10k-d768-inner-product-k10-all-b4-r16-warm-sync-shard/compile.log b/performance-results/proximity-turboquant/qualification-v3-10k-d768-inner-product-k10-all-b4-r16-warm-sync-shard/compile.log new file mode 100644 index 00000000..ed12eaba --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v3-10k-d768-inner-product-k10-all-b4-r16-warm-sync-shard/compile.log @@ -0,0 +1,7 @@ + Blocking waiting for file lock on package cache + Blocking waiting for file lock on package cache + Blocking waiting for file lock on package cache + Blocking waiting for file lock on shared package cache + Blocking waiting for file lock on build directory + Finished `bench` profile [optimized] target(s) in 0.11s + Executable benches/prolly_proximity_bench.rs (target/release/deps/prolly_proximity_bench-88edf17ca838c569) diff --git a/performance-results/proximity-turboquant/qualification-v3-10k-d768-inner-product-k10-all-b4-r16-warm-sync-shard/manifest.json b/performance-results/proximity-turboquant/qualification-v3-10k-d768-inner-product-k10-all-b4-r16-warm-sync-shard/manifest.json new file mode 100644 index 00000000..6871d0fc --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v3-10k-d768-inner-product-k10-all-b4-r16-warm-sync-shard/manifest.json @@ -0,0 +1,63 @@ +{ + "contract": { + "benchmark_schema_version": 3, + "dataset": "linear-mod-2000003-v2", + "environments": [ + { + "async_quantizers": false, + "cold": false, + "name": "memory-warm-sync", + "store": "memory" + }, + { + "async_quantizers": false, + "cold": true, + "name": "memory-cold-sync", + "store": "memory" + }, + { + "async_quantizers": false, + "cold": false, + "name": "file-warm-sync", + "store": "file" + }, + { + "async_quantizers": false, + "cold": true, + "name": "file-cold-sync", + "store": "file" + }, + { + "async_quantizers": true, + "cold": false, + "name": "memory-warm-async", + "store": "memory" + }, + { + "async_quantizers": true, + "cold": true, + "name": "memory-cold-async", + "store": "memory" + } + ], + "exhaustive_max_records": 10000, + "full_cell_count": 45360, + "full_matrix_digest": "a4c137363c5cffe5390a2959217017321f5f17daabf2babb83c52f17a3571d9f", + "max_cell_records": null, + "profile": "full", + "revision": "d79fbf0c267711b2707582f4a1d2bbd8a6cde6d9", + "schema": "prolly-turboquant-qualification-v3", + "search_repeats": 30, + "shard_cell_count": 1, + "shard_count": 1000000, + "shard_index": 388563, + "shard_matrix_digest": "c969b429b7bcad93752336647f9b01192b52ed253f18a27b39fe54e76fb0000a", + "wasm_smoke": false, + "workers": [ + 1, + 2, + 4 + ] + }, + "created_at": "2026-09-12T20:04:58.449079+00:00" +} diff --git a/performance-results/proximity-turboquant/qualification-v3-10k-d768-inner-product-k10-all-b4-r16-warm-sync-shard/raw/n10000-d768-inner_product-k10-eall-b4-r16-fixed-memory-warm-sync.csv b/performance-results/proximity-turboquant/qualification-v3-10k-d768-inner-product-k10-all-b4-r16-warm-sync-shard/raw/n10000-d768-inner_product-k10-eall-b4-r16-fixed-memory-warm-sync.csv new file mode 100644 index 00000000..e4ed0e1c --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v3-10k-d768-inner-product-k10-all-b4-r16-warm-sync-shard/raw/n10000-d768-inner_product-k10-eall-b4-r16-fixed-memory-warm-sync.csv @@ -0,0 +1,64 @@ +prolly proximity benchmark +schema_version=3 +dataset=linear-mod-2000003-v2 +revision=d79fbf0c267711b2707582f4a1d2bbd8a6cde6d9 +compiler=rustc 1.97.0 (2d8144b78 2026-07-07) | binary: rustc | commit-hash: 2d8144b7880597b6e6d3dfd63a9a9efae3f533d3 | commit-date: 2026-07-07 | host: aarch64-apple-darwin | release: 1.97.0 | LLVM version: 22.1.6 +target_arch=aarch64 +target_os=macos +machine=Haipings-Mac-Studio.local +store=memory +seed=0 +records=10000 +profile=quantizers +search_repeats=30 +metric=InnerProduct +k=10 +eligibility_ppm=1000000 +effective_k=10 +turboquant_bits=4 +rerank_multiplier=16 +search_cache=warm +search_order=scalar-first +async_quantizers=false +operation,dimensions,threads,micros,metric_a,metric_b +source_build,768,0,729773.417,10000,0 +source_closure_bytes,768,0,0.000,90987106,10383 +turboquant_build,768,1,137828.667,7680000,3920000 +turboquant_build_resources,768,1,0.000,1709751,122880000 +turboquant_build,768,2,77602.333,7680000,3920000 +turboquant_build_resources,768,2,0.000,1709751,122880000 +turboquant_build,768,4,53582.000,7680000,3920000 +turboquant_build_resources,768,4,0.000,1709751,122880000 +turboquant_sidecar_bytes,768,0,0.000,3975264,3920000 +turboquant_manifest_code_bytes,768,0,0.000,136,3975128 +turboquant_search_scalar,768,0,9450.667,10000,160 +turboquant_search_scalar_p95,768,0,9711.416,4414240,0 +turboquant_search_scalar_p99,768,0,9872.708,160,2198801 +turboquant_search_scalar_work,768,0,0.000,160,1 +turboquant_search_scalar_io,768,0,0.000,10160,0 +turboquant_search_scalar_rerank,768,0,0.000,160,4414240 +turboquant_recall,768,0,0,1.000000,0.00958443061248919 +turboquant_search_simd,768,0,13563.208,10000,160 +turboquant_search_simd_p95,768,0,15032.458,4414240,0 +turboquant_search_simd_p99,768,0,15219.542,160,2198801 +turboquant_search_simd_work,768,0,0.000,160,1 +turboquant_search_simd_io,768,0,0.000,10160,0 +turboquant_search_simd_rerank,768,0,0.000,160,4414240 +turboquant_search_auto,768,0,8883.916,10000,160 +turboquant_search_auto_p95,768,0,9107.250,4414240,0 +turboquant_search_auto_p99,768,0,9261.667,160,2198801 +turboquant_search_auto_work,768,0,0.000,160,1 +turboquant_search_auto_io,768,0,0.000,10160,0 +turboquant_search_auto_rerank,768,0,0.000,160,4414240 +pq_build,768,1,416062.208,5120000,10000 +pq_build,768,2,287104.834,5120000,10000 +pq_build,768,4,212895.833,5120000,10000 +pq_sidecar_bytes,768,0,0.000,174439,10000 +pq_manifest_code_bytes,768,0,0.000,49311,125128 +pq_search,768,0,1415.750,10000,160 +pq_search_p95,768,0,1587.875,574240,0 +pq_search_p99,768,0,1791.916,160,3046949 +pq_search_work,768,0,0.000,160,1 +pq_search_io,768,0,0.000,10160,0 +pq_search_rerank,768,0,0.000,160,574240 +pq_recall,768,0,0,1.000000,0 diff --git a/performance-results/proximity-turboquant/qualification-v3-10k-d768-inner-product-k10-all-b4-r16-warm-sync-shard/state/n10000-d768-inner_product-k10-eall-b4-r16-fixed-memory-warm-sync.json b/performance-results/proximity-turboquant/qualification-v3-10k-d768-inner-product-k10-all-b4-r16-warm-sync-shard/state/n10000-d768-inner_product-k10-eall-b4-r16-fixed-memory-warm-sync.json new file mode 100644 index 00000000..98205fa3 --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v3-10k-d768-inner-product-k10-all-b4-r16-warm-sync-shard/state/n10000-d768-inner_product-k10-eall-b4-r16-fixed-memory-warm-sync.json @@ -0,0 +1,29 @@ +{ + "cell": { + "bits": 4, + "dimensions": 768, + "eligibility_ppm": 1000000, + "environment": { + "async_quantizers": false, + "cold": false, + "name": "memory-warm-sync", + "store": "memory" + }, + "k": 10, + "metric": "inner_product", + "records": 10000, + "rerank": "fixed", + "rerank_multiplier": 16 + }, + "command": [ + "cargo", + "bench", + "--quiet", + "--all-features", + "--bench", + "prolly_proximity_bench" + ], + "completed_at": "2026-09-12T20:05:02.014173+00:00", + "disposition": "completed", + "sha256": "ad9c1790e78925f135bdd5949400f250e77f8ddf5447b04314a802bd0fac49f5" +} diff --git a/performance-results/proximity-turboquant/qualification-v3-10k-d768-inner-product-k10-all-b4-r16-warm-sync-shard/status.json b/performance-results/proximity-turboquant/qualification-v3-10k-d768-inner-product-k10-all-b4-r16-warm-sync-shard/status.json new file mode 100644 index 00000000..efbf82ba --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v3-10k-d768-inner-product-k10-all-b4-r16-warm-sync-shard/status.json @@ -0,0 +1,11 @@ +{ + "complete": true, + "completed_cells": 1, + "expected_cells": 1, + "failed": [], + "finished_at": "2026-09-12T20:06:50.810448+00:00", + "revision": "d79fbf0c267711b2707582f4a1d2bbd8a6cde6d9", + "schema": "prolly-turboquant-qualification-v3", + "typed_scalability_failures": 0, + "wasm_smoke": false +} diff --git a/performance-results/proximity-turboquant/qualification-v3-10k-d768-inner-product-k10-all-b4-r16-warm-sync-shard/stderr/n10000-d768-inner_product-k10-eall-b4-r16-fixed-memory-warm-sync.log b/performance-results/proximity-turboquant/qualification-v3-10k-d768-inner-product-k10-all-b4-r16-warm-sync-shard/stderr/n10000-d768-inner_product-k10-eall-b4-r16-fixed-memory-warm-sync.log new file mode 100644 index 00000000..e69de29b diff --git a/performance-results/proximity-turboquant/qualification-v3-10k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/compile.log b/performance-results/proximity-turboquant/qualification-v3-10k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/compile.log new file mode 100644 index 00000000..1804abf7 --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v3-10k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/compile.log @@ -0,0 +1,6 @@ + Blocking waiting for file lock on package cache + Blocking waiting for file lock on package cache + Blocking waiting for file lock on package cache + Blocking waiting for file lock on package cache + Finished `bench` profile [optimized] target(s) in 0.09s + Executable benches/prolly_proximity_bench.rs (target/release/deps/prolly_proximity_bench-88edf17ca838c569) diff --git a/performance-results/proximity-turboquant/qualification-v3-10k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/manifest.json b/performance-results/proximity-turboquant/qualification-v3-10k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/manifest.json new file mode 100644 index 00000000..189bd69e --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v3-10k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/manifest.json @@ -0,0 +1,63 @@ +{ + "contract": { + "benchmark_schema_version": 3, + "dataset": "linear-mod-2000003-v2", + "environments": [ + { + "async_quantizers": false, + "cold": false, + "name": "memory-warm-sync", + "store": "memory" + }, + { + "async_quantizers": false, + "cold": true, + "name": "memory-cold-sync", + "store": "memory" + }, + { + "async_quantizers": false, + "cold": false, + "name": "file-warm-sync", + "store": "file" + }, + { + "async_quantizers": false, + "cold": true, + "name": "file-cold-sync", + "store": "file" + }, + { + "async_quantizers": true, + "cold": false, + "name": "memory-warm-async", + "store": "memory" + }, + { + "async_quantizers": true, + "cold": true, + "name": "memory-cold-async", + "store": "memory" + } + ], + "exhaustive_max_records": 10000, + "full_cell_count": 45360, + "full_matrix_digest": "a4c137363c5cffe5390a2959217017321f5f17daabf2babb83c52f17a3571d9f", + "max_cell_records": null, + "profile": "full", + "revision": "d79fbf0c267711b2707582f4a1d2bbd8a6cde6d9", + "schema": "prolly-turboquant-qualification-v3", + "search_repeats": 30, + "shard_cell_count": 1, + "shard_count": 1000000, + "shard_index": 513486, + "shard_matrix_digest": "d60f077a3a0c16ce8513637c65ecb013386be149c36bdaa75825f7cd86ec75bd", + "wasm_smoke": false, + "workers": [ + 1, + 2, + 4 + ] + }, + "created_at": "2026-09-12T20:04:12.541263+00:00" +} diff --git a/performance-results/proximity-turboquant/qualification-v3-10k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/raw/n10000-d768-inner_product-k10-eall-b4-r8-fixed-memory-warm-sync.csv b/performance-results/proximity-turboquant/qualification-v3-10k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/raw/n10000-d768-inner_product-k10-eall-b4-r8-fixed-memory-warm-sync.csv new file mode 100644 index 00000000..871d34b4 --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v3-10k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/raw/n10000-d768-inner_product-k10-eall-b4-r8-fixed-memory-warm-sync.csv @@ -0,0 +1,64 @@ +prolly proximity benchmark +schema_version=3 +dataset=linear-mod-2000003-v2 +revision=d79fbf0c267711b2707582f4a1d2bbd8a6cde6d9 +compiler=rustc 1.97.0 (2d8144b78 2026-07-07) | binary: rustc | commit-hash: 2d8144b7880597b6e6d3dfd63a9a9efae3f533d3 | commit-date: 2026-07-07 | host: aarch64-apple-darwin | release: 1.97.0 | LLVM version: 22.1.6 +target_arch=aarch64 +target_os=macos +machine=Haipings-Mac-Studio.local +store=memory +seed=0 +records=10000 +profile=quantizers +search_repeats=30 +metric=InnerProduct +k=10 +eligibility_ppm=1000000 +effective_k=10 +turboquant_bits=4 +rerank_multiplier=8 +search_cache=warm +search_order=scalar-first +async_quantizers=false +operation,dimensions,threads,micros,metric_a,metric_b +source_build,768,0,725782.750,10000,0 +source_closure_bytes,768,0,0.000,90987106,10383 +turboquant_build,768,1,130442.792,7680000,3920000 +turboquant_build_resources,768,1,0.000,1709751,122880000 +turboquant_build,768,2,77954.125,7680000,3920000 +turboquant_build_resources,768,2,0.000,1709751,122880000 +turboquant_build,768,4,53460.833,7680000,3920000 +turboquant_build_resources,768,4,0.000,1709751,122880000 +turboquant_sidecar_bytes,768,0,0.000,3975264,3920000 +turboquant_manifest_code_bytes,768,0,0.000,136,3975128 +turboquant_search_scalar,768,0,8754.041,10000,80 +turboquant_search_scalar_p95,768,0,9059.792,4167120,0 +turboquant_search_scalar_p99,768,0,9234.833,80,2198801 +turboquant_search_scalar_work,768,0,0.000,80,1 +turboquant_search_scalar_io,768,0,0.000,10080,0 +turboquant_search_scalar_rerank,768,0,0.000,80,4167120 +turboquant_recall,768,0,0,1.000000,0.00958443061248919 +turboquant_search_simd,768,0,13449.500,10000,80 +turboquant_search_simd_p95,768,0,15070.083,4167120,0 +turboquant_search_simd_p99,768,0,15178.000,80,2198801 +turboquant_search_simd_work,768,0,0.000,80,1 +turboquant_search_simd_io,768,0,0.000,10080,0 +turboquant_search_simd_rerank,768,0,0.000,80,4167120 +turboquant_search_auto,768,0,8765.250,10000,80 +turboquant_search_auto_p95,768,0,9839.166,4167120,0 +turboquant_search_auto_p99,768,0,10009.291,80,2198801 +turboquant_search_auto_work,768,0,0.000,80,1 +turboquant_search_auto_io,768,0,0.000,10080,0 +turboquant_search_auto_rerank,768,0,0.000,80,4167120 +pq_build,768,1,406887.750,5120000,10000 +pq_build,768,2,301575.917,5120000,10000 +pq_build,768,4,213108.083,5120000,10000 +pq_sidecar_bytes,768,0,0.000,174439,10000 +pq_manifest_code_bytes,768,0,0.000,49311,125128 +pq_search,768,0,1268.584,10000,80 +pq_search_p95,768,0,1397.708,327120,0 +pq_search_p99,768,0,1469.416,80,2198801 +pq_search_work,768,0,0.000,80,1 +pq_search_io,768,0,0.000,10080,0 +pq_search_rerank,768,0,0.000,80,327120 +pq_recall,768,0,0,0.000000,0 diff --git a/performance-results/proximity-turboquant/qualification-v3-10k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/state/n10000-d768-inner_product-k10-eall-b4-r8-fixed-memory-warm-sync.json b/performance-results/proximity-turboquant/qualification-v3-10k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/state/n10000-d768-inner_product-k10-eall-b4-r8-fixed-memory-warm-sync.json new file mode 100644 index 00000000..84e64a51 --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v3-10k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/state/n10000-d768-inner_product-k10-eall-b4-r8-fixed-memory-warm-sync.json @@ -0,0 +1,29 @@ +{ + "cell": { + "bits": 4, + "dimensions": 768, + "eligibility_ppm": 1000000, + "environment": { + "async_quantizers": false, + "cold": false, + "name": "memory-warm-sync", + "store": "memory" + }, + "k": 10, + "metric": "inner_product", + "records": 10000, + "rerank": "fixed", + "rerank_multiplier": 8 + }, + "command": [ + "cargo", + "bench", + "--quiet", + "--all-features", + "--bench", + "prolly_proximity_bench" + ], + "completed_at": "2026-09-12T20:04:53.569028+00:00", + "disposition": "completed", + "sha256": "4c1cacb890931d0cb9c2927d478e21eb03a5fa47283013c6c603677c624c056f" +} diff --git a/performance-results/proximity-turboquant/qualification-v3-10k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/status.json b/performance-results/proximity-turboquant/qualification-v3-10k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/status.json new file mode 100644 index 00000000..6dd3d061 --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v3-10k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/status.json @@ -0,0 +1,11 @@ +{ + "complete": true, + "completed_cells": 1, + "expected_cells": 1, + "failed": [], + "finished_at": "2026-09-12T20:06:50.786986+00:00", + "revision": "d79fbf0c267711b2707582f4a1d2bbd8a6cde6d9", + "schema": "prolly-turboquant-qualification-v3", + "typed_scalability_failures": 0, + "wasm_smoke": false +} diff --git a/performance-results/proximity-turboquant/qualification-v3-10k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/stderr/n10000-d768-inner_product-k10-eall-b4-r8-fixed-memory-warm-sync.log b/performance-results/proximity-turboquant/qualification-v3-10k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/stderr/n10000-d768-inner_product-k10-eall-b4-r8-fixed-memory-warm-sync.log new file mode 100644 index 00000000..e69de29b diff --git a/performance-results/proximity-turboquant/qualification-v3-10k-d768-l2-k10-all-b4-r8-warm-sync-shard/compile.log b/performance-results/proximity-turboquant/qualification-v3-10k-d768-l2-k10-all-b4-r8-warm-sync-shard/compile.log new file mode 100644 index 00000000..a88116fb --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v3-10k-d768-l2-k10-all-b4-r8-warm-sync-shard/compile.log @@ -0,0 +1,2 @@ + Finished `bench` profile [optimized] target(s) in 0.03s + Executable benches/prolly_proximity_bench.rs (target/release/deps/prolly_proximity_bench-88edf17ca838c569) diff --git a/performance-results/proximity-turboquant/qualification-v3-10k-d768-l2-k10-all-b4-r8-warm-sync-shard/manifest.json b/performance-results/proximity-turboquant/qualification-v3-10k-d768-l2-k10-all-b4-r8-warm-sync-shard/manifest.json new file mode 100644 index 00000000..f64e343f --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v3-10k-d768-l2-k10-all-b4-r8-warm-sync-shard/manifest.json @@ -0,0 +1,63 @@ +{ + "contract": { + "benchmark_schema_version": 3, + "dataset": "linear-mod-2000003-v2", + "environments": [ + { + "async_quantizers": false, + "cold": false, + "name": "memory-warm-sync", + "store": "memory" + }, + { + "async_quantizers": false, + "cold": true, + "name": "memory-cold-sync", + "store": "memory" + }, + { + "async_quantizers": false, + "cold": false, + "name": "file-warm-sync", + "store": "file" + }, + { + "async_quantizers": false, + "cold": true, + "name": "file-cold-sync", + "store": "file" + }, + { + "async_quantizers": true, + "cold": false, + "name": "memory-warm-async", + "store": "memory" + }, + { + "async_quantizers": true, + "cold": true, + "name": "memory-cold-async", + "store": "memory" + } + ], + "exhaustive_max_records": 10000, + "full_cell_count": 45360, + "full_matrix_digest": "a4c137363c5cffe5390a2959217017321f5f17daabf2babb83c52f17a3571d9f", + "max_cell_records": null, + "profile": "full", + "revision": "f08e7dfa604bcc4bfd1c406d4c5e4dfcc8550d09", + "schema": "prolly-turboquant-qualification-v3", + "search_repeats": 30, + "shard_cell_count": 1, + "shard_count": 1000000, + "shard_index": 131629, + "shard_matrix_digest": "f7c83f9de4e79f6dae2881f65225a13b91148b92980f987d210da92e90a5c703", + "wasm_smoke": false, + "workers": [ + 1, + 2, + 4 + ] + }, + "created_at": "2026-09-12T19:23:50.143804+00:00" +} diff --git a/performance-results/proximity-turboquant/qualification-v3-10k-d768-l2-k10-all-b4-r8-warm-sync-shard/raw/n10000-d768-l2-k10-eall-b4-r8-fixed-memory-warm-sync.csv b/performance-results/proximity-turboquant/qualification-v3-10k-d768-l2-k10-all-b4-r8-warm-sync-shard/raw/n10000-d768-l2-k10-eall-b4-r8-fixed-memory-warm-sync.csv new file mode 100644 index 00000000..805cfbb4 --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v3-10k-d768-l2-k10-all-b4-r8-warm-sync-shard/raw/n10000-d768-l2-k10-eall-b4-r8-fixed-memory-warm-sync.csv @@ -0,0 +1,64 @@ +prolly proximity benchmark +schema_version=3 +dataset=linear-mod-2000003-v2 +revision=f08e7dfa604bcc4bfd1c406d4c5e4dfcc8550d09 +compiler=rustc 1.97.0 (2d8144b78 2026-07-07) | binary: rustc | commit-hash: 2d8144b7880597b6e6d3dfd63a9a9efae3f533d3 | commit-date: 2026-07-07 | host: aarch64-apple-darwin | release: 1.97.0 | LLVM version: 22.1.6 +target_arch=aarch64 +target_os=macos +machine=Haipings-Mac-Studio.local +store=memory +seed=0 +records=10000 +profile=quantizers +search_repeats=30 +metric=L2Squared +k=10 +eligibility_ppm=1000000 +effective_k=10 +turboquant_bits=4 +rerank_multiplier=8 +search_cache=warm +search_order=scalar-first +async_quantizers=false +operation,dimensions,threads,micros,metric_a,metric_b +source_build,768,0,788665.583,10000,0 +source_closure_bytes,768,0,0.000,90601244,10190 +turboquant_build,768,1,139445.125,7680000,3920000 +turboquant_build_resources,768,1,0.000,1709751,122880000 +turboquant_build,768,2,76633.208,7680000,3920000 +turboquant_build_resources,768,2,0.000,1709751,122880000 +turboquant_build,768,4,55744.500,7680000,3920000 +turboquant_build_resources,768,4,0.000,1709751,122880000 +turboquant_sidecar_bytes,768,0,0.000,3975264,3920000 +turboquant_manifest_code_bytes,768,0,0.000,136,3975128 +turboquant_search_scalar,768,0,9130.916,10000,80 +turboquant_search_scalar_p95,768,0,9577.250,4167120,0 +turboquant_search_scalar_p99,768,0,10401.375,80,2198801 +turboquant_search_scalar_work,768,0,0.000,80,1 +turboquant_search_scalar_io,768,0,0.000,10080,0 +turboquant_search_scalar_rerank,768,0,0.000,80,4167120 +turboquant_recall,768,0,0,1.000000,0.00958443061248919 +turboquant_search_simd,768,0,14352.833,10000,80 +turboquant_search_simd_p95,768,0,14877.083,4167120,0 +turboquant_search_simd_p99,768,0,15006.708,80,2198801 +turboquant_search_simd_work,768,0,0.000,80,1 +turboquant_search_simd_io,768,0,0.000,10080,0 +turboquant_search_simd_rerank,768,0,0.000,80,4167120 +turboquant_search_auto,768,0,9078.458,10000,80 +turboquant_search_auto_p95,768,0,9467.416,4167120,0 +turboquant_search_auto_p99,768,0,9472.250,80,2198801 +turboquant_search_auto_work,768,0,0.000,80,1 +turboquant_search_auto_io,768,0,0.000,10080,0 +turboquant_search_auto_rerank,768,0,0.000,80,4167120 +pq_build,768,1,451111.458,5120000,10000 +pq_build,768,2,302673.084,5120000,10000 +pq_build,768,4,240947.083,5120000,10000 +pq_sidecar_bytes,768,0,0.000,174439,10000 +pq_manifest_code_bytes,768,0,0.000,49311,125128 +pq_search,768,0,1362.500,10000,80 +pq_search_p95,768,0,1555.000,327120,0 +pq_search_p99,768,0,3620.916,80,2198801 +pq_search_work,768,0,0.000,80,1 +pq_search_io,768,0,0.000,10080,0 +pq_search_rerank,768,0,0.000,80,327120 +pq_recall,768,0,0,1.000000,0 diff --git a/performance-results/proximity-turboquant/qualification-v3-10k-d768-l2-k10-all-b4-r8-warm-sync-shard/state/n10000-d768-l2-k10-eall-b4-r8-fixed-memory-warm-sync.json b/performance-results/proximity-turboquant/qualification-v3-10k-d768-l2-k10-all-b4-r8-warm-sync-shard/state/n10000-d768-l2-k10-eall-b4-r8-fixed-memory-warm-sync.json new file mode 100644 index 00000000..4fbc0a67 --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v3-10k-d768-l2-k10-all-b4-r8-warm-sync-shard/state/n10000-d768-l2-k10-eall-b4-r8-fixed-memory-warm-sync.json @@ -0,0 +1,29 @@ +{ + "cell": { + "bits": 4, + "dimensions": 768, + "eligibility_ppm": 1000000, + "environment": { + "async_quantizers": false, + "cold": false, + "name": "memory-warm-sync", + "store": "memory" + }, + "k": 10, + "metric": "l2", + "records": 10000, + "rerank": "fixed", + "rerank_multiplier": 8 + }, + "command": [ + "cargo", + "bench", + "--quiet", + "--all-features", + "--bench", + "prolly_proximity_bench" + ], + "completed_at": "2026-09-12T19:24:39.331452+00:00", + "disposition": "completed", + "sha256": "e786e8cb034e92d8c95ef15b78f1098b02c16563b460c857a23725eb013c7f5b" +} diff --git a/performance-results/proximity-turboquant/qualification-v3-10k-d768-l2-k10-all-b4-r8-warm-sync-shard/status.json b/performance-results/proximity-turboquant/qualification-v3-10k-d768-l2-k10-all-b4-r8-warm-sync-shard/status.json new file mode 100644 index 00000000..38022ed6 --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v3-10k-d768-l2-k10-all-b4-r8-warm-sync-shard/status.json @@ -0,0 +1,11 @@ +{ + "complete": true, + "completed_cells": 1, + "expected_cells": 1, + "failed": [], + "finished_at": "2026-09-12T19:24:39.630720+00:00", + "revision": "f08e7dfa604bcc4bfd1c406d4c5e4dfcc8550d09", + "schema": "prolly-turboquant-qualification-v3", + "typed_scalability_failures": 0, + "wasm_smoke": false +} diff --git a/performance-results/proximity-turboquant/qualification-v3-10k-d768-l2-k10-all-b4-r8-warm-sync-shard/stderr/n10000-d768-l2-k10-eall-b4-r8-fixed-memory-warm-sync.log b/performance-results/proximity-turboquant/qualification-v3-10k-d768-l2-k10-all-b4-r8-warm-sync-shard/stderr/n10000-d768-l2-k10-eall-b4-r8-fixed-memory-warm-sync.log new file mode 100644 index 00000000..e69de29b diff --git a/performance-results/proximity-turboquant/qualification-v4-100k-d768-cosine-k10-all-b4-r16-warm-sync-shard/compile.log b/performance-results/proximity-turboquant/qualification-v4-100k-d768-cosine-k10-all-b4-r16-warm-sync-shard/compile.log new file mode 100644 index 00000000..a88116fb --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v4-100k-d768-cosine-k10-all-b4-r16-warm-sync-shard/compile.log @@ -0,0 +1,2 @@ + Finished `bench` profile [optimized] target(s) in 0.03s + Executable benches/prolly_proximity_bench.rs (target/release/deps/prolly_proximity_bench-88edf17ca838c569) diff --git a/performance-results/proximity-turboquant/qualification-v4-100k-d768-cosine-k10-all-b4-r16-warm-sync-shard/manifest.json b/performance-results/proximity-turboquant/qualification-v4-100k-d768-cosine-k10-all-b4-r16-warm-sync-shard/manifest.json new file mode 100644 index 00000000..003e68e7 --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v4-100k-d768-cosine-k10-all-b4-r16-warm-sync-shard/manifest.json @@ -0,0 +1,63 @@ +{ + "contract": { + "benchmark_schema_version": 4, + "dataset": "linear-mod-2000003-v2", + "environments": [ + { + "async_quantizers": false, + "cold": false, + "name": "memory-warm-sync", + "store": "memory" + }, + { + "async_quantizers": false, + "cold": true, + "name": "memory-cold-sync", + "store": "memory" + }, + { + "async_quantizers": false, + "cold": false, + "name": "file-warm-sync", + "store": "file" + }, + { + "async_quantizers": false, + "cold": true, + "name": "file-cold-sync", + "store": "file" + }, + { + "async_quantizers": true, + "cold": false, + "name": "memory-warm-async", + "store": "memory" + }, + { + "async_quantizers": true, + "cold": true, + "name": "memory-cold-async", + "store": "memory" + } + ], + "exhaustive_max_records": 10000, + "full_cell_count": 45360, + "full_matrix_digest": "a4c137363c5cffe5390a2959217017321f5f17daabf2babb83c52f17a3571d9f", + "max_cell_records": null, + "profile": "full", + "revision": "729c2ffac8835db9c99d7706746c321067abfa1d", + "schema": "prolly-turboquant-qualification-v4", + "search_repeats": 30, + "shard_cell_count": 1, + "shard_count": 1000000, + "shard_index": 198811, + "shard_matrix_digest": "bee644e22810145bf22a6200ab09019eb96486af6153b25788233cb390e94825", + "wasm_smoke": false, + "workers": [ + 1, + 2, + 4 + ] + }, + "created_at": "2026-09-12T20:53:48.218479+00:00" +} diff --git a/performance-results/proximity-turboquant/qualification-v4-100k-d768-cosine-k10-all-b4-r16-warm-sync-shard/raw/n100000-d768-cosine-k10-eall-b4-r16-fixed-memory-warm-sync.csv b/performance-results/proximity-turboquant/qualification-v4-100k-d768-cosine-k10-all-b4-r16-warm-sync-shard/raw/n100000-d768-cosine-k10-eall-b4-r16-fixed-memory-warm-sync.csv new file mode 100644 index 00000000..7cdd95a4 --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v4-100k-d768-cosine-k10-all-b4-r16-warm-sync-shard/raw/n100000-d768-cosine-k10-eall-b4-r16-fixed-memory-warm-sync.csv @@ -0,0 +1,64 @@ +prolly proximity benchmark +schema_version=4 +dataset=linear-mod-2000003-v2 +revision=729c2ffac8835db9c99d7706746c321067abfa1d +compiler=rustc 1.97.0 (2d8144b78 2026-07-07) | binary: rustc | commit-hash: 2d8144b7880597b6e6d3dfd63a9a9efae3f533d3 | commit-date: 2026-07-07 | host: aarch64-apple-darwin | release: 1.97.0 | LLVM version: 22.1.6 +target_arch=aarch64 +target_os=macos +machine=Haipings-Mac-Studio.local +store=memory +seed=0 +records=100000 +profile=quantizers +search_repeats=30 +metric=Cosine +k=10 +eligibility_ppm=1000000 +effective_k=10 +turboquant_bits=4 +rerank_multiplier=16 +search_cache=warm +search_order=scalar-first +async_quantizers=false +operation,dimensions,threads,micros,metric_a,metric_b +source_build,768,0,10979214.166,100000,0 +source_closure_bytes,768,0,0.000,904537606,101255 +turboquant_build,768,1,1372913.208,76800000,39200000 +turboquant_build_resources,768,1,0.000,1864126,1228800000 +turboquant_build,768,2,871428.375,76800000,39200000 +turboquant_build_resources,768,2,0.000,1864126,1228800000 +turboquant_build,768,4,691172.083,76800000,39200000 +turboquant_build_resources,768,4,0.000,1864126,1228800000 +turboquant_sidecar_bytes,768,0,0.000,39757465,39200000 +turboquant_manifest_code_bytes,768,0,0.000,137,39757328 +turboquant_search_scalar,768,0,122527.041,100000,160 +turboquant_search_scalar_p95,768,0,127842.625,39694240,41430374 +turboquant_search_scalar_p99,768,0,154659.500,160,1683729 +turboquant_search_scalar_work,768,0,0.000,160,1 +turboquant_search_scalar_io,768,0,0.000,100160,662 +turboquant_search_scalar_rerank,768,0,0.000,160,39694240 +turboquant_recall,768,0,0,1.000000,0.009057112353809613 +turboquant_search_simd,768,0,172498.958,100000,160 +turboquant_search_simd_p95,768,0,230438.250,39694240,41430374 +turboquant_search_simd_p99,768,0,261154.250,160,1683729 +turboquant_search_simd_work,768,0,0.000,160,1 +turboquant_search_simd_io,768,0,0.000,100160,662 +turboquant_search_simd_rerank,768,0,0.000,160,39694240 +turboquant_search_auto,768,0,122411.167,100000,160 +turboquant_search_auto_p95,768,0,125271.000,39694240,41430374 +turboquant_search_auto_p99,768,0,125500.292,160,1683729 +turboquant_search_auto_work,768,0,0.000,160,1 +turboquant_search_auto_io,768,0,0.000,100160,662 +turboquant_search_auto_rerank,768,0,0.000,160,39694240 +pq_build,768,1,3744257.416,33554432,100000 +pq_build,768,2,3189126.625,33554432,100000 +pq_build,768,4,2265587.417,33554432,100000 +pq_sidecar_bytes,768,0,0.000,1306641,100000 +pq_manifest_code_bytes,768,0,0.000,49313,1257328 +pq_search,768,0,14622.292,100000,160 +pq_search_p95,768,0,18152.291,1294240,0 +pq_search_p99,768,0,19247.292,160,1099458 +pq_search_work,768,0,0.000,160,1 +pq_search_io,768,0,0.000,100160,0 +pq_search_rerank,768,0,0.000,160,1294240 +pq_recall,768,0,0,0.000000,0 diff --git a/performance-results/proximity-turboquant/qualification-v4-100k-d768-cosine-k10-all-b4-r16-warm-sync-shard/state/n100000-d768-cosine-k10-eall-b4-r16-fixed-memory-warm-sync.json b/performance-results/proximity-turboquant/qualification-v4-100k-d768-cosine-k10-all-b4-r16-warm-sync-shard/state/n100000-d768-cosine-k10-eall-b4-r16-fixed-memory-warm-sync.json new file mode 100644 index 00000000..9ef4d9d7 --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v4-100k-d768-cosine-k10-all-b4-r16-warm-sync-shard/state/n100000-d768-cosine-k10-eall-b4-r16-fixed-memory-warm-sync.json @@ -0,0 +1,29 @@ +{ + "cell": { + "bits": 4, + "dimensions": 768, + "eligibility_ppm": 1000000, + "environment": { + "async_quantizers": false, + "cold": false, + "name": "memory-warm-sync", + "store": "memory" + }, + "k": 10, + "metric": "cosine", + "records": 100000, + "rerank": "fixed", + "rerank_multiplier": 16 + }, + "command": [ + "cargo", + "bench", + "--quiet", + "--all-features", + "--bench", + "prolly_proximity_bench" + ], + "completed_at": "2026-09-12T20:54:35.692851+00:00", + "disposition": "completed", + "sha256": "4af59fa40db73902949fcd6ac084914b6db05ece3d22e4f3ce389626db422620" +} diff --git a/performance-results/proximity-turboquant/qualification-v4-100k-d768-cosine-k10-all-b4-r16-warm-sync-shard/status.json b/performance-results/proximity-turboquant/qualification-v4-100k-d768-cosine-k10-all-b4-r16-warm-sync-shard/status.json new file mode 100644 index 00000000..d0eefa0f --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v4-100k-d768-cosine-k10-all-b4-r16-warm-sync-shard/status.json @@ -0,0 +1,11 @@ +{ + "complete": true, + "completed_cells": 1, + "expected_cells": 1, + "failed": [], + "finished_at": "2026-09-12T20:57:32.865327+00:00", + "revision": "729c2ffac8835db9c99d7706746c321067abfa1d", + "schema": "prolly-turboquant-qualification-v4", + "typed_scalability_failures": 0, + "wasm_smoke": false +} diff --git a/performance-results/proximity-turboquant/qualification-v4-100k-d768-cosine-k10-all-b4-r16-warm-sync-shard/stderr/n100000-d768-cosine-k10-eall-b4-r16-fixed-memory-warm-sync.log b/performance-results/proximity-turboquant/qualification-v4-100k-d768-cosine-k10-all-b4-r16-warm-sync-shard/stderr/n100000-d768-cosine-k10-eall-b4-r16-fixed-memory-warm-sync.log new file mode 100644 index 00000000..e69de29b diff --git a/performance-results/proximity-turboquant/qualification-v4-100k-d768-cosine-k10-all-b4-r8-warm-sync-shard/compile.log b/performance-results/proximity-turboquant/qualification-v4-100k-d768-cosine-k10-all-b4-r8-warm-sync-shard/compile.log new file mode 100644 index 00000000..a88116fb --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v4-100k-d768-cosine-k10-all-b4-r8-warm-sync-shard/compile.log @@ -0,0 +1,2 @@ + Finished `bench` profile [optimized] target(s) in 0.03s + Executable benches/prolly_proximity_bench.rs (target/release/deps/prolly_proximity_bench-88edf17ca838c569) diff --git a/performance-results/proximity-turboquant/qualification-v4-100k-d768-cosine-k10-all-b4-r8-warm-sync-shard/manifest.json b/performance-results/proximity-turboquant/qualification-v4-100k-d768-cosine-k10-all-b4-r8-warm-sync-shard/manifest.json new file mode 100644 index 00000000..4b324a60 --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v4-100k-d768-cosine-k10-all-b4-r8-warm-sync-shard/manifest.json @@ -0,0 +1,63 @@ +{ + "contract": { + "benchmark_schema_version": 4, + "dataset": "linear-mod-2000003-v2", + "environments": [ + { + "async_quantizers": false, + "cold": false, + "name": "memory-warm-sync", + "store": "memory" + }, + { + "async_quantizers": false, + "cold": true, + "name": "memory-cold-sync", + "store": "memory" + }, + { + "async_quantizers": false, + "cold": false, + "name": "file-warm-sync", + "store": "file" + }, + { + "async_quantizers": false, + "cold": true, + "name": "file-cold-sync", + "store": "file" + }, + { + "async_quantizers": true, + "cold": false, + "name": "memory-warm-async", + "store": "memory" + }, + { + "async_quantizers": true, + "cold": true, + "name": "memory-cold-async", + "store": "memory" + } + ], + "exhaustive_max_records": 10000, + "full_cell_count": 45360, + "full_matrix_digest": "a4c137363c5cffe5390a2959217017321f5f17daabf2babb83c52f17a3571d9f", + "max_cell_records": null, + "profile": "full", + "revision": "729c2ffac8835db9c99d7706746c321067abfa1d", + "schema": "prolly-turboquant-qualification-v4", + "search_repeats": 30, + "shard_cell_count": 1, + "shard_count": 1000000, + "shard_index": 550539, + "shard_matrix_digest": "0753eff1c0b2594bb15ce5b41d67229ef040916817c208c3cb9256a1cc4ccd01", + "wasm_smoke": false, + "workers": [ + 1, + 2, + 4 + ] + }, + "created_at": "2026-09-12T20:53:00.016587+00:00" +} diff --git a/performance-results/proximity-turboquant/qualification-v4-100k-d768-cosine-k10-all-b4-r8-warm-sync-shard/raw/n100000-d768-cosine-k10-eall-b4-r8-fixed-memory-warm-sync.csv b/performance-results/proximity-turboquant/qualification-v4-100k-d768-cosine-k10-all-b4-r8-warm-sync-shard/raw/n100000-d768-cosine-k10-eall-b4-r8-fixed-memory-warm-sync.csv new file mode 100644 index 00000000..bc454b5a --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v4-100k-d768-cosine-k10-all-b4-r8-warm-sync-shard/raw/n100000-d768-cosine-k10-eall-b4-r8-fixed-memory-warm-sync.csv @@ -0,0 +1,64 @@ +prolly proximity benchmark +schema_version=4 +dataset=linear-mod-2000003-v2 +revision=729c2ffac8835db9c99d7706746c321067abfa1d +compiler=rustc 1.97.0 (2d8144b78 2026-07-07) | binary: rustc | commit-hash: 2d8144b7880597b6e6d3dfd63a9a9efae3f533d3 | commit-date: 2026-07-07 | host: aarch64-apple-darwin | release: 1.97.0 | LLVM version: 22.1.6 +target_arch=aarch64 +target_os=macos +machine=Haipings-Mac-Studio.local +store=memory +seed=0 +records=100000 +profile=quantizers +search_repeats=30 +metric=Cosine +k=10 +eligibility_ppm=1000000 +effective_k=10 +turboquant_bits=4 +rerank_multiplier=8 +search_cache=warm +search_order=scalar-first +async_quantizers=false +operation,dimensions,threads,micros,metric_a,metric_b +source_build,768,0,13183888.000,100000,0 +source_closure_bytes,768,0,0.000,904537606,101255 +turboquant_build,768,1,1369243.166,76800000,39200000 +turboquant_build_resources,768,1,0.000,1864126,1228800000 +turboquant_build,768,2,939868.250,76800000,39200000 +turboquant_build_resources,768,2,0.000,1864126,1228800000 +turboquant_build,768,4,698713.791,76800000,39200000 +turboquant_build_resources,768,4,0.000,1864126,1228800000 +turboquant_sidecar_bytes,768,0,0.000,39757465,39200000 +turboquant_manifest_code_bytes,768,0,0.000,137,39757328 +turboquant_search_scalar,768,0,128732.708,100000,80 +turboquant_search_scalar_p95,768,0,145541.500,39447120,40542295 +turboquant_search_scalar_p99,768,0,161507.542,80,782161 +turboquant_search_scalar_work,768,0,0.000,80,1 +turboquant_search_scalar_io,768,0,0.000,100080,659 +turboquant_search_scalar_rerank,768,0,0.000,80,39447120 +turboquant_recall,768,0,0,0.000000,0.009057112353809613 +turboquant_search_simd,768,0,169701.542,100000,80 +turboquant_search_simd_p95,768,0,175958.959,39447120,40542295 +turboquant_search_simd_p99,768,0,198577.834,80,782161 +turboquant_search_simd_work,768,0,0.000,80,1 +turboquant_search_simd_io,768,0,0.000,100080,659 +turboquant_search_simd_rerank,768,0,0.000,80,39447120 +turboquant_search_auto,768,0,120933.000,100000,80 +turboquant_search_auto_p95,768,0,124382.667,39447120,40542295 +turboquant_search_auto_p99,768,0,127813.417,80,782161 +turboquant_search_auto_work,768,0,0.000,80,1 +turboquant_search_auto_io,768,0,0.000,100080,659 +turboquant_search_auto_rerank,768,0,0.000,80,39447120 +pq_build,768,1,3969936.167,33554432,100000 +pq_build,768,2,2648358.375,33554432,100000 +pq_build,768,4,2401176.708,33554432,100000 +pq_sidecar_bytes,768,0,0.000,1306641,100000 +pq_manifest_code_bytes,768,0,0.000,49313,1257328 +pq_search,768,0,14795.041,100000,80 +pq_search_p95,768,0,16910.375,1047120,0 +pq_search_p99,768,0,17276.666,80,829299 +pq_search_work,768,0,0.000,80,1 +pq_search_io,768,0,0.000,100080,0 +pq_search_rerank,768,0,0.000,80,1047120 +pq_recall,768,0,0,0.000000,0 diff --git a/performance-results/proximity-turboquant/qualification-v4-100k-d768-cosine-k10-all-b4-r8-warm-sync-shard/state/n100000-d768-cosine-k10-eall-b4-r8-fixed-memory-warm-sync.json b/performance-results/proximity-turboquant/qualification-v4-100k-d768-cosine-k10-all-b4-r8-warm-sync-shard/state/n100000-d768-cosine-k10-eall-b4-r8-fixed-memory-warm-sync.json new file mode 100644 index 00000000..f93fcb49 --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v4-100k-d768-cosine-k10-all-b4-r8-warm-sync-shard/state/n100000-d768-cosine-k10-eall-b4-r8-fixed-memory-warm-sync.json @@ -0,0 +1,29 @@ +{ + "cell": { + "bits": 4, + "dimensions": 768, + "eligibility_ppm": 1000000, + "environment": { + "async_quantizers": false, + "cold": false, + "name": "memory-warm-sync", + "store": "memory" + }, + "k": 10, + "metric": "cosine", + "records": 100000, + "rerank": "fixed", + "rerank_multiplier": 8 + }, + "command": [ + "cargo", + "bench", + "--quiet", + "--all-features", + "--bench", + "prolly_proximity_bench" + ], + "completed_at": "2026-09-12T20:53:47.970787+00:00", + "disposition": "completed", + "sha256": "a728e638a2d82ee5782362b47d87795018b8792fff08e74ce12003fe10937bfa" +} diff --git a/performance-results/proximity-turboquant/qualification-v4-100k-d768-cosine-k10-all-b4-r8-warm-sync-shard/status.json b/performance-results/proximity-turboquant/qualification-v4-100k-d768-cosine-k10-all-b4-r8-warm-sync-shard/status.json new file mode 100644 index 00000000..4b387c33 --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v4-100k-d768-cosine-k10-all-b4-r8-warm-sync-shard/status.json @@ -0,0 +1,11 @@ +{ + "complete": true, + "completed_cells": 1, + "expected_cells": 1, + "failed": [], + "finished_at": "2026-09-12T20:57:32.576670+00:00", + "revision": "729c2ffac8835db9c99d7706746c321067abfa1d", + "schema": "prolly-turboquant-qualification-v4", + "typed_scalability_failures": 0, + "wasm_smoke": false +} diff --git a/performance-results/proximity-turboquant/qualification-v4-100k-d768-cosine-k10-all-b4-r8-warm-sync-shard/stderr/n100000-d768-cosine-k10-eall-b4-r8-fixed-memory-warm-sync.log b/performance-results/proximity-turboquant/qualification-v4-100k-d768-cosine-k10-all-b4-r8-warm-sync-shard/stderr/n100000-d768-cosine-k10-eall-b4-r8-fixed-memory-warm-sync.log new file mode 100644 index 00000000..e69de29b diff --git a/performance-results/proximity-turboquant/qualification-v4-100k-d768-inner-product-k10-all-b4-r16-warm-sync-shard/compile.log b/performance-results/proximity-turboquant/qualification-v4-100k-d768-inner-product-k10-all-b4-r16-warm-sync-shard/compile.log new file mode 100644 index 00000000..a88116fb --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v4-100k-d768-inner-product-k10-all-b4-r16-warm-sync-shard/compile.log @@ -0,0 +1,2 @@ + Finished `bench` profile [optimized] target(s) in 0.03s + Executable benches/prolly_proximity_bench.rs (target/release/deps/prolly_proximity_bench-88edf17ca838c569) diff --git a/performance-results/proximity-turboquant/qualification-v4-100k-d768-inner-product-k10-all-b4-r16-warm-sync-shard/manifest.json b/performance-results/proximity-turboquant/qualification-v4-100k-d768-inner-product-k10-all-b4-r16-warm-sync-shard/manifest.json new file mode 100644 index 00000000..6c163ad2 --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v4-100k-d768-inner-product-k10-all-b4-r16-warm-sync-shard/manifest.json @@ -0,0 +1,63 @@ +{ + "contract": { + "benchmark_schema_version": 4, + "dataset": "linear-mod-2000003-v2", + "environments": [ + { + "async_quantizers": false, + "cold": false, + "name": "memory-warm-sync", + "store": "memory" + }, + { + "async_quantizers": false, + "cold": true, + "name": "memory-cold-sync", + "store": "memory" + }, + { + "async_quantizers": false, + "cold": false, + "name": "file-warm-sync", + "store": "file" + }, + { + "async_quantizers": false, + "cold": true, + "name": "file-cold-sync", + "store": "file" + }, + { + "async_quantizers": true, + "cold": false, + "name": "memory-warm-async", + "store": "memory" + }, + { + "async_quantizers": true, + "cold": true, + "name": "memory-cold-async", + "store": "memory" + } + ], + "exhaustive_max_records": 10000, + "full_cell_count": 45360, + "full_matrix_digest": "a4c137363c5cffe5390a2959217017321f5f17daabf2babb83c52f17a3571d9f", + "max_cell_records": null, + "profile": "full", + "revision": "729c2ffac8835db9c99d7706746c321067abfa1d", + "schema": "prolly-turboquant-qualification-v4", + "search_repeats": 30, + "shard_cell_count": 1, + "shard_count": 1000000, + "shard_index": 729950, + "shard_matrix_digest": "1bbc2d29edc5cd1e53d71067b73f00b21e338481bacdf4d2f1fd4149bacad28e", + "wasm_smoke": false, + "workers": [ + 1, + 2, + 4 + ] + }, + "created_at": "2026-09-12T20:56:16.843581+00:00" +} diff --git a/performance-results/proximity-turboquant/qualification-v4-100k-d768-inner-product-k10-all-b4-r16-warm-sync-shard/raw/n100000-d768-inner_product-k10-eall-b4-r16-fixed-memory-warm-sync.csv b/performance-results/proximity-turboquant/qualification-v4-100k-d768-inner-product-k10-all-b4-r16-warm-sync-shard/raw/n100000-d768-inner_product-k10-eall-b4-r16-fixed-memory-warm-sync.csv new file mode 100644 index 00000000..e144a229 --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v4-100k-d768-inner-product-k10-all-b4-r16-warm-sync-shard/raw/n100000-d768-inner_product-k10-eall-b4-r16-fixed-memory-warm-sync.csv @@ -0,0 +1,64 @@ +prolly proximity benchmark +schema_version=4 +dataset=linear-mod-2000003-v2 +revision=729c2ffac8835db9c99d7706746c321067abfa1d +compiler=rustc 1.97.0 (2d8144b78 2026-07-07) | binary: rustc | commit-hash: 2d8144b7880597b6e6d3dfd63a9a9efae3f533d3 | commit-date: 2026-07-07 | host: aarch64-apple-darwin | release: 1.97.0 | LLVM version: 22.1.6 +target_arch=aarch64 +target_os=macos +machine=Haipings-Mac-Studio.local +store=memory +seed=0 +records=100000 +profile=quantizers +search_repeats=30 +metric=InnerProduct +k=10 +eligibility_ppm=1000000 +effective_k=10 +turboquant_bits=4 +rerank_multiplier=16 +search_cache=warm +search_order=scalar-first +async_quantizers=false +operation,dimensions,threads,micros,metric_a,metric_b +source_build,768,0,12284654.416,100000,0 +source_closure_bytes,768,0,0.000,910057491,103980 +turboquant_build,768,1,1519425.750,76800000,39200000 +turboquant_build_resources,768,1,0.000,1864126,1228800000 +turboquant_build,768,2,1020920.667,76800000,39200000 +turboquant_build_resources,768,2,0.000,1864126,1228800000 +turboquant_build,768,4,859051.584,76800000,39200000 +turboquant_build_resources,768,4,0.000,1864126,1228800000 +turboquant_sidecar_bytes,768,0,0.000,39757465,39200000 +turboquant_manifest_code_bytes,768,0,0.000,137,39757328 +turboquant_search_scalar,768,0,152049.208,100000,160 +turboquant_search_scalar_p95,768,0,207117.125,39694240,40904374 +turboquant_search_scalar_p99,768,0,212936.500,160,1149739 +turboquant_search_scalar_work,768,0,0.000,160,1 +turboquant_search_scalar_io,768,0,0.000,100160,662 +turboquant_search_scalar_rerank,768,0,0.000,160,39694240 +turboquant_recall,768,0,0,1.000000,0.009057112352759421 +turboquant_search_simd,768,0,187896.209,100000,160 +turboquant_search_simd_p95,768,0,213691.750,39694240,40904374 +turboquant_search_simd_p99,768,0,230931.833,160,1149739 +turboquant_search_simd_work,768,0,0.000,160,1 +turboquant_search_simd_io,768,0,0.000,100160,662 +turboquant_search_simd_rerank,768,0,0.000,160,39694240 +turboquant_search_auto,768,0,152139.583,100000,160 +turboquant_search_auto_p95,768,0,298811.459,39694240,40904374 +turboquant_search_auto_p99,768,0,389659.583,160,1149739 +turboquant_search_auto_work,768,0,0.000,160,1 +turboquant_search_auto_io,768,0,0.000,100160,662 +turboquant_search_auto_rerank,768,0,0.000,160,39694240 +pq_build,768,1,5978905.542,33554432,100000 +pq_build,768,2,3242162.125,33554432,100000 +pq_build,768,4,3381362.292,33554432,100000 +pq_sidecar_bytes,768,0,0.000,1306641,100000 +pq_manifest_code_bytes,768,0,0.000,49313,1257328 +pq_search,768,0,19515.792,100000,160 +pq_search_p95,768,0,58508.459,1294240,0 +pq_search_p99,768,0,96525.417,160,1099458 +pq_search_work,768,0,0.000,160,1 +pq_search_io,768,0,0.000,100160,0 +pq_search_rerank,768,0,0.000,160,1294240 +pq_recall,768,0,0,0.000000,0 diff --git a/performance-results/proximity-turboquant/qualification-v4-100k-d768-inner-product-k10-all-b4-r16-warm-sync-shard/state/n100000-d768-inner_product-k10-eall-b4-r16-fixed-memory-warm-sync.json b/performance-results/proximity-turboquant/qualification-v4-100k-d768-inner-product-k10-all-b4-r16-warm-sync-shard/state/n100000-d768-inner_product-k10-eall-b4-r16-fixed-memory-warm-sync.json new file mode 100644 index 00000000..e0694591 --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v4-100k-d768-inner-product-k10-all-b4-r16-warm-sync-shard/state/n100000-d768-inner_product-k10-eall-b4-r16-fixed-memory-warm-sync.json @@ -0,0 +1,29 @@ +{ + "cell": { + "bits": 4, + "dimensions": 768, + "eligibility_ppm": 1000000, + "environment": { + "async_quantizers": false, + "cold": false, + "name": "memory-warm-sync", + "store": "memory" + }, + "k": 10, + "metric": "inner_product", + "records": 100000, + "rerank": "fixed", + "rerank_multiplier": 16 + }, + "command": [ + "cargo", + "bench", + "--quiet", + "--all-features", + "--bench", + "prolly_proximity_bench" + ], + "completed_at": "2026-09-12T20:57:12.621032+00:00", + "disposition": "completed", + "sha256": "80bc3391a8f5e935277366cfb3ccccd9bd575859d13ee6f370cf42698d41491a" +} diff --git a/performance-results/proximity-turboquant/qualification-v4-100k-d768-inner-product-k10-all-b4-r16-warm-sync-shard/status.json b/performance-results/proximity-turboquant/qualification-v4-100k-d768-inner-product-k10-all-b4-r16-warm-sync-shard/status.json new file mode 100644 index 00000000..ebd6d950 --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v4-100k-d768-inner-product-k10-all-b4-r16-warm-sync-shard/status.json @@ -0,0 +1,11 @@ +{ + "complete": true, + "completed_cells": 1, + "expected_cells": 1, + "failed": [], + "finished_at": "2026-09-12T20:57:33.720527+00:00", + "revision": "729c2ffac8835db9c99d7706746c321067abfa1d", + "schema": "prolly-turboquant-qualification-v4", + "typed_scalability_failures": 0, + "wasm_smoke": false +} diff --git a/performance-results/proximity-turboquant/qualification-v4-100k-d768-inner-product-k10-all-b4-r16-warm-sync-shard/stderr/n100000-d768-inner_product-k10-eall-b4-r16-fixed-memory-warm-sync.log b/performance-results/proximity-turboquant/qualification-v4-100k-d768-inner-product-k10-all-b4-r16-warm-sync-shard/stderr/n100000-d768-inner_product-k10-eall-b4-r16-fixed-memory-warm-sync.log new file mode 100644 index 00000000..e69de29b diff --git a/performance-results/proximity-turboquant/qualification-v4-100k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/compile.log b/performance-results/proximity-turboquant/qualification-v4-100k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/compile.log new file mode 100644 index 00000000..a88116fb --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v4-100k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/compile.log @@ -0,0 +1,2 @@ + Finished `bench` profile [optimized] target(s) in 0.03s + Executable benches/prolly_proximity_bench.rs (target/release/deps/prolly_proximity_bench-88edf17ca838c569) diff --git a/performance-results/proximity-turboquant/qualification-v4-100k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/manifest.json b/performance-results/proximity-turboquant/qualification-v4-100k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/manifest.json new file mode 100644 index 00000000..38e15870 --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v4-100k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/manifest.json @@ -0,0 +1,63 @@ +{ + "contract": { + "benchmark_schema_version": 4, + "dataset": "linear-mod-2000003-v2", + "environments": [ + { + "async_quantizers": false, + "cold": false, + "name": "memory-warm-sync", + "store": "memory" + }, + { + "async_quantizers": false, + "cold": true, + "name": "memory-cold-sync", + "store": "memory" + }, + { + "async_quantizers": false, + "cold": false, + "name": "file-warm-sync", + "store": "file" + }, + { + "async_quantizers": false, + "cold": true, + "name": "file-cold-sync", + "store": "file" + }, + { + "async_quantizers": true, + "cold": false, + "name": "memory-warm-async", + "store": "memory" + }, + { + "async_quantizers": true, + "cold": true, + "name": "memory-cold-async", + "store": "memory" + } + ], + "exhaustive_max_records": 10000, + "full_cell_count": 45360, + "full_matrix_digest": "a4c137363c5cffe5390a2959217017321f5f17daabf2babb83c52f17a3571d9f", + "max_cell_records": null, + "profile": "full", + "revision": "729c2ffac8835db9c99d7706746c321067abfa1d", + "schema": "prolly-turboquant-qualification-v4", + "search_repeats": 30, + "shard_cell_count": 1, + "shard_count": 1000000, + "shard_index": 626636, + "shard_matrix_digest": "9d48ef6289ebec0c3211bb34e518969a75e9fd6cb7d3c46a3cb34f76762a0e08", + "wasm_smoke": false, + "workers": [ + 1, + 2, + 4 + ] + }, + "created_at": "2026-09-12T20:55:27.110254+00:00" +} diff --git a/performance-results/proximity-turboquant/qualification-v4-100k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/raw/n100000-d768-inner_product-k10-eall-b4-r8-fixed-memory-warm-sync.csv b/performance-results/proximity-turboquant/qualification-v4-100k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/raw/n100000-d768-inner_product-k10-eall-b4-r8-fixed-memory-warm-sync.csv new file mode 100644 index 00000000..9cf24a4c --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v4-100k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/raw/n100000-d768-inner_product-k10-eall-b4-r8-fixed-memory-warm-sync.csv @@ -0,0 +1,64 @@ +prolly proximity benchmark +schema_version=4 +dataset=linear-mod-2000003-v2 +revision=729c2ffac8835db9c99d7706746c321067abfa1d +compiler=rustc 1.97.0 (2d8144b78 2026-07-07) | binary: rustc | commit-hash: 2d8144b7880597b6e6d3dfd63a9a9efae3f533d3 | commit-date: 2026-07-07 | host: aarch64-apple-darwin | release: 1.97.0 | LLVM version: 22.1.6 +target_arch=aarch64 +target_os=macos +machine=Haipings-Mac-Studio.local +store=memory +seed=0 +records=100000 +profile=quantizers +search_repeats=30 +metric=InnerProduct +k=10 +eligibility_ppm=1000000 +effective_k=10 +turboquant_bits=4 +rerank_multiplier=8 +search_cache=warm +search_order=scalar-first +async_quantizers=false +operation,dimensions,threads,micros,metric_a,metric_b +source_build,768,0,13356209.417,100000,0 +source_closure_bytes,768,0,0.000,910057491,103980 +turboquant_build,768,1,1774542.459,76800000,39200000 +turboquant_build_resources,768,1,0.000,1864126,1228800000 +turboquant_build,768,2,1111345.459,76800000,39200000 +turboquant_build_resources,768,2,0.000,1864126,1228800000 +turboquant_build,768,4,1104178.792,76800000,39200000 +turboquant_build_resources,768,4,0.000,1864126,1228800000 +turboquant_sidecar_bytes,768,0,0.000,39757465,39200000 +turboquant_manifest_code_bytes,768,0,0.000,137,39757328 +turboquant_search_scalar,768,0,137068.084,100000,80 +turboquant_search_scalar_p95,768,0,148365.209,39447120,40542295 +turboquant_search_scalar_p99,768,0,187275.291,80,782161 +turboquant_search_scalar_work,768,0,0.000,80,1 +turboquant_search_scalar_io,768,0,0.000,100080,659 +turboquant_search_scalar_rerank,768,0,0.000,80,39447120 +turboquant_recall,768,0,0,0.000000,0.009057112352759421 +turboquant_search_simd,768,0,184700.458,100000,80 +turboquant_search_simd_p95,768,0,193886.042,39447120,40542295 +turboquant_search_simd_p99,768,0,207807.958,80,782161 +turboquant_search_simd_work,768,0,0.000,80,1 +turboquant_search_simd_io,768,0,0.000,100080,659 +turboquant_search_simd_rerank,768,0,0.000,80,39447120 +turboquant_search_auto,768,0,122724.667,100000,80 +turboquant_search_auto_p95,768,0,123636.375,39447120,40542295 +turboquant_search_auto_p99,768,0,127825.625,80,782161 +turboquant_search_auto_work,768,0,0.000,80,1 +turboquant_search_auto_io,768,0,0.000,100080,659 +turboquant_search_auto_rerank,768,0,0.000,80,39447120 +pq_build,768,1,3718405.625,33554432,100000 +pq_build,768,2,2758574.667,33554432,100000 +pq_build,768,4,2330238.916,33554432,100000 +pq_sidecar_bytes,768,0,0.000,1306641,100000 +pq_manifest_code_bytes,768,0,0.000,49313,1257328 +pq_search,768,0,12751.167,100000,80 +pq_search_p95,768,0,13039.750,1047120,0 +pq_search_p99,768,0,13825.000,80,829299 +pq_search_work,768,0,0.000,80,1 +pq_search_io,768,0,0.000,100080,0 +pq_search_rerank,768,0,0.000,80,1047120 +pq_recall,768,0,0,0.000000,0 diff --git a/performance-results/proximity-turboquant/qualification-v4-100k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/state/n100000-d768-inner_product-k10-eall-b4-r8-fixed-memory-warm-sync.json b/performance-results/proximity-turboquant/qualification-v4-100k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/state/n100000-d768-inner_product-k10-eall-b4-r8-fixed-memory-warm-sync.json new file mode 100644 index 00000000..74331e23 --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v4-100k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/state/n100000-d768-inner_product-k10-eall-b4-r8-fixed-memory-warm-sync.json @@ -0,0 +1,29 @@ +{ + "cell": { + "bits": 4, + "dimensions": 768, + "eligibility_ppm": 1000000, + "environment": { + "async_quantizers": false, + "cold": false, + "name": "memory-warm-sync", + "store": "memory" + }, + "k": 10, + "metric": "inner_product", + "records": 100000, + "rerank": "fixed", + "rerank_multiplier": 8 + }, + "command": [ + "cargo", + "bench", + "--quiet", + "--all-features", + "--bench", + "prolly_proximity_bench" + ], + "completed_at": "2026-09-12T20:56:16.586925+00:00", + "disposition": "completed", + "sha256": "769e4f22b93f33d7c1a5246d9362aba204f251b2aaad5d78c83dd0d7b068f763" +} diff --git a/performance-results/proximity-turboquant/qualification-v4-100k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/status.json b/performance-results/proximity-turboquant/qualification-v4-100k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/status.json new file mode 100644 index 00000000..f9d70a25 --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v4-100k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/status.json @@ -0,0 +1,11 @@ +{ + "complete": true, + "completed_cells": 1, + "expected_cells": 1, + "failed": [], + "finished_at": "2026-09-12T20:57:33.433629+00:00", + "revision": "729c2ffac8835db9c99d7706746c321067abfa1d", + "schema": "prolly-turboquant-qualification-v4", + "typed_scalability_failures": 0, + "wasm_smoke": false +} diff --git a/performance-results/proximity-turboquant/qualification-v4-100k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/stderr/n100000-d768-inner_product-k10-eall-b4-r8-fixed-memory-warm-sync.log b/performance-results/proximity-turboquant/qualification-v4-100k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/stderr/n100000-d768-inner_product-k10-eall-b4-r8-fixed-memory-warm-sync.log new file mode 100644 index 00000000..e69de29b diff --git a/performance-results/proximity-turboquant/qualification-v4-100k-d768-l2-k10-all-b4-r8-warm-sync-shard/compile.log b/performance-results/proximity-turboquant/qualification-v4-100k-d768-l2-k10-all-b4-r8-warm-sync-shard/compile.log new file mode 100644 index 00000000..a88116fb --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v4-100k-d768-l2-k10-all-b4-r8-warm-sync-shard/compile.log @@ -0,0 +1,2 @@ + Finished `bench` profile [optimized] target(s) in 0.03s + Executable benches/prolly_proximity_bench.rs (target/release/deps/prolly_proximity_bench-88edf17ca838c569) diff --git a/performance-results/proximity-turboquant/qualification-v4-100k-d768-l2-k10-all-b4-r8-warm-sync-shard/manifest.json b/performance-results/proximity-turboquant/qualification-v4-100k-d768-l2-k10-all-b4-r8-warm-sync-shard/manifest.json new file mode 100644 index 00000000..7c44f047 --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v4-100k-d768-l2-k10-all-b4-r8-warm-sync-shard/manifest.json @@ -0,0 +1,63 @@ +{ + "contract": { + "benchmark_schema_version": 4, + "dataset": "linear-mod-2000003-v2", + "environments": [ + { + "async_quantizers": false, + "cold": false, + "name": "memory-warm-sync", + "store": "memory" + }, + { + "async_quantizers": false, + "cold": true, + "name": "memory-cold-sync", + "store": "memory" + }, + { + "async_quantizers": false, + "cold": false, + "name": "file-warm-sync", + "store": "file" + }, + { + "async_quantizers": false, + "cold": true, + "name": "file-cold-sync", + "store": "file" + }, + { + "async_quantizers": true, + "cold": false, + "name": "memory-warm-async", + "store": "memory" + }, + { + "async_quantizers": true, + "cold": true, + "name": "memory-cold-async", + "store": "memory" + } + ], + "exhaustive_max_records": 10000, + "full_cell_count": 45360, + "full_matrix_digest": "a4c137363c5cffe5390a2959217017321f5f17daabf2babb83c52f17a3571d9f", + "max_cell_records": null, + "profile": "full", + "revision": "729c2ffac8835db9c99d7706746c321067abfa1d", + "schema": "prolly-turboquant-qualification-v4", + "search_repeats": 30, + "shard_cell_count": 1, + "shard_count": 1000000, + "shard_index": 472514, + "shard_matrix_digest": "e20020960a8655029a5bd5f01b52b87fdcb690bff5450684c14f10c2ff3b54f4", + "wasm_smoke": false, + "workers": [ + 1, + 2, + 4 + ] + }, + "created_at": "2026-09-12T20:54:35.957479+00:00" +} diff --git a/performance-results/proximity-turboquant/qualification-v4-100k-d768-l2-k10-all-b4-r8-warm-sync-shard/raw/n100000-d768-l2-k10-eall-b4-r8-fixed-memory-warm-sync.csv b/performance-results/proximity-turboquant/qualification-v4-100k-d768-l2-k10-all-b4-r8-warm-sync-shard/raw/n100000-d768-l2-k10-eall-b4-r8-fixed-memory-warm-sync.csv new file mode 100644 index 00000000..fbb6d3d6 --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v4-100k-d768-l2-k10-all-b4-r8-warm-sync-shard/raw/n100000-d768-l2-k10-eall-b4-r8-fixed-memory-warm-sync.csv @@ -0,0 +1,64 @@ +prolly proximity benchmark +schema_version=4 +dataset=linear-mod-2000003-v2 +revision=729c2ffac8835db9c99d7706746c321067abfa1d +compiler=rustc 1.97.0 (2d8144b78 2026-07-07) | binary: rustc | commit-hash: 2d8144b7880597b6e6d3dfd63a9a9efae3f533d3 | commit-date: 2026-07-07 | host: aarch64-apple-darwin | release: 1.97.0 | LLVM version: 22.1.6 +target_arch=aarch64 +target_os=macos +machine=Haipings-Mac-Studio.local +store=memory +seed=0 +records=100000 +profile=quantizers +search_repeats=30 +metric=L2Squared +k=10 +eligibility_ppm=1000000 +effective_k=10 +turboquant_bits=4 +rerank_multiplier=8 +search_cache=warm +search_order=scalar-first +async_quantizers=false +operation,dimensions,threads,micros,metric_a,metric_b +source_build,768,0,12606808.541,100000,0 +source_closure_bytes,768,0,0.000,904586853,101274 +turboquant_build,768,1,1407567.167,76800000,39200000 +turboquant_build_resources,768,1,0.000,1864126,1228800000 +turboquant_build,768,2,968182.208,76800000,39200000 +turboquant_build_resources,768,2,0.000,1864126,1228800000 +turboquant_build,768,4,767574.583,76800000,39200000 +turboquant_build_resources,768,4,0.000,1864126,1228800000 +turboquant_sidecar_bytes,768,0,0.000,39757465,39200000 +turboquant_manifest_code_bytes,768,0,0.000,137,39757328 +turboquant_search_scalar,768,0,121150.166,100000,80 +turboquant_search_scalar_p95,768,0,129211.291,39447120,40594917 +turboquant_search_scalar_p99,768,0,143493.208,80,835582 +turboquant_search_scalar_work,768,0,0.000,80,1 +turboquant_search_scalar_io,768,0,0.000,100080,660 +turboquant_search_scalar_rerank,768,0,0.000,80,39447120 +turboquant_recall,768,0,0,1.000000,0.009057112352759421 +turboquant_search_simd,768,0,186362.458,100000,80 +turboquant_search_simd_p95,768,0,210773.208,39447120,40594917 +turboquant_search_simd_p99,768,0,218971.375,80,835582 +turboquant_search_simd_work,768,0,0.000,80,1 +turboquant_search_simd_io,768,0,0.000,100080,660 +turboquant_search_simd_rerank,768,0,0.000,80,39447120 +turboquant_search_auto,768,0,127451.292,100000,80 +turboquant_search_auto_p95,768,0,139941.542,39447120,40594917 +turboquant_search_auto_p99,768,0,166328.417,80,835582 +turboquant_search_auto_work,768,0,0.000,80,1 +turboquant_search_auto_io,768,0,0.000,100080,660 +turboquant_search_auto_rerank,768,0,0.000,80,39447120 +pq_build,768,1,4186421.708,33554432,100000 +pq_build,768,2,2857963.333,33554432,100000 +pq_build,768,4,2757306.250,33554432,100000 +pq_sidecar_bytes,768,0,0.000,1306641,100000 +pq_manifest_code_bytes,768,0,0.000,49313,1257328 +pq_search,768,0,13391.416,100000,80 +pq_search_p95,768,0,14667.166,1047120,0 +pq_search_p99,768,0,14981.708,80,829299 +pq_search_work,768,0,0.000,80,1 +pq_search_io,768,0,0.000,100080,0 +pq_search_rerank,768,0,0.000,80,1047120 +pq_recall,768,0,0,0.000000,0 diff --git a/performance-results/proximity-turboquant/qualification-v4-100k-d768-l2-k10-all-b4-r8-warm-sync-shard/state/n100000-d768-l2-k10-eall-b4-r8-fixed-memory-warm-sync.json b/performance-results/proximity-turboquant/qualification-v4-100k-d768-l2-k10-all-b4-r8-warm-sync-shard/state/n100000-d768-l2-k10-eall-b4-r8-fixed-memory-warm-sync.json new file mode 100644 index 00000000..6241f7d6 --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v4-100k-d768-l2-k10-all-b4-r8-warm-sync-shard/state/n100000-d768-l2-k10-eall-b4-r8-fixed-memory-warm-sync.json @@ -0,0 +1,29 @@ +{ + "cell": { + "bits": 4, + "dimensions": 768, + "eligibility_ppm": 1000000, + "environment": { + "async_quantizers": false, + "cold": false, + "name": "memory-warm-sync", + "store": "memory" + }, + "k": 10, + "metric": "l2", + "records": 100000, + "rerank": "fixed", + "rerank_multiplier": 8 + }, + "command": [ + "cargo", + "bench", + "--quiet", + "--all-features", + "--bench", + "prolly_proximity_bench" + ], + "completed_at": "2026-09-12T20:55:26.843579+00:00", + "disposition": "completed", + "sha256": "1515d660526761b2018d89655afcbe2b9c0dd56b7bd3706104cf9ffc5842766c" +} diff --git a/performance-results/proximity-turboquant/qualification-v4-100k-d768-l2-k10-all-b4-r8-warm-sync-shard/status.json b/performance-results/proximity-turboquant/qualification-v4-100k-d768-l2-k10-all-b4-r8-warm-sync-shard/status.json new file mode 100644 index 00000000..ddf13582 --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v4-100k-d768-l2-k10-all-b4-r8-warm-sync-shard/status.json @@ -0,0 +1,11 @@ +{ + "complete": true, + "completed_cells": 1, + "expected_cells": 1, + "failed": [], + "finished_at": "2026-09-12T20:57:33.148956+00:00", + "revision": "729c2ffac8835db9c99d7706746c321067abfa1d", + "schema": "prolly-turboquant-qualification-v4", + "typed_scalability_failures": 0, + "wasm_smoke": false +} diff --git a/performance-results/proximity-turboquant/qualification-v4-100k-d768-l2-k10-all-b4-r8-warm-sync-shard/stderr/n100000-d768-l2-k10-eall-b4-r8-fixed-memory-warm-sync.log b/performance-results/proximity-turboquant/qualification-v4-100k-d768-l2-k10-all-b4-r8-warm-sync-shard/stderr/n100000-d768-l2-k10-eall-b4-r8-fixed-memory-warm-sync.log new file mode 100644 index 00000000..e69de29b diff --git a/performance-results/proximity-turboquant/qualification-v4-10k-d768-cosine-k10-all-b4-exhaustive-warm-sync-shard/compile.log b/performance-results/proximity-turboquant/qualification-v4-10k-d768-cosine-k10-all-b4-exhaustive-warm-sync-shard/compile.log new file mode 100644 index 00000000..da32c7ba --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v4-10k-d768-cosine-k10-all-b4-exhaustive-warm-sync-shard/compile.log @@ -0,0 +1,2 @@ + Finished `bench` profile [optimized] target(s) in 0.08s + Executable benches/prolly_proximity_bench.rs (target/release/deps/prolly_proximity_bench-88edf17ca838c569) diff --git a/performance-results/proximity-turboquant/qualification-v4-10k-d768-cosine-k10-all-b4-exhaustive-warm-sync-shard/manifest.json b/performance-results/proximity-turboquant/qualification-v4-10k-d768-cosine-k10-all-b4-exhaustive-warm-sync-shard/manifest.json new file mode 100644 index 00000000..8a31cb0a --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v4-10k-d768-cosine-k10-all-b4-exhaustive-warm-sync-shard/manifest.json @@ -0,0 +1,63 @@ +{ + "contract": { + "benchmark_schema_version": 4, + "dataset": "linear-mod-2000003-v2", + "environments": [ + { + "async_quantizers": false, + "cold": false, + "name": "memory-warm-sync", + "store": "memory" + }, + { + "async_quantizers": false, + "cold": true, + "name": "memory-cold-sync", + "store": "memory" + }, + { + "async_quantizers": false, + "cold": false, + "name": "file-warm-sync", + "store": "file" + }, + { + "async_quantizers": false, + "cold": true, + "name": "file-cold-sync", + "store": "file" + }, + { + "async_quantizers": true, + "cold": false, + "name": "memory-warm-async", + "store": "memory" + }, + { + "async_quantizers": true, + "cold": true, + "name": "memory-cold-async", + "store": "memory" + } + ], + "exhaustive_max_records": 10000, + "full_cell_count": 45360, + "full_matrix_digest": "a4c137363c5cffe5390a2959217017321f5f17daabf2babb83c52f17a3571d9f", + "max_cell_records": null, + "profile": "full", + "revision": "729c2ffac8835db9c99d7706746c321067abfa1d", + "schema": "prolly-turboquant-qualification-v4", + "search_repeats": 30, + "shard_cell_count": 1, + "shard_count": 1000000000, + "shard_index": 769376325, + "shard_matrix_digest": "5ef103769392984526c3a111d9cf74fadcc6f9f4a7f6d9650453509d945d482f", + "wasm_smoke": false, + "workers": [ + 1, + 2, + 4 + ] + }, + "created_at": "2026-09-12T21:01:39.317957+00:00" +} diff --git a/performance-results/proximity-turboquant/qualification-v4-10k-d768-cosine-k10-all-b4-exhaustive-warm-sync-shard/raw/n10000-d768-cosine-k10-eall-b4-r1000-exhaustive-memory-warm-sync.csv b/performance-results/proximity-turboquant/qualification-v4-10k-d768-cosine-k10-all-b4-exhaustive-warm-sync-shard/raw/n10000-d768-cosine-k10-eall-b4-r1000-exhaustive-memory-warm-sync.csv new file mode 100644 index 00000000..910add68 --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v4-10k-d768-cosine-k10-all-b4-exhaustive-warm-sync-shard/raw/n10000-d768-cosine-k10-eall-b4-r1000-exhaustive-memory-warm-sync.csv @@ -0,0 +1,64 @@ +prolly proximity benchmark +schema_version=4 +dataset=linear-mod-2000003-v2 +revision=729c2ffac8835db9c99d7706746c321067abfa1d +compiler=rustc 1.97.0 (2d8144b78 2026-07-07) | binary: rustc | commit-hash: 2d8144b7880597b6e6d3dfd63a9a9efae3f533d3 | commit-date: 2026-07-07 | host: aarch64-apple-darwin | release: 1.97.0 | LLVM version: 22.1.6 +target_arch=aarch64 +target_os=macos +machine=Haipings-Mac-Studio.local +store=memory +seed=0 +records=10000 +profile=quantizers +search_repeats=30 +metric=Cosine +k=10 +eligibility_ppm=1000000 +effective_k=10 +turboquant_bits=4 +rerank_multiplier=1000 +search_cache=warm +search_order=scalar-first +async_quantizers=false +operation,dimensions,threads,micros,metric_a,metric_b +source_build,768,0,811351.666,10000,0 +source_closure_bytes,768,0,0.000,90557210,10169 +turboquant_build,768,1,136774.417,7680000,3920000 +turboquant_build_resources,768,1,0.000,1709751,122880000 +turboquant_build,768,2,83446.458,7680000,3920000 +turboquant_build_resources,768,2,0.000,1709751,122880000 +turboquant_build,768,4,54979.625,7680000,3920000 +turboquant_build_resources,768,4,0.000,1709751,122880000 +turboquant_sidecar_bytes,768,0,0.000,3975265,3920000 +turboquant_manifest_code_bytes,768,0,0.000,137,3975128 +turboquant_search_scalar,768,0,25812.291,10000,10000 +turboquant_search_scalar_p95,768,0,26749.125,34810000,0 +turboquant_search_scalar_p99,768,0,26961.375,10000,31412598 +turboquant_search_scalar_work,768,0,0.000,10000,1 +turboquant_search_scalar_io,768,0,0.000,20000,0 +turboquant_search_scalar_rerank,768,0,0.000,10000,34810000 +turboquant_recall,768,0,0,1.000000,0.009584430615167594 +turboquant_search_simd,768,0,31049.125,10000,10000 +turboquant_search_simd_p95,768,0,32285.500,34810000,0 +turboquant_search_simd_p99,768,0,32791.125,10000,31412598 +turboquant_search_simd_work,768,0,0.000,10000,1 +turboquant_search_simd_io,768,0,0.000,20000,0 +turboquant_search_simd_rerank,768,0,0.000,10000,34810000 +turboquant_search_auto,768,0,25773.292,10000,10000 +turboquant_search_auto_p95,768,0,26231.208,34810000,0 +turboquant_search_auto_p99,768,0,26233.167,10000,31412598 +turboquant_search_auto_work,768,0,0.000,10000,1 +turboquant_search_auto_io,768,0,0.000,20000,0 +turboquant_search_auto_rerank,768,0,0.000,10000,34810000 +pq_build,768,1,446381.292,5120000,10000 +pq_build,768,2,303195.167,5120000,10000 +pq_build,768,4,232400.375,5120000,10000 +pq_sidecar_bytes,768,0,0.000,174440,10000 +pq_manifest_code_bytes,768,0,0.000,49312,125128 +pq_search,768,0,16974.708,10000,10000 +pq_search_p95,768,0,17395.166,30970000,0 +pq_search_p99,768,0,17471.750,10000,31412598 +pq_search_work,768,0,0.000,10000,1 +pq_search_io,768,0,0.000,20000,0 +pq_search_rerank,768,0,0.000,10000,30970000 +pq_recall,768,0,0,1.000000,0 diff --git a/performance-results/proximity-turboquant/qualification-v4-10k-d768-cosine-k10-all-b4-exhaustive-warm-sync-shard/state/n10000-d768-cosine-k10-eall-b4-r1000-exhaustive-memory-warm-sync.json b/performance-results/proximity-turboquant/qualification-v4-10k-d768-cosine-k10-all-b4-exhaustive-warm-sync-shard/state/n10000-d768-cosine-k10-eall-b4-r1000-exhaustive-memory-warm-sync.json new file mode 100644 index 00000000..3303af46 --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v4-10k-d768-cosine-k10-all-b4-exhaustive-warm-sync-shard/state/n10000-d768-cosine-k10-eall-b4-r1000-exhaustive-memory-warm-sync.json @@ -0,0 +1,29 @@ +{ + "cell": { + "bits": 4, + "dimensions": 768, + "eligibility_ppm": 1000000, + "environment": { + "async_quantizers": false, + "cold": false, + "name": "memory-warm-sync", + "store": "memory" + }, + "k": 10, + "metric": "cosine", + "records": 10000, + "rerank": "exhaustive", + "rerank_multiplier": 1000 + }, + "command": [ + "cargo", + "bench", + "--quiet", + "--all-features", + "--bench", + "prolly_proximity_bench" + ], + "completed_at": "2026-09-12T21:01:45.534796+00:00", + "disposition": "completed", + "sha256": "564a4f681d8d86a6f6b553e82f531d6a43b4b9afda32944111c2015aeda0dfa7" +} diff --git a/performance-results/proximity-turboquant/qualification-v4-10k-d768-cosine-k10-all-b4-exhaustive-warm-sync-shard/status.json b/performance-results/proximity-turboquant/qualification-v4-10k-d768-cosine-k10-all-b4-exhaustive-warm-sync-shard/status.json new file mode 100644 index 00000000..bae7f495 --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v4-10k-d768-cosine-k10-all-b4-exhaustive-warm-sync-shard/status.json @@ -0,0 +1,11 @@ +{ + "complete": true, + "completed_cells": 1, + "expected_cells": 1, + "failed": [], + "finished_at": "2026-09-12T21:01:51.839002+00:00", + "revision": "729c2ffac8835db9c99d7706746c321067abfa1d", + "schema": "prolly-turboquant-qualification-v4", + "typed_scalability_failures": 0, + "wasm_smoke": false +} diff --git a/performance-results/proximity-turboquant/qualification-v4-10k-d768-cosine-k10-all-b4-exhaustive-warm-sync-shard/stderr/n10000-d768-cosine-k10-eall-b4-r1000-exhaustive-memory-warm-sync.log b/performance-results/proximity-turboquant/qualification-v4-10k-d768-cosine-k10-all-b4-exhaustive-warm-sync-shard/stderr/n10000-d768-cosine-k10-eall-b4-r1000-exhaustive-memory-warm-sync.log new file mode 100644 index 00000000..e69de29b diff --git a/performance-results/proximity-turboquant/qualification-v4-10k-d768-cosine-k10-all-b4-r16-warm-sync-shard/compile.log b/performance-results/proximity-turboquant/qualification-v4-10k-d768-cosine-k10-all-b4-r16-warm-sync-shard/compile.log new file mode 100644 index 00000000..a88116fb --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v4-10k-d768-cosine-k10-all-b4-r16-warm-sync-shard/compile.log @@ -0,0 +1,2 @@ + Finished `bench` profile [optimized] target(s) in 0.03s + Executable benches/prolly_proximity_bench.rs (target/release/deps/prolly_proximity_bench-88edf17ca838c569) diff --git a/performance-results/proximity-turboquant/qualification-v4-10k-d768-cosine-k10-all-b4-r16-warm-sync-shard/manifest.json b/performance-results/proximity-turboquant/qualification-v4-10k-d768-cosine-k10-all-b4-r16-warm-sync-shard/manifest.json new file mode 100644 index 00000000..a2b41711 --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v4-10k-d768-cosine-k10-all-b4-r16-warm-sync-shard/manifest.json @@ -0,0 +1,63 @@ +{ + "contract": { + "benchmark_schema_version": 4, + "dataset": "linear-mod-2000003-v2", + "environments": [ + { + "async_quantizers": false, + "cold": false, + "name": "memory-warm-sync", + "store": "memory" + }, + { + "async_quantizers": false, + "cold": true, + "name": "memory-cold-sync", + "store": "memory" + }, + { + "async_quantizers": false, + "cold": false, + "name": "file-warm-sync", + "store": "file" + }, + { + "async_quantizers": false, + "cold": true, + "name": "file-cold-sync", + "store": "file" + }, + { + "async_quantizers": true, + "cold": false, + "name": "memory-warm-async", + "store": "memory" + }, + { + "async_quantizers": true, + "cold": true, + "name": "memory-cold-async", + "store": "memory" + } + ], + "exhaustive_max_records": 10000, + "full_cell_count": 45360, + "full_matrix_digest": "a4c137363c5cffe5390a2959217017321f5f17daabf2babb83c52f17a3571d9f", + "max_cell_records": null, + "profile": "full", + "revision": "729c2ffac8835db9c99d7706746c321067abfa1d", + "schema": "prolly-turboquant-qualification-v4", + "search_repeats": 30, + "shard_cell_count": 1, + "shard_count": 1000000, + "shard_index": 999525, + "shard_matrix_digest": "ec95a1b36efa5aa5715bb4680ac12523dfaf073e229525e7c58df84cbbe667f1", + "wasm_smoke": false, + "workers": [ + 1, + 2, + 4 + ] + }, + "created_at": "2026-09-12T20:52:41.585187+00:00" +} diff --git a/performance-results/proximity-turboquant/qualification-v4-10k-d768-cosine-k10-all-b4-r16-warm-sync-shard/raw/n10000-d768-cosine-k10-eall-b4-r16-fixed-memory-warm-sync.csv b/performance-results/proximity-turboquant/qualification-v4-10k-d768-cosine-k10-all-b4-r16-warm-sync-shard/raw/n10000-d768-cosine-k10-eall-b4-r16-fixed-memory-warm-sync.csv new file mode 100644 index 00000000..0e256a32 --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v4-10k-d768-cosine-k10-all-b4-r16-warm-sync-shard/raw/n10000-d768-cosine-k10-eall-b4-r16-fixed-memory-warm-sync.csv @@ -0,0 +1,64 @@ +prolly proximity benchmark +schema_version=4 +dataset=linear-mod-2000003-v2 +revision=729c2ffac8835db9c99d7706746c321067abfa1d +compiler=rustc 1.97.0 (2d8144b78 2026-07-07) | binary: rustc | commit-hash: 2d8144b7880597b6e6d3dfd63a9a9efae3f533d3 | commit-date: 2026-07-07 | host: aarch64-apple-darwin | release: 1.97.0 | LLVM version: 22.1.6 +target_arch=aarch64 +target_os=macos +machine=Haipings-Mac-Studio.local +store=memory +seed=0 +records=10000 +profile=quantizers +search_repeats=30 +metric=Cosine +k=10 +eligibility_ppm=1000000 +effective_k=10 +turboquant_bits=4 +rerank_multiplier=16 +search_cache=warm +search_order=scalar-first +async_quantizers=false +operation,dimensions,threads,micros,metric_a,metric_b +source_build,768,0,909250.583,10000,0 +source_closure_bytes,768,0,0.000,90557210,10169 +turboquant_build,768,1,139617.917,7680000,3920000 +turboquant_build_resources,768,1,0.000,1709751,122880000 +turboquant_build,768,2,108382.167,7680000,3920000 +turboquant_build_resources,768,2,0.000,1709751,122880000 +turboquant_build,768,4,89332.750,7680000,3920000 +turboquant_build_resources,768,4,0.000,1709751,122880000 +turboquant_sidecar_bytes,768,0,0.000,3975264,3920000 +turboquant_manifest_code_bytes,768,0,0.000,136,3975128 +turboquant_search_scalar,768,0,10256.833,10000,160 +turboquant_search_scalar_p95,768,0,11833.042,4414240,0 +turboquant_search_scalar_p99,768,0,11987.292,160,3423880 +turboquant_search_scalar_work,768,0,0.000,160,1 +turboquant_search_scalar_io,768,0,0.000,10160,0 +turboquant_search_scalar_rerank,768,0,0.000,160,4414240 +turboquant_recall,768,0,0,0.000000,0.009584430615167594 +turboquant_search_simd,768,0,16708.291,10000,160 +turboquant_search_simd_p95,768,0,88191.541,4414240,0 +turboquant_search_simd_p99,768,0,116905.125,160,3423880 +turboquant_search_simd_work,768,0,0.000,160,1 +turboquant_search_simd_io,768,0,0.000,10160,0 +turboquant_search_simd_rerank,768,0,0.000,160,4414240 +turboquant_search_auto,768,0,9941.375,10000,160 +turboquant_search_auto_p95,768,0,10417.708,4414240,0 +turboquant_search_auto_p99,768,0,10531.416,160,3423880 +turboquant_search_auto_work,768,0,0.000,160,1 +turboquant_search_auto_io,768,0,0.000,10160,0 +turboquant_search_auto_rerank,768,0,0.000,160,4414240 +pq_build,768,1,446623.541,5120000,10000 +pq_build,768,2,302736.625,5120000,10000 +pq_build,768,4,232858.125,5120000,10000 +pq_sidecar_bytes,768,0,0.000,174439,10000 +pq_manifest_code_bytes,768,0,0.000,49311,125128 +pq_search,768,0,1551.250,10000,160 +pq_search_p95,768,0,1717.959,574240,0 +pq_search_p99,768,0,1806.625,160,3046949 +pq_search_work,768,0,0.000,160,1 +pq_search_io,768,0,0.000,10160,0 +pq_search_rerank,768,0,0.000,160,574240 +pq_recall,768,0,0,1.000000,0 diff --git a/performance-results/proximity-turboquant/qualification-v4-10k-d768-cosine-k10-all-b4-r16-warm-sync-shard/state/n10000-d768-cosine-k10-eall-b4-r16-fixed-memory-warm-sync.json b/performance-results/proximity-turboquant/qualification-v4-10k-d768-cosine-k10-all-b4-r16-warm-sync-shard/state/n10000-d768-cosine-k10-eall-b4-r16-fixed-memory-warm-sync.json new file mode 100644 index 00000000..1b55b7fe --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v4-10k-d768-cosine-k10-all-b4-r16-warm-sync-shard/state/n10000-d768-cosine-k10-eall-b4-r16-fixed-memory-warm-sync.json @@ -0,0 +1,29 @@ +{ + "cell": { + "bits": 4, + "dimensions": 768, + "eligibility_ppm": 1000000, + "environment": { + "async_quantizers": false, + "cold": false, + "name": "memory-warm-sync", + "store": "memory" + }, + "k": 10, + "metric": "cosine", + "records": 10000, + "rerank": "fixed", + "rerank_multiplier": 16 + }, + "command": [ + "cargo", + "bench", + "--quiet", + "--all-features", + "--bench", + "prolly_proximity_bench" + ], + "completed_at": "2026-09-12T20:52:46.173174+00:00", + "disposition": "completed", + "sha256": "10016725743ef959ebbfd0156792eb98a1b516071b34bde86303420c6f0fcf6d" +} diff --git a/performance-results/proximity-turboquant/qualification-v4-10k-d768-cosine-k10-all-b4-r16-warm-sync-shard/status.json b/performance-results/proximity-turboquant/qualification-v4-10k-d768-cosine-k10-all-b4-r16-warm-sync-shard/status.json new file mode 100644 index 00000000..ec2acb05 --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v4-10k-d768-cosine-k10-all-b4-r16-warm-sync-shard/status.json @@ -0,0 +1,11 @@ +{ + "complete": true, + "completed_cells": 1, + "expected_cells": 1, + "failed": [], + "finished_at": "2026-09-12T20:57:31.369450+00:00", + "revision": "729c2ffac8835db9c99d7706746c321067abfa1d", + "schema": "prolly-turboquant-qualification-v4", + "typed_scalability_failures": 0, + "wasm_smoke": false +} diff --git a/performance-results/proximity-turboquant/qualification-v4-10k-d768-cosine-k10-all-b4-r16-warm-sync-shard/stderr/n10000-d768-cosine-k10-eall-b4-r16-fixed-memory-warm-sync.log b/performance-results/proximity-turboquant/qualification-v4-10k-d768-cosine-k10-all-b4-r16-warm-sync-shard/stderr/n10000-d768-cosine-k10-eall-b4-r16-fixed-memory-warm-sync.log new file mode 100644 index 00000000..e69de29b diff --git a/performance-results/proximity-turboquant/qualification-v4-10k-d768-cosine-k10-all-b4-r8-warm-sync-shard/compile.log b/performance-results/proximity-turboquant/qualification-v4-10k-d768-cosine-k10-all-b4-r8-warm-sync-shard/compile.log new file mode 100644 index 00000000..4c61e6de --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v4-10k-d768-cosine-k10-all-b4-r8-warm-sync-shard/compile.log @@ -0,0 +1,2 @@ + Finished `bench` profile [optimized] target(s) in 0.11s + Executable benches/prolly_proximity_bench.rs (target/release/deps/prolly_proximity_bench-88edf17ca838c569) diff --git a/performance-results/proximity-turboquant/qualification-v4-10k-d768-cosine-k10-all-b4-r8-warm-sync-shard/manifest.json b/performance-results/proximity-turboquant/qualification-v4-10k-d768-cosine-k10-all-b4-r8-warm-sync-shard/manifest.json new file mode 100644 index 00000000..166fbf11 --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v4-10k-d768-cosine-k10-all-b4-r8-warm-sync-shard/manifest.json @@ -0,0 +1,63 @@ +{ + "contract": { + "benchmark_schema_version": 4, + "dataset": "linear-mod-2000003-v2", + "environments": [ + { + "async_quantizers": false, + "cold": false, + "name": "memory-warm-sync", + "store": "memory" + }, + { + "async_quantizers": false, + "cold": true, + "name": "memory-cold-sync", + "store": "memory" + }, + { + "async_quantizers": false, + "cold": false, + "name": "file-warm-sync", + "store": "file" + }, + { + "async_quantizers": false, + "cold": true, + "name": "file-cold-sync", + "store": "file" + }, + { + "async_quantizers": true, + "cold": false, + "name": "memory-warm-async", + "store": "memory" + }, + { + "async_quantizers": true, + "cold": true, + "name": "memory-cold-async", + "store": "memory" + } + ], + "exhaustive_max_records": 10000, + "full_cell_count": 45360, + "full_matrix_digest": "a4c137363c5cffe5390a2959217017321f5f17daabf2babb83c52f17a3571d9f", + "max_cell_records": null, + "profile": "full", + "revision": "729c2ffac8835db9c99d7706746c321067abfa1d", + "schema": "prolly-turboquant-qualification-v4", + "search_repeats": 30, + "shard_cell_count": 1, + "shard_count": 1000000, + "shard_index": 79516, + "shard_matrix_digest": "bad24b6c59267c9cadb8895d87a693f58e32af946bfbeed4bbe15b662221d72f", + "wasm_smoke": false, + "workers": [ + 1, + 2, + 4 + ] + }, + "created_at": "2026-09-12T20:52:24.242953+00:00" +} diff --git a/performance-results/proximity-turboquant/qualification-v4-10k-d768-cosine-k10-all-b4-r8-warm-sync-shard/raw/n10000-d768-cosine-k10-eall-b4-r8-fixed-memory-warm-sync.csv b/performance-results/proximity-turboquant/qualification-v4-10k-d768-cosine-k10-all-b4-r8-warm-sync-shard/raw/n10000-d768-cosine-k10-eall-b4-r8-fixed-memory-warm-sync.csv new file mode 100644 index 00000000..2dc8de87 --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v4-10k-d768-cosine-k10-all-b4-r8-warm-sync-shard/raw/n10000-d768-cosine-k10-eall-b4-r8-fixed-memory-warm-sync.csv @@ -0,0 +1,64 @@ +prolly proximity benchmark +schema_version=4 +dataset=linear-mod-2000003-v2 +revision=729c2ffac8835db9c99d7706746c321067abfa1d +compiler=rustc 1.97.0 (2d8144b78 2026-07-07) | binary: rustc | commit-hash: 2d8144b7880597b6e6d3dfd63a9a9efae3f533d3 | commit-date: 2026-07-07 | host: aarch64-apple-darwin | release: 1.97.0 | LLVM version: 22.1.6 +target_arch=aarch64 +target_os=macos +machine=Haipings-Mac-Studio.local +store=memory +seed=0 +records=10000 +profile=quantizers +search_repeats=30 +metric=Cosine +k=10 +eligibility_ppm=1000000 +effective_k=10 +turboquant_bits=4 +rerank_multiplier=8 +search_cache=warm +search_order=scalar-first +async_quantizers=false +operation,dimensions,threads,micros,metric_a,metric_b +source_build,768,0,802055.833,10000,0 +source_closure_bytes,768,0,0.000,90557210,10169 +turboquant_build,768,1,137948.750,7680000,3920000 +turboquant_build_resources,768,1,0.000,1709751,122880000 +turboquant_build,768,2,85076.917,7680000,3920000 +turboquant_build_resources,768,2,0.000,1709751,122880000 +turboquant_build,768,4,53216.667,7680000,3920000 +turboquant_build_resources,768,4,0.000,1709751,122880000 +turboquant_sidecar_bytes,768,0,0.000,3975264,3920000 +turboquant_manifest_code_bytes,768,0,0.000,136,3975128 +turboquant_search_scalar,768,0,9761.500,10000,80 +turboquant_search_scalar_p95,768,0,12209.833,4167120,0 +turboquant_search_scalar_p99,768,0,12292.208,80,3153722 +turboquant_search_scalar_work,768,0,0.000,80,1 +turboquant_search_scalar_io,768,0,0.000,10080,0 +turboquant_search_scalar_rerank,768,0,0.000,80,4167120 +turboquant_recall,768,0,0,0.000000,0.009584430615167594 +turboquant_search_simd,768,0,14586.667,10000,80 +turboquant_search_simd_p95,768,0,15030.708,4167120,0 +turboquant_search_simd_p99,768,0,15139.042,80,3153722 +turboquant_search_simd_work,768,0,0.000,80,1 +turboquant_search_simd_io,768,0,0.000,10080,0 +turboquant_search_simd_rerank,768,0,0.000,80,4167120 +turboquant_search_auto,768,0,9621.000,10000,80 +turboquant_search_auto_p95,768,0,10089.584,4167120,0 +turboquant_search_auto_p99,768,0,10255.334,80,3153722 +turboquant_search_auto_work,768,0,0.000,80,1 +turboquant_search_auto_io,768,0,0.000,10080,0 +turboquant_search_auto_rerank,768,0,0.000,80,4167120 +pq_build,768,1,443102.750,5120000,10000 +pq_build,768,2,299325.917,5120000,10000 +pq_build,768,4,238338.875,5120000,10000 +pq_sidecar_bytes,768,0,0.000,174439,10000 +pq_manifest_code_bytes,768,0,0.000,49311,125128 +pq_search,768,0,1476.583,10000,80 +pq_search_p95,768,0,3484.167,327120,0 +pq_search_p99,768,0,4467.583,80,2198801 +pq_search_work,768,0,0.000,80,1 +pq_search_io,768,0,0.000,10080,0 +pq_search_rerank,768,0,0.000,80,327120 +pq_recall,768,0,0,1.000000,0 diff --git a/performance-results/proximity-turboquant/qualification-v4-10k-d768-cosine-k10-all-b4-r8-warm-sync-shard/state/n10000-d768-cosine-k10-eall-b4-r8-fixed-memory-warm-sync.json b/performance-results/proximity-turboquant/qualification-v4-10k-d768-cosine-k10-all-b4-r8-warm-sync-shard/state/n10000-d768-cosine-k10-eall-b4-r8-fixed-memory-warm-sync.json new file mode 100644 index 00000000..7f0497ec --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v4-10k-d768-cosine-k10-all-b4-r8-warm-sync-shard/state/n10000-d768-cosine-k10-eall-b4-r8-fixed-memory-warm-sync.json @@ -0,0 +1,29 @@ +{ + "cell": { + "bits": 4, + "dimensions": 768, + "eligibility_ppm": 1000000, + "environment": { + "async_quantizers": false, + "cold": false, + "name": "memory-warm-sync", + "store": "memory" + }, + "k": 10, + "metric": "cosine", + "records": 10000, + "rerank": "fixed", + "rerank_multiplier": 8 + }, + "command": [ + "cargo", + "bench", + "--quiet", + "--all-features", + "--bench", + "prolly_proximity_bench" + ], + "completed_at": "2026-09-12T20:52:41.309761+00:00", + "disposition": "completed", + "sha256": "2bd6bc9bb493c9ec87ec7d226b7e59e2548b8cb04d9d99e9904c30e1175fefc3" +} diff --git a/performance-results/proximity-turboquant/qualification-v4-10k-d768-cosine-k10-all-b4-r8-warm-sync-shard/status.json b/performance-results/proximity-turboquant/qualification-v4-10k-d768-cosine-k10-all-b4-r8-warm-sync-shard/status.json new file mode 100644 index 00000000..05a81963 --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v4-10k-d768-cosine-k10-all-b4-r8-warm-sync-shard/status.json @@ -0,0 +1,11 @@ +{ + "complete": true, + "completed_cells": 1, + "expected_cells": 1, + "failed": [], + "finished_at": "2026-09-12T20:57:31.054975+00:00", + "revision": "729c2ffac8835db9c99d7706746c321067abfa1d", + "schema": "prolly-turboquant-qualification-v4", + "typed_scalability_failures": 0, + "wasm_smoke": false +} diff --git a/performance-results/proximity-turboquant/qualification-v4-10k-d768-cosine-k10-all-b4-r8-warm-sync-shard/stderr/n10000-d768-cosine-k10-eall-b4-r8-fixed-memory-warm-sync.log b/performance-results/proximity-turboquant/qualification-v4-10k-d768-cosine-k10-all-b4-r8-warm-sync-shard/stderr/n10000-d768-cosine-k10-eall-b4-r8-fixed-memory-warm-sync.log new file mode 100644 index 00000000..e69de29b diff --git a/performance-results/proximity-turboquant/qualification-v4-10k-d768-inner-product-k10-all-b4-r16-warm-sync-shard/compile.log b/performance-results/proximity-turboquant/qualification-v4-10k-d768-inner-product-k10-all-b4-r16-warm-sync-shard/compile.log new file mode 100644 index 00000000..a88116fb --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v4-10k-d768-inner-product-k10-all-b4-r16-warm-sync-shard/compile.log @@ -0,0 +1,2 @@ + Finished `bench` profile [optimized] target(s) in 0.03s + Executable benches/prolly_proximity_bench.rs (target/release/deps/prolly_proximity_bench-88edf17ca838c569) diff --git a/performance-results/proximity-turboquant/qualification-v4-10k-d768-inner-product-k10-all-b4-r16-warm-sync-shard/manifest.json b/performance-results/proximity-turboquant/qualification-v4-10k-d768-inner-product-k10-all-b4-r16-warm-sync-shard/manifest.json new file mode 100644 index 00000000..dc64aa7a --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v4-10k-d768-inner-product-k10-all-b4-r16-warm-sync-shard/manifest.json @@ -0,0 +1,63 @@ +{ + "contract": { + "benchmark_schema_version": 4, + "dataset": "linear-mod-2000003-v2", + "environments": [ + { + "async_quantizers": false, + "cold": false, + "name": "memory-warm-sync", + "store": "memory" + }, + { + "async_quantizers": false, + "cold": true, + "name": "memory-cold-sync", + "store": "memory" + }, + { + "async_quantizers": false, + "cold": false, + "name": "file-warm-sync", + "store": "file" + }, + { + "async_quantizers": false, + "cold": true, + "name": "file-cold-sync", + "store": "file" + }, + { + "async_quantizers": true, + "cold": false, + "name": "memory-warm-async", + "store": "memory" + }, + { + "async_quantizers": true, + "cold": true, + "name": "memory-cold-async", + "store": "memory" + } + ], + "exhaustive_max_records": 10000, + "full_cell_count": 45360, + "full_matrix_digest": "a4c137363c5cffe5390a2959217017321f5f17daabf2babb83c52f17a3571d9f", + "max_cell_records": null, + "profile": "full", + "revision": "729c2ffac8835db9c99d7706746c321067abfa1d", + "schema": "prolly-turboquant-qualification-v4", + "search_repeats": 30, + "shard_cell_count": 1, + "shard_count": 1000000, + "shard_index": 388563, + "shard_matrix_digest": "c969b429b7bcad93752336647f9b01192b52ed253f18a27b39fe54e76fb0000a", + "wasm_smoke": false, + "workers": [ + 1, + 2, + 4 + ] + }, + "created_at": "2026-09-12T20:52:55.500719+00:00" +} diff --git a/performance-results/proximity-turboquant/qualification-v4-10k-d768-inner-product-k10-all-b4-r16-warm-sync-shard/raw/n10000-d768-inner_product-k10-eall-b4-r16-fixed-memory-warm-sync.csv b/performance-results/proximity-turboquant/qualification-v4-10k-d768-inner-product-k10-all-b4-r16-warm-sync-shard/raw/n10000-d768-inner_product-k10-eall-b4-r16-fixed-memory-warm-sync.csv new file mode 100644 index 00000000..f30286a1 --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v4-10k-d768-inner-product-k10-all-b4-r16-warm-sync-shard/raw/n10000-d768-inner_product-k10-eall-b4-r16-fixed-memory-warm-sync.csv @@ -0,0 +1,64 @@ +prolly proximity benchmark +schema_version=4 +dataset=linear-mod-2000003-v2 +revision=729c2ffac8835db9c99d7706746c321067abfa1d +compiler=rustc 1.97.0 (2d8144b78 2026-07-07) | binary: rustc | commit-hash: 2d8144b7880597b6e6d3dfd63a9a9efae3f533d3 | commit-date: 2026-07-07 | host: aarch64-apple-darwin | release: 1.97.0 | LLVM version: 22.1.6 +target_arch=aarch64 +target_os=macos +machine=Haipings-Mac-Studio.local +store=memory +seed=0 +records=10000 +profile=quantizers +search_repeats=30 +metric=InnerProduct +k=10 +eligibility_ppm=1000000 +effective_k=10 +turboquant_bits=4 +rerank_multiplier=16 +search_cache=warm +search_order=scalar-first +async_quantizers=false +operation,dimensions,threads,micros,metric_a,metric_b +source_build,768,0,806763.459,10000,0 +source_closure_bytes,768,0,0.000,90987106,10383 +turboquant_build,768,1,137621.666,7680000,3920000 +turboquant_build_resources,768,1,0.000,1709751,122880000 +turboquant_build,768,2,102651.333,7680000,3920000 +turboquant_build_resources,768,2,0.000,1709751,122880000 +turboquant_build,768,4,55829.709,7680000,3920000 +turboquant_build_resources,768,4,0.000,1709751,122880000 +turboquant_sidecar_bytes,768,0,0.000,3975264,3920000 +turboquant_manifest_code_bytes,768,0,0.000,136,3975128 +turboquant_search_scalar,768,0,10376.000,10000,160 +turboquant_search_scalar_p95,768,0,16072.291,4414240,0 +turboquant_search_scalar_p99,768,0,23568.166,160,2198801 +turboquant_search_scalar_work,768,0,0.000,160,1 +turboquant_search_scalar_io,768,0,0.000,10160,0 +turboquant_search_scalar_rerank,768,0,0.000,160,4414240 +turboquant_recall,768,0,0,1.000000,0.00958443061248919 +turboquant_search_simd,768,0,16565.416,10000,160 +turboquant_search_simd_p95,768,0,28029.625,4414240,0 +turboquant_search_simd_p99,768,0,29462.167,160,2198801 +turboquant_search_simd_work,768,0,0.000,160,1 +turboquant_search_simd_io,768,0,0.000,10160,0 +turboquant_search_simd_rerank,768,0,0.000,160,4414240 +turboquant_search_auto,768,0,10015.666,10000,160 +turboquant_search_auto_p95,768,0,10983.792,4414240,0 +turboquant_search_auto_p99,768,0,14037.583,160,2198801 +turboquant_search_auto_work,768,0,0.000,160,1 +turboquant_search_auto_io,768,0,0.000,10160,0 +turboquant_search_auto_rerank,768,0,0.000,160,4414240 +pq_build,768,1,459630.792,5120000,10000 +pq_build,768,2,306827.667,5120000,10000 +pq_build,768,4,274088.542,5120000,10000 +pq_sidecar_bytes,768,0,0.000,174439,10000 +pq_manifest_code_bytes,768,0,0.000,49311,125128 +pq_search,768,0,1670.042,10000,160 +pq_search_p95,768,0,2176.166,574240,0 +pq_search_p99,768,0,2857.375,160,3046949 +pq_search_work,768,0,0.000,160,1 +pq_search_io,768,0,0.000,10160,0 +pq_search_rerank,768,0,0.000,160,574240 +pq_recall,768,0,0,1.000000,0 diff --git a/performance-results/proximity-turboquant/qualification-v4-10k-d768-inner-product-k10-all-b4-r16-warm-sync-shard/state/n10000-d768-inner_product-k10-eall-b4-r16-fixed-memory-warm-sync.json b/performance-results/proximity-turboquant/qualification-v4-10k-d768-inner-product-k10-all-b4-r16-warm-sync-shard/state/n10000-d768-inner_product-k10-eall-b4-r16-fixed-memory-warm-sync.json new file mode 100644 index 00000000..e4ae9b51 --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v4-10k-d768-inner-product-k10-all-b4-r16-warm-sync-shard/state/n10000-d768-inner_product-k10-eall-b4-r16-fixed-memory-warm-sync.json @@ -0,0 +1,29 @@ +{ + "cell": { + "bits": 4, + "dimensions": 768, + "eligibility_ppm": 1000000, + "environment": { + "async_quantizers": false, + "cold": false, + "name": "memory-warm-sync", + "store": "memory" + }, + "k": 10, + "metric": "inner_product", + "records": 10000, + "rerank": "fixed", + "rerank_multiplier": 16 + }, + "command": [ + "cargo", + "bench", + "--quiet", + "--all-features", + "--bench", + "prolly_proximity_bench" + ], + "completed_at": "2026-09-12T20:52:59.778582+00:00", + "disposition": "completed", + "sha256": "77c016e3dfc9f62d886dba8ae15948d7b9ce5a59bc209f3f167b2919764db97a" +} diff --git a/performance-results/proximity-turboquant/qualification-v4-10k-d768-inner-product-k10-all-b4-r16-warm-sync-shard/status.json b/performance-results/proximity-turboquant/qualification-v4-10k-d768-inner-product-k10-all-b4-r16-warm-sync-shard/status.json new file mode 100644 index 00000000..8971b69b --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v4-10k-d768-inner-product-k10-all-b4-r16-warm-sync-shard/status.json @@ -0,0 +1,11 @@ +{ + "complete": true, + "completed_cells": 1, + "expected_cells": 1, + "failed": [], + "finished_at": "2026-09-12T20:57:32.293615+00:00", + "revision": "729c2ffac8835db9c99d7706746c321067abfa1d", + "schema": "prolly-turboquant-qualification-v4", + "typed_scalability_failures": 0, + "wasm_smoke": false +} diff --git a/performance-results/proximity-turboquant/qualification-v4-10k-d768-inner-product-k10-all-b4-r16-warm-sync-shard/stderr/n10000-d768-inner_product-k10-eall-b4-r16-fixed-memory-warm-sync.log b/performance-results/proximity-turboquant/qualification-v4-10k-d768-inner-product-k10-all-b4-r16-warm-sync-shard/stderr/n10000-d768-inner_product-k10-eall-b4-r16-fixed-memory-warm-sync.log new file mode 100644 index 00000000..e69de29b diff --git a/performance-results/proximity-turboquant/qualification-v4-10k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/compile.log b/performance-results/proximity-turboquant/qualification-v4-10k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/compile.log new file mode 100644 index 00000000..a88116fb --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v4-10k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/compile.log @@ -0,0 +1,2 @@ + Finished `bench` profile [optimized] target(s) in 0.03s + Executable benches/prolly_proximity_bench.rs (target/release/deps/prolly_proximity_bench-88edf17ca838c569) diff --git a/performance-results/proximity-turboquant/qualification-v4-10k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/manifest.json b/performance-results/proximity-turboquant/qualification-v4-10k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/manifest.json new file mode 100644 index 00000000..6be30058 --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v4-10k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/manifest.json @@ -0,0 +1,63 @@ +{ + "contract": { + "benchmark_schema_version": 4, + "dataset": "linear-mod-2000003-v2", + "environments": [ + { + "async_quantizers": false, + "cold": false, + "name": "memory-warm-sync", + "store": "memory" + }, + { + "async_quantizers": false, + "cold": true, + "name": "memory-cold-sync", + "store": "memory" + }, + { + "async_quantizers": false, + "cold": false, + "name": "file-warm-sync", + "store": "file" + }, + { + "async_quantizers": false, + "cold": true, + "name": "file-cold-sync", + "store": "file" + }, + { + "async_quantizers": true, + "cold": false, + "name": "memory-warm-async", + "store": "memory" + }, + { + "async_quantizers": true, + "cold": true, + "name": "memory-cold-async", + "store": "memory" + } + ], + "exhaustive_max_records": 10000, + "full_cell_count": 45360, + "full_matrix_digest": "a4c137363c5cffe5390a2959217017321f5f17daabf2babb83c52f17a3571d9f", + "max_cell_records": null, + "profile": "full", + "revision": "729c2ffac8835db9c99d7706746c321067abfa1d", + "schema": "prolly-turboquant-qualification-v4", + "search_repeats": 30, + "shard_cell_count": 1, + "shard_count": 1000000, + "shard_index": 513486, + "shard_matrix_digest": "d60f077a3a0c16ce8513637c65ecb013386be149c36bdaa75825f7cd86ec75bd", + "wasm_smoke": false, + "workers": [ + 1, + 2, + 4 + ] + }, + "created_at": "2026-09-12T20:52:50.870683+00:00" +} diff --git a/performance-results/proximity-turboquant/qualification-v4-10k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/raw/n10000-d768-inner_product-k10-eall-b4-r8-fixed-memory-warm-sync.csv b/performance-results/proximity-turboquant/qualification-v4-10k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/raw/n10000-d768-inner_product-k10-eall-b4-r8-fixed-memory-warm-sync.csv new file mode 100644 index 00000000..dbc80690 --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v4-10k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/raw/n10000-d768-inner_product-k10-eall-b4-r8-fixed-memory-warm-sync.csv @@ -0,0 +1,64 @@ +prolly proximity benchmark +schema_version=4 +dataset=linear-mod-2000003-v2 +revision=729c2ffac8835db9c99d7706746c321067abfa1d +compiler=rustc 1.97.0 (2d8144b78 2026-07-07) | binary: rustc | commit-hash: 2d8144b7880597b6e6d3dfd63a9a9efae3f533d3 | commit-date: 2026-07-07 | host: aarch64-apple-darwin | release: 1.97.0 | LLVM version: 22.1.6 +target_arch=aarch64 +target_os=macos +machine=Haipings-Mac-Studio.local +store=memory +seed=0 +records=10000 +profile=quantizers +search_repeats=30 +metric=InnerProduct +k=10 +eligibility_ppm=1000000 +effective_k=10 +turboquant_bits=4 +rerank_multiplier=8 +search_cache=warm +search_order=scalar-first +async_quantizers=false +operation,dimensions,threads,micros,metric_a,metric_b +source_build,768,0,884829.708,10000,0 +source_closure_bytes,768,0,0.000,90987106,10383 +turboquant_build,768,1,140015.917,7680000,3920000 +turboquant_build_resources,768,1,0.000,1709751,122880000 +turboquant_build,768,2,111065.667,7680000,3920000 +turboquant_build_resources,768,2,0.000,1709751,122880000 +turboquant_build,768,4,82014.500,7680000,3920000 +turboquant_build_resources,768,4,0.000,1709751,122880000 +turboquant_sidecar_bytes,768,0,0.000,3975264,3920000 +turboquant_manifest_code_bytes,768,0,0.000,136,3975128 +turboquant_search_scalar,768,0,10670.750,10000,80 +turboquant_search_scalar_p95,768,0,12799.000,4167120,0 +turboquant_search_scalar_p99,768,0,13608.500,80,2198801 +turboquant_search_scalar_work,768,0,0.000,80,1 +turboquant_search_scalar_io,768,0,0.000,10080,0 +turboquant_search_scalar_rerank,768,0,0.000,80,4167120 +turboquant_recall,768,0,0,1.000000,0.00958443061248919 +turboquant_search_simd,768,0,15088.875,10000,80 +turboquant_search_simd_p95,768,0,15960.042,4167120,0 +turboquant_search_simd_p99,768,0,21390.667,80,2198801 +turboquant_search_simd_work,768,0,0.000,80,1 +turboquant_search_simd_io,768,0,0.000,10080,0 +turboquant_search_simd_rerank,768,0,0.000,80,4167120 +turboquant_search_auto,768,0,10132.541,10000,80 +turboquant_search_auto_p95,768,0,12858.416,4167120,0 +turboquant_search_auto_p99,768,0,14734.542,80,2198801 +turboquant_search_auto_work,768,0,0.000,80,1 +turboquant_search_auto_io,768,0,0.000,10080,0 +turboquant_search_auto_rerank,768,0,0.000,80,4167120 +pq_build,768,1,487489.333,5120000,10000 +pq_build,768,2,307247.292,5120000,10000 +pq_build,768,4,252376.750,5120000,10000 +pq_sidecar_bytes,768,0,0.000,174439,10000 +pq_manifest_code_bytes,768,0,0.000,49311,125128 +pq_search,768,0,1395.791,10000,80 +pq_search_p95,768,0,1605.208,327120,0 +pq_search_p99,768,0,1721.250,80,2198801 +pq_search_work,768,0,0.000,80,1 +pq_search_io,768,0,0.000,10080,0 +pq_search_rerank,768,0,0.000,80,327120 +pq_recall,768,0,0,0.000000,0 diff --git a/performance-results/proximity-turboquant/qualification-v4-10k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/state/n10000-d768-inner_product-k10-eall-b4-r8-fixed-memory-warm-sync.json b/performance-results/proximity-turboquant/qualification-v4-10k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/state/n10000-d768-inner_product-k10-eall-b4-r8-fixed-memory-warm-sync.json new file mode 100644 index 00000000..24c636d1 --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v4-10k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/state/n10000-d768-inner_product-k10-eall-b4-r8-fixed-memory-warm-sync.json @@ -0,0 +1,29 @@ +{ + "cell": { + "bits": 4, + "dimensions": 768, + "eligibility_ppm": 1000000, + "environment": { + "async_quantizers": false, + "cold": false, + "name": "memory-warm-sync", + "store": "memory" + }, + "k": 10, + "metric": "inner_product", + "records": 10000, + "rerank": "fixed", + "rerank_multiplier": 8 + }, + "command": [ + "cargo", + "bench", + "--quiet", + "--all-features", + "--bench", + "prolly_proximity_bench" + ], + "completed_at": "2026-09-12T20:52:55.262997+00:00", + "disposition": "completed", + "sha256": "6dbb5c9d4a0e7002d290efddcf60951ca01885b4a09abc295f6ca37b8e9bfb83" +} diff --git a/performance-results/proximity-turboquant/qualification-v4-10k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/status.json b/performance-results/proximity-turboquant/qualification-v4-10k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/status.json new file mode 100644 index 00000000..e6d4640f --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v4-10k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/status.json @@ -0,0 +1,11 @@ +{ + "complete": true, + "completed_cells": 1, + "expected_cells": 1, + "failed": [], + "finished_at": "2026-09-12T20:57:31.990684+00:00", + "revision": "729c2ffac8835db9c99d7706746c321067abfa1d", + "schema": "prolly-turboquant-qualification-v4", + "typed_scalability_failures": 0, + "wasm_smoke": false +} diff --git a/performance-results/proximity-turboquant/qualification-v4-10k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/stderr/n10000-d768-inner_product-k10-eall-b4-r8-fixed-memory-warm-sync.log b/performance-results/proximity-turboquant/qualification-v4-10k-d768-inner-product-k10-all-b4-r8-warm-sync-shard/stderr/n10000-d768-inner_product-k10-eall-b4-r8-fixed-memory-warm-sync.log new file mode 100644 index 00000000..e69de29b diff --git a/performance-results/proximity-turboquant/qualification-v4-10k-d768-l2-k10-all-b4-r8-warm-sync-shard/compile.log b/performance-results/proximity-turboquant/qualification-v4-10k-d768-l2-k10-all-b4-r8-warm-sync-shard/compile.log new file mode 100644 index 00000000..a88116fb --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v4-10k-d768-l2-k10-all-b4-r8-warm-sync-shard/compile.log @@ -0,0 +1,2 @@ + Finished `bench` profile [optimized] target(s) in 0.03s + Executable benches/prolly_proximity_bench.rs (target/release/deps/prolly_proximity_bench-88edf17ca838c569) diff --git a/performance-results/proximity-turboquant/qualification-v4-10k-d768-l2-k10-all-b4-r8-warm-sync-shard/manifest.json b/performance-results/proximity-turboquant/qualification-v4-10k-d768-l2-k10-all-b4-r8-warm-sync-shard/manifest.json new file mode 100644 index 00000000..b667563c --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v4-10k-d768-l2-k10-all-b4-r8-warm-sync-shard/manifest.json @@ -0,0 +1,63 @@ +{ + "contract": { + "benchmark_schema_version": 4, + "dataset": "linear-mod-2000003-v2", + "environments": [ + { + "async_quantizers": false, + "cold": false, + "name": "memory-warm-sync", + "store": "memory" + }, + { + "async_quantizers": false, + "cold": true, + "name": "memory-cold-sync", + "store": "memory" + }, + { + "async_quantizers": false, + "cold": false, + "name": "file-warm-sync", + "store": "file" + }, + { + "async_quantizers": false, + "cold": true, + "name": "file-cold-sync", + "store": "file" + }, + { + "async_quantizers": true, + "cold": false, + "name": "memory-warm-async", + "store": "memory" + }, + { + "async_quantizers": true, + "cold": true, + "name": "memory-cold-async", + "store": "memory" + } + ], + "exhaustive_max_records": 10000, + "full_cell_count": 45360, + "full_matrix_digest": "a4c137363c5cffe5390a2959217017321f5f17daabf2babb83c52f17a3571d9f", + "max_cell_records": null, + "profile": "full", + "revision": "729c2ffac8835db9c99d7706746c321067abfa1d", + "schema": "prolly-turboquant-qualification-v4", + "search_repeats": 30, + "shard_cell_count": 1, + "shard_count": 1000000, + "shard_index": 131629, + "shard_matrix_digest": "f7c83f9de4e79f6dae2881f65225a13b91148b92980f987d210da92e90a5c703", + "wasm_smoke": false, + "workers": [ + 1, + 2, + 4 + ] + }, + "created_at": "2026-09-12T20:52:46.402399+00:00" +} diff --git a/performance-results/proximity-turboquant/qualification-v4-10k-d768-l2-k10-all-b4-r8-warm-sync-shard/raw/n10000-d768-l2-k10-eall-b4-r8-fixed-memory-warm-sync.csv b/performance-results/proximity-turboquant/qualification-v4-10k-d768-l2-k10-all-b4-r8-warm-sync-shard/raw/n10000-d768-l2-k10-eall-b4-r8-fixed-memory-warm-sync.csv new file mode 100644 index 00000000..cb6f308b --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v4-10k-d768-l2-k10-all-b4-r8-warm-sync-shard/raw/n10000-d768-l2-k10-eall-b4-r8-fixed-memory-warm-sync.csv @@ -0,0 +1,64 @@ +prolly proximity benchmark +schema_version=4 +dataset=linear-mod-2000003-v2 +revision=729c2ffac8835db9c99d7706746c321067abfa1d +compiler=rustc 1.97.0 (2d8144b78 2026-07-07) | binary: rustc | commit-hash: 2d8144b7880597b6e6d3dfd63a9a9efae3f533d3 | commit-date: 2026-07-07 | host: aarch64-apple-darwin | release: 1.97.0 | LLVM version: 22.1.6 +target_arch=aarch64 +target_os=macos +machine=Haipings-Mac-Studio.local +store=memory +seed=0 +records=10000 +profile=quantizers +search_repeats=30 +metric=L2Squared +k=10 +eligibility_ppm=1000000 +effective_k=10 +turboquant_bits=4 +rerank_multiplier=8 +search_cache=warm +search_order=scalar-first +async_quantizers=false +operation,dimensions,threads,micros,metric_a,metric_b +source_build,768,0,982388.667,10000,0 +source_closure_bytes,768,0,0.000,90601244,10190 +turboquant_build,768,1,170179.167,7680000,3920000 +turboquant_build_resources,768,1,0.000,1709751,122880000 +turboquant_build,768,2,108131.000,7680000,3920000 +turboquant_build_resources,768,2,0.000,1709751,122880000 +turboquant_build,768,4,75654.709,7680000,3920000 +turboquant_build_resources,768,4,0.000,1709751,122880000 +turboquant_sidecar_bytes,768,0,0.000,3975264,3920000 +turboquant_manifest_code_bytes,768,0,0.000,136,3975128 +turboquant_search_scalar,768,0,9491.000,10000,80 +turboquant_search_scalar_p95,768,0,12569.875,4167120,0 +turboquant_search_scalar_p99,768,0,19783.958,80,2198801 +turboquant_search_scalar_work,768,0,0.000,80,1 +turboquant_search_scalar_io,768,0,0.000,10080,0 +turboquant_search_scalar_rerank,768,0,0.000,80,4167120 +turboquant_recall,768,0,0,1.000000,0.00958443061248919 +turboquant_search_simd,768,0,15023.750,10000,80 +turboquant_search_simd_p95,768,0,16036.625,4167120,0 +turboquant_search_simd_p99,768,0,17655.583,80,2198801 +turboquant_search_simd_work,768,0,0.000,80,1 +turboquant_search_simd_io,768,0,0.000,10080,0 +turboquant_search_simd_rerank,768,0,0.000,80,4167120 +turboquant_search_auto,768,0,9708.208,10000,80 +turboquant_search_auto_p95,768,0,10524.875,4167120,0 +turboquant_search_auto_p99,768,0,11293.250,80,2198801 +turboquant_search_auto_work,768,0,0.000,80,1 +turboquant_search_auto_io,768,0,0.000,10080,0 +turboquant_search_auto_rerank,768,0,0.000,80,4167120 +pq_build,768,1,461853.333,5120000,10000 +pq_build,768,2,301272.292,5120000,10000 +pq_build,768,4,243637.625,5120000,10000 +pq_sidecar_bytes,768,0,0.000,174439,10000 +pq_manifest_code_bytes,768,0,0.000,49311,125128 +pq_search,768,0,1465.208,10000,80 +pq_search_p95,768,0,1688.750,327120,0 +pq_search_p99,768,0,1763.083,80,2198801 +pq_search_work,768,0,0.000,80,1 +pq_search_io,768,0,0.000,10080,0 +pq_search_rerank,768,0,0.000,80,327120 +pq_recall,768,0,0,1.000000,0 diff --git a/performance-results/proximity-turboquant/qualification-v4-10k-d768-l2-k10-all-b4-r8-warm-sync-shard/state/n10000-d768-l2-k10-eall-b4-r8-fixed-memory-warm-sync.json b/performance-results/proximity-turboquant/qualification-v4-10k-d768-l2-k10-all-b4-r8-warm-sync-shard/state/n10000-d768-l2-k10-eall-b4-r8-fixed-memory-warm-sync.json new file mode 100644 index 00000000..19aec42e --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v4-10k-d768-l2-k10-all-b4-r8-warm-sync-shard/state/n10000-d768-l2-k10-eall-b4-r8-fixed-memory-warm-sync.json @@ -0,0 +1,29 @@ +{ + "cell": { + "bits": 4, + "dimensions": 768, + "eligibility_ppm": 1000000, + "environment": { + "async_quantizers": false, + "cold": false, + "name": "memory-warm-sync", + "store": "memory" + }, + "k": 10, + "metric": "l2", + "records": 10000, + "rerank": "fixed", + "rerank_multiplier": 8 + }, + "command": [ + "cargo", + "bench", + "--quiet", + "--all-features", + "--bench", + "prolly_proximity_bench" + ], + "completed_at": "2026-09-12T20:52:50.619321+00:00", + "disposition": "completed", + "sha256": "2279f9a484225a5eba5c35fafe7bb10e0ac30e8a52ee1dd271bc49e15cc38e8f" +} diff --git a/performance-results/proximity-turboquant/qualification-v4-10k-d768-l2-k10-all-b4-r8-warm-sync-shard/status.json b/performance-results/proximity-turboquant/qualification-v4-10k-d768-l2-k10-all-b4-r8-warm-sync-shard/status.json new file mode 100644 index 00000000..769c2782 --- /dev/null +++ b/performance-results/proximity-turboquant/qualification-v4-10k-d768-l2-k10-all-b4-r8-warm-sync-shard/status.json @@ -0,0 +1,11 @@ +{ + "complete": true, + "completed_cells": 1, + "expected_cells": 1, + "failed": [], + "finished_at": "2026-09-12T20:57:31.686506+00:00", + "revision": "729c2ffac8835db9c99d7706746c321067abfa1d", + "schema": "prolly-turboquant-qualification-v4", + "typed_scalability_failures": 0, + "wasm_smoke": false +} diff --git a/performance-results/proximity-turboquant/qualification-v4-10k-d768-l2-k10-all-b4-r8-warm-sync-shard/stderr/n10000-d768-l2-k10-eall-b4-r8-fixed-memory-warm-sync.log b/performance-results/proximity-turboquant/qualification-v4-10k-d768-l2-k10-all-b4-r8-warm-sync-shard/stderr/n10000-d768-l2-k10-eall-b4-r8-fixed-memory-warm-sync.log new file mode 100644 index 00000000..e69de29b diff --git a/scripts/binding_api_inventory.py b/scripts/binding_api_inventory.py index 5e23213d..741dde07 100644 --- a/scripts/binding_api_inventory.py +++ b/scripts/binding_api_inventory.py @@ -361,12 +361,14 @@ def _complete_release_entry( _STORE_TRAIT_OWNERS = { "prolly::AsyncBlobStore", + "prolly::AsyncIndexedStore", "prolly::AsyncManifestStore", "prolly::AsyncManifestStoreScan", "prolly::AsyncStore", "prolly::AsyncTransactionalStore", "prolly::BlobStore", "prolly::BlobStoreScan", + "prolly::IndexedStore", "prolly::ManifestStore", "prolly::ManifestStoreScan", "prolly::NodeStoreScan", diff --git a/scripts/generate_turboquant_codebooks.py b/scripts/generate_turboquant_codebooks.py new file mode 100644 index 00000000..8fd0f2fc --- /dev/null +++ b/scripts/generate_turboquant_codebooks.py @@ -0,0 +1,161 @@ +#!/usr/bin/env python3 +"""Regenerate and verify the frozen standard-normal Lloyd-Max tables. + +Development dependency: mpmath==1.3.0. The solver uses 100 decimal digits, +symmetric quantiles for initialization, analytic truncated-normal moments, and +iteration until the maximum centroid delta is below 1e-80. It then performs +one final update and rounds directly to IEEE-754 binary64. + +The research basis is TurboQuant_mse in arXiv:2504.19874. This utility derives +the scalar tables independently; it contains no third-party TurboQuant source +or wire-format logic. +""" + +from __future__ import annotations + +import argparse +import json +import re +import struct +from pathlib import Path + +try: + import mpmath as mp +except ImportError as error: # pragma: no cover - developer setup failure + raise SystemExit("install the pinned generator dependency: pip install mpmath==1.3.0") from error + + +ROOT = Path(__file__).resolve().parents[1] +SOURCE = ROOT / "src/prolly/proximity/accelerator/turboquant.rs" +PRECISION_DIGITS = 100 +TOLERANCE = mp.mpf("1e-80") +MAX_ITERATIONS = 20_000 + + +def phi(value: mp.mpf) -> mp.mpf: + return mp.exp(-(value * value) / 2) / mp.sqrt(2 * mp.pi) + + +def cdf(value: mp.mpf) -> mp.mpf: + return (1 + mp.erf(value / mp.sqrt(2))) / 2 + + +def conditional_mean(lower: mp.mpf, upper: mp.mpf) -> mp.mpf: + lower_density = mp.mpf(0) if lower == -mp.inf else phi(lower) + upper_density = mp.mpf(0) if upper == mp.inf else phi(upper) + return (lower_density - upper_density) / (cdf(upper) - cdf(lower)) + + +def solve(bit_width: int) -> tuple[list[mp.mpf], list[mp.mpf], int]: + levels = 1 << bit_width + half = levels // 2 + centroids = [ + mp.sqrt(2) * mp.erfinv(2 * (mp.mpf(half + index) + mp.mpf("0.5")) / levels - 1) + for index in range(half) + ] + for iteration in range(1, MAX_ITERATIONS + 1): + thresholds = [mp.mpf(0)] + [ + (centroids[index] + centroids[index + 1]) / 2 + for index in range(half - 1) + ] + updated = [ + conditional_mean( + thresholds[index], + mp.inf if index == half - 1 else thresholds[index + 1], + ) + for index in range(half) + ] + delta = max(abs(left - right) for left, right in zip(centroids, updated)) + centroids = updated + if delta < TOLERANCE: + break + else: + raise RuntimeError(f"{bit_width}-bit Lloyd-Max solver did not converge") + + all_centroids = [-value for value in reversed(centroids)] + centroids + all_thresholds = [ + (all_centroids[index] + all_centroids[index + 1]) / 2 + for index in range(levels - 1) + ] + return all_thresholds, all_centroids, iteration + + +def binary64_bits(value: mp.mpf) -> str: + return f"{struct.unpack('>Q', struct.pack('>d', float(value)))[0]:016x}" + + +def interval_second_moment(lower: mp.mpf, upper: mp.mpf) -> mp.mpf: + lower_term = mp.mpf(0) if lower == -mp.inf else -lower * phi(lower) + cdf(lower) + upper_term = mp.mpf(1) if upper == mp.inf else -upper * phi(upper) + cdf(upper) + return upper_term - lower_term + + +def mean_squared_error(thresholds: list[mp.mpf], centroids: list[mp.mpf]) -> mp.mpf: + boundaries = [-mp.inf, *thresholds, mp.inf] + total = mp.mpf(0) + for index, centroid in enumerate(centroids): + lower, upper = boundaries[index], boundaries[index + 1] + probability = cdf(upper) - cdf(lower) + first_moment = ( + (mp.mpf(0) if lower == -mp.inf else phi(lower)) + - (mp.mpf(0) if upper == mp.inf else phi(upper)) + ) + total += interval_second_moment(lower, upper) + total -= 2 * centroid * first_moment + total += centroid * centroid * probability + return total + + +def frozen_values(name: str) -> list[str]: + source = SOURCE.read_text(encoding="utf-8") + match = re.search(rf"const {name}: &\[u64\] = &\[(.*?)\];", source, re.S) + if match is None: + raise RuntimeError(f"cannot find {name} in {SOURCE}") + return [token.replace("_", "").removeprefix("0x") for token in re.findall(r"0x[0-9a-f_]+", match.group(1))] + + +def main() -> int: + parser = argparse.ArgumentParser() + parser.add_argument("--emit", action="store_true", help="print Rust-ready table values") + args = parser.parse_args() + mp.mp.dps = PRECISION_DIGITS + + report = { + "method": "symmetric Lloyd-Max with analytic standard-normal moments", + "source_precision_decimal_digits": PRECISION_DIGITS, + "convergence_tolerance": "1e-80", + "paper": "TurboQuant_mse, arXiv:2504.19874", + "tables": {}, + } + failures = [] + for bit_width in (2, 3, 4): + thresholds, centroids, iterations = solve(bit_width) + threshold_bits = [binary64_bits(value) for value in thresholds] + centroid_bits = [binary64_bits(value) for value in centroids] + report["tables"][str(bit_width)] = { + "iterations": iterations, + "threshold_bits": threshold_bits, + "centroid_bits": centroid_bits, + "standard_normal_mse": mp.nstr( + mean_squared_error(thresholds, centroids), 30 + ), + } + if threshold_bits != frozen_values(f"THRESHOLDS_{bit_width}"): + failures.append(f"THRESHOLDS_{bit_width}") + if centroid_bits != frozen_values(f"CENTROIDS_{bit_width}"): + failures.append(f"CENTROIDS_{bit_width}") + + print(json.dumps(report, indent=2, sort_keys=True)) + if args.emit: + for bit_width, table in report["tables"].items(): + print(f"// {bit_width}-bit thresholds") + print("\n".join(f"0x{bits}," for bits in table["threshold_bits"])) + print(f"// {bit_width}-bit centroids") + print("\n".join(f"0x{bits}," for bits in table["centroid_bits"])) + if failures: + raise SystemExit("generated tables differ from frozen Rust constants: " + ", ".join(failures)) + return 0 + + +if __name__ == "__main__": + raise SystemExit(main()) diff --git a/scripts/run_turboquant_qualification.py b/scripts/run_turboquant_qualification.py new file mode 100755 index 00000000..5f168030 --- /dev/null +++ b/scripts/run_turboquant_qualification.py @@ -0,0 +1,790 @@ +#!/usr/bin/env python3 +"""Run the versioned, resumable TurboQuant qualification matrix.""" + +from __future__ import annotations + +import argparse +import csv +import hashlib +import itertools +import json +import math +import os +from pathlib import Path +import re +import subprocess +import sys +import tempfile +from dataclasses import asdict, dataclass +from datetime import datetime, timezone +from typing import Iterable, Sequence + + +CONTRACT_SCHEMA = "prolly-turboquant-qualification-v4" +BENCH_SCHEMA_VERSION = 4 +BENCH_DATASET = "linear-mod-2000003-v2" +FULL_RECORDS = (1_000, 10_000, 100_000, 1_000_000) +FULL_DIMENSIONS = (128, 200, 768, 1_536, 3_072) +FULL_METRICS = ("l2", "cosine", "inner_product") +FULL_K = (1, 10, 100) +FULL_ELIGIBILITY_PPM = (1_000_000, 100_000, 10_000, 1_000) +FULL_BITS = (2, 3, 4) +FULL_RERANK = (4, 8, 16) +DEFAULT_WORKERS = (1, 2, 4) + + +class QualificationError(RuntimeError): + """A qualification contract or evidence check failed.""" + + +@dataclass(frozen=True) +class Environment: + name: str + store: str + cold: bool + async_quantizers: bool + + +ENVIRONMENTS = ( + Environment("memory-warm-sync", "memory", False, False), + Environment("memory-cold-sync", "memory", True, False), + Environment("file-warm-sync", "file", False, False), + Environment("file-cold-sync", "file", True, False), + Environment("memory-warm-async", "memory", False, True), + Environment("memory-cold-async", "memory", True, True), +) + + +@dataclass(frozen=True) +class Cell: + records: int + dimensions: int + metric: str + k: int + eligibility_ppm: int + bits: int + rerank: str + rerank_multiplier: int + environment: Environment + + @property + def identifier(self) -> str: + eligibility = { + 1_000_000: "all", + 100_000: "10pct", + 10_000: "1pct", + 1_000: "0p1pct", + }.get(self.eligibility_ppm, f"ppm{self.eligibility_ppm}") + return ( + f"n{self.records}-d{self.dimensions}-{self.metric}-k{self.k}-" + f"e{eligibility}-b{self.bits}-r{self.rerank_multiplier}-{self.rerank}-" + f"{self.environment.name}" + ) + + +@dataclass(frozen=True) +class ParsedOutput: + preamble: dict[str, str] + rows: dict[str, list[list[str]]] + + +def _rerank_cases(records: int, k: int) -> Iterable[tuple[str, int]]: + yield from (("fixed", multiplier) for multiplier in FULL_RERANK) + if records <= 10_000: + exhaustive = math.ceil(records / k) + if exhaustive not in FULL_RERANK: + yield "exhaustive", exhaustive + + +def enumerate_cells(profile: str) -> list[Cell]: + if profile == "smoke": + return [ + Cell(32, 24, "l2", 10, 1_000_000, 4, "fixed", 8, environment) + for environment in ENVIRONMENTS + ] + if profile != "full": + raise QualificationError(f"unsupported profile: {profile}") + cells = [] + for records, dimensions, metric, k, eligibility, bits in itertools.product( + FULL_RECORDS, + FULL_DIMENSIONS, + FULL_METRICS, + FULL_K, + FULL_ELIGIBILITY_PPM, + FULL_BITS, + ): + for rerank, multiplier in _rerank_cases(records, k): + for environment in ENVIRONMENTS: + cells.append( + Cell( + records, + dimensions, + metric, + k, + eligibility, + bits, + rerank, + multiplier, + environment, + ) + ) + return cells + + +def shard_cells(cells: Sequence[Cell], index: int, count: int) -> list[Cell]: + if count <= 0: + raise QualificationError("shard count must be positive") + if not 0 <= index < count: + raise QualificationError("shard index must be in [0, shard count)") + selected = [] + for cell in cells: + digest = hashlib.sha256(cell.identifier.encode()).digest() + if int.from_bytes(digest[:8], "big") % count == index: + selected.append(cell) + return selected + + +def matrix_digest(cells: Sequence[Cell]) -> str: + payload = "\n".join(cell.identifier for cell in cells).encode() + return hashlib.sha256(payload).hexdigest() + + +def _run_text(arguments: Sequence[str], cwd: Path) -> str: + result = subprocess.run(arguments, cwd=cwd, check=True, text=True, capture_output=True) + return result.stdout.strip() + + +def current_revision(repo: Path) -> str: + return _run_text(("git", "rev-parse", "HEAD"), repo) + + +def tracked_worktree_is_dirty(repo: Path) -> bool: + unstaged = subprocess.run(("git", "diff", "--quiet"), cwd=repo, check=False) + staged = subprocess.run(("git", "diff", "--cached", "--quiet"), cwd=repo, check=False) + return unstaged.returncode != 0 or staged.returncode != 0 + + +def make_contract( + profile: str, + revision: str, + workers: Sequence[int], + repeats: int, + shard_index: int, + shard_count: int, + all_cells: Sequence[Cell], + selected: Sequence[Cell], + max_cell_records: int | None = None, +) -> dict[str, object]: + return { + "schema": CONTRACT_SCHEMA, + "benchmark_schema_version": BENCH_SCHEMA_VERSION, + "dataset": BENCH_DATASET, + "profile": profile, + "revision": revision, + "workers": list(workers), + "search_repeats": repeats, + "shard_index": shard_index, + "shard_count": shard_count, + "full_cell_count": len(all_cells), + "full_matrix_digest": matrix_digest(all_cells), + "shard_cell_count": len(selected), + "shard_matrix_digest": matrix_digest(selected), + "environments": [asdict(environment) for environment in ENVIRONMENTS], + "exhaustive_max_records": 10_000, + "wasm_smoke": shard_index == 0, + "max_cell_records": max_cell_records, + } + + +def expected_scalability_failure( + cell: Cell, max_cell_records: int | None +) -> dict[str, object] | None: + if max_cell_records is None or cell.records <= max_cell_records: + return None + return { + "kind": "ProximityResourceLimitExceeded", + "resource": "TurboQuant records", + "limit": max_cell_records, + "actual": cell.records, + "phase": "qualification preflight", + } + + +def atomic_write(path: Path, content: str) -> None: + path.parent.mkdir(parents=True, exist_ok=True) + with tempfile.NamedTemporaryFile( + mode="w", encoding="utf-8", dir=path.parent, delete=False + ) as temporary: + temporary.write(content) + temporary.flush() + os.fsync(temporary.fileno()) + temporary_path = Path(temporary.name) + os.replace(temporary_path, path) + + +def write_json(path: Path, value: object) -> None: + atomic_write(path, json.dumps(value, indent=2, sort_keys=True) + "\n") + + +def prepare_output(output: Path, contract: dict[str, object], resume: bool) -> None: + manifest_path = output / "manifest.json" + if resume: + if not manifest_path.is_file(): + raise QualificationError("resume requires an existing manifest.json") + try: + existing = json.loads(manifest_path.read_text(encoding="utf-8")) + except (OSError, json.JSONDecodeError) as error: + raise QualificationError(f"cannot read resume manifest: {error}") from error + if existing.get("contract") != contract: + raise QualificationError("resume manifest does not match this exact matrix contract") + return + if output.exists() and any(output.iterdir()): + raise QualificationError(f"refusing to overwrite non-empty output: {output}") + output.mkdir(parents=True, exist_ok=True) + write_json( + manifest_path, + { + "contract": contract, + "created_at": datetime.now(timezone.utc).isoformat(), + }, + ) + + +def _required_operation_counts(async_quantizers: bool, workers: Sequence[int]) -> dict[str, int]: + counts = { + "source_build": 1, + "source_closure_bytes": 1, + "turboquant_build": len(workers), + "turboquant_build_resources": len(workers), + "turboquant_sidecar_bytes": 1, + "turboquant_manifest_code_bytes": 1, + "turboquant_recall": 1, + "pq_build": len(workers), + "pq_sidecar_bytes": 1, + "pq_manifest_code_bytes": 1, + "pq_recall": 1, + } + for name in ("turboquant_search_scalar", "turboquant_search_simd", "turboquant_search_auto"): + for suffix in ("", "_p95", "_p99", "_work", "_io", "_rerank"): + counts[name + suffix] = 1 + for suffix in ("", "_p95", "_p99", "_work", "_io", "_rerank"): + counts["pq_search" + suffix] = 1 + if async_quantizers: + counts.update( + { + "turboquant_build_async": len(workers), + "turboquant_build_async_resources": len(workers), + "turboquant_build_async_publication": len(workers), + "turboquant_recall_async": 1, + "pq_build_async": len(workers), + "pq_build_async_publication": len(workers), + "pq_recall_async": 1, + } + ) + for name in ("turboquant_search_async", "pq_search_async"): + for suffix in ("", "_p95", "_p99", "_work", "_io", "_rerank"): + counts[name + suffix] = 1 + return counts + + +def _expected_preamble(cell: Cell, revision: str, repeats: int) -> dict[str, str]: + metric = {"l2": "L2Squared", "cosine": "Cosine", "inner_product": "InnerProduct"}[ + cell.metric + ] + eligible = max(1, math.ceil(cell.records * cell.eligibility_ppm / 1_000_000)) + return { + "schema_version": str(BENCH_SCHEMA_VERSION), + "dataset": BENCH_DATASET, + "revision": revision, + "store": cell.environment.store, + "records": str(cell.records), + "profile": "quantizers", + "search_repeats": str(repeats), + "metric": metric, + "k": str(cell.k), + "eligibility_ppm": str(cell.eligibility_ppm), + "effective_k": str(min(cell.k, eligible)), + "turboquant_bits": str(cell.bits), + "rerank_multiplier": str(cell.rerank_multiplier), + "search_cache": "reset" if cell.environment.cold else "warm", + "async_quantizers": str(cell.environment.async_quantizers).lower(), + } + + +def validate_output( + output: str, cell: Cell, revision: str, workers: Sequence[int], repeats: int +) -> ParsedOutput: + lines = output.splitlines() + try: + header_index = lines.index("operation,dimensions,threads,micros,metric_a,metric_b") + except ValueError as error: + raise QualificationError(f"{cell.identifier}: missing CSV header") from error + preamble: dict[str, str] = {} + for line in lines[:header_index]: + if "=" not in line: + continue + key, value = line.split("=", 1) + if key in preamble: + raise QualificationError(f"{cell.identifier}: duplicate preamble key {key}") + preamble[key] = value + for key, expected in _expected_preamble(cell, revision, repeats).items(): + if preamble.get(key) != expected: + raise QualificationError( + f"{cell.identifier}: preamble {key}={preamble.get(key)!r}, expected {expected!r}" + ) + for key in ("compiler", "target_arch", "target_os", "machine", "seed"): + if not preamble.get(key): + raise QualificationError(f"{cell.identifier}: missing preamble key {key}") + + rows: dict[str, list[list[str]]] = {} + reader = csv.reader(lines[header_index + 1 :]) + for row in reader: + if len(row) != 6: + raise QualificationError(f"{cell.identifier}: malformed CSV row {row!r}") + operation, dimensions, threads, micros, metric_a, metric_b = row + try: + parsed = [int(dimensions), int(threads), float(micros), float(metric_a), float(metric_b)] + except ValueError as error: + raise QualificationError(f"{cell.identifier}: non-numeric CSV row {row!r}") from error + if ( + parsed[0] != cell.dimensions + or not all(math.isfinite(value) for value in parsed[2:]) + or any(value < 0 for value in parsed[2:]) + ): + raise QualificationError(f"{cell.identifier}: invalid CSV row {row!r}") + rows.setdefault(operation, []).append(row) + + required = _required_operation_counts(cell.environment.async_quantizers, workers) + if set(rows) != set(required): + missing = sorted(set(required) - set(rows)) + unexpected = sorted(set(rows) - set(required)) + raise QualificationError( + f"{cell.identifier}: operation set mismatch missing={missing} unexpected={unexpected}" + ) + for operation, expected_count in required.items(): + if len(rows[operation]) != expected_count: + raise QualificationError( + f"{cell.identifier}: {operation} count={len(rows[operation])}, expected={expected_count}" + ) + for operation in ( + "turboquant_build", + "turboquant_build_resources", + "pq_build", + "turboquant_build_async", + "turboquant_build_async_resources", + "turboquant_build_async_publication", + "pq_build_async", + "pq_build_async_publication", + ): + if operation in rows: + observed = sorted(int(row[2]) for row in rows[operation]) + if observed != sorted(workers): + raise QualificationError( + f"{cell.identifier}: {operation} workers={observed}, expected={sorted(workers)}" + ) + for operation in ("turboquant_recall", "pq_recall", "turboquant_recall_async", "pq_recall_async"): + if operation in rows and not 0.0 <= float(rows[operation][0][4]) <= 1.0: + raise QualificationError(f"{cell.identifier}: invalid recall in {operation}") + + physical_rows = [ + "turboquant_search_scalar_p95", + "pq_search_p95", + "turboquant_search_scalar_io", + "pq_search_io", + ] + if cell.environment.async_quantizers: + physical_rows.extend( + [ + "turboquant_search_async_p95", + "pq_search_async_p95", + "turboquant_search_async_io", + "pq_search_async_io", + ] + ) + for operation in physical_rows: + physical = float(rows[operation][0][5]) + if cell.environment.cold and physical <= 0: + raise QualificationError(f"{cell.identifier}: cold {operation} has no physical I/O") + # A warm cell proves that every measured sample shares the runtime + # primed by its untimed warmup. It does not promise that the complete + # working set fits the bounded cache. Sequential scans larger than a + # cache partition can legitimately perform physical reads on every + # sample; requiring zero here made the 100K/1M matrix impossible to + # record under the production cache limits. + + if cell.environment.async_quantizers: + for sync_name, async_name in ( + ("turboquant_search_scalar", "turboquant_search_async"), + ("pq_search", "pq_search_async"), + ): + for suffix in ("", "_p99", "_work", "_rerank"): + if rows[sync_name + suffix][0][4:] != rows[async_name + suffix][0][4:]: + raise QualificationError( + f"{cell.identifier}: sync/async logical mismatch for {sync_name + suffix}" + ) + for suffix in ("_p95", "_io"): + if rows[sync_name + suffix][0][4] != rows[async_name + suffix][0][4]: + raise QualificationError( + f"{cell.identifier}: sync/async logical mismatch for {sync_name + suffix}" + ) + return ParsedOutput(preamble, rows) + + +def cell_environment(cell: Cell, output: Path, workers: Sequence[int], repeats: int) -> dict[str, str]: + environment = { + key: value for key, value in os.environ.items() if not key.startswith("PROLLY_PROXIMITY_BENCH_") + } + environment.update( + { + "CARGO_INCREMENTAL": "0", + "PROLLY_PROXIMITY_BENCH_RECORDS": str(cell.records), + "PROLLY_PROXIMITY_BENCH_DIMENSIONS": str(cell.dimensions), + "PROLLY_PROXIMITY_BENCH_THREADS": ",".join(str(worker) for worker in workers), + "PROLLY_PROXIMITY_BENCH_SEARCH_REPEATS": str(repeats), + "PROLLY_PROXIMITY_BENCH_QUANTIZERS_ONLY": "1", + "PROLLY_PROXIMITY_BENCH_METRIC": cell.metric, + "PROLLY_PROXIMITY_BENCH_K": str(cell.k), + "PROLLY_PROXIMITY_BENCH_ELIGIBILITY_PPM": str(cell.eligibility_ppm), + "PROLLY_PROXIMITY_BENCH_TURBOQUANT_BITS": str(cell.bits), + "PROLLY_PROXIMITY_BENCH_RERANK_MULTIPLIER": str(cell.rerank_multiplier), + "PROLLY_PROXIMITY_BENCH_STORE": cell.environment.store, + } + ) + if cell.environment.cold: + environment["PROLLY_PROXIMITY_BENCH_RESET_SEARCH_CACHE"] = "1" + if cell.environment.async_quantizers: + environment["PROLLY_PROXIMITY_BENCH_ASYNC_QUANTIZERS"] = "1" + if cell.environment.store == "file": + store_path = output / "stores" + store_path.mkdir(parents=True, exist_ok=True) + environment["PROLLY_PROXIMITY_BENCH_STORE_PATH"] = str(store_path.resolve()) + return environment + + +def completed_cell_is_valid( + output: Path, + cell: Cell, + revision: str, + workers: Sequence[int], + repeats: int, + max_cell_records: int | None = None, +) -> bool: + state_path = output / "state" / f"{cell.identifier}.json" + raw_path = output / "raw" / f"{cell.identifier}.csv" + if not state_path.exists(): + return False + try: + state = json.loads(state_path.read_text(encoding="utf-8")) + except (OSError, json.JSONDecodeError) as error: + raise QualificationError(f"cannot validate resume state for {cell.identifier}: {error}") from error + if state.get("cell") != asdict(cell): + raise QualificationError(f"resume cell contract mismatch for {cell.identifier}") + expected_failure = expected_scalability_failure(cell, max_cell_records) + if expected_failure is not None: + if state.get("disposition") != "typed_scalability_failure": + raise QualificationError( + f"resume disposition mismatch for limited cell {cell.identifier}" + ) + if state.get("failure") != expected_failure: + raise QualificationError( + f"resume scalability failure mismatch for {cell.identifier}" + ) + if raw_path.exists(): + raise QualificationError( + f"limited cell has unexpected raw benchmark output for {cell.identifier}" + ) + return True + if not raw_path.is_file(): + raise QualificationError(f"resume state exists without raw output for {cell.identifier}") + try: + raw = raw_path.read_text(encoding="utf-8") + except OSError as error: + raise QualificationError(f"cannot read resume output for {cell.identifier}: {error}") from error + if state.get("disposition") != "completed": + raise QualificationError(f"resume disposition mismatch for {cell.identifier}") + if state.get("sha256") != hashlib.sha256(raw.encode()).hexdigest(): + raise QualificationError(f"resume output digest mismatch for {cell.identifier}") + validate_output(raw, cell, revision, workers, repeats) + return True + + +def run_cell( + repo: Path, + output: Path, + cell: Cell, + revision: str, + workers: Sequence[int], + repeats: int, +) -> None: + command = ("cargo", "bench", "--quiet", "--all-features", "--bench", "prolly_proximity_bench") + environment = cell_environment(cell, output, workers, repeats) + result = subprocess.run(command, cwd=repo, env=environment, text=True, capture_output=True) + raw_path = output / "raw" / f"{cell.identifier}.csv" + stderr_path = output / "stderr" / f"{cell.identifier}.log" + atomic_write(raw_path, result.stdout) + atomic_write(stderr_path, result.stderr) + if result.returncode != 0: + raise QualificationError( + f"{cell.identifier}: benchmark exited {result.returncode}; see {stderr_path}" + ) + validate_output(result.stdout, cell, revision, workers, repeats) + write_json( + output / "state" / f"{cell.identifier}.json", + { + "cell": asdict(cell), + "command": list(command), + "completed_at": datetime.now(timezone.utc).isoformat(), + "disposition": "completed", + "sha256": hashlib.sha256(result.stdout.encode()).hexdigest(), + }, + ) + + +def record_scalability_failure( + output: Path, cell: Cell, max_cell_records: int +) -> None: + failure = expected_scalability_failure(cell, max_cell_records) + if failure is None: + raise QualificationError( + f"{cell.identifier}: scalability failure requested for an in-limit cell" + ) + write_json( + output / "state" / f"{cell.identifier}.json", + { + "cell": asdict(cell), + "completed_at": datetime.now(timezone.utc).isoformat(), + "disposition": "typed_scalability_failure", + "failure": failure, + }, + ) + + +def wasm_smoke_is_valid(output: Path, revision: str) -> bool: + state_path = output / "wasm" / "status.json" + build_path = output / "wasm" / "build.log" + test_path = output / "wasm" / "test.log" + if not state_path.exists(): + return False + if not build_path.is_file() or not test_path.is_file(): + raise QualificationError("WASM resume state exists without build/test logs") + try: + state = json.loads(state_path.read_text(encoding="utf-8")) + build_log = build_path.read_text(encoding="utf-8") + test_log = test_path.read_text(encoding="utf-8") + except (OSError, json.JSONDecodeError) as error: + raise QualificationError(f"cannot validate WASM resume state: {error}") from error + if state.get("revision") != revision: + raise QualificationError("WASM resume revision mismatch") + if state.get("commands") != [["npm", "run", "build"], ["npm", "test"]]: + raise QualificationError("WASM resume command contract mismatch") + if state.get("build_sha256") != hashlib.sha256(build_log.encode()).hexdigest(): + raise QualificationError("WASM resume build digest mismatch") + if state.get("test_sha256") != hashlib.sha256(test_log.encode()).hexdigest(): + raise QualificationError("WASM resume test digest mismatch") + if not _tap_summary_is_zero(test_log, "fail") or not _tap_summary_is_zero( + test_log, "skipped" + ): + raise QualificationError("WASM resume test log is not an unskipped passing suite") + return True + + +def _tap_summary_is_zero(output: str, field: str) -> bool: + return re.search(rf"^(?:#|ℹ)\s*{re.escape(field)}\s+0\s*$", output, re.MULTILINE) is not None + + +def run_wasm_smoke(repo: Path, output: Path, revision: str) -> None: + wasm_dir = repo / "bindings" / "wasm" + logs = output / "wasm" + commands = ( + ("npm", "run", "build"), + ("npm", "test"), + ) + names = ("build.log", "test.log") + results = [] + for command, name in zip(commands, names, strict=True): + result = subprocess.run(command, cwd=wasm_dir, text=True, capture_output=True) + combined = result.stdout + result.stderr + atomic_write(logs / name, combined) + results.append((result, combined)) + if result.returncode != 0: + raise QualificationError(f"WASM smoke failed in {' '.join(command)}; see {logs / name}") + test_log = results[1][1] + if not _tap_summary_is_zero(test_log, "fail") or not _tap_summary_is_zero( + test_log, "skipped" + ): + raise QualificationError("WASM smoke did not report an unskipped passing suite") + for expected in ( + "WASM TurboQuant lifecycle is portable, verified, and cancellable", + "WASM TurboQuant build matches the checked-in Rust wire fixture", + ): + if expected not in test_log: + raise QualificationError(f"WASM smoke is missing required test: {expected}") + write_json( + logs / "status.json", + { + "build_sha256": hashlib.sha256(results[0][1].encode()).hexdigest(), + "commands": [list(command) for command in commands], + "completed_at": datetime.now(timezone.utc).isoformat(), + "revision": revision, + "test_sha256": hashlib.sha256(test_log.encode()).hexdigest(), + }, + ) + + +def parse_workers(value: str) -> tuple[int, ...]: + try: + workers = tuple(int(item) for item in value.split(",")) + except ValueError as error: + raise argparse.ArgumentTypeError("workers must be comma-separated integers") from error + if not workers or any(worker <= 0 for worker in workers) or len(set(workers)) != len(workers): + raise argparse.ArgumentTypeError("workers must be unique positive integers") + return workers + + +def main(argv: Sequence[str] | None = None) -> int: + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--profile", choices=("smoke", "full"), required=True) + parser.add_argument("--output", type=Path, required=True) + parser.add_argument("--workers", type=parse_workers, default=DEFAULT_WORKERS) + parser.add_argument("--search-repeats", type=int) + parser.add_argument("--shard-index", type=int, default=0) + parser.add_argument("--shard-count", type=int, default=1) + parser.add_argument("--resume", action="store_true") + parser.add_argument("--dry-run", action="store_true") + parser.add_argument("--keep-going", action="store_true") + parser.add_argument("--allow-dirty", action="store_true", help="smoke profile only") + parser.add_argument( + "--max-cell-records", + type=int, + help=( + "full profile only: record a typed scalability disposition instead of " + "running 1M cells above this explicit host limit (minimum 100000)" + ), + ) + args = parser.parse_args(argv) + + if args.search_repeats is None: + args.search_repeats = 2 if args.profile == "smoke" else 30 + if args.search_repeats <= 0: + parser.error("search repeats must be positive") + if args.allow_dirty and args.profile != "smoke": + parser.error("--allow-dirty is only valid for smoke runs") + if args.max_cell_records is not None: + if args.profile != "full": + parser.error("--max-cell-records is only valid for full runs") + if not 100_000 <= args.max_cell_records < 1_000_000: + parser.error("--max-cell-records must be in 100000..1000000") + + repo = Path(__file__).resolve().parents[1] + revision = current_revision(repo) + if tracked_worktree_is_dirty(repo) and not args.allow_dirty: + raise QualificationError("tracked worktree is dirty; qualification evidence requires a commit") + all_cells = enumerate_cells(args.profile) + selected = shard_cells(all_cells, args.shard_index, args.shard_count) + contract = make_contract( + args.profile, + revision, + args.workers, + args.search_repeats, + args.shard_index, + args.shard_count, + all_cells, + selected, + args.max_cell_records, + ) + if args.dry_run: + print(json.dumps(contract, indent=2, sort_keys=True)) + for cell in selected: + print(cell.identifier) + return 0 + + output = args.output.resolve() + prepare_output(output, contract, args.resume) + compile_result = subprocess.run( + ("cargo", "bench", "--all-features", "--bench", "prolly_proximity_bench", "--no-run"), + cwd=repo, + env={**os.environ, "CARGO_INCREMENTAL": "0"}, + text=True, + capture_output=True, + ) + atomic_write(output / "compile.log", compile_result.stdout + compile_result.stderr) + if compile_result.returncode != 0: + raise QualificationError(f"benchmark compilation failed; see {output / 'compile.log'}") + + wasm_smoke = args.shard_index == 0 + if wasm_smoke: + if args.resume and wasm_smoke_is_valid(output, revision): + print("resume WASM TurboQuant smoke", flush=True) + else: + print("run WASM TurboQuant smoke", flush=True) + run_wasm_smoke(repo, output, revision) + + completed = 0 + scalability_failures = 0 + failed: list[str] = [] + for ordinal, cell in enumerate(selected, start=1): + if args.resume and completed_cell_is_valid( + output, + cell, + revision, + args.workers, + args.search_repeats, + args.max_cell_records, + ): + completed += 1 + if expected_scalability_failure(cell, args.max_cell_records) is not None: + scalability_failures += 1 + disposition = "typed scalability failure" + else: + disposition = "benchmark" + print( + f"[{ordinal}/{len(selected)}] resume {disposition} {cell.identifier}", + flush=True, + ) + continue + expected_failure = expected_scalability_failure(cell, args.max_cell_records) + if expected_failure is not None: + record_scalability_failure(output, cell, args.max_cell_records) + completed += 1 + scalability_failures += 1 + print( + f"[{ordinal}/{len(selected)}] typed scalability failure " + f"{cell.identifier}: {expected_failure['resource']} " + f"actual={expected_failure['actual']} limit={expected_failure['limit']}", + flush=True, + ) + continue + print(f"[{ordinal}/{len(selected)}] run {cell.identifier}", flush=True) + try: + run_cell(repo, output, cell, revision, args.workers, args.search_repeats) + completed += 1 + except QualificationError as error: + failed.append(str(error)) + print(error, file=sys.stderr, flush=True) + if not args.keep_going: + break + + status = { + "complete": completed == len(selected) and not failed, + "completed_cells": completed, + "expected_cells": len(selected), + "failed": failed, + "finished_at": datetime.now(timezone.utc).isoformat(), + "revision": revision, + "schema": CONTRACT_SCHEMA, + "typed_scalability_failures": scalability_failures, + "wasm_smoke": wasm_smoke, + } + write_json(output / "status.json", status) + if not status["complete"]: + return 1 + print(f"qualification shard complete: {output}") + return 0 + + +if __name__ == "__main__": + try: + raise SystemExit(main()) + except QualificationError as error: + print(f"error: {error}", file=sys.stderr) + raise SystemExit(2) from error diff --git a/scripts/summarize_turboquant_qualification.py b/scripts/summarize_turboquant_qualification.py new file mode 100755 index 00000000..10b96b34 --- /dev/null +++ b/scripts/summarize_turboquant_qualification.py @@ -0,0 +1,499 @@ +#!/usr/bin/env python3 +"""Validate all TurboQuant qualification shards and emit gate summaries.""" + +from __future__ import annotations + +import argparse +import csv +import importlib.util +import io +import json +import math +from pathlib import Path +import sys +from typing import Sequence + + +RUNNER_PATH = Path(__file__).resolve().with_name("run_turboquant_qualification.py") +SPEC = importlib.util.spec_from_file_location("run_turboquant_qualification", RUNNER_PATH) +runner = importlib.util.module_from_spec(SPEC) +assert SPEC.loader is not None +sys.modules[SPEC.name] = runner +SPEC.loader.exec_module(runner) + + +class SummaryError(RuntimeError): + """The retained matrix is incomplete, mixed, or invalid.""" + + +SHARD_FIELDS = { + "shard_index", + "shard_cell_count", + "shard_matrix_digest", + "wasm_smoke", +} + + +def read_json(path: Path) -> dict[str, object]: + try: + value = json.loads(path.read_text(encoding="utf-8")) + except (OSError, json.JSONDecodeError) as error: + raise SummaryError(f"cannot read {path}: {error}") from error + if not isinstance(value, dict): + raise SummaryError(f"expected JSON object in {path}") + return value + + +def common_contract(contract: dict[str, object]) -> dict[str, object]: + return {key: value for key, value in contract.items() if key not in SHARD_FIELDS} + + +def validate_contract_set(contracts: Sequence[dict[str, object]]) -> list[dict[str, object]]: + if not contracts: + raise SummaryError("at least one shard is required") + expected_common = common_contract(contracts[0]) + try: + shard_count = int(contracts[0]["shard_count"]) + except (KeyError, TypeError, ValueError) as error: + raise SummaryError("invalid shard_count in manifest") from error + if shard_count <= 0: + raise SummaryError("shard_count must be positive") + by_index: dict[int, dict[str, object]] = {} + for contract in contracts: + if common_contract(contract) != expected_common: + raise SummaryError("shards have mixed matrix contracts") + try: + index = int(contract["shard_index"]) + except (KeyError, TypeError, ValueError) as error: + raise SummaryError("invalid shard_index in manifest") from error + if index in by_index: + raise SummaryError(f"duplicate shard index {index}") + by_index[index] = contract + expected_indices = set(range(shard_count)) + if set(by_index) != expected_indices: + raise SummaryError( + f"incomplete shard set: missing={sorted(expected_indices - set(by_index))} " + f"unexpected={sorted(set(by_index) - expected_indices)}" + ) + return [by_index[index] for index in range(shard_count)] + + +def operation_value(parsed, operation: str, column: int) -> float: + rows = parsed.rows[operation] + if len(rows) != 1: + raise SummaryError(f"expected one {operation} row") + return float(rows[0][column]) + + +def worker_value(parsed, operation: str, worker: int, column: int) -> float: + matches = [row for row in parsed.rows[operation] if int(row[2]) == worker] + if len(matches) != 1: + raise SummaryError(f"expected one {operation} row for worker {worker}") + return float(matches[0][column]) + + +SUMMARY_FIELDS = ( + "cell_id", + "records", + "dimensions", + "metric", + "requested_k", + "effective_k", + "eligibility_ppm", + "bits", + "rerank_kind", + "rerank_multiplier", + "environment", + "source_bytes", + "turboquant_manifest_bytes", + "turboquant_code_tree_bytes", + "turboquant_sidecar_bytes", + "turboquant_encoded_bytes", + "pq_manifest_bytes", + "pq_code_tree_bytes", + "pq_sidecar_bytes", + "turboquant_build_micros", + "pq_build_micros", + "turboquant_search_median_micros", + "turboquant_search_p95_micros", + "turboquant_search_p99_micros", + "pq_search_median_micros", + "pq_search_p95_micros", + "pq_search_p99_micros", + "turboquant_recall", + "pq_recall", + "turboquant_quantized_evaluations", + "turboquant_exact_evaluations", + "turboquant_logical_bytes", + "turboquant_physical_bytes", + "turboquant_logical_nodes", + "turboquant_physical_reads", + "turboquant_candidate_peak", + "turboquant_candidate_bytes_peak", + "turboquant_frontier_peak", + "turboquant_reranked_candidates", + "completion", +) + + +def summarize_cell(cell, parsed, workers: Sequence[int]) -> dict[str, object]: + async_mode = cell.environment.async_quantizers + tq_search = "turboquant_search_async" if async_mode else "turboquant_search_auto" + pq_search = "pq_search_async" if async_mode else "pq_search" + tq_recall = "turboquant_recall_async" if async_mode else "turboquant_recall" + pq_recall = "pq_recall_async" if async_mode else "pq_recall" + tq_build = "turboquant_build_async" if async_mode else "turboquant_build" + pq_build = "pq_build_async" if async_mode else "pq_build" + worker = max(workers) + return { + "cell_id": cell.identifier, + "records": cell.records, + "dimensions": cell.dimensions, + "metric": cell.metric, + "requested_k": cell.k, + "effective_k": int(parsed.preamble["effective_k"]), + "eligibility_ppm": cell.eligibility_ppm, + "bits": cell.bits, + "rerank_kind": cell.rerank, + "rerank_multiplier": cell.rerank_multiplier, + "environment": cell.environment.name, + "source_bytes": int(operation_value(parsed, "source_closure_bytes", 4)), + "turboquant_manifest_bytes": int( + operation_value(parsed, "turboquant_manifest_code_bytes", 4) + ), + "turboquant_code_tree_bytes": int( + operation_value(parsed, "turboquant_manifest_code_bytes", 5) + ), + "turboquant_sidecar_bytes": int( + operation_value(parsed, "turboquant_sidecar_bytes", 4) + ), + "turboquant_encoded_bytes": int( + operation_value(parsed, "turboquant_sidecar_bytes", 5) + ), + "pq_manifest_bytes": int(operation_value(parsed, "pq_manifest_code_bytes", 4)), + "pq_code_tree_bytes": int(operation_value(parsed, "pq_manifest_code_bytes", 5)), + "pq_sidecar_bytes": int(operation_value(parsed, "pq_sidecar_bytes", 4)), + "turboquant_build_micros": worker_value(parsed, tq_build, worker, 3), + "pq_build_micros": worker_value(parsed, pq_build, worker, 3), + "turboquant_search_median_micros": operation_value(parsed, tq_search, 3), + "turboquant_search_p95_micros": operation_value(parsed, tq_search + "_p95", 3), + "turboquant_search_p99_micros": operation_value(parsed, tq_search + "_p99", 3), + "pq_search_median_micros": operation_value(parsed, pq_search, 3), + "pq_search_p95_micros": operation_value(parsed, pq_search + "_p95", 3), + "pq_search_p99_micros": operation_value(parsed, pq_search + "_p99", 3), + "turboquant_recall": operation_value(parsed, tq_recall, 4), + "pq_recall": operation_value(parsed, pq_recall, 4), + "turboquant_quantized_evaluations": int(operation_value(parsed, tq_search, 4)), + "turboquant_exact_evaluations": int(operation_value(parsed, tq_search, 5)), + "turboquant_logical_bytes": int(operation_value(parsed, tq_search + "_p95", 4)), + "turboquant_physical_bytes": int(operation_value(parsed, tq_search + "_p95", 5)), + "turboquant_logical_nodes": int(operation_value(parsed, tq_search + "_io", 4)), + "turboquant_physical_reads": int(operation_value(parsed, tq_search + "_io", 5)), + "turboquant_candidate_peak": int(operation_value(parsed, tq_search + "_p99", 4)), + "turboquant_candidate_bytes_peak": int( + operation_value(parsed, tq_search + "_p99", 5) + ), + "turboquant_frontier_peak": int(operation_value(parsed, tq_search + "_work", 4)), + "turboquant_reranked_candidates": int( + operation_value(parsed, tq_search + "_rerank", 4) + ), + "completion": int(operation_value(parsed, tq_search + "_work", 5)), + } + + +def evaluate_gates( + rows: Sequence[dict[str, object]], + profile: str, + scalability_failures: Sequence[dict[str, object]] = (), +) -> dict[str, object]: + if profile != "full": + return { + "profile": profile, + "matrix_complete": True, + "forced_matrix_qualified": False, + "auto_qualified": False, + "typed_scalability_failures": len(scalability_failures), + "note": "smoke evidence does not evaluate production GA or Auto gates", + } + + failures: dict[str, list[str]] = { + "recall_floor": [], + "recall_vs_pq": [], + "candidate_bound": [], + "transform_count": [], + "code_value_size": [], + "four_bit_ratio": [], + } + default_rows = [ + row + for row in rows + if row["bits"] == 4 + and row["rerank_kind"] == "fixed" + and row["rerank_multiplier"] == 8 + and row["requested_k"] == 10 + ] + for row in default_rows: + if float(row["turboquant_recall"]) < 0.95: + failures["recall_floor"].append(str(row["cell_id"])) + if float(row["turboquant_recall"]) + 0.01 < float(row["pq_recall"]): + failures["recall_vs_pq"].append(str(row["cell_id"])) + for row in rows: + eligible = max( + 1, + math.ceil(int(row["records"]) * int(row["eligibility_ppm"]) / 1_000_000), + ) + target = min( + eligible, + int(row["effective_k"]) * int(row["rerank_multiplier"]), + ) + if int(row["turboquant_candidate_peak"]) > target: + failures["candidate_bound"].append(str(row["cell_id"])) + expected_transforms = int(row["records"]) * int(row["dimensions"]) + # Synthetic qualification vectors are all nonzero. The base build row's + # first counter is transformed components, which must be one transform + # per source vector. + # This value is validated directly from raw output below when loading. + if int(row["_transformed_components"]) != expected_transforms: + failures["transform_count"].append(str(row["cell_id"])) + expected_encoded = int(row["records"]) * ( + 8 + math.ceil(int(row["dimensions"]) * int(row["bits"]) / 8) + ) + if int(row["turboquant_encoded_bytes"]) != expected_encoded: + failures["code_value_size"].append(str(row["cell_id"])) + raw_bytes = int(row["records"]) * int(row["dimensions"]) * 4 + if ( + int(row["bits"]) == 4 + and int(row["dimensions"]) >= 128 + and int(row["turboquant_encoded_bytes"]) > 0.15 * raw_bytes + ): + failures["four_bit_ratio"].append(str(row["cell_id"])) + + auto_scope = [ + row + for row in rows + if row["records"] == 100_000 + and row["dimensions"] in (768, 1_536) + and row["metric"] in runner.FULL_METRICS + and row["requested_k"] == 10 + and row["eligibility_ppm"] == 1_000_000 + and row["bits"] == 4 + and row["rerank_kind"] == "fixed" + and row["rerank_multiplier"] == 8 + and row["environment"] == "memory-warm-sync" + ] + auto_failures = {"build": [], "p95": [], "value": []} + for row in auto_scope: + if float(row["turboquant_build_micros"]) >= float(row["pq_build_micros"]): + auto_failures["build"].append(str(row["cell_id"])) + p95_ratio = float(row["turboquant_search_p95_micros"]) / max( + float(row["pq_search_p95_micros"]), 1e-12 + ) + if float(row["turboquant_recall"]) < 0.95 or p95_ratio > 1.25: + auto_failures["p95"].append(str(row["cell_id"])) + faster = float(row["turboquant_search_p95_micros"]) < float( + row["pq_search_p95_micros"] + ) + smaller = int(row["turboquant_sidecar_bytes"]) <= 0.75 * int( + row["pq_sidecar_bytes"] + ) + recall_gain = float(row["turboquant_recall"]) >= float(row["pq_recall"]) + 0.02 + recall_gain = recall_gain and p95_ratio <= 1.25 + if not (faster or smaller or recall_gain): + auto_failures["value"].append(str(row["cell_id"])) + + forced_pass = bool(default_rows) and not any(failures.values()) + auto_pass = forced_pass and len(auto_scope) == 6 and not any(auto_failures.values()) + return { + "profile": profile, + "matrix_complete": True, + "default_recall_rows": len(default_rows), + "forced_matrix_failures": failures, + "forced_matrix_qualified": forced_pass, + "typed_scalability_failures": len(scalability_failures), + "typed_scalability_failure_cells": [ + str(failure["cell_id"]) for failure in scalability_failures + ], + "auto_scope_rows": len(auto_scope), + "auto_failures": auto_failures, + "auto_qualified": auto_pass, + "release_gates_not_evaluated": [ + "legal/patent disposition", + "repository-wide binding inventory", + "final supported-host release commands", + ], + } + + +def load_matrix( + inputs: Sequence[Path], +) -> tuple[dict[str, object], list[dict[str, object]], list[dict[str, object]]]: + manifests = [read_json(path / "manifest.json") for path in inputs] + contracts = [] + for path, manifest in zip(inputs, manifests, strict=True): + contract = manifest.get("contract") + if not isinstance(contract, dict): + raise SummaryError(f"missing contract in {path / 'manifest.json'}") + contracts.append(contract) + ordered_contracts = validate_contract_set(contracts) + path_by_index = { + int(contract["shard_index"]): path for path, contract in zip(inputs, contracts, strict=True) + } + profile = str(ordered_contracts[0]["profile"]) + revision = str(ordered_contracts[0]["revision"]) + workers = tuple(int(value) for value in ordered_contracts[0]["workers"]) + repeats = int(ordered_contracts[0]["search_repeats"]) + raw_limit = ordered_contracts[0].get("max_cell_records") + max_cell_records = None if raw_limit is None else int(raw_limit) + all_cells = runner.enumerate_cells(profile) + summaries = [] + scalability_failures = [] + for contract in ordered_contracts: + index = int(contract["shard_index"]) + shard_count = int(contract["shard_count"]) + path = path_by_index[index] + expected_cells = runner.shard_cells(all_cells, index, shard_count) + expected_contract = runner.make_contract( + profile, + revision, + workers, + repeats, + index, + shard_count, + all_cells, + expected_cells, + max_cell_records, + ) + if contract != expected_contract: + raise SummaryError(f"shard {index} manifest differs from the canonical contract") + status = read_json(path / "status.json") + if status.get("complete") is not True or status.get("completed_cells") != len( + expected_cells + ): + raise SummaryError(f"shard {index} is not complete") + expected_failure_count = sum( + runner.expected_scalability_failure(cell, max_cell_records) is not None + for cell in expected_cells + ) + if status.get("typed_scalability_failures") != expected_failure_count: + raise SummaryError( + f"shard {index} typed scalability failure count mismatch" + ) + if index == 0: + try: + runner.wasm_smoke_is_valid(path, revision) + except runner.QualificationError as error: + raise SummaryError(str(error)) from error + benchmark_cells = [ + cell + for cell in expected_cells + if runner.expected_scalability_failure(cell, max_cell_records) is None + ] + expected_names = {f"{cell.identifier}.csv" for cell in benchmark_cells} + actual_names = {entry.name for entry in (path / "raw").glob("*.csv")} + if actual_names != expected_names: + raise SummaryError( + f"shard {index} raw cell set mismatch missing={sorted(expected_names - actual_names)} " + f"unexpected={sorted(actual_names - expected_names)}" + ) + expected_state_names = {f"{cell.identifier}.json" for cell in expected_cells} + actual_state_names = {entry.name for entry in (path / "state").glob("*.json")} + if actual_state_names != expected_state_names: + raise SummaryError( + f"shard {index} state set mismatch " + f"missing={sorted(expected_state_names - actual_state_names)} " + f"unexpected={sorted(actual_state_names - expected_state_names)}" + ) + for cell in expected_cells: + try: + runner.completed_cell_is_valid( + path, + cell, + revision, + workers, + repeats, + max_cell_records, + ) + failure = runner.expected_scalability_failure(cell, max_cell_records) + if failure is not None: + scalability_failures.append( + {"cell_id": cell.identifier, **failure} + ) + continue + raw = (path / "raw" / f"{cell.identifier}.csv").read_text(encoding="utf-8") + parsed = runner.validate_output(raw, cell, revision, workers, repeats) + except (OSError, runner.QualificationError) as error: + raise SummaryError(str(error)) from error + summary = summarize_cell(cell, parsed, workers) + base_build = "turboquant_build_async" if cell.environment.async_quantizers else "turboquant_build" + summary["_transformed_components"] = int( + worker_value(parsed, base_build, max(workers), 4) + ) + summaries.append(summary) + dispositions = len(summaries) + len(scalability_failures) + if dispositions != len(all_cells): + raise SummaryError(f"validated {dispositions} cells, expected {len(all_cells)}") + return ordered_contracts[0], summaries, scalability_failures + + +def write_summary( + output: Path, + contract: dict[str, object], + rows: list[dict[str, object]], + scalability_failures: list[dict[str, object]], +) -> None: + if output.exists() and any(output.iterdir()): + raise SummaryError(f"refusing to overwrite non-empty summary output: {output}") + output.mkdir(parents=True, exist_ok=True) + buffer = io.StringIO() + writer = csv.DictWriter(buffer, fieldnames=SUMMARY_FIELDS, extrasaction="ignore") + writer.writeheader() + writer.writerows(rows) + runner.atomic_write(output / "summary.csv", buffer.getvalue()) + runner.write_json(output / "scalability-failures.json", scalability_failures) + gates = evaluate_gates(rows, str(contract["profile"]), scalability_failures) + runner.write_json(output / "gates.json", gates) + failed_forced = sum(len(value) for value in gates.get("forced_matrix_failures", {}).values()) + failed_auto = sum(len(value) for value in gates.get("auto_failures", {}).values()) + report = f"""# TurboQuant qualification summary + +- Revision: `{contract['revision']}` +- Profile: `{contract['profile']}` +- Validated matrix dispositions: {len(rows) + len(scalability_failures)} +- Completed benchmark cells: {len(rows)} +- Typed scalability failures: {len(scalability_failures)} +- Matrix contract: `{contract['full_matrix_digest']}` +- Forced-backend matrix gates: {'PASS' if gates['forced_matrix_qualified'] else 'NOT QUALIFIED'} +- Auto gates: {'PASS' if gates['auto_qualified'] else 'NOT QUALIFIED'} +- Forced matrix failures: {failed_forced} +- Auto failures: {failed_auto} + +This report covers benchmark-matrix gates only. Legal/patent disposition, +repository-wide binding inventory, and final supported-host release commands +remain independent release gates and are never inferred from benchmark data. +""" + runner.atomic_write(output / "report.md", report) + + +def main(argv: Sequence[str] | None = None) -> int: + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--input", type=Path, nargs="+", required=True) + parser.add_argument("--output", type=Path, required=True) + args = parser.parse_args(argv) + contract, rows, scalability_failures = load_matrix( + [path.resolve() for path in args.input] + ) + write_summary(args.output.resolve(), contract, rows, scalability_failures) + print( + f"validated {len(rows) + len(scalability_failures)} TurboQuant cells " + f"({len(scalability_failures)} typed scalability failures) " + f"into {args.output.resolve()}" + ) + return 0 + + +if __name__ == "__main__": + try: + raise SystemExit(main()) + except SummaryError as error: + print(f"error: {error}", file=sys.stderr) + raise SystemExit(2) from error diff --git a/scripts/tests/test_binding_api_inventory.py b/scripts/tests/test_binding_api_inventory.py index 24b94500..ea38bf46 100644 --- a/scripts/tests/test_binding_api_inventory.py +++ b/scripts/tests/test_binding_api_inventory.py @@ -444,6 +444,18 @@ def test_gap_report_separates_runtime_operations_from_other_debt(self) -> None: def test_abstraction_review_classifies_without_claiming_implementation(self) -> None: items = { + "prolly::AsyncIndexedStore": ApiItem( + rust="prolly::AsyncIndexedStore", + kind="trait", + owner=None, + member_kind=None, + ), + "prolly::IndexedStore": ApiItem( + rust="prolly::IndexedStore", + kind="trait", + owner=None, + member_kind=None, + ), "prolly::Store": ApiItem( rust="prolly::Store", kind="trait", @@ -489,6 +501,12 @@ def test_abstraction_review_classifies_without_claiming_implementation(self) -> self.assertEqual(entries["prolly::Store"]["equivalence"], "store-trait") self.assertEqual(entries["prolly::Store"]["classification"], "idiomatic") self.assertEqual(entries["prolly::Store"]["audience"], "rust-extension") + self.assertEqual( + entries["prolly::AsyncIndexedStore"]["equivalence"], "store-trait" + ) + self.assertEqual( + entries["prolly::IndexedStore"]["equivalence"], "store-trait" + ) self.assertEqual( entries["prolly::Store::Error"]["equivalence"], "marker-and-associated-type", diff --git a/scripts/tests/test_dynamodb_security_policies.py b/scripts/tests/test_dynamodb_security_policies.py index 1176be77..56f986c9 100644 --- a/scripts/tests/test_dynamodb_security_policies.py +++ b/scripts/tests/test_dynamodb_security_policies.py @@ -6,7 +6,7 @@ ROOT = Path(__file__).resolve().parents[2] PROVIDER = ROOT / "stores" / "prolly-store-dynamodb" / "src" / "lib.rs" -POLICIES = ROOT / "dynamodb" / "client" / "deploy" / "aws" +POLICIES = ROOT / "extensions" / "dynamodb" / "client" / "deploy" / "aws" SDK_CALLS = { "batch_get_item": "dynamodb:BatchGetItem", diff --git a/scripts/tests/test_run_turboquant_qualification.py b/scripts/tests/test_run_turboquant_qualification.py new file mode 100644 index 00000000..5fd479ec --- /dev/null +++ b/scripts/tests/test_run_turboquant_qualification.py @@ -0,0 +1,281 @@ +import importlib.util +import json +from pathlib import Path +import sys +import tempfile +import unittest + + +SCRIPT = Path(__file__).resolve().parents[1] / "run_turboquant_qualification.py" +SPEC = importlib.util.spec_from_file_location("run_turboquant_qualification", SCRIPT) +qualification = importlib.util.module_from_spec(SPEC) +assert SPEC.loader is not None +sys.modules[SPEC.name] = qualification +SPEC.loader.exec_module(qualification) + + +def valid_output(cell, revision="a" * 40, workers=(1, 2, 4), repeats=2): + preamble = qualification._expected_preamble(cell, revision, repeats) + preamble.update( + { + "compiler": "rustc test", + "target_arch": "test", + "target_os": "test", + "machine": "test", + "seed": "0", + } + ) + lines = ["prolly proximity benchmark"] + lines.extend(f"{key}={value}" for key, value in preamble.items()) + lines.append("operation,dimensions,threads,micros,metric_a,metric_b") + counts = qualification._required_operation_counts( + cell.environment.async_quantizers, workers + ) + worker_operations = { + "turboquant_build", + "turboquant_build_resources", + "pq_build", + "turboquant_build_async", + "turboquant_build_async_resources", + "turboquant_build_async_publication", + "pq_build_async", + "pq_build_async_publication", + } + for operation, count in counts.items(): + operation_workers = workers if operation in worker_operations else (0,) * count + for worker in operation_workers: + metric_a = "1.0" if "recall" in operation else "10" + physical = "2" if cell.environment.cold else "0" + metric_b = physical if operation.endswith(("_p95", "_io")) else "20" + lines.append( + f"{operation},{cell.dimensions},{worker},1.0,{metric_a},{metric_b}" + ) + return "\n".join(lines) + "\n" + + +class TurboQuantQualificationTests(unittest.TestCase): + def test_full_matrix_is_complete_and_deterministic(self): + first = qualification.enumerate_cells("full") + second = qualification.enumerate_cells("full") + self.assertEqual(len(first), 45_360) + self.assertEqual(first, second) + self.assertEqual(len({cell.identifier for cell in first}), len(first)) + self.assertEqual( + {cell.records for cell in first}, {1_000, 10_000, 100_000, 1_000_000} + ) + self.assertTrue(any(cell.rerank == "exhaustive" for cell in first)) + self.assertFalse( + any(cell.rerank == "exhaustive" and cell.records > 10_000 for cell in first) + ) + + def test_hash_shards_are_disjoint_and_cover_matrix(self): + cells = qualification.enumerate_cells("smoke") + shards = [qualification.shard_cells(cells, index, 3) for index in range(3)] + identifiers = [{cell.identifier for cell in shard} for shard in shards] + self.assertEqual(set.union(*identifiers), {cell.identifier for cell in cells}) + self.assertFalse(identifiers[0] & identifiers[1]) + self.assertFalse(identifiers[0] & identifiers[2]) + self.assertFalse(identifiers[1] & identifiers[2]) + + def test_resume_requires_exact_contract(self): + cells = qualification.enumerate_cells("smoke") + contract = qualification.make_contract( + "smoke", "a" * 40, (1, 2, 4), 2, 0, 1, cells, cells + ) + with tempfile.TemporaryDirectory() as directory: + output = Path(directory) + qualification.prepare_output(output, contract, False) + qualification.prepare_output(output, contract, True) + changed = dict(contract) + changed["revision"] = "b" * 40 + with self.assertRaises(qualification.QualificationError): + qualification.prepare_output(output, changed, True) + manifest = json.loads((output / "manifest.json").read_text()) + self.assertEqual(manifest["contract"], contract) + + def test_output_validator_accepts_complete_sync_and_async_cells(self): + revision = "a" * 40 + for cell in qualification.enumerate_cells("smoke"): + qualification.validate_output(valid_output(cell), cell, revision, (1, 2, 4), 2) + + def test_warm_validation_allows_bounded_cache_eviction_io(self): + revision = "a" * 40 + cell = next( + cell + for cell in qualification.enumerate_cells("smoke") + if not cell.environment.cold and not cell.environment.async_quantizers + ) + output = valid_output(cell).replace( + f"turboquant_search_scalar_p95,{cell.dimensions},0,1.0,10,0", + f"turboquant_search_scalar_p95,{cell.dimensions},0,1.0,10,2", + ) + qualification.validate_output(output, cell, revision, (1, 2, 4), 2) + + def test_cold_validation_requires_physical_io(self): + revision = "a" * 40 + cell = next( + cell + for cell in qualification.enumerate_cells("smoke") + if cell.environment.cold and not cell.environment.async_quantizers + ) + output = valid_output(cell).replace( + f"turboquant_search_scalar_p95,{cell.dimensions},0,1.0,10,2", + f"turboquant_search_scalar_p95,{cell.dimensions},0,1.0,10,0", + ) + with self.assertRaisesRegex( + qualification.QualificationError, "cold .* has no physical I/O" + ): + qualification.validate_output(output, cell, revision, (1, 2, 4), 2) + + def test_output_validator_rejects_negative_counters(self): + revision = "a" * 40 + cell = qualification.enumerate_cells("smoke")[0] + output = valid_output(cell).replace( + f"source_build,{cell.dimensions},0,1.0,10,20", + f"source_build,{cell.dimensions},0,1.0,-1,20", + ) + with self.assertRaisesRegex(qualification.QualificationError, "invalid CSV row"): + qualification.validate_output(output, cell, revision, (1, 2, 4), 2) + + def test_output_validator_rejects_missing_rows_and_wrong_provenance(self): + cell = qualification.enumerate_cells("smoke")[0] + output = valid_output(cell) + with self.assertRaises(qualification.QualificationError): + qualification.validate_output( + output.replace( + f"dataset={qualification.BENCH_DATASET}", "dataset=superseded" + ), + cell, + "a" * 40, + (1, 2, 4), + 2, + ) + with self.assertRaises(qualification.QualificationError): + qualification.validate_output( + output.replace("revision=" + "a" * 40, "revision=" + "b" * 40), + cell, + "a" * 40, + (1, 2, 4), + 2, + ) + with self.assertRaises(qualification.QualificationError): + qualification.validate_output( + "\n".join( + line + for line in output.splitlines() + if not line.startswith("pq_recall,") + ), + cell, + "a" * 40, + (1, 2, 4), + 2, + ) + + def test_resume_revalidates_digest_and_rows(self): + cell = qualification.enumerate_cells("smoke")[0] + revision = "a" * 40 + raw = valid_output(cell) + with tempfile.TemporaryDirectory() as directory: + output = Path(directory) + qualification.atomic_write(output / "raw" / f"{cell.identifier}.csv", raw) + qualification.write_json( + output / "state" / f"{cell.identifier}.json", + { + "cell": qualification.asdict(cell), + "disposition": "completed", + "sha256": qualification.hashlib.sha256(raw.encode()).hexdigest(), + }, + ) + self.assertTrue( + qualification.completed_cell_is_valid( + output, cell, revision, (1, 2, 4), 2 + ) + ) + qualification.atomic_write( + output / "raw" / f"{cell.identifier}.csv", raw + "corruption\n" + ) + with self.assertRaises(qualification.QualificationError): + qualification.completed_cell_is_valid( + output, cell, revision, (1, 2, 4), 2 + ) + + def test_typed_scalability_failure_is_exact_resumable_evidence(self): + cell = next( + cell + for cell in qualification.enumerate_cells("full") + if cell.records == 1_000_000 + ) + failure = qualification.expected_scalability_failure(cell, 100_000) + self.assertEqual( + failure, + { + "kind": "ProximityResourceLimitExceeded", + "resource": "TurboQuant records", + "limit": 100_000, + "actual": 1_000_000, + "phase": "qualification preflight", + }, + ) + self.assertIsNone(qualification.expected_scalability_failure(cell, None)) + with tempfile.TemporaryDirectory() as directory: + output = Path(directory) + qualification.record_scalability_failure(output, cell, 100_000) + self.assertTrue( + qualification.completed_cell_is_valid( + output, + cell, + "a" * 40, + (1, 2, 4), + 30, + 100_000, + ) + ) + with self.assertRaises(qualification.QualificationError): + qualification.completed_cell_is_valid( + output, + cell, + "a" * 40, + (1, 2, 4), + 30, + None, + ) + + def test_wasm_resume_requires_revision_digest_and_unskipped_pass(self): + revision = "a" * 40 + test_log = "# tests 2\n# pass 2\n# fail 0\n# skipped 0\n" + build_log = "build complete\n" + with tempfile.TemporaryDirectory() as directory: + output = Path(directory) + qualification.atomic_write(output / "wasm" / "build.log", build_log) + qualification.atomic_write(output / "wasm" / "test.log", test_log) + qualification.write_json( + output / "wasm" / "status.json", + { + "build_sha256": qualification.hashlib.sha256( + build_log.encode() + ).hexdigest(), + "commands": [["npm", "run", "build"], ["npm", "test"]], + "revision": revision, + "test_sha256": qualification.hashlib.sha256( + test_log.encode() + ).hexdigest(), + }, + ) + self.assertTrue(qualification.wasm_smoke_is_valid(output, revision)) + with self.assertRaises(qualification.QualificationError): + qualification.wasm_smoke_is_valid(output, "b" * 40) + qualification.atomic_write( + output / "wasm" / "test.log", + "# tests 2\n# pass 1\n# fail 0\n# skipped 1\n", + ) + with self.assertRaises(qualification.QualificationError): + qualification.wasm_smoke_is_valid(output, revision) + + def test_tap_summary_accepts_node_spec_and_dot_reporters(self): + self.assertTrue(qualification._tap_summary_is_zero("# fail 0\n", "fail")) + self.assertTrue(qualification._tap_summary_is_zero("ℹ skipped 0\n", "skipped")) + self.assertFalse(qualification._tap_summary_is_zero("ℹ fail 1\n", "fail")) + + +if __name__ == "__main__": + unittest.main() diff --git a/scripts/tests/test_summarize_turboquant_qualification.py b/scripts/tests/test_summarize_turboquant_qualification.py new file mode 100644 index 00000000..ede0d2c1 --- /dev/null +++ b/scripts/tests/test_summarize_turboquant_qualification.py @@ -0,0 +1,166 @@ +import importlib.util +from pathlib import Path +import sys +import tempfile +import unittest +from unittest import mock + + +SCRIPT = Path(__file__).resolve().parents[1] / "summarize_turboquant_qualification.py" +SPEC = importlib.util.spec_from_file_location("summarize_turboquant_qualification", SCRIPT) +summary = importlib.util.module_from_spec(SPEC) +assert SPEC.loader is not None +sys.modules[SPEC.name] = summary +SPEC.loader.exec_module(summary) + + +class TurboQuantSummaryTests(unittest.TestCase): + def contracts(self, shard_count=3): + cells = summary.runner.enumerate_cells("smoke") + contracts = [] + for index in range(shard_count): + selected = summary.runner.shard_cells(cells, index, shard_count) + contracts.append( + summary.runner.make_contract( + "smoke", + "a" * 40, + (1, 2, 4), + 2, + index, + shard_count, + cells, + selected, + ) + ) + return contracts + + def test_contract_set_requires_every_unique_matching_shard(self): + contracts = self.contracts() + self.assertEqual( + [contract["shard_index"] for contract in summary.validate_contract_set(contracts)], + [0, 1, 2], + ) + with self.assertRaises(summary.SummaryError): + summary.validate_contract_set(contracts[:2]) + with self.assertRaises(summary.SummaryError): + summary.validate_contract_set([contracts[0], contracts[0], contracts[2]]) + changed = dict(contracts[1]) + changed["revision"] = "b" * 40 + with self.assertRaises(summary.SummaryError): + summary.validate_contract_set([contracts[0], changed, contracts[2]]) + + def auto_rows(self): + rows = [] + for dimensions in (768, 1536): + for metric in summary.runner.FULL_METRICS: + records = 100_000 + rows.append( + { + "cell_id": f"{dimensions}-{metric}", + "records": records, + "dimensions": dimensions, + "metric": metric, + "requested_k": 10, + "effective_k": 10, + "eligibility_ppm": 1_000_000, + "bits": 4, + "rerank_kind": "fixed", + "rerank_multiplier": 8, + "environment": "memory-warm-sync", + "turboquant_recall": 0.98, + "pq_recall": 0.98, + "turboquant_candidate_peak": 80, + "_transformed_components": records * dimensions, + "turboquant_encoded_bytes": records + * (8 + (dimensions * 4 + 7) // 8), + "turboquant_build_micros": 90.0, + "pq_build_micros": 100.0, + "turboquant_search_p95_micros": 90.0, + "pq_search_p95_micros": 100.0, + "turboquant_sidecar_bytes": 70, + "pq_sidecar_bytes": 100, + } + ) + return rows + + def test_gate_evaluation_separates_forced_and_auto_results(self): + gates = summary.evaluate_gates(self.auto_rows(), "full") + self.assertTrue(gates["forced_matrix_qualified"]) + self.assertTrue(gates["auto_qualified"]) + self.assertEqual(gates["auto_scope_rows"], 6) + + rows = self.auto_rows() + rows[0]["turboquant_recall"] = 0.90 + failed = summary.evaluate_gates(rows, "full") + self.assertFalse(failed["forced_matrix_qualified"]) + self.assertFalse(failed["auto_qualified"]) + self.assertEqual(failed["forced_matrix_failures"]["recall_floor"], ["768-l2"]) + + def test_smoke_never_claims_ga_or_auto_qualification(self): + gates = summary.evaluate_gates([], "smoke") + self.assertTrue(gates["matrix_complete"]) + self.assertFalse(gates["forced_matrix_qualified"]) + self.assertFalse(gates["auto_qualified"]) + + def test_typed_one_million_scalability_failure_is_reported_separately(self): + failure = { + "cell_id": "one-million-cell", + "kind": "ProximityResourceLimitExceeded", + "resource": "TurboQuant records", + "limit": 100_000, + "actual": 1_000_000, + "phase": "qualification preflight", + } + gates = summary.evaluate_gates(self.auto_rows(), "full", [failure]) + self.assertTrue(gates["forced_matrix_qualified"]) + self.assertTrue(gates["auto_qualified"]) + self.assertEqual(gates["typed_scalability_failures"], 1) + self.assertEqual( + gates["typed_scalability_failure_cells"], ["one-million-cell"] + ) + + def test_matrix_loader_validates_typed_scalability_disposition_without_csv(self): + revision = "a" * 40 + cell = next( + cell + for cell in summary.runner.enumerate_cells("full") + if cell.records == 1_000_000 + ) + contract = summary.runner.make_contract( + "full", + revision, + (1,), + 1, + 0, + 1, + [cell], + [cell], + 100_000, + ) + with tempfile.TemporaryDirectory() as directory: + shard = Path(directory) + summary.runner.write_json(shard / "manifest.json", {"contract": contract}) + summary.runner.record_scalability_failure(shard, cell, 100_000) + summary.runner.write_json( + shard / "status.json", + { + "complete": True, + "completed_cells": 1, + "typed_scalability_failures": 1, + }, + ) + with mock.patch.object( + summary.runner, "enumerate_cells", return_value=[cell] + ), mock.patch.object( + summary.runner, "wasm_smoke_is_valid", return_value=True + ): + loaded_contract, rows, failures = summary.load_matrix([shard]) + self.assertEqual(loaded_contract, contract) + self.assertEqual(rows, []) + self.assertEqual(len(failures), 1) + self.assertEqual(failures[0]["cell_id"], cell.identifier) + self.assertFalse((shard / "raw").exists()) + + +if __name__ == "__main__": + unittest.main() diff --git a/scripts/tests/test_verify_dynamodb_client_packages.py b/scripts/tests/test_verify_dynamodb_client_packages.py index 701ccf85..8aaa76e4 100644 --- a/scripts/tests/test_verify_dynamodb_client_packages.py +++ b/scripts/tests/test_verify_dynamodb_client_packages.py @@ -33,10 +33,11 @@ def test_archive_verifier_is_locked_with_scoped_offline_substitution(self): self.assertGreaterEqual(script.count(" --locked \\\n"), 2) self.assertIn("CARGO_NET_OFFLINE=true cargo update", script) self.assertIn("--offline", script) - self.assertIn( - "registry+https://github.com/rust-lang/crates.io-index#prolly-map@0.7.0", - script, - ) + self.assertIn("package_version()", script) + self.assertIn('map_registry_package="registry+', script) + self.assertIn('--package "${map_registry_package}"', script) + self.assertNotIn("prolly-map-0.7.0", script) + self.assertNotIn("prolly-store-dynamodb-0.6.0", script) self.assertIn("CARGO_INCREMENTAL=0", script) self.assertIn("CARGO_PROFILE_TEST_DEBUG=0", script) diff --git a/scripts/turboquant_dense_reference.py b/scripts/turboquant_dense_reference.py new file mode 100644 index 00000000..70744b07 --- /dev/null +++ b/scripts/turboquant_dense_reference.py @@ -0,0 +1,517 @@ +#!/usr/bin/env -S uv run --script +# /// script +# requires-python = ">=3.11" +# dependencies = [ +# "numpy>=2.3,<3", +# ] +# /// +"""Compare Prolly's structured TurboQuant rotation with the paper reference. + +This is development-only qualification code. It constructs the dense random +rotation described by Algorithm 1 of arXiv:2504.19874 by QR-decomposing an +i.i.d. standard-normal matrix. It independently reproduces Prolly's frozen +structured transform, uses the checked-in Lloyd-Max tables, and reports +distortion plus exhaustive-oracle recall for both rotations. + +The script is deliberately outside the production crate: NumPy/BLAS behavior +is evidence, not wire-format behavior. No generated value is loaded by the +runtime and no third-party TurboQuant implementation is used. +""" + +from __future__ import annotations + +import argparse +import hashlib +import json +import math +import os +import platform +import struct +import subprocess +import sys +import time +from dataclasses import dataclass +from pathlib import Path +from typing import Any, Iterable + +import numpy as np + + +ROOT = Path(__file__).resolve().parents[1] +FIXTURES = ROOT / "conformance/proximity-fixtures.json" +DEFAULT_DIMENSIONS = (128, 200, 768, 1536, 3072) +PERMUTATION_DOMAIN = 0x5451_5045_524D_0001 +SIGN_DOMAIN = 0x5451_5349_474E_0001 +MASK64 = (1 << 64) - 1 + + +class SplitMix64: + """Frozen SplitMix64V1 stream used by the production transform.""" + + def __init__(self, state: int) -> None: + self.state = state & MASK64 + + def next(self) -> int: + self.state = (self.state + 0x9E37_79B9_7F4A_7C15) & MASK64 + value = self.state + value = ((value ^ (value >> 30)) * 0xBF58_476D_1CE4_E5B9) & MASK64 + value = ((value ^ (value >> 27)) * 0x94D0_49BB_1331_11EB) & MASK64 + return (value ^ (value >> 31)) & MASK64 + + +def multiply_high(left: int, right: int) -> int: + return (left * right) >> 64 + + +def sqrt_down(value: float) -> float: + """Match the production square-root direction for ordinary positive inputs.""" + + candidate = math.sqrt(value) + while candidate * candidate > value: + candidate = math.nextafter(candidate, -math.inf) + while True: + following = math.nextafter(candidate, math.inf) + if following * following <= value: + candidate = following + else: + return candidate + + +@dataclass(frozen=True) +class StructuredRound: + permutation: np.ndarray + signs: np.ndarray + + +class StructuredRotation: + """Independent Python reproduction of STRUCTURED_ROTATION_ID=1.""" + + def __init__(self, dimensions: int, seed: int) -> None: + if not 8 <= dimensions <= 16_384 or dimensions % 8: + raise ValueError("dimensions must be in 8..=16384 and divisible by eight") + self.dimensions = dimensions + self.block_width = dimensions & -dimensions + self.normalization = 1.0 / sqrt_down(float(self.block_width)) + domain_dimensions = (dimensions << 16) & MASK64 + rounds: list[StructuredRound] = [] + for round_index in range(2): + permutation = list(range(dimensions)) + permutation_stream = SplitMix64( + seed ^ PERMUTATION_DOMAIN ^ domain_dimensions ^ round_index + ) + for index in range(dimensions - 1, 0, -1): + selected = multiply_high(permutation_stream.next(), index + 1) + permutation[index], permutation[selected] = ( + permutation[selected], + permutation[index], + ) + sign_stream = SplitMix64( + seed ^ SIGN_DOMAIN ^ domain_dimensions ^ round_index + ) + signs = [1.0 if sign_stream.next() & 1 == 0 else -1.0 for _ in range(dimensions)] + rounds.append( + StructuredRound( + np.asarray(permutation, dtype=np.int64), + np.asarray(signs, dtype=np.float64), + ) + ) + self.rounds = tuple(rounds) + + def apply_rows(self, values: np.ndarray) -> np.ndarray: + if values.ndim != 2 or values.shape[1] != self.dimensions: + raise ValueError("structured rotation input has the wrong shape") + current = np.asarray(values, dtype=np.float64).copy() + for round_plan in self.rounds: + # Advanced column indexing can produce a Fortran-strided matrix. + # Force row-major storage so the block reshape below remains a + # view; otherwise the Hadamard writes would modify a temporary. + current = np.ascontiguousarray( + current[:, round_plan.permutation] * round_plan.signs + ) + blocks = current.reshape(-1, self.block_width) + width = 1 + while width < self.block_width: + for start in range(0, self.block_width, width * 2): + left = blocks[:, start : start + width].copy() + right = blocks[:, start + width : start + width * 2].copy() + blocks[:, start : start + width] = left + right + blocks[:, start + width : start + width * 2] = left - right + width *= 2 + current *= self.normalization + current[current == 0.0] = 0.0 + return current + + +def parse_dimensions(value: str) -> tuple[int, ...]: + dimensions = tuple(int(item) for item in value.split(",") if item) + if not dimensions: + raise argparse.ArgumentTypeError("at least one dimension is required") + for dimension in dimensions: + if not 8 <= dimension <= 16_384 or dimension % 8: + raise argparse.ArgumentTypeError( + f"unsupported dimension {dimension}; expected 8..16384 divisible by eight" + ) + return dimensions + + +def bits_to_float(text: str) -> float: + return struct.unpack(">d", bytes.fromhex(text))[0] + + +def frozen_rotation_input(dimensions: int) -> np.ndarray: + stream = SplitMix64(0x5451_4649_5854_0001) + values: list[float] = [] + for _ in range(dimensions): + draw = stream.next() + sign = draw & (1 << 63) + fraction = draw & ((1 << 52) - 1) + bits = sign | 0x3FE0_0000_0000_0000 | fraction + values.append(struct.unpack(" dict[int, tuple[np.ndarray, np.ndarray]]: + fixture = json.loads(FIXTURES.read_text())["turboquant"]["codebooks"] + return { + int(bit_width): ( + np.asarray([bits_to_float(value) for value in table["threshold_bits"]]), + np.asarray([bits_to_float(value) for value in table["centroid_bits"]]), + ) + for bit_width, table in fixture.items() + } + + +def verify_structured_fixtures() -> None: + """Prove that the independent implementation reaches the frozen bytes.""" + + fixture = json.loads(FIXTURES.read_text())["turboquant"] + stream = SplitMix64(0) + actual_stream = [f"{stream.next():016x}" for _ in fixture["splitmix64_seed_zero"]] + if actual_stream != fixture["splitmix64_seed_zero"]: + raise RuntimeError("SplitMix64 reproduction does not match frozen fixtures") + for dimensions_text, expected in fixture["rotation"].items(): + dimensions = int(dimensions_text) + rotation = StructuredRotation(dimensions, 0x5EED) + plan_bytes = bytearray() + for round_plan in rotation.rounds: + for index in round_plan.permutation.tolist(): + plan_bytes.extend(struct.pack(" 0 else 255 for sign in round_plan.signs) + if hashlib.sha256(plan_bytes).hexdigest() != expected["plan_sha256"]: + raise RuntimeError(f"structured plan mismatch at dimension {dimensions}") + input_values = frozen_rotation_input(dimensions) + input_bytes = b"".join( + struct.pack(" np.ndarray: + """Return the sign-canonicalized Q from an i.i.d. Gaussian matrix.""" + + generator = np.random.Generator(np.random.PCG64(seed)) + gaussian = generator.standard_normal((dimensions, dimensions), dtype=np.float64) + orthogonal, upper = np.linalg.qr(gaussian) + diagonal_sign = np.where(np.diag(upper) < 0.0, -1.0, 1.0) + orthogonal *= diagonal_sign + return orthogonal + + +def deterministic_dataset( + dimensions: int, records: int, queries: int, seed: int +) -> tuple[np.ndarray, np.ndarray]: + generator = np.random.Generator(np.random.PCG64(seed ^ (dimensions << 17))) + sources = generator.standard_normal((records, dimensions), dtype=np.float64) + query_values = generator.standard_normal((queries, dimensions), dtype=np.float64) + + # Add deterministic near-neighbour structure. This prevents recall from + # measuring only accidental extremes in an isotropic cloud. + anchors = min(queries, records) + sources[:anchors] = query_values[:anchors] + generator.standard_normal( + (anchors, dimensions), dtype=np.float64 + ) * 0.05 + return sources, query_values + + +def quantized_reconstruction( + rotated_unit: np.ndarray, + thresholds: np.ndarray, + centroids: np.ndarray, +) -> tuple[np.ndarray, np.ndarray]: + dimensions = rotated_unit.shape[1] + scaled = rotated_unit * math.sqrt(dimensions) + # side="left" freezes the production rule that threshold equality selects + # the lower code. + codes = np.searchsorted(thresholds, scaled, side="left") + reconstructed = centroids[codes] / math.sqrt(dimensions) + errors = np.sum((rotated_unit - reconstructed) ** 2, axis=1) + return reconstructed, errors + + +def exact_scores(metric: str, sources: np.ndarray, query: np.ndarray) -> np.ndarray: + if metric == "l2": + delta = sources - query + return np.einsum("ij,ij->i", delta, delta) + dot = sources @ query + if metric == "cosine": + return 1.0 - np.clip(dot, -1.0, 1.0) + return -dot + + +def approximate_scores( + metric: str, + source_norms: np.ndarray, + reconstructed: np.ndarray, + rotated_query: np.ndarray, +) -> np.ndarray: + dot = source_norms * (reconstructed @ rotated_query) + if metric == "l2": + query_norm_squared = float(rotated_query @ rotated_query) + return np.maximum(query_norm_squared + source_norms**2 - 2.0 * dot, 0.0) + if metric == "cosine": + return 1.0 - np.clip(dot, -1.0, 1.0) + return -dot + + +def stable_smallest( + scores: np.ndarray, count: int, keys: np.ndarray | None = None +) -> np.ndarray: + if keys is None: + keys = np.arange(scores.shape[0], dtype=np.int64) + return np.lexsort((keys, scores))[:count] + + +def recall_rows( + sources: np.ndarray, + queries: np.ndarray, + source_norms: np.ndarray, + reconstructed: np.ndarray, + rotate_queries: Any, + k: int, + rerank_multiplier: int, +) -> dict[str, float]: + result: dict[str, float] = {} + normalized_sources = sources / source_norms[:, None] + normalized_queries = queries / np.linalg.norm(queries, axis=1)[:, None] + shortlist = min(sources.shape[0], max(k, k * rerank_multiplier)) + for metric in ("l2", "cosine", "inner_product"): + per_query: list[float] = [] + metric_sources = normalized_sources if metric == "cosine" else sources + metric_queries = normalized_queries if metric == "cosine" else queries + metric_norms = np.ones_like(source_norms) if metric == "cosine" else source_norms + # Cosine source quantization operates on the already normalized source. + metric_reconstruction = reconstructed + for query in metric_queries: + exact = exact_scores(metric, metric_sources, query) + expected = stable_smallest(exact, k) + rotated_query = rotate_queries(query[None, :])[0] + approximate = approximate_scores( + metric, metric_norms, metric_reconstruction, rotated_query + ) + candidates = stable_smallest(approximate, shortlist) + reranked_local = stable_smallest( + exact[candidates], min(k, len(candidates)), candidates + ) + actual = candidates[reranked_local] + per_query.append(len(set(expected.tolist()) & set(actual.tolist())) / k) + result[metric] = float(np.mean(per_query)) + return result + + +def comparison_for_dimension( + dimensions: int, + records: int, + queries: int, + seed: int, + k: int, + rerank_multiplier: int, + codebooks: dict[int, tuple[np.ndarray, np.ndarray]], +) -> list[dict[str, Any]]: + sources, query_values = deterministic_dataset(dimensions, records, queries, seed) + source_norms = np.linalg.norm(sources, axis=1) + unit_sources = sources / source_norms[:, None] + + structured = StructuredRotation(dimensions, seed) + structured_rotated = structured.apply_rows(unit_sources) + + dense_started = time.perf_counter() + dense = dense_gaussian_qr(dimensions, seed ^ 0xD3E5_E0A1_5EED_0001) + dense_seconds = time.perf_counter() - dense_started + dense_rotated = unit_sources @ dense.T + + rows: list[dict[str, Any]] = [] + for bit_width in (2, 3, 4): + thresholds, centroids = codebooks[bit_width] + structured_reconstruction, structured_errors = quantized_reconstruction( + structured_rotated, thresholds, centroids + ) + dense_reconstruction, dense_errors = quantized_reconstruction( + dense_rotated, thresholds, centroids + ) + structured_recall = recall_rows( + sources, + query_values, + source_norms, + structured_reconstruction, + structured.apply_rows, + k, + rerank_multiplier, + ) + dense_recall = recall_rows( + sources, + query_values, + source_norms, + dense_reconstruction, + lambda values: values @ dense.T, + k, + rerank_multiplier, + ) + rows.append( + { + "dimensions": dimensions, + "bit_width": bit_width, + "records": records, + "queries": queries, + "k": k, + "rerank_multiplier": rerank_multiplier, + "dense_qr_seconds": dense_seconds, + "structured": { + "mean_routing_mse": float(np.mean(structured_errors)), + "maximum_routing_mse": float(np.max(structured_errors)), + "mean_norm_error": float( + np.mean( + np.abs( + np.linalg.norm(structured_rotated, axis=1) - 1.0 + ) + ) + ), + "recall_at_k": structured_recall, + }, + "dense_gaussian_qr": { + "mean_routing_mse": float(np.mean(dense_errors)), + "maximum_routing_mse": float(np.max(dense_errors)), + "mean_norm_error": float( + np.mean(np.abs(np.linalg.norm(dense_rotated, axis=1) - 1.0)) + ), + "recall_at_k": dense_recall, + }, + } + ) + return rows + + +def git_revision() -> str: + return subprocess.run( + ["git", "rev-parse", "HEAD"], + cwd=ROOT, + check=True, + capture_output=True, + text=True, + ).stdout.strip() + + +def file_sha256(path: Path) -> str: + return hashlib.sha256(path.read_bytes()).hexdigest() + + +def write_report(path: Path, report: dict[str, Any]) -> None: + encoded = json.dumps(report, indent=2, sort_keys=True, allow_nan=False) + "\n" + if path == Path("-"): + sys.stdout.write(encoded) + return + path.parent.mkdir(parents=True, exist_ok=True) + path.write_text(encoded) + + +def main() -> None: + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument( + "--dimensions", + type=parse_dimensions, + default=DEFAULT_DIMENSIONS, + help="comma-separated dimensions (default: 128,200,768,1536,3072)", + ) + parser.add_argument("--records", type=int, default=128) + parser.add_argument("--queries", type=int, default=16) + parser.add_argument("--k", type=int, default=10) + parser.add_argument("--rerank-multiplier", type=int, default=8) + parser.add_argument("--seed", type=int, default=0) + parser.add_argument( + "--output", + type=Path, + default=Path("-"), + help="JSON output path or '-' for stdout", + ) + args = parser.parse_args() + if args.records <= 0 or args.queries <= 0: + parser.error("records and queries must be positive") + if args.k <= 0 or args.k > args.records: + parser.error("k must be positive and no greater than records") + if args.rerank_multiplier <= 0: + parser.error("rerank multiplier must be positive") + + started = time.perf_counter() + verify_structured_fixtures() + codebooks = load_codebooks() + rows: list[dict[str, Any]] = [] + for dimensions in args.dimensions: + print(f"dense-reference: dimensions={dimensions}", file=sys.stderr, flush=True) + rows.extend( + comparison_for_dimension( + dimensions, + args.records, + args.queries, + args.seed, + args.k, + args.rerank_multiplier, + codebooks, + ) + ) + report = { + "schema": "prolly-turboquant-dense-reference-v1", + "research_basis": "https://arxiv.org/abs/2504.19874", + "algorithm": ( + "Algorithm 1 dense i.i.d. Gaussian QR rotation compared with " + "Prolly STRUCTURED_ROTATION_ID=1" + ), + "scope": ( + "development qualification only; not production, persistence, " + "wire-format, or Auto-planner input" + ), + "revision": git_revision(), + "generator": { + "path": str(Path(__file__).resolve().relative_to(ROOT)), + "sha256": file_sha256(Path(__file__).resolve()), + }, + "environment": { + "python": sys.version.split()[0], + "numpy": np.__version__, + "platform": platform.platform(), + "machine": platform.machine(), + "processor": platform.processor(), + "logical_cpus": os.cpu_count(), + }, + "parameters": { + "dimensions": list(args.dimensions), + "records": args.records, + "queries": args.queries, + "k": args.k, + "rerank_multiplier": args.rerank_multiplier, + "seed": args.seed, + "dataset_rng": "NumPy PCG64", + "dense_matrix_rng": "NumPy PCG64", + "dense_qr_sign_rule": "multiply Q columns by sign(diag(R))", + }, + "elapsed_seconds": time.perf_counter() - started, + "rows": rows, + } + write_report(args.output, report) + + +if __name__ == "__main__": + main() diff --git a/scripts/verify_dynamodb_client_packages.sh b/scripts/verify_dynamodb_client_packages.sh index 22841946..0a22a6c3 100755 --- a/scripts/verify_dynamodb_client_packages.sh +++ b/scripts/verify_dynamodb_client_packages.sh @@ -26,6 +26,26 @@ trap 'rm -rf -- "${work_dir}"' EXIT package_target="${work_dir}/target" mkdir -p "${package_target}" +package_version() { + cargo metadata \ + --manifest-path "$1" \ + --format-version 1 \ + --no-deps \ + | python3 -c 'import json, sys; print(json.load(sys.stdin)["packages"][0]["version"])' +} + +map_version="$(package_version "${repo_root}/Cargo.toml")" +store_version="$(package_version "${repo_root}/stores/prolly-store-dynamodb/Cargo.toml")" +core_version="$(package_version "${repo_root}/extensions/dynamodb/core/Cargo.toml")" +client_version="$(package_version "${repo_root}/extensions/dynamodb/client/Cargo.toml")" + +map_package="prolly-map-${map_version}" +store_package="prolly-store-dynamodb-${store_version}" +core_package="prolly-dynamodb-core-${core_version}" +client_package="prolly-dynamodb-client-${client_version}" +map_registry_package="registry+https://github.com/rust-lang/crates.io-index#prolly-map@${map_version}" +store_registry_package="registry+https://github.com/rust-lang/crates.io-index#prolly-store-dynamodb@${store_version}" + cargo_package() { if [[ "${allow_dirty}" == "1" ]]; then cargo package "$@" --locked --allow-dirty @@ -58,10 +78,10 @@ for manifest in "${manifests[@]}"; do done archives=( - "${package_target}/package/prolly-map-0.7.0.crate" - "${package_target}/package/prolly-store-dynamodb-0.6.0.crate" - "${package_target}/package/prolly-dynamodb-core-0.1.0.crate" - "${package_target}/package/prolly-dynamodb-client-0.1.0.crate" + "${package_target}/package/${map_package}.crate" + "${package_target}/package/${store_package}.crate" + "${package_target}/package/${core_package}.crate" + "${package_target}/package/${client_package}.crate" ) for archive in "${archives[@]}"; do test -s "${archive}" @@ -70,12 +90,12 @@ done # The durable-format oracle must travel with the semantic core. A repository # test alone cannot protect downstream releases if cargo packaging omits it. -test -s "${work_dir}/prolly-dynamodb-core-0.1.0/tests/fixtures/database-format-10.json" -test -s "${work_dir}/prolly-dynamodb-core-0.1.0/tests/fixtures/database-format-11.json" -test -s "${work_dir}/prolly-dynamodb-core-0.1.0/tests/fixtures/database-format-12.json" +test -s "${work_dir}/${core_package}/tests/fixtures/database-format-10.json" +test -s "${work_dir}/${core_package}/tests/fixtures/database-format-11.json" +test -s "${work_dir}/${core_package}/tests/fixtures/database-format-12.json" for fixture in canonical-v1.json validation-v1.json; do - core_fixture="${work_dir}/prolly-dynamodb-core-0.1.0/tests/fixtures/${fixture}" - client_fixture="${work_dir}/prolly-dynamodb-client-0.1.0/src/fixtures/${fixture}" + core_fixture="${work_dir}/${core_package}/tests/fixtures/${fixture}" + client_fixture="${work_dir}/${client_package}/src/fixtures/${fixture}" test -s "${core_fixture}" test -s "${client_fixture}" cmp --silent "${core_fixture}" "${client_fixture}" @@ -83,7 +103,7 @@ done # The reviewed client API baseline is a release artifact. Packaging must not # silently omit or substitute it. -packaged_public_api="${work_dir}/prolly-dynamodb-client-0.1.0/public-api.txt" +packaged_public_api="${work_dir}/${client_package}/public-api.txt" test -s "${packaged_public_api}" cmp --silent "${repo_root}/extensions/dynamodb/client/public-api.txt" "${packaged_public_api}" @@ -92,32 +112,32 @@ cmp --silent "${repo_root}/extensions/dynamodb/client/public-api.txt" "${package # library consumer cannot observe. package_test_target="${work_dir}/package-test-target" CARGO_NET_OFFLINE=true cargo update \ - --manifest-path "${work_dir}/prolly-dynamodb-core-0.1.0/Cargo.toml" \ + --manifest-path "${work_dir}/${core_package}/Cargo.toml" \ --offline \ - --package 'registry+https://github.com/rust-lang/crates.io-index#prolly-map@0.7.0' \ - --config "patch.crates-io.prolly-map.path='${work_dir}/prolly-map-0.7.0'" + --package "${map_registry_package}" \ + --config "patch.crates-io.prolly-map.path='${work_dir}/${map_package}'" CARGO_TARGET_DIR="${package_test_target}" cargo test \ - --manifest-path "${work_dir}/prolly-dynamodb-core-0.1.0/Cargo.toml" \ + --manifest-path "${work_dir}/${core_package}/Cargo.toml" \ --locked \ --all-targets \ --no-run \ - --config "patch.crates-io.prolly-map.path='${work_dir}/prolly-map-0.7.0'" + --config "patch.crates-io.prolly-map.path='${work_dir}/${map_package}'" CARGO_NET_OFFLINE=true cargo update \ - --manifest-path "${work_dir}/prolly-dynamodb-client-0.1.0/Cargo.toml" \ + --manifest-path "${work_dir}/${client_package}/Cargo.toml" \ --offline \ - --package 'registry+https://github.com/rust-lang/crates.io-index#prolly-map@0.7.0' \ - --package 'registry+https://github.com/rust-lang/crates.io-index#prolly-store-dynamodb@0.6.0' \ - --config "patch.crates-io.prolly-map.path='${work_dir}/prolly-map-0.7.0'" \ - --config "patch.crates-io.prolly-store-dynamodb.path='${work_dir}/prolly-store-dynamodb-0.6.0'" \ - --config "patch.crates-io.prolly-dynamodb-core.path='${work_dir}/prolly-dynamodb-core-0.1.0'" + --package "${map_registry_package}" \ + --package "${store_registry_package}" \ + --config "patch.crates-io.prolly-map.path='${work_dir}/${map_package}'" \ + --config "patch.crates-io.prolly-store-dynamodb.path='${work_dir}/${store_package}'" \ + --config "patch.crates-io.prolly-dynamodb-core.path='${work_dir}/${core_package}'" CARGO_TARGET_DIR="${package_test_target}" cargo test \ - --manifest-path "${work_dir}/prolly-dynamodb-client-0.1.0/Cargo.toml" \ + --manifest-path "${work_dir}/${client_package}/Cargo.toml" \ --locked \ --all-targets \ --no-run \ - --config "patch.crates-io.prolly-map.path='${work_dir}/prolly-map-0.7.0'" \ - --config "patch.crates-io.prolly-store-dynamodb.path='${work_dir}/prolly-store-dynamodb-0.6.0'" \ - --config "patch.crates-io.prolly-dynamodb-core.path='${work_dir}/prolly-dynamodb-core-0.1.0'" + --config "patch.crates-io.prolly-map.path='${work_dir}/${map_package}'" \ + --config "patch.crates-io.prolly-store-dynamodb.path='${work_dir}/${store_package}'" \ + --config "patch.crates-io.prolly-dynamodb-core.path='${work_dir}/${core_package}'" consumer="${work_dir}/consumer" mkdir -p "${consumer}/src" @@ -129,12 +149,12 @@ edition = "2021" publish = false [dependencies] -prolly-dynamodb-client = { path = "${work_dir}/prolly-dynamodb-client-0.1.0" } +prolly-dynamodb-client = { path = "${work_dir}/${client_package}" } [patch.crates-io] -prolly-map = { path = "${work_dir}/prolly-map-0.7.0" } -prolly-store-dynamodb = { path = "${work_dir}/prolly-store-dynamodb-0.6.0" } -prolly-dynamodb-core = { path = "${work_dir}/prolly-dynamodb-core-0.1.0" } +prolly-map = { path = "${work_dir}/${map_package}" } +prolly-store-dynamodb = { path = "${work_dir}/${store_package}" } +prolly-dynamodb-core = { path = "${work_dir}/${core_package}" } EOF cat >"${consumer}/src/main.rs" <<'EOF' use prolly_dynamodb_client::{CancellationToken, Client}; diff --git a/src/lib.rs b/src/lib.rs index 4897e03a..c2a30822 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -351,7 +351,9 @@ pub use prolly::proximity::{ ProximityStructuralVerification, ProximityTree, ProximityVectorRef, ProximityVerification, QueryKernel, ScalarQuantizationConfig, SearchBackend, SearchBudget, SearchCompletion, SearchIo, SearchOptions, SearchPlan, SearchPlanSummary, SearchPolicy, SearchRequest, SearchResult, - SearchRuntime, SearchRuntimePolicy, StoreCacheNamespace, VectorStorageConfig, + SearchRuntime, SearchRuntimePolicy, StoreCacheNamespace, TurboQuantSearchOptions, + TurboQuantizationBuildLimits, TurboQuantizationBuildStats, TurboQuantizationConfig, + TurboQuantizationQuality, TurboQuantizationVerification, TurboQuantizer, VectorStorageConfig, SEARCH_PLAN_FORMAT_VERSION, }; pub use prolly::proximity::{ @@ -360,7 +362,8 @@ pub use prolly::proximity::{ AsyncCompositeBuildOutcome, AsyncHnswBuild, AsyncHnswIndex, AsyncIoConfig, AsyncProductQuantizer, AsyncProductQuantizerBuild, AsyncProximityBuildOptions, AsyncProximityHead, AsyncProximityHeadCommit, AsyncProximityMap, AsyncProximityReadSession, - AsyncProximitySnapshot, AsyncSearchControl, CancellationToken, + AsyncProximitySnapshot, AsyncSearchControl, AsyncTurboQuantizer, AsyncTurboQuantizerBuild, + CancellationToken, }; pub use prolly::range::{AsyncRangeIter, AsyncRangePage, AsyncReversePage}; pub use prolly::range::{ diff --git a/src/prolly/builder.rs b/src/prolly/builder.rs index 61b98fcf..5ec5fbce 100644 --- a/src/prolly/builder.rs +++ b/src/prolly/builder.rs @@ -83,8 +83,11 @@ pub struct SortedBatchBuilder { store: S, config: Config, origin: PublicationOrigin, + publication_batch_items: usize, pending_entry: Option<(Vec, Vec)>, pending_nodes: Vec, + pending_nodes_payload_bytes: usize, + peak_retained_payload_bytes: usize, hierarchy: HierarchicalEmitter, } @@ -106,8 +109,11 @@ pub struct AsyncBatchBuilder { pub struct AsyncSortedBatchBuilder { engine: ProllyEngine, origin: PublicationOrigin, + publication_batch_items: usize, pending_entry: Option<(Vec, Vec)>, - pending_nodes: Vec, + pending_nodes: Vec, + pending_nodes_payload_bytes: usize, + peak_retained_payload_bytes: usize, hierarchy: HierarchicalEmitter, } @@ -153,13 +159,29 @@ where } pub(crate) fn new_with_origin(store: S, config: Config, origin: PublicationOrigin) -> Self { + Self::new_with_origin_and_batch_size(store, config, origin, SORTED_BUILDER_NODE_BATCH) + } + + pub(crate) fn new_with_origin_and_batch_size( + store: S, + config: Config, + origin: PublicationOrigin, + publication_batch_items: usize, + ) -> Self { + assert!( + publication_batch_items > 0, + "async sorted builder publication batch size must be positive" + ); let hierarchy = HierarchicalEmitter::new(config.clone()) .expect("configuration contains a registered persisted tree format"); Self { engine: ProllyEngine::new(store, config), origin, + publication_batch_items, pending_entry: None, pending_nodes: Vec::new(), + pending_nodes_payload_bytes: 0, + peak_retained_payload_bytes: 0, hierarchy, } } @@ -178,12 +200,14 @@ where } if key == *previous { *previous_value = val; + self.observe_retained_payload_peak()?; return Ok(()); } } self.flush_pending_entry().await?; self.pending_entry = Some((key, val)); + self.observe_retained_payload_peak()?; Ok(()) } @@ -196,36 +220,102 @@ where } async fn collect_emitted(&mut self, emitted: Vec) -> Result<(), Error> { - self.pending_nodes - .extend(emitted.into_iter().map(|emitted| DeferredNode { + let emitted_payload_bytes = emitted.iter().try_fold(0usize, |bytes, emitted| { + bytes + .checked_add(emitted.owned_payload_bytes) + .ok_or(Error::InvalidNode) + })?; + let concurrent_payload_bytes = self + .retained_payload_bytes()? + .checked_add(emitted_payload_bytes) + .ok_or(Error::InvalidNode)?; + self.peak_retained_payload_bytes = self + .peak_retained_payload_bytes + .max(concurrent_payload_bytes); + for emitted in emitted { + let retained_payload_bytes = emitted + .summary + .first_key + .len() + .checked_add(emitted.bytes.len()) + .ok_or(Error::InvalidNode)?; + self.pending_nodes.push(BuiltNode { cid: emitted.summary.cid, + first_key: emitted.summary.first_key, + count: emitted.summary.count, bytes: emitted.bytes, - node: emitted.node, - })); - if self.pending_nodes.len() >= SORTED_BUILDER_NODE_BATCH { - self.flush_pending_nodes().await?; + }); + self.pending_nodes_payload_bytes = self + .pending_nodes_payload_bytes + .checked_add(retained_payload_bytes) + .ok_or(Error::InvalidNode)?; + self.observe_retained_payload_peak()?; + if self.pending_nodes.len() == self.publication_batch_items { + self.flush_pending_nodes().await?; + } } Ok(()) } async fn flush_pending_nodes(&mut self) -> Result<(), Error> { + let nodes = self + .pending_nodes + .iter() + .map(|entry| (&entry.cid, entry.bytes.as_slice())) + .collect::>(); self.engine - .publish_builder_nodes(&self.pending_nodes, self.origin) + .publish_builder_node_refs(&nodes, self.origin) .await?; self.pending_nodes.clear(); + self.pending_nodes_payload_bytes = 0; Ok(()) } /// Finish and publish the remaining nodes, then return the visible root. - pub async fn build(mut self) -> Result { + pub async fn build(self) -> Result { + self.build_with_retained_payload_peak() + .await + .map(|(tree, _)| tree) + } + + pub(crate) async fn build_with_retained_payload_peak(mut self) -> Result<(Tree, usize), Error> { self.flush_pending_entry().await?; let (root, emitted) = self.hierarchy.finish()?; self.collect_emitted(emitted).await?; self.flush_pending_nodes().await?; - Ok(Tree { - root: root.map(|summary| summary.cid), - config: self.engine.config().clone(), - }) + Ok(( + Tree { + root: root.map(|summary| summary.cid), + config: self.engine.config().clone(), + }, + self.peak_retained_payload_bytes, + )) + } + + pub(crate) fn retained_payload_bytes(&self) -> Result { + let pending_entry_bytes = match &self.pending_entry { + Some((key, value)) => key + .len() + .checked_add(value.len()) + .ok_or(Error::InvalidNode)?, + None => 0, + }; + self.hierarchy + .retained_payload_bytes()? + .checked_add(pending_entry_bytes) + .and_then(|bytes| bytes.checked_add(self.pending_nodes_payload_bytes)) + .ok_or(Error::InvalidNode) + } + + pub(crate) fn peak_retained_payload_bytes(&self) -> usize { + self.peak_retained_payload_bytes + } + + fn observe_retained_payload_peak(&mut self) -> Result<(), Error> { + self.peak_retained_payload_bytes = self + .peak_retained_payload_bytes + .max(self.retained_payload_bytes()?); + Ok(()) } } @@ -597,14 +687,30 @@ where } pub(crate) fn new_with_origin(store: S, config: Config, origin: PublicationOrigin) -> Self { + Self::new_with_origin_and_batch_size(store, config, origin, SORTED_BUILDER_NODE_BATCH) + } + + pub(crate) fn new_with_origin_and_batch_size( + store: S, + config: Config, + origin: PublicationOrigin, + publication_batch_items: usize, + ) -> Self { + assert!( + publication_batch_items > 0, + "sorted builder publication batch size must be positive" + ); let hierarchy = HierarchicalEmitter::new(config.clone()) .expect("configuration contains a registered persisted tree format"); Self { store, config, origin, + publication_batch_items, pending_entry: None, pending_nodes: Vec::new(), + pending_nodes_payload_bytes: 0, + peak_retained_payload_bytes: 0, hierarchy, } } @@ -624,12 +730,14 @@ where } if key == *previous { *previous_value = val; + self.observe_retained_payload_peak()?; return Ok(()); } } self.flush_pending_entry()?; self.pending_entry = Some((key, val)); + self.observe_retained_payload_peak()?; Ok(()) } @@ -670,18 +778,45 @@ where } /// Build a tree from the streamed entries. - pub fn build(mut self) -> Result { + pub fn build(self) -> Result { + self.build_with_retained_payload_peak() + .map(|(tree, _)| tree) + } + + pub(crate) fn build_with_retained_payload_peak(mut self) -> Result<(Tree, usize), Error> { self.flush_pending_entry()?; let (root, emitted) = self.hierarchy.finish()?; self.collect_emitted(emitted)?; self.flush_pending_nodes()?; - Ok(Tree { - root: root.map(|summary| summary.cid), - config: self.config, - }) + Ok(( + Tree { + root: root.map(|summary| summary.cid), + config: self.config, + }, + self.peak_retained_payload_bytes, + )) } fn collect_emitted(&mut self, emitted: Vec) -> Result<(), Error> { + let emitted_payload_bytes = emitted.iter().try_fold(0usize, |bytes, emitted| { + bytes + .checked_add(emitted.owned_payload_bytes) + .ok_or(Error::InvalidNode) + })?; + let retained_emitted_payload_bytes = + emitted.iter().try_fold(0usize, |bytes, emitted| { + bytes + .checked_add(emitted.summary.first_key.len()) + .and_then(|bytes| bytes.checked_add(emitted.bytes.len())) + .ok_or(Error::InvalidNode) + })?; + let concurrent_payload_bytes = self + .retained_payload_bytes()? + .checked_add(emitted_payload_bytes) + .ok_or(Error::InvalidNode)?; + self.peak_retained_payload_bytes = self + .peak_retained_payload_bytes + .max(concurrent_payload_bytes); self.pending_nodes .extend(emitted.into_iter().map(|emitted| BuiltNode { cid: emitted.summary.cid, @@ -689,7 +824,12 @@ where count: emitted.summary.count, bytes: emitted.bytes, })); - if self.pending_nodes.len() >= SORTED_BUILDER_NODE_BATCH { + self.pending_nodes_payload_bytes = self + .pending_nodes_payload_bytes + .checked_add(retained_emitted_payload_bytes) + .ok_or(Error::InvalidNode)?; + self.observe_retained_payload_peak()?; + if self.pending_nodes.len() >= self.publication_batch_items { self.flush_pending_nodes()?; } Ok(()) @@ -698,6 +838,33 @@ where fn flush_pending_nodes(&mut self) -> Result<(), Error> { persist_nodes(&self.store, &self.pending_nodes, self.origin)?; self.pending_nodes.clear(); + self.pending_nodes_payload_bytes = 0; + Ok(()) + } + + pub(crate) fn retained_payload_bytes(&self) -> Result { + let pending_entry_bytes = match &self.pending_entry { + Some((key, value)) => key + .len() + .checked_add(value.len()) + .ok_or(Error::InvalidNode)?, + None => 0, + }; + self.hierarchy + .retained_payload_bytes()? + .checked_add(pending_entry_bytes) + .and_then(|bytes| bytes.checked_add(self.pending_nodes_payload_bytes)) + .ok_or(Error::InvalidNode) + } + + pub(crate) fn peak_retained_payload_bytes(&self) -> usize { + self.peak_retained_payload_bytes + } + + fn observe_retained_payload_peak(&mut self) -> Result<(), Error> { + self.peak_retained_payload_bytes = self + .peak_retained_payload_bytes + .max(self.retained_payload_bytes()?); Ok(()) } } diff --git a/src/prolly/builder/streaming.rs b/src/prolly/builder/streaming.rs index a875e91e..77a6bb3e 100644 --- a/src/prolly/builder/streaming.rs +++ b/src/prolly/builder/streaming.rs @@ -12,6 +12,9 @@ pub(crate) struct EmittedNode { pub(crate) summary: NodeSummary, pub(crate) node: Node, pub(crate) bytes: Vec, + /// Logical heap payload simultaneously owned by this emission: the raw + /// node entries, encoded node bytes, and cloned first-key summary. + pub(crate) owned_payload_bytes: usize, } pub(crate) struct LevelEmitter { @@ -23,6 +26,7 @@ pub(crate) struct LevelEmitter { sizer: Option, encoded_measure: bool, upper_size: u64, + current_payload_bytes: usize, } impl LevelEmitter { @@ -50,6 +54,7 @@ impl LevelEmitter { encoded_measure, sizer, upper_size, + current_payload_bytes: 0, config, leaf, level, @@ -169,6 +174,18 @@ impl LevelEmitter { let boundary = self .detector .observe(&key, &value, encoded_entry_bytes as usize)?; + self.current_payload_bytes = self + .current_payload_bytes + .checked_add(key.len()) + .and_then(|bytes| bytes.checked_add(value.len())) + .and_then(|bytes| { + bytes.checked_add(if child_count.is_some() { + std::mem::size_of::() + } else { + 0 + }) + }) + .ok_or(Error::InvalidNode)?; self.current.keys.push(key); self.current.vals.push(value); if let Some(count) = child_count { @@ -224,6 +241,10 @@ impl LevelEmitter { self.current.is_empty() } + pub(crate) fn retained_payload_bytes(&self) -> usize { + self.current_payload_bytes + } + fn flush_current(&mut self) -> Result, Error> { if self.current.is_empty() { return Ok(None); @@ -232,6 +253,7 @@ impl LevelEmitter { &mut self.current, new_builder_node(&self.config, self.leaf, self.level), ); + let node_payload_bytes = std::mem::take(&mut self.current_payload_bytes); let bytes = node.to_bytes(); let hard_max = self.config.format.chunking.hard_max_node_bytes; if bytes.len() as u64 > hard_max { @@ -255,10 +277,15 @@ impl LevelEmitter { } else { self.upper_size = conservative_empty_upper(&self.config.format)?; } + let owned_payload_bytes = node_payload_bytes + .checked_add(bytes.len()) + .and_then(|payload| payload.checked_add(summary.first_key.len())) + .ok_or(Error::InvalidNode)?; Ok(Some(EmittedNode { summary, node, bytes, + owned_payload_bytes, })) } @@ -387,6 +414,39 @@ impl HierarchicalEmitter { } } + /// Logical key/value/child-count payload retained between streamed adds. + /// Fixed-size allocator and codec metadata are intentionally excluded, as + /// are provider-owned publication buffers. + pub(crate) fn retained_payload_bytes(&self) -> Result { + let mut bytes = self.leaf.retained_payload_bytes(); + for level in &self.parents { + bytes = bytes + .checked_add( + level + .pending_first + .as_ref() + .map(|summary| summary.first_key.len()) + .unwrap_or(0), + ) + .and_then(|bytes| { + bytes.checked_add( + level + .emitter + .as_ref() + .map(LevelEmitter::retained_payload_bytes) + .unwrap_or(0), + ) + }) + .ok_or(Error::InvalidNode)?; + } + for (_, summary) in &self.cascade_scratch { + bytes = bytes + .checked_add(summary.first_key.len()) + .ok_or(Error::InvalidNode)?; + } + Ok(bytes) + } + fn cascade( &mut self, child_level: u8, diff --git a/src/prolly/content_graph/kind.rs b/src/prolly/content_graph/kind.rs index c3fd8b09..8c61f205 100644 --- a/src/prolly/content_graph/kind.rs +++ b/src/prolly/content_graph/kind.rs @@ -15,6 +15,7 @@ pub enum ContentObjectKind { HnswPage, CompositeAccelerator, AcceleratorCatalog, + TurboQuantization, } impl ContentObjectKind { @@ -32,6 +33,7 @@ impl ContentObjectKind { Self::HnswPage => 10, Self::CompositeAccelerator => 11, Self::AcceleratorCatalog => 12, + Self::TurboQuantization => 13, } } @@ -49,6 +51,7 @@ impl ContentObjectKind { 10 => Self::HnswPage, 11 => Self::CompositeAccelerator, 12 => Self::AcceleratorCatalog, + 13 => Self::TurboQuantization, _ => return None, }) } diff --git a/src/prolly/content_graph/walk.rs b/src/prolly/content_graph/walk.rs index 6f238109..09d3ed26 100644 --- a/src/prolly/content_graph/walk.rs +++ b/src/prolly/content_graph/walk.rs @@ -8,6 +8,11 @@ use crate::prolly::proximity::accelerator::catalog::{ use crate::prolly::proximity::accelerator::composite::Manifest as CompositeManifest; use crate::prolly::proximity::accelerator::hnsw::storage::{GraphNode, Manifest as HnswManifest}; use crate::prolly::proximity::accelerator::pq::Manifest as PqManifest; +use crate::prolly::proximity::accelerator::turboquant::{ + code_tree_node_count as turboquant_node_count, decode_code_tree_node as decode_turboquant_node, + invalid_object as invalid_turboquant_object, + validate_code_value as validate_turboquant_code_value, Manifest as TurboQuantManifest, +}; use crate::prolly::proximity::storage::quantized::ScalarQuantized; use crate::prolly::proximity::storage::vector::ExternalVector; use crate::prolly::proximity::storage::{Descriptor, PhysicalNodeKind, ProximityNode, VectorRef}; @@ -131,6 +136,7 @@ pub fn walk_content_graph( } } } + validate_turboquant_closures(&walk.objects)?; Ok(walk) } @@ -249,9 +255,107 @@ where } } } + validate_turboquant_closures(&walk.objects)?; Ok(walk) } +fn validate_turboquant_closures(objects: &[TypedContentObject]) -> Result<(), Error> { + if !objects + .iter() + .any(|object| object.root.kind == ContentObjectKind::TurboQuantization) + { + return Ok(()); + } + let objects_by_cid: HashMap<&Cid, &TypedContentObject> = objects + .iter() + .map(|object| (&object.root.cid, object)) + .collect(); + for object in objects + .iter() + .filter(|object| object.root.kind == ContentObjectKind::TurboQuantization) + { + let manifest = TurboQuantManifest::decode(&object.bytes)?; + let source = objects_by_cid + .get(&manifest.source) + .ok_or_else(|| invalid_turboquant_object("TurboQuant source descriptor is absent"))?; + if source.root.kind != ContentObjectKind::ProximityDescriptor { + return Err(invalid_turboquant_object( + "TurboQuant source reference is not a proximity descriptor", + )); + } + let descriptor = Descriptor::decode(&source.bytes)?; + if descriptor.config.dimensions != manifest.dimensions + || descriptor.config.metric != manifest.metric + || descriptor.count != manifest.count + { + return Err(invalid_turboquant_object( + "TurboQuant manifest disagrees with its source descriptor", + )); + } + let mut verified_counts = HashMap::::new(); + let count = validate_turboquant_subtree( + &manifest.code_root, + manifest.dimensions as usize, + manifest.config.bit_width, + &objects_by_cid, + &mut verified_counts, + )?; + if count != manifest.count { + return Err(invalid_turboquant_object( + "TurboQuant code-tree count disagrees with manifest", + )); + } + } + Ok(()) +} + +fn validate_turboquant_subtree( + cid: &Cid, + dimensions: usize, + bit_width: u8, + objects: &HashMap<&Cid, &TypedContentObject>, + verified_counts: &mut HashMap, +) -> Result { + if let Some(count) = verified_counts.get(cid) { + return Ok(*count); + } + let object = objects + .get(cid) + .ok_or_else(|| invalid_turboquant_object("TurboQuant code-tree node is absent"))?; + if object.root.kind != ContentObjectKind::OrderedNode { + return Err(invalid_turboquant_object( + "TurboQuant code-tree reference is not an ordered node", + )); + } + let node = decode_turboquant_node(&object.bytes)?; + let count = turboquant_node_count(&node)?; + if node.leaf { + for value in &node.vals { + validate_turboquant_code_value(value, dimensions, bit_width)?; + } + } else { + for (value, declared_count) in node.vals.iter().zip(&node.child_counts) { + let child = Cid(value.as_slice().try_into().map_err(|_| { + invalid_turboquant_object("TurboQuant internal code-tree value is not a CID") + })?); + let actual_count = validate_turboquant_subtree( + &child, + dimensions, + bit_width, + objects, + verified_counts, + )?; + if actual_count != *declared_count { + return Err(invalid_turboquant_object( + "TurboQuant code-tree child count disagrees with its parent", + )); + } + } + } + verified_counts.insert(cid.clone(), count); + Ok(count) +} + #[allow(clippy::too_many_arguments)] async fn prefetch_references_async( store: &S, @@ -456,6 +560,16 @@ fn references( )); ContentObjectKind::ProductQuantization } + ContentObjectKind::TurboQuantization => { + let manifest = TurboQuantManifest::decode(bytes)?; + manifest.config.validate(manifest.dimensions)?; + output.push(TypedContentRoot::proximity_descriptor(manifest.source)); + output.push(TypedContentRoot::new( + ContentObjectKind::OrderedNode, + manifest.code_root, + )); + ContentObjectKind::TurboQuantization + } ContentObjectKind::HnswManifest => { let manifest = HnswManifest::decode(bytes)?; manifest.config.validate()?; @@ -484,6 +598,9 @@ fn references( crate::prolly::proximity::CompositeBaseKind::ProductQuantized => { ContentObjectKind::ProductQuantization } + crate::prolly::proximity::CompositeBaseKind::TurboQuantized => { + ContentObjectKind::TurboQuantization + } }, manifest.base_manifest, )); @@ -508,6 +625,9 @@ fn references( CatalogAcceleratorKind::Composite => { ContentObjectKind::CompositeAccelerator } + CatalogAcceleratorKind::TurboQuantized => { + ContentObjectKind::TurboQuantization + } }, entry.manifest, )); diff --git a/src/prolly/engine/mod.rs b/src/prolly/engine/mod.rs index 739ea58e..cd3407cc 100644 --- a/src/prolly/engine/mod.rs +++ b/src/prolly/engine/mod.rs @@ -337,15 +337,19 @@ where operation.record_cache_miss(); self.metrics.add_cache_misses(1); - let bytes = self + let read = self .store - .get_shared(cid.as_bytes()) + .get_validated_shared(cid.as_bytes()) .await .map_err(|error| Error::Store(Box::new(error)))? .ok_or_else(|| Error::NotFound(cid.clone()))?; - operation.record_read(bytes.len()); - self.metrics.record_point_read(bytes.len()); - let node = Arc::new(validation::decode_read(cid, &tree.config.format, bytes)?); + operation.record_read(read.bytes().len()); + self.metrics.record_point_read(read.bytes().len()); + let node = Arc::new(validation::decode_validated_read( + cid, + &tree.config.format, + read, + )?); if let Ok(mut cache) = self.node_cache.write() { let evictions = cache.insert_read(cid.clone(), node.clone()); self.metrics.add_cache_evictions(evictions); @@ -385,7 +389,7 @@ where .collect::>(); let loaded = self .store - .batch_get_shared_ordered_unique(&keys) + .batch_get_validated_shared_ordered_unique(&keys) .await .map_err(|error| Error::Store(Box::new(error)))?; let key_count = keys.len(); @@ -394,13 +398,17 @@ where return Err(Error::InvalidNode); } let mut decoded = Vec::with_capacity(loaded.len()); - for (cid, bytes) in missing_cids.into_iter().zip(loaded) { - let bytes = bytes.ok_or_else(|| Error::NotFound(cid.clone()))?; - let bytes_len = bytes.len(); + for (cid, read) in missing_cids.into_iter().zip(loaded) { + let read = read.ok_or_else(|| Error::NotFound(cid.clone()))?; + let bytes_len = read.bytes().len(); operation.record_read(bytes_len); decoded.push(( cid.clone(), - Arc::new(validation::decode_read(&cid, &tree.config.format, bytes)?), + Arc::new(validation::decode_validated_read( + &cid, + &tree.config.format, + read, + )?), bytes_len, )); } @@ -507,14 +515,18 @@ where } self.metrics.add_cache_misses(1); - let bytes = self + let read = self .store .inner() - .get_shared(cid.as_bytes()) + .get_validated_shared(cid.as_bytes()) .map_err(|error| Error::Store(Box::new(error)))? .ok_or_else(|| Error::NotFound(cid.clone()))?; - self.metrics.record_point_read(bytes.len()); - let node = Arc::new(validation::decode_read(cid, &self.config.format, bytes)?); + self.metrics.record_point_read(read.bytes().len()); + let node = Arc::new(validation::decode_validated_read( + cid, + &self.config.format, + read, + )?); if admit { if let Ok(mut cache) = self.node_cache.write() { let evictions = cache.insert_read(cid.clone(), node.clone()); diff --git a/src/prolly/engine/validation.rs b/src/prolly/engine/validation.rs index 21226df2..eb5c338b 100644 --- a/src/prolly/engine/validation.rs +++ b/src/prolly/engine/validation.rs @@ -4,6 +4,7 @@ use crate::prolly::cid::Cid; use crate::prolly::error::Error; use crate::prolly::format::TreeFormat; use crate::prolly::node::{Node, ReadNode}; +use crate::prolly::store::ValidatedSharedRead; /// Reject bytes that are not the content addressed by `expected`. pub(crate) fn validate_cid(expected: &Cid, bytes: &[u8]) -> Result<(), Error> { @@ -40,6 +41,27 @@ pub(crate) fn decode_read( bytes: Arc<[u8]>, ) -> Result { validate_cid(expected_cid, &bytes)?; + decode_cid_verified_read(expected_format, bytes) +} + +/// Decode retained bytes while honoring a CID check already performed by a +/// crate-owned store adapter for this exact read. +pub(crate) fn decode_validated_read( + expected_cid: &Cid, + expected_format: &TreeFormat, + read: ValidatedSharedRead, +) -> Result { + let (bytes, cid_verified) = read.into_parts(); + if !cid_verified { + validate_cid(expected_cid, &bytes)?; + } + decode_cid_verified_read(expected_format, bytes) +} + +fn decode_cid_verified_read( + expected_format: &TreeFormat, + bytes: Arc<[u8]>, +) -> Result { let node = ReadNode::from_shared(bytes).map_err(|error| match error { Error::Deserialize(_) => Error::InvalidNode, other => other, diff --git a/src/prolly/mod.rs b/src/prolly/mod.rs index 11b01a40..d4cb2d9c 100644 --- a/src/prolly/mod.rs +++ b/src/prolly/mod.rs @@ -3405,16 +3405,16 @@ impl Prolly { } self.raw_metrics().add_cache_misses(1); - let bytes = self + let read = self .store() - .get_shared(cid.as_bytes()) + .get_validated_shared(cid.as_bytes()) .map_err(|e| Error::Store(Box::new(e)))? .ok_or_else(|| Error::NotFound(cid.clone()))?; - self.raw_metrics().record_point_read(bytes.len()); - let node = Arc::new(engine::validation::decode_read( + self.raw_metrics().record_point_read(read.bytes().len()); + let node = Arc::new(engine::validation::decode_validated_read( cid, &self.config().format, - bytes, + read, )?); if let Ok(mut cache) = self.node_cache().write() { let evictions = cache.insert_read(cid.clone(), node.clone()); @@ -3461,9 +3461,9 @@ impl Prolly { .collect::>(); let loaded = self .store() - .batch_get_shared_ordered_unique(&keys) + .batch_get_validated_shared_ordered_unique(&keys) .map_err(|error| Error::Store(Box::new(error)))?; - let loaded_bytes = loaded.iter().flatten().map(|bytes| bytes.len()).sum(); + let loaded_bytes = loaded.iter().flatten().map(|read| read.bytes().len()).sum(); let loaded_nodes = loaded.iter().flatten().count(); self.raw_metrics() .record_batch_read(keys.len(), loaded_bytes, loaded_nodes); @@ -3479,13 +3479,13 @@ impl Prolly { .collect::>(); let loaded = self .store() - .batch_get_shared_ordered_unique(&keys) + .batch_get_validated_shared_ordered_unique(&keys) .map_err(|error| Error::Store(Box::new(error)))?; if loaded.len() != chunk.len() { return Err(Error::InvalidNode); } let loaded_bytes = - loaded.iter().flatten().map(|bytes| bytes.len()).sum(); + loaded.iter().flatten().map(|read| read.bytes().len()).sum(); let loaded_nodes = loaded.iter().flatten().count(); self.raw_metrics().record_batch_read( keys.len(), @@ -3505,12 +3505,12 @@ impl Prolly { let decoded = missing_cids .into_iter() .zip(loaded) - .map(|(cid, bytes)| { - let bytes = bytes.ok_or_else(|| Error::NotFound(cid.clone()))?; - let node = Arc::new(engine::validation::decode_read( + .map(|(cid, read)| { + let read = read.ok_or_else(|| Error::NotFound(cid.clone()))?; + let node = Arc::new(engine::validation::decode_validated_read( &cid, &self.config().format, - bytes, + read, )?); Ok((node, cid)) }) @@ -4609,18 +4609,6 @@ where self.build_from_entries(entries).await } - pub(crate) async fn publish_builder_nodes( - &self, - nodes: &[builder::DeferredNode], - origin: PublicationOrigin, - ) -> Result<(), Error> { - let nodes = nodes - .iter() - .map(|entry| (&entry.cid, entry.bytes.as_slice())) - .collect::>(); - self.publish_builder_node_refs(&nodes, origin).await - } - pub(crate) async fn publish_builder_node_refs( &self, nodes: &[(&Cid, &[u8])], @@ -6984,17 +6972,17 @@ where } self.metrics.add_cache_misses(1); - let bytes = self + let read = self .store - .get_shared(cid.as_bytes()) + .get_validated_shared(cid.as_bytes()) .await .map_err(|e| Error::Store(Box::new(e)))? .ok_or_else(|| Error::NotFound(cid.clone()))?; - self.metrics.record_point_read(bytes.len()); - let node = Arc::new(engine::validation::decode_read( + self.metrics.record_point_read(read.bytes().len()); + let node = Arc::new(engine::validation::decode_validated_read( cid, &self.config.format, - bytes, + read, )?); if admit { if let Ok(mut cache) = self.node_cache.write() { @@ -7048,25 +7036,25 @@ where self.metrics.add_cache_misses(keys.len()); let loaded = self .store - .batch_get_shared_ordered_unique(&keys) + .batch_get_validated_shared_ordered_unique(&keys) .await .map_err(|error| Error::Store(Box::new(error)))?; if loaded.len() != missing_cids.len() { return Err(Error::InvalidNode); } - let loaded_bytes = loaded.iter().flatten().map(|bytes| bytes.len()).sum(); + let loaded_bytes = loaded.iter().flatten().map(|read| read.bytes().len()).sum(); let loaded_nodes = loaded.iter().flatten().count(); self.metrics .record_batch_read(keys.len(), loaded_bytes, loaded_nodes); let decoded = missing_cids .into_iter() .zip(loaded) - .map(|(cid, bytes)| { - let bytes = bytes.ok_or_else(|| Error::NotFound(cid.clone()))?; - let node = Arc::new(engine::validation::decode_read( + .map(|(cid, read)| { + let read = read.ok_or_else(|| Error::NotFound(cid.clone()))?; + let node = Arc::new(engine::validation::decode_validated_read( &cid, &self.config.format, - bytes, + read, )?); Ok((node, cid)) }) diff --git a/src/prolly/proximity/accelerator/async.rs b/src/prolly/proximity/accelerator/async.rs index 88fa6787..8b51fb49 100644 --- a/src/prolly/proximity/accelerator/async.rs +++ b/src/prolly/proximity/accelerator/async.rs @@ -3,9 +3,11 @@ use super::catalog::{ }; use super::composite::config_fingerprint as composite_fingerprint; use super::composite::{ - composite_tree_config, CompositeAccelerator, CompositeAcceleratorConfig, CompositeBase, - CompositeBaseKind, CompositeBuildLimits, CompositeBuildOutcome, CompositeBuildStats, - FullRebuildReason, Manifest as CompositeManifest, + account_delta as account_composite_delta, account_shadow as account_composite_shadow, + checked_add as checked_add_composite, composite_tree_config, enforce as enforce_composite, + rebuild_reasons as composite_rebuild_reasons, CompositeAccelerator, CompositeAcceleratorConfig, + CompositeBase, CompositeBaseKind, CompositeBuildLimits, CompositeBuildOutcome, + CompositeBuildStats, FullRebuildReason, Manifest as CompositeManifest, }; use super::hnsw::storage::config_fingerprint as hnsw_fingerprint; use super::hnsw::storage::{graph_config, GraphNode, Manifest as HnswManifest}; @@ -15,19 +17,35 @@ use super::pq::{ code_tree_config, Manifest as PqManifest, ProductQuantizationBuildLimits, ProductQuantizationBuildStats, ProductQuantizationConfig, ProductQuantizer, }; +use super::turboquant::config_fingerprint as turboquant_fingerprint; +use super::turboquant::{ + codebook as turboquant_codebook, encode_vector_reusing, enforce_resource, + invalid_object as invalid_turboquant_object, packed_len as turboquant_packed_len, + quality_from_totals as turboquant_quality_from_totals, + resource_limit as turboquant_resource_limit, + temporary_peak_bytes as turboquant_temporary_peak_bytes, turboquant_code_tree_config, + validate_code_tree_root as validate_turboquant_code_tree_root, EncodingScratch, + Manifest as TurboQuantManifest, StructuredRotation, TurboQuantizationBuildLimits, + TurboQuantizationBuildStats, TurboQuantizationConfig, TurboQuantizer, +}; use super::validate_binding; +use crate::prolly::builder::AsyncSortedBatchBuilder; use crate::prolly::cid::Cid; use crate::prolly::content_graph::{ - walk_content_graph, ContentGraphLimits, ContentObjectKind, TypedContentRoot, + walk_content_graph, walk_content_graph_async, ContentGraphLimits, ContentObjectKind, + TypedContentRoot, }; -use crate::prolly::error::Error; +use crate::prolly::error::{Diff, Error}; +use crate::prolly::proximity::distance::canonical::sqrt_down; +use crate::prolly::proximity::storage::StoredRecord; use crate::prolly::proximity::{ - AcceleratorCatalog, AcceleratorSet, BuildParallelism, DistanceMetric, - ProductQuantizationQuality, ProximityMap, ProximityTree, + BuildParallelism, DistanceMetric, ProductQuantizationQuality, ProximityMap, ProximityTree, + TurboQuantizationQuality, TurboQuantizationVerification, }; use crate::prolly::store::{AsyncStore, MemStore, NodePublication, PublicationOrigin}; use crate::prolly::tree::Tree; use crate::prolly::AsyncProlly; +use rayon::prelude::*; use std::sync::Arc; #[derive(Clone, Debug)] @@ -43,11 +61,19 @@ pub struct AsyncProductQuantizerBuild { pub limits: ProductQuantizationBuildLimits, } +#[derive(Clone, Debug)] +pub struct AsyncTurboQuantizerBuild { + pub config: TurboQuantizationConfig, + pub parallelism: BuildParallelism, + pub limits: TurboQuantizationBuildLimits, +} + /// Async-store publication plan for canonical accelerator sidecars. #[derive(Clone, Debug)] pub struct AsyncAcceleratorBuildOptions { pub hnsw: Option, pub product_quantizer: Option, + pub turboquant: Option, pub publication_batch_items: usize, pub graph_limits: ContentGraphLimits, } @@ -57,6 +83,7 @@ impl Default for AsyncAcceleratorBuildOptions { Self { hnsw: None, product_quantizer: None, + turboquant: None, publication_batch_items: 1_024, graph_limits: ContentGraphLimits::default(), } @@ -67,6 +94,7 @@ impl Default for AsyncAcceleratorBuildOptions { pub struct AsyncAcceleratorBuildStats { pub hnsw: Option, pub product_quantizer: Option, + pub turboquant: Option, pub objects_published: usize, pub bytes_published: usize, } @@ -78,6 +106,8 @@ pub struct AsyncCompositeBuildOptions { pub hnsw_limits: HnswBuildLimits, pub pq_parallelism: BuildParallelism, pub pq_limits: ProductQuantizationBuildLimits, + pub turboquant_parallelism: BuildParallelism, + pub turboquant_limits: TurboQuantizationBuildLimits, pub publication_batch_items: usize, pub graph_limits: ContentGraphLimits, } @@ -90,6 +120,8 @@ impl Default for AsyncCompositeBuildOptions { hnsw_limits: HnswBuildLimits::default(), pq_parallelism: BuildParallelism::serial(), pq_limits: ProductQuantizationBuildLimits::default(), + turboquant_parallelism: BuildParallelism::serial(), + turboquant_limits: TurboQuantizationBuildLimits::default(), publication_batch_items: 1_024, graph_limits: ContentGraphLimits::default(), } @@ -188,10 +220,25 @@ pub struct AsyncProductQuantizer { pub(crate) quality: ProductQuantizationQuality, } +/// Validated TurboQuant metadata for an async-only store. +#[derive(Clone)] +pub struct AsyncTurboQuantizer { + pub(crate) manifest: Cid, + pub(crate) source: Cid, + pub(crate) dimensions: u32, + pub(crate) metric: DistanceMetric, + pub(crate) count: u64, + pub(crate) config: TurboQuantizationConfig, + pub(crate) code_tree: Tree, + pub(crate) quality: TurboQuantizationQuality, + pub(crate) zero_vectors: u64, +} + #[derive(Clone)] pub(crate) enum AsyncCompositeBase { Hnsw(AsyncHnswIndex), ProductQuantized(AsyncProductQuantizer), + TurboQuantized(AsyncTurboQuantizer), } /// Validated composite metadata and base sidecar for an async-only store. @@ -286,6 +333,280 @@ impl AsyncCompositeAccelerator { .await } + pub async fn build_from_turboquant( + base_map: &crate::prolly::proximity::AsyncProximityMap, + current_map: &crate::prolly::proximity::AsyncProximityMap, + base: &AsyncTurboQuantizer, + options: AsyncCompositeBuildOptions, + ) -> Result + where + S: AsyncStore + Clone, + S::Error: Send + Sync, + { + options.config.validate()?; + options.limits.validate()?; + // Validate every caller-provided TurboQuant option before consulting + // store residency. Otherwise the same logical composite request could + // accept malformed limits on the native co-resident path but reject + // them on the compatibility staging path. + options.turboquant_limits.validate()?; + if options.publication_batch_items == 0 { + return Err(Error::InvalidProximityConfig { + reason: "composite publication batch size must be greater than zero".to_owned(), + }); + } + if base_map.tree().config.dimensions != current_map.tree().config.dimensions + || base_map.tree().config.metric != current_map.tree().config.metric + || base.source_descriptor() != &base_map.tree().descriptor + || base.dimensions != base_map.tree().config.dimensions + || base.metric != base_map.tree().config.metric + || base.count != base_map.tree().count + { + return Err(invalid( + "composite base/current sources or TurboQuant configuration disagree", + )); + } + let target = current_map.store_clone(); + let base_manifest_present = target + .get(base.manifest_cid().as_bytes()) + .await + .map_err(|error| Error::Store(Box::new(error)))? + .is_some(); + let base_source_present = target + .get(base_map.tree().descriptor.as_bytes()) + .await + .map_err(|error| Error::Store(Box::new(error)))? + .is_some(); + if !base_manifest_present || !base_source_present { + // Preserve the existing cross-store contract. Co-resident + // snapshots take the structural streaming path below; only a + // genuinely separate base store pays the compatibility staging + // cost needed to copy the complete authenticated closure. + let (staging, staged_base, staged_current) = + stage_source_pair(base_map, current_map).await?; + let (rebuilt, _) = TurboQuantizer::build_with_limits( + &staged_base, + base.config.clone(), + options.turboquant_parallelism, + options.turboquant_limits.clone(), + )?; + if rebuilt.manifest_cid() != base.manifest_cid() { + return Err(invalid( + "staged TurboQuant base is not canonical with async base", + )); + } + return publish_composite_outcome( + current_map, + staging, + CompositeAccelerator::build( + &staged_base, + &staged_current, + CompositeBase::TurboQuantized(rebuilt), + options.config, + options.limits, + )?, + options.publication_batch_items, + &options.graph_limits, + ) + .await; + } + + let AsyncCompositeBuildOptions { + config, + limits, + publication_batch_items, + graph_limits, + .. + } = options; + let persisted_base = + AsyncTurboQuantizer::load(&target, base.manifest_cid().clone()).await?; + let persisted_source = crate::prolly::proximity::AsyncProximityMap::load( + target.clone(), + base_map.tree().descriptor.clone(), + ) + .await?; + if persisted_base.source_descriptor() != base.source_descriptor() + || persisted_base.config() != base.config() + || persisted_base.dimensions != base_map.tree().config.dimensions + || persisted_base.metric != base_map.tree().config.metric + || persisted_base.count != base_map.tree().count + || persisted_source.tree() != base_map.tree() + { + return Err(invalid( + "async composite TurboQuant base or source disagrees with persisted content", + )); + } + + let tree_config = composite_tree_config(); + let mut delta_builder = AsyncSortedBatchBuilder::new_with_origin_and_batch_size( + target.clone(), + tree_config.clone(), + PublicationOrigin::Maintenance, + publication_batch_items, + ); + let mut shadow_builder = AsyncSortedBatchBuilder::new_with_origin_and_batch_size( + target.clone(), + tree_config, + PublicationOrigin::Maintenance, + publication_batch_items, + ); + let mut stats = CompositeBuildStats::default(); + let mut changes = current_map + .directory + .stream_diff(&base_map.tree().directory, ¤t_map.tree().directory); + while let Some(change) = changes.next().await { + let change = change?; + stats.diff_entries = checked_add_composite(stats.diff_entries, 1, "diff_entries")?; + enforce_composite("diff_entries", limits.max_diff_entries, stats.diff_entries)?; + match change { + Diff::Added { key, val } => { + StoredRecord::decode(&val, current_map.tree().config.dimensions)?; + account_composite_delta(&mut stats, &key, &val, &limits)?; + stats.inserted_records = + checked_add_composite(stats.inserted_records, 1, "inserted_records")?; + delta_builder.add(key, val).await?; + } + Diff::Removed { key, val } => { + StoredRecord::decode(&val, base_map.tree().config.dimensions)?; + account_composite_shadow(&mut stats, &key, &limits)?; + stats.deleted_records = + checked_add_composite(stats.deleted_records, 1, "deleted_records")?; + shadow_builder.add(key, Vec::new()).await?; + } + Diff::Changed { key, old, new } => { + let old_record = StoredRecord::decode(&old, base_map.tree().config.dimensions)?; + let new_record = + StoredRecord::decode(&new, current_map.tree().config.dimensions)?; + if old_record.vector == new_record.vector { + stats.value_only_records = checked_add_composite( + stats.value_only_records, + 1, + "value_only_records", + )?; + continue; + } + account_composite_delta(&mut stats, &key, &new, &limits)?; + account_composite_shadow(&mut stats, &key, &limits)?; + stats.vector_updated_records = checked_add_composite( + stats.vector_updated_records, + 1, + "vector_updated_records", + )?; + delta_builder.add(key.clone(), new).await?; + shadow_builder.add(key, Vec::new()).await?; + } + } + } + + let reasons = composite_rebuild_reasons( + &config, + stats.delta_records, + stats.shadow_records, + current_map.tree().count, + base_map.tree().count, + ); + if !reasons.is_empty() { + return Ok(AsyncCompositeBuildOutcome::FullRebuildRequired { reasons, stats }); + } + + let delta_tree = delta_builder.build().await?; + let shadow_tree = shadow_builder.build().await?; + let roots = [delta_tree.root.as_ref(), shadow_tree.root.as_ref()] + .into_iter() + .flatten() + .cloned() + .map(|cid| TypedContentRoot::new(ContentObjectKind::OrderedNode, cid)) + .collect::>(); + let (published_descendants, descendant_bytes) = if roots.is_empty() { + (0, 0) + } else { + let walk = walk_content_graph_async(&target, &roots, &graph_limits).await?; + (walk.objects.len(), walk.total_bytes) + }; + stats.encoded_output_bytes = descendant_bytes; + enforce_composite( + "distance_evaluations", + limits.max_distance_evaluations, + stats.distance_evaluations, + )?; + let mut object = CompositeManifest { + current_source: current_map.tree().descriptor.clone(), + base_source: base_map.tree().descriptor.clone(), + dimensions: current_map.tree().config.dimensions, + metric: current_map.tree().config.metric, + current_count: current_map.tree().count, + base_count: base_map.tree().count, + base_kind: CompositeBaseKind::TurboQuantized, + base_manifest: base.manifest_cid().clone(), + base_fingerprint: turboquant_fingerprint(base.config()), + delta_root: delta_tree.root, + shadow_root: shadow_tree.root, + inserted_count: stats.inserted_records as u64, + updated_count: stats.vector_updated_records as u64, + deleted_count: stats.deleted_records as u64, + delta_count: stats.delta_records as u64, + shadow_count: stats.shadow_records as u64, + diff_entries: stats.diff_entries as u64, + value_only_count: stats.value_only_records as u64, + owned_bytes_peak: stats.owned_bytes_peak as u64, + encoded_output_bytes: stats.encoded_output_bytes as u64, + distance_evaluations: stats.distance_evaluations as u64, + config, + }; + let manifest_bytes = loop { + let bytes = object.encode()?; + let total = + checked_add_composite(descendant_bytes, bytes.len(), "encoded_output_bytes")?; + if object.encoded_output_bytes == total as u64 { + break bytes; + } + object.encoded_output_bytes = total as u64; + }; + stats.encoded_output_bytes = object.encoded_output_bytes as usize; + enforce_composite( + "encoded_output_bytes", + limits.max_encoded_output_bytes, + stats.encoded_output_bytes, + )?; + let manifest = Cid::from_bytes(&manifest_bytes); + match target + .get(manifest.as_bytes()) + .await + .map_err(|error| Error::Store(Box::new(error)))? + { + Some(bytes) => { + let actual = Cid::from_bytes(&bytes); + if actual != manifest { + return Err(Error::CidMismatch { + expected: manifest, + actual, + }); + } + } + None => { + let entries = [(manifest.as_bytes(), manifest_bytes.as_slice())]; + target + .publish_nodes(NodePublication::new( + &entries, + PublicationOrigin::Maintenance, + )) + .await + .map_err(|error| Error::Store(Box::new(error)))?; + } + } + let loaded = Self::load(&target, manifest).await?; + Ok(AsyncCompositeBuildOutcome::Composite { + accelerator: Box::new(loaded), + stats, + objects_published: checked_add_composite( + published_descendants, + 1, + "published_objects", + )?, + bytes_published: object.encoded_output_bytes as usize, + }) + } + pub async fn load(store: &S, manifest: Cid) -> Result where S: AsyncStore + Clone, @@ -302,6 +623,9 @@ impl AsyncCompositeAccelerator { CompositeBaseKind::Hnsw => { let index = AsyncHnswIndex::load(store, object.base_manifest.clone()).await?; if index.source != object.base_source + || index.dimensions != object.dimensions + || index.metric != object.metric + || index.count != object.base_count || hnsw_fingerprint(&index.config) != object.base_fingerprint { return Err(invalid("async composite HNSW base binding mismatch")); @@ -312,12 +636,27 @@ impl AsyncCompositeAccelerator { let index = AsyncProductQuantizer::load(store, object.base_manifest.clone()).await?; if index.source != object.base_source + || index.dimensions != object.dimensions + || index.metric != object.metric + || index.count != object.base_count || pq_fingerprint(&index.config) != object.base_fingerprint { return Err(invalid("async composite PQ base binding mismatch")); } AsyncCompositeBase::ProductQuantized(index) } + CompositeBaseKind::TurboQuantized => { + let index = AsyncTurboQuantizer::load(store, object.base_manifest.clone()).await?; + if index.source != object.base_source + || index.dimensions != object.dimensions + || index.metric != object.metric + || index.count != object.base_count + || turboquant_fingerprint(&index.config) != object.base_fingerprint + { + return Err(invalid("async composite TurboQuant base binding mismatch")); + } + AsyncCompositeBase::TurboQuantized(index) + } }; let tree_config = composite_tree_config(); Ok(Self { @@ -366,18 +705,27 @@ impl AsyncCompositeAccelerator { match self.base { AsyncCompositeBase::Hnsw(_) => CompositeBaseKind::Hnsw, AsyncCompositeBase::ProductQuantized(_) => CompositeBaseKind::ProductQuantized, + AsyncCompositeBase::TurboQuantized(_) => CompositeBaseKind::TurboQuantized, } } pub(crate) fn hnsw(&self) -> Option<&AsyncHnswIndex> { match &self.base { AsyncCompositeBase::Hnsw(index) => Some(index), AsyncCompositeBase::ProductQuantized(_) => None, + AsyncCompositeBase::TurboQuantized(_) => None, } } pub(crate) fn pq(&self) -> Option<&AsyncProductQuantizer> { match &self.base { AsyncCompositeBase::ProductQuantized(index) => Some(index), AsyncCompositeBase::Hnsw(_) => None, + AsyncCompositeBase::TurboQuantized(_) => None, + } + } + pub(crate) fn turboquant(&self) -> Option<&AsyncTurboQuantizer> { + match &self.base { + AsyncCompositeBase::TurboQuantized(index) => Some(index), + AsyncCompositeBase::Hnsw(_) | AsyncCompositeBase::ProductQuantized(_) => None, } } } @@ -425,11 +773,721 @@ impl AsyncProductQuantizer { } } +#[derive(Default)] +struct AsyncTurboQuantBuildState { + encoded_vectors: usize, + zero_vectors: usize, + transformed_components: usize, + butterfly_operations: usize, + transform_operations: usize, + quality_sum: f64, + quality_maximum: f64, + peak_temporary_bytes: usize, +} + +#[allow(clippy::too_many_arguments)] +async fn append_turboquant_batch( + builder: &mut AsyncSortedBatchBuilder, + batch: Vec<(Vec, Vec)>, + plan: &StructuredRotation, + config: &TurboQuantizationConfig, + worker_threads: usize, + per_worker_buffers: usize, + packed_len: usize, + pool: Option<&rayon::ThreadPool>, + limits: &TurboQuantizationBuildLimits, + state: &mut AsyncTurboQuantBuildState, +) -> Result<(), Error> +where + S: AsyncStore, + S::Error: Send + Sync, +{ + if batch.is_empty() { + return Ok(()); + } + let batch_records = batch.len(); + let batch_input_bytes = batch.iter().try_fold(0usize, |total, (key, vector)| { + total + .checked_add(key.len()) + .and_then(|value| value.checked_add(vector.len().checked_mul(4)?)) + .ok_or_else(|| { + turboquant_resource_limit("TurboQuant temporary bytes", usize::MAX, usize::MAX) + }) + })?; + let encoded_value_bytes = 8usize.checked_add(packed_len).ok_or_else(|| { + turboquant_resource_limit("TurboQuant temporary bytes", usize::MAX, usize::MAX) + })?; + let physical_peak = turboquant_temporary_peak_bytes( + plan.owned_bytes(), + per_worker_buffers, + worker_threads, + builder.retained_payload_bytes().map_err(|_| { + turboquant_resource_limit("TurboQuant temporary bytes", usize::MAX, usize::MAX) + })?, + batch_input_bytes, + batch_records, + encoded_value_bytes, + )?; + enforce_resource( + "TurboQuant temporary bytes", + limits.max_temporary_bytes, + physical_peak, + )?; + let logical_peak = turboquant_temporary_peak_bytes( + plan.owned_bytes(), + per_worker_buffers, + 1, + builder.retained_payload_bytes().map_err(|_| { + turboquant_resource_limit("TurboQuant temporary bytes", usize::MAX, usize::MAX) + })?, + batch_input_bytes, + batch_records, + encoded_value_bytes, + )?; + state.peak_temporary_bytes = state.peak_temporary_bytes.max(logical_peak); + + let dimensions = plan.dimensions(); + let sqrt_dimensions = sqrt_down(dimensions as f64); + let codebook = turboquant_codebook(config.bit_width); + let encoded = if let Some(pool) = pool { + pool.install(|| { + batch + .into_par_iter() + .map_init( + || EncodingScratch::new(dimensions, packed_len), + |scratch, (key, vector)| { + let encoded = encode_vector_reusing( + &vector, + plan, + codebook, + config.bit_width, + sqrt_dimensions, + scratch, + ); + (key, encoded) + }, + ) + .collect::>() + }) + } else { + let mut scratch = EncodingScratch::new(dimensions, packed_len); + batch + .into_iter() + .map(|(key, vector)| { + let encoded = encode_vector_reusing( + &vector, + plan, + codebook, + config.bit_width, + sqrt_dimensions, + &mut scratch, + ); + (key, encoded) + }) + .collect() + }; + for (key, encoded) in encoded { + let encoded = encoded?; + if encoded.zero { + state.zero_vectors = state.zero_vectors.saturating_add(1); + } else { + state.transformed_components = state + .transformed_components + .checked_add(dimensions) + .ok_or_else(|| { + turboquant_resource_limit( + "TurboQuant transform operations", + usize::MAX, + usize::MAX, + ) + })?; + state.butterfly_operations = state + .butterfly_operations + .checked_add(plan.butterfly_operations_per_vector()) + .ok_or_else(|| { + turboquant_resource_limit( + "TurboQuant transform operations", + usize::MAX, + usize::MAX, + ) + })?; + state.transform_operations = state + .transform_operations + .checked_add(plan.operations_per_vector()) + .ok_or_else(|| { + turboquant_resource_limit( + "TurboQuant transform operations", + usize::MAX, + usize::MAX, + ) + })?; + enforce_resource( + "TurboQuant transform operations", + limits.max_transform_operations, + state.transform_operations, + )?; + } + state.quality_sum += encoded.error; + state.quality_maximum = state.quality_maximum.max(encoded.error); + builder.add(key, encoded.bytes).await?; + let builder_peak = builder.peak_retained_payload_bytes(); + let physical_peak = turboquant_temporary_peak_bytes( + plan.owned_bytes(), + per_worker_buffers, + worker_threads, + builder_peak, + batch_input_bytes, + batch_records, + encoded_value_bytes, + )?; + enforce_resource( + "TurboQuant temporary bytes", + limits.max_temporary_bytes, + physical_peak, + )?; + let logical_peak = turboquant_temporary_peak_bytes( + plan.owned_bytes(), + per_worker_buffers, + 1, + builder_peak, + batch_input_bytes, + batch_records, + encoded_value_bytes, + )?; + state.peak_temporary_bytes = state.peak_temporary_bytes.max(logical_peak); + state.encoded_vectors += 1; + } + Ok(()) +} + +impl AsyncTurboQuantizer { + pub async fn load(store: &S, manifest: Cid) -> Result + where + S: AsyncStore, + S::Error: Send + Sync, + { + let bytes = load_content(store, &manifest).await?; + let object = TurboQuantManifest::decode(&bytes)?; + object.config.validate(object.dimensions)?; + let root_bytes = load_content(store, &object.code_root).await?; + validate_turboquant_code_tree_root(&root_bytes, object.count)?; + Ok(Self { + manifest, + source: object.source, + dimensions: object.dimensions, + metric: object.metric, + count: object.count, + config: object.config, + code_tree: Tree { + root: Some(object.code_root), + config: turboquant_code_tree_config(), + }, + quality: object.quality, + zero_vectors: object.zero_vectors, + }) + } + + pub async fn build( + map: &crate::prolly::proximity::AsyncProximityMap, + config: TurboQuantizationConfig, + parallelism: BuildParallelism, + ) -> Result<(Self, TurboQuantizationBuildStats), Error> + where + S: AsyncStore + Clone, + S::Error: Send + Sync, + { + Self::build_with_limits( + map, + config, + parallelism, + TurboQuantizationBuildLimits::default(), + 1_024, + &ContentGraphLimits::default(), + ) + .await + } + + pub async fn build_with_limits( + map: &crate::prolly::proximity::AsyncProximityMap, + config: TurboQuantizationConfig, + parallelism: BuildParallelism, + limits: TurboQuantizationBuildLimits, + publication_batch_items: usize, + graph_limits: &ContentGraphLimits, + ) -> Result<(Self, TurboQuantizationBuildStats), Error> + where + S: AsyncStore + Clone, + S::Error: Send + Sync, + { + if publication_batch_items == 0 { + return Err(Error::InvalidProximityConfig { + reason: "TurboQuant publication batch size must be positive".to_owned(), + }); + } + limits.validate()?; + let dimensions = map.tree().config.dimensions; + config.validate(dimensions)?; + let records = usize::try_from(map.tree().count) + .map_err(|_| turboquant_resource_limit("TurboQuant records", usize::MAX, usize::MAX))?; + if records == 0 { + return Err(Error::InvalidProximityConfig { + reason: "TurboQuant requires a non-empty source map".to_owned(), + }); + } + enforce_resource("TurboQuant records", limits.max_records, records)?; + enforce_resource( + "TurboQuant worker threads", + limits.max_worker_threads, + parallelism.threads(), + )?; + + let dimensions_usize = dimensions as usize; + let input_bytes = records + .checked_mul(dimensions_usize) + .and_then(|value| value.checked_mul(4)) + .ok_or_else(|| { + turboquant_resource_limit("TurboQuant input bytes", usize::MAX, usize::MAX) + })?; + enforce_resource( + "TurboQuant input bytes", + limits.max_input_bytes, + input_bytes, + )?; + let packed_len = turboquant_packed_len(dimensions_usize, config.bit_width)?; + let encoded_output_bytes = records + .checked_mul(8usize.checked_add(packed_len).ok_or_else(|| { + turboquant_resource_limit("TurboQuant encoded output bytes", usize::MAX, usize::MAX) + })?) + .ok_or_else(|| { + turboquant_resource_limit("TurboQuant encoded output bytes", usize::MAX, usize::MAX) + })?; + enforce_resource( + "TurboQuant encoded output bytes", + limits.max_encoded_output_bytes, + encoded_output_bytes, + )?; + + let plan = StructuredRotation::derive(dimensions_usize, config.seed)?; + let per_worker_buffers = dimensions_usize + .checked_mul(25) + .and_then(|value| value.checked_add(packed_len)) + .ok_or_else(|| { + turboquant_resource_limit("TurboQuant temporary bytes", usize::MAX, usize::MAX) + })?; + let encoded_value_bytes = 8usize.checked_add(packed_len).ok_or_else(|| { + turboquant_resource_limit("TurboQuant temporary bytes", usize::MAX, usize::MAX) + })?; + let minimum_input_bytes = dimensions_usize.checked_mul(4).ok_or_else(|| { + turboquant_resource_limit("TurboQuant temporary bytes", usize::MAX, usize::MAX) + })?; + let required_temporary_bytes = turboquant_temporary_peak_bytes( + plan.owned_bytes(), + per_worker_buffers, + parallelism.threads(), + 0, + minimum_input_bytes, + 1, + encoded_value_bytes, + )?; + enforce_resource( + "TurboQuant temporary bytes", + limits.max_temporary_bytes, + required_temporary_bytes, + )?; + + let target = map.store_clone(); + let code_config = turboquant_code_tree_config(); + let builder_publication_batch_items = if limits.max_temporary_bytes.is_some() { + 1 + } else { + publication_batch_items.min(super::turboquant::CODE_TREE_PUBLICATION_BATCH_ITEMS) + }; + let mut builder = AsyncSortedBatchBuilder::new_with_origin_and_batch_size( + target.clone(), + code_config.clone(), + PublicationOrigin::Maintenance, + builder_publication_batch_items, + ); + let pool = (parallelism.threads() > 1) + .then(|| { + rayon::ThreadPoolBuilder::new() + .num_threads(parallelism.threads()) + .build() + }) + .transpose() + .map_err(|_| Error::InvalidProximityConfig { + reason: "cannot create TurboQuant worker pool".to_owned(), + })?; + let mut state = AsyncTurboQuantBuildState { + peak_temporary_bytes: turboquant_temporary_peak_bytes( + plan.owned_bytes(), + per_worker_buffers, + 1, + 0, + minimum_input_bytes, + 1, + encoded_value_bytes, + )?, + ..Default::default() + }; + const ENCODE_BATCH_RECORDS: usize = 128; + let mut batch = if limits.max_temporary_bytes.is_some() { + Vec::new() + } else { + Vec::with_capacity(ENCODE_BATCH_RECORDS) + }; + let mut batch_input_bytes = 0usize; + let mut source = map + .directory + .range(&map.tree().directory, &[], None) + .await?; + while let Some(entry) = source.next().await { + let (key, bytes) = entry?; + let mut next_batch_input_bytes = batch_input_bytes; + if let Some(limit) = limits.max_temporary_bytes { + let record_input_bytes = + key.len().checked_add(minimum_input_bytes).ok_or_else(|| { + turboquant_resource_limit( + "TurboQuant temporary bytes", + usize::MAX, + usize::MAX, + ) + })?; + let mut projected_input_bytes = batch_input_bytes + .checked_add(record_input_bytes) + .ok_or_else(|| { + turboquant_resource_limit("TurboQuant temporary bytes", usize::MAX, usize::MAX) + })?; + let mut projected_builder_bytes = builder + .retained_payload_bytes() + .map_err(|_| { + turboquant_resource_limit( + "TurboQuant temporary bytes", + usize::MAX, + usize::MAX, + ) + })? + .checked_add(key.len()) + .and_then(|bytes| bytes.checked_add(encoded_value_bytes)) + .ok_or_else(|| { + turboquant_resource_limit( + "TurboQuant temporary bytes", + usize::MAX, + usize::MAX, + ) + })? + .max(builder.peak_retained_payload_bytes()); + let mut projected_peak = turboquant_temporary_peak_bytes( + plan.owned_bytes(), + per_worker_buffers, + parallelism.threads(), + projected_builder_bytes, + projected_input_bytes, + batch.len() + 1, + encoded_value_bytes, + )?; + if projected_peak > limit && !batch.is_empty() { + append_turboquant_batch( + &mut builder, + std::mem::take(&mut batch), + &plan, + &config, + parallelism.threads(), + per_worker_buffers, + packed_len, + pool.as_ref(), + &limits, + &mut state, + ) + .await?; + projected_input_bytes = record_input_bytes; + projected_builder_bytes = builder + .retained_payload_bytes() + .map_err(|_| { + turboquant_resource_limit( + "TurboQuant temporary bytes", + usize::MAX, + usize::MAX, + ) + })? + .checked_add(key.len()) + .and_then(|bytes| bytes.checked_add(encoded_value_bytes)) + .ok_or_else(|| { + turboquant_resource_limit( + "TurboQuant temporary bytes", + usize::MAX, + usize::MAX, + ) + })? + .max(builder.peak_retained_payload_bytes()); + projected_peak = turboquant_temporary_peak_bytes( + plan.owned_bytes(), + per_worker_buffers, + parallelism.threads(), + projected_builder_bytes, + projected_input_bytes, + 1, + encoded_value_bytes, + )?; + } + enforce_resource("TurboQuant temporary bytes", Some(limit), projected_peak)?; + next_batch_input_bytes = projected_input_bytes; + } + let stored = StoredRecord::decode(&bytes, dimensions)?; + batch.push((key, stored.vector)); + batch_input_bytes = next_batch_input_bytes; + if batch.len() == ENCODE_BATCH_RECORDS { + append_turboquant_batch( + &mut builder, + std::mem::take(&mut batch), + &plan, + &config, + parallelism.threads(), + per_worker_buffers, + packed_len, + pool.as_ref(), + &limits, + &mut state, + ) + .await?; + batch_input_bytes = 0; + } + } + append_turboquant_batch( + &mut builder, + batch, + &plan, + &config, + parallelism.threads(), + per_worker_buffers, + packed_len, + pool.as_ref(), + &limits, + &mut state, + ) + .await?; + if state.encoded_vectors != records { + return Err(invalid_turboquant_object( + "TurboQuant source count changed during async build", + )); + } + let (code_tree, builder_peak) = builder.build_with_retained_payload_peak().await?; + let final_physical_peak = turboquant_temporary_peak_bytes( + plan.owned_bytes(), + 0, + 0, + builder_peak, + 0, + 0, + encoded_value_bytes, + )?; + enforce_resource( + "TurboQuant temporary bytes", + limits.max_temporary_bytes, + final_physical_peak, + )?; + state.peak_temporary_bytes = state.peak_temporary_bytes.max(final_physical_peak); + let code_root = code_tree.root.clone().ok_or_else(|| { + invalid_turboquant_object("TurboQuant requires a non-empty code tree") + })?; + let quality = turboquant_quality_from_totals( + state.quality_sum, + state.quality_maximum, + state.encoded_vectors as u64, + )?; + let manifest_object = TurboQuantManifest { + source: map.tree().descriptor.clone(), + dimensions, + metric: map.tree().config.metric, + count: map.tree().count, + config: config.clone(), + transform_id: super::turboquant::STRUCTURED_ROTATION_ID, + codebook_id: super::turboquant::NORMAL_LLOYD_MAX_CODEBOOK_ID, + code_root, + quality, + zero_vectors: state.zero_vectors as u64, + }; + let manifest_bytes = manifest_object.encode()?; + let manifest = Cid::from_bytes(&manifest_bytes); + match target + .get(manifest.as_bytes()) + .await + .map_err(|error| Error::Store(Box::new(error)))? + { + Some(bytes) => { + let actual = Cid::from_bytes(&bytes); + if actual != manifest { + return Err(Error::CidMismatch { + expected: manifest, + actual, + }); + } + } + None => { + let entries = [(manifest.as_bytes(), manifest_bytes.as_slice())]; + target + .publish_nodes(NodePublication::new( + &entries, + PublicationOrigin::Maintenance, + )) + .await + .map_err(|error| Error::Store(Box::new(error)))?; + } + } + let root = TypedContentRoot::new(ContentObjectKind::TurboQuantization, manifest.clone()); + walk_content_graph_async(&target, &[root], graph_limits).await?; + Ok(( + Self::load(&target, manifest).await?, + TurboQuantizationBuildStats { + encoded_vectors: state.encoded_vectors, + zero_vectors: state.zero_vectors, + transformed_components: state.transformed_components, + butterfly_operations: state.butterfly_operations, + input_bytes, + encoded_output_bytes, + peak_temporary_bytes: state.peak_temporary_bytes, + }, + )) + } + + pub async fn search( + &self, + map: &crate::prolly::proximity::AsyncProximityMap, + request: crate::prolly::proximity::SearchRequest<'_>, + control: crate::prolly::proximity::AsyncSearchControl, + ) -> Result + where + S: AsyncStore + Clone, + S::Error: Send + Sync, + { + let runtime_map = + map.bind_search_runtime(Arc::new(crate::prolly::proximity::SearchRuntime::default())); + let set = AsyncAcceleratorSet::empty().with_turboquant(runtime_map.tree(), self.clone())?; + runtime_map + .search_with_accelerators(&set, request, control) + .await + } + + pub async fn verify( + &self, + map: &crate::prolly::proximity::AsyncProximityMap, + limits: &ContentGraphLimits, + ) -> Result + where + S: AsyncStore + Clone, + S::Error: Send + Sync, + { + if self.source != map.tree().descriptor + || self.dimensions != map.tree().config.dimensions + || self.metric != map.tree().config.metric + || self.count != map.tree().count + { + return Err(invalid("async TurboQuant source binding mismatch")); + } + crate::prolly::content_graph::walk_content_graph_async( + &map.store_clone(), + &[TypedContentRoot::new( + ContentObjectKind::TurboQuantization, + self.manifest.clone(), + )], + limits, + ) + .await?; + let store = map.store_clone(); + let codes = AsyncProlly::new(store, self.code_tree.config.clone()); + let mut source = map + .directory + .range(&map.tree().directory, &[], None) + .await?; + let mut encoded = codes.range(&self.code_tree, &[], None).await?; + let plan = StructuredRotation::derive(self.dimensions as usize, self.config.seed)?; + let packed_len = turboquant_packed_len(self.dimensions as usize, self.config.bit_width)?; + let mut scratch = EncodingScratch::new(self.dimensions as usize, packed_len); + let mut count = 0u64; + let mut zeros = 0u64; + let mut quality_sum = 0.0; + let mut quality_maximum = 0.0f64; + loop { + match (source.next().await, encoded.next().await) { + (None, None) => break, + (Some(source), Some(code)) => { + let (source_key, source_bytes) = source?; + let (code_key, actual) = code?; + if source_key != code_key { + return Err(invalid_turboquant_object( + "TurboQuant source and code keys do not match", + )); + } + let stored = StoredRecord::decode(&source_bytes, self.dimensions)?; + let expected = encode_vector_reusing( + &stored.vector, + &plan, + turboquant_codebook(self.config.bit_width), + self.config.bit_width, + sqrt_down(f64::from(self.dimensions)), + &mut scratch, + )?; + if actual != expected.bytes { + return Err(invalid_turboquant_object( + "TurboQuant code disagrees with authoritative source vector", + )); + } + count += 1; + zeros += u64::from(expected.zero); + quality_sum += expected.error; + quality_maximum = quality_maximum.max(expected.error); + } + _ => { + return Err(invalid_turboquant_object( + "TurboQuant source and code counts do not match", + )); + } + } + } + if count != self.count || zeros != self.zero_vectors { + return Err(invalid_turboquant_object( + "TurboQuant verified counts disagree with manifest", + )); + } + let quality = turboquant_quality_from_totals(quality_sum, quality_maximum, count)?; + if quality.mean_squared_error.to_bits() != self.quality.mean_squared_error.to_bits() + || quality.maximum_squared_error.to_bits() + != self.quality.maximum_squared_error.to_bits() + { + return Err(invalid_turboquant_object( + "TurboQuant quality measurements disagree with manifest", + )); + } + Ok(TurboQuantizationVerification { + encoded_vectors: count, + zero_vectors: zeros, + quality, + }) + } + + pub fn manifest_cid(&self) -> &Cid { + &self.manifest + } + pub fn source_descriptor(&self) -> &Cid { + &self.source + } + pub fn config(&self) -> &TurboQuantizationConfig { + &self.config + } + pub fn quality(&self) -> TurboQuantizationQuality { + self.quality + } + pub fn zero_vectors(&self) -> u64 { + self.zero_vectors + } +} + /// Source-bound async accelerator capabilities available to one logical search. #[derive(Clone, Default)] pub struct AsyncAcceleratorSet { hnsw: Option, pq: Option, + turboquant: Option, composite: Option, } @@ -498,12 +1556,35 @@ impl AsyncAcceleratorSet { Ok(self) } + pub fn with_turboquant( + mut self, + source: &ProximityTree, + index: AsyncTurboQuantizer, + ) -> Result { + if self.turboquant.is_some() { + return Err(invalid("duplicate TurboQuant accelerator")); + } + validate_binding( + source, + &index.source, + index.dimensions, + index.metric, + index.count, + "TurboQuant", + )?; + self.turboquant = Some(index); + Ok(self) + } + pub(crate) fn hnsw(&self) -> Option<&AsyncHnswIndex> { self.hnsw.as_ref() } pub(crate) fn pq(&self) -> Option<&AsyncProductQuantizer> { self.pq.as_ref() } + pub(crate) fn turboquant(&self) -> Option<&AsyncTurboQuantizer> { + self.turboquant.as_ref() + } pub(crate) fn composite(&self) -> Option<&AsyncCompositeAccelerator> { self.composite.as_ref() } @@ -545,6 +1626,13 @@ impl AsyncAcceleratorCatalog { manifest: index.manifest_cid().clone(), }); } + if let Some(index) = accelerators.turboquant() { + entries.push(AcceleratorCatalogEntry { + kind: CatalogAcceleratorKind::TurboQuantized, + configuration_fingerprint: turboquant_fingerprint(index.config()), + manifest: index.manifest_cid().clone(), + }); + } if let Some(index) = accelerators.composite() { entries.push(AcceleratorCatalogEntry { kind: CatalogAcceleratorKind::Composite, @@ -573,8 +1661,8 @@ impl AsyncAcceleratorCatalog { Self::load(store, manifest, source).await } - /// Construct canonical HNSW/PQ sidecars from an async-only source and - /// publish their complete catalog closure in bounded provider batches. + /// Construct canonical sidecars from an async-only source and publish + /// their complete catalog closure in bounded provider batches. pub async fn build( map: &crate::prolly::proximity::AsyncProximityMap, options: AsyncAcceleratorBuildOptions, @@ -583,69 +1671,115 @@ impl AsyncAcceleratorCatalog { S: AsyncStore + Clone, S::Error: Send + Sync, { - if options.publication_batch_items == 0 { + let AsyncAcceleratorBuildOptions { + hnsw, + product_quantizer, + turboquant, + publication_batch_items, + graph_limits, + } = options; + if publication_batch_items == 0 { return Err(Error::InvalidProximityConfig { reason: "accelerator publication batch size must be greater than zero".to_owned(), }); } - if options.hnsw.is_none() && options.product_quantizer.is_none() { + if hnsw.is_none() && product_quantizer.is_none() && turboquant.is_none() { return Err(invalid("async accelerator build plan is empty")); } - // CPU builders remain runtime-neutral and deterministic. Staging in a - // memory Store lets async-only applications use those canonical - // builders without requiring a synchronous remote adapter. - let records = map.collect_records().await?; - let staging = Arc::new(MemStore::new()); - let staged_map = ProximityMap::build( - staging.clone(), - map.tree().config.clone(), - records.into_values(), - )?; - if staged_map.tree() != map.tree() { - return Err(invalid( - "async accelerator staging did not reproduce the source descriptor", - )); + let store = map.store_clone(); + let mut stats = AsyncAcceleratorBuildStats::default(); + let mut accelerators = AsyncAcceleratorSet::empty(); + + // HNSW and PQ retain their established canonical staging path. Do not + // make TurboQuant pay that unbounded corpus-copy cost: its async + // builder streams directly from the immutable source directory. + if hnsw.is_some() || product_quantizer.is_some() { + let records = map.collect_records().await?; + let staging = Arc::new(MemStore::new()); + let staged_map = ProximityMap::build( + staging.clone(), + map.tree().config.clone(), + records.into_values(), + )?; + if staged_map.tree() != map.tree() { + return Err(invalid( + "async accelerator staging did not reproduce the source descriptor", + )); + } + let mut roots = Vec::new(); + let mut hnsw_manifest = None; + let mut pq_manifest = None; + if let Some(build) = hnsw { + let (index, built) = + HnswIndex::build_with_limits(&staged_map, build.config, build.limits)?; + let manifest = index.manifest_cid().clone(); + roots.push(TypedContentRoot::new( + ContentObjectKind::HnswManifest, + manifest.clone(), + )); + hnsw_manifest = Some(manifest); + stats.hnsw = Some(built); + } + if let Some(build) = product_quantizer { + let (index, built) = ProductQuantizer::build_with_limits( + &staged_map, + build.config, + build.parallelism, + build.limits, + )?; + let manifest = index.manifest_cid().clone(); + roots.push(TypedContentRoot::new( + ContentObjectKind::ProductQuantization, + manifest.clone(), + )); + pq_manifest = Some(manifest); + stats.product_quantizer = Some(built); + } + let walk = walk_content_graph(&staging, &roots, &graph_limits)?; + for chunk in walk.objects.chunks(publication_batch_items) { + let entries = chunk + .iter() + .map(|object| (object.root.cid.as_bytes(), object.bytes.as_slice())) + .collect::>(); + store + .publish_nodes(NodePublication::new( + &entries, + PublicationOrigin::Maintenance, + )) + .await + .map_err(|error| Error::Store(Box::new(error)))?; + } + if let Some(manifest) = hnsw_manifest { + accelerators = accelerators + .with_hnsw(map.tree(), AsyncHnswIndex::load(&store, manifest).await?)?; + } + if let Some(manifest) = pq_manifest { + accelerators = accelerators.with_pq( + map.tree(), + AsyncProductQuantizer::load(&store, manifest).await?, + )?; + } } - let mut stats = AsyncAcceleratorBuildStats::default(); - let mut set = AcceleratorSet::empty(); - if let Some(build) = options.hnsw { - let (index, built) = - HnswIndex::build_with_limits(&staged_map, build.config, build.limits)?; - stats.hnsw = Some(built); - set = set.with_hnsw(staged_map.tree(), index)?; - } - if let Some(build) = options.product_quantizer { - let (index, built) = ProductQuantizer::build_with_limits( - &staged_map, + if let Some(build) = turboquant { + let (index, built) = AsyncTurboQuantizer::build_with_limits( + map, build.config, build.parallelism, build.limits, - )?; - stats.product_quantizer = Some(built); - set = set.with_pq(staged_map.tree(), index)?; + publication_batch_items, + &graph_limits, + ) + .await?; + stats.turboquant = Some(built); + accelerators = accelerators.with_turboquant(map.tree(), index)?; } - let catalog = AcceleratorCatalog::build(staging.clone(), staged_map.tree(), set)?; - let manifest = catalog.manifest_cid().clone(); - let walk = walk_content_graph(&staging, &[catalog.typed_root()], &options.graph_limits)?; + + let catalog = Self::publish(&store, map.tree(), accelerators).await?; + let walk = walk_content_graph_async(&store, &[catalog.typed_root()], &graph_limits).await?; stats.objects_published = walk.objects.len(); stats.bytes_published = walk.total_bytes; - let store = map.store_clone(); - for chunk in walk.objects.chunks(options.publication_batch_items) { - let entries = chunk - .iter() - .map(|object| (object.root.cid.as_bytes(), object.bytes.as_slice())) - .collect::>(); - store - .publish_nodes(NodePublication::new( - &entries, - PublicationOrigin::Maintenance, - )) - .await - .map_err(|error| Error::Store(Box::new(error)))?; - } - let catalog = Self::load(&store, manifest, map.tree()).await?; Ok((catalog, stats)) } @@ -683,6 +1817,13 @@ impl AsyncAcceleratorCatalog { } accelerators.with_composite(source, index)? } + CatalogAcceleratorKind::TurboQuantized => { + let index = AsyncTurboQuantizer::load(store, entry.manifest.clone()).await?; + if turboquant_fingerprint(index.config()) != entry.configuration_fingerprint { + return Err(invalid("catalog TurboQuant fingerprint mismatch")); + } + accelerators.with_turboquant(source, index)? + } }; } Ok(Self { diff --git a/src/prolly/proximity/accelerator/catalog.rs b/src/prolly/proximity/accelerator/catalog.rs index b2efbee3..ee61576e 100644 --- a/src/prolly/proximity/accelerator/catalog.rs +++ b/src/prolly/proximity/accelerator/catalog.rs @@ -1,7 +1,8 @@ use super::composite::{config_fingerprint as composite_fingerprint, CompositeAccelerator}; use super::hnsw::storage::config_fingerprint as hnsw_fingerprint; use super::pq::config_fingerprint as pq_fingerprint; -use super::{AcceleratorSet, HnswIndex, ProductQuantizer}; +use super::turboquant::config_fingerprint as turboquant_fingerprint; +use super::{AcceleratorSet, HnswIndex, ProductQuantizer, TurboQuantizer}; use crate::prolly::cid::Cid; use crate::prolly::content_graph::{ContentObjectKind, TypedContentRoot}; use crate::prolly::error::Error; @@ -17,6 +18,7 @@ pub enum CatalogAcceleratorKind { Hnsw, ProductQuantized, Composite, + TurboQuantized, } impl CatalogAcceleratorKind { @@ -25,6 +27,7 @@ impl CatalogAcceleratorKind { Self::Hnsw => 1, Self::ProductQuantized => 2, Self::Composite => 3, + Self::TurboQuantized => 4, } } @@ -33,6 +36,7 @@ impl CatalogAcceleratorKind { 1 => Ok(Self::Hnsw), 2 => Ok(Self::ProductQuantized), 3 => Ok(Self::Composite), + 4 => Ok(Self::TurboQuantized), _ => Err(invalid("unknown catalog accelerator kind")), } } @@ -111,6 +115,13 @@ where } accelerators.with_composite(source, index)? } + CatalogAcceleratorKind::TurboQuantized => { + let index = TurboQuantizer::load(store.clone(), entry.manifest.clone())?; + if turboquant_fingerprint(index.config()) != entry.configuration_fingerprint { + return Err(invalid("catalog TurboQuant fingerprint mismatch")); + } + accelerators.with_turboquant(source, index)? + } }; } Ok(Self { @@ -161,6 +172,13 @@ where manifest: index.manifest_cid().clone(), }); } + if let Some(index) = set.turboquant() { + entries.push(AcceleratorCatalogEntry { + kind: CatalogAcceleratorKind::TurboQuantized, + configuration_fingerprint: turboquant_fingerprint(index.config()), + manifest: index.manifest_cid().clone(), + }); + } if let Some(index) = set.composite() { entries.push(AcceleratorCatalogEntry { kind: CatalogAcceleratorKind::Composite, @@ -289,3 +307,51 @@ fn invalid(reason: impl Into) -> Error { reason: reason.into(), } } + +#[cfg(test)] +mod tests { + use super::*; + + fn entry(kind: CatalogAcceleratorKind, label: &[u8]) -> AcceleratorCatalogEntry { + AcceleratorCatalogEntry { + kind, + configuration_fingerprint: Cid::from_bytes(&[label, b"-config"].concat()), + manifest: Cid::from_bytes(&[label, b"-manifest"].concat()), + } + } + + #[test] + fn manifest_requires_appended_turboquant_kind_to_be_sorted_and_unique() { + let source = Cid::from_bytes(b"source"); + let hnsw = entry(CatalogAcceleratorKind::Hnsw, b"hnsw"); + let turboquant = entry(CatalogAcceleratorKind::TurboQuantized, b"turboquant"); + let canonical = Manifest { + source: source.clone(), + entries: vec![hnsw.clone(), turboquant.clone()], + }; + let decoded = Manifest::decode(&canonical.encode().unwrap()).unwrap(); + assert_eq!(decoded.source, source); + assert_eq!(decoded.entries, vec![hnsw.clone(), turboquant.clone()]); + + for entries in [ + vec![turboquant.clone(), hnsw], + vec![turboquant.clone(), turboquant], + ] { + match (Manifest { + source: source.clone(), + entries, + }) + .encode() + { + Err(Error::InvalidProximityObject { kind, reason }) => { + assert_eq!(kind, "accelerator catalog"); + assert_eq!( + reason, + "catalog entries must be sorted, unique, and contain one entry per kind" + ); + } + _ => panic!("unsorted or duplicate TurboQuant catalog must fail closed"), + } + } + } +} diff --git a/src/prolly/proximity/accelerator/composite.rs b/src/prolly/proximity/accelerator/composite.rs index b7b265de..53bd92a1 100644 --- a/src/prolly/proximity/accelerator/composite.rs +++ b/src/prolly/proximity/accelerator/composite.rs @@ -1,6 +1,7 @@ use super::hnsw::storage::config_fingerprint as hnsw_fingerprint; use super::pq::config_fingerprint as pq_fingerprint; -use super::{HnswIndex, ProductQuantizer}; +use super::turboquant::config_fingerprint as turboquant_fingerprint; +use super::{HnswIndex, ProductQuantizer, TurboQuantizer}; use crate::prolly::builder::SortedBatchBuilder; use crate::prolly::cid::Cid; use crate::prolly::config::Config; @@ -14,6 +15,7 @@ use crate::prolly::proximity::storage::StoredRecord; use crate::prolly::proximity::{ BuildParallelism, DistanceMetric, HnswBuildLimits, HnswBuildStats, ProductQuantizationBuildLimits, ProductQuantizationBuildStats, ProximityMap, ProximityTree, + TurboQuantizationBuildLimits, TurboQuantizationBuildStats, }; use crate::prolly::store::{NodePublication, PublicationOrigin, Store}; use crate::prolly::tree::Tree; @@ -25,6 +27,7 @@ const VERSION: u8 = 1; pub enum CompositeBaseKind { Hnsw, ProductQuantized, + TurboQuantized, } impl CompositeBaseKind { @@ -32,6 +35,7 @@ impl CompositeBaseKind { match self { Self::Hnsw => 1, Self::ProductQuantized => 2, + Self::TurboQuantized => 3, } } @@ -39,6 +43,7 @@ impl CompositeBaseKind { match id { 1 => Ok(Self::Hnsw), 2 => Ok(Self::ProductQuantized), + 3 => Ok(Self::TurboQuantized), _ => Err(invalid_object("unknown composite base accelerator kind")), } } @@ -47,6 +52,7 @@ impl CompositeBaseKind { pub enum CompositeBase { Hnsw(HnswIndex), ProductQuantized(ProductQuantizer), + TurboQuantized(TurboQuantizer), } impl CompositeBase @@ -58,6 +64,7 @@ where match self { Self::Hnsw(_) => CompositeBaseKind::Hnsw, Self::ProductQuantized(_) => CompositeBaseKind::ProductQuantized, + Self::TurboQuantized(_) => CompositeBaseKind::TurboQuantized, } } @@ -65,6 +72,7 @@ where match self { Self::Hnsw(index) => index.manifest_cid(), Self::ProductQuantized(index) => index.manifest_cid(), + Self::TurboQuantized(index) => index.manifest_cid(), } } @@ -72,6 +80,7 @@ where match self { Self::Hnsw(index) => index.source_descriptor(), Self::ProductQuantized(index) => index.source_descriptor(), + Self::TurboQuantized(index) => index.source_descriptor(), } } @@ -79,6 +88,31 @@ where match self { Self::Hnsw(index) => hnsw_fingerprint(index.config()), Self::ProductQuantized(index) => pq_fingerprint(index.config()), + Self::TurboQuantized(index) => turboquant_fingerprint(index.config()), + } + } + + fn dimensions(&self) -> u32 { + match self { + Self::Hnsw(index) => index.dimensions, + Self::ProductQuantized(index) => index.dimensions, + Self::TurboQuantized(index) => index.dimensions, + } + } + + fn metric(&self) -> DistanceMetric { + match self { + Self::Hnsw(index) => index.metric, + Self::ProductQuantized(index) => index.metric, + Self::TurboQuantized(index) => index.metric, + } + } + + fn count(&self) -> u64 { + match self { + Self::Hnsw(index) => index.count, + Self::ProductQuantized(index) => index.count, + Self::TurboQuantized(index) => index.count, } } @@ -86,6 +120,7 @@ where match self { Self::Hnsw(index) => Some(index), Self::ProductQuantized(_) => None, + Self::TurboQuantized(_) => None, } } @@ -93,6 +128,14 @@ where match self { Self::ProductQuantized(index) => Some(index), Self::Hnsw(_) => None, + Self::TurboQuantized(_) => None, + } + } + + pub(crate) fn turboquant(&self) -> Option<&TurboQuantizer> { + match self { + Self::TurboQuantized(index) => Some(index), + Self::Hnsw(_) | Self::ProductQuantized(_) => None, } } } @@ -143,7 +186,7 @@ pub struct CompositeBuildLimits { } impl CompositeBuildLimits { - fn validate(&self) -> Result<(), Error> { + pub(crate) fn validate(&self) -> Result<(), Error> { for (resource, value) in [ ("diff_entries", self.max_diff_entries), ("owned_bytes", self.max_owned_bytes), @@ -199,6 +242,8 @@ pub struct CompositeRebuildOptions { pub hnsw_limits: HnswBuildLimits, pub pq_parallelism: BuildParallelism, pub pq_limits: ProductQuantizationBuildLimits, + pub turboquant_parallelism: BuildParallelism, + pub turboquant_limits: TurboQuantizationBuildLimits, } impl Default for CompositeRebuildOptions { @@ -207,6 +252,8 @@ impl Default for CompositeRebuildOptions { hnsw_limits: HnswBuildLimits::default(), pq_parallelism: BuildParallelism::serial(), pq_limits: ProductQuantizationBuildLimits::default(), + turboquant_parallelism: BuildParallelism::serial(), + turboquant_limits: TurboQuantizationBuildLimits::default(), } } } @@ -232,6 +279,12 @@ pub enum CompositeBuildOrRebuildOutcome { composite_stats: CompositeBuildStats, rebuild_stats: ProductQuantizationBuildStats, }, + TurboQuantizedRebuilt { + accelerator: Box>, + reasons: Vec, + composite_stats: CompositeBuildStats, + rebuild_stats: TurboQuantizationBuildStats, + }, } pub struct CompositeAccelerator { @@ -269,12 +322,16 @@ where enum RebuildConfig { Hnsw(super::hnsw::HnswConfig), ProductQuantized(super::pq::ProductQuantizationConfig), + TurboQuantized(super::turboquant::TurboQuantizationConfig), } let rebuild_config = match &base { CompositeBase::Hnsw(index) => RebuildConfig::Hnsw(index.config().clone()), CompositeBase::ProductQuantized(index) => { RebuildConfig::ProductQuantized(index.config().clone()) } + CompositeBase::TurboQuantized(index) => { + RebuildConfig::TurboQuantized(index.config().clone()) + } }; match Self::build(base_map, current_map, base, config, limits)? { CompositeBuildOutcome::Composite { accelerator, stats } => { @@ -311,6 +368,20 @@ where rebuild_stats, }) } + RebuildConfig::TurboQuantized(config) => { + let (accelerator, rebuild_stats) = TurboQuantizer::build_with_limits( + current_map, + config, + rebuild.turboquant_parallelism, + rebuild.turboquant_limits, + )?; + Ok(CompositeBuildOrRebuildOutcome::TurboQuantizedRebuilt { + accelerator: Box::new(accelerator), + reasons, + composite_stats: stats, + rebuild_stats, + }) + } }, } } @@ -464,6 +535,9 @@ where CompositeBaseKind::ProductQuantized => CompositeBase::ProductQuantized( ProductQuantizer::load(store.clone(), object.base_manifest.clone())?, ), + CompositeBaseKind::TurboQuantized => CompositeBase::TurboQuantized( + TurboQuantizer::load(store.clone(), object.base_manifest.clone())?, + ), }; validate_loaded_base(&object, &base)?; if let Some(root) = &object.delta_root { @@ -719,6 +793,9 @@ where if base.config.dimensions != current.config.dimensions || base.config.metric != current.config.metric || accelerator.source_descriptor() != &base.descriptor + || accelerator.dimensions() != base.config.dimensions + || accelerator.metric() != base.config.metric + || accelerator.count() != base.count { return Err(Error::InvalidProximitySearch { reason: "composite base/current sources or accelerator configuration disagree" @@ -737,13 +814,16 @@ where || base.manifest_cid() != &manifest.base_manifest || base.kind() != manifest.base_kind || base.config_fingerprint() != manifest.base_fingerprint + || base.dimensions() != manifest.dimensions + || base.metric() != manifest.metric + || base.count() != manifest.base_count { return Err(invalid_object("composite base manifest binding mismatch")); } Ok(()) } -fn account_delta( +pub(crate) fn account_delta( stats: &mut CompositeBuildStats, key: &[u8], value: &[u8], @@ -753,7 +833,7 @@ fn account_delta( account_bytes(stats, key.len().saturating_add(value.len()), limits) } -fn account_shadow( +pub(crate) fn account_shadow( stats: &mut CompositeBuildStats, key: &[u8], limits: &CompositeBuildLimits, @@ -775,7 +855,7 @@ fn account_bytes( ) } -fn rebuild_reasons( +pub(crate) fn rebuild_reasons( config: &CompositeAcceleratorConfig, delta: usize, shadow: usize, @@ -825,7 +905,11 @@ fn ratio_ppm(numerator: u64, denominator: u64) -> u32 { value as u32 } -fn checked_add(value: usize, increment: usize, resource: &'static str) -> Result { +pub(crate) fn checked_add( + value: usize, + increment: usize, + resource: &'static str, +) -> Result { value .checked_add(increment) .ok_or(Error::ProximityResourceLimitExceeded { @@ -835,7 +919,11 @@ fn checked_add(value: usize, increment: usize, resource: &'static str) -> Result }) } -fn enforce(resource: &'static str, limit: Option, actual: usize) -> Result<(), Error> { +pub(crate) fn enforce( + resource: &'static str, + limit: Option, + actual: usize, +) -> Result<(), Error> { if let Some(limit) = limit { if actual > limit { return Err(Error::ProximityResourceLimitExceeded { diff --git a/src/prolly/proximity/accelerator/mod.rs b/src/prolly/proximity/accelerator/mod.rs index d80f72d3..a3e83a55 100644 --- a/src/prolly/proximity/accelerator/mod.rs +++ b/src/prolly/proximity/accelerator/mod.rs @@ -3,11 +3,14 @@ pub mod catalog; pub mod composite; pub mod hnsw; pub mod pq; +pub(crate) mod quantized; pub(crate) mod sq8; +pub mod turboquant; use self::composite::CompositeAccelerator; use self::hnsw::HnswIndex; use self::pq::ProductQuantizer; +use self::turboquant::TurboQuantizer; use super::ProximityTree; use crate::prolly::error::Error; use crate::prolly::store::Store; @@ -16,13 +19,14 @@ pub use r#async::{ AsyncAcceleratorBuildOptions, AsyncAcceleratorBuildStats, AsyncAcceleratorCatalog, AsyncAcceleratorSet, AsyncCompositeAccelerator, AsyncCompositeBuildOptions, AsyncCompositeBuildOutcome, AsyncHnswBuild, AsyncHnswIndex, AsyncProductQuantizer, - AsyncProductQuantizerBuild, + AsyncProductQuantizerBuild, AsyncTurboQuantizer, AsyncTurboQuantizerBuild, }; /// Validated source-bound derived accelerators available to one search. pub struct AcceleratorSet { hnsw: Option>, pq: Option>, + turboquant: Option>, composite: Option>, } @@ -31,6 +35,7 @@ impl Default for AcceleratorSet { Self { hnsw: None, pq: None, + turboquant: None, composite: None, } } @@ -65,6 +70,7 @@ impl AcceleratorSet { Ok(Self { hnsw, pq, + turboquant: None, composite: None, }) } @@ -109,6 +115,26 @@ impl AcceleratorSet { Ok(self) } + pub fn with_turboquant( + mut self, + source: &ProximityTree, + index: TurboQuantizer, + ) -> Result { + if self.turboquant.is_some() { + return Err(invalid("duplicate TurboQuant accelerator")); + } + validate_binding( + source, + &index.source, + index.dimensions, + index.metric, + index.count, + "TurboQuant", + )?; + self.turboquant = Some(index); + Ok(self) + } + pub fn with_composite( mut self, source: &ProximityTree, @@ -138,6 +164,10 @@ impl AcceleratorSet { self.pq.as_ref() } + pub(crate) fn turboquant(&self) -> Option<&TurboQuantizer> { + self.turboquant.as_ref() + } + pub(crate) fn composite(&self) -> Option<&CompositeAccelerator> { self.composite.as_ref() } diff --git a/src/prolly/proximity/accelerator/pq.rs b/src/prolly/proximity/accelerator/pq.rs index ef1e8e8e..0cf449d2 100644 --- a/src/prolly/proximity/accelerator/pq.rs +++ b/src/prolly/proximity/accelerator/pq.rs @@ -3,10 +3,11 @@ use crate::prolly::cid::Cid; use crate::prolly::config::Config; use crate::prolly::encoding::Encoding; use crate::prolly::error::Error; -use crate::prolly::proximity::distance::prepare_vector; -use crate::prolly::proximity::search::{ - retained_candidate_bytes, EligibilityCardinality, PreparedFilter, RerankCandidate, +use crate::prolly::proximity::accelerator::quantized::{ + admit_quantized, rerank_authoritative, QuantizedRanked, }; +use crate::prolly::proximity::distance::prepare_vector; +use crate::prolly::proximity::search::{EligibilityCardinality, PreparedFilter}; use crate::prolly::proximity::storage::codec::{ put_cid, put_f32, put_f64, put_varint, Reader, MAX_OBJECT_ENTRIES, }; @@ -524,7 +525,7 @@ where let filter = PreparedFilter::new(request.filter.clone(), &map.tree().directory)?; let lookup = build_lookup(&query, self.metric, &self.codebooks); let mut stats = ProximitySearchStats::default(); - let mut approximate = BinaryHeap::::new(); + let mut approximate = BinaryHeap::::new(); let mut completion = SearchCompletion::ApproximatePolicySatisfied; if *direct_lookup { let Some((keys, source_bound)) = filter.sorted_keys() else { @@ -543,16 +544,17 @@ where } continue; }; - if !admit_code( - key.clone(), - code, - &lookup, - self.metric, - &self.codebooks, + if !admit_quantized( + key.as_slice(), + &code, *rerank_target, &request, &mut stats, &mut approximate, + |code| { + validate_code(code, &self.codebooks)?; + Ok(score_code(self.metric, &lookup, code)) + }, )? { completion = SearchCompletion::BudgetExhausted; break; @@ -564,76 +566,33 @@ where if !filter.contains(&key) || excluded(&key)? { continue; } - if !admit_code( + if !admit_quantized( key, - code, - &lookup, - self.metric, - &self.codebooks, + &code, *rerank_target, &request, &mut stats, &mut approximate, + |code| { + validate_code(code, &self.codebooks)?; + Ok(score_code(self.metric, &lookup, code)) + }, )? { completion = SearchCompletion::BudgetExhausted; break; } } } - let mut approximate = approximate.into_vec(); - approximate.sort(); - let shortlist = approximate.len(); - - let mut reranked = Vec::::with_capacity(shortlist); - let mut directory = map.directory_manager().read(&map.tree().directory)?; - for candidate in approximate { - if budget_exhausted(&request, &stats) - || request - .budget - .max_nodes - .is_some_and(|limit| stats.nodes_read >= limit) - { - completion = SearchCompletion::BudgetExhausted; - break; - } - let Some(handle) = directory.get_handle(&candidate.key)? else { - return Err(invalid_object( - "PQ code key is absent from authoritative directory", - )); - }; - let bytes = handle.value()?.len(); - if request - .budget - .max_committed_bytes - .is_some_and(|limit| stats.committed_bytes.saturating_add(bytes) > limit) - { - completion = SearchCompletion::BudgetExhausted; - break; - } - let record = crate::prolly::proximity::storage::StoredRecordRef::decode( - handle.value()?, - map.tree().config.dimensions, - )?; - let distance = record.vector.score(request.kernel, self.metric, &query); - stats.nodes_read += 1; - stats.bytes_read = stats.bytes_read.saturating_add(bytes); - stats.committed_bytes = stats.committed_bytes.saturating_add(bytes); - stats.distance_evaluations += 1; - reranked.push(RerankCandidate::new(handle, &candidate.key, distance)?); - } - stats.reranked_candidates = reranked.len(); - stats.candidate_handles_peak = reranked.len(); - stats.candidate_retained_bytes_peak = retained_candidate_bytes(&reranked); - reranked.sort_by(|left, right| { - left.distance - .total_cmp(&right.distance) - .then_with(|| left.key().cmp(right.key())) - }); - let neighbors = reranked - .into_iter() - .take(request.k) - .map(|candidate| candidate.into_neighbor(map.tree().config.dimensions)) - .collect::, Error>>()?; + let neighbors = rerank_authoritative( + map, + &request, + &query, + self.dimensions, + approximate, + &mut stats, + &mut completion, + "PQ code key is absent from authoritative directory", + )?; Ok(SearchResult { neighbors, stats, @@ -643,86 +602,6 @@ where } } -#[derive(Clone, Debug)] -struct PqRanked { - distance: f64, - key: Vec, -} - -impl PartialEq for PqRanked { - fn eq(&self, other: &Self) -> bool { - self.distance.to_bits() == other.distance.to_bits() && self.key == other.key - } -} - -impl Eq for PqRanked {} - -impl PartialOrd for PqRanked { - fn partial_cmp(&self, other: &Self) -> Option { - Some(self.cmp(other)) - } -} - -impl Ord for PqRanked { - fn cmp(&self, other: &Self) -> Ordering { - self.distance - .total_cmp(&other.distance) - .then_with(|| self.key.cmp(&other.key)) - } -} - -#[allow(clippy::too_many_arguments)] -fn admit_code( - key: Vec, - code: Vec, - lookup: &[Vec], - metric: DistanceMetric, - codebooks: &Codebooks, - target: usize, - request: &SearchRequest<'_>, - stats: &mut ProximitySearchStats, - approximate: &mut BinaryHeap, -) -> Result { - if request - .budget - .max_nodes - .is_some_and(|limit| stats.nodes_read >= limit) - || request - .budget - .max_committed_bytes - .is_some_and(|limit| stats.committed_bytes.saturating_add(code.len()) > limit) - || request - .budget - .max_distance_evaluations - .is_some_and(|limit| { - stats - .distance_evaluations - .saturating_add(stats.quantized_distance_evaluations) - >= limit - }) - || request - .budget - .max_frontier_entries - .is_some_and(|limit| approximate.len().saturating_add(1) > limit) - { - return Ok(false); - } - validate_code(&code, codebooks)?; - stats.nodes_read += 1; - stats.bytes_read = stats.bytes_read.saturating_add(code.len()); - stats.committed_bytes = stats.committed_bytes.saturating_add(code.len()); - stats.quantized_distance_evaluations += 1; - approximate.push(PqRanked { - distance: score_code(metric, lookup, &code), - key, - }); - if approximate.len() > target { - approximate.pop(); - } - stats.frontier_peak = stats.frontier_peak.max(approximate.len()); - Ok(true) -} - #[derive(Clone)] pub(crate) struct Manifest { pub(crate) source: Cid, @@ -1118,18 +997,6 @@ pub(crate) fn validate_code(code: &[u8], codebooks: &[Vec>]) -> Result< Ok(()) } -fn budget_exhausted(request: &SearchRequest<'_>, stats: &ProximitySearchStats) -> bool { - request - .budget - .max_distance_evaluations - .is_some_and(|maximum| { - stats - .distance_evaluations - .saturating_add(stats.quantized_distance_evaluations) - >= maximum - }) -} - fn encode_config(config: &ProductQuantizationConfig, bytes: &mut Vec) { put_varint(u64::from(config.subquantizers), bytes); put_varint(u64::from(config.centroids_per_subquantizer), bytes); diff --git a/src/prolly/proximity/accelerator/quantized.rs b/src/prolly/proximity/accelerator/quantized.rs new file mode 100644 index 00000000..6bcc6431 --- /dev/null +++ b/src/prolly/proximity/accelerator/quantized.rs @@ -0,0 +1,280 @@ +//! Behavior shared by ordered-code quantizers. +//! +//! Code validation and approximate math remain accelerator-specific. This +//! module freezes candidate admission, logical budget accounting, and +//! authoritative reranking so PQ and TurboQuant cannot drift independently. + +use crate::prolly::error::Error; +use crate::prolly::proximity::search::{retained_candidate_bytes, RerankCandidate}; +use crate::prolly::proximity::storage::StoredRecordRef; +use crate::prolly::proximity::{ + Neighbor, ProximityMap, ProximitySearchStats, SearchCompletion, SearchRequest, +}; +use crate::prolly::store::Store; +use std::cmp::Ordering; +use std::collections::BinaryHeap; + +#[derive(Clone, Debug)] +pub(crate) struct QuantizedRanked { + pub(crate) distance: f64, + pub(crate) key: Vec, +} + +pub(crate) trait IntoQuantizedKey { + fn as_bytes(&self) -> &[u8]; + fn into_owned(self) -> Vec; +} + +impl IntoQuantizedKey for Vec { + fn as_bytes(&self) -> &[u8] { + self + } + + fn into_owned(self) -> Vec { + self + } +} + +impl IntoQuantizedKey for &[u8] { + fn as_bytes(&self) -> &[u8] { + self + } + + fn into_owned(self) -> Vec { + self.to_vec() + } +} + +impl PartialEq for QuantizedRanked { + fn eq(&self, other: &Self) -> bool { + self.distance.to_bits() == other.distance.to_bits() && self.key == other.key + } +} + +impl Eq for QuantizedRanked {} + +impl PartialOrd for QuantizedRanked { + fn partial_cmp(&self, other: &Self) -> Option { + Some(self.cmp(other)) + } +} + +impl Ord for QuantizedRanked { + fn cmp(&self, other: &Self) -> Ordering { + self.distance + .total_cmp(&other.distance) + .then_with(|| self.key.cmp(&other.key)) + } +} + +pub(crate) fn admit_quantized( + key: K, + code: &[u8], + target: usize, + request: &SearchRequest<'_>, + stats: &mut ProximitySearchStats, + approximate: &mut BinaryHeap, + score: F, +) -> Result +where + K: IntoQuantizedKey, + F: FnOnce(&[u8]) -> Result, +{ + if request + .budget + .max_nodes + .is_some_and(|limit| stats.nodes_read >= limit) + || request + .budget + .max_committed_bytes + .is_some_and(|limit| stats.committed_bytes.saturating_add(code.len()) > limit) + || distance_budget_exhausted(request, stats) + || request + .budget + .max_frontier_entries + .is_some_and(|limit| approximate.len().saturating_add(1) > limit) + { + return Ok(false); + } + + let distance = score(code)?; + stats.nodes_read += 1; + stats.bytes_read = stats.bytes_read.saturating_add(code.len()); + stats.committed_bytes = stats.committed_bytes.saturating_add(code.len()); + stats.quantized_distance_evaluations += 1; + if approximate.len() < target { + approximate.push(QuantizedRanked { + distance, + key: key.into_owned(), + }); + } else if target != 0 + && approximate.peek().is_some_and(|worst| { + distance + .total_cmp(&worst.distance) + .then_with(|| key.as_bytes().cmp(worst.key.as_slice())) + .is_lt() + }) + { + *approximate + .peek_mut() + .expect("non-empty quantized candidate heap") = QuantizedRanked { + distance, + key: key.into_owned(), + }; + } + stats.frontier_peak = stats.frontier_peak.max(approximate.len()); + Ok(true) +} + +#[allow(clippy::too_many_arguments)] +pub(crate) fn rerank_authoritative( + map: &ProximityMap, + request: &SearchRequest<'_>, + query: &[f32], + dimensions: u32, + approximate: BinaryHeap, + stats: &mut ProximitySearchStats, + completion: &mut SearchCompletion, + missing_code_message: &'static str, +) -> Result, Error> { + let mut approximate = approximate.into_vec(); + approximate.sort(); + let mut reranked = Vec::::with_capacity(approximate.len()); + let mut directory = map.directory_manager().read(&map.tree().directory)?; + + for candidate in approximate { + if distance_budget_exhausted(request, stats) + || request + .budget + .max_nodes + .is_some_and(|limit| stats.nodes_read >= limit) + { + *completion = SearchCompletion::BudgetExhausted; + break; + } + let Some(handle) = directory.get_handle(&candidate.key)? else { + return Err(Error::InvalidProximityObject { + kind: "quantized accelerator", + reason: missing_code_message.to_owned(), + }); + }; + let bytes = handle.value()?.len(); + if request + .budget + .max_committed_bytes + .is_some_and(|limit| stats.committed_bytes.saturating_add(bytes) > limit) + { + *completion = SearchCompletion::BudgetExhausted; + break; + } + let record = StoredRecordRef::decode(handle.value()?, dimensions)?; + let distance = record + .vector + .score(request.kernel, map.tree().config.metric, query); + stats.nodes_read += 1; + stats.bytes_read = stats.bytes_read.saturating_add(bytes); + stats.committed_bytes = stats.committed_bytes.saturating_add(bytes); + stats.distance_evaluations += 1; + reranked.push(RerankCandidate::new(handle, &candidate.key, distance)?); + } + + stats.reranked_candidates = reranked.len(); + stats.candidate_handles_peak = reranked.len(); + stats.candidate_retained_bytes_peak = retained_candidate_bytes(&reranked); + reranked.sort_by(|left, right| { + left.distance + .total_cmp(&right.distance) + .then_with(|| left.key().cmp(right.key())) + }); + reranked + .into_iter() + .take(request.k) + .map(|candidate| candidate.into_neighbor(dimensions)) + .collect() +} + +pub(crate) fn distance_budget_exhausted( + request: &SearchRequest<'_>, + stats: &ProximitySearchStats, +) -> bool { + request + .budget + .max_distance_evaluations + .is_some_and(|maximum| { + stats + .distance_evaluations + .saturating_add(stats.quantized_distance_evaluations) + >= maximum + }) +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn candidate_admission_is_total_ordered_and_bounded() { + let mut stats = ProximitySearchStats::default(); + let mut heap = BinaryHeap::new(); + let request = SearchRequest::exact(&[0.0], 1); + for (key, score) in [ + (b"c".to_vec(), 1.0), + (b"a".to_vec(), 1.0), + (b"b".to_vec(), 0.5), + (b"d".to_vec(), 2.0), + ] { + assert!( + admit_quantized(key, &[0], 2, &request, &mut stats, &mut heap, |_| Ok(score),) + .unwrap() + ); + } + let mut retained = heap.into_vec(); + retained.sort(); + assert_eq!(retained.len(), 2); + assert_eq!(retained[0].key, b"b"); + assert_eq!(retained[1].key, b"a"); + assert_eq!(stats.frontier_peak, 2); + + let mut empty = BinaryHeap::new(); + let mut empty_stats = ProximitySearchStats::default(); + assert!(admit_quantized( + b"ignored".to_vec(), + &[0], + 0, + &request, + &mut empty_stats, + &mut empty, + |_| Ok(0.0), + ) + .unwrap()); + assert!(empty.is_empty()); + assert_eq!(empty_stats.frontier_peak, 0); + assert_eq!(empty_stats.quantized_distance_evaluations, 1); + + struct RejectedBorrowedKey; + impl IntoQuantizedKey for RejectedBorrowedKey { + fn as_bytes(&self) -> &[u8] { + b"rejected" + } + + fn into_owned(self) -> Vec { + panic!("a rejected borrowed key must not be materialized") + } + } + let mut full = BinaryHeap::from([QuantizedRanked { + distance: 1.0, + key: b"retained".to_vec(), + }]); + assert!(admit_quantized( + RejectedBorrowedKey, + &[0], + 1, + &request, + &mut ProximitySearchStats::default(), + &mut full, + |_| Ok(2.0), + ) + .unwrap()); + assert_eq!(full.peek().unwrap().key, b"retained"); + } +} diff --git a/src/prolly/proximity/accelerator/turboquant.rs b/src/prolly/proximity/accelerator/turboquant.rs new file mode 100644 index 00000000..1eeace50 --- /dev/null +++ b/src/prolly/proximity/accelerator/turboquant.rs @@ -0,0 +1,3132 @@ +#![forbid(unsafe_code)] + +//! Independent, deterministic TurboQuant-MSE routing accelerator. +//! +//! This implementation follows the rotate-then-scalar-quantize construction +//! from [TurboQuant: Online Vector Quantization with Near-optimal Distortion +//! Rate](https://arxiv.org/abs/2504.19874), with Prolly's frozen structured +//! transform. The production transform is not the paper's dense +//! Gaussian-QR/Haar rotation, so the implementation does not claim that +//! theorem. It does not contain or depend on Turbovec code or formats. + +use crate::prolly::builder::SortedBatchBuilder; +use crate::prolly::cid::Cid; +use crate::prolly::config::Config; +use crate::prolly::encoding::Encoding; +use crate::prolly::error::Error; +use crate::prolly::node::Node; +use crate::prolly::proximity::accelerator::quantized::{ + admit_quantized, rerank_authoritative, QuantizedRanked, +}; +use crate::prolly::proximity::distance::canonical::sqrt_down; +use crate::prolly::proximity::distance::{fill_query_products_f64, prepare_vector}; +use crate::prolly::proximity::search::{EligibilityCardinality, PreparedFilter}; +use crate::prolly::proximity::storage::codec::{put_cid, put_f64, put_varint, Reader}; +use crate::prolly::proximity::storage::StoredRecord; +use crate::prolly::proximity::{ + BuildParallelism, DistanceMetric, ProximityMap, ProximitySearchStats, QueryKernel, + SearchBackend, SearchCompletion, SearchPolicy, SearchRequest, SearchResult, +}; +use crate::prolly::store::{NodePublication, PublicationOrigin, Store}; +use crate::prolly::tree::Tree; +use crate::prolly::Prolly; +use rayon::prelude::*; +use std::cell::Cell; +use std::collections::BinaryHeap; + +const MAGIC: &[u8; 4] = b"TQTQ"; +const TURBOQUANT_FORMAT_VERSION: u8 = 1; +pub(crate) const STRUCTURED_ROTATION_ID: u8 = 1; +pub(crate) const NORMAL_LLOYD_MAX_CODEBOOK_ID: u8 = 1; +const MIN_DIMENSIONS: u32 = 8; +const MAX_DIMENSIONS: u32 = 16_384; +const ROTATION_ROUNDS: usize = 2; +// TurboQuant leaves can approach a MiB at the largest supported dimensions. +// Keep publication batches large enough to amortize store calls without +// retaining tens or hundreds of MiB in the code-tree builder. +pub(crate) const CODE_TREE_PUBLICATION_BATCH_ITEMS: usize = 16; + +const PERMUTATION_DOMAIN: u64 = 0x5451_5045_524d_0001; +const SIGN_DOMAIN: u64 = 0x5451_5349_474e_0001; + +/// Frozen configuration for the TurboQuant-MSE sidecar. +#[derive(Clone, Debug, PartialEq, Eq)] +pub struct TurboQuantizationConfig { + pub bit_width: u8, + pub rerank_multiplier: u32, + pub seed: u64, +} + +impl Default for TurboQuantizationConfig { + fn default() -> Self { + Self { + bit_width: 4, + rerank_multiplier: 8, + seed: 0, + } + } +} + +impl TurboQuantizationConfig { + pub(crate) fn validate(&self, dimensions: u32) -> Result<(), Error> { + if !matches!(self.bit_width, 2..=4) { + return Err(invalid_config("TurboQuant bit_width must be 2, 3, or 4")); + } + if self.rerank_multiplier == 0 { + return Err(invalid_config( + "TurboQuant rerank_multiplier must be positive", + )); + } + if !(MIN_DIMENSIONS..=MAX_DIMENSIONS).contains(&dimensions) || !dimensions.is_multiple_of(8) + { + return Err(invalid_config( + "TurboQuant dimensions must be in 8..=16384 and divisible by eight", + )); + } + Ok(()) + } +} + +/// Deterministic build resource limits. +#[derive(Clone, Debug, Default, PartialEq, Eq)] +pub struct TurboQuantizationBuildLimits { + pub max_records: Option, + pub max_input_bytes: Option, + pub max_temporary_bytes: Option, + pub max_transform_operations: Option, + pub max_encoded_output_bytes: Option, + pub max_worker_threads: Option, +} + +impl TurboQuantizationBuildLimits { + pub(crate) fn validate(&self) -> Result<(), Error> { + for (name, value) in [ + ("max_records", self.max_records), + ("max_input_bytes", self.max_input_bytes), + ("max_temporary_bytes", self.max_temporary_bytes), + ("max_transform_operations", self.max_transform_operations), + ("max_encoded_output_bytes", self.max_encoded_output_bytes), + ("max_worker_threads", self.max_worker_threads), + ] { + if value == Some(0) { + return Err(invalid_config(format!( + "TurboQuant {name} must be positive" + ))); + } + } + Ok(()) + } +} + +/// Work and retained-payload memory observed during one TurboQuant build. +/// +/// Operation and byte totals are canonical for a source/configuration pair. +/// `peak_temporary_bytes` also reflects the build's memory limit and node +/// publication batch, so it can differ between otherwise equivalent builds. +#[derive(Clone, Debug, Default, PartialEq, Eq)] +pub struct TurboQuantizationBuildStats { + pub encoded_vectors: usize, + pub zero_vectors: usize, + pub transformed_components: usize, + pub butterfly_operations: usize, + pub input_bytes: usize, + pub encoded_output_bytes: usize, + /// Conservative peak of algorithm and code-tree-builder payload bytes. + /// + /// This excludes allocator metadata and provider-owned publication + /// buffers. Worker scratch is normalized to one worker so this statistic + /// remains independent of requested parallelism; limit enforcement still + /// accounts for every requested worker. + pub peak_temporary_bytes: usize, +} + +/// Routing reconstruction error committed to the manifest. +#[derive(Clone, Copy, Debug, Default, PartialEq)] +pub struct TurboQuantizationQuality { + pub mean_squared_error: f64, + pub maximum_squared_error: f64, +} + +/// Derive the canonical persisted quality values from streaming totals. +/// +/// Repeated equal errors can make `sum / count` round infinitesimally above +/// the observed maximum. Clamp that representation artifact so producers do +/// not emit a manifest that the decoder correctly rejects as impossible. +pub(crate) fn quality_from_totals( + sum: f64, + maximum: f64, + count: u64, +) -> Result { + if count == 0 || !sum.is_finite() || !maximum.is_finite() || sum < 0.0 || maximum < 0.0 { + return Err(invalid_object("invalid TurboQuant quality totals")); + } + Ok(TurboQuantizationQuality { + mean_squared_error: (sum / count as f64).min(maximum), + maximum_squared_error: maximum, + }) +} + +/// Result of a full source/code-tree verification. +#[derive(Clone, Copy, Debug, Default, PartialEq)] +pub struct TurboQuantizationVerification { + pub encoded_vectors: u64, + pub zero_vectors: u64, + pub quality: TurboQuantizationQuality, +} + +/// Source-bound persisted TurboQuant-MSE accelerator. +pub struct TurboQuantizer { + codes: Prolly, + pub(crate) code_tree: Tree, + manifest: Cid, + pub(super) source: Cid, + pub(super) dimensions: u32, + pub(super) metric: DistanceMetric, + pub(super) count: u64, + config: TurboQuantizationConfig, + quality: TurboQuantizationQuality, + zero_vectors: u64, + plan: StructuredRotation, +} + +impl TurboQuantizer +where + S: Store + Clone + Send + Sync, + S::Error: Send + Sync, +{ + pub fn build( + map: &ProximityMap, + config: TurboQuantizationConfig, + parallelism: BuildParallelism, + ) -> Result<(Self, TurboQuantizationBuildStats), Error> { + Self::build_with_limits( + map, + config, + parallelism, + TurboQuantizationBuildLimits::default(), + ) + } + + /// Encode the source in key order and publish the manifest only after the + /// complete canonical code tree exists. + pub fn build_with_limits( + map: &ProximityMap, + config: TurboQuantizationConfig, + parallelism: BuildParallelism, + limits: TurboQuantizationBuildLimits, + ) -> Result<(Self, TurboQuantizationBuildStats), Error> { + limits.validate()?; + let dimensions = map.tree().config.dimensions; + config.validate(dimensions)?; + let records = usize::try_from(map.tree().count) + .map_err(|_| resource_limit("TurboQuant records", usize::MAX, usize::MAX))?; + if records == 0 { + return Err(invalid_config("TurboQuant requires a non-empty source map")); + } + enforce_resource("TurboQuant records", limits.max_records, records)?; + enforce_resource( + "TurboQuant worker threads", + limits.max_worker_threads, + parallelism.threads(), + )?; + + let dimensions_usize = dimensions as usize; + let input_bytes = records + .checked_mul(dimensions_usize) + .and_then(|value| value.checked_mul(4)) + .ok_or_else(|| resource_limit("TurboQuant input bytes", usize::MAX, usize::MAX))?; + enforce_resource( + "TurboQuant input bytes", + limits.max_input_bytes, + input_bytes, + )?; + let packed_len = packed_len(dimensions_usize, config.bit_width)?; + let encoded_output_bytes = records + .checked_mul(8usize.checked_add(packed_len).ok_or_else(|| { + resource_limit("TurboQuant encoded output bytes", usize::MAX, usize::MAX) + })?) + .ok_or_else(|| { + resource_limit("TurboQuant encoded output bytes", usize::MAX, usize::MAX) + })?; + enforce_resource( + "TurboQuant encoded output bytes", + limits.max_encoded_output_bytes, + encoded_output_bytes, + )?; + + let plan = StructuredRotation::derive(dimensions_usize, config.seed)?; + let per_worker_buffers = dimensions_usize + .checked_mul(25) + .and_then(|value| value.checked_add(packed_len)) + .ok_or_else(|| resource_limit("TurboQuant temporary bytes", usize::MAX, usize::MAX))?; + let encoded_value_bytes = 8usize + .checked_add(packed_len) + .ok_or_else(|| resource_limit("TurboQuant temporary bytes", usize::MAX, usize::MAX))?; + let minimum_input_bytes = dimensions_usize + .checked_mul(4) + .ok_or_else(|| resource_limit("TurboQuant temporary bytes", usize::MAX, usize::MAX))?; + let required_temporary_bytes = temporary_peak_bytes( + plan.owned_bytes(), + per_worker_buffers, + parallelism.threads(), + 0, + minimum_input_bytes, + 1, + encoded_value_bytes, + )?; + enforce_resource( + "TurboQuant temporary bytes", + limits.max_temporary_bytes, + required_temporary_bytes, + )?; + // Logical build statistics are canonical across worker counts. The + // limit above still reserves every requested worker's scratch space. + let mut peak_temporary_bytes = temporary_peak_bytes( + plan.owned_bytes(), + per_worker_buffers, + 1, + 0, + minimum_input_bytes, + 1, + encoded_value_bytes, + )?; + + let codebook = codebook(config.bit_width); + let sqrt_dimensions = sqrt_down(f64::from(dimensions)); + let store = map.store_clone(); + let code_config = turboquant_code_tree_config(); + let mut builder = if limits.max_temporary_bytes.is_some() { + // A bounded build publishes each completed canonical node + // immediately. The hierarchy still retains the current leaf and + // height-bounded parent state, which is accounted below. + SortedBatchBuilder::new_with_origin_and_batch_size( + store.clone(), + code_config.clone(), + PublicationOrigin::Maintenance, + 1, + ) + } else { + SortedBatchBuilder::new_with_origin_and_batch_size( + store.clone(), + code_config.clone(), + PublicationOrigin::Maintenance, + CODE_TREE_PUBLICATION_BATCH_ITEMS, + ) + }; + let builder_retained_bytes = Cell::new(0usize); + let builder_peak_bytes = Cell::new(0usize); + let mut encoded_vectors = 0usize; + let mut zero_vectors = 0usize; + let mut transformed_components = 0usize; + let mut butterfly_operations = 0usize; + let mut transform_operations = 0usize; + let mut quality_sum = 0.0f64; + let mut quality_maximum = 0.0f64; + let pool = (parallelism.threads() > 1) + .then(|| { + rayon::ThreadPoolBuilder::new() + .num_threads(parallelism.threads()) + .build() + }) + .transpose() + .map_err(|_| invalid_config("cannot create TurboQuant worker pool"))?; + const ENCODE_BATCH_RECORDS: usize = 128; + let mut batch = if limits.max_temporary_bytes.is_some() { + Vec::new() + } else { + Vec::with_capacity(ENCODE_BATCH_RECORDS) + }; + { + let mut commit_batch = |batch: Vec<(Vec, Vec)>| -> Result<(), Error> { + if batch.is_empty() { + return Ok(()); + } + let batch_records = batch.len(); + let batch_input_bytes = batch.iter().try_fold(0usize, |total, (key, vector)| { + total + .checked_add(key.len()) + .and_then(|value| value.checked_add(vector.len().checked_mul(4)?)) + .ok_or_else(|| { + resource_limit("TurboQuant temporary bytes", usize::MAX, usize::MAX) + }) + })?; + let physical_peak = temporary_peak_bytes( + plan.owned_bytes(), + per_worker_buffers, + parallelism.threads(), + builder.retained_payload_bytes().map_err(|_| { + resource_limit("TurboQuant temporary bytes", usize::MAX, usize::MAX) + })?, + batch_input_bytes, + batch_records, + encoded_value_bytes, + )?; + enforce_resource( + "TurboQuant temporary bytes", + limits.max_temporary_bytes, + physical_peak, + )?; + let logical_peak = temporary_peak_bytes( + plan.owned_bytes(), + per_worker_buffers, + 1, + builder.retained_payload_bytes().map_err(|_| { + resource_limit("TurboQuant temporary bytes", usize::MAX, usize::MAX) + })?, + batch_input_bytes, + batch_records, + encoded_value_bytes, + )?; + peak_temporary_bytes = peak_temporary_bytes.max(logical_peak); + + let encoded = if let Some(pool) = &pool { + pool.install(|| { + batch + .into_par_iter() + .map_init( + || EncodingScratch::new(dimensions_usize, packed_len), + |scratch, (key, vector)| { + let encoded = encode_vector_reusing( + &vector, + &plan, + codebook, + config.bit_width, + sqrt_dimensions, + scratch, + ); + (key, encoded) + }, + ) + .collect::>() + }) + } else { + let mut scratch = EncodingScratch::new(dimensions_usize, packed_len); + batch + .into_iter() + .map(|(key, vector)| { + let encoded = encode_vector_reusing( + &vector, + &plan, + codebook, + config.bit_width, + sqrt_dimensions, + &mut scratch, + ); + (key, encoded) + }) + .collect() + }; + // Rayon indexed collection preserves input order. Errors are + // inspected only here so the earliest source key wins. + for (key, encoded) in encoded { + let encoded = encoded?; + if encoded.zero { + zero_vectors = zero_vectors.saturating_add(1); + } else { + transformed_components = transformed_components + .checked_add(dimensions_usize) + .ok_or_else(|| { + resource_limit( + "TurboQuant transform operations", + usize::MAX, + usize::MAX, + ) + })?; + butterfly_operations = butterfly_operations + .checked_add(plan.butterfly_operations_per_vector()) + .ok_or_else(|| { + resource_limit( + "TurboQuant transform operations", + usize::MAX, + usize::MAX, + ) + })?; + transform_operations = transform_operations + .checked_add(plan.operations_per_vector()) + .ok_or_else(|| { + resource_limit( + "TurboQuant transform operations", + usize::MAX, + usize::MAX, + ) + })?; + enforce_resource( + "TurboQuant transform operations", + limits.max_transform_operations, + transform_operations, + )?; + } + quality_sum += encoded.error; + quality_maximum = quality_maximum.max(encoded.error); + builder.add(key, encoded.bytes)?; + builder_retained_bytes.set(builder.retained_payload_bytes().map_err(|_| { + resource_limit("TurboQuant temporary bytes", usize::MAX, usize::MAX) + })?); + let builder_peak = builder.peak_retained_payload_bytes(); + builder_peak_bytes.set(builder_peak); + let physical_peak = temporary_peak_bytes( + plan.owned_bytes(), + per_worker_buffers, + parallelism.threads(), + builder_peak, + batch_input_bytes, + batch_records, + encoded_value_bytes, + )?; + enforce_resource( + "TurboQuant temporary bytes", + limits.max_temporary_bytes, + physical_peak, + )?; + let logical_peak = temporary_peak_bytes( + plan.owned_bytes(), + per_worker_buffers, + 1, + builder_peak, + batch_input_bytes, + batch_records, + encoded_value_bytes, + )?; + peak_temporary_bytes = peak_temporary_bytes.max(logical_peak); + encoded_vectors += 1; + } + Ok(()) + }; + let mut batch_input_bytes = 0usize; + for entry in map + .directory_manager() + .range(&map.tree().directory, &[], None)? + { + let (key, bytes) = entry?; + let mut next_batch_input_bytes = batch_input_bytes; + if let Some(limit) = limits.max_temporary_bytes { + let record_input_bytes = + key.len().checked_add(minimum_input_bytes).ok_or_else(|| { + resource_limit("TurboQuant temporary bytes", usize::MAX, usize::MAX) + })?; + let mut projected_input_bytes = batch_input_bytes + .checked_add(record_input_bytes) + .ok_or_else(|| { + resource_limit("TurboQuant temporary bytes", usize::MAX, usize::MAX) + })?; + let mut projected_builder_bytes = builder_retained_bytes + .get() + .checked_add(key.len()) + .and_then(|bytes| bytes.checked_add(encoded_value_bytes)) + .ok_or_else(|| { + resource_limit("TurboQuant temporary bytes", usize::MAX, usize::MAX) + })? + .max(builder_peak_bytes.get()); + let mut projected_peak = temporary_peak_bytes( + plan.owned_bytes(), + per_worker_buffers, + parallelism.threads(), + projected_builder_bytes, + projected_input_bytes, + batch.len() + 1, + encoded_value_bytes, + )?; + if projected_peak > limit && !batch.is_empty() { + commit_batch(std::mem::take(&mut batch))?; + projected_input_bytes = record_input_bytes; + projected_builder_bytes = builder_retained_bytes + .get() + .checked_add(key.len()) + .and_then(|bytes| bytes.checked_add(encoded_value_bytes)) + .ok_or_else(|| { + resource_limit("TurboQuant temporary bytes", usize::MAX, usize::MAX) + })? + .max(builder_peak_bytes.get()); + projected_peak = temporary_peak_bytes( + plan.owned_bytes(), + per_worker_buffers, + parallelism.threads(), + projected_builder_bytes, + projected_input_bytes, + 1, + encoded_value_bytes, + )?; + } + enforce_resource("TurboQuant temporary bytes", Some(limit), projected_peak)?; + next_batch_input_bytes = projected_input_bytes; + } + let stored = StoredRecord::decode(&bytes, dimensions)?; + batch.push((key, stored.vector)); + batch_input_bytes = next_batch_input_bytes; + if batch.len() == ENCODE_BATCH_RECORDS { + commit_batch(std::mem::take(&mut batch))?; + batch_input_bytes = 0; + } + } + commit_batch(batch)?; + } + if encoded_vectors != records { + return Err(invalid_object( + "TurboQuant source count changed during build", + )); + } + let (code_tree, builder_peak) = builder.build_with_retained_payload_peak()?; + let final_physical_peak = temporary_peak_bytes( + plan.owned_bytes(), + 0, + 0, + builder_peak, + 0, + 0, + encoded_value_bytes, + )?; + enforce_resource( + "TurboQuant temporary bytes", + limits.max_temporary_bytes, + final_physical_peak, + )?; + peak_temporary_bytes = peak_temporary_bytes.max(final_physical_peak); + let code_root = code_tree + .root + .clone() + .ok_or_else(|| invalid_object("TurboQuant requires a non-empty code tree"))?; + let quality = quality_from_totals(quality_sum, quality_maximum, encoded_vectors as u64)?; + let manifest_object = Manifest { + source: map.tree().descriptor.clone(), + dimensions, + metric: map.tree().config.metric, + count: map.tree().count, + config: config.clone(), + transform_id: STRUCTURED_ROTATION_ID, + codebook_id: NORMAL_LLOYD_MAX_CODEBOOK_ID, + code_root, + quality, + zero_vectors: zero_vectors as u64, + }; + let manifest_bytes = manifest_object.encode()?; + let manifest = Cid::from_bytes(&manifest_bytes); + match store + .get(manifest.as_bytes()) + .map_err(|error| Error::Store(Box::new(error)))? + { + Some(bytes) => { + let actual = Cid::from_bytes(&bytes); + if actual != manifest { + return Err(Error::CidMismatch { + expected: manifest, + actual, + }); + } + } + None => { + let entries = [(manifest.as_bytes(), manifest_bytes.as_slice())]; + store + .publish_nodes(NodePublication::new( + &entries, + PublicationOrigin::Maintenance, + )) + .map_err(|error| Error::Store(Box::new(error)))?; + } + } + + Ok(( + Self { + codes: Prolly::new(store, code_config), + code_tree, + manifest, + source: manifest_object.source, + dimensions, + metric: manifest_object.metric, + count: manifest_object.count, + config, + quality, + zero_vectors: zero_vectors as u64, + plan, + }, + TurboQuantizationBuildStats { + encoded_vectors, + zero_vectors, + transformed_components, + butterfly_operations, + input_bytes, + encoded_output_bytes, + peak_temporary_bytes, + }, + )) + } + + pub fn load(store: S, manifest: Cid) -> Result { + let bytes = load_content(&store, &manifest)?; + let object = Manifest::decode(&bytes)?; + object.config.validate(object.dimensions)?; + let plan = StructuredRotation::derive(object.dimensions as usize, object.config.seed)?; + let code_tree = Tree { + root: Some(object.code_root), + config: turboquant_code_tree_config(), + }; + let root_bytes = + load_content(&store, code_tree.root.as_ref().expect("manifest code root"))?; + validate_code_tree_root(&root_bytes, object.count)?; + Ok(Self { + codes: Prolly::new(store, code_tree.config.clone()), + code_tree, + manifest, + source: object.source, + dimensions: object.dimensions, + metric: object.metric, + count: object.count, + config: object.config, + quality: object.quality, + zero_vectors: object.zero_vectors, + plan, + }) + } + + pub fn manifest_cid(&self) -> &Cid { + &self.manifest + } + + pub fn source_descriptor(&self) -> &Cid { + &self.source + } + + pub fn config(&self) -> &TurboQuantizationConfig { + &self.config + } + + pub fn quality(&self) -> TurboQuantizationQuality { + self.quality + } + + pub(crate) fn rebind(&self, store: T) -> TurboQuantizer { + TurboQuantizer { + codes: Prolly::new(store, self.code_tree.config.clone()), + code_tree: self.code_tree.clone(), + manifest: self.manifest.clone(), + source: self.source.clone(), + dimensions: self.dimensions, + metric: self.metric, + count: self.count, + config: self.config.clone(), + quality: self.quality, + zero_vectors: self.zero_vectors, + plan: self.plan.clone(), + } + } + + /// Fully verify source binding, code cardinality/canonicality, and quality. + pub fn verify(&self, map: &ProximityMap) -> Result { + self.validate_binding(map, &map.tree().descriptor)?; + let mut source = map + .directory_manager() + .range(&map.tree().directory, &[], None)?; + let mut codes = self.codes.range(&self.code_tree, &[], None)?; + let mut count = 0u64; + let mut zeros = 0u64; + let mut quality_sum = 0.0; + let mut quality_maximum = 0.0f64; + let packed_len = packed_len(self.dimensions as usize, self.config.bit_width)?; + let mut scratch = EncodingScratch::new(self.dimensions as usize, packed_len); + loop { + match (source.next(), codes.next()) { + (None, None) => break, + (Some(source), Some(code)) => { + let (source_key, source_bytes) = source?; + let (code_key, actual) = code?; + if source_key != code_key { + return Err(invalid_object( + "TurboQuant source and code keys do not match", + )); + } + let stored = StoredRecord::decode(&source_bytes, self.dimensions)?; + let expected = encode_vector_reusing( + &stored.vector, + &self.plan, + codebook(self.config.bit_width), + self.config.bit_width, + sqrt_down(f64::from(self.dimensions)), + &mut scratch, + )?; + validate_code_value(&actual, self.dimensions as usize, self.config.bit_width)?; + if actual != expected.bytes { + return Err(invalid_object( + "TurboQuant code disagrees with authoritative source vector", + )); + } + count += 1; + zeros += u64::from(expected.zero); + quality_sum += expected.error; + quality_maximum = quality_maximum.max(expected.error); + } + _ => { + return Err(invalid_object( + "TurboQuant source and code counts do not match", + )) + } + } + } + if count != self.count || zeros != self.zero_vectors { + return Err(invalid_object( + "TurboQuant verified counts disagree with manifest", + )); + } + let quality = quality_from_totals(quality_sum, quality_maximum, count)?; + if quality.mean_squared_error.to_bits() != self.quality.mean_squared_error.to_bits() + || quality.maximum_squared_error.to_bits() + != self.quality.maximum_squared_error.to_bits() + { + return Err(invalid_object( + "TurboQuant quality measurements disagree with manifest", + )); + } + Ok(TurboQuantizationVerification { + encoded_vectors: count, + zero_vectors: zeros, + quality, + }) + } + + pub fn search( + &self, + map: &ProximityMap, + request: SearchRequest<'_>, + ) -> Result { + request.validate()?; + if request.policy == SearchPolicy::Exact { + return Err(invalid_search("TurboQuant cannot satisfy exact search")); + } + if !matches!( + request.options.backend, + SearchBackend::TurboQuantized | SearchBackend::Auto + ) { + return Err(invalid_search( + "TurboQuant requires TurboQuantized or Auto backend", + )); + } + let filter = PreparedFilter::new(request.filter.clone(), &map.tree().directory)?; + let eligible_limit = match filter.cardinality(map.tree().count) { + EligibilityCardinality::Known(count) => count as usize, + EligibilityCardinality::Unknown => map.tree().count as usize, + }; + let multiplier = request + .options + .turboquant + .rerank_multiplier + .map(usize::from) + .unwrap_or(self.config.rerank_multiplier as usize); + let rerank_target = request + .k + .checked_mul(multiplier) + .ok_or_else(|| invalid_search("TurboQuant rerank target overflow"))? + .max(request.k) + .min(eligible_limit); + let plan = crate::prolly::proximity::search::SearchPlan::TurboQuantized { + rerank_target, + direct_lookup: filter.sorted_keys().is_some() + && eligible_limit <= request.options.planner.eligible_exact_max_records, + }; + self.search_planned(map, request, &plan) + } + + pub(crate) fn search_planned( + &self, + map: &ProximityMap, + request: SearchRequest<'_>, + plan: &crate::prolly::proximity::search::SearchPlan, + ) -> Result { + self.search_planned_with_exclusion(map, &map.tree().descriptor, request, plan, |_| { + Ok(false) + }) + } + + pub(crate) fn search_planned_with_exclusion( + &self, + map: &ProximityMap, + expected_source: &Cid, + request: SearchRequest<'_>, + plan: &crate::prolly::proximity::search::SearchPlan, + mut excluded: F, + ) -> Result + where + F: FnMut(&[u8]) -> Result, + { + let crate::prolly::proximity::search::SearchPlan::TurboQuantized { + rerank_target, + direct_lookup, + } = plan + else { + return Err(invalid_search( + "TurboQuant executor requires a TurboQuant search plan", + )); + }; + request.validate()?; + if request.policy == SearchPolicy::Exact { + return Err(invalid_search("TurboQuant cannot satisfy exact search")); + } + self.validate_binding(map, expected_source)?; + let query = prepare_vector(self.metric, request.query, self.dimensions)?; + let prepared_query = prepare_query_from_prepared( + &query, + &self.plan, + self.dimensions, + self.config.bit_width, + request.kernel, + ); + let filter = PreparedFilter::new(request.filter.clone(), &map.tree().directory)?; + let mut stats = ProximitySearchStats::default(); + let mut approximate = BinaryHeap::::new(); + let mut completion = SearchCompletion::ApproximatePolicySatisfied; + + if *direct_lookup { + let Some((keys, source_bound)) = filter.sorted_keys() else { + return Err(invalid_search( + "TurboQuant direct-lookup plan requires sorted eligible keys", + )); + }; + for key in keys { + if excluded(key)? { + continue; + } + let code = self.codes.get(&self.code_tree, key)?; + let Some(code) = code else { + if source_bound { + return Err(invalid_object( + "source-bound eligible key has no TurboQuant code", + )); + } + continue; + }; + if !admit_quantized( + key.as_slice(), + &code, + *rerank_target, + &request, + &mut stats, + &mut approximate, + |code| { + score_code_value( + code, + &prepared_query, + self.metric, + self.dimensions as usize, + self.config.bit_width, + request.kernel, + ) + }, + )? { + completion = SearchCompletion::BudgetExhausted; + break; + } + } + } else { + for entry in self.codes.range(&self.code_tree, &[], None)? { + let (key, code) = entry?; + if !filter.contains(&key) || excluded(&key)? { + continue; + } + if !admit_quantized( + key, + &code, + *rerank_target, + &request, + &mut stats, + &mut approximate, + |code| { + score_code_value( + code, + &prepared_query, + self.metric, + self.dimensions as usize, + self.config.bit_width, + request.kernel, + ) + }, + )? { + completion = SearchCompletion::BudgetExhausted; + break; + } + } + } + let neighbors = rerank_authoritative( + map, + &request, + &query, + self.dimensions, + approximate, + &mut stats, + &mut completion, + "TurboQuant code key is absent from authoritative directory", + )?; + Ok(SearchResult { + neighbors, + stats, + completion, + plan: plan.summary(), + }) + } + + fn validate_binding(&self, map: &ProximityMap, expected_source: &Cid) -> Result<(), Error> { + if &self.source != expected_source { + return Err(invalid_search("TurboQuant source descriptor mismatch")); + } + if self.dimensions != map.tree().config.dimensions { + return Err(invalid_search("TurboQuant source dimensions mismatch")); + } + if self.metric != map.tree().config.metric { + return Err(invalid_search("TurboQuant source metric mismatch")); + } + // Direct execution has the authoritative source count available. A + // composite executes its immutable base against a newer map and binds + // the base count when the composite is built or loaded instead. + if expected_source == &map.tree().descriptor && self.count != map.tree().count { + return Err(invalid_search("TurboQuant source count mismatch")); + } + Ok(()) + } +} + +#[derive(Clone, Debug)] +pub(crate) struct StructuredRotation { + dimensions: usize, + block_width: usize, + rounds: Vec, + normalization: f64, +} + +#[derive(Clone, Debug)] +struct RotationRound { + permutation: Vec, + signs: Vec, +} + +impl StructuredRotation { + pub(crate) fn derive(dimensions: usize, seed: u64) -> Result { + let dimensions_u32 = u32::try_from(dimensions) + .map_err(|_| invalid_config("TurboQuant dimensions exceed u32"))?; + TurboQuantizationConfig { + bit_width: 4, + rerank_multiplier: 1, + seed, + } + .validate(dimensions_u32)?; + let block_width = 1usize << dimensions.trailing_zeros(); + let mut rounds = Vec::with_capacity(ROTATION_ROUNDS); + for round in 0..ROTATION_ROUNDS { + let domain_dimensions = (dimensions as u64) << 16; + let mut permutation_stream = + SplitMix64::new(seed ^ PERMUTATION_DOMAIN ^ domain_dimensions ^ round as u64); + let mut permutation: Vec<_> = (0..dimensions).collect(); + for index in (1..dimensions).rev() { + let draw = permutation_stream.next(); + let bound = (index as u64) + 1; + let selected = multiply_high(draw, bound) as usize; + permutation.swap(index, selected); + } + let mut sign_stream = + SplitMix64::new(seed ^ SIGN_DOMAIN ^ domain_dimensions ^ round as u64); + let signs = (0..dimensions) + .map(|_| if sign_stream.next() & 1 == 0 { 1 } else { -1 }) + .collect(); + rounds.push(RotationRound { permutation, signs }); + } + Ok(Self { + dimensions, + block_width, + rounds, + normalization: 1.0 / sqrt_down(block_width as f64), + }) + } + + fn apply(&self, input: &[f64]) -> Vec { + debug_assert_eq!(input.len(), self.dimensions); + let mut current = Vec::with_capacity(self.dimensions); + let mut work = vec![0.0; self.dimensions]; + self.apply_with_buffers(input, &mut current, &mut work); + current + } + + pub(crate) fn dimensions(&self) -> usize { + self.dimensions + } + + fn apply_with_buffers(&self, input: &[f64], current: &mut Vec, work: &mut Vec) { + debug_assert_eq!(input.len(), self.dimensions); + current.clear(); + current.extend_from_slice(input); + work.resize(self.dimensions, 0.0); + for round in &self.rounds { + for index in 0..self.dimensions { + let value = current[round.permutation[index]]; + work[index] = if round.signs[index] > 0 { + value + } else { + -value + }; + } + for block in work.chunks_exact_mut(self.block_width) { + let mut width = 1usize; + while width < self.block_width { + for start in (0..self.block_width).step_by(width * 2) { + for offset in 0..width { + let left = block[start + offset]; + let right = block[start + offset + width]; + block[start + offset] = left + right; + block[start + offset + width] = left - right; + } + } + width *= 2; + } + for value in block { + *value *= self.normalization; + if *value == 0.0 { + *value = 0.0; + } + } + } + std::mem::swap(current, work); + } + } + + pub(crate) fn butterfly_operations_per_vector(&self) -> usize { + ROTATION_ROUNDS * self.dimensions * self.block_width.ilog2() as usize + } + + pub(crate) fn operations_per_vector(&self) -> usize { + self.dimensions * (ROTATION_ROUNDS * (3 + self.block_width.ilog2() as usize) + 1) + } + + pub(crate) fn owned_bytes(&self) -> usize { + self.rounds.len() + * self.dimensions + * (std::mem::size_of::() + std::mem::size_of::()) + } +} + +#[derive(Clone, Copy)] +struct SplitMix64 { + state: u64, +} + +impl SplitMix64 { + fn new(state: u64) -> Self { + Self { state } + } + + fn next(&mut self) -> u64 { + self.state = self.state.wrapping_add(0x9e37_79b9_7f4a_7c15); + let mut value = self.state; + value = (value ^ (value >> 30)).wrapping_mul(0xbf58_476d_1ce4_e5b9); + value = (value ^ (value >> 27)).wrapping_mul(0x94d0_49bb_1331_11eb); + value ^ (value >> 31) + } +} + +fn multiply_high(left: u64, right: u64) -> u64 { + ((u128::from(left) * u128::from(right)) >> 64) as u64 +} + +#[derive(Clone, Copy)] +pub(crate) struct Codebook { + thresholds: &'static [u64], + centroids: &'static [u64], +} + +// Symmetric Lloyd-Max solutions for N(0,1), generated in binary64 and frozen +// as bits. Equality with a threshold selects the lower centroid. +const THRESHOLDS_2: &[u64] = &[ + 0xbfef_6941_ee8d_a043, + 0x0000_0000_0000_0000, + 0x3fef_6941_ee8d_a043, +]; +const CENTROIDS_2: &[u64] = &[ + 0xbff8_2aab_a77c_e5fa, + 0xbfdc_fa59_1c42_e927, + 0x3fdc_fa59_1c42_e927, + 0x3ff8_2aab_a77c_e5fa, +]; +const THRESHOLDS_3: &[u64] = &[ + 0xbffb_f782_d13d_cab0, + 0xbff0_cca0_0132_d1d5, + 0xbfe0_0480_de16_34f6, + 0x0000_0000_0000_0000, + 0x3fe0_0480_de16_34f6, + 0x3ff0_cca0_0132_d1d5, + 0x3ffb_f782_d13d_cab0, +]; +const CENTROIDS_3: &[u64] = &[ + 0xc001_372f_4f3e_0846, + 0xbff5_80a7_03ff_84d6, + 0xbfe8_3131_fccc_3da8, + 0xbfcf_5f3e_fd80_b113, + 0x3fcf_5f3e_fd80_b113, + 0x3fe8_3131_fccc_3da8, + 0x3ff5_80a7_03ff_84d6, + 0x4001_372f_4f3e_0846, +]; +const THRESHOLDS_4: &[u64] = &[ + 0xc003_34d8_698e_82e4, + 0xbffd_7f1b_3511_80d5, + 0xbff6_fe85_3ee1_9176, + 0xbff1_96ac_bc39_0ac5, + 0xbfe9_95e9_6f9c_1848, + 0xbfe0_b787_fbb0_6a33, + 0xbfd0_86b4_2938_4856, + 0x0000_0000_0000_0000, + 0x3fd0_86b4_2938_4856, + 0x3fe0_b787_fbb0_6a33, + 0x3fe9_95e9_6f9c_1848, + 0x3ff1_96ac_bc39_0ac5, + 0x3ff6_fe85_3ee1_9176, + 0x3ffd_7f1b_3511_80d5, + 0x4003_34d8_698e_82e4, +]; +const CENTROIDS_4: &[u64] = &[ + 0xc005_dc57_ebc6_84e8, + 0xc000_8d58_e756_80e1, + 0xbff9_e384_9b75_ffe8, + 0xbff4_1985_e24d_2303, + 0xbfee_27a7_2c49_e50d, + 0xbfe5_042b_b2ee_4b83, + 0xbfd8_d5c8_88e5_11c6, + 0xbfc0_6f3f_9316_fdcb, + 0x3fc0_6f3f_9316_fdcb, + 0x3fd8_d5c8_88e5_11c6, + 0x3fe5_042b_b2ee_4b83, + 0x3fee_27a7_2c49_e50d, + 0x3ff4_1985_e24d_2303, + 0x3ff9_e384_9b75_ffe8, + 0x4000_8d58_e756_80e1, + 0x4005_dc57_ebc6_84e8, +]; + +pub(crate) fn codebook(bit_width: u8) -> Codebook { + match bit_width { + 2 => Codebook { + thresholds: THRESHOLDS_2, + centroids: CENTROIDS_2, + }, + 3 => Codebook { + thresholds: THRESHOLDS_3, + centroids: CENTROIDS_3, + }, + 4 => Codebook { + thresholds: THRESHOLDS_4, + centroids: CENTROIDS_4, + }, + _ => unreachable!("validated TurboQuant bit width"), + } +} + +impl Codebook { + fn quantize(&self, value: f64) -> u8 { + self.thresholds + .partition_point(|threshold| value > f64::from_bits(*threshold)) as u8 + } + + fn centroid(&self, code: u8) -> f64 { + f64::from_bits(self.centroids[code as usize]) + } +} + +pub(crate) struct EncodedVector { + pub(crate) bytes: Vec, + pub(crate) error: f64, + pub(crate) zero: bool, +} + +pub(crate) struct EncodingScratch { + unit: Vec, + current: Vec, + work: Vec, + codes: Vec, + packed: Vec, +} + +impl EncodingScratch { + pub(crate) fn new(dimensions: usize, packed_len: usize) -> Self { + Self { + unit: Vec::with_capacity(dimensions), + current: Vec::with_capacity(dimensions), + work: vec![0.0; dimensions], + codes: Vec::with_capacity(dimensions), + packed: Vec::with_capacity(packed_len), + } + } +} + +pub(crate) fn encode_vector_reusing( + vector: &[f32], + plan: &StructuredRotation, + codebook: Codebook, + bit_width: u8, + sqrt_dimensions: f64, + scratch: &mut EncodingScratch, +) -> Result { + let norm_squared = vector.iter().fold(0.0, |sum, component| { + let value = f64::from(*component); + sum + value * value + }); + let norm = sqrt_down(norm_squared); + if norm == 0.0 { + let value_len = 8 + packed_len(vector.len(), bit_width)?; + let mut bytes = Vec::with_capacity(value_len); + bytes.extend_from_slice(&0.0f64.to_bits().to_le_bytes()); + bytes.resize(value_len, 0); + return Ok(EncodedVector { + bytes, + error: 0.0, + zero: true, + }); + } + scratch.unit.clear(); + scratch + .unit + .extend(vector.iter().map(|component| f64::from(*component) / norm)); + plan.apply_with_buffers(&scratch.unit, &mut scratch.current, &mut scratch.work); + scratch.codes.clear(); + scratch.codes.extend( + scratch + .current + .iter() + .map(|value| codebook.quantize(value * sqrt_dimensions)), + ); + pack_codes_into(&scratch.codes, bit_width, &mut scratch.packed)?; + let inverse_sqrt_dimensions = 1.0 / sqrt_dimensions; + let error = scratch + .current + .iter() + .zip(&scratch.codes) + .fold(0.0, |sum, (actual, code)| { + let delta = actual - codebook.centroid(*code) * inverse_sqrt_dimensions; + sum + delta * delta + }); + let mut bytes = Vec::with_capacity(8 + scratch.packed.len()); + bytes.extend_from_slice(&norm.to_bits().to_le_bytes()); + bytes.extend_from_slice(&scratch.packed); + Ok(EncodedVector { + bytes, + error, + zero: false, + }) +} + +pub(crate) fn packed_len(dimensions: usize, bit_width: u8) -> Result { + dimensions + .checked_mul(bit_width as usize) + .map(|bits| bits.div_ceil(8)) + .ok_or_else(|| resource_limit("TurboQuant packed code bytes", usize::MAX, usize::MAX)) +} + +#[cfg(test)] +fn pack_codes(codes: &[u8], bit_width: u8) -> Result, Error> { + let mut packed = Vec::new(); + pack_codes_into(codes, bit_width, &mut packed)?; + Ok(packed) +} + +fn pack_codes_into(codes: &[u8], bit_width: u8, packed: &mut Vec) -> Result<(), Error> { + packed.clear(); + packed.resize(packed_len(codes.len(), bit_width)?, 0); + let maximum = 1u8 << bit_width; + if codes.iter().any(|code| *code >= maximum) { + return Err(invalid_object("TurboQuant centroid code is out of range")); + } + let grouped_codes = match bit_width { + 2 => { + for (input, output) in codes.chunks_exact(4).zip(packed.iter_mut()) { + *output = input[0] | (input[1] << 2) | (input[2] << 4) | (input[3] << 6); + } + codes.len() / 4 * 4 + } + 3 => { + for (group, input) in codes.chunks_exact(8).enumerate() { + let output = u32::from(input[0]) + | (u32::from(input[1]) << 3) + | (u32::from(input[2]) << 6) + | (u32::from(input[3]) << 9) + | (u32::from(input[4]) << 12) + | (u32::from(input[5]) << 15) + | (u32::from(input[6]) << 18) + | (u32::from(input[7]) << 21); + packed[group * 3] = output as u8; + packed[group * 3 + 1] = (output >> 8) as u8; + packed[group * 3 + 2] = (output >> 16) as u8; + } + codes.len() / 8 * 8 + } + 4 => { + for (input, output) in codes.chunks_exact(2).zip(packed.iter_mut()) { + *output = input[0] | (input[1] << 4); + } + codes.len() / 2 * 2 + } + _ => unreachable!("validated TurboQuant bit width"), + }; + for (index, code) in codes.iter().copied().enumerate().skip(grouped_codes) { + let bit_offset = index * bit_width as usize; + for bit in 0..bit_width as usize { + if code & (1 << bit) != 0 { + let output = bit_offset + bit; + packed[output / 8] |= 1 << (output % 8); + } + } + } + Ok(()) +} + +#[cfg(test)] +fn unpack_code(packed: &[u8], index: usize, bit_width: u8) -> u8 { + let bit_offset = index * bit_width as usize; + let byte = bit_offset / 8; + let shift = bit_offset % 8; + let window = + u16::from(packed[byte]) | (packed.get(byte + 1).copied().map(u16::from).unwrap_or(0) << 8); + ((window >> shift) & ((1u16 << bit_width) - 1)) as u8 +} + +fn fill_centroids( + packed: &[u8], + start: usize, + bit_width: u8, + codebook: Codebook, + output: &mut [f64], +) { + let bit_offset = start * bit_width as usize; + debug_assert_eq!(bit_offset % 8, 0); + let packed = &packed[bit_offset / 8..]; + match bit_width { + 2 => { + debug_assert_eq!(output.len() % 4, 0); + for (codes, centroids) in packed.iter().zip(output.chunks_exact_mut(4)) { + let codes = *codes; + centroids[0] = codebook.centroid(codes & 0x03); + centroids[1] = codebook.centroid((codes >> 2) & 0x03); + centroids[2] = codebook.centroid((codes >> 4) & 0x03); + centroids[3] = codebook.centroid(codes >> 6); + } + } + 3 => { + debug_assert_eq!(output.len() % 8, 0); + for (codes, centroids) in packed.chunks_exact(3).zip(output.chunks_exact_mut(8)) { + let codes = + u32::from(codes[0]) | (u32::from(codes[1]) << 8) | (u32::from(codes[2]) << 16); + centroids[0] = codebook.centroid((codes & 0x07) as u8); + centroids[1] = codebook.centroid(((codes >> 3) & 0x07) as u8); + centroids[2] = codebook.centroid(((codes >> 6) & 0x07) as u8); + centroids[3] = codebook.centroid(((codes >> 9) & 0x07) as u8); + centroids[4] = codebook.centroid(((codes >> 12) & 0x07) as u8); + centroids[5] = codebook.centroid(((codes >> 15) & 0x07) as u8); + centroids[6] = codebook.centroid(((codes >> 18) & 0x07) as u8); + centroids[7] = codebook.centroid(((codes >> 21) & 0x07) as u8); + } + } + 4 => { + debug_assert_eq!(output.len() % 2, 0); + for (codes, centroids) in packed.iter().zip(output.chunks_exact_mut(2)) { + let codes = *codes; + centroids[0] = codebook.centroid(codes & 0x0f); + centroids[1] = codebook.centroid(codes >> 4); + } + } + _ => unreachable!("validated TurboQuant bit width"), + } +} + +pub(crate) fn validate_code_value( + bytes: &[u8], + dimensions: usize, + bit_width: u8, +) -> Result { + let expected = 8usize + .checked_add(packed_len(dimensions, bit_width)?) + .ok_or_else(|| invalid_object("TurboQuant code length overflow"))?; + if bytes.len() != expected { + return Err(invalid_object("invalid TurboQuant code value length")); + } + let norm = f64::from_bits(u64::from_le_bytes( + bytes[..8].try_into().expect("eight-byte norm"), + )); + if !norm.is_finite() || norm < 0.0 || norm.to_bits() == (-0.0f64).to_bits() { + return Err(invalid_object("non-canonical TurboQuant norm")); + } + let packed = &bytes[8..]; + let used_bits = dimensions * bit_width as usize; + let remainder = used_bits % 8; + if remainder != 0 { + let padding_mask = !((1u8 << remainder) - 1); + if packed.last().is_some_and(|byte| byte & padding_mask != 0) { + return Err(invalid_object("nonzero TurboQuant code padding bits")); + } + } + if norm == 0.0 && packed.iter().any(|byte| *byte != 0) { + return Err(invalid_object( + "zero TurboQuant norm requires all-zero codes", + )); + } + Ok(norm) +} + +pub(crate) struct TurboQuantPreparedQuery { + weighted: Vec, + product_table: TurboQuantProductTable, + reconstructed_squares: [f64; 16], + norm_squared: f64, +} + +enum TurboQuantProductTable { + None, + TwoBit(Vec<[[f64; 2]; 4]>), + ThreeBit(Vec<[[f64; 4]; 8]>), + FourBit(Vec<[[f64; 8]; 2]>), +} + +impl TurboQuantProductTable { + fn product_count(&self) -> usize { + match self { + Self::None => 0, + Self::TwoBit(groups) => groups.len() * 4 * 2, + Self::ThreeBit(groups) => groups.len() * 8 * 4, + Self::FourBit(groups) => groups.len() * 2 * 8, + } + } +} + +impl TurboQuantPreparedQuery { + fn new(weighted: Vec, norm_squared: f64, bit_width: u8, kernel: QueryKernel) -> Self { + let inverse_sqrt_dimensions = 1.0 / sqrt_down(weighted.len() as f64); + let codebook = codebook(bit_width); + let mut reconstructed_squares = [0.0; 16]; + for (code, square) in reconstructed_squares + .iter_mut() + .enumerate() + .take(1usize << bit_width) + { + let reconstructed = codebook.centroid(code as u8) * inverse_sqrt_dimensions; + *square = reconstructed * reconstructed; + } + let product_table = if matches!(kernel, QueryKernel::SimdDeterministic) { + TurboQuantProductTable::None + } else { + match bit_width { + 2 => TurboQuantProductTable::TwoBit( + weighted + .chunks_exact(4) + .map(|weights| { + std::array::from_fn(|dimension| { + std::array::from_fn(|code| { + weights[dimension] * codebook.centroid(code as u8) + }) + }) + }) + .collect(), + ), + 3 => TurboQuantProductTable::ThreeBit( + weighted + .chunks_exact(8) + .map(|weights| { + std::array::from_fn(|dimension| { + std::array::from_fn(|code| { + weights[dimension] * codebook.centroid(code as u8) + }) + }) + }) + .collect(), + ), + 4 => TurboQuantProductTable::FourBit( + weighted + .chunks_exact(2) + .map(|weights| { + std::array::from_fn(|dimension| { + std::array::from_fn(|code| { + weights[dimension] * codebook.centroid(code as u8) + }) + }) + }) + .collect(), + ), + _ => unreachable!("validated TurboQuant bit width"), + } + }; + Self { + weighted, + product_table, + reconstructed_squares, + norm_squared, + } + } +} + +pub(crate) fn prepare_query_with_plan( + metric: DistanceMetric, + query: &[f32], + dimensions: u32, + plan: &StructuredRotation, + bit_width: u8, + kernel: QueryKernel, +) -> Result<(Vec, TurboQuantPreparedQuery), Error> { + if plan.dimensions != dimensions as usize { + return Err(invalid_search( + "TurboQuant transform plan dimensions do not match the query", + )); + } + let query = prepare_vector(metric, query, dimensions)?; + let prepared = prepare_query_from_prepared(&query, plan, dimensions, bit_width, kernel); + Ok((query, prepared)) +} + +fn prepare_query_from_prepared( + query: &[f32], + plan: &StructuredRotation, + dimensions: u32, + bit_width: u8, + kernel: QueryKernel, +) -> TurboQuantPreparedQuery { + let query_f64: Vec<_> = query.iter().map(|value| f64::from(*value)).collect(); + let transformed = plan.apply(&query_f64); + let inverse_sqrt_dimensions = 1.0 / sqrt_down(f64::from(dimensions)); + TurboQuantPreparedQuery::new( + transformed + .into_iter() + .map(|value| value * inverse_sqrt_dimensions) + .collect(), + query_f64.iter().fold(0.0, |sum, value| sum + value * value), + bit_width, + kernel, + ) +} + +pub(crate) fn score_code_value( + bytes: &[u8], + prepared_query: &TurboQuantPreparedQuery, + metric: DistanceMetric, + dimensions: usize, + bit_width: u8, + kernel: QueryKernel, +) -> Result { + let norm = validate_code_value(bytes, dimensions, bit_width)?; + let packed = &bytes[8..]; + let (reconstructed_unit_dot, reconstructed_norm_squared) = if norm == 0.0 { + (0.0, 0.0) + } else if matches!( + kernel, + QueryKernel::ScalarDeterministic | QueryKernel::AutoDeterministic + ) { + score_precomputed_centroids(packed, prepared_query, bit_width) + } else { + let codebook = codebook(bit_width); + let inverse_sqrt_dimensions = 1.0 / sqrt_down(dimensions as f64); + const PRODUCT_SLOTS: usize = 64; + let mut centroids = [0.0f64; PRODUCT_SLOTS]; + let mut products = [0.0f64; PRODUCT_SLOTS]; + let mut reduced = 0.0; + let mut reconstructed_norm_squared = 0.0; + let mut start = 0usize; + while start < dimensions { + let end = start.saturating_add(PRODUCT_SLOTS).min(dimensions); + fill_centroids( + packed, + start, + bit_width, + codebook, + &mut centroids[..end - start], + ); + for ¢roid in ¢roids[..end - start] { + let reconstructed = centroid * inverse_sqrt_dimensions; + reconstructed_norm_squared += reconstructed * reconstructed; + } + fill_query_products_f64( + kernel, + &prepared_query.weighted[start..end], + ¢roids[..end - start], + &mut products[..end - start], + ); + for &product in &products[..end - start] { + reduced += product; + } + start = end; + } + (reduced, reconstructed_norm_squared) + }; + let dot = match metric { + DistanceMetric::L2Squared => norm * reconstructed_unit_dot, + DistanceMetric::Cosine => { + // Cosine preparation normalizes both query and source. Multiplying + // by the persisted original source norm would violate scale + // invariance and collapse large positive similarities at the + // clamp boundary. + reconstructed_unit_dot + } + DistanceMetric::InnerProduct => { + // The persisted norm describes the original source vector, while + // the packed codes reconstruct only its unit direction. Remove + // quantization-induced reconstruction-norm drift before restoring + // the exact source magnitude. + if norm == 0.0 { + 0.0 + } else { + norm * reconstructed_unit_dot / sqrt_down(reconstructed_norm_squared) + } + } + }; + let distance = match metric { + DistanceMetric::L2Squared => { + (prepared_query.norm_squared + norm * norm * reconstructed_norm_squared - 2.0 * dot) + .max(0.0) + } + DistanceMetric::Cosine => { + let similarity = if norm == 0.0 { + 0.0 + } else { + dot / sqrt_down(reconstructed_norm_squared) + }; + 1.0 - similarity.clamp(-1.0, 1.0) + } + DistanceMetric::InnerProduct => -dot, + }; + Ok(if distance == 0.0 { 0.0 } else { distance }) +} + +#[inline] +fn score_precomputed_centroids( + packed: &[u8], + prepared: &TurboQuantPreparedQuery, + bit_width: u8, +) -> (f64, f64) { + debug_assert_eq!( + prepared.product_table.product_count(), + prepared.weighted.len() * (1usize << (bit_width - 1)) + ); + let mut reduced = 0.0; + let mut reconstructed_norm_squared = 0.0; + match (&prepared.product_table, bit_width) { + (TurboQuantProductTable::TwoBit(groups), 2) => { + for (rows, byte) in groups.iter().zip(packed.iter().copied()) { + let codes = [ + byte & 0x03, + (byte >> 2) & 0x03, + (byte >> 4) & 0x03, + byte >> 6, + ]; + for (row, code) in rows.iter().zip(codes) { + reduced += symmetric_row_product_2(row, code); + reconstructed_norm_squared += prepared.reconstructed_squares[usize::from(code)]; + } + } + } + (TurboQuantProductTable::ThreeBit(groups), 3) => { + for (rows, bytes) in groups.iter().zip(packed.chunks_exact(3)) { + let codes = + u32::from(bytes[0]) | (u32::from(bytes[1]) << 8) | (u32::from(bytes[2]) << 16); + for (row, products) in rows.iter().enumerate() { + let code = ((codes >> (row * 3)) & 0x07) as u8; + reduced += symmetric_row_product_4(products, code); + reconstructed_norm_squared += prepared.reconstructed_squares[usize::from(code)]; + } + } + } + (TurboQuantProductTable::FourBit(groups), 4) => { + for (rows, byte) in groups.iter().zip(packed.iter().copied()) { + let codes = [byte & 0x0f, byte >> 4]; + for (row, code) in rows.iter().zip(codes) { + reduced += symmetric_row_product_8(row, code); + reconstructed_norm_squared += prepared.reconstructed_squares[usize::from(code)]; + } + } + } + _ => unreachable!("validated TurboQuant bit width"), + } + (reduced, reconstructed_norm_squared) +} + +#[inline(always)] +fn symmetric_row_product_2(row: &[f64; 2], code: u8) -> f64 { + let side = usize::from(code) >> 1; + debug_assert!(side <= 1); + let mirror_mask = 0usize.wrapping_sub(side) & 3; + let index = (usize::from(code) ^ mirror_mask) & 1; + let product = row[index]; + f64::from_bits(product.to_bits() ^ ((side as u64) << 63)) +} + +#[inline(always)] +fn symmetric_row_product_4(row: &[f64; 4], code: u8) -> f64 { + let side = usize::from(code) >> 2; + debug_assert!(side <= 1); + let mirror_mask = 0usize.wrapping_sub(side) & 7; + let index = (usize::from(code) ^ mirror_mask) & 3; + let product = row[index]; + f64::from_bits(product.to_bits() ^ ((side as u64) << 63)) +} + +#[inline(always)] +fn symmetric_row_product_8(row: &[f64; 8], code: u8) -> f64 { + let side = usize::from(code) >> 3; + debug_assert!(side <= 1); + let mirror_mask = 0usize.wrapping_sub(side) & 15; + let index = (usize::from(code) ^ mirror_mask) & 7; + let product = row[index]; + f64::from_bits(product.to_bits() ^ ((side as u64) << 63)) +} + +#[derive(Clone)] +pub(crate) struct Manifest { + pub(crate) source: Cid, + pub(crate) dimensions: u32, + pub(crate) metric: DistanceMetric, + pub(crate) count: u64, + pub(crate) config: TurboQuantizationConfig, + pub(crate) transform_id: u8, + pub(crate) codebook_id: u8, + pub(crate) code_root: Cid, + pub(crate) quality: TurboQuantizationQuality, + pub(crate) zero_vectors: u64, +} + +impl Manifest { + pub(crate) fn encode(&self) -> Result, Error> { + let mut bytes = Vec::new(); + bytes.extend_from_slice(MAGIC); + bytes.push(TURBOQUANT_FORMAT_VERSION); + bytes.push(0); + put_cid(&self.source, &mut bytes); + put_varint(u64::from(self.dimensions), &mut bytes); + bytes.push(self.metric.id()); + put_varint(self.count, &mut bytes); + bytes.push(self.config.bit_width); + put_varint(u64::from(self.config.rerank_multiplier), &mut bytes); + bytes.extend_from_slice(&self.config.seed.to_le_bytes()); + bytes.push(self.transform_id); + bytes.push(self.codebook_id); + put_cid(&self.code_root, &mut bytes); + put_f64(self.quality.mean_squared_error, &mut bytes)?; + put_f64(self.quality.maximum_squared_error, &mut bytes)?; + put_varint(self.zero_vectors, &mut bytes); + put_cid(&config_fingerprint(&self.config), &mut bytes); + Ok(bytes) + } + + pub(crate) fn decode(bytes: &[u8]) -> Result { + let mut reader = Reader::new(bytes, "TurboQuant"); + reader.exact(MAGIC)?; + require_version(reader.u8()?)?; + if reader.u8()? != 0 { + return Err(reader.invalid("unknown TurboQuant flags")); + } + let source = reader.cid()?; + let dimensions = u32::try_from(reader.varint()?) + .map_err(|_| reader.invalid("TurboQuant dimensions exceed u32"))?; + let metric = DistanceMetric::from_id(reader.u8()?)?; + let count = reader.varint()?; + if count == 0 { + return Err(reader.invalid("TurboQuant source count must be positive")); + } + let config = TurboQuantizationConfig { + bit_width: reader.u8()?, + rerank_multiplier: u32::try_from(reader.varint()?) + .map_err(|_| reader.invalid("TurboQuant rerank multiplier exceeds u32"))?, + seed: reader.u64_le()?, + }; + config.validate(dimensions)?; + let transform_id = reader.u8()?; + let codebook_id = reader.u8()?; + if transform_id != STRUCTURED_ROTATION_ID { + return Err(reader.invalid("unsupported TurboQuant transform ID")); + } + if codebook_id != NORMAL_LLOYD_MAX_CODEBOOK_ID { + return Err(reader.invalid("unsupported TurboQuant codebook ID")); + } + let code_root = reader.cid()?; + let quality = TurboQuantizationQuality { + mean_squared_error: reader.f64()?, + maximum_squared_error: reader.f64()?, + }; + if quality.mean_squared_error < 0.0 + || quality.maximum_squared_error < quality.mean_squared_error + { + return Err(reader.invalid("invalid TurboQuant quality measurements")); + } + let zero_vectors = reader.varint()?; + if zero_vectors > count { + return Err(reader.invalid("TurboQuant zero-vector count exceeds source count")); + } + if reader.cid()? != config_fingerprint(&config) { + return Err(reader.invalid("TurboQuant configuration fingerprint mismatch")); + } + reader.finish()?; + Ok(Self { + source, + dimensions, + metric, + count, + config, + transform_id, + codebook_id, + code_root, + quality, + zero_vectors, + }) + } +} + +pub(crate) fn config_fingerprint(config: &TurboQuantizationConfig) -> Cid { + let mut bytes = Vec::new(); + bytes.push(config.bit_width); + put_varint(u64::from(config.rerank_multiplier), &mut bytes); + bytes.extend_from_slice(&config.seed.to_le_bytes()); + bytes.push(STRUCTURED_ROTATION_ID); + bytes.push(NORMAL_LLOYD_MAX_CODEBOOK_ID); + Cid::from_bytes(&bytes) +} + +pub(crate) fn turboquant_code_tree_config() -> Config { + Config::builder() + .min_chunk_size(4) + .max_chunk_size(1024 * 1024) + .chunking_factor(128) + .hash_seed(0) + .encoding(Encoding::Raw) + .build() +} + +pub(crate) fn validate_code_tree_root(bytes: &[u8], expected_count: u64) -> Result<(), Error> { + let root = decode_code_tree_node(bytes)?; + let actual_count = code_tree_node_count(&root)?; + if actual_count != expected_count { + return Err(invalid_object( + "TurboQuant code-tree root count disagrees with manifest", + )); + } + Ok(()) +} + +pub(crate) fn decode_code_tree_node(bytes: &[u8]) -> Result { + let config = turboquant_code_tree_config(); + let hard_max = usize::try_from(config.format.chunking.hard_max_node_bytes) + .map_err(|_| invalid_object("TurboQuant code-tree hard byte limit exceeds usize"))?; + if bytes.len() > hard_max { + return Err(invalid_object( + "TurboQuant code-tree node exceeds its hard byte limit", + )); + } + let node = Node::from_bytes_with_format(bytes, &config.format) + .map_err(|_| invalid_object("malformed TurboQuant code-tree node"))?; + node.validate() + .map_err(|_| invalid_object("malformed TurboQuant code-tree node"))?; + Ok(node) +} + +pub(crate) fn code_tree_node_count(node: &Node) -> Result { + if node.leaf { + u64::try_from(node.len()) + .map_err(|_| invalid_object("TurboQuant code-tree node count exceeds u64")) + } else { + node.child_counts.iter().try_fold(0u64, |count, child| { + count + .checked_add(*child) + .ok_or_else(|| invalid_object("TurboQuant code-tree node count overflow")) + }) + } +} + +fn require_version(found: u8) -> Result<(), Error> { + if found == TURBOQUANT_FORMAT_VERSION { + Ok(()) + } else { + Err(Error::UnsupportedProximityVersion { + found, + required: TURBOQUANT_FORMAT_VERSION, + }) + } +} + +pub(crate) fn enforce_resource( + resource: &'static str, + limit: Option, + actual: usize, +) -> Result<(), Error> { + if limit.is_some_and(|limit| actual > limit) { + return Err(resource_limit( + resource, + limit.expect("checked limit"), + actual, + )); + } + Ok(()) +} + +pub(crate) fn temporary_peak_bytes( + plan_bytes: usize, + per_worker_bytes: usize, + workers: usize, + builder_bytes: usize, + input_bytes: usize, + records: usize, + encoded_value_bytes: usize, +) -> Result { + let worker_bytes = per_worker_bytes + .checked_mul(workers) + .ok_or_else(|| resource_limit("TurboQuant temporary bytes", usize::MAX, usize::MAX))?; + let output_bytes = records + .checked_mul(encoded_value_bytes) + .ok_or_else(|| resource_limit("TurboQuant temporary bytes", usize::MAX, usize::MAX))?; + plan_bytes + .checked_add(worker_bytes) + .and_then(|value| value.checked_add(builder_bytes)) + .and_then(|value| value.checked_add(input_bytes)) + .and_then(|value| value.checked_add(output_bytes)) + .ok_or_else(|| resource_limit("TurboQuant temporary bytes", usize::MAX, usize::MAX)) +} + +pub(crate) fn resource_limit(resource: &'static str, limit: usize, actual: usize) -> Error { + Error::ProximityResourceLimitExceeded { + resource, + limit, + actual, + } +} + +fn load_content(store: &S, cid: &Cid) -> Result, Error> { + let bytes = store + .get(cid.as_bytes()) + .map_err(|error| Error::Store(Box::new(error)))? + .ok_or_else(|| Error::NotFound(cid.clone()))?; + let actual = Cid::from_bytes(&bytes); + if actual != *cid { + return Err(Error::CidMismatch { + expected: cid.clone(), + actual, + }); + } + Ok(bytes) +} + +fn invalid_config(reason: impl Into) -> Error { + Error::InvalidProximityConfig { + reason: reason.into(), + } +} + +pub(crate) fn invalid_object(reason: impl Into) -> Error { + Error::InvalidProximityObject { + kind: "TurboQuant", + reason: reason.into(), + } +} + +fn invalid_search(reason: impl Into) -> Error { + Error::InvalidProximitySearch { + reason: reason.into(), + } +} + +#[cfg(test)] +mod tests { + use super::*; + use crate::prolly::store::MemStore; + use std::sync::Arc; + + fn mismatched_root_count_fixture() -> (Arc, Cid) { + let store = Arc::new(MemStore::new()); + let config = turboquant_code_tree_config(); + let root = Node { + keys: vec![b"only-code".to_vec()], + vals: vec![vec![0; 8 + packed_len(8, 4).unwrap()]], + child_counts: Vec::new(), + leaf: true, + level: 0, + format: config.format, + }; + let root_bytes = root.to_bytes(); + let code_root = Cid::from_bytes(&root_bytes); + Store::put(&store, code_root.as_bytes(), &root_bytes).unwrap(); + let manifest = Manifest { + source: Cid::from_bytes(b"source"), + dimensions: 8, + metric: DistanceMetric::L2Squared, + count: 2, + config: TurboQuantizationConfig::default(), + transform_id: STRUCTURED_ROTATION_ID, + codebook_id: NORMAL_LLOYD_MAX_CODEBOOK_ID, + code_root, + quality: TurboQuantizationQuality::default(), + zero_vectors: 0, + }; + let manifest_bytes = manifest.encode().unwrap(); + let manifest_cid = Cid::from_bytes(&manifest_bytes); + Store::put(&store, manifest_cid.as_bytes(), &manifest_bytes).unwrap(); + (store, manifest_cid) + } + + fn assert_root_count_error(error: Error) { + assert!(matches!( + error, + Error::InvalidProximityObject { kind: "TurboQuant", reason } + if reason == "TurboQuant code-tree root count disagrees with manifest" + )); + } + + #[test] + fn splitmix64_v1_is_frozen() { + let mut stream = SplitMix64::new(0); + assert_eq!(stream.next(), 0xe220_a839_7b1d_cdaf); + assert_eq!(stream.next(), 0x6e78_9e6a_a1b9_65f4); + assert_eq!(stream.next(), 0x06c4_5d18_8009_454f); + assert_eq!(multiply_high(u64::MAX, 1), 0); + assert_eq!(multiply_high(u64::MAX, u64::MAX), u64::MAX - 1); + assert_eq!(multiply_high(0x8000_0000_0000_0000, 8), 4); + } + + #[test] + fn load_rejects_a_code_tree_root_count_that_disagrees_with_the_manifest() { + let (store, manifest_cid) = mismatched_root_count_fixture(); + let error = match TurboQuantizer::load(store, manifest_cid) { + Ok(_) => panic!("mismatched TurboQuant root count loaded"), + Err(error) => error, + }; + assert_root_count_error(error); + } + + #[test] + fn direct_search_rejects_a_manifest_count_that_disagrees_with_the_source() { + use crate::prolly::proximity::{ + CompositeAccelerator, CompositeAcceleratorConfig, CompositeBase, CompositeBuildLimits, + ProximityConfig, ProximityRecord, + }; + + let store = Arc::new(MemStore::new()); + let map = ProximityMap::build( + store.clone(), + ProximityConfig::new(8), + [ + ProximityRecord { + key: b"first".to_vec(), + vector: vec![1.0; 8], + value: b"first value".to_vec(), + }, + ProximityRecord { + key: b"second".to_vec(), + vector: vec![2.0; 8], + value: b"second value".to_vec(), + }, + ], + ) + .unwrap(); + let (index, _) = TurboQuantizer::build( + &map, + TurboQuantizationConfig::default(), + BuildParallelism::serial(), + ) + .unwrap(); + + // Construct an internally valid one-record code tree, then bind it to + // the real two-record descriptor through a forged manifest. Loading + // authenticates the complete derived closure; execution must still + // reject the manifest/source cardinality disagreement before scanning. + let (key, code) = index + .codes + .range(&index.code_tree, &[], None) + .unwrap() + .next() + .unwrap() + .unwrap(); + let mut builder = SortedBatchBuilder::new_with_origin( + store.clone(), + turboquant_code_tree_config(), + PublicationOrigin::Maintenance, + ); + builder.add(key, code).unwrap(); + let partial_tree = builder.build().unwrap(); + let original_manifest = Store::get(&store, index.manifest_cid().as_bytes()) + .unwrap() + .unwrap(); + let mut forged = Manifest::decode(&original_manifest).unwrap(); + forged.count = 1; + forged.code_root = partial_tree.root.unwrap(); + let forged_bytes = forged.encode().unwrap(); + let forged_cid = Cid::from_bytes(&forged_bytes); + Store::put(&store, forged_cid.as_bytes(), &forged_bytes).unwrap(); + let forged = TurboQuantizer::load(store, forged_cid).unwrap(); + + let mut request = SearchRequest::exact(&[1.0; 8], 1); + request.policy = SearchPolicy::FixedBudget; + request.options.backend = SearchBackend::TurboQuantized; + assert!(matches!( + forged.search(&map, request), + Err(Error::InvalidProximitySearch { reason }) + if reason == "TurboQuant source count mismatch" + )); + assert!(matches!( + CompositeAccelerator::build( + &map, + &map, + CompositeBase::TurboQuantized(forged), + CompositeAcceleratorConfig::default(), + CompositeBuildLimits::default(), + ), + Err(Error::InvalidProximitySearch { reason }) + if reason + == "composite base/current sources or accelerator configuration disagree" + )); + } + + #[test] + fn every_turboquant_manifest_binding_mutation_fails_closed() { + use crate::prolly::proximity::{ProximityConfig, ProximityRecord}; + + let store = Arc::new(MemStore::new()); + let map = ProximityMap::build( + store.clone(), + ProximityConfig::new(8), + [ + ProximityRecord { + key: b"first".to_vec(), + vector: vec![1.0, -2.0, 3.0, -4.0, 5.0, -6.0, 7.0, -8.0], + value: Vec::new(), + }, + ProximityRecord { + key: b"second".to_vec(), + vector: vec![-8.0, 7.0, -6.0, 5.0, -4.0, 3.0, -2.0, 1.0], + value: Vec::new(), + }, + ], + ) + .unwrap(); + let (index, _) = TurboQuantizer::build( + &map, + TurboQuantizationConfig::default(), + BuildParallelism::serial(), + ) + .unwrap(); + let manifest_bytes = Store::get(&store, index.manifest_cid().as_bytes()) + .unwrap() + .unwrap(); + let manifest = Manifest::decode(&manifest_bytes).unwrap(); + + let assert_fails_closed = |candidate: Manifest, field: &str| { + let bytes = candidate.encode().unwrap(); + let cid = Cid::from_bytes(&bytes); + Store::put(&store, cid.as_bytes(), &bytes).unwrap(); + if let Ok(candidate) = TurboQuantizer::load(store.clone(), cid) { + assert!( + candidate.verify(&map).is_err(), + "mutated TurboQuant {field} passed full verification" + ); + } + }; + + let mut source = manifest.clone(); + source.source = Cid::from_bytes(b"another source"); + assert_fails_closed(source, "source CID"); + + let mut dimensions = manifest.clone(); + dimensions.dimensions = 16; + assert_fails_closed(dimensions, "dimensions"); + + let mut metric = manifest.clone(); + metric.metric = DistanceMetric::Cosine; + assert_fails_closed(metric, "metric"); + + let mut count = manifest.clone(); + count.count += 1; + assert_fails_closed(count, "count"); + + let mut seed = manifest.clone(); + seed.config.seed ^= 1; + assert_fails_closed(seed, "seed"); + + let mut transform = manifest.clone(); + transform.transform_id += 1; + assert_fails_closed(transform, "transform ID"); + + let mut codebook = manifest.clone(); + codebook.codebook_id += 1; + assert_fails_closed(codebook, "codebook ID"); + + let mut bit_width = manifest.clone(); + bit_width.config.bit_width = 3; + assert_fails_closed(bit_width, "bit width"); + + let mut quality = manifest.clone(); + quality.quality.mean_squared_error += 1.0; + quality.quality.maximum_squared_error += 1.0; + assert_fails_closed(quality, "quality bits"); + + let mut zero_vectors = manifest.clone(); + zero_vectors.zero_vectors = 1; + assert_fails_closed(zero_vectors, "zero-vector count"); + + let (alternate, _) = TurboQuantizer::build( + &map, + TurboQuantizationConfig { + seed: 1, + ..TurboQuantizationConfig::default() + }, + BuildParallelism::serial(), + ) + .unwrap(); + let alternate_bytes = Store::get(&store, alternate.manifest_cid().as_bytes()) + .unwrap() + .unwrap(); + let mut code_root = manifest; + code_root.code_root = Manifest::decode(&alternate_bytes).unwrap().code_root; + assert_fails_closed(code_root, "code root"); + + let mut fingerprint = manifest_bytes; + *fingerprint.last_mut().unwrap() ^= 1; + let fingerprint_cid = Cid::from_bytes(&fingerprint); + Store::put(&store, fingerprint_cid.as_bytes(), &fingerprint).unwrap(); + assert!(matches!( + TurboQuantizer::load(store, fingerprint_cid), + Err(Error::InvalidProximityObject { kind: "TurboQuant", reason }) + if reason == "TurboQuant configuration fingerprint mismatch" + )); + } + + #[cfg(feature = "async-store")] + #[test] + fn async_load_rejects_a_code_tree_root_count_that_disagrees_with_the_manifest() { + use crate::prolly::proximity::AsyncTurboQuantizer; + use crate::prolly::store::SyncStoreAsAsync; + use std::future::Future; + use std::task::{Context, Poll}; + + fn block_on(future: F) -> F::Output { + let waker = futures_util::task::noop_waker(); + let mut context = Context::from_waker(&waker); + let mut future = Box::pin(future); + loop { + match future.as_mut().poll(&mut context) { + Poll::Ready(value) => return value, + Poll::Pending => std::thread::yield_now(), + } + } + } + + let (store, manifest_cid) = mismatched_root_count_fixture(); + let store = SyncStoreAsAsync::new(store); + let error = match block_on(AsyncTurboQuantizer::load(&store, manifest_cid)) { + Ok(_) => panic!("mismatched async TurboQuant root count loaded"), + Err(error) => error, + }; + assert_root_count_error(error); + } + + #[test] + fn typed_walk_validates_turboquant_leaf_values_in_manifest_context() { + use crate::prolly::content_graph::{ + walk_content_graph, ContentGraphLimits, ContentObjectKind, TypedContentRoot, + }; + use crate::prolly::proximity::{ProximityConfig, ProximityRecord}; + + let store = Arc::new(MemStore::new()); + let map = ProximityMap::build( + store.clone(), + ProximityConfig::new(8), + [ProximityRecord { + key: b"vector".to_vec(), + vector: vec![1.0; 8], + value: b"value".to_vec(), + }], + ) + .unwrap(); + let (index, _) = TurboQuantizer::build( + &map, + TurboQuantizationConfig::default(), + BuildParallelism::serial(), + ) + .unwrap(); + let manifest_bytes = Store::get(&store, index.manifest_cid().as_bytes()) + .unwrap() + .unwrap(); + let mut manifest = Manifest::decode(&manifest_bytes).unwrap(); + let root_bytes = Store::get(&store, manifest.code_root.as_bytes()) + .unwrap() + .unwrap(); + let mut root = decode_code_tree_node(&root_bytes).unwrap(); + assert!(root.leaf); + root.vals[0].pop(); + let corrupt_root_bytes = root.to_bytes(); + manifest.code_root = Cid::from_bytes(&corrupt_root_bytes); + Store::put(&store, manifest.code_root.as_bytes(), &corrupt_root_bytes).unwrap(); + let corrupt_manifest_bytes = manifest.encode().unwrap(); + let corrupt_manifest = Cid::from_bytes(&corrupt_manifest_bytes); + Store::put(&store, corrupt_manifest.as_bytes(), &corrupt_manifest_bytes).unwrap(); + + let error = walk_content_graph( + &store, + &[TypedContentRoot::new( + ContentObjectKind::TurboQuantization, + corrupt_manifest, + )], + &ContentGraphLimits::default(), + ) + .unwrap_err(); + assert!(matches!( + error, + Error::InvalidProximityObject { kind: "TurboQuant", reason } + if reason == "invalid TurboQuant code value length" + )); + } + + #[test] + fn packing_round_trips_every_supported_width_and_tail() { + for bit_width in [2, 3, 4] { + let maximum = 1u8 << bit_width; + for len in 1..65 { + let codes: Vec<_> = (0..len).map(|index| index as u8 % maximum).collect(); + let packed = pack_codes(&codes, bit_width).unwrap(); + assert_eq!(packed.len(), (len * bit_width as usize).div_ceil(8)); + for (index, expected) in codes.iter().enumerate() { + assert_eq!(unpack_code(&packed, index, bit_width), *expected); + } + } + } + } + + #[test] + fn grouped_centroid_decode_matches_the_canonical_bit_decoder() { + for dimensions in [8usize, 24, 128, 200, 768] { + for bit_width in [2, 3, 4] { + let maximum = 1u8 << bit_width; + let codes: Vec<_> = (0..dimensions) + .map(|index| ((index * 11 + 5) as u8) % maximum) + .collect(); + let packed = pack_codes(&codes, bit_width).unwrap(); + let codebook = codebook(bit_width); + for start in (0..dimensions).step_by(64) { + let end = start.saturating_add(64).min(dimensions); + let mut decoded = vec![0.0; end - start]; + fill_centroids(&packed, start, bit_width, codebook, &mut decoded); + for (offset, centroid) in decoded.into_iter().enumerate() { + assert_eq!( + centroid.to_bits(), + codebook + .centroid(unpack_code(&packed, start + offset, bit_width)) + .to_bits(), + "dimensions={dimensions}, bits={bit_width}, index={}", + start + offset, + ); + } + } + } + } + } + + #[test] + fn codebook_centroids_are_bit_exact_sign_mirrors() { + for bit_width in [2, 3, 4] { + let codebook = codebook(bit_width); + let count = 1usize << bit_width; + for code in 0..count / 2 { + assert_eq!( + codebook.centroid(code as u8).to_bits() ^ (1u64 << 63), + codebook.centroid((count - 1 - code) as u8).to_bits(), + "bits={bit_width}, code={code}", + ); + } + } + } + + #[test] + fn symmetric_product_table_is_bit_exact_for_every_code_and_sign() { + let weights = [ + 0.0, + -0.0, + 1.0, + -1.0, + f64::from_bits(1), + -f64::from_bits(1), + std::f64::consts::PI, + -std::f64::consts::PI, + 1.0e100, + -1.0e100, + ]; + for bit_width in [2, 3, 4] { + let codebook = codebook(bit_width); + let count = 1usize << bit_width; + for weight in weights { + let stored = (0..count / 2) + .map(|code| weight * codebook.centroid(code as u8)) + .collect::>(); + for code in 0..count { + let actual = match bit_width { + 2 => symmetric_row_product_2( + stored.as_slice().try_into().unwrap(), + code as u8, + ), + 3 => symmetric_row_product_4( + stored.as_slice().try_into().unwrap(), + code as u8, + ), + 4 => symmetric_row_product_8( + stored.as_slice().try_into().unwrap(), + code as u8, + ), + _ => unreachable!(), + }; + let expected = weight * codebook.centroid(code as u8); + assert_eq!( + actual.to_bits(), + expected.to_bits(), + "bits={bit_width}, weight={weight:?}, code={code}", + ); + } + } + } + } + + #[test] + fn thresholds_choose_the_lower_code() { + for bit_width in [2, 3, 4] { + let codebook = codebook(bit_width); + for (index, threshold) in codebook.thresholds.iter().enumerate() { + assert_eq!(codebook.quantize(f64::from_bits(*threshold)), index as u8); + } + } + } + + #[test] + fn structured_rotation_is_deterministic_and_nearly_norm_preserving() { + for dimensions in [8, 24, 128, 200, 768, 1536, 3072] { + let plan = StructuredRotation::derive(dimensions, 0x5eed).unwrap(); + let input: Vec<_> = (0..dimensions) + .map(|index| (index as f64 * 0.03125).sin()) + .collect(); + let left = plan.apply(&input); + let right = plan.apply(&input); + assert_eq!( + left.iter().map(|value| value.to_bits()).collect::>(), + right + .iter() + .map(|value| value.to_bits()) + .collect::>() + ); + let before = input.iter().fold(0.0, |sum, value| sum + value * value); + let after = left.iter().fold(0.0, |sum, value| sum + value * value); + assert!((before - after).abs() <= before.max(1.0) * 1e-12); + for round in &plan.rounds { + let mut permutation = round.permutation.clone(); + permutation.sort_unstable(); + assert_eq!(permutation, (0..dimensions).collect::>()); + assert!(round.signs.iter().all(|sign| matches!(sign, -1 | 1))); + } + } + let left = StructuredRotation::derive(128, 0x5eed).unwrap(); + let right = StructuredRotation::derive(128, 0x5eee).unwrap(); + assert_ne!(left.rounds[0].permutation, right.rounds[0].permutation); + assert_ne!(left.rounds[0].signs, right.rounds[0].signs); + } + + #[test] + fn padding_and_zero_norm_are_canonical() { + let mut value = vec![0u8; 8 + packed_len(9, 3).unwrap()]; + assert_eq!(validate_code_value(&value, 9, 3).unwrap(), 0.0); + value[8] = 1; + assert!(validate_code_value(&value, 9, 3).is_err()); + value.fill(0); + *value.last_mut().unwrap() = 0x80; + assert!(validate_code_value(&value, 9, 3).is_err()); + } + + #[test] + fn scalar_and_simd_approximate_scores_are_bit_identical() { + for dimensions in [8usize, 24, 128, 200, 768] { + for bit_width in [2, 3, 4] { + let weighted = (0..dimensions) + .map(|index| ((index as f64 + 0.25) * 0.03125).sin()) + .collect::>(); + let scalar_prepared = TurboQuantPreparedQuery::new( + weighted.clone(), + 17.25, + bit_width, + QueryKernel::ScalarDeterministic, + ); + let simd_prepared = TurboQuantPreparedQuery::new( + weighted.clone(), + 17.25, + bit_width, + QueryKernel::SimdDeterministic, + ); + let automatic_prepared = TurboQuantPreparedQuery::new( + weighted, + 17.25, + bit_width, + QueryKernel::AutoDeterministic, + ); + assert_eq!( + scalar_prepared.product_table.product_count(), + dimensions * (1usize << (bit_width - 1)) + ); + assert_eq!(simd_prepared.product_table.product_count(), 0); + assert_eq!( + automatic_prepared.product_table.product_count(), + dimensions * (1usize << (bit_width - 1)) + ); + let maximum = 1u8 << bit_width; + let codes: Vec<_> = (0..dimensions) + .map(|index| ((index * 7 + 3) as u8) % maximum) + .collect(); + let mut encoded = 1.25f64.to_le_bytes().to_vec(); + encoded.extend_from_slice(&pack_codes(&codes, bit_width).unwrap()); + for metric in [ + DistanceMetric::L2Squared, + DistanceMetric::Cosine, + DistanceMetric::InnerProduct, + ] { + let scalar = score_code_value( + &encoded, + &scalar_prepared, + metric, + dimensions, + bit_width, + QueryKernel::ScalarDeterministic, + ) + .unwrap(); + let simd = score_code_value( + &encoded, + &simd_prepared, + metric, + dimensions, + bit_width, + QueryKernel::SimdDeterministic, + ) + .unwrap(); + let automatic = score_code_value( + &encoded, + &automatic_prepared, + metric, + dimensions, + bit_width, + QueryKernel::AutoDeterministic, + ) + .unwrap(); + assert_eq!( + scalar.to_bits(), + simd.to_bits(), + "dimension={dimensions}, bits={bit_width}, metric={metric:?}", + ); + assert_eq!( + scalar.to_bits(), + automatic.to_bits(), + "automatic dimension={dimensions}, bits={bit_width}, metric={metric:?}", + ); + } + } + } + } + + #[test] + fn l2_approximate_score_clamps_negative_estimates_to_positive_zero() { + let prepared = TurboQuantPreparedQuery::new( + vec![1_000.0; 8], + 1.0, + 2, + QueryKernel::ScalarDeterministic, + ); + let codes = vec![3; 8]; + let mut encoded = 1.0f64.to_le_bytes().to_vec(); + encoded.extend_from_slice(&pack_codes(&codes, 2).unwrap()); + let score = score_code_value( + &encoded, + &prepared, + DistanceMetric::L2Squared, + 8, + 2, + QueryKernel::ScalarDeterministic, + ) + .unwrap(); + assert_eq!(score.to_bits(), 0.0f64.to_bits()); + } + + #[test] + fn l2_approximate_score_uses_the_quantized_reconstruction_norm() { + let dimensions = 8; + let bit_width = 4; + let norm = 2.0f64; + let prepared = TurboQuantPreparedQuery::new( + vec![0.0; dimensions], + 0.0, + bit_width, + QueryKernel::ScalarDeterministic, + ); + let codes = vec![15; dimensions]; + let packed = pack_codes(&codes, bit_width).unwrap(); + let mut encoded = norm.to_le_bytes().to_vec(); + encoded.extend_from_slice(&packed); + + let score = score_code_value( + &encoded, + &prepared, + DistanceMetric::L2Squared, + dimensions, + bit_width, + QueryKernel::ScalarDeterministic, + ) + .unwrap(); + let inverse_sqrt_dimensions = 1.0 / sqrt_down(dimensions as f64); + let reconstructed = codebook(bit_width).centroid(15) * inverse_sqrt_dimensions; + let mut reconstructed_norm_squared = 0.0; + for _ in 0..dimensions { + reconstructed_norm_squared += reconstructed * reconstructed; + } + let expected = norm * norm * reconstructed_norm_squared; + assert_eq!(score.to_bits(), expected.to_bits()); + assert_ne!(score.to_bits(), (norm * norm).to_bits()); + } + + #[test] + fn fused_l2_score_matches_the_ordered_two_pass_reference() { + for dimensions in [8usize, 24, 128, 200, 768] { + for bit_width in [2, 3, 4] { + let weighted = (0..dimensions) + .map(|index| ((index as f64 + 0.75) * 0.015625).cos()) + .collect::>(); + let query_norm_squared = 23.5; + let prepared = TurboQuantPreparedQuery::new( + weighted.clone(), + query_norm_squared, + bit_width, + QueryKernel::ScalarDeterministic, + ); + let maximum = 1u8 << bit_width; + let codes = (0..dimensions) + .map(|index| ((index * 11 + 5) as u8) % maximum) + .collect::>(); + let packed = pack_codes(&codes, bit_width).unwrap(); + let norm = 3.25f64; + let mut encoded = norm.to_le_bytes().to_vec(); + encoded.extend_from_slice(&packed); + + let actual = score_code_value( + &encoded, + &prepared, + DistanceMetric::L2Squared, + dimensions, + bit_width, + QueryKernel::ScalarDeterministic, + ) + .unwrap(); + + let codebook = codebook(bit_width); + let inverse_sqrt_dimensions = 1.0 / sqrt_down(dimensions as f64); + let mut dot = 0.0; + for (weight, code) in weighted.iter().zip(&codes) { + dot += weight * codebook.centroid(*code); + } + let mut reconstructed_norm_squared = 0.0; + for code in &codes { + let reconstructed = codebook.centroid(*code) * inverse_sqrt_dimensions; + reconstructed_norm_squared += reconstructed * reconstructed; + } + let expected = (query_norm_squared + norm * norm * reconstructed_norm_squared + - 2.0 * norm * dot) + .max(0.0); + let expected = if expected == 0.0 { 0.0 } else { expected }; + + assert_eq!( + actual.to_bits(), + expected.to_bits(), + "dimension={dimensions}, bits={bit_width}", + ); + } + } + } + + #[test] + fn cosine_approximate_score_is_source_scale_invariant() { + let dimensions = 8; + let bit_width = 4; + let prepared = TurboQuantPreparedQuery::new( + vec![0.001; dimensions], + 1.0, + bit_width, + QueryKernel::ScalarDeterministic, + ); + let packed = pack_codes(&vec![8; dimensions], bit_width).unwrap(); + let encoded = |norm: f64| { + let mut bytes = norm.to_le_bytes().to_vec(); + bytes.extend_from_slice(&packed); + bytes + }; + let small = encoded(2.0); + let large = encoded(200.0); + let cosine_small = score_code_value( + &small, + &prepared, + DistanceMetric::Cosine, + dimensions, + bit_width, + QueryKernel::ScalarDeterministic, + ) + .unwrap(); + let cosine_large = score_code_value( + &large, + &prepared, + DistanceMetric::Cosine, + dimensions, + bit_width, + QueryKernel::ScalarDeterministic, + ) + .unwrap(); + assert_eq!(cosine_small.to_bits(), cosine_large.to_bits()); + + let inner_small = score_code_value( + &small, + &prepared, + DistanceMetric::InnerProduct, + dimensions, + bit_width, + QueryKernel::ScalarDeterministic, + ) + .unwrap(); + let inner_large = score_code_value( + &large, + &prepared, + DistanceMetric::InnerProduct, + dimensions, + bit_width, + QueryKernel::ScalarDeterministic, + ) + .unwrap(); + assert_ne!(inner_small.to_bits(), inner_large.to_bits()); + } + + #[test] + fn cosine_approximate_score_normalizes_the_quantized_reconstruction() { + let dimensions = 8; + let bit_width = 4; + let mut weighted = vec![0.0; dimensions]; + weighted[0] = 0.125; + let prepared = TurboQuantPreparedQuery::new( + weighted.clone(), + 1.0, + bit_width, + QueryKernel::ScalarDeterministic, + ); + let codes = vec![15; dimensions]; + let packed = pack_codes(&codes, bit_width).unwrap(); + let mut encoded = 2.0f64.to_le_bytes().to_vec(); + encoded.extend_from_slice(&packed); + + let score = score_code_value( + &encoded, + &prepared, + DistanceMetric::Cosine, + dimensions, + bit_width, + QueryKernel::ScalarDeterministic, + ) + .unwrap(); + + let centroid = codebook(bit_width).centroid(15); + let mut dot = 0.0; + let mut reconstructed_norm_squared = 0.0; + let inverse_sqrt_dimensions = 1.0 / sqrt_down(dimensions as f64); + for weight in weighted { + dot += weight * centroid; + let reconstructed = centroid * inverse_sqrt_dimensions; + reconstructed_norm_squared += reconstructed * reconstructed; + } + let expected = 1.0 - (dot / sqrt_down(reconstructed_norm_squared)).clamp(-1.0, 1.0); + assert_eq!(score.to_bits(), expected.to_bits()); + assert_ne!(score.to_bits(), (1.0 - dot.clamp(-1.0, 1.0)).to_bits()); + } + + #[test] + fn inner_product_approximate_score_normalizes_the_quantized_direction() { + let dimensions = 8; + let bit_width = 4; + let mut weighted = vec![0.0; dimensions]; + weighted[0] = 0.125; + let prepared = TurboQuantPreparedQuery::new( + weighted.clone(), + 1.0, + bit_width, + QueryKernel::ScalarDeterministic, + ); + let codes = vec![15; dimensions]; + let packed = pack_codes(&codes, bit_width).unwrap(); + let norm = 2.0f64; + let mut encoded = norm.to_le_bytes().to_vec(); + encoded.extend_from_slice(&packed); + + let score = score_code_value( + &encoded, + &prepared, + DistanceMetric::InnerProduct, + dimensions, + bit_width, + QueryKernel::ScalarDeterministic, + ) + .unwrap(); + + let centroid = codebook(bit_width).centroid(15); + let mut dot = 0.0; + let mut reconstructed_norm_squared = 0.0; + let inverse_sqrt_dimensions = 1.0 / sqrt_down(dimensions as f64); + for weight in weighted { + dot += weight * centroid; + let reconstructed = centroid * inverse_sqrt_dimensions; + reconstructed_norm_squared += reconstructed * reconstructed; + } + let expected = -norm * dot / sqrt_down(reconstructed_norm_squared); + assert_eq!(score.to_bits(), expected.to_bits()); + assert_ne!(score.to_bits(), (-norm * dot).to_bits()); + } + + #[test] + fn turboquant_codec_transform_and_scorer_fuzz_smoke_is_bounded() { + let mut state = 0x4d59_5df4_d0f3_3173u64; + let mut next = || { + state ^= state << 13; + state ^= state >> 7; + state ^= state << 17; + state + }; + for case in 0..10_000 { + let length = next() as usize % 1025; + let bytes = (0..length).map(|_| next() as u8).collect::>(); + let _ = Manifest::decode(&bytes); + for bit_width in [2, 3, 4] { + let _ = validate_code_value(&bytes, 8 + (next() as usize % 257), bit_width); + } + + if case < 512 { + let dimensions = 8 * (1 + next() as usize % 32); + let plan = StructuredRotation::derive(dimensions, next()).unwrap(); + let input = (0..dimensions) + .map(|_| (next() as i16 as f64) / 4096.0) + .collect::>(); + let transformed = plan.apply(&input); + assert_eq!(transformed.len(), dimensions); + assert!(transformed.iter().all(|value| value.is_finite())); + let norm_squared = input.iter().fold(0.0, |sum, value| sum + value * value); + + for bit_width in [2, 3, 4] { + let mut encoded = ((next() % 2_048 + 1) as f64 / 17.0).to_le_bytes().to_vec(); + encoded.extend( + (0..packed_len(dimensions, bit_width).unwrap()).map(|_| next() as u8), + ); + assert!(validate_code_value(&encoded, dimensions, bit_width).is_ok()); + for index in 0..dimensions { + assert!(unpack_code(&encoded[8..], index, bit_width) < 1 << bit_width); + } + + let prepared = TurboQuantPreparedQuery::new( + transformed.clone(), + norm_squared, + bit_width, + QueryKernel::ScalarDeterministic, + ); + for metric in [ + DistanceMetric::L2Squared, + DistanceMetric::Cosine, + DistanceMetric::InnerProduct, + ] { + let score = score_code_value( + &encoded, + &prepared, + metric, + dimensions, + bit_width, + QueryKernel::ScalarDeterministic, + ) + .unwrap(); + assert!(score.is_finite()); + } + } + } + } + let maximum_plan = StructuredRotation::derive(MAX_DIMENSIONS as usize, u64::MAX).unwrap(); + assert_eq!(maximum_plan.dimensions(), MAX_DIMENSIONS as usize); + assert!(maximum_plan.operations_per_vector() > 0); + assert!(maximum_plan.owned_bytes() > 0); + assert_eq!(packed_len(MAX_DIMENSIONS as usize, 4).unwrap(), 8192); + assert!(packed_len(usize::MAX, 4).is_err()); + assert!(packed_len(usize::MAX / 2 + 1, 3).is_err()); + } + + #[test] + #[ignore = "qualification-scale deterministic cosine fixture"] + fn qualification_cosine_fixture_exposes_default_shortlist_code_ties() { + const RECORDS: usize = 10_000; + const DIMENSIONS: usize = 768; + const PERIOD: u64 = 2_000_003; + let vector = |index: usize| { + let index = u64::try_from(index).unwrap(); + (0..DIMENSIONS) + .map(|component| { + let component = u64::try_from(component).unwrap(); + let mixed = index + .wrapping_mul(1_000_003) + .wrapping_add(component.wrapping_mul(97_409)); + ((mixed % PERIOD) as f64 - 1_000_001.0) as f32 / 100_000.0 + }) + .collect::>() + }; + let query = prepare_vector( + DistanceMetric::Cosine, + &vector(RECORDS / 3), + DIMENSIONS as u32, + ) + .unwrap(); + let mut exact = Vec::with_capacity(RECORDS); + for index in 0..RECORDS { + let prepared = + prepare_vector(DistanceMetric::Cosine, &vector(index), DIMENSIONS as u32).unwrap(); + exact.push(( + crate::prolly::proximity::distance::score( + DistanceMetric::Cosine, + &query, + &prepared, + ), + index, + )); + } + exact.sort_by(|left, right| left.0.total_cmp(&right.0).then(left.1.cmp(&right.1))); + let exact_top: Vec<_> = exact.iter().take(10).map(|(_, index)| *index).collect(); + assert_eq!( + exact_top, + [3313, 3315, 3317, 3319, 3321, 3323, 3325, 3327, 3329, 3331] + ); + + let plan = StructuredRotation::derive(DIMENSIONS, 0).unwrap(); + let codebook = codebook(4); + let sqrt_dimensions = sqrt_down(DIMENSIONS as f64); + let packed_len = packed_len(DIMENSIONS, 4).unwrap(); + let mut scratch = EncodingScratch::new(DIMENSIONS, packed_len); + let query_code = + encode_vector_reusing(&query, &plan, codebook, 4, sqrt_dimensions, &mut scratch) + .unwrap(); + let mut lower_key_equal_codes = 0usize; + for index in 0..exact_top[0] { + let prepared = + prepare_vector(DistanceMetric::Cosine, &vector(index), DIMENSIONS as u32).unwrap(); + let encoded = + encode_vector_reusing(&prepared, &plan, codebook, 4, sqrt_dimensions, &mut scratch) + .unwrap(); + if encoded.bytes[8..] == query_code.bytes[8..] { + lower_key_equal_codes += 1; + } + } + assert_eq!(lower_key_equal_codes, 222); + assert!(lower_key_equal_codes >= 10 * 8); + for index in exact_top { + let prepared = + prepare_vector(DistanceMetric::Cosine, &vector(index), DIMENSIONS as u32).unwrap(); + let encoded = + encode_vector_reusing(&prepared, &plan, codebook, 4, sqrt_dimensions, &mut scratch) + .unwrap(); + assert_eq!(encoded.bytes[8..], query_code.bytes[8..]); + } + } + + #[test] + fn checked_in_turboquant_conformance_values_are_frozen() { + let hex = |cid: Cid| { + cid.as_bytes() + .iter() + .map(|byte| format!("{byte:02x}")) + .collect::() + }; + let bytes_hex = |bytes: &[u8]| { + bytes + .iter() + .map(|byte| format!("{byte:02x}")) + .collect::() + }; + let fixture: serde_json::Value = serde_json::from_str(include_str!( + "../../../../conformance/proximity-fixtures.json" + )) + .unwrap(); + let fixture = &fixture["turboquant"]; + + let mut splitmix = SplitMix64::new(0); + for expected in fixture["splitmix64_seed_zero"].as_array().unwrap() { + assert_eq!( + format!("{:016x}", splitmix.next()), + expected.as_str().unwrap() + ); + } + for dimensions in [8usize, 24, 128, 200, 768, 1536, 3072] { + let plan = StructuredRotation::derive(dimensions, 0x5eed).unwrap(); + let mut plan_bytes = Vec::new(); + for round in &plan.rounds { + for &index in &round.permutation { + plan_bytes.extend_from_slice(&(index as u64).to_le_bytes()); + } + plan_bytes.extend(round.signs.iter().map(|sign| *sign as u8)); + } + // Construct the input directly from IEEE-754 bits. Calling libm + // here (for example, `sin`) makes the *test input* vary by target + // before the deterministic transform is exercised. + let mut input_stream = SplitMix64::new(0x5451_4649_5854_0001); + let input: Vec<_> = (0..dimensions) + .map(|_| { + let draw = input_stream.next(); + let sign = draw & (1u64 << 63); + let fraction = draw & ((1u64 << 52) - 1); + f64::from_bits(sign | 0x3fe0_0000_0000_0000 | fraction) + }) + .collect(); + let output = plan.apply(&input); + let input_bytes: Vec<_> = input + .iter() + .flat_map(|value| value.to_bits().to_le_bytes()) + .collect(); + let output_bytes: Vec<_> = output + .iter() + .flat_map(|value| value.to_bits().to_le_bytes()) + .collect(); + let expected = &fixture["rotation"][dimensions.to_string()]; + assert_eq!( + hex(Cid::from_bytes(&plan_bytes)), + expected["plan_sha256"].as_str().unwrap(), + "plan mismatch at dimension {dimensions}", + ); + assert_eq!( + hex(Cid::from_bytes(&input_bytes)), + expected["input_sha256"].as_str().unwrap(), + "input mismatch at dimension {dimensions}", + ); + assert_eq!( + hex(Cid::from_bytes(&output_bytes)), + expected["output_sha256"].as_str().unwrap(), + "output mismatch at dimension {dimensions}", + ); + } + for bit_width in [2, 3, 4] { + let maximum = 1u8 << bit_width; + let codes: Vec<_> = (0..19).map(|index| index as u8 % maximum).collect(); + assert_eq!( + bytes_hex(&pack_codes(&codes, bit_width).unwrap()), + fixture["packing_19_codes"][bit_width.to_string()] + .as_str() + .unwrap(), + ); + let codebook = codebook(bit_width); + let expected = &fixture["codebooks"][bit_width.to_string()]; + assert_eq!( + codebook + .thresholds + .iter() + .map(|bits| format!("{bits:016x}")) + .collect::>(), + expected["threshold_bits"] + .as_array() + .unwrap() + .iter() + .map(|value| value.as_str().unwrap()) + .collect::>(), + ); + assert_eq!( + codebook + .centroids + .iter() + .map(|bits| format!("{bits:016x}")) + .collect::>(), + expected["centroid_bits"] + .as_array() + .unwrap() + .iter() + .map(|value| value.as_str().unwrap()) + .collect::>(), + ); + } + } +} diff --git a/src/prolly/proximity/async_map.rs b/src/prolly/proximity/async_map.rs index 93854161..2ae946ef 100644 --- a/src/prolly/proximity/async_map.rs +++ b/src/prolly/proximity/async_map.rs @@ -552,7 +552,10 @@ where ) -> Result { if matches!( request.options.backend, - SearchBackend::ProductQuantized | SearchBackend::Hnsw | SearchBackend::Composite + SearchBackend::ProductQuantized + | SearchBackend::TurboQuantized + | SearchBackend::Hnsw + | SearchBackend::Composite ) { return Err(Error::InvalidProximityObject { kind: "proximity proof", diff --git a/src/prolly/proximity/distance/canonical.rs b/src/prolly/proximity/distance/canonical.rs index 5d66ea0a..bf9df88a 100644 --- a/src/prolly/proximity/distance/canonical.rs +++ b/src/prolly/proximity/distance/canonical.rs @@ -37,7 +37,7 @@ pub(super) fn next_up(value: f64) -> f64 { /// Newton iteration supplies a nearby candidate. An exact integer comparison /// of IEEE significands then selects the greatest representable value whose /// square does not exceed the input. No target `sqrt` instruction is used. -pub(super) fn sqrt_down(value: f64) -> f64 { +pub(crate) fn sqrt_down(value: f64) -> f64 { debug_assert!(value.is_finite() && value >= 0.0); if value == 0.0 { return 0.0; diff --git a/src/prolly/proximity/distance/mod.rs b/src/prolly/proximity/distance/mod.rs index bca2790d..6255ff34 100644 --- a/src/prolly/proximity/distance/mod.rs +++ b/src/prolly/proximity/distance/mod.rs @@ -6,6 +6,7 @@ mod simd; pub(crate) use canonical::euclidean_radius_up; pub(crate) use quantized::score as score_quantized; pub(crate) use scalar::{prepare_vector, score}; +pub(crate) use simd::fill_query_products_f64; #[cfg(test)] pub(crate) use simd::{query_kernel_calls, reset_query_kernel_calls}; pub(crate) use simd::{query_score, query_score_encoded}; diff --git a/src/prolly/proximity/distance/simd.rs b/src/prolly/proximity/distance/simd.rs index 4cc7c11c..265bd453 100644 --- a/src/prolly/proximity/distance/simd.rs +++ b/src/prolly/proximity/distance/simd.rs @@ -5,9 +5,11 @@ use std::sync::OnceLock; const PRODUCT_SLOTS: usize = 64; type FillProducts = unsafe fn(&[f32], &[f32], &mut [f64]); +type FillProductsF64 = unsafe fn(&[f64], &[f64], &mut [f64]); static FILL_L2: OnceLock> = OnceLock::new(); static FILL_DOT: OnceLock> = OnceLock::new(); +static FILL_DOT_F64: OnceLock> = OnceLock::new(); #[cfg(test)] thread_local! { @@ -46,6 +48,45 @@ pub(crate) fn query_score_encoded( } } +/// Fill independent `f64` products for a deterministic scalar-ordered +/// reduction. TurboQuant uses this after unpacking one bounded code chunk. +pub(crate) fn fill_query_products_f64( + kernel: QueryKernel, + left: &[f64], + right: &[f64], + output: &mut [f64], +) { + debug_assert_eq!(left.len(), right.len()); + debug_assert_eq!(left.len(), output.len()); + let fill = match kernel { + QueryKernel::ScalarDeterministic => None, + QueryKernel::SimdDeterministic => *FILL_DOT_F64.get_or_init(detect_fill_f64), + // Two-lane f64 SIMD does not repay dispatch and load/store overhead in + // TurboQuant's 64-coordinate chunks on NEON or wasm32. Keep the + // explicit SIMD kernel available for conformance and callers, while + // selecting the measured scalar fill for the automatic kernel there. + QueryKernel::AutoDeterministic => auto_fill_f64(), + }; + if let Some(fill) = fill { + // SAFETY: feature detection selects only a compatible target-specific + // function, and every implementation is bounded by the equal slices. + unsafe { fill(left, right, output) }; + } else { + fill_tail_f64(left, right, output, 0); + } +} + +fn auto_fill_f64() -> Option { + #[cfg(any(target_arch = "aarch64", target_arch = "wasm32"))] + { + None + } + #[cfg(not(any(target_arch = "aarch64", target_arch = "wasm32")))] + { + *FILL_DOT_F64.get_or_init(detect_fill_f64) + } +} + fn simd_score(metric: DistanceMetric, left: &[f32], right: &[f32]) -> Option { debug_assert_eq!(left.len(), right.len()); let fill = match metric { @@ -173,6 +214,110 @@ fn detect_encoded_fill() -> Option { None } +fn detect_fill_f64() -> Option { + #[cfg(any(target_arch = "x86", target_arch = "x86_64"))] + { + if std::arch::is_x86_feature_detected!("avx512f") + && std::arch::is_x86_feature_detected!("avx2") + { + return Some(fill_f64_x86_avx512); + } + if std::arch::is_x86_feature_detected!("avx2") { + return Some(fill_f64_x86_avx2); + } + } + #[cfg(target_arch = "aarch64")] + { + return Some(fill_f64_aarch64_neon); + } + #[cfg(all(target_arch = "wasm32", target_feature = "simd128"))] + { + return Some(fill_f64_wasm_simd128); + } + #[allow(unreachable_code)] + None +} + +#[cfg(any(target_arch = "x86", target_arch = "x86_64"))] +#[target_feature(enable = "avx2")] +unsafe fn fill_f64_x86_avx2(left: &[f64], right: &[f64], output: &mut [f64]) { + #[cfg(target_arch = "x86")] + use std::arch::x86::*; + #[cfg(target_arch = "x86_64")] + use std::arch::x86_64::*; + + let mut index = 0usize; + while index + 4 <= left.len() { + let product = _mm256_mul_pd( + _mm256_loadu_pd(left.as_ptr().add(index)), + _mm256_loadu_pd(right.as_ptr().add(index)), + ); + _mm256_storeu_pd(output.as_mut_ptr().add(index), product); + index += 4; + } + fill_tail_f64(left, right, output, index); +} + +#[cfg(any(target_arch = "x86", target_arch = "x86_64"))] +#[target_feature(enable = "avx2,avx512f")] +unsafe fn fill_f64_x86_avx512(left: &[f64], right: &[f64], output: &mut [f64]) { + #[cfg(target_arch = "x86")] + use std::arch::x86::*; + #[cfg(target_arch = "x86_64")] + use std::arch::x86_64::*; + + let mut index = 0usize; + while index + 8 <= left.len() { + let product = _mm512_mul_pd( + _mm512_loadu_pd(left.as_ptr().add(index)), + _mm512_loadu_pd(right.as_ptr().add(index)), + ); + _mm512_storeu_pd(output.as_mut_ptr().add(index), product); + index += 8; + } + fill_tail_f64(left, right, output, index); +} + +#[cfg(target_arch = "aarch64")] +#[target_feature(enable = "neon")] +unsafe fn fill_f64_aarch64_neon(left: &[f64], right: &[f64], output: &mut [f64]) { + use std::arch::aarch64::*; + + let mut index = 0usize; + while index + 2 <= left.len() { + let product = vmulq_f64( + vld1q_f64(left.as_ptr().add(index)), + vld1q_f64(right.as_ptr().add(index)), + ); + vst1q_f64(output.as_mut_ptr().add(index), product); + index += 2; + } + fill_tail_f64(left, right, output, index); +} + +#[cfg(all(target_arch = "wasm32", target_feature = "simd128"))] +#[target_feature(enable = "simd128")] +unsafe fn fill_f64_wasm_simd128(left: &[f64], right: &[f64], output: &mut [f64]) { + use std::arch::wasm32::*; + + let mut index = 0usize; + while index + 2 <= left.len() { + let product = f64x2_mul( + v128_load(left.as_ptr().add(index).cast()), + v128_load(right.as_ptr().add(index).cast()), + ); + v128_store(output.as_mut_ptr().add(index).cast(), product); + index += 2; + } + fill_tail_f64(left, right, output, index); +} + +fn fill_tail_f64(left: &[f64], right: &[f64], output: &mut [f64], start: usize) { + for index in start..left.len() { + output[index] = left[index] * right[index]; + } +} + #[cfg(any(target_arch = "x86", target_arch = "x86_64"))] #[target_feature(enable = "sse2")] unsafe fn fill_x86_sse2(left: &[f32], right: &[f32], output: &mut [f64]) { diff --git a/src/prolly/proximity/map.rs b/src/prolly/proximity/map.rs index b886e0b5..adf6b30e 100644 --- a/src/prolly/proximity/map.rs +++ b/src/prolly/proximity/map.rs @@ -566,6 +566,18 @@ where |bytes| super::accelerator::pq::Manifest::decode(bytes).map(|_| ()), )?; } + SearchPlan::TurboQuantized { .. } => { + let index = accelerators + .turboquant() + .expect("planner validated TurboQuant"); + search_io.runtime().load( + search_io, + super::super::content_graph::ContentObjectKind::TurboQuantization, + index.manifest_cid(), + 2, + |bytes| super::accelerator::turboquant::Manifest::decode(bytes).map(|_| ()), + )?; + } SearchPlan::Composite { .. } => { let accelerator = accelerators .composite() @@ -626,6 +638,19 @@ where )); index.search_planned(&bound_map, request, &plan) } + SearchPlan::TurboQuantized { .. } => { + let index = + accelerators + .turboquant() + .ok_or_else(|| Error::InvalidProximitySearch { + reason: "planned TurboQuant accelerator is unavailable".to_owned(), + })?; + let index = + index.rebind(search_io.for_kind( + super::super::content_graph::ContentObjectKind::TurboQuantization, + )); + index.search_planned(&bound_map, request, &plan) + } SearchPlan::Composite { .. } => self.search_composite( accelerators .composite() @@ -752,6 +777,19 @@ where |key| Ok(shadow.contains(key)), ) } + super::accelerator::composite::CompositeBase::TurboQuantized(index) => { + let index = + index.rebind(search_io.for_kind( + super::super::content_graph::ContentObjectKind::TurboQuantization, + )); + index.search_planned_with_exclusion( + current, + &composite.base_source, + base_request, + base, + |key| Ok(shadow.contains(key)), + ) + } }?; add_search_stats(&mut stats, &base_result.stats); let mut completion = base_result.completion; diff --git a/src/prolly/proximity/mod.rs b/src/prolly/proximity/mod.rs index 886d739f..d5bedf86 100644 --- a/src/prolly/proximity/mod.rs +++ b/src/prolly/proximity/mod.rs @@ -33,12 +33,16 @@ pub use accelerator::pq::{ ProductQuantizationBuildLimits, ProductQuantizationBuildStats, ProductQuantizationConfig, ProductQuantizationQuality, ProductQuantizer, }; +pub use accelerator::turboquant::{ + TurboQuantizationBuildLimits, TurboQuantizationBuildStats, TurboQuantizationConfig, + TurboQuantizationQuality, TurboQuantizationVerification, TurboQuantizer, +}; pub use accelerator::AcceleratorSet; pub use accelerator::{ AsyncAcceleratorBuildOptions, AsyncAcceleratorBuildStats, AsyncAcceleratorCatalog, AsyncAcceleratorSet, AsyncCompositeAccelerator, AsyncCompositeBuildOptions, AsyncCompositeBuildOutcome, AsyncHnswBuild, AsyncHnswIndex, AsyncProductQuantizer, - AsyncProductQuantizerBuild, + AsyncProductQuantizerBuild, AsyncTurboQuantizer, AsyncTurboQuantizerBuild, }; pub use async_map::{AsyncProximityBuildOptions, AsyncProximityReadSession}; pub use build::{BuildParallelism, ProximityBuildStats}; @@ -52,7 +56,7 @@ pub use proof::{ pub use search::{ ApproximatePreference, HnswSearchOptions, PlannerPolicy, PqSearchOptions, ProximityFilter, SearchIo, SearchOptions, SearchPlan, SearchPlanSummary, SearchRequest, SearchRuntime, - SearchRuntimePolicy, StoreCacheNamespace, SEARCH_PLAN_FORMAT_VERSION, + SearchRuntimePolicy, StoreCacheNamespace, TurboQuantSearchOptions, SEARCH_PLAN_FORMAT_VERSION, }; pub use search::{AsyncIoConfig, AsyncProximityMap, AsyncSearchControl, CancellationToken}; @@ -254,6 +258,7 @@ pub enum SearchBackend { Hnsw, Composite, Auto, + TurboQuantized, } /// Runtime-only deterministic query distance implementation. diff --git a/src/prolly/proximity/proof/search.rs b/src/prolly/proximity/proof/search.rs index 25d77872..a0e36cd7 100644 --- a/src/prolly/proximity/proof/search.rs +++ b/src/prolly/proximity/proof/search.rs @@ -10,7 +10,7 @@ use crate::prolly::proximity::{ AcceleratorCatalog, AcceleratorSet, CompositeAccelerator, DistanceMetric, HnswIndex, ProductQuantizer, ProximityFilter, ProximityMap, QueryKernel, SearchBackend, SearchBudget, SearchCompletion, SearchIo, SearchOptions, SearchPlan, SearchPlanSummary, SearchPolicy, - SearchRequest, SearchResult, SearchRuntime, SEARCH_PLAN_FORMAT_VERSION, + SearchRequest, SearchResult, SearchRuntime, TurboQuantizer, SEARCH_PLAN_FORMAT_VERSION, }; use crate::prolly::store::{MemStore, Store}; use crate::prolly::tree::Tree; @@ -147,7 +147,7 @@ pub enum ProximitySearchEvent { Completed(SearchCompletion), } -/// Self-contained proof for native, PQ, or HNSW search replay. +/// Self-contained proof for native, PQ, TurboQuant, HNSW, or composite search replay. #[derive(Clone, Debug, PartialEq)] pub struct ProximitySearchProof { pub format_version: u8, @@ -191,6 +191,12 @@ impl ProximitySearchProof { &self, limits: &ContentGraphLimits, ) -> Result { + if self.format_version != SEARCH_PLAN_FORMAT_VERSION { + return Err(Error::UnsupportedProximityVersion { + found: self.format_version, + required: SEARCH_PLAN_FORMAT_VERSION, + }); + } if request_commitment(&self.request, &self.plan) != self.request_commitment { return Err(invalid("search request commitment mismatch")); } @@ -203,12 +209,8 @@ impl ProximitySearchProof { &self.accelerator_objects, limits, )?; - if self.format_version != SEARCH_PLAN_FORMAT_VERSION - || self.plan.summary() != self.result.plan - { - return Err(invalid( - "unsupported proof version or search plan summary mismatch", - )); + if self.plan.summary() != self.result.plan { + return Err(invalid("search plan summary mismatch")); } let mut request = self.request.borrowed(); let mut native_trace = Vec::new(); @@ -223,6 +225,12 @@ impl ProximitySearchProof { ProductQuantizer::load(store.clone(), root.cid.clone())? .search_planned(&map, request, &self.plan)? } + (Some(root), SearchPlan::TurboQuantized { .. }) + if root.kind == ContentObjectKind::TurboQuantization => + { + TurboQuantizer::load(store.clone(), root.cid.clone())? + .search_planned(&map, request, &self.plan)? + } (Some(root), SearchPlan::Hnsw { .. }) if root.kind == ContentObjectKind::HnswManifest => { @@ -308,7 +316,10 @@ where ) -> Result { if matches!( request.options.backend, - SearchBackend::ProductQuantized | SearchBackend::Hnsw | SearchBackend::Composite + SearchBackend::ProductQuantized + | SearchBackend::TurboQuantized + | SearchBackend::Hnsw + | SearchBackend::Composite ) { return Err(invalid( "explicit accelerator search proofs must be produced by that sidecar", @@ -364,6 +375,29 @@ where } } +impl TurboQuantizer +where + S: Store + Clone + Send + Sync, + S::Error: Send + Sync, +{ + /// Prove source-bound TurboQuant execution and authoritative reranking. + pub fn prove_search( + &self, + map: &ProximityMap, + request: SearchRequest<'_>, + limits: &ContentGraphLimits, + ) -> Result { + let result = self.search(map, request.clone())?; + let root = TypedContentRoot::new( + ContentObjectKind::TurboQuantization, + self.manifest_cid().clone(), + ); + let objects = + walk_content_graph(&map.store_clone(), std::slice::from_ref(&root), limits)?.objects; + build_proof(map, request, result, Some(root), objects, None, limits) + } +} + impl CompositeAccelerator where S: Store + Clone + Send + Sync, @@ -409,7 +443,10 @@ where let mut result = map.search_with(self.accelerators(), &search_io, request.clone())?; if !matches!( result.plan.backend, - SearchBackend::Hnsw | SearchBackend::ProductQuantized | SearchBackend::Composite + SearchBackend::Hnsw + | SearchBackend::ProductQuantized + | SearchBackend::TurboQuantized + | SearchBackend::Composite ) { return Err(invalid( "catalog proof requires an accelerator-backed committed plan", @@ -443,6 +480,10 @@ fn replay_catalog_plan( .pq() .ok_or_else(|| invalid("catalog has no committed PQ accelerator"))? .search_planned(map, request, plan), + SearchPlan::TurboQuantized { .. } => accelerators + .turboquant() + .ok_or_else(|| invalid("catalog has no committed TurboQuant accelerator"))? + .search_planned(map, request, plan), SearchPlan::Composite { .. } => { let composite = accelerators .composite() @@ -680,7 +721,7 @@ fn native_events(commitment: &Cid, trace: Vec) -> Vec Cid { - let mut bytes = b"PSRQ\x03".to_vec(); + let mut bytes = b"PSRQ\x04".to_vec(); put_len(request.query.len(), &mut bytes); for component in &request.query { bytes.extend_from_slice(&component.to_bits().to_le_bytes()); @@ -708,6 +749,7 @@ fn request_commitment(request: &ProximitySearchRequest, plan: &SearchPlan) -> Ci SearchBackend::Hnsw => 2, SearchBackend::Auto => 3, SearchBackend::Composite => 4, + SearchBackend::TurboQuantized => 5, }); bytes.push(match request.kernel { QueryKernel::ScalarDeterministic => 0, @@ -731,6 +773,7 @@ fn request_commitment(request: &ProximitySearchRequest, plan: &SearchPlan) -> Ci bytes.push(match request.options.planner.approximate_preference { crate::prolly::proximity::ApproximatePreference::HnswFirst => 0, crate::prolly::proximity::ApproximatePreference::ProductQuantizedFirst => 1, + crate::prolly::proximity::ApproximatePreference::TurboQuantizedFirst => 2, }); put_optional_usize( request.options.hnsw.ef_search.map(|value| value as usize), @@ -740,6 +783,14 @@ fn request_commitment(request: &ProximitySearchRequest, plan: &SearchPlan) -> Ci request.options.pq.rerank_multiplier.map(usize::from), &mut bytes, ); + put_optional_usize( + request + .options + .turboquant + .rerank_multiplier + .map(usize::from), + &mut bytes, + ); encode_plan(plan, &mut bytes); Cid::from_bytes(&bytes) } @@ -785,6 +836,14 @@ fn encode_plan(plan: &SearchPlan, bytes: &mut Vec) { put_usize(*shadow_records, bytes); put_usize(*merge_target, bytes); } + SearchPlan::TurboQuantized { + rerank_target, + direct_lookup, + } => { + bytes.push(5); + put_usize(*rerank_target, bytes); + bytes.push(u8::from(*direct_lookup)); + } } } @@ -820,6 +879,12 @@ fn plan_from_summary( .rerank_target .ok_or_else(|| invalid("HNSW plan summary has no rerank target"))?, }), + SearchBackend::TurboQuantized => Ok(SearchPlan::TurboQuantized { + rerank_target: summary + .rerank_target + .ok_or_else(|| invalid("TurboQuant plan summary has no rerank target"))?, + direct_lookup: summary.direct_lookup, + }), SearchBackend::Composite => Ok(SearchPlan::Composite { base: Box::new(plan_from_summary( summary diff --git a/src/prolly/proximity/search/async.rs b/src/prolly/proximity/search/async.rs index 823dc544..7fe13ee8 100644 --- a/src/prolly/proximity/search/async.rs +++ b/src/prolly/proximity/search/async.rs @@ -7,9 +7,13 @@ use crate::prolly::cid::Cid; use crate::prolly::error::Error; use crate::prolly::proximity::accelerator::hnsw::storage::GraphNode; use crate::prolly::proximity::accelerator::pq::{build_lookup, score_code, validate_code}; +use crate::prolly::proximity::accelerator::quantized::{admit_quantized, QuantizedRanked}; +use crate::prolly::proximity::accelerator::turboquant::{ + prepare_query_with_plan as prepare_turboquant_query, score_code_value as score_turboquant_code, +}; use crate::prolly::proximity::accelerator::{ AsyncAcceleratorSet, AsyncCompositeAccelerator, AsyncCompositeBase, AsyncHnswIndex, - AsyncProductQuantizer, + AsyncProductQuantizer, AsyncTurboQuantizer, }; use crate::prolly::proximity::distance::{prepare_vector, query_score}; use crate::prolly::proximity::storage::quantized::ScalarQuantized; @@ -88,8 +92,9 @@ where Ok(result) } - /// Plan and execute native, eligible-exact, PQ, or HNSW search through an - /// async-only store using the same logical planner as synchronous search. + /// Plan and execute native, eligible-exact, PQ, TurboQuant, HNSW, or + /// composite search through an async-only store using the same logical + /// planner as synchronous search. pub async fn search_with_accelerators( &self, accelerators: &AsyncAcceleratorSet, @@ -104,12 +109,14 @@ where &self.tree, accelerators.hnsw().map(AsyncHnswIndex::config), accelerators.pq().map(AsyncProductQuantizer::config), + accelerators.turboquant().map(AsyncTurboQuantizer::config), accelerators .composite() .map(|composite| super::planner::CompositePlanInput { base_kind: composite.base_kind(), hnsw: composite.hnsw().map(AsyncHnswIndex::config), pq: composite.pq().map(AsyncProductQuantizer::config), + turboquant: composite.turboquant().map(AsyncTurboQuantizer::config), base_count: composite.base_count, delta_count: composite.delta_count, shadow_count: composite.shadow_count, @@ -142,6 +149,22 @@ where ) .await } + super::SearchPlan::TurboQuantized { .. } => { + search_turboquant_async( + &self.store, + &self.directory, + &self.tree, + accelerators + .turboquant() + .expect("planner validated TurboQuant"), + request, + &eligibility, + &plan, + &control, + None, + ) + .await + } super::SearchPlan::Hnsw { .. } => { search_hnsw_async( &self.store, @@ -335,6 +358,20 @@ where S: AsyncStore + Clone, S::Error: Send + Sync, { + pub(crate) fn bind_search_runtime( + &self, + runtime: Arc, + ) -> AsyncProximityMap> { + let store = super::SearchIo::new(self.store.clone(), runtime) + .with_proximity_dimensions(self.tree.config.dimensions); + let directory = AsyncProlly::new(store.clone(), self.tree.directory.config.clone()); + AsyncProximityMap { + store, + directory, + tree: self.tree.clone(), + } + } + pub async fn load(store: S, descriptor_cid: Cid) -> Result { let descriptor_bytes = load_content(&store, &descriptor_cid).await?; let descriptor = Descriptor::decode(&descriptor_bytes)?; @@ -975,6 +1012,216 @@ impl Ord for AsyncRanked { } } +struct AsyncReranked(RerankCandidate); + +impl PartialEq for AsyncReranked { + fn eq(&self, other: &Self) -> bool { + self.0.distance.to_bits() == other.0.distance.to_bits() && self.0.key() == other.0.key() + } +} + +impl Eq for AsyncReranked {} + +impl PartialOrd for AsyncReranked { + fn partial_cmp(&self, other: &Self) -> Option { + Some(self.cmp(other)) + } +} + +impl Ord for AsyncReranked { + fn cmp(&self, other: &Self) -> std::cmp::Ordering { + self.0 + .distance + .total_cmp(&other.0.distance) + .then_with(|| self.0.key().cmp(other.0.key())) + } +} + +#[allow(clippy::too_many_arguments)] +async fn search_turboquant_async( + store: &super::SearchIo, + directory: &AsyncProlly>, + tree: &ProximityTree, + index: &AsyncTurboQuantizer, + request: SearchRequest<'_>, + eligibility: &PreparedFilter<'_>, + plan: &super::SearchPlan, + control: &AsyncSearchControl, + excluded: Option<&BTreeSet>>, +) -> Result +where + S: AsyncStore + Clone, + S::Error: Send + Sync, +{ + let super::SearchPlan::TurboQuantized { + rerank_target, + direct_lookup, + } = plan + else { + return Err(invalid_search( + "TurboQuant executor requires a TurboQuant plan", + )); + }; + if let Some(completion) = stop_reason(control) { + return Ok(SearchResult { + neighbors: Vec::new(), + stats: ProximitySearchStats::default(), + completion, + plan: plan.summary(), + }); + } + let transform_plan = store + .runtime() + .turboquant_transform_plan(index.dimensions, index.config.seed)?; + let (query, prepared) = prepare_turboquant_query( + index.metric, + request.query, + index.dimensions, + &transform_plan, + index.config.bit_width, + request.kernel, + )?; + if let Some(completion) = stop_reason(control) { + return Ok(SearchResult { + neighbors: Vec::new(), + stats: ProximitySearchStats::default(), + completion, + plan: plan.summary(), + }); + } + let code_store = + store.for_kind(crate::prolly::content_graph::ContentObjectKind::TurboQuantization); + let codes = AsyncProlly::new(code_store, index.code_tree.config.clone()); + let mut stats = ProximitySearchStats::default(); + let mut approximate = BinaryHeap::::new(); + let mut completion = SearchCompletion::ApproximatePolicySatisfied; + + if *direct_lookup { + let Some((keys, source_bound)) = eligibility.sorted_keys() else { + return Err(invalid_search( + "TurboQuant direct lookup requires sorted eligible keys", + )); + }; + for key in keys { + if excluded.is_some_and(|excluded| excluded.contains(key)) { + continue; + } + if let Some(stopped) = stop_reason(control) { + completion = stopped; + break; + } + let code = codes.get(&index.code_tree, key).await?; + if let Some(stopped) = stop_reason(control) { + completion = stopped; + break; + } + let Some(code) = code else { + if source_bound { + return Err(Error::InvalidProximityObject { + kind: "TurboQuant", + reason: "source-bound key has no TurboQuant code".to_owned(), + }); + } + continue; + }; + if !admit_quantized( + key.as_slice(), + &code, + *rerank_target, + &request, + &mut stats, + &mut approximate, + |code| { + score_turboquant_code( + code, + &prepared, + index.metric, + index.dimensions as usize, + index.config.bit_width, + request.kernel, + ) + }, + )? { + completion = SearchCompletion::BudgetExhausted; + break; + } + } + } else { + let mut range = codes.range(&index.code_tree, &[], None).await?; + if let Some(stopped) = stop_reason(control) { + completion = stopped; + } + loop { + if matches!( + completion, + SearchCompletion::Cancelled | SearchCompletion::DeadlineExceeded + ) { + break; + } + if let Some(stopped) = stop_reason(control) { + completion = stopped; + break; + } + let entry = range.next().await; + if let Some(stopped) = stop_reason(control) { + completion = stopped; + break; + } + let Some(entry) = entry else { + break; + }; + let (key, code) = entry?; + if excluded.is_some_and(|excluded| excluded.contains(&key)) { + continue; + } + if eligibility.contains(&key) + && !admit_quantized( + key, + &code, + *rerank_target, + &request, + &mut stats, + &mut approximate, + |code| { + score_turboquant_code( + code, + &prepared, + index.metric, + index.dimensions as usize, + index.config.bit_width, + request.kernel, + ) + }, + )? + { + completion = SearchCompletion::BudgetExhausted; + break; + } + } + } + + let neighbors = rerank_quantized_async( + directory, + tree, + index.metric, + &request, + &query, + control, + approximate, + &mut stats, + &mut completion, + "TurboQuant", + "code key is absent from authoritative directory", + ) + .await?; + Ok(SearchResult { + neighbors, + stats, + completion, + plan: plan.summary(), + }) +} + #[allow(clippy::too_many_arguments)] async fn search_pq_async( store: &super::SearchIo, @@ -998,13 +1245,29 @@ where else { return Err(invalid_search("PQ executor requires a PQ plan")); }; + if let Some(completion) = stop_reason(control) { + return Ok(SearchResult { + neighbors: Vec::new(), + stats: ProximitySearchStats::default(), + completion, + plan: plan.summary(), + }); + } let query = prepare_vector(index.metric, request.query, index.dimensions)?; let lookup = build_lookup(&query, index.metric, &index.codebooks); + if let Some(completion) = stop_reason(control) { + return Ok(SearchResult { + neighbors: Vec::new(), + stats: ProximitySearchStats::default(), + completion, + plan: plan.summary(), + }); + } let code_store = store.for_kind(crate::prolly::content_graph::ContentObjectKind::ProductQuantization); let codes = AsyncProlly::new(code_store, index.code_tree.config.clone()); let mut stats = ProximitySearchStats::default(); - let mut approximate = BinaryHeap::::new(); + let mut approximate = BinaryHeap::::new(); let mut completion = SearchCompletion::ApproximatePolicySatisfied; if *direct_lookup { @@ -1021,7 +1284,12 @@ where completion = stopped; break; } - let Some(code) = codes.get(&index.code_tree, key).await? else { + let code = codes.get(&index.code_tree, key).await?; + if let Some(stopped) = stop_reason(control) { + completion = stopped; + break; + } + let Some(code) = code else { if source_bound { return Err(Error::InvalidProximityObject { kind: "product quantizer", @@ -1030,15 +1298,17 @@ where } continue; }; - if !admit_async_code( - key.clone(), - code, - &lookup, - index, + if !admit_quantized( + key.as_slice(), + &code, *rerank_target, &request, &mut stats, &mut approximate, + |code| { + validate_code(code, &index.codebooks)?; + Ok(score_code(index.metric, &lookup, code)) + }, )? { completion = SearchCompletion::BudgetExhausted; break; @@ -1046,25 +1316,44 @@ where } } else { let mut range = codes.range(&index.code_tree, &[], None).await?; - while let Some(entry) = range.next().await { + if let Some(stopped) = stop_reason(control) { + completion = stopped; + } + loop { + if matches!( + completion, + SearchCompletion::Cancelled | SearchCompletion::DeadlineExceeded + ) { + break; + } if let Some(stopped) = stop_reason(control) { completion = stopped; break; } + let entry = range.next().await; + if let Some(stopped) = stop_reason(control) { + completion = stopped; + break; + } + let Some(entry) = entry else { + break; + }; let (key, code) = entry?; if excluded.is_some_and(|excluded| excluded.contains(&key)) { continue; } if eligibility.contains(&key) - && !admit_async_code( + && !admit_quantized( key, - code, - &lookup, - index, + &code, *rerank_target, &request, &mut stats, &mut approximate, + |code| { + validate_code(code, &index.codebooks)?; + Ok(score_code(index.metric, &lookup, code)) + }, )? { completion = SearchCompletion::BudgetExhausted; @@ -1072,23 +1361,90 @@ where } } } - let mut approximate = approximate.into_vec(); - approximate.sort(); - let mut reranked = Vec::::with_capacity(approximate.len()); + let neighbors = rerank_quantized_async( + directory, + tree, + index.metric, + &request, + &query, + control, + approximate, + &mut stats, + &mut completion, + "product quantizer", + "PQ code key is absent from authoritative directory", + ) + .await?; + Ok(SearchResult { + neighbors, + stats, + completion, + plan: plan.summary(), + }) +} + +#[allow(clippy::too_many_arguments)] +async fn rerank_quantized_async( + directory: &AsyncProlly>, + tree: &ProximityTree, + metric: DistanceMetric, + request: &SearchRequest<'_>, + query: &[f32], + control: &AsyncSearchControl, + approximate: BinaryHeap, + stats: &mut ProximitySearchStats, + completion: &mut SearchCompletion, + object_kind: &'static str, + missing_code_message: &'static str, +) -> Result, Error> +where + S: AsyncStore + Clone, + S::Error: Send + Sync, +{ + if let Some(stopped) = stop_reason(control) { + *completion = stopped; + return Ok(Vec::new()); + } + let mut approximate_heap = approximate; + let mut approximate_descending = Vec::with_capacity(approximate_heap.len()); + loop { + if let Some(stopped) = stop_reason(control) { + *completion = stopped; + return Ok(Vec::new()); + } + let Some(candidate) = approximate_heap.pop() else { + break; + }; + approximate_descending.push(candidate); + } + let mut reranked = Vec::::with_capacity(approximate_descending.len()); + if let Some(stopped) = stop_reason(control) { + *completion = stopped; + return Ok(Vec::new()); + } let mut directory_session = directory.read(&tree.directory).await?; - for candidate in approximate { + if let Some(stopped) = stop_reason(control) { + *completion = stopped; + return Ok(Vec::new()); + } + for candidate in approximate_descending.into_iter().rev() { if let Some(stopped) = stop_reason(control) { - completion = stopped; + *completion = stopped; break; } - if budget_stops_record(&request, &stats, 0) { - completion = SearchCompletion::BudgetExhausted; + if budget_stops_record(request, stats, 0) { + *completion = SearchCompletion::BudgetExhausted; break; } - let Some(handle) = directory_session.get_handle(&candidate.key).await? else { + let handle = directory_session.get_handle(&candidate.key).await?; + if let Some(stopped) = stop_reason(control) { + *completion = stopped; + break; + } + let Some(handle) = handle else { return Err(Error::InvalidProximityObject { - kind: "product quantizer", - reason: "PQ code key is absent from authoritative directory".to_owned(), + kind: object_kind, + reason: missing_code_message.to_owned(), }); }; let bytes = handle.value()?.len(); @@ -1097,14 +1453,18 @@ where .max_committed_bytes .is_some_and(|limit| stats.committed_bytes.saturating_add(bytes) > limit) { - completion = SearchCompletion::BudgetExhausted; + *completion = SearchCompletion::BudgetExhausted; break; } let record = crate::prolly::proximity::storage::StoredRecordRef::decode( handle.value()?, tree.config.dimensions, )?; - let distance = record.vector.score(request.kernel, index.metric, &query); + let distance = record.vector.score(request.kernel, metric, query); + if let Some(stopped) = stop_reason(control) { + *completion = stopped; + break; + } stats.nodes_read += 1; stats.bytes_read += bytes; stats.committed_bytes += bytes; @@ -1113,58 +1473,46 @@ where } stats.reranked_candidates = reranked.len(); stats.candidate_handles_peak = reranked.len(); - stats.candidate_retained_bytes_peak = retained_candidate_bytes(&reranked); - reranked.sort_by(|left, right| { - left.distance - .total_cmp(&right.distance) - .then_with(|| left.key().cmp(right.key())) - }); - let neighbors = reranked - .into_iter() - .take(request.k) - .map(|candidate| candidate.into_neighbor(tree.config.dimensions)) - .collect::, Error>>()?; - Ok(SearchResult { - neighbors, - stats, - completion, - plan: plan.summary(), - }) -} - -#[allow(clippy::too_many_arguments)] -fn admit_async_code( - key: Vec, - code: Vec, - lookup: &[Vec], - index: &AsyncProductQuantizer, - target: usize, - request: &SearchRequest<'_>, - stats: &mut ProximitySearchStats, - approximate: &mut BinaryHeap, -) -> Result { - if budget_stops_record(request, stats, code.len()) - || request - .budget - .max_frontier_entries - .is_some_and(|limit| approximate.len().saturating_add(1) > limit) - { - return Ok(false); + let mut retained_backings = HashSet::with_capacity(reranked.len()); + let mut retained_bytes = 0usize; + for candidate in &reranked { + if let Some(stopped) = stop_reason(control) { + *completion = stopped; + return Ok(Vec::new()); + } + if retained_backings.insert(candidate.backing_id()) { + retained_bytes = retained_bytes.saturating_add(candidate.retained_bytes()); + } } - validate_code(&code, &index.codebooks)?; - stats.nodes_read += 1; - stats.bytes_read += code.len(); - stats.committed_bytes += code.len(); - stats.quantized_distance_evaluations += 1; - approximate.push(AsyncRanked { - distance: score_code(index.metric, lookup, &code), - key, - }); - if approximate.len() > target { - approximate.pop(); + stats.candidate_retained_bytes_peak = retained_bytes; + let mut reranked_heap = BinaryHeap::with_capacity(reranked.len()); + for candidate in reranked { + if let Some(stopped) = stop_reason(control) { + *completion = stopped; + return Ok(Vec::new()); + } + reranked_heap.push(AsyncReranked(candidate)); + } + let mut reranked_descending = Vec::with_capacity(reranked_heap.len()); + loop { + if let Some(stopped) = stop_reason(control) { + *completion = stopped; + return Ok(Vec::new()); + } + let Some(candidate) = reranked_heap.pop() else { + break; + }; + reranked_descending.push(candidate.0); + } + let mut neighbors = Vec::with_capacity(request.k.min(reranked_descending.len())); + for candidate in reranked_descending.into_iter().rev().take(request.k) { + if let Some(stopped) = stop_reason(control) { + *completion = stopped; + return Ok(Vec::new()); + } + neighbors.push(candidate.into_neighbor(tree.config.dimensions)?); } - stats.frontier_peak = stats.frontier_peak.max(approximate.len()); - Ok(true) + Ok(neighbors) } #[allow(clippy::too_many_arguments)] @@ -1304,6 +1652,20 @@ where ) .await } + AsyncCompositeBase::TurboQuantized(index) => { + search_turboquant_async( + store, + directory, + tree, + index, + base_request, + eligibility, + base, + control, + Some(&shadow), + ) + .await + } }?; add_async_stats(&mut stats, &base_result.stats); let mut completion = base_result.completion; diff --git a/src/prolly/proximity/search/mod.rs b/src/prolly/proximity/search/mod.rs index de354bf6..38e2b74a 100644 --- a/src/prolly/proximity/search/mod.rs +++ b/src/prolly/proximity/search/mod.rs @@ -58,6 +58,7 @@ pub struct SearchRequest<'a> { pub enum ApproximatePreference { HnswFirst, ProductQuantizedFirst, + TurboQuantizedFirst, } #[derive(Clone, Debug, PartialEq, Eq)] @@ -89,12 +90,18 @@ pub struct PqSearchOptions { pub rerank_multiplier: Option, } +#[derive(Clone, Debug, Default, PartialEq, Eq)] +pub struct TurboQuantSearchOptions { + pub rerank_multiplier: Option, +} + #[derive(Clone, Debug, PartialEq, Eq)] pub struct SearchOptions { pub backend: SearchBackend, pub planner: PlannerPolicy, pub hnsw: HnswSearchOptions, pub pq: PqSearchOptions, + pub turboquant: TurboQuantSearchOptions, } impl Default for SearchOptions { @@ -104,6 +111,7 @@ impl Default for SearchOptions { planner: PlannerPolicy::default(), hnsw: HnswSearchOptions::default(), pq: PqSearchOptions::default(), + turboquant: TurboQuantSearchOptions::default(), } } } @@ -133,9 +141,12 @@ impl<'a> SearchRequest<'a> { reason: "eligible_exact_ratio_ppm must not exceed 1,000,000".to_owned(), }); } - if self.options.hnsw.ef_search == Some(0) || self.options.pq.rerank_multiplier == Some(0) { + if self.options.hnsw.ef_search == Some(0) + || self.options.pq.rerank_multiplier == Some(0) + || self.options.turboquant.rerank_multiplier == Some(0) + { return Err(Error::InvalidProximitySearch { - reason: "HNSW ef_search and PQ rerank_multiplier overrides must be positive" + reason: "HNSW ef_search and quantized rerank_multiplier overrides must be positive" .to_owned(), }); } diff --git a/src/prolly/proximity/search/planner.rs b/src/prolly/proximity/search/planner.rs index 24a7bb8b..c60452c1 100644 --- a/src/prolly/proximity/search/planner.rs +++ b/src/prolly/proximity/search/planner.rs @@ -2,11 +2,11 @@ use super::{ApproximatePreference, EligibilityCardinality, PreparedFilter, Searc use crate::prolly::error::Error; use crate::prolly::proximity::accelerator::AcceleratorSet; use crate::prolly::proximity::{CompositeAcceleratorConfig, CompositeBaseKind}; -use crate::prolly::proximity::{HnswConfig, ProductQuantizationConfig}; +use crate::prolly::proximity::{HnswConfig, ProductQuantizationConfig, TurboQuantizationConfig}; use crate::prolly::proximity::{ProximityTree, SearchBackend, SearchPolicy}; use crate::prolly::store::Store; -pub const SEARCH_PLAN_FORMAT_VERSION: u8 = 3; +pub const SEARCH_PLAN_FORMAT_VERSION: u8 = 4; #[derive(Clone, Debug, PartialEq, Eq)] pub enum SearchPlan { @@ -19,6 +19,10 @@ pub enum SearchPlan { rerank_target: usize, direct_lookup: bool, }, + TurboQuantized { + rerank_target: usize, + direct_lookup: bool, + }, Hnsw { ef_search: u32, expansion_target: usize, @@ -75,6 +79,14 @@ impl SearchPlan { summary.rerank_target = Some(*rerank_target); summary.direct_lookup = *direct_lookup; } + Self::TurboQuantized { + rerank_target, + direct_lookup, + } => { + summary.backend = SearchBackend::TurboQuantized; + summary.rerank_target = Some(*rerank_target); + summary.direct_lookup = *direct_lookup; + } Self::Hnsw { ef_search, expansion_target, @@ -107,6 +119,7 @@ pub(crate) struct CompositePlanInput<'a> { pub base_kind: CompositeBaseKind, pub hnsw: Option<&'a HnswConfig>, pub pq: Option<&'a ProductQuantizationConfig>, + pub turboquant: Option<&'a TurboQuantizationConfig>, pub base_count: u64, pub delta_count: u64, pub shadow_count: u64, @@ -127,12 +140,14 @@ where tree, accelerators.hnsw().map(|index| index.config()), accelerators.pq().map(|index| index.config()), + accelerators.turboquant().map(|index| index.config()), accelerators .composite() .map(|composite| CompositePlanInput { base_kind: composite.base_kind(), hnsw: composite.base.hnsw().map(|index| index.config()), pq: composite.base.pq().map(|index| index.config()), + turboquant: composite.base.turboquant().map(|index| index.config()), base_count: composite.base_count, delta_count: composite.delta_count, shadow_count: composite.shadow_count, @@ -147,6 +162,7 @@ pub(crate) fn plan_search_capabilities( tree: &ProximityTree, hnsw: Option<&HnswConfig>, pq: Option<&ProductQuantizationConfig>, + turboquant: Option<&TurboQuantizationConfig>, composite: Option>, request: &SearchRequest<'_>, eligibility: &PreparedFilter<'_>, @@ -165,6 +181,12 @@ pub(crate) fn plan_search_capabilities( pq.ok_or_else(|| invalid("forced product-quantized backend is unavailable"))?; return pq_plan(tree, config, request, eligibility, cardinality); } + SearchBackend::TurboQuantized => { + ensure_approximate(request, "TurboQuant")?; + let config = + turboquant.ok_or_else(|| invalid("forced TurboQuant backend is unavailable"))?; + return turboquant_plan(tree, config, request, eligibility, cardinality); + } SearchBackend::Composite => { ensure_approximate(request, "composite")?; return composite_plan( @@ -191,10 +213,21 @@ pub(crate) fn plan_search_capabilities( } let preferences = match request.options.planner.approximate_preference { - ApproximatePreference::HnswFirst => [SearchBackend::Hnsw, SearchBackend::ProductQuantized], - ApproximatePreference::ProductQuantizedFirst => { - [SearchBackend::ProductQuantized, SearchBackend::Hnsw] - } + ApproximatePreference::HnswFirst => [ + SearchBackend::Hnsw, + SearchBackend::TurboQuantized, + SearchBackend::ProductQuantized, + ], + ApproximatePreference::ProductQuantizedFirst => [ + SearchBackend::ProductQuantized, + SearchBackend::TurboQuantized, + SearchBackend::Hnsw, + ], + ApproximatePreference::TurboQuantizedFirst => [ + SearchBackend::TurboQuantized, + SearchBackend::Hnsw, + SearchBackend::ProductQuantized, + ], }; for backend in preferences { let plan = match backend { @@ -204,6 +237,9 @@ pub(crate) fn plan_search_capabilities( SearchBackend::ProductQuantized => pq .map(|config| pq_plan(tree, config, request, eligibility, cardinality)) .transpose()?, + // Auto admission is deliberately gated on checked-in benchmark + // qualification; forced TurboQuant planning is fully available. + SearchBackend::TurboQuantized => None, SearchBackend::Native | SearchBackend::Composite | SearchBackend::Auto => None, }; if plan @@ -247,6 +283,15 @@ fn composite_plan( eligibility, cardinality, )?, + CompositeBaseKind::TurboQuantized => turboquant_plan_for_count( + input.base_count, + input + .turboquant + .ok_or_else(|| invalid("composite TurboQuant configuration is absent"))?, + request, + eligibility, + cardinality, + )?, }; inflate_composite_base( &mut base, @@ -294,6 +339,13 @@ fn inflate_composite_base( *rerank_target = inflate(*rerank_target)?; *direct_lookup = false; } + SearchPlan::TurboQuantized { + rerank_target, + direct_lookup, + } => { + *rerank_target = inflate(*rerank_target)?; + *direct_lookup = false; + } _ => return Err(invalid("composite base plan is not approximate")), } Ok(()) @@ -436,6 +488,48 @@ fn pq_plan_for_count( }) } +fn turboquant_plan( + tree: &ProximityTree, + config: &TurboQuantizationConfig, + request: &SearchRequest<'_>, + eligibility: &PreparedFilter<'_>, + cardinality: EligibilityCardinality, +) -> Result { + turboquant_plan_for_count(tree.count, config, request, eligibility, cardinality) +} + +fn turboquant_plan_for_count( + total_count: u64, + config: &TurboQuantizationConfig, + request: &SearchRequest<'_>, + eligibility: &PreparedFilter<'_>, + cardinality: EligibilityCardinality, +) -> Result { + let multiplier = request + .options + .turboquant + .rerank_multiplier + .map(usize::from) + .unwrap_or(config.rerank_multiplier as usize); + let known_limit = match cardinality { + EligibilityCardinality::Known(count) => count, + EligibilityCardinality::Unknown => total_count, + }; + let rerank_target = request + .k + .checked_mul(multiplier) + .ok_or_else(|| invalid("TurboQuant rerank target overflow"))? + .max(request.k) + .min(known_limit as usize) + .min(total_count as usize); + let direct_lookup = eligibility.sorted_keys().is_some() + && known_limit <= request.options.planner.eligible_exact_max_records as u64; + Ok(SearchPlan::TurboQuantized { + rerank_target, + direct_lookup, + }) +} + fn budget_admissible(plan: &SearchPlan, request: &SearchRequest<'_>) -> bool { match plan { SearchPlan::Hnsw { @@ -456,7 +550,8 @@ fn budget_admissible(plan: &SearchPlan, request: &SearchRequest<'_>) -> bool { .max_frontier_entries .is_none_or(|limit| request.k <= limit) } - SearchPlan::ProductQuantized { rerank_target, .. } => request + SearchPlan::ProductQuantized { rerank_target, .. } + | SearchPlan::TurboQuantized { rerank_target, .. } => request .budget .max_distance_evaluations .is_none_or(|limit| *rerank_target <= limit), @@ -491,7 +586,8 @@ fn estimated_node_work(plan: &SearchPlan) -> usize { rerank_target, .. } => expansion_target.saturating_add(*rerank_target), - SearchPlan::ProductQuantized { rerank_target, .. } => *rerank_target, + SearchPlan::ProductQuantized { rerank_target, .. } + | SearchPlan::TurboQuantized { rerank_target, .. } => *rerank_target, SearchPlan::Composite { base, delta_records, @@ -511,7 +607,8 @@ fn estimated_distance_work(plan: &SearchPlan) -> usize { rerank_target, .. } => expansion_target.saturating_add(*rerank_target), - SearchPlan::ProductQuantized { rerank_target, .. } => *rerank_target, + SearchPlan::ProductQuantized { rerank_target, .. } + | SearchPlan::TurboQuantized { rerank_target, .. } => *rerank_target, SearchPlan::Composite { base, delta_records, diff --git a/src/prolly/proximity/search/runtime.rs b/src/prolly/proximity/search/runtime.rs index e05ea1dc..f03df5ad 100644 --- a/src/prolly/proximity/search/runtime.rs +++ b/src/prolly/proximity/search/runtime.rs @@ -4,6 +4,9 @@ use crate::prolly::error::Error; use crate::prolly::node::Node; use crate::prolly::proximity::accelerator::hnsw::storage::Manifest as HnswManifest; use crate::prolly::proximity::accelerator::pq::Manifest as PqManifest; +use crate::prolly::proximity::accelerator::turboquant::{ + Manifest as TurboQuantManifest, StructuredRotation, STRUCTURED_ROTATION_ID, +}; use crate::prolly::proximity::accelerator::{ catalog::Manifest as CatalogManifest, composite::Manifest as CompositeManifest, }; @@ -11,7 +14,9 @@ use crate::prolly::proximity::storage::quantized::ScalarQuantized; use crate::prolly::proximity::storage::vector::ExternalVector; use crate::prolly::proximity::storage::{Descriptor, ProximityNode}; use crate::prolly::store::{AsyncStore, SyncStoreAsAsync}; -use crate::prolly::store::{BatchOp, NodePublication, Store}; +use crate::prolly::store::{ + BatchOp, NodePublication, Store, ValidatedSharedRead, ValidatedSharedReadBatch, +}; use std::collections::{HashMap, HashSet, VecDeque}; use std::sync::atomic::{AtomicU64, AtomicUsize, Ordering}; use std::sync::{Arc, Condvar, Mutex}; @@ -29,6 +34,7 @@ pub struct SearchRuntimePolicy { pub authoritative_max_bytes: usize, pub hnsw_max_bytes: usize, pub pq_max_bytes: usize, + pub turboquant_max_bytes: usize, } impl Default for SearchRuntimePolicy { @@ -39,6 +45,7 @@ impl Default for SearchRuntimePolicy { authoritative_max_bytes: 128 * 1024 * 1024, hnsw_max_bytes: 96 * 1024 * 1024, pq_max_bytes: 32 * 1024 * 1024, + turboquant_max_bytes: 32 * 1024 * 1024, } } } @@ -54,6 +61,7 @@ impl SearchRuntimePolicy { .authoritative_max_bytes .saturating_add(self.hnsw_max_bytes) .saturating_add(self.pq_max_bytes); + let partitions = partitions.saturating_add(self.turboquant_max_bytes); if partitions < self.max_bytes { return Err(Error::InvalidProximityConfig { reason: "search runtime partition byte limits must cover the total limit" @@ -190,6 +198,23 @@ impl Store for SearchIo { } } + fn get_validated_shared(&self, key: &[u8]) -> Result, Self::Error> { + let Ok(cid) = <[u8; 32]>::try_from(key).map(Cid) else { + return self.store.get_validated_shared(key); + }; + match self.runtime.load(self, self.kind, &cid, 2, |bytes| { + validate_cached_object(bytes, self.dimensions) + }) { + Ok(loaded) => Ok(Some(ValidatedSharedRead::cid_verified(loaded.bytes))), + Err(Error::NotFound(_)) => Ok(None), + Err(Error::Store(error)) => match error.downcast::() { + Ok(error) => Err(*error), + Err(_) => self.store.get_validated_shared(key), + }, + Err(_) => self.store.get_validated_shared(key), + } + } + fn put(&self, key: &[u8], value: &[u8]) -> Result<(), Self::Error> { self.store.put(key, value) } @@ -251,6 +276,30 @@ impl Store for SearchIo { } } + fn batch_get_validated_shared_ordered_unique( + &self, + keys: &[&[u8]], + ) -> Result { + let cids = keys + .iter() + .map(|key| <[u8; 32]>::try_from(*key).map(Cid)) + .collect::, _>>(); + let Ok(cids) = cids else { + return self.store.batch_get_validated_shared_ordered_unique(keys); + }; + match self.runtime.load_batch(self, &cids, self.kind, 2) { + Ok(values) => Ok(values + .into_iter() + .map(|value| value.map(ValidatedSharedRead::cid_verified)) + .collect()), + Err(Error::Store(error)) => match error.downcast::() { + Ok(error) => Err(*error), + Err(_) => self.store.batch_get_validated_shared_ordered_unique(keys), + }, + Err(_) => self.store.batch_get_validated_shared_ordered_unique(keys), + } + } + fn has_native_shared_reads(&self) -> bool { true } @@ -327,6 +376,30 @@ where } } + async fn get_validated_shared( + &self, + key: &[u8], + ) -> Result, Self::Error> { + let Ok(cid) = <[u8; 32]>::try_from(key).map(Cid) else { + return self.store.get_validated_shared(key).await; + }; + match self + .runtime + .load_async(self, self.kind, &cid, 2, |bytes| { + validate_cached_object(bytes, self.dimensions) + }) + .await + { + Ok(loaded) => Ok(Some(ValidatedSharedRead::cid_verified(loaded.bytes))), + Err(Error::NotFound(_)) => Ok(None), + Err(Error::Store(error)) => match error.downcast::() { + Ok(error) => Err(*error), + Err(_) => self.store.get_validated_shared(key).await, + }, + Err(_) => self.store.get_validated_shared(key).await, + } + } + async fn put(&self, key: &[u8], value: &[u8]) -> Result<(), Self::Error> { self.store.put(key, value).await } @@ -396,6 +469,45 @@ where } } + async fn batch_get_validated_shared_ordered_unique( + &self, + keys: &[&[u8]], + ) -> Result { + let cids = keys + .iter() + .map(|key| <[u8; 32]>::try_from(*key).map(Cid)) + .collect::, _>>(); + let Ok(cids) = cids else { + return self + .store + .batch_get_validated_shared_ordered_unique(keys) + .await; + }; + match self + .runtime + .load_batch_async(self, &cids, self.kind, 2) + .await + { + Ok(values) => Ok(values + .into_iter() + .map(|value| value.map(ValidatedSharedRead::cid_verified)) + .collect()), + Err(Error::Store(error)) => match error.downcast::() { + Ok(error) => Err(*error), + Err(_) => { + self.store + .batch_get_validated_shared_ordered_unique(keys) + .await + } + }, + Err(_) => { + self.store + .batch_get_validated_shared_ordered_unique(keys) + .await + } + } + } + fn has_native_shared_reads(&self) -> bool { true } @@ -418,6 +530,7 @@ enum Partition { Authoritative, Hnsw, Pq, + TurboQuant, } #[derive(Clone, Debug, PartialEq, Eq, Hash)] @@ -434,6 +547,19 @@ struct CacheEntry { generation: u64, } +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] +struct TransformPlanKey { + transform_id: u8, + dimensions: u32, + seed: u64, +} + +struct TransformPlanEntry { + plan: Arc, + bytes: usize, + generation: u64, +} + #[derive(Default)] struct RuntimeState { entries: HashMap, @@ -444,6 +570,9 @@ struct RuntimeState { authoritative_bytes: usize, hnsw_bytes: usize, pq_bytes: usize, + turboquant_bytes: usize, + transform_plans: HashMap, + transform_plan_access_log: VecDeque<(TransformPlanKey, u64)>, async_waiters: HashMap>, } @@ -476,10 +605,73 @@ impl SearchRuntime { .unwrap_or_else(|poison| poison.into_inner()); state.entries.clear(); state.access_log.clear(); + state.transform_plans.clear(); + state.transform_plan_access_log.clear(); state.bytes = 0; state.authoritative_bytes = 0; state.hnsw_bytes = 0; state.pq_bytes = 0; + state.turboquant_bytes = 0; + } + + pub(crate) fn turboquant_transform_plan( + &self, + dimensions: u32, + seed: u64, + ) -> Result, Error> { + let key = TransformPlanKey { + transform_id: STRUCTURED_ROTATION_ID, + dimensions, + seed, + }; + { + let mut state = self + .state + .lock() + .unwrap_or_else(|poison| poison.into_inner()); + let generation = state.generation.wrapping_add(1); + state.generation = generation; + if let Some(entry) = state.transform_plans.get_mut(&key) { + entry.generation = generation; + let plan = Arc::clone(&entry.plan); + state.transform_plan_access_log.push_back((key, generation)); + compact_transform_plan_access_log(&mut state); + return Ok(plan); + } + } + + let plan = Arc::new(StructuredRotation::derive(dimensions as usize, seed)?); + let bytes = plan.owned_bytes(); + if bytes > self.policy.max_bytes || bytes > self.policy.turboquant_max_bytes { + return Ok(plan); + } + let mut state = self + .state + .lock() + .unwrap_or_else(|poison| poison.into_inner()); + let generation = state.generation.wrapping_add(1); + state.generation = generation; + if let Some(entry) = state.transform_plans.get_mut(&key) { + entry.generation = generation; + let cached = Arc::clone(&entry.plan); + state.transform_plan_access_log.push_back((key, generation)); + compact_transform_plan_access_log(&mut state); + return Ok(cached); + } + state.bytes = state.bytes.saturating_add(bytes); + state.turboquant_bytes = state.turboquant_bytes.saturating_add(bytes); + state.transform_plans.insert( + key, + TransformPlanEntry { + plan: Arc::clone(&plan), + bytes, + generation, + }, + ); + state.transform_plan_access_log.push_back((key, generation)); + self.evict_to_policy(&mut state, Partition::TurboQuant); + compact_transform_plan_access_log(&mut state); + Ok(plan) } pub(crate) fn load( @@ -913,28 +1105,34 @@ impl SearchRuntime { }, ); state.access_log.push_back((key, generation)); - while state.entries.len() > self.policy.max_entries + self.evict_to_policy(state, partition); + compact_access_log(state); + } + + fn evict_to_policy(&self, state: &mut RuntimeState, inserted_partition: Partition) { + while state + .entries + .len() + .saturating_add(state.transform_plans.len()) + > self.policy.max_entries || state.bytes > self.policy.max_bytes - || partition_bytes(state, partition) > partition_limit + || partition_bytes(state, inserted_partition) > self.partition_limit(inserted_partition) { - let Some((candidate, candidate_generation)) = state.access_log.pop_front() else { - break; - }; - if state - .entries - .get(&candidate) - .is_some_and(|entry| entry.generation == candidate_generation) - { - let removed = state - .entries - .remove(&candidate) - .expect("checked cache entry"); - state.bytes = state.bytes.saturating_sub(removed.bytes.len()); - *partition_bytes_mut(state, removed.partition) = - partition_bytes(state, removed.partition).saturating_sub(removed.bytes.len()); + discard_stale_access_records(state); + let content_generation = state.access_log.front().map(|(_, generation)| *generation); + let plan_generation = state + .transform_plan_access_log + .front() + .map(|(_, generation)| *generation); + match (content_generation, plan_generation) { + (Some(content), Some(plan)) if plan < content => { + evict_oldest_transform_plan(state); + } + (Some(_), _) => evict_oldest_content(state), + (None, Some(_)) => evict_oldest_transform_plan(state), + (None, None) => break, } } - compact_access_log(state); } fn partition_limit(&self, partition: Partition) -> usize { @@ -942,6 +1140,7 @@ impl SearchRuntime { Partition::Authoritative => self.policy.authoritative_max_bytes, Partition::Hnsw => self.policy.hnsw_max_bytes, Partition::Pq => self.policy.pq_max_bytes, + Partition::TurboQuant => self.policy.turboquant_max_bytes, } } } @@ -1011,6 +1210,7 @@ fn partition(kind: ContentObjectKind) -> Partition { | ContentObjectKind::HnswPage | ContentObjectKind::CompositeAccelerator => Partition::Hnsw, ContentObjectKind::ProductQuantization => Partition::Pq, + ContentObjectKind::TurboQuantization => Partition::TurboQuant, _ => Partition::Authoritative, } } @@ -1020,6 +1220,7 @@ fn partition_bytes(state: &RuntimeState, partition: Partition) -> usize { Partition::Authoritative => state.authoritative_bytes, Partition::Hnsw => state.hnsw_bytes, Partition::Pq => state.pq_bytes, + Partition::TurboQuant => state.turboquant_bytes, } } @@ -1028,6 +1229,7 @@ fn partition_bytes_mut(state: &mut RuntimeState, partition: Partition) -> &mut u Partition::Authoritative => &mut state.authoritative_bytes, Partition::Hnsw => &mut state.hnsw_bytes, Partition::Pq => &mut state.pq_bytes, + Partition::TurboQuant => &mut state.turboquant_bytes, } } @@ -1045,6 +1247,83 @@ fn compact_access_log(state: &mut RuntimeState) { state.access_log = current.into(); } +fn compact_transform_plan_access_log(state: &mut RuntimeState) { + let maximum = state + .transform_plans + .len() + .saturating_mul(8) + .saturating_add(128); + if state.transform_plan_access_log.len() <= maximum { + return; + } + let mut current = state + .transform_plans + .iter() + .map(|(key, entry)| (*key, entry.generation)) + .collect::>(); + current.sort_by_key(|(_, generation)| *generation); + state.transform_plan_access_log = current.into(); +} + +fn discard_stale_access_records(state: &mut RuntimeState) { + while state.access_log.front().is_some_and(|(key, generation)| { + state + .entries + .get(key) + .is_none_or(|entry| entry.generation != *generation) + }) { + state.access_log.pop_front(); + } + while state + .transform_plan_access_log + .front() + .is_some_and(|(key, generation)| { + state + .transform_plans + .get(key) + .is_none_or(|entry| entry.generation != *generation) + }) + { + state.transform_plan_access_log.pop_front(); + } +} + +fn evict_oldest_content(state: &mut RuntimeState) { + let Some((key, generation)) = state.access_log.pop_front() else { + return; + }; + if state + .entries + .get(&key) + .is_none_or(|entry| entry.generation != generation) + { + return; + } + let removed = state.entries.remove(&key).expect("checked cache entry"); + state.bytes = state.bytes.saturating_sub(removed.bytes.len()); + *partition_bytes_mut(state, removed.partition) = + partition_bytes(state, removed.partition).saturating_sub(removed.bytes.len()); +} + +fn evict_oldest_transform_plan(state: &mut RuntimeState) { + let Some((key, generation)) = state.transform_plan_access_log.pop_front() else { + return; + }; + if state + .transform_plans + .get(&key) + .is_none_or(|entry| entry.generation != generation) + { + return; + } + let removed = state + .transform_plans + .remove(&key) + .expect("checked transform plan entry"); + state.bytes = state.bytes.saturating_sub(removed.bytes); + state.turboquant_bytes = state.turboquant_bytes.saturating_sub(removed.bytes); +} + fn validate_cached_object(bytes: &[u8], dimensions: Option) -> Result<(), Error> { let magic = bytes .get(..4) @@ -1067,6 +1346,7 @@ fn validate_cached_object(bytes: &[u8], dimensions: Option) -> Result<(), E b"PQS8" => ScalarQuantized::decode(bytes).map(|_| ()), b"HNSW" => HnswManifest::decode(bytes).map(|_| ()), b"PQPQ" => PqManifest::decode(bytes).map(|_| ()), + b"TQTQ" => TurboQuantManifest::decode(bytes).map(|_| ()), b"PCOM" => CompositeManifest::decode(bytes).map(|_| ()), b"PACL" => CatalogManifest::decode(bytes).map(|_| ()), _ => Err(Error::InvalidProximityObject { @@ -1079,6 +1359,9 @@ fn validate_cached_object(bytes: &[u8], dimensions: Option) -> Result<(), E #[cfg(test)] mod tests { use super::*; + use crate::prolly::engine::validation::decode_validated_read; + use crate::prolly::format::TreeFormat; + use crate::prolly::store::MemStore; fn key(label: &[u8], kind: ContentObjectKind) -> CacheKey { CacheKey { @@ -1097,6 +1380,7 @@ mod tests { authoritative_max_bytes: 16, hnsw_max_bytes: 16, pq_max_bytes: 16, + turboquant_max_bytes: 16, }) .unwrap(); let first_key = key(b"first", ContentObjectKind::OrderedNode); @@ -1119,4 +1403,73 @@ mod tests { drop(state); assert_eq!(pinned.as_ref(), &[1; 8]); } + + #[test] + fn turboquant_transform_plans_are_shared_weighted_evicted_and_cleared() { + let runtime = SearchRuntime::new(SearchRuntimePolicy { + max_entries: 2, + max_bytes: 160, + authoritative_max_bytes: 160, + hnsw_max_bytes: 160, + pq_max_bytes: 160, + turboquant_max_bytes: 160, + }) + .unwrap(); + let first = runtime.turboquant_transform_plan(8, 7).unwrap(); + let same = runtime.turboquant_transform_plan(8, 7).unwrap(); + assert!(Arc::ptr_eq(&first, &same)); + assert_eq!(first.owned_bytes(), 144); + + let second = runtime.turboquant_transform_plan(8, 8).unwrap(); + assert!(!Arc::ptr_eq(&first, &second)); + let state = runtime.state.lock().unwrap(); + assert_eq!(state.transform_plans.len(), 1); + assert_eq!(state.turboquant_bytes, 144); + assert_eq!(state.bytes, 144); + drop(state); + + runtime.clear(); + let state = runtime.state.lock().unwrap(); + assert!(state.transform_plans.is_empty()); + assert_eq!(state.turboquant_bytes, 0); + assert_eq!(state.bytes, 0); + } + + #[test] + fn search_io_marks_only_runtime_verified_bytes_as_cid_verified() { + let bytes = Node::new_leaf().to_bytes(); + let cid = Cid::from_bytes(&bytes); + let store = Arc::new(MemStore::new()); + store.put(cid.as_bytes(), &bytes).unwrap(); + let io = SearchIo::new(store, Arc::new(SearchRuntime::default())); + + let read = Store::get_validated_shared(&io, cid.as_bytes()) + .unwrap() + .unwrap(); + let (loaded, cid_verified) = read.into_parts(); + assert!(cid_verified); + assert_eq!(loaded.as_ref(), bytes); + } + + #[test] + fn corrupt_runtime_fallback_remains_unverified_and_fails_closed() { + let valid = Node::new_leaf().to_bytes(); + let cid = Cid::from_bytes(&valid); + let corrupt = Node::builder() + .keys(vec![b"different".to_vec()]) + .vals(vec![b"value".to_vec()]) + .build() + .to_bytes(); + let store = Arc::new(MemStore::new()); + store.put(cid.as_bytes(), &corrupt).unwrap(); + let io = SearchIo::new(store, Arc::new(SearchRuntime::default())); + + let read = Store::get_validated_shared(&io, cid.as_bytes()) + .unwrap() + .unwrap(); + assert!(matches!( + decode_validated_read(&cid, &TreeFormat::default(), read), + Err(Error::CidMismatch { .. }) + )); + } } diff --git a/src/prolly/store/mod.rs b/src/prolly/store/mod.rs index 0c897721..401066f0 100644 --- a/src/prolly/store/mod.rs +++ b/src/prolly/store/mod.rs @@ -231,6 +231,51 @@ impl<'a> NodePublication<'a> { /// Ordered results from a retained immutable-byte batch read. pub type SharedReadBatch = Vec>>; +/// Retained immutable bytes plus the validation already performed for this read. +/// +/// External stores can construct only unverified reads. Crate-owned adapters may +/// preserve a successful key-to-CID check so the engine does not hash the same +/// immutable bytes again before decoding them. +#[derive(Clone, Debug)] +pub struct ValidatedSharedRead { + bytes: Arc<[u8]>, + cid_verified: bool, +} + +impl ValidatedSharedRead { + /// Wrap retained bytes that still require content-ID validation. + pub fn unverified(bytes: Arc<[u8]>) -> Self { + Self { + bytes, + cid_verified: false, + } + } + + pub(crate) fn cid_verified(bytes: Arc<[u8]>) -> Self { + Self { + bytes, + cid_verified: true, + } + } + + /// Borrow the retained bytes. + pub fn bytes(&self) -> &[u8] { + &self.bytes + } + + /// Consume the read and return its retained bytes. + pub fn into_bytes(self) -> Arc<[u8]> { + self.bytes + } + + pub(crate) fn into_parts(self) -> (Arc<[u8]>, bool) { + (self.bytes, self.cid_verified) + } +} + +/// Ordered results carrying per-value content-ID validation state. +pub type ValidatedSharedReadBatch = Vec>; + /// Storage backend trait for Prolly Trees /// /// Keys are CID bytes, values are serialized nodes. @@ -253,6 +298,15 @@ pub trait Store: Send + Sync { .map(|value| value.map(|bytes| Arc::from(bytes.into_boxed_slice()))) } + /// Get retained bytes together with any CID validation already performed. + /// + /// The default is deliberately unverified. This preserves fail-closed CID + /// checking for every external store implementation. + fn get_validated_shared(&self, key: &[u8]) -> Result, Self::Error> { + self.get_shared(key) + .map(|value| value.map(ValidatedSharedRead::unverified)) + } + /// Retrieve unique keys in order as retained immutable byte buffers. fn batch_get_shared_ordered_unique( &self, @@ -266,6 +320,19 @@ pub trait Store: Send + Sync { }) } + /// Retrieve unique retained reads with per-value CID validation state. + fn batch_get_validated_shared_ordered_unique( + &self, + keys: &[&[u8]], + ) -> Result { + self.batch_get_shared_ordered_unique(keys).map(|values| { + values + .into_iter() + .map(|value| value.map(ValidatedSharedRead::unverified)) + .collect() + }) + } + /// Whether shared reads return an already-retained immutable allocation. fn has_native_shared_reads(&self) -> bool { false @@ -509,6 +576,19 @@ pub trait AsyncStore { .map(|value| value.map(|bytes| Arc::from(bytes.into_boxed_slice()))) } + /// Async retained read carrying any CID validation already performed. + /// + /// The default remains unverified so external implementations cannot + /// accidentally bypass the engine's content-address check. + async fn get_validated_shared( + &self, + key: &[u8], + ) -> Result, Self::Error> { + self.get_shared(key) + .await + .map(|value| value.map(ValidatedSharedRead::unverified)) + } + /// Async ordered retained-byte batch read for unique keys. async fn batch_get_shared_ordered_unique( &self, @@ -522,6 +602,21 @@ pub trait AsyncStore { }) } + /// Async ordered retained reads with per-value CID validation state. + async fn batch_get_validated_shared_ordered_unique( + &self, + keys: &[&[u8]], + ) -> Result { + self.batch_get_shared_ordered_unique(keys) + .await + .map(|values| { + values + .into_iter() + .map(|value| value.map(ValidatedSharedRead::unverified)) + .collect() + }) + } + /// Whether async shared reads retain backend-owned immutable allocations. fn has_native_shared_reads(&self) -> bool { false @@ -786,6 +881,13 @@ impl AsyncStore for SyncStoreAsAsync { self.inner.get_shared(key) } + async fn get_validated_shared( + &self, + key: &[u8], + ) -> Result, Self::Error> { + self.inner.get_validated_shared(key) + } + async fn batch_get_shared_ordered_unique( &self, keys: &[&[u8]], @@ -793,6 +895,13 @@ impl AsyncStore for SyncStoreAsAsync { self.inner.batch_get_shared_ordered_unique(keys) } + async fn batch_get_validated_shared_ordered_unique( + &self, + keys: &[&[u8]], + ) -> Result { + self.inner.batch_get_validated_shared_ordered_unique(keys) + } + fn has_native_shared_reads(&self) -> bool { self.inner.has_native_shared_reads() } @@ -1291,6 +1400,10 @@ impl Store for std::sync::Arc { (**self).get_shared(key) } + fn get_validated_shared(&self, key: &[u8]) -> Result, Self::Error> { + (**self).get_validated_shared(key) + } + fn batch_get_shared_ordered_unique( &self, keys: &[&[u8]], @@ -1298,6 +1411,13 @@ impl Store for std::sync::Arc { (**self).batch_get_shared_ordered_unique(keys) } + fn batch_get_validated_shared_ordered_unique( + &self, + keys: &[&[u8]], + ) -> Result { + (**self).batch_get_validated_shared_ordered_unique(keys) + } + fn has_native_shared_reads(&self) -> bool { (**self).has_native_shared_reads() } @@ -1384,6 +1504,10 @@ impl Store for &T { (**self).get_shared(key) } + fn get_validated_shared(&self, key: &[u8]) -> Result, Self::Error> { + (**self).get_validated_shared(key) + } + fn batch_get_shared_ordered_unique( &self, keys: &[&[u8]], @@ -1391,6 +1515,13 @@ impl Store for &T { (**self).batch_get_shared_ordered_unique(keys) } + fn batch_get_validated_shared_ordered_unique( + &self, + keys: &[&[u8]], + ) -> Result { + (**self).batch_get_validated_shared_ordered_unique(keys) + } + fn has_native_shared_reads(&self) -> bool { (**self).has_native_shared_reads() } @@ -1471,6 +1602,13 @@ impl AsyncStore for std::sync::Arc { (**self).get_shared(key).await } + async fn get_validated_shared( + &self, + key: &[u8], + ) -> Result, Self::Error> { + (**self).get_validated_shared(key).await + } + async fn batch_get_shared_ordered_unique( &self, keys: &[&[u8]], @@ -1478,6 +1616,15 @@ impl AsyncStore for std::sync::Arc { (**self).batch_get_shared_ordered_unique(keys).await } + async fn batch_get_validated_shared_ordered_unique( + &self, + keys: &[&[u8]], + ) -> Result { + (**self) + .batch_get_validated_shared_ordered_unique(keys) + .await + } + fn has_native_shared_reads(&self) -> bool { (**self).has_native_shared_reads() } diff --git a/stores/prolly-store-slatedb/Cargo.lock b/stores/prolly-store-slatedb/Cargo.lock new file mode 100644 index 00000000..e2c26ee4 --- /dev/null +++ b/stores/prolly-store-slatedb/Cargo.lock @@ -0,0 +1,3411 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "aliasable" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "250f629c0161ad8107cf89319e990051fae62832fd343083bea452d93e2205fd" + +[[package]] +name = "allocator-api2" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" + +[[package]] +name = "android_system_properties" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae221649c9976a6f6c56ae1facf410f3ddb33cc661c4b7b61020a912d4237fbc" +dependencies = [ + "libc", +] + +[[package]] +name = "anyhow" +version = "1.0.104" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "330a5ed07fa54e4702c9d6c4174f74427fc0ef6e214bbd677ae50a5099946470" + +[[package]] +name = "arrayvec" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3fb67a6e08acf24fdeccbac2cb6ac4305825bd1f117462e0e6f2f193345ad56" + +[[package]] +name = "async-channel" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "924ed96dd52d1b75e9c1a3e6275715fd320f5f9439fb5a4a11fa51f4221158d2" +dependencies = [ + "concurrent-queue", + "event-listener-strategy", + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "async-trait" +version = "0.1.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82f6aeea286b8eb4dd3431a1be1b59d290ace00f5bfd8e2a159bc2a05e2c1667" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.3", +] + +[[package]] +name = "atomic" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a89cbf775b137e9b968e67227ef7f775587cde3fd31b0d8599dbd0f598a48340" +dependencies = [ + "bytemuck", +] + +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + +[[package]] +name = "autocfg" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53" + +[[package]] +name = "aws-lc-rs" +version = "1.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce2b2dcc879c3bae0d371e77c99f2238400ef24ec001394befa67b6e543add9e" +dependencies = [ + "aws-lc-sys", + "zeroize", +] + +[[package]] +name = "aws-lc-sys" +version = "0.44.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f09fae7be8bb3174e05c6afdb34199e6dc0c7c04ba9fa237b1967adfbde27483" +dependencies = [ + "cc", + "cmake", + "dunce", + "fs_extra", + "pkg-config", +] + +[[package]] +name = "backon" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cffb0e931875b666fc4fcb20fee52e9bbd1ef836fd9e9e04ec21555f9f85f7ef" +dependencies = [ + "fastrand", + "gloo-timers", + "tokio", +] + +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + +[[package]] +name = "bincode" +version = "1.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" +dependencies = [ + "serde", +] + +[[package]] +name = "bitflags" +version = "2.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b588b76d00fde79687d7646a9b5bdf3cc0f655e0bbd080335a95d7e96f3587da" + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "block-buffer" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2f6c7dbe95a6ed67ad9f18e57daf93a2f034c524b99fd2b76d18fdfeb6660aa" +dependencies = [ + "hybrid-array", +] + +[[package]] +name = "bumpalo" +version = "3.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72f5acc6cb2ba439de613abc23857ec3d78374d8ed5ac84e9d11336e87da8649" + +[[package]] +name = "bytemuck" +version = "1.25.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95832e849adfb21180ccb6826a99da14e5d266ae5c2e668e1602cf234f153797" + +[[package]] +name = "bytes" +version = "1.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc652a48c352aef3ea3aed32080501cf3ef6ed5da78602a020c991775b0aff04" +dependencies = [ + "serde", +] + +[[package]] +name = "cc" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d262e149917187838d5b42777c8253bcb64500067342904e7d429499a6f277e" +dependencies = [ + "find-msvc-tools", + "jobserver", + "libc", + "shlex", +] + +[[package]] +name = "cfg-if" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" + +[[package]] +name = "cfg_aliases" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f079e83a288787bcd14a6aea84cee5c87a67c5a3e660c30f557a3d24761b3527" + +[[package]] +name = "chacha20" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65c35e4b699c7e15ccbe7ee35c005e4fc0a278d22238a2857e6ce2dadeda1b06" +dependencies = [ + "cfg-if", + "cpufeatures 0.3.0", + "rand_core 0.10.1", +] + +[[package]] +name = "chrono" +version = "0.4.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1aa79e62e7697b8e29b513a68abacf485adcd1fe8284a4316c5ae868e6633327" +dependencies = [ + "iana-time-zone", + "js-sys", + "num-traits", + "serde", + "wasm-bindgen", + "windows-link 0.2.1", +] + +[[package]] +name = "cmake" +version = "0.1.58" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0f78a02292a74a88ac736019ab962ece0bc380e3f977bf72e376c5d78ff0678" +dependencies = [ + "cc", +] + +[[package]] +name = "cmsketch" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7ee2cfacbd29706479902b06d75ad8f1362900836aa32799eabc7e004bfd854" + +[[package]] +name = "combine" +version = "4.6.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba5a308b75df32fe02788e748662718f03fde005016435c444eea572398219fd" +dependencies = [ + "bytes", + "memchr", +] + +[[package]] +name = "concurrent-queue" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "core-foundation" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2a6cd9ae233e7f62ba4e9353e81a88df7fc8a5987b8d445b4d90c879bd156f6" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" + +[[package]] +name = "core_affinity" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a034b3a7b624016c6e13f5df875747cc25f884156aad2abd12b6c46797971342" +dependencies = [ + "libc", + "num_cpus", + "winapi", +] + +[[package]] +name = "cpufeatures" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" +dependencies = [ + "libc", +] + +[[package]] +name = "cpufeatures" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b2a41393f66f16b0823bb79094d54ac5fbd34ab292ddafb9a0456ac9f87d201" +dependencies = [ + "libc", +] + +[[package]] +name = "crc-fast" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e75b2483e97a5a7da73ac68a05b629f9c53cff58d8ed1c77866079e18b00dba5" +dependencies = [ + "digest 0.10.7", + "spin", +] + +[[package]] +name = "crc32fast" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "crossbeam-deque" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5181e0de7b61eb03a81e347d6dd8797bae9da5146707b51077e2d71a54ec0ceb" +dependencies = [ + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d6914041f254d6e9176c01941b21115dcfb7089e55135a35411081bd106ef3f" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-skiplist" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df29de440c58ca2cc6e587ec3d22347551a32435fbde9d2bff64e78a9ffa151b" +dependencies = [ + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61803da095bee82a81bb1a452ecc25d3b2f1416d1897eb86430c6159ef717c17" + +[[package]] +name = "crypto-common" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a" +dependencies = [ + "generic-array", + "typenum", +] + +[[package]] +name = "crypto-common" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce6e4c961d6cd6c9a86db418387425e8bdeaf05b3c8bc1411e6dca4c252f1453" +dependencies = [ + "hybrid-array", +] + +[[package]] +name = "deranged" +version = "0.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cd812cc2bc1d69d4764bd80df88b4317eaef9e773c75226407d9bc0876b211c" + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer 0.10.4", + "crypto-common 0.1.7", +] + +[[package]] +name = "digest" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1dd6dbb5841937940781866fa1281a1ff7bd3bf827091440879f9994983d5c2" +dependencies = [ + "block-buffer 0.12.1", + "crypto-common 0.2.2", +] + +[[package]] +name = "displaydoc" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6232dd377dcc64799954cbd3a9bb882e9cdc1308ccd87b1c098f1fb2eaf82a8" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.3", +] + +[[package]] +name = "dotenvy" +version = "0.15.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" + +[[package]] +name = "dunce" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" + +[[package]] +name = "duration-str" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f88959de2d447fd3eddcf1909d1f19fe084e27a056a6904203dc5d8b9e771c1e" +dependencies = [ + "rust_decimal", + "serde", + "thiserror 2.0.20", + "time", + "winnow 0.6.26", +] + +[[package]] +name = "either" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e5e8f6c15a24b9a3ee5efec809ccd006d3b30e8b3bb63c39af737c7f87daa1d" + +[[package]] +name = "equivalent" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" + +[[package]] +name = "errno" +version = "0.3.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "event-listener" +version = "5.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a23add41df1562121a9393cb065eab5146a1242410f23a644851e90cfd669d2" +dependencies = [ + "parking", + "pin-project-lite", +] + +[[package]] +name = "event-listener-strategy" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8be9f3dfaaffdae2972880079a491a1a8bb7cbed0b8dd7a347f668b4150a3b93" +dependencies = [ + "event-listener", + "pin-project-lite", +] + +[[package]] +name = "fail-parallel" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6f4a147ba57fcd64323c54c8f69fd4e045456a99574163010ccf5eea3168aaa" +dependencies = [ + "log", + "once_cell", + "rand 0.9.5", + "tokio", +] + +[[package]] +name = "fastant" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e825441bfb2d831c47c97d05821552db8832479f44c571b97fededbf0099c07" +dependencies = [ + "small_ctor", + "web-time", +] + +[[package]] +name = "fastrand" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da7c62ceae207dd37ea5b845da6a0696c799f85e97da1ab5b7910be3c1c80223" + +[[package]] +name = "figment" +version = "0.10.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8cb01cd46b0cf372153850f4c6c272d9cbea2da513e07538405148f95bd789f3" +dependencies = [ + "atomic", + "pear", + "serde", + "serde_json", + "serde_yaml", + "toml", + "uncased", + "version_check", +] + +[[package]] +name = "find-msvc-tools" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26b73573e6edcd2af0cdf47bd6cb58f0b3839491263c314eaad1ccf24430e1de" + +[[package]] +name = "flatbuffers" +version = "25.12.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35f6839d7b3b98adde531effaf34f0c2badc6f4735d26fe74709d8e513a96ef3" +dependencies = [ + "bitflags", + "rustc_version", +] + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "foldhash" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb" + +[[package]] +name = "form_urlencoded" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "foyer" +version = "0.22.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b0abc0b87814989efa711f9becd9f26969820e2d3905db27d10969c4bd45890" +dependencies = [ + "anyhow", + "equivalent", + "foyer-common", + "foyer-memory", + "foyer-storage", + "foyer-tokio", + "futures-util", + "mea", + "mixtrics", + "pin-project", + "serde", + "tracing", +] + +[[package]] +name = "foyer-common" +version = "0.22.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3db80d5dece93adb7ad709c84578794724a9cba342a7e566c3551c7ec626789" +dependencies = [ + "anyhow", + "bincode", + "bytes", + "cfg-if", + "foyer-tokio", + "mixtrics", + "parking_lot", + "pin-project", + "serde", + "twox-hash", +] + +[[package]] +name = "foyer-intrusive-collections" +version = "0.10.0-dev" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e4fee46bea69e0596130e3210e65d3424e0ac1e6df3bde6636304bdf1ca4a3b" +dependencies = [ + "memoffset", +] + +[[package]] +name = "foyer-memory" +version = "0.22.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db907f40a527ca2aa2f40a5f68b32ea58aa70f050cd233518e9ffd402cfba6ce" +dependencies = [ + "anyhow", + "bitflags", + "cmsketch", + "equivalent", + "foyer-common", + "foyer-intrusive-collections", + "foyer-tokio", + "futures-util", + "hashbrown 0.16.1", + "itertools 0.14.0", + "mea", + "mixtrics", + "parking_lot", + "paste", + "pin-project", + "serde", + "tracing", +] + +[[package]] +name = "foyer-storage" +version = "0.22.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1983f1db3d0710e9c9d5fc116d9202dccd41a2d1e032572224f1aff5520aa958" +dependencies = [ + "allocator-api2", + "anyhow", + "bytes", + "core_affinity", + "equivalent", + "fastant", + "foyer-common", + "foyer-memory", + "foyer-tokio", + "fs4", + "futures-core", + "futures-util", + "hashbrown 0.16.1", + "io-uring", + "itertools 0.14.0", + "libc", + "lz4", + "mea", + "parking_lot", + "pin-project", + "rand 0.9.5", + "serde", + "tracing", + "twox-hash", + "zstd", +] + +[[package]] +name = "foyer-tokio" +version = "0.22.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6577b05a7ffad0db555aedf00bfe52af818220fc4c1c3a7a12520896fc38627" +dependencies = [ + "tokio", +] + +[[package]] +name = "fs4" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8640e34b88f7652208ce9e88b1a37a2ae95227d84abec377ccd3c5cfeb141ed4" +dependencies = [ + "rustix", + "windows-sys 0.59.0", +] + +[[package]] +name = "fs_extra" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" + +[[package]] +name = "futures" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a31d2a3fbaaeb2af2368bbdd904aa8e812d3c04a1ee10d3171f52d556e5d0a3" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-channel" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1f9e3d69d39e4862ffed03ed071a76f9a13ba1d9109d355b0f0aa6b15e393c4" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92d699e522242e69e3003b94ecc1f960f3a5e015aa7c5d7486e65ad01dd94f5e" + +[[package]] +name = "futures-executor" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "031b47cf1a3c6cc8bc2fc76cd437f521619387907d469316e7c0bc278f1f5432" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-io" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53c0fa8157de1303bfffdaa1cc2a673bfffb60102f76b0ef4441659124373fed" + +[[package]] +name = "futures-macro" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fb9654ba8355388abeb8dcb4fc62f511300867002afc858860463bdd9fe0c44" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.3", +] + +[[package]] +name = "futures-sink" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1944426bf7d03f1d14f708785e4b33efd750b36d48a157b836b3efc15ede8e1d" + +[[package]] +name = "futures-task" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd417de3d1d015fc3bfd2b1ea46dfc7bab72ef86f1cc7cc9c78e728b34a6d1fd" + +[[package]] +name = "futures-util" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d50a92467f8ba5dd6e3ee5d4bd04d73ab2e4e1c44474a0674821dfce14b79bc" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "slab", +] + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", +] + +[[package]] +name = "getrandom" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "wasi", + "wasm-bindgen", +] + +[[package]] +name = "getrandom" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" +dependencies = [ + "cfg-if", + "libc", + "r-efi 5.3.0", + "wasip2", +] + +[[package]] +name = "getrandom" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "300e883d756b2e4ec94e02791f39b04b522276138852cfc41d9fb7e904106099" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "r-efi 6.0.0", + "rand_core 0.10.1", + "wasm-bindgen", +] + +[[package]] +name = "gloo-timers" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbb143cf96099802033e0d4f4963b19fd2e0b728bcf076cd9cf7f6634f092994" +dependencies = [ + "futures-channel", + "futures-core", + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "h2" +version = "0.4.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9f37a958b41b3b19ee2707c06439c0e9e547e847223eb791ecb0cb821c65e27" +dependencies = [ + "atomic-waker", + "bytes", + "fnv", + "futures-core", + "futures-sink", + "http", + "indexmap", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "half" +version = "1.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b43ede17f21864e81be2fa654110bf1e793774238d86ef8555c37e6519c0403" + +[[package]] +name = "hashbrown" +version = "0.15.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" + +[[package]] +name = "hashbrown" +version = "0.16.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" +dependencies = [ + "allocator-api2", + "equivalent", + "foldhash", +] + +[[package]] +name = "hashbrown" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a" +dependencies = [ + "allocator-api2", + "equivalent", + "foldhash", +] + +[[package]] +name = "heck" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" + +[[package]] +name = "hermit-abi" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c" + +[[package]] +name = "http" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "918d3568bebf352712bc2ef3d46a8bcf1a75b373be6539de198e9105cbbf9ce0" +dependencies = [ + "bytes", + "itoa", +] + +[[package]] +name = "http-body" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca2a8f2913ee65f60facd6a5905613afaa448497a0230cc41ce022d93290bc2c" +dependencies = [ + "bytes", + "http", +] + +[[package]] +name = "http-body-util" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9f41fd6a08e4d4ec69df65976da761afd5ad5e58a9d4acb46bd1c953a9e3ff2" +dependencies = [ + "bytes", + "futures-core", + "http", + "http-body", + "pin-project-lite", +] + +[[package]] +name = "httparse" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" + +[[package]] +name = "humantime" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15cdd26707701c53297e2fa6afb323d55fbc1d0810c3aec078ae3ef0424c3c15" + +[[package]] +name = "hybrid-array" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "707114b52a152fa7bdb290cd7cd5912d9467273b6d74e21b8d81aca1f8533f6b" +dependencies = [ + "typenum", +] + +[[package]] +name = "hyper" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d22053281f852e11534f5198498373cbb59295120a20771d90f7ed1897490a72" +dependencies = [ + "atomic-waker", + "bytes", + "futures-channel", + "futures-core", + "h2", + "http", + "http-body", + "httparse", + "itoa", + "pin-project-lite", + "smallvec", + "tokio", + "want", +] + +[[package]] +name = "hyper-rustls" +version = "0.27.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33ca68d021ef39cf6463ab54c1d0f5daf03377b70561305bb89a8f83aab66e0f" +dependencies = [ + "http", + "hyper", + "hyper-util", + "rustls", + "tokio", + "tokio-rustls", + "tower-service", +] + +[[package]] +name = "hyper-util" +version = "0.1.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96547c2556ec9d12fb1578c4eaf448b04993e7fb79cbaad930a656880a6bdfa0" +dependencies = [ + "base64", + "bytes", + "futures-channel", + "futures-util", + "http", + "http-body", + "hyper", + "ipnet", + "libc", + "percent-encoding", + "pin-project-lite", + "socket2", + "tokio", + "tower-service", + "tracing", +] + +[[package]] +name = "iana-time-zone" +version = "0.1.65" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e31bc9ad994ba00e440a8aa5c9ef0ec67d5cb5e5cb0cc7f8b744a35b389cc470" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "log", + "wasm-bindgen", + "windows-core 0.62.2", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +dependencies = [ + "cc", +] + +[[package]] +name = "icu_collections" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2984d1cd16c883d7935b9e07e44071dca8d917fd52ecc02c04d5fa0b5a3f191c" +dependencies = [ + "displaydoc", + "potential_utf", + "utf8_iter", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locale_core" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92219b62b3e2b4d88ac5119f8904c10f8f61bf7e95b640d25ba3075e6cac2c29" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_normalizer" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c56e5ee99d6e3d33bd91c5d85458b6005a22140021cc324cea84dd0e72cff3b4" +dependencies = [ + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da3be0ae77ea334f4da67c12f149704f19f81d1adf7c51cf482943e84a2bad38" + +[[package]] +name = "icu_properties" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bee3b67d0ea5c2cca5003417989af8996f8604e34fb9ddf96208a033901e70de" +dependencies = [ + "icu_collections", + "icu_locale_core", + "icu_properties_data", + "icu_provider", + "zerotrie", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e2bbb201e0c04f7b4b3e14382af113e17ba4f63e2c9d2ee626b720cbce54a14" + +[[package]] +name = "icu_provider" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "139c4cf31c8b5f33d7e199446eff9c1e02decfc2f0eec2c8d71f65befa45b421" +dependencies = [ + "displaydoc", + "icu_locale_core", + "writeable", + "yoke", + "zerofrom", + "zerotrie", + "zerovec", +] + +[[package]] +name = "idna" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" +dependencies = [ + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb68373c0d6620ef8105e855e7745e18b0d00d3bdb07fb532e434244cdb9a714" +dependencies = [ + "icu_normalizer", + "icu_properties", +] + +[[package]] +name = "indexmap" +version = "2.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d466e9454f08e4a911e14806c24e16fba1b4c121d1ea474396f396069cf949d9" +dependencies = [ + "equivalent", + "hashbrown 0.17.1", +] + +[[package]] +name = "inlinable_string" +version = "0.1.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8fae54786f62fb2918dcfae3d568594e50eb9b5c25bf04371af6fe7516452fb" + +[[package]] +name = "io-uring" +version = "0.7.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d64d8ca234d152948ceaede1f419b6a83983a5ecccaac05fb337a809c96d3aa6" +dependencies = [ + "bitflags", + "cfg-if", + "libc", +] + +[[package]] +name = "ipnet" +version = "2.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a756c3fac73139e83f14c2d742155dd2b78d3ee56597b419a0579b7bdd6dd78" + +[[package]] +name = "itertools" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285" +dependencies = [ + "either", +] + +[[package]] +name = "itertools" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b4baf93f58d4425749ca49a51c50ebab072c5df6994d08fed93541c331481dc" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" + +[[package]] +name = "jni" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5efd9a482cf3a427f00d6b35f14332adc7902ce91efb778580e180ff90fa3498" +dependencies = [ + "cfg-if", + "combine", + "jni-macros", + "jni-sys", + "log", + "simd_cesu8", + "thiserror 2.0.20", + "walkdir", + "windows-link 0.2.1", +] + +[[package]] +name = "jni-macros" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a00109accc170f0bdb141fed3e393c565b6f5e072365c3bd58f5b062591560a3" +dependencies = [ + "proc-macro2", + "quote", + "rustc_version", + "simd_cesu8", + "syn 2.0.119", +] + +[[package]] +name = "jni-sys" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6377a88cb3910bee9b0fa88d4f42e1d2da8e79915598f65fb0c7ee14c878af2" +dependencies = [ + "jni-sys-macros", +] + +[[package]] +name = "jni-sys-macros" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38c0b942f458fe50cdac086d2f946512305e5631e720728f2a61aabcd47a6264" +dependencies = [ + "quote", + "syn 2.0.119", +] + +[[package]] +name = "jobserver" +version = "0.1.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c00acbd29eabad4a2392fa0e921c874934dbbf4194312ad20f04a0ed67a3cb3" +dependencies = [ + "getrandom 0.4.3", + "libc", +] + +[[package]] +name = "js-sys" +version = "0.3.104" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e0c1080212aad755ea003d18543e8768dd432c48819efd73a7bf1e39b7a5a3a" +dependencies = [ + "cfg-if", + "futures-util", + "wasm-bindgen", +] + +[[package]] +name = "libc" +version = "0.2.189" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3eaf3ede3fee6db1a4c2ee091bf8a8b4dccdc6d17f656fb07896ee72867612f2" + +[[package]] +name = "libmimalloc-sys" +version = "0.1.49" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a45a52f43e1c16f667ccfe4dd8c85b7f7c204fd5e3bf46c5b0db9a5c3c0b8e9" +dependencies = [ + "cc", +] + +[[package]] +name = "linux-raw-sys" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53" + +[[package]] +name = "litemap" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92daf443525c4cce67b150400bc2316076100ce0b3686209eb8cf3c31612e6f0" + +[[package]] +name = "lock_api" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965" +dependencies = [ + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ceec5bc11778974d1bcb055b18002eba7f4b3518b6a0081b3af5f21666da9ad" + +[[package]] +name = "lru" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d2f2f9b4ba7e6b24d95e7e899329d35be83bcded72c8540cdd5368932d1d90a" +dependencies = [ + "hashbrown 0.17.1", +] + +[[package]] +name = "lru-slab" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "112b39cec0b298b6c1999fee3e31427f74f676e4cb9879ed1a121b43661a4154" + +[[package]] +name = "lz4" +version = "1.28.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a20b523e860d03443e98350ceaac5e71c6ba89aea7d960769ec3ce37f4de5af4" +dependencies = [ + "lz4-sys", +] + +[[package]] +name = "lz4-sys" +version = "1.11.1+lz4-1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6bd8c0d6c6ed0cd30b3652886bb8711dc4bb01d637a68105a3d5158039b418e6" +dependencies = [ + "cc", + "libc", +] + +[[package]] +name = "md-5" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69b6441f590336821bb897fb28fc622898ccceb1d6cea3fde5ea86b090c4de98" +dependencies = [ + "cfg-if", + "digest 0.11.3", +] + +[[package]] +name = "mea" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31fc7d159de0085ab6dd7ff145a9819442cfd3d098f783263120503c3f3e58b0" +dependencies = [ + "slab", +] + +[[package]] +name = "memchr" +version = "2.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98" + +[[package]] +name = "memoffset" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" +dependencies = [ + "autocfg", +] + +[[package]] +name = "mimalloc" +version = "0.1.52" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d4139bb28d14ad1facf21d5eb8825051b326e172d216b39f6d31df53cc97862" +dependencies = [ + "libmimalloc-sys", +] + +[[package]] +name = "mio" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30d65c71f1ce40ab09135ce117d742b9f8a19ff91a41a8b57ed50bc2de59c427" +dependencies = [ + "libc", + "wasi", + "windows-sys 0.61.2", +] + +[[package]] +name = "mixtrics" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c46b5adfb7a3ae4996d327a5bdc90e78fec025806dd312bdbe6f07a755e0ec9" +dependencies = [ + "itertools 0.15.0", + "parking_lot", +] + +[[package]] +name = "nix" +version = "0.31.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf20d2fde8ff38632c426f1165ed7436270b44f199fc55284c38276f9db47c3d" +dependencies = [ + "bitflags", + "cfg-if", + "cfg_aliases", + "libc", +] + +[[package]] +name = "ntapi" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3b335231dfd352ffb0f8017f3b6027a4917f7df785ea2143d8af2adc66980ae" +dependencies = [ + "winapi", +] + +[[package]] +name = "num-conv" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "521739c6d2bac4aa25192232afe6841231376b2b26d4d9fae5ecf8ca5772e441" + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", +] + +[[package]] +name = "num_cpus" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91df4bbde75afed763b708b7eee1e8e7651e02d97f6d5dd763e89367e957b23b" +dependencies = [ + "hermit-abi", + "libc", +] + +[[package]] +name = "objc2-core-foundation" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a180dd8642fa45cdb7dd721cd4c11b1cadd4929ce112ebd8b9f5803cc79d536" +dependencies = [ + "bitflags", +] + +[[package]] +name = "objc2-io-kit" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33fafba39597d6dc1fb709123dfa8289d39406734be322956a69f0931c73bb15" +dependencies = [ + "libc", + "objc2-core-foundation", +] + +[[package]] +name = "object_store" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d354792e39fa5f0009e47623cf8b15b099bf9a652fa55c6f817fe28ac84fea50" +dependencies = [ + "async-trait", + "aws-lc-rs", + "base64", + "bytes", + "chrono", + "crc-fast", + "form_urlencoded", + "futures-channel", + "futures-core", + "futures-util", + "http", + "http-body-util", + "humantime", + "hyper", + "itertools 0.15.0", + "md-5", + "nix", + "parking_lot", + "percent-encoding", + "quick-xml", + "rand 0.10.2", + "reqwest", + "rustls-pki-types", + "serde", + "serde_json", + "serde_urlencoded", + "thiserror 2.0.20", + "tokio", + "tracing", + "url", + "walkdir", + "wasm-bindgen-futures", + "web-time", + "windows-sys 0.61.2", +] + +[[package]] +name = "once_cell" +version = "1.21.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" + +[[package]] +name = "openssl-probe" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c87def4c32ab89d880effc9e097653c8da5d6ef28e6b539d313baaacfbafcbe" + +[[package]] +name = "ouroboros" +version = "0.18.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e0f050db9c44b97a94723127e6be766ac5c340c48f2c4bb3ffa11713744be59" +dependencies = [ + "aliasable", + "ouroboros_macro", + "static_assertions", +] + +[[package]] +name = "ouroboros_macro" +version = "0.18.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c7028bdd3d43083f6d8d4d5187680d0d3560d54df4cc9d752005268b41e64d0" +dependencies = [ + "heck", + "proc-macro2", + "proc-macro2-diagnostics", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "parking" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" + +[[package]] +name = "parking_lot" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-link 0.2.1", +] + +[[package]] +name = "paste" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" + +[[package]] +name = "pear" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdeeaa00ce488657faba8ebf44ab9361f9365a97bd39ffb8a60663f57ff4b467" +dependencies = [ + "inlinable_string", + "pear_codegen", + "yansi", +] + +[[package]] +name = "pear_codegen" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4bab5b985dc082b345f812b7df84e1bef27e7207b39e448439ba8bd69c93f147" +dependencies = [ + "proc-macro2", + "proc-macro2-diagnostics", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "percent-encoding" +version = "2.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" + +[[package]] +name = "pin-project" +version = "1.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2466b2336ed02bcdca6b294417127b90ec92038d1d5c4fbeac971a922e0e0924" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c96395f0a926bc13b1c17622aaddda1ecb55d49c8f1bf9777e4d877800a43f8b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" + +[[package]] +name = "pkg-config" +version = "0.3.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19f132c84eca552bf34cab8ec81f1c1dcc229b811638f9d283dceabe58c5569e" + +[[package]] +name = "potential_utf" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0103b1cef7ec0cf76490e969665504990193874ea05c85ff9bab8b911d0a0564" +dependencies = [ + "zerovec", +] + +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + +[[package]] +name = "ppv-lite86" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" +dependencies = [ + "zerocopy", +] + +[[package]] +name = "proc-macro2" +version = "1.0.107" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "proc-macro2-diagnostics" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af066a9c399a26e020ada66a034357a868728e72cd426f3adcd35f80d88d88c8" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", + "version_check", + "yansi", +] + +[[package]] +name = "prolly-map" +version = "0.7.2" +dependencies = [ + "futures-util", + "js-sys", + "mimalloc", + "rayon", + "serde", + "serde_cbor", + "serde_json", + "sha2", + "xxhash-rust", +] + +[[package]] +name = "prolly-store-slatedb" +version = "0.5.1" +dependencies = [ + "futures-util", + "prolly-map", + "prolly-store-test", + "slatedb", + "tokio", +] + +[[package]] +name = "prolly-store-test" +version = "0.1.0" +dependencies = [ + "prolly-map", +] + +[[package]] +name = "quick-xml" +version = "0.41.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e660451e55124f798a69a5af3f49ccfbefbd41910eefd25caf2393e1f3473ec1" +dependencies = [ + "memchr", + "serde", +] + +[[package]] +name = "quinn" +version = "0.11.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c1a41e437b6bbd489372cd4971de128e85c855f56c57f283d20ff016cf7c0a8" +dependencies = [ + "bytes", + "cfg_aliases", + "pin-project-lite", + "quinn-proto", + "quinn-udp", + "rustc-hash", + "rustls", + "socket2", + "thiserror 2.0.20", + "tokio", + "tracing", + "web-time", +] + +[[package]] +name = "quinn-proto" +version = "0.11.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f4bfc015262b9df63c8845072ce59068853ff5872180c2ce2f13038b970e560" +dependencies = [ + "aws-lc-rs", + "bytes", + "getrandom 0.4.3", + "lru-slab", + "rand 0.10.2", + "rand_pcg", + "ring", + "rustc-hash", + "rustls", + "rustls-pki-types", + "slab", + "thiserror 2.0.20", + "tinyvec", + "tracing", + "web-time", +] + +[[package]] +name = "quinn-udp" +version = "0.5.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35a133f956daabe89a61a685c2649f13d82d5aa4bd5d12d1277e1072a21c0694" +dependencies = [ + "cfg_aliases", + "libc", + "once_cell", + "socket2", + "tracing", + "windows-sys 0.52.0", +] + +[[package]] +name = "quote" +version = "1.0.47" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "r-efi" +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.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9ef1d0d795eb7d84685bca4f72f3649f064e6641543d3a8c415898726a57b41" +dependencies = [ + "rand_chacha", + "rand_core 0.9.5", +] + +[[package]] +name = "rand" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7f5fa3a058cd35567ef9bfa5e75732bee0f9e4c55fa90477bef2dfcdbc4be80" +dependencies = [ + "chacha20", + "getrandom 0.4.3", + "rand_core 0.10.1", +] + +[[package]] +name = "rand_chacha" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" +dependencies = [ + "ppv-lite86", + "rand_core 0.9.5", +] + +[[package]] +name = "rand_core" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76afc826de14238e6e8c374ddcc1fa19e374fd8dd986b0d2af0d02377261d83c" +dependencies = [ + "getrandom 0.3.4", +] + +[[package]] +name = "rand_core" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63b8176103e19a2643978565ca18b50549f6101881c443590420e4dc998a3c69" + +[[package]] +name = "rand_pcg" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "caa0f4137e1c0a72f4c651489402276c8e8e1cf081f3b0ba156d2cbeef09e86a" +dependencies = [ + "rand_core 0.10.1", +] + +[[package]] +name = "rand_xoshiro" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f703f4665700daf5512dcca5f43afa6af89f09db47fb56be587f80636bda2d41" +dependencies = [ + "rand_core 0.9.5", +] + +[[package]] +name = "rayon" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb39b166781f92d482534ef4b4b1b2568f42613b53e5b6c160e24cfbfa30926d" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22e18b0f0062d30d4230b2e85ff77fdfe4326feb054b9783a3460d8435c8ab91" +dependencies = [ + "crossbeam-deque", + "crossbeam-utils", +] + +[[package]] +name = "redox_syscall" +version = "0.5.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" +dependencies = [ + "bitflags", +] + +[[package]] +name = "reqwest" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "219c5811de6525e5416c7d5d53bb656d3afdbc6c5af816e0802bcfa42dbdc1c3" +dependencies = [ + "base64", + "bytes", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "http-body-util", + "hyper", + "hyper-rustls", + "hyper-util", + "js-sys", + "log", + "percent-encoding", + "pin-project-lite", + "quinn", + "rustls", + "rustls-pki-types", + "rustls-platform-verifier", + "sync_wrapper", + "tokio", + "tokio-rustls", + "tokio-util", + "tower", + "tower-http", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "wasm-streams", + "web-sys", +] + +[[package]] +name = "ring" +version = "0.17.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" +dependencies = [ + "cc", + "cfg-if", + "getrandom 0.2.17", + "libc", + "untrusted", + "windows-sys 0.52.0", +] + +[[package]] +name = "rust_decimal" +version = "1.42.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be2a24f50780bc85f09cc6ac299bdf1424302742d77221106859c9d8b102126a" +dependencies = [ + "arrayvec", + "num-traits", +] + +[[package]] +name = "rustc-hash" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b1e7f9a428571be2dc5bc0505c13fb6bf936822b894ec87abf8a08a4e51742d" + +[[package]] +name = "rustc_version" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" +dependencies = [ + "semver", +] + +[[package]] +name = "rustix" +version = "1.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190" +dependencies = [ + "bitflags", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.52.0", +] + +[[package]] +name = "rustls" +version = "0.23.43" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0283386ce02abc0151e1761d08802dfe86c173b0b494af5cbc086574e453da06" +dependencies = [ + "aws-lc-rs", + "once_cell", + "rustls-pki-types", + "rustls-webpki", + "subtle", + "zeroize", +] + +[[package]] +name = "rustls-native-certs" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dab5152771c58876a2146916e53e35057e1a4dfa2b9df0f0305b07f611fdea4d" +dependencies = [ + "openssl-probe", + "rustls-pki-types", + "schannel", + "security-framework", +] + +[[package]] +name = "rustls-pki-types" +version = "1.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f4925028c7eb5d1fcdaf196971378ed9d2c1c4efc7dc5d011256f76c99c0a96" +dependencies = [ + "web-time", + "zeroize", +] + +[[package]] +name = "rustls-platform-verifier" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26d1e2536ce4f35f4846aa13bff16bd0ff40157cdb14cc056c7b14ba41233ba0" +dependencies = [ + "core-foundation", + "core-foundation-sys", + "jni", + "log", + "once_cell", + "rustls", + "rustls-native-certs", + "rustls-platform-verifier-android", + "rustls-webpki", + "security-framework", + "security-framework-sys", + "webpki-root-certs", + "windows-sys 0.52.0", +] + +[[package]] +name = "rustls-platform-verifier-android" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f87165f0995f63a9fbeea62b64d10b4d9d8e78ec6d7d51fb2125fda7bb36788f" + +[[package]] +name = "rustls-webpki" +version = "0.103.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0527518605e68109d875e248ea259b6758801cf165e4b2c2733ae3b51f12535a" +dependencies = [ + "aws-lc-rs", + "ring", + "rustls-pki-types", + "untrusted", +] + +[[package]] +name = "rustversion" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf54715a573b99ac80df0bc206da022bcd442c974952c7b9720069370852e21f" + +[[package]] +name = "ryu" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f" + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "schannel" +version = "0.1.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91c1b7e4904c873ef0710c1f407dde2e6287de2bebc1bbbf7d430bb7cbffd939" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "security-framework" +version = "3.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7f4bc775c73d9a02cde8bf7b2ec4c9d12743edf609006c7facc23998404cd1d" +dependencies = [ + "bitflags", + "core-foundation", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework-sys" +version = "2.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce2691df843ecc5d231c0b14ece2acc3efb62c0a398c7e1d875f3983ce020e3" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "semver" +version = "1.0.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd" + +[[package]] +name = "serde" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4148590afebada386688f18773da617792bf2ef03ffc1e4cbd2b1d45b023e0ba" +dependencies = [ + "serde_core", + "serde_derive", +] + +[[package]] +name = "serde_cbor" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bef2ebfde456fb76bbcf9f59315333decc4fda0b2b44b420243c11e0f5ec1f5" +dependencies = [ + "half", + "serde", +] + +[[package]] +name = "serde_core" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67dca2c9c51e58a4791a4b1ed58308b39c64224d349a935ab5039aa360942a48" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.3", +] + +[[package]] +name = "serde_json" +version = "1.0.151" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c841b55ecdae098c80dcae9cf767f6f8a0c2cdb3416bbef72181df4d0fe73f14" +dependencies = [ + "itoa", + "memchr", + "serde", + "serde_core", + "zmij", +] + +[[package]] +name = "serde_spanned" +version = "0.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf41e0cfaf7226dca15e8197172c295a782857fcb97fad1808a166870dee75a3" +dependencies = [ + "serde", +] + +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "serde_yaml" +version = "0.9.34+deprecated" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" +dependencies = [ + "indexmap", + "itoa", + "ryu", + "serde", + "unsafe-libyaml", +] + +[[package]] +name = "sha2" +version = "0.10.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" +dependencies = [ + "cfg-if", + "cpufeatures 0.2.17", + "digest 0.10.7", + "sha2-asm", +] + +[[package]] +name = "sha2-asm" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b845214d6175804686b2bd482bcffe96651bb2d1200742b712003504a2dac1ab" +dependencies = [ + "cc", +] + +[[package]] +name = "shlex" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8fadd59c855ef2080decdef8ff161eb6661b86933c9d82e5ba29dc602a55aba" + +[[package]] +name = "signal-hook-registry" +version = "1.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4db69cba1110affc0e9f7bcd48bbf87b3f4fc7c61fc9155afd4c469eb3d6c1b" +dependencies = [ + "errno", + "libc", +] + +[[package]] +name = "simd_cesu8" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11031e251abf8611c80f460e19dbdeb54a66db918e49c65a7065b46ac7aec520" +dependencies = [ + "rustc_version", + "simdutf8", +] + +[[package]] +name = "simdutf8" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e" + +[[package]] +name = "siphasher" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ee5873ec9cce0195efcb7a4e9507a04cd49aec9c83d0389df45b1ef7ba2e649" + +[[package]] +name = "slab" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" + +[[package]] +name = "slatedb" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6aba890a8fc5d2a3d283a77cfe712c0f27f0501bd75b07e14dece2dfc2cde86" +dependencies = [ + "async-channel", + "async-trait", + "atomic", + "backon", + "bitflags", + "bytes", + "chrono", + "crc32fast", + "crossbeam-skiplist", + "dotenvy", + "duration-str", + "fail-parallel", + "figment", + "flatbuffers", + "foyer", + "futures", + "log", + "lru", + "object_store", + "ouroboros", + "parking_lot", + "rand 0.9.5", + "serde", + "serde_json", + "siphasher", + "slatedb-common", + "slatedb-txn-obj", + "smallvec", + "sysinfo", + "thiserror 1.0.69", + "tokio", + "tokio-util", + "tracing", + "ulid", + "url", + "uuid", + "walkdir", +] + +[[package]] +name = "slatedb-common" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f3fdad5676b104bec5daa2f367bdb340f4162ef3c1ead16da903297f235fb49" +dependencies = [ + "chrono", + "log", + "object_store", + "rand 0.9.5", + "rand_xoshiro", + "serde", + "thread_local", + "tokio", +] + +[[package]] +name = "slatedb-txn-obj" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5df001443952d76ae7380536b4a050f88b3cc9a7d3dce0f3782ea7ae9a12c29c" +dependencies = [ + "async-trait", + "bytes", + "chrono", + "futures", + "log", + "object_store", + "parking_lot", + "slatedb-common", + "thiserror 1.0.69", +] + +[[package]] +name = "small_ctor" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88414a5ca1f85d82cc34471e975f0f74f6aa54c40f062efa42c0080e7f763f81" + +[[package]] +name = "smallvec" +version = "1.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ed6a63f02c8539c91a8685a86f4099661ba3da017932f6ebbea6de3f0fa7c90" + +[[package]] +name = "socket2" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3d1e2c7f27f8d4cb10542a02c49005dbd6e93095799d6f3be745fae9f8fedd4" +dependencies = [ + "libc", + "windows-sys 0.61.2", +] + +[[package]] +name = "spin" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "023a211cb3138dbc438680b32560ad89f699977624c9f8dbb95a47d5b4c07dd3" + +[[package]] +name = "stable_deref_trait" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + +[[package]] +name = "subtle" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" + +[[package]] +name = "syn" +version = "2.0.119" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "872831b642d1a07999a962a351ed35b955ea2cfc8f3862091e2a240a84f17297" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "3.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53e9bae58849f64dfa4f5d5ae372c8341f7305f82a3868709269343628b659a3" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "sync_wrapper" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" +dependencies = [ + "futures-core", +] + +[[package]] +name = "synstructure" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "sysinfo" +version = "0.35.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c3ffa3e4ff2b324a57f7aeb3c349656c7b127c3c189520251a648102a92496e" +dependencies = [ + "libc", + "memchr", + "ntapi", + "objc2-core-foundation", + "objc2-io-kit", + "windows", +] + +[[package]] +name = "thiserror" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +dependencies = [ + "thiserror-impl 1.0.69", +] + +[[package]] +name = "thiserror" +version = "2.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec86235f5fcc2a73650310756d2ac5b138a5780bbbdfae3eeccec992c435ba4f" +dependencies = [ + "thiserror-impl 2.0.20", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "thiserror-impl" +version = "2.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc04cd3e1236dd4a98afca4569f2deb3f120e5422a4023be2cb683f8486292af" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.3", +] + +[[package]] +name = "thread_local" +version = "1.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ad99c4c6d32803332c548b1af0540b357b3f5fc0be8f6c6bfe8b2e6ae784070" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "time" +version = "0.3.55" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdb87b95ec50ddfa440816d227a17b2ccbdda963a316a727fda0fc4334f7d134" +dependencies = [ + "deranged", + "num-conv", + "powerfmt", + "time-core", +] + +[[package]] +name = "time-core" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e1c906769ad99c88eaa54e728060edef082f8e358ff32030cb7c7d315e81109" + +[[package]] +name = "tinystr" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8323304221c2a851516f22236c5722a72eaa19749016521d6dff0824447d96d" +dependencies = [ + "displaydoc", + "zerovec", +] + +[[package]] +name = "tinyvec" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb4ebadaa0af04fab11ae01eb5f9fdb5f9c5b875506e210e71c07873528baa7f" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + +[[package]] +name = "tokio" +version = "1.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "202caea871b69668250d242070849eb495be178ed697a3e98aebce5bc81a0bed" +dependencies = [ + "bytes", + "libc", + "mio", + "pin-project-lite", + "signal-hook-registry", + "socket2", + "tokio-macros", + "windows-sys 0.61.2", +] + +[[package]] +name = "tokio-macros" +version = "2.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78773a2a397f451582ce068015985c33193cf6dea8b74d2a639fe457b2f07b0e" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.3", +] + +[[package]] +name = "tokio-rustls" +version = "0.26.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1729aa945f29d91ba541258c8df89027d5792d85a8841fb65e8bf0f4ede4ef61" +dependencies = [ + "rustls", + "tokio", +] + +[[package]] +name = "tokio-util" +version = "0.7.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "494815d09bf52b5548659851081238f0ca39ff638363907596da739561c62c52" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "futures-util", + "hashbrown 0.15.5", + "libc", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "toml" +version = "0.8.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc1beb996b9d83529a9e75c17a1686767d148d70663143c7854d8b4a09ced362" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit", +] + +[[package]] +name = "toml_datetime" +version = "0.6.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22cddaf88f4fbc13c51aebbf5f8eceb5c7c5a9da2ac40a13519eb5b0a0e8f11c" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_edit" +version = "0.22.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a" +dependencies = [ + "indexmap", + "serde", + "serde_spanned", + "toml_datetime", + "toml_write", + "winnow 0.7.15", +] + +[[package]] +name = "toml_write" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d99f8c9a7727884afe522e9bd5edbfc91a3312b36a77b5fb8926e4c31a41801" + +[[package]] +name = "tower" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebe5ef63511595f1344e2d5cfa636d973292adc0eec1f0ad45fae9f0851ab1d4" +dependencies = [ + "futures-core", + "futures-util", + "pin-project-lite", + "sync_wrapper", + "tokio", + "tower-layer", + "tower-service", +] + +[[package]] +name = "tower-http" +version = "0.6.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cfcf7e2740e6fc6d4d688b4ef00650406bb94adf4731e43c096c3a19fe40840" +dependencies = [ + "bitflags", + "bytes", + "futures-util", + "http", + "http-body", + "pin-project-lite", + "tower", + "tower-layer", + "tower-service", + "url", +] + +[[package]] +name = "tower-layer" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" + +[[package]] +name = "tower-service" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" + +[[package]] +name = "tracing" +version = "0.1.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" +dependencies = [ + "log", + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "tracing-core" +version = "0.1.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a" +dependencies = [ + "once_cell", +] + +[[package]] +name = "try-lock" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" + +[[package]] +name = "twox-hash" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8464ec13c3691491391d9fce00f6416c9a48e46972f72d7865688be2080192c9" +dependencies = [ + "rand 0.10.2", +] + +[[package]] +name = "typenum" +version = "1.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6f5e870be6c3b371b77fe0ee0bafb859fa4964b4404c27de1d380043c4dda20" + +[[package]] +name = "ulid" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "470dbf6591da1b39d43c14523b2b469c86879a53e8b758c8e090a470fe7b1fbe" +dependencies = [ + "rand 0.9.5", + "serde", + "web-time", +] + +[[package]] +name = "uncased" +version = "0.9.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1b88fcfe09e89d3866a5c11019378088af2d24c3fbd4f0543f96b479ec90697" +dependencies = [ + "version_check", +] + +[[package]] +name = "unicode-ident" +version = "1.0.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" + +[[package]] +name = "unsafe-libyaml" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861" + +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + +[[package]] +name = "url" +version = "2.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff67a8a4397373c3ef660812acab3268222035010ab8680ec4215f38ba3d0eed" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", + "serde", +] + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + +[[package]] +name = "uuid" +version = "1.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf3923a6f5c4c6382e0b653c4117f48d631ea17f38ed86e2a828e6f7412f5239" +dependencies = [ + "getrandom 0.4.3", + "js-sys", + "serde_core", + "wasm-bindgen", +] + +[[package]] +name = "version_check" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" + +[[package]] +name = "walkdir" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +dependencies = [ + "same-file", + "winapi-util", +] + +[[package]] +name = "want" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" +dependencies = [ + "try-lock", +] + +[[package]] +name = "wasi" +version = "0.11.1+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" + +[[package]] +name = "wasip2" +version = "1.0.4+wasi-0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b67efb37e106e55ce722a510d6b5f9c17f083e5fc79afc2badeb12cc313d9487" +dependencies = [ + "wit-bindgen", +] + +[[package]] +name = "wasm-bindgen" +version = "0.2.127" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b70935747edd64d89de3efa29d73789b806c15798f8e7dca4d8ac356b50ce70" +dependencies = [ + "cfg-if", + "once_cell", + "rustversion", + "wasm-bindgen-macro", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.77" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b7777d5cc23d0e91404e53ce2d5e8ec7acae3026b16233dba62cd3246457950" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.127" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77775f8f3f7217702089053b94958f8f54061a3f663417df76e19cbdcca29bc1" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.127" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e11d33f857dc2fb11b8bc75aee111aa9cbeb12cd9f25efd3d4c2a3dd4e235284" +dependencies = [ + "bumpalo", + "proc-macro2", + "quote", + "syn 2.0.119", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.127" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ef64dbcc55df09c7e5a46182d181c2cfa3e925f3da937ea764728b4bbb9dcbf" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "wasm-streams" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d1ec4f6517c9e11ae630e200b2b65d193279042e28edd4a2cda233e46670bbb" +dependencies = [ + "futures-util", + "js-sys", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "web-sys" +version = "0.3.104" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c435338968042f4f59a557f690a253676d47ce13ceb55d70100e7facf6620a30" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "web-time" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "webpki-root-certs" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b96554aa2acc8ccdb7e1c9a58a7a68dd5d13bccc69cd124cb09406db612a1c9b" +dependencies = [ + "rustls-pki-types", +] + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" +dependencies = [ + "windows-sys 0.52.0", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows" +version = "0.61.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9babd3a767a4c1aef6900409f85f5d53ce2544ccdfaa86dad48c91782c6d6893" +dependencies = [ + "windows-collections", + "windows-core 0.61.2", + "windows-future", + "windows-link 0.1.3", + "windows-numerics", +] + +[[package]] +name = "windows-collections" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3beeceb5e5cfd9eb1d76b381630e82c4241ccd0d27f1a39ed41b2760b255c5e8" +dependencies = [ + "windows-core 0.61.2", +] + +[[package]] +name = "windows-core" +version = "0.61.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3" +dependencies = [ + "windows-implement", + "windows-interface", + "windows-link 0.1.3", + "windows-result 0.3.4", + "windows-strings 0.4.2", +] + +[[package]] +name = "windows-core" +version = "0.62.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb" +dependencies = [ + "windows-implement", + "windows-interface", + "windows-link 0.2.1", + "windows-result 0.4.1", + "windows-strings 0.5.1", +] + +[[package]] +name = "windows-future" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc6a41e98427b19fe4b73c550f060b59fa592d7d686537eebf9385621bfbad8e" +dependencies = [ + "windows-core 0.61.2", + "windows-link 0.1.3", + "windows-threading", +] + +[[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 2.0.119", +] + +[[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 2.0.119", +] + +[[package]] +name = "windows-link" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a" + +[[package]] +name = "windows-link" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" + +[[package]] +name = "windows-numerics" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9150af68066c4c5c07ddc0ce30421554771e528bde427614c61038bc2c92c2b1" +dependencies = [ + "windows-core 0.61.2", + "windows-link 0.1.3", +] + +[[package]] +name = "windows-result" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6" +dependencies = [ + "windows-link 0.1.3", +] + +[[package]] +name = "windows-result" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5" +dependencies = [ + "windows-link 0.2.1", +] + +[[package]] +name = "windows-strings" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57" +dependencies = [ + "windows-link 0.1.3", +] + +[[package]] +name = "windows-strings" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091" +dependencies = [ + "windows-link 0.2.1", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-sys" +version = "0.61.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" +dependencies = [ + "windows-link 0.2.1", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_gnullvm", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows-threading" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b66463ad2e0ea3bbf808b7f1d371311c80e115c0b71d60efc142cafbcfb057a6" +dependencies = [ + "windows-link 0.1.3", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "winnow" +version = "0.6.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e90edd2ac1aa278a5c4599b1d89cf03074b610800f866d4026dc199d7929a28" +dependencies = [ + "memchr", +] + +[[package]] +name = "winnow" +version = "0.7.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df79d97927682d2fd8adb29682d1140b343be4ac0f08fd68b7765d9c059d3945" +dependencies = [ + "memchr", +] + +[[package]] +name = "wit-bindgen" +version = "0.57.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e" + +[[package]] +name = "writeable" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ffae5123b2d3fc086436f8834ae3ab053a283cfac8fe0a0b8eaae044768a4c4" + +[[package]] +name = "xxhash-rust" +version = "0.8.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aee1b19627c7c60102ab80d3a9cbe18de90bfe03bfa6c3715447681f0e8c8af6" + +[[package]] +name = "yansi" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfe53a6657fd280eaa890a3bc59152892ffa3e30101319d168b781ed6529b049" + +[[package]] +name = "yoke" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "709fe23a0424b6a435d82152b1bd3fdfb0833487d5fa90d05d42762a9891fef5" +dependencies = [ + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de844c262c8848816172cef550288e7dc6c7b7814b4ee56b3e1553f275f1858e" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", + "synstructure", +] + +[[package]] +name = "zerocopy" +version = "0.8.56" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "556764e583adb45a9f8d413c2a147fa7e8d821e48e12b14fd560b607998b75eb" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.8.56" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2ab42fc20575779bd240faa45f94a74256f755c0fa9e89f0ede20d91d0cdfc1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "zerofrom" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ec05a11813ea801ff6d75110ad09cd0824ddba17dfe17128ea0d5f68e6c5272" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11532158c46691caf0f2593ea8358fed6bbf68a0315e80aae9bd41fbade684a1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", + "synstructure", +] + +[[package]] +name = "zeroize" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e13c156562582aa81c60cb29407084cdb54c4164760106ab78e6c5b0858cf64e" + +[[package]] +name = "zerotrie" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f9152d31db0792fa83f70fb2f83148effb5c1f5b8c7686c3459e361d9bc20bf" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", +] + +[[package]] +name = "zerovec" +version = "0.11.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90f911cbc359ab6af17377d242225f4d75119aec87ea711a880987b18cd7b239" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "625dc425cab0dca6dc3c3319506e6593dcb08a9f387ea3b284dbd52a92c40555" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "zmij" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b" + +[[package]] +name = "zstd" +version = "0.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e91ee311a569c327171651566e07972200e76fcfe2242a4fa446149a3881c08a" +dependencies = [ + "zstd-safe", +] + +[[package]] +name = "zstd-safe" +version = "7.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f49c4d5f0abb602a93fb8736af2a4f4dd9512e36f7f570d66e65ff867ed3b9d" +dependencies = [ + "zstd-sys", +] + +[[package]] +name = "zstd-sys" +version = "2.0.16+zstd.1.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e19ebc2adc8f83e43039e79776e3fda8ca919132d68a1fed6a5faca2683748" +dependencies = [ + "cc", + "pkg-config", +] diff --git a/tests/proximity_turboquant.rs b/tests/proximity_turboquant.rs new file mode 100644 index 00000000..9cd3b698 --- /dev/null +++ b/tests/proximity_turboquant.rs @@ -0,0 +1,2341 @@ +use prolly::{ + copy_content_graph, plan_content_gc, sweep_content_gc, walk_content_graph, AcceleratorCatalog, + AcceleratorSet, BatchOp, BuildParallelism, ContentGraphLimits, ContentObjectKind, + DistanceMetric, MemStore, NodePublication, ProximityConfig, ProximityFilter, ProximityMap, + ProximityRecord, SearchBackend, SearchBudget, SearchCompletion, SearchPolicy, SearchRequest, + Store, TurboQuantizationBuildLimits, TurboQuantizationConfig, TurboQuantizer, TypedContentRoot, +}; +use std::io; +use std::sync::atomic::{AtomicUsize, Ordering}; +use std::sync::Arc; + +#[cfg(feature = "async-store")] +#[derive(Clone)] +struct PublicationBoundAsyncStore { + inner: Arc, + publications: Arc, + maximum_batch: Arc, +} + +#[cfg(feature = "async-store")] +impl PublicationBoundAsyncStore { + fn new(inner: Arc) -> Self { + Self { + inner, + publications: Arc::new(AtomicUsize::new(0)), + maximum_batch: Arc::new(AtomicUsize::new(0)), + } + } +} + +#[cfg(feature = "async-store")] +impl prolly::AsyncStore for PublicationBoundAsyncStore { + type Error = prolly::MemStoreError; + + async fn get(&self, key: &[u8]) -> Result>, Self::Error> { + Store::get(&self.inner, key) + } + + async fn put(&self, key: &[u8], value: &[u8]) -> Result<(), Self::Error> { + Store::put(&self.inner, key, value) + } + + async fn delete(&self, key: &[u8]) -> Result<(), Self::Error> { + Store::delete(&self.inner, key) + } + + async fn batch(&self, ops: &[BatchOp<'_>]) -> Result<(), Self::Error> { + Store::batch(&self.inner, ops) + } + + async fn publish_nodes(&self, publication: NodePublication<'_>) -> Result<(), Self::Error> { + self.publications.fetch_add(1, Ordering::SeqCst); + self.maximum_batch + .fetch_max(publication.entries().len(), Ordering::SeqCst); + Store::publish_nodes(&self.inner, publication) + } +} + +#[cfg(feature = "async-store")] +#[derive(Clone)] +struct CancellingReadAsyncStore { + inner: Arc, + reads: Arc, + cancel_after: Arc, + cancellation: prolly::CancellationToken, +} + +#[cfg(feature = "async-store")] +impl CancellingReadAsyncStore { + fn new(inner: Arc, cancellation: prolly::CancellationToken) -> Self { + Self { + inner, + reads: Arc::new(AtomicUsize::new(0)), + cancel_after: Arc::new(AtomicUsize::new(usize::MAX)), + cancellation, + } + } + + fn arm(&self, read: usize) { + assert!(read > 0); + self.reads.store(0, Ordering::SeqCst); + self.cancel_after.store(read, Ordering::SeqCst); + } + + fn reset_reads(&self) { + self.reads.store(0, Ordering::SeqCst); + self.cancel_after.store(usize::MAX, Ordering::SeqCst); + } + + fn reads(&self) -> usize { + self.reads.load(Ordering::SeqCst) + } + + fn after_read(&self) { + let read = self.reads.fetch_add(1, Ordering::SeqCst) + 1; + if read == self.cancel_after.load(Ordering::SeqCst) { + self.cancellation.cancel(); + } + } +} + +#[cfg(feature = "async-store")] +impl prolly::AsyncStore for CancellingReadAsyncStore { + type Error = prolly::MemStoreError; + + async fn get(&self, key: &[u8]) -> Result>, Self::Error> { + let result = Store::get(&self.inner, key); + self.after_read(); + result + } + + async fn put(&self, key: &[u8], value: &[u8]) -> Result<(), Self::Error> { + Store::put(&self.inner, key, value) + } + + async fn delete(&self, key: &[u8]) -> Result<(), Self::Error> { + Store::delete(&self.inner, key) + } + + async fn batch(&self, ops: &[BatchOp<'_>]) -> Result<(), Self::Error> { + Store::batch(&self.inner, ops) + } +} + +const NO_FAULT: usize = usize::MAX; + +#[derive(Default)] +struct FaultControl { + reads: AtomicUsize, + publications: AtomicUsize, + fail_read_at: AtomicUsize, + fail_publication_at: AtomicUsize, +} + +impl FaultControl { + fn reset(&self) { + self.reads.store(0, Ordering::SeqCst); + self.publications.store(0, Ordering::SeqCst); + self.fail_read_at.store(NO_FAULT, Ordering::SeqCst); + self.fail_publication_at.store(NO_FAULT, Ordering::SeqCst); + } + + fn fail_read(&self, operation: usize) { + self.reset(); + self.fail_read_at.store(operation, Ordering::SeqCst); + } + + fn fail_publication(&self, operation: usize) { + self.reset(); + self.fail_publication_at.store(operation, Ordering::SeqCst); + } + + fn before_read(&self) -> io::Result<()> { + let operation = self.reads.fetch_add(1, Ordering::SeqCst) + 1; + if operation == self.fail_read_at.load(Ordering::SeqCst) { + Err(io::Error::other("injected TurboQuant read failure")) + } else { + Ok(()) + } + } + + fn before_publication(&self) -> io::Result<()> { + let operation = self.publications.fetch_add(1, Ordering::SeqCst) + 1; + if operation == self.fail_publication_at.load(Ordering::SeqCst) { + Err(io::Error::other("injected TurboQuant publication failure")) + } else { + Ok(()) + } + } +} + +#[derive(Clone)] +struct FaultStore { + inner: Arc, + control: Arc, +} + +impl FaultStore { + fn new() -> Self { + let control = Arc::new(FaultControl::default()); + control.reset(); + Self { + inner: Arc::new(MemStore::new()), + control, + } + } +} + +impl Store for FaultStore { + type Error = io::Error; + + fn get(&self, key: &[u8]) -> Result>, Self::Error> { + self.control.before_read()?; + Store::get(&*self.inner, key).map_err(|error| io::Error::other(error.to_string())) + } + + fn put(&self, key: &[u8], value: &[u8]) -> Result<(), Self::Error> { + Store::put(&*self.inner, key, value).map_err(|error| io::Error::other(error.to_string())) + } + + fn delete(&self, key: &[u8]) -> Result<(), Self::Error> { + Store::delete(&*self.inner, key).map_err(|error| io::Error::other(error.to_string())) + } + + fn batch(&self, operations: &[BatchOp<'_>]) -> Result<(), Self::Error> { + Store::batch(&*self.inner, operations).map_err(|error| io::Error::other(error.to_string())) + } + + fn publish_nodes(&self, publication: NodePublication<'_>) -> Result<(), Self::Error> { + self.control.before_publication()?; + Store::publish_nodes(&*self.inner, publication) + .map_err(|error| io::Error::other(error.to_string())) + } +} + +fn records(count: usize, dimensions: usize) -> Vec { + (0..count) + .map(|record| ProximityRecord { + key: format!("vector-{record:04}").into_bytes(), + vector: (0..dimensions) + .map(|dimension| { + let base = ((record * 31 + dimension * 17) % 257) as f32 / 19.0; + if record == 0 { + 0.0 + } else { + base - 6.0 + } + }) + .collect(), + value: record.to_le_bytes().to_vec(), + }) + .collect() +} + +fn forced_turboquant_request(query: &[f32], k: usize) -> SearchRequest<'_> { + let mut request = SearchRequest::exact(query, k); + request.policy = SearchPolicy::FixedBudget; + request.options.backend = SearchBackend::TurboQuantized; + request +} + +fn assert_every_cold_read_fails(control: &FaultControl, operation: F) -> usize +where + F: Fn() -> Result<(), prolly::Error>, +{ + control.reset(); + operation().expect("unfaulted operation must succeed"); + let reads = control.reads.load(Ordering::SeqCst); + assert!( + reads > 0, + "operation must cross at least one store read boundary" + ); + for fail_at in 1..=reads { + control.fail_read(fail_at); + let error = operation().expect_err("injected read must fail closed"); + assert!( + matches!(error, prolly::Error::Store(_)), + "read {fail_at}/{reads} returned the wrong error: {error:?}", + ); + assert!( + control.reads.load(Ordering::SeqCst) >= fail_at, + "fault boundary {fail_at}/{reads} was not reached", + ); + } + control.reset(); + reads +} + +#[test] +fn turboquant_is_canonical_bounded_verified_and_exhaustively_reranked() { + for metric in [ + DistanceMetric::L2Squared, + DistanceMetric::Cosine, + DistanceMetric::InnerProduct, + ] { + let store = Arc::new(MemStore::new()); + let mut map_config = ProximityConfig::new(128); + map_config.metric = metric; + let mut source = records(193, 128); + if metric == DistanceMetric::Cosine { + source[0].vector[0] = 1.0; + } + let map = ProximityMap::build(store.clone(), map_config, source).unwrap(); + let config = TurboQuantizationConfig { + bit_width: 4, + rerank_multiplier: 256, + seed: 0x5eed, + }; + let (serial, serial_stats) = + TurboQuantizer::build(&map, config.clone(), BuildParallelism::serial()).unwrap(); + assert_eq!(serial_stats.encoded_vectors, 193); + assert_eq!( + serial_stats.zero_vectors, + usize::from(metric != DistanceMetric::Cosine), + ); + assert_eq!(serial_stats.encoded_output_bytes, 193 * (8 + 64)); + assert_eq!(serial.verify(&map).unwrap().quality, serial.quality()); + + for threads in [2, 4] { + let (parallel, stats) = TurboQuantizer::build( + &map, + config.clone(), + BuildParallelism::new(threads).unwrap(), + ) + .unwrap(); + assert_eq!(parallel.manifest_cid(), serial.manifest_cid()); + assert_eq!(parallel.quality(), serial.quality()); + assert_eq!(stats, serial_stats); + } + + assert!(matches!( + TurboQuantizer::build_with_limits( + &map, + config.clone(), + BuildParallelism::serial(), + TurboQuantizationBuildLimits { + max_encoded_output_bytes: Some(1), + ..Default::default() + }, + ), + Err(prolly::Error::ProximityResourceLimitExceeded { .. }) + )); + + let loaded = TurboQuantizer::load(store.clone(), serial.manifest_cid().clone()).unwrap(); + let query: Vec<_> = (0..128).map(|index| index as f32 / 23.0 - 2.0).collect(); + let mut exact_request = SearchRequest::exact(&query, 17); + exact_request.filter = ProximityFilter::Prefix(b"vector-0"); + let exact = map.search(exact_request).unwrap(); + + let mut accelerated_request = SearchRequest::exact(&query, 17); + accelerated_request.policy = SearchPolicy::FixedBudget; + accelerated_request.options.backend = SearchBackend::TurboQuantized; + accelerated_request.filter = ProximityFilter::Prefix(b"vector-0"); + let accelerated = loaded.search(&map, accelerated_request).unwrap(); + assert_eq!(accelerated.neighbors, exact.neighbors); + assert_eq!(accelerated.plan.backend, SearchBackend::TurboQuantized); + assert_eq!(accelerated.stats.reranked_candidates, 193); + assert!(accelerated.stats.quantized_distance_evaluations > 0); + } +} + +#[test] +fn turboquant_repeated_equal_errors_persist_valid_quality() { + let store = Arc::new(MemStore::new()); + let mut map_config = ProximityConfig::new(32); + map_config.metric = DistanceMetric::InnerProduct; + let vector = std::iter::once(18.375) + .chain(std::iter::repeat_n(2.375, 31)) + .collect::>(); + let source = (0u64..7) + .map(|record| ProximityRecord { + key: record.to_be_bytes().to_vec(), + vector: vector.clone(), + value: vec![38], + }) + .collect::>(); + let map = ProximityMap::build(store.clone(), map_config.clone(), source.clone()).unwrap(); + let config = TurboQuantizationConfig { + bit_width: 4, + rerank_multiplier: 7, + seed: u64::from_le_bytes([38; 8]), + }; + let (index, _) = + TurboQuantizer::build(&map, config.clone(), BuildParallelism::serial()).unwrap(); + + assert_eq!( + index.quality().mean_squared_error.to_bits(), + index.quality().maximum_squared_error.to_bits(), + ); + assert_eq!(index.verify(&map).unwrap().quality, index.quality()); + let reopened = TurboQuantizer::load(store, index.manifest_cid().clone()).unwrap(); + assert_eq!(reopened.quality(), index.quality()); + + #[cfg(feature = "async-store")] + { + use prolly::{AsyncProximityMap, AsyncTurboQuantizer, SyncStoreAsAsync}; + use std::future::Future; + use std::task::{Context, Poll}; + + fn block_on(future: F) -> F::Output { + let waker = futures_util::task::noop_waker(); + let mut context = Context::from_waker(&waker); + let mut future = Box::pin(future); + loop { + match future.as_mut().poll(&mut context) { + Poll::Ready(value) => return value, + Poll::Pending => std::thread::yield_now(), + } + } + } + + block_on(async { + let backing = Arc::new(MemStore::new()); + let async_store = SyncStoreAsAsync::new(backing); + let async_map = AsyncProximityMap::build(async_store.clone(), map_config, source) + .await + .unwrap(); + let (async_index, _) = + AsyncTurboQuantizer::build(&async_map, config, BuildParallelism::new(2).unwrap()) + .await + .unwrap(); + assert_eq!(async_index.manifest_cid(), index.manifest_cid()); + assert_eq!(async_index.quality(), index.quality()); + assert_eq!( + async_index + .verify(&async_map, &ContentGraphLimits::default()) + .await + .unwrap() + .quality, + index.quality(), + ); + let async_reopened = + AsyncTurboQuantizer::load(&async_store, async_index.manifest_cid().clone()) + .await + .unwrap(); + assert_eq!(async_reopened.quality(), index.quality()); + }); + } +} + +#[test] +fn turboquant_every_build_limit_fails_typed_before_manifest_publication() { + let count = 33usize; + let dimensions = 128usize; + let source = records(count, dimensions); + let config = TurboQuantizationConfig { + bit_width: 4, + rerank_multiplier: 8, + seed: 41, + }; + let oracle_store = Arc::new(MemStore::new()); + let oracle_map = ProximityMap::build( + oracle_store, + ProximityConfig::new(dimensions as u32), + source.clone(), + ) + .unwrap(); + let (oracle, _) = + TurboQuantizer::build(&oracle_map, config.clone(), BuildParallelism::serial()).unwrap(); + let manifest = oracle.manifest_cid().clone(); + let cases = [ + ( + "TurboQuant records", + 1, + TurboQuantizationBuildLimits { + max_records: Some(count - 1), + ..Default::default() + }, + ), + ( + "TurboQuant input bytes", + 1, + TurboQuantizationBuildLimits { + max_input_bytes: Some(1), + ..Default::default() + }, + ), + ( + "TurboQuant temporary bytes", + 1, + TurboQuantizationBuildLimits { + max_temporary_bytes: Some(1), + ..Default::default() + }, + ), + ( + "TurboQuant transform operations", + 1, + TurboQuantizationBuildLimits { + max_transform_operations: Some(1), + ..Default::default() + }, + ), + ( + "TurboQuant encoded output bytes", + 1, + TurboQuantizationBuildLimits { + max_encoded_output_bytes: Some(1), + ..Default::default() + }, + ), + ( + "TurboQuant worker threads", + 2, + TurboQuantizationBuildLimits { + max_worker_threads: Some(1), + ..Default::default() + }, + ), + ]; + + for (resource, workers, limits) in &cases { + let store = Arc::new(MemStore::new()); + let map = ProximityMap::build( + store.clone(), + ProximityConfig::new(dimensions as u32), + source.clone(), + ) + .unwrap(); + let error = match TurboQuantizer::build_with_limits( + &map, + config.clone(), + BuildParallelism::new(*workers).unwrap(), + limits.clone(), + ) { + Err(error) => error, + Ok(_) => panic!("configured TurboQuant limit must fail"), + }; + let prolly::Error::ProximityResourceLimitExceeded { + resource: actual_resource, + limit, + actual, + } = error + else { + panic!("unexpected limit error: {error:?}"); + }; + assert_eq!(actual_resource, *resource); + assert!(actual > limit); + assert!(Store::get(&store, manifest.as_bytes()).unwrap().is_none()); + } + + #[cfg(feature = "async-store")] + { + use prolly::{AsyncProximityMap, AsyncTurboQuantizer, SyncStoreAsAsync}; + use std::future::Future; + use std::task::{Context, Poll}; + + fn block_on(future: F) -> F::Output { + let waker = futures_util::task::noop_waker(); + let mut context = Context::from_waker(&waker); + let mut future = Box::pin(future); + loop { + match future.as_mut().poll(&mut context) { + Poll::Ready(value) => return value, + Poll::Pending => std::thread::yield_now(), + } + } + } + + for (resource, workers, limits) in cases { + let store = Arc::new(MemStore::new()); + block_on(async { + let map = AsyncProximityMap::build( + SyncStoreAsAsync::new(store.clone()), + ProximityConfig::new(dimensions as u32), + source.clone(), + ) + .await + .unwrap(); + let error = match AsyncTurboQuantizer::build_with_limits( + &map, + config.clone(), + BuildParallelism::new(workers).unwrap(), + limits, + 2, + &ContentGraphLimits::default(), + ) + .await + { + Err(error) => error, + Ok(_) => panic!("configured async TurboQuant limit must fail"), + }; + let prolly::Error::ProximityResourceLimitExceeded { + resource: actual_resource, + limit, + actual, + } = error + else { + panic!("unexpected async limit error: {error:?}"); + }; + assert_eq!(actual_resource, resource); + assert!(actual > limit); + assert!(Store::get(&store, manifest.as_bytes()).unwrap().is_none()); + }); + } + } +} + +#[test] +fn turboquant_temporary_limit_adapts_batches_before_encoding() { + let dimensions = 128usize; + let config = TurboQuantizationConfig { + bit_width: 4, + rerank_multiplier: 8, + seed: 43, + }; + let single_store = Arc::new(MemStore::new()); + let single_map = ProximityMap::build( + single_store, + ProximityConfig::new(dimensions as u32), + records(1, dimensions), + ) + .unwrap(); + let (_, single_stats) = + TurboQuantizer::build(&single_map, config.clone(), BuildParallelism::serial()).unwrap(); + + let source = records(257, dimensions); + let sync_store = Arc::new(MemStore::new()); + let sync_map = ProximityMap::build( + sync_store, + ProximityConfig::new(dimensions as u32), + source.clone(), + ) + .unwrap(); + let (oracle, expected_stats) = + TurboQuantizer::build(&sync_map, config.clone(), BuildParallelism::serial()).unwrap(); + let packed_len = (dimensions * usize::from(config.bit_width)).div_ceil(8); + let plan_bytes = 2 * dimensions * (std::mem::size_of::() + std::mem::size_of::()); + let worker_bytes = dimensions * 25 + packed_len; + let encoded_value_bytes = 8 + packed_len; + let algorithm_only_peak = source + .chunks(128) + .map(|batch| { + plan_bytes + + worker_bytes + + batch + .iter() + .map(|record| record.key.len() + dimensions * 4) + .sum::() + + batch.len() * encoded_value_bytes + }) + .max() + .unwrap(); + assert!( + expected_stats.peak_temporary_bytes > algorithm_only_peak, + "tree-builder retention must be included in TurboQuant peak memory" + ); + let temporary_limit = single_stats.peak_temporary_bytes + + 19 * (expected_stats.peak_temporary_bytes - single_stats.peak_temporary_bytes) / 20; + assert!(expected_stats.peak_temporary_bytes > temporary_limit); + let limits = TurboQuantizationBuildLimits { + max_temporary_bytes: Some(temporary_limit), + ..Default::default() + }; + let (bounded, bounded_stats) = TurboQuantizer::build_with_limits( + &sync_map, + config.clone(), + BuildParallelism::serial(), + limits.clone(), + ) + .unwrap(); + assert_eq!(bounded.manifest_cid(), oracle.manifest_cid()); + assert!(bounded_stats.peak_temporary_bytes <= temporary_limit); + assert!(bounded_stats.peak_temporary_bytes < expected_stats.peak_temporary_bytes); + let mut normalized_bounded_stats = bounded_stats.clone(); + normalized_bounded_stats.peak_temporary_bytes = expected_stats.peak_temporary_bytes; + assert_eq!(normalized_bounded_stats, expected_stats); + + #[cfg(feature = "async-store")] + { + use prolly::{AsyncProximityMap, AsyncTurboQuantizer, SyncStoreAsAsync}; + use std::future::Future; + use std::task::{Context, Poll}; + + fn block_on(future: F) -> F::Output { + let waker = futures_util::task::noop_waker(); + let mut context = Context::from_waker(&waker); + let mut future = Box::pin(future); + loop { + match future.as_mut().poll(&mut context) { + Poll::Ready(value) => return value, + Poll::Pending => std::thread::yield_now(), + } + } + } + + let async_store = Arc::new(MemStore::new()); + block_on(async { + let async_map = AsyncProximityMap::build( + SyncStoreAsAsync::new(async_store), + ProximityConfig::new(dimensions as u32), + source, + ) + .await + .unwrap(); + let (async_bounded, async_stats) = AsyncTurboQuantizer::build_with_limits( + &async_map, + config, + BuildParallelism::serial(), + limits, + 2, + &ContentGraphLimits::default(), + ) + .await + .unwrap(); + assert_eq!(async_bounded.manifest_cid(), oracle.manifest_cid()); + assert_eq!(async_stats, bounded_stats); + }); + } +} + +#[test] +fn turboquant_all_supported_codes_and_representative_dimensions_rerank_exactly() { + for dimensions in [8usize, 24, 200] { + for bit_width in [2, 3, 4] { + for metric in [ + DistanceMetric::L2Squared, + DistanceMetric::Cosine, + DistanceMetric::InnerProduct, + ] { + let store = Arc::new(MemStore::new()); + let mut map_config = ProximityConfig::new(dimensions as u32); + map_config.metric = metric; + let mut source = records(33, dimensions); + if metric == DistanceMetric::Cosine { + source[0].vector[0] = 1.0; + } + let map = ProximityMap::build(store, map_config, source).unwrap(); + let (index, stats) = TurboQuantizer::build( + &map, + TurboQuantizationConfig { + bit_width, + rerank_multiplier: 64, + seed: 0x5eed, + }, + BuildParallelism::new(2).unwrap(), + ) + .unwrap(); + assert_eq!( + stats.encoded_output_bytes, + 33 * (8 + (dimensions * bit_width as usize).div_ceil(8)), + ); + let query: Vec<_> = (0..dimensions) + .map(|coordinate| coordinate as f32 / 29.0 - 1.0) + .collect(); + let exact = map.search(SearchRequest::exact(&query, 7)).unwrap(); + let accelerated = index + .search(&map, forced_turboquant_request(&query, 7)) + .unwrap(); + assert_eq!( + accelerated.neighbors, exact.neighbors, + "dimensions={dimensions}, bits={bit_width}, metric={metric:?}", + ); + assert_eq!( + accelerated.completion, + SearchCompletion::ApproximatePolicySatisfied, + ); + assert_eq!(accelerated.stats.reranked_candidates, 33); + } + } + } + + let store = Arc::new(MemStore::new()); + let source = records(65, 128); + let forward = + ProximityMap::build(store.clone(), ProximityConfig::new(128), source.clone()).unwrap(); + let reverse = + ProximityMap::build(store, ProximityConfig::new(128), source.into_iter().rev()).unwrap(); + assert_eq!(forward.tree().descriptor, reverse.tree().descriptor); + let config = TurboQuantizationConfig { + bit_width: 3, + rerank_multiplier: 16, + seed: u64::MAX, + }; + let (forward_index, forward_stats) = + TurboQuantizer::build(&forward, config.clone(), BuildParallelism::serial()).unwrap(); + let (reverse_index, reverse_stats) = + TurboQuantizer::build(&reverse, config, BuildParallelism::new(4).unwrap()).unwrap(); + assert_eq!(forward_index.manifest_cid(), reverse_index.manifest_cid()); + assert_eq!(forward_stats, reverse_stats); +} + +#[test] +fn turboquant_filters_lookup_modes_cache_and_budgets_are_deterministic() { + let store = Arc::new(MemStore::new()); + let map = + ProximityMap::build(store.clone(), ProximityConfig::new(128), records(193, 128)).unwrap(); + let (index, _) = TurboQuantizer::build( + &map, + TurboQuantizationConfig { + rerank_multiplier: 256, + ..TurboQuantizationConfig::default() + }, + BuildParallelism::serial(), + ) + .unwrap(); + let manifest = index.manifest_cid().clone(); + let query: Vec<_> = (0..128) + .map(|coordinate| coordinate as f32 / 31.0 - 1.0) + .collect(); + let eligible: Vec<_> = (0..100) + .map(|record| format!("vector-{record:04}").into_bytes()) + .collect(); + + let mut prefix_request = forced_turboquant_request(&query, 17); + prefix_request.filter = ProximityFilter::Prefix(b"vector-00"); + let prefix = index.search(&map, prefix_request).unwrap(); + assert!(!prefix.plan.direct_lookup); + + let mut eligible_request = forced_turboquant_request(&query, 17); + eligible_request.filter = ProximityFilter::EligibleKeys(&eligible); + let direct = index.search(&map, eligible_request).unwrap(); + assert!(direct.plan.direct_lookup); + assert_eq!(direct.neighbors, prefix.neighbors); + + let mut secondary_request = forced_turboquant_request(&query, 17); + secondary_request.filter = ProximityFilter::SecondaryEligible { + keys: &eligible, + source_directory: &map.tree().directory, + }; + let secondary = index.search(&map, secondary_request).unwrap(); + assert_eq!(secondary.neighbors, direct.neighbors); + + let start = b"vector-0020".as_slice(); + let end = b"vector-0040".as_slice(); + let mut range_request = forced_turboquant_request(&query, 17); + range_request.filter = ProximityFilter::KeyRange { + start: Some(start), + end: Some(end), + }; + let range = index.search(&map, range_request).unwrap(); + let mut exact_range_request = SearchRequest::exact(&query, 17); + exact_range_request.filter = ProximityFilter::KeyRange { + start: Some(start), + end: Some(end), + }; + assert_eq!( + range.neighbors, + map.search(exact_range_request).unwrap().neighbors, + ); + + let cold_index = TurboQuantizer::load(store.clone(), manifest.clone()).unwrap(); + map.clear_content_cache().unwrap(); + let cold = cold_index + .search(&map, forced_turboquant_request(&query, 17)) + .unwrap(); + let warm = cold_index + .search(&map, forced_turboquant_request(&query, 17)) + .unwrap(); + assert_eq!(cold.neighbors, warm.neighbors); + assert_eq!(cold.plan, warm.plan); + assert_eq!(cold.completion, warm.completion); + let mut cold_logical = cold.stats; + let mut warm_logical = warm.stats; + cold_logical.physical_bytes_read = 0; + warm_logical.physical_bytes_read = 0; + assert_eq!(cold_logical, warm_logical); + + let budgeted = |index: &TurboQuantizer>| { + let mut request = forced_turboquant_request(&query, 17); + request.budget = SearchBudget { + max_distance_evaluations: Some(75), + ..SearchBudget::default() + }; + index.search(&map, request).unwrap() + }; + let first = budgeted(&TurboQuantizer::load(store.clone(), manifest.clone()).unwrap()); + let second = budgeted(&TurboQuantizer::load(store, manifest).unwrap()); + assert_eq!(first, second); + assert_eq!(first.completion, SearchCompletion::BudgetExhausted); + assert_eq!(first.stats.quantized_distance_evaluations, 75); + assert_eq!(first.stats.reranked_candidates, 0); +} + +#[test] +fn turboquant_catalog_and_typed_graph_include_complete_closure() { + let store = Arc::new(MemStore::new()); + let map = + ProximityMap::build(store.clone(), ProximityConfig::new(128), records(33, 128)).unwrap(); + let (index, _) = TurboQuantizer::build( + &map, + TurboQuantizationConfig::default(), + BuildParallelism::serial(), + ) + .unwrap(); + let manifest = index.manifest_cid().clone(); + let set = AcceleratorSet::empty() + .with_turboquant(map.tree(), index) + .unwrap(); + let catalog = AcceleratorCatalog::build(store.clone(), map.tree(), set).unwrap(); + let reopened = + AcceleratorCatalog::load(store.clone(), catalog.manifest_cid().clone(), map.tree()) + .unwrap(); + assert_eq!(reopened.entries().len(), 1); + let mut corrupt_catalog = Store::get(&store, catalog.manifest_cid().as_bytes()) + .unwrap() + .unwrap(); + let fingerprint = catalog.entries()[0].configuration_fingerprint.as_bytes(); + let fingerprint_offset = corrupt_catalog + .windows(fingerprint.len()) + .position(|window| window == fingerprint) + .expect("catalog contains the TurboQuant configuration fingerprint"); + corrupt_catalog[fingerprint_offset + fingerprint.len() - 1] ^= 1; + let corrupt_catalog_cid = prolly::Cid::from_bytes(&corrupt_catalog); + Store::put(&store, corrupt_catalog_cid.as_bytes(), &corrupt_catalog).unwrap(); + match AcceleratorCatalog::load(store.clone(), corrupt_catalog_cid, map.tree()) { + Err(prolly::Error::InvalidProximityObject { kind, reason }) => { + assert_eq!(kind, "accelerator catalog"); + assert_eq!(reason, "catalog TurboQuant fingerprint mismatch"); + } + _ => panic!("mutated TurboQuant catalog fingerprint must fail closed"), + } + let other_map = + ProximityMap::build(store.clone(), ProximityConfig::new(128), records(34, 128)).unwrap(); + match AcceleratorCatalog::load( + store.clone(), + catalog.manifest_cid().clone(), + other_map.tree(), + ) { + Err(prolly::Error::InvalidProximityObject { kind, reason }) => { + assert_eq!(kind, "accelerator catalog"); + assert_eq!(reason, "catalog is bound to a different source snapshot"); + } + _ => panic!("TurboQuant catalog must reject another source snapshot"), + } + let walk = walk_content_graph( + &store, + &[TypedContentRoot::new( + ContentObjectKind::TurboQuantization, + manifest, + )], + &ContentGraphLimits::default(), + ) + .unwrap(); + assert_eq!( + walk.objects_by_kind + .get(&ContentObjectKind::TurboQuantization), + Some(&1) + ); + assert!( + walk.objects_by_kind + .get(&ContentObjectKind::OrderedNode) + .copied() + .unwrap_or_default() + > 0 + ); +} + +#[test] +fn turboquant_missing_or_corrupt_content_fails_closed() { + use prolly::{Cid, Store}; + + let store = Arc::new(MemStore::new()); + let map = + ProximityMap::build(store.clone(), ProximityConfig::new(128), records(33, 128)).unwrap(); + let (index, _) = TurboQuantizer::build( + &map, + TurboQuantizationConfig::default(), + BuildParallelism::serial(), + ) + .unwrap(); + let manifest = index.manifest_cid().clone(); + let manifest_bytes = store.get(manifest.as_bytes()).unwrap().unwrap(); + + for (offset, replacement) in [(4usize, 0xff), (5, 1)] { + let mut corrupt = manifest_bytes.clone(); + corrupt[offset] = replacement; + let cid = Cid::from_bytes(&corrupt); + store.put(cid.as_bytes(), &corrupt).unwrap(); + assert!(TurboQuantizer::load(store.clone(), cid).is_err()); + } + let mut trailing = manifest_bytes; + trailing.push(0); + let trailing_cid = Cid::from_bytes(&trailing); + store.put(trailing_cid.as_bytes(), &trailing).unwrap(); + assert!(TurboQuantizer::load(store.clone(), trailing_cid).is_err()); + + let walk = walk_content_graph( + &store, + &[TypedContentRoot::new( + ContentObjectKind::TurboQuantization, + manifest, + )], + &ContentGraphLimits::default(), + ) + .unwrap(); + let code_root = walk + .objects + .iter() + .find(|object| object.root.kind == ContentObjectKind::OrderedNode) + .unwrap() + .root + .cid + .clone(); + store.delete(code_root.as_bytes()).unwrap(); + assert!(index.verify(&map).is_err()); +} + +#[test] +fn turboquant_fails_closed_at_every_publication_boundary() { + let successful_store = FaultStore::new(); + let successful_map = ProximityMap::build( + successful_store.clone(), + ProximityConfig::new(128), + records(193, 128), + ) + .unwrap(); + successful_store.control.reset(); + let (successful, _) = TurboQuantizer::build( + &successful_map, + TurboQuantizationConfig::default(), + BuildParallelism::serial(), + ) + .unwrap(); + let expected_manifest = successful.manifest_cid().clone(); + let publications = successful_store.control.publications.load(Ordering::SeqCst); + assert!( + publications >= 2, + "code tree and manifest publish separately" + ); + eprintln!("TurboQuant publication boundaries exercised: {publications}"); + + for fail_at in 1..=publications { + let store = FaultStore::new(); + let map = ProximityMap::build(store.clone(), ProximityConfig::new(128), records(193, 128)) + .unwrap(); + store.control.fail_publication(fail_at); + let error = match TurboQuantizer::build( + &map, + TurboQuantizationConfig::default(), + BuildParallelism::serial(), + ) { + Ok(_) => panic!("injected publication must fail the build"), + Err(error) => error, + }; + assert!(matches!(error, prolly::Error::Store(_))); + assert_eq!( + store.control.publications.load(Ordering::SeqCst), + fail_at, + "build continued after publication failure {fail_at}/{publications}", + ); + assert!( + Store::get(&*store.inner, expected_manifest.as_bytes()) + .unwrap() + .is_none(), + "failed build published its manifest at boundary {fail_at}/{publications}", + ); + } +} + +#[test] +fn turboquant_fails_closed_at_every_manifest_tree_proof_and_rerank_read() { + let store = FaultStore::new(); + let map = + ProximityMap::build(store.clone(), ProximityConfig::new(128), records(193, 128)).unwrap(); + let (index, _) = TurboQuantizer::build( + &map, + TurboQuantizationConfig { + rerank_multiplier: 8, + ..TurboQuantizationConfig::default() + }, + BuildParallelism::serial(), + ) + .unwrap(); + let descriptor = map.tree().descriptor.clone(); + let manifest = index.manifest_cid().clone(); + let query: Vec<_> = (0..128) + .map(|coordinate| coordinate as f32 / 31.0 - 1.0) + .collect(); + + let verify_reads = assert_every_cold_read_fails(&store.control, || { + let map = ProximityMap::load(store.clone(), descriptor.clone())?; + let index = TurboQuantizer::load(store.clone(), manifest.clone())?; + index.verify(&map).map(|_| ()) + }); + let search_reads = assert_every_cold_read_fails(&store.control, || { + let map = ProximityMap::load(store.clone(), descriptor.clone())?; + let index = TurboQuantizer::load(store.clone(), manifest.clone())?; + index + .search(&map, forced_turboquant_request(&query, 7)) + .map(|_| ()) + }); + let proof_reads = assert_every_cold_read_fails(&store.control, || { + let map = ProximityMap::load(store.clone(), descriptor.clone())?; + let index = TurboQuantizer::load(store.clone(), manifest.clone())?; + index + .prove_search( + &map, + forced_turboquant_request(&query, 7), + &ContentGraphLimits::default(), + ) + .map(|_| ()) + }); + + eprintln!( + "TurboQuant cold-read boundaries exercised: verify={verify_reads}, search={search_reads}, proof={proof_reads}" + ); + assert!(verify_reads > search_reads / 2); + assert!(proof_reads >= search_reads); +} + +#[test] +fn turboquant_rejects_unsupported_dimensions_and_stale_sources() { + let store = Arc::new(MemStore::new()); + let unsupported = + ProximityMap::build(store.clone(), ProximityConfig::new(7), records(17, 7)).unwrap(); + assert!(TurboQuantizer::build( + &unsupported, + TurboQuantizationConfig::default(), + BuildParallelism::serial(), + ) + .is_err()); + + let map = ProximityMap::build(store.clone(), ProximityConfig::new(8), records(17, 8)).unwrap(); + let (index, _) = TurboQuantizer::build( + &map, + TurboQuantizationConfig::default(), + BuildParallelism::serial(), + ) + .unwrap(); + let changed = ProximityMap::build(store, ProximityConfig::new(8), records(18, 8)).unwrap(); + let query = vec![1.0; 8]; + let mut request = SearchRequest::exact(&query, 1); + request.policy = SearchPolicy::FixedBudget; + request.options.backend = SearchBackend::TurboQuantized; + assert!(index.search(&changed, request).is_err()); +} + +#[test] +fn turboquant_remains_explicit_only_until_auto_qualification() { + use prolly::{ApproximatePreference, SearchIo, SearchRuntime}; + + let store = Arc::new(MemStore::new()); + let map = + ProximityMap::build(store.clone(), ProximityConfig::new(128), records(65, 128)).unwrap(); + let (index, _) = TurboQuantizer::build( + &map, + TurboQuantizationConfig::default(), + BuildParallelism::serial(), + ) + .unwrap(); + let accelerators = AcceleratorSet::empty() + .with_turboquant(map.tree(), index) + .unwrap(); + let query = vec![0.25; 128]; + let mut request = SearchRequest::exact(&query, 7); + request.policy = SearchPolicy::FixedBudget; + request.options.planner.approximate_preference = ApproximatePreference::TurboQuantizedFirst; + let result = map + .search_with( + &accelerators, + &SearchIo::new(store, Arc::new(SearchRuntime::default())), + request, + ) + .unwrap(); + assert_eq!(result.plan.backend, SearchBackend::Native); +} + +#[test] +fn turboquant_proof_replays_the_committed_plan_and_closure() { + use prolly::{Cid, ProximitySearchClaim, SearchPlan}; + + let store = Arc::new(MemStore::new()); + let map = + ProximityMap::build(store.clone(), ProximityConfig::new(128), records(65, 128)).unwrap(); + let (index, _) = TurboQuantizer::build( + &map, + TurboQuantizationConfig { + rerank_multiplier: 128, + ..TurboQuantizationConfig::default() + }, + BuildParallelism::serial(), + ) + .unwrap(); + let query = vec![0.25; 128]; + let mut request = SearchRequest::exact(&query, 7); + request.policy = SearchPolicy::FixedBudget; + request.options.backend = SearchBackend::TurboQuantized; + let proof = index + .prove_search(&map, request, &ContentGraphLimits::default()) + .unwrap(); + let verified = proof.verify(&ContentGraphLimits::default()).unwrap(); + assert_eq!(verified.result.plan.backend, SearchBackend::TurboQuantized); + + let assert_rejected = |candidate: &prolly::ProximitySearchProof| { + assert!(candidate.verify(&ContentGraphLimits::default()).is_err()); + }; + + let mut fuzz_state = 0xa076_1d64_78bd_642fu64; + for _ in 0..64 { + fuzz_state ^= fuzz_state << 13; + fuzz_state ^= fuzz_state >> 7; + fuzz_state ^= fuzz_state << 17; + let mut candidate = proof.clone(); + let event = fuzz_state as usize % candidate.events.len(); + candidate.events.remove(event); + assert_rejected(&candidate); + } + + let mut version = proof.clone(); + version.format_version = version.format_version.saturating_sub(1); + version.request.query[0] += 1.0; + version.accelerator_objects.pop(); + match version.verify(&ContentGraphLimits::default()) { + Err(prolly::Error::UnsupportedProximityVersion { found, required }) => { + assert_eq!(found, version.format_version); + assert_eq!(required, proof.format_version); + } + other => panic!("old TurboQuant proof version must fail explicitly: {other:?}"), + } + + let mut source = proof.clone(); + source.source.descriptor = Cid::from_bytes(b"tampered source"); + assert_rejected(&source); + + let mut root = proof.clone(); + root.accelerator_root.as_mut().unwrap().kind = ContentObjectKind::ProductQuantization; + assert_rejected(&root); + + let mut object = proof.clone(); + object.accelerator_objects[0].bytes[0] ^= 1; + assert_rejected(&object); + + let mut request = proof.clone(); + request.request.query[0] += 1.0; + assert_rejected(&request); + + let mut commitment = proof.clone(); + commitment.request_commitment = Cid::from_bytes(b"tampered request commitment"); + assert_rejected(&commitment); + + let mut result = proof.clone(); + result.result.neighbors[0].distance += 1.0; + assert_rejected(&result); + + let mut plan = proof.clone(); + match &mut plan.plan { + SearchPlan::TurboQuantized { rerank_target, .. } => *rerank_target += 1, + other => panic!("unexpected TurboQuant proof plan: {other:?}"), + } + assert_rejected(&plan); + + let mut transcript = proof.clone(); + transcript.events.pop(); + assert_rejected(&transcript); + + let mut claim = proof.clone(); + claim.claim = ProximitySearchClaim::ExactL2Optimal { + terminal_lower_bound: 0.0, + }; + assert_rejected(&claim); + + let mut incomplete = proof; + incomplete.accelerator_objects.pop(); + assert_rejected(&incomplete); +} + +#[test] +fn turboquant_proofs_cover_every_metric_filter_and_budget_completion() { + let limits = ContentGraphLimits::default(); + let eligible: Vec<_> = (10..40) + .map(|record| format!("vector-{record:04}").into_bytes()) + .collect(); + for metric in [ + DistanceMetric::L2Squared, + DistanceMetric::Cosine, + DistanceMetric::InnerProduct, + ] { + let store = Arc::new(MemStore::new()); + let mut source = records(65, 128); + if metric == DistanceMetric::Cosine { + source[0].vector[0] = 1.0; + } + let mut config = ProximityConfig::new(128); + config.metric = metric; + let map = ProximityMap::build(store, config, source).unwrap(); + let (index, _) = TurboQuantizer::build( + &map, + TurboQuantizationConfig { + rerank_multiplier: 128, + ..TurboQuantizationConfig::default() + }, + BuildParallelism::new(2).unwrap(), + ) + .unwrap(); + let query: Vec<_> = (0..128) + .map(|coordinate| coordinate as f32 / 41.0 - 1.0) + .collect(); + + for filter_case in 0..5 { + for budgeted in [false, true] { + let mut request = forced_turboquant_request(&query, 5); + request.filter = match filter_case { + 0 => ProximityFilter::All, + 1 => ProximityFilter::Prefix(b"vector-0"), + 2 => ProximityFilter::KeyRange { + start: Some(b"vector-0010"), + end: Some(b"vector-0050"), + }, + 3 => ProximityFilter::EligibleKeys(&eligible), + 4 => ProximityFilter::SecondaryEligible { + keys: &eligible, + source_directory: &map.tree().directory, + }, + _ => unreachable!(), + }; + if budgeted { + request.budget.max_distance_evaluations = Some(3); + } + let proof = index.prove_search(&map, request, &limits).unwrap(); + let verified = proof.verify(&limits).unwrap(); + assert_eq!(verified.result, proof.result); + assert_eq!(verified.result.plan.backend, SearchBackend::TurboQuantized); + assert_eq!( + verified.result.completion, + if budgeted { + SearchCompletion::BudgetExhausted + } else { + SearchCompletion::ApproximatePolicySatisfied + }, + "metric={metric:?}, filter_case={filter_case}, budgeted={budgeted}", + ); + } + } + } +} + +#[test] +fn turboquant_copy_reopen_search_and_gc_preserve_only_the_live_closure() { + let store = Arc::new(MemStore::new()); + let map = + ProximityMap::build(store.clone(), ProximityConfig::new(128), records(65, 128)).unwrap(); + let config = TurboQuantizationConfig { + rerank_multiplier: 128, + seed: 0x5eed, + ..TurboQuantizationConfig::default() + }; + let (index, _) = + TurboQuantizer::build(&map, config.clone(), BuildParallelism::new(2).unwrap()).unwrap(); + let manifest = index.manifest_cid().clone(); + let root = TypedContentRoot::new(ContentObjectKind::TurboQuantization, manifest.clone()); + let limits = ContentGraphLimits::default(); + let live = walk_content_graph(&store, std::slice::from_ref(&root), &limits).unwrap(); + + let destination = Arc::new(MemStore::new()); + let copied = copy_content_graph(&store, &destination, root.clone(), &limits).unwrap(); + assert_eq!(copied.copied_objects, copied.required_objects); + let copied_map = + ProximityMap::load(destination.clone(), map.tree().descriptor.clone()).unwrap(); + let copied_index = TurboQuantizer::load(destination, manifest.clone()).unwrap(); + copied_index.verify(&copied_map).unwrap(); + let query: Vec<_> = (0..128) + .map(|coordinate| coordinate as f32 / 37.0 - 1.0) + .collect(); + let exact = copied_map.search(SearchRequest::exact(&query, 11)).unwrap(); + let accelerated = copied_index + .search(&copied_map, forced_turboquant_request(&query, 11)) + .unwrap(); + assert_eq!(accelerated.neighbors, exact.neighbors); + + let orphan_map = + ProximityMap::build(store.clone(), ProximityConfig::new(128), records(66, 128)).unwrap(); + let (orphan, _) = + TurboQuantizer::build(&orphan_map, config, BuildParallelism::serial()).unwrap(); + let orphan_manifest = orphan.manifest_cid().clone(); + let orphan_root = TypedContentRoot::new( + ContentObjectKind::TurboQuantization, + orphan_manifest.clone(), + ); + let orphan_walk = walk_content_graph(&store, &[orphan_root], &limits).unwrap(); + let mut candidates: Vec<_> = live + .objects + .iter() + .chain(&orphan_walk.objects) + .map(|object| object.root.cid.clone()) + .collect(); + candidates.sort(); + candidates.dedup(); + let plan = plan_content_gc(&store, std::slice::from_ref(&root), &candidates, &limits).unwrap(); + assert!(plan.reclaimable_cids.contains(&orphan_manifest)); + assert!(!plan.reclaimable_cids.contains(&manifest)); + let swept = + sweep_content_gc(&store, std::slice::from_ref(&root), &candidates, &limits).unwrap(); + assert_eq!(swept.deleted_objects, plan.reclaimable_cids.len()); + assert!(Store::get(&store, orphan_manifest.as_bytes()) + .unwrap() + .is_none()); + + let reopened_map = ProximityMap::load(store.clone(), map.tree().descriptor.clone()).unwrap(); + let reopened = TurboQuantizer::load(store, manifest).unwrap(); + reopened.verify(&reopened_map).unwrap(); + assert_eq!( + reopened + .search(&reopened_map, forced_turboquant_request(&query, 11)) + .unwrap() + .neighbors, + exact.neighbors, + ); +} + +#[test] +fn turboquant_composite_value_only_and_full_rebuild_preserve_configuration() { + use prolly::{ + CompositeAccelerator, CompositeAcceleratorConfig, CompositeBase, CompositeBuildLimits, + CompositeBuildOrRebuildOutcome, CompositeBuildOutcome, CompositeRebuildOptions, + ProximityMutation, SearchIo, SearchRuntime, + }; + + let store = Arc::new(MemStore::new()); + let source = records(65, 128); + let original_vector = source[7].vector.clone(); + let base_map = ProximityMap::build(store.clone(), ProximityConfig::new(128), source).unwrap(); + let config = TurboQuantizationConfig { + bit_width: 3, + rerank_multiplier: 128, + seed: 0xfeed_beef, + }; + let (base, _) = + TurboQuantizer::build(&base_map, config.clone(), BuildParallelism::serial()).unwrap(); + let (value_changed, _) = base_map + .mutate_batch([ProximityMutation { + key: b"vector-0007".to_vec(), + value: Some((original_vector.clone(), b"value-only".to_vec())), + }]) + .unwrap(); + let composite = match CompositeAccelerator::build( + &base_map, + &value_changed, + CompositeBase::TurboQuantized(base), + CompositeAcceleratorConfig::default(), + CompositeBuildLimits::default(), + ) + .unwrap() + { + CompositeBuildOutcome::Composite { accelerator, stats } => { + assert_eq!(stats.value_only_records, 1); + assert_eq!(stats.delta_records, 0); + assert_eq!(stats.shadow_records, 0); + accelerator + } + CompositeBuildOutcome::FullRebuildRequired { reasons, .. } => { + panic!("value-only change unexpectedly required rebuild: {reasons:?}") + } + }; + let set = AcceleratorSet::empty() + .with_composite(value_changed.tree(), *composite) + .unwrap(); + let mut request = forced_turboquant_request(&original_vector, 1); + request.options.backend = SearchBackend::Composite; + let result = value_changed + .search_with( + &set, + &SearchIo::new(store.clone(), Arc::new(SearchRuntime::default())), + request, + ) + .unwrap(); + assert_eq!(result.neighbors[0].key, b"vector-0007"); + assert_eq!(result.neighbors[0].value, b"value-only"); + + let (changed, _) = base_map + .mutate_batch([ProximityMutation { + key: b"vector-0008".to_vec(), + value: Some((vec![0.0; 128], b"vector-change".to_vec())), + }]) + .unwrap(); + let (base, _) = + TurboQuantizer::build(&base_map, config.clone(), BuildParallelism::serial()).unwrap(); + let rebuilt = CompositeAccelerator::build_or_rebuild( + &base_map, + &changed, + CompositeBase::TurboQuantized(base), + CompositeAcceleratorConfig { + max_delta_records: 0, + ..CompositeAcceleratorConfig::default() + }, + CompositeBuildLimits::default(), + CompositeRebuildOptions { + turboquant_parallelism: BuildParallelism::new(4).unwrap(), + ..CompositeRebuildOptions::default() + }, + ) + .unwrap(); + let (rebuilt, rebuild_stats) = match rebuilt { + CompositeBuildOrRebuildOutcome::TurboQuantizedRebuilt { + accelerator, + reasons, + rebuild_stats, + .. + } => { + assert!(!reasons.is_empty()); + (accelerator, rebuild_stats) + } + _ => panic!("TurboQuant threshold crossing did not rebuild TurboQuant"), + }; + assert_eq!(rebuilt.config(), &config); + assert_eq!(rebuilt.source_descriptor(), &changed.tree().descriptor); + rebuilt.verify(&changed).unwrap(); + let (expected, expected_stats) = + TurboQuantizer::build(&changed, config, BuildParallelism::serial()).unwrap(); + assert_eq!(rebuilt.manifest_cid(), expected.manifest_cid()); + assert_eq!(rebuild_stats, expected_stats); +} + +#[test] +fn turboquant_extreme_vectors_long_keys_and_equal_scores_are_exact_when_exhaustive() { + for metric in [DistanceMetric::L2Squared, DistanceMetric::InnerProduct] { + let store = Arc::new(MemStore::new()); + let source = (0usize..17).map(|index| { + let mut key = vec![b'x'; 8 * 1024]; + key.extend_from_slice(&(index as u64).to_be_bytes()); + let vector = if index == 0 { + vec![f32::MAX; 8] + } else if index == 1 { + vec![-f32::MAX; 8] + } else { + (0..8) + .map(|coordinate| { + if (index + coordinate).is_multiple_of(3) { + f32::MIN_POSITIVE + } else if (index + coordinate).is_multiple_of(2) { + f32::MAX / 4.0 + } else { + -f32::MAX / 4.0 + } + }) + .collect() + }; + ProximityRecord { + key, + vector, + value: index.to_le_bytes().to_vec(), + } + }); + let mut map_config = ProximityConfig::new(8); + map_config.metric = metric; + let map = ProximityMap::build(store, map_config, source).unwrap(); + let (index, _) = TurboQuantizer::build( + &map, + TurboQuantizationConfig { + rerank_multiplier: 32, + ..TurboQuantizationConfig::default() + }, + BuildParallelism::new(2).unwrap(), + ) + .unwrap(); + let query: Vec<_> = (0..8) + .map(|coordinate| { + if coordinate % 2 == 0 { + f32::MAX / 4.0 + } else { + -f32::MAX / 4.0 + } + }) + .collect(); + let exact = map.search(SearchRequest::exact(&query, 17)).unwrap(); + let accelerated = index + .search(&map, forced_turboquant_request(&query, 17)) + .unwrap(); + assert_eq!(accelerated.neighbors, exact.neighbors, "metric={metric:?}"); + } + + let store = Arc::new(MemStore::new()); + let equal = (0usize..33).map(|index| ProximityRecord { + key: format!("equal-{index:04}").into_bytes(), + vector: vec![1.0; 24], + value: index.to_le_bytes().to_vec(), + }); + let map = ProximityMap::build(store, ProximityConfig::new(24), equal).unwrap(); + let (index, _) = TurboQuantizer::build( + &map, + TurboQuantizationConfig { + bit_width: 2, + rerank_multiplier: 64, + seed: u64::MAX, + }, + BuildParallelism::new(4).unwrap(), + ) + .unwrap(); + let exact = map.search(SearchRequest::exact(&[1.0; 24], 33)).unwrap(); + let accelerated = index + .search(&map, forced_turboquant_request(&[1.0; 24], 33)) + .unwrap(); + assert_eq!(accelerated.neighbors, exact.neighbors); + assert!(accelerated + .neighbors + .windows(2) + .all(|pair| pair[0].key < pair[1].key)); +} + +#[test] +fn turboquant_composite_shadows_base_and_merges_exact_delta() { + use prolly::{ + CompositeAccelerator, CompositeAcceleratorConfig, CompositeBase, CompositeBuildLimits, + CompositeBuildOutcome, ProximityMutation, SearchIo, SearchRuntime, + }; + + let store = Arc::new(MemStore::new()); + let base_map = + ProximityMap::build(store.clone(), ProximityConfig::new(128), records(97, 128)).unwrap(); + let (base, _) = TurboQuantizer::build( + &base_map, + TurboQuantizationConfig { + rerank_multiplier: 256, + ..TurboQuantizationConfig::default() + }, + BuildParallelism::serial(), + ) + .unwrap(); + let replacement = vec![0.01; 128]; + let (current, _) = base_map + .mutate_batch([ + ProximityMutation { + key: b"vector-0001".to_vec(), + value: Some((replacement, b"updated".to_vec())), + }, + ProximityMutation { + key: b"vector-0002".to_vec(), + value: None, + }, + ]) + .unwrap(); + let composite = match CompositeAccelerator::build( + &base_map, + ¤t, + CompositeBase::TurboQuantized(base), + CompositeAcceleratorConfig { + max_delta_records: 10, + max_shadow_records: 10, + max_delta_ratio_ppm: 1_000_000, + max_shadow_ratio_ppm: 1_000_000, + base_overfetch_multiplier: 2, + }, + CompositeBuildLimits::default(), + ) + .unwrap() + { + CompositeBuildOutcome::Composite { accelerator, .. } => *accelerator, + CompositeBuildOutcome::FullRebuildRequired { .. } => panic!("unexpected rebuild"), + }; + let set = AcceleratorSet::empty() + .with_composite(current.tree(), composite) + .unwrap(); + let query = vec![0.0; 128]; + let exact = current.search(SearchRequest::exact(&query, 12)).unwrap(); + let mut request = SearchRequest::exact(&query, 12); + request.policy = SearchPolicy::FixedBudget; + request.options.backend = SearchBackend::Composite; + let accelerated = current + .search_with( + &set, + &SearchIo::new(store, Arc::new(SearchRuntime::default())), + request, + ) + .unwrap(); + assert_eq!(accelerated.neighbors, exact.neighbors); +} + +#[cfg(feature = "async-store")] +#[test] +fn turboquant_async_build_load_search_verify_and_cancel_match_sync() { + use prolly::{ + AsyncProximityMap, AsyncSearchControl, AsyncTurboQuantizer, CancellationToken, + SearchCompletion, SyncStoreAsAsync, + }; + use std::future::Future; + use std::task::{Context, Poll}; + use std::time::Instant; + + fn block_on(future: F) -> F::Output { + let waker = futures_util::task::noop_waker(); + let mut context = Context::from_waker(&waker); + let mut future = Box::pin(future); + loop { + match future.as_mut().poll(&mut context) { + Poll::Ready(value) => return value, + Poll::Pending => std::thread::yield_now(), + } + } + } + + block_on(async { + let store = Arc::new(MemStore::new()); + let async_store = SyncStoreAsAsync::new(store.clone()); + let asynchronous = AsyncProximityMap::build( + async_store.clone(), + ProximityConfig::new(128), + records(129, 128), + ) + .await + .unwrap(); + let config = TurboQuantizationConfig { + rerank_multiplier: 256, + ..TurboQuantizationConfig::default() + }; + let (index, _) = + AsyncTurboQuantizer::build(&asynchronous, config, BuildParallelism::new(2).unwrap()) + .await + .unwrap(); + index + .verify(&asynchronous, &ContentGraphLimits::default()) + .await + .unwrap(); + let loaded = AsyncTurboQuantizer::load(&async_store, index.manifest_cid().clone()) + .await + .unwrap(); + let query: Vec<_> = (0..128).map(|index| index as f32 / 29.0 - 1.0).collect(); + let sync = ProximityMap::load(store.clone(), asynchronous.tree().descriptor.clone()) + .unwrap() + .search(SearchRequest::exact(&query, 13)) + .unwrap(); + let mut request = SearchRequest::exact(&query, 13); + request.policy = SearchPolicy::FixedBudget; + request.options.backend = SearchBackend::TurboQuantized; + let result = loaded + .search( + &asynchronous, + request.clone(), + AsyncSearchControl::default(), + ) + .await + .unwrap(); + assert_eq!(result.neighbors, sync.neighbors); + assert_eq!(result.plan.backend, SearchBackend::TurboQuantized); + + let expired = loaded + .search( + &asynchronous, + request.clone(), + AsyncSearchControl { + deadline: Some(Instant::now()), + ..AsyncSearchControl::default() + }, + ) + .await + .unwrap(); + assert_eq!(expired.completion, SearchCompletion::DeadlineExceeded); + assert!(expired.neighbors.is_empty()); + assert_eq!(expired.stats.nodes_read, 0); + assert_eq!(expired.stats.physical_bytes_read, 0); + assert_eq!(expired.stats.committed_bytes, 0); + assert_eq!(expired.stats.quantized_distance_evaluations, 0); + assert_eq!(expired.stats.distance_evaluations, 0); + + assert!(asynchronous + .prove_search(request.clone(), &ContentGraphLimits::default()) + .await + .is_err()); + + let cancellation = CancellationToken::default(); + cancellation.cancel(); + let cancelled = loaded + .search( + &asynchronous, + request, + AsyncSearchControl { + cancellation: Some(cancellation), + ..AsyncSearchControl::default() + }, + ) + .await + .unwrap(); + assert_eq!(cancelled.completion, SearchCompletion::Cancelled); + assert!(cancelled.neighbors.is_empty()); + }); +} + +#[cfg(feature = "async-store")] +#[test] +fn turboquant_async_cancellation_covers_every_store_read_boundary() { + use prolly::{ + AsyncProximityMap, AsyncSearchControl, AsyncTurboQuantizer, CancellationToken, + SearchCompletion, + }; + use std::future::Future; + use std::task::{Context, Poll}; + + fn block_on(future: F) -> F::Output { + let waker = futures_util::task::noop_waker(); + let mut context = Context::from_waker(&waker); + let mut future = Box::pin(future); + loop { + match future.as_mut().poll(&mut context) { + Poll::Ready(value) => return value, + Poll::Pending => std::thread::yield_now(), + } + } + } + + let backing = Arc::new(MemStore::new()); + let source = ProximityMap::build( + backing.clone(), + ProximityConfig::new(128), + records(129, 128), + ) + .unwrap(); + let (index, _) = TurboQuantizer::build( + &source, + TurboQuantizationConfig { + rerank_multiplier: 256, + ..TurboQuantizationConfig::default() + }, + BuildParallelism::serial(), + ) + .unwrap(); + let descriptor = source.tree().descriptor.clone(); + let manifest = index.manifest_cid().clone(); + let query: Vec<_> = (0..128).map(|index| index as f32 / 29.0 - 1.0).collect(); + let eligible: Vec> = (0..13) + .map(|record| format!("vector-{record:04}").into_bytes()) + .collect(); + + for direct_lookup in [false, true] { + let make_request = || { + let mut request = forced_turboquant_request(&query, 13); + if direct_lookup { + request.filter = ProximityFilter::EligibleKeys(&eligible); + } + request + }; + let baseline_reads = block_on(async { + let cancellation = CancellationToken::default(); + let store = CancellingReadAsyncStore::new(backing.clone(), cancellation.clone()); + let map = AsyncProximityMap::load(store.clone(), descriptor.clone()) + .await + .unwrap(); + let index = AsyncTurboQuantizer::load(&store, manifest.clone()) + .await + .unwrap(); + store.reset_reads(); + let result = index + .search( + &map, + make_request(), + AsyncSearchControl { + cancellation: Some(cancellation), + ..AsyncSearchControl::default() + }, + ) + .await + .unwrap(); + assert_eq!( + result.completion, + SearchCompletion::ApproximatePolicySatisfied + ); + assert_eq!(result.plan.direct_lookup, direct_lookup); + store.reads() + }); + assert!(baseline_reads > 0); + + for cancel_after in 1..=baseline_reads { + block_on(async { + let cancellation = CancellationToken::default(); + let store = CancellingReadAsyncStore::new(backing.clone(), cancellation.clone()); + let map = AsyncProximityMap::load(store.clone(), descriptor.clone()) + .await + .unwrap(); + let index = AsyncTurboQuantizer::load(&store, manifest.clone()) + .await + .unwrap(); + store.arm(cancel_after); + let result = index + .search( + &map, + make_request(), + AsyncSearchControl { + cancellation: Some(cancellation), + ..AsyncSearchControl::default() + }, + ) + .await + .unwrap(); + assert_eq!( + result.completion, + SearchCompletion::Cancelled, + "direct_lookup={direct_lookup}: cancellation after physical read {cancel_after} of \ + {baseline_reads} was missed" + ); + assert!(result.neighbors.is_empty()); + assert!(store.reads() <= baseline_reads); + }); + } + + block_on(async { + let cancellation = CancellationToken::default(); + cancellation.cancel(); + let store = CancellingReadAsyncStore::new(backing.clone(), cancellation.clone()); + let map = AsyncProximityMap::load(store.clone(), descriptor.clone()) + .await + .unwrap(); + let index = AsyncTurboQuantizer::load(&store, manifest.clone()) + .await + .unwrap(); + store.reset_reads(); + let result = index + .search( + &map, + make_request(), + AsyncSearchControl { + cancellation: Some(cancellation), + ..AsyncSearchControl::default() + }, + ) + .await + .unwrap(); + assert_eq!(result.completion, SearchCompletion::Cancelled); + assert!(result.neighbors.is_empty()); + assert_eq!(store.reads(), 0, "pre-cancelled search performed I/O"); + }); + } +} + +#[cfg(feature = "async-store")] +#[test] +fn turboquant_async_build_streams_canonical_codes_in_bounded_publications() { + use prolly::{ + AsyncAcceleratorBuildOptions, AsyncAcceleratorCatalog, AsyncProximityMap, + AsyncTurboQuantizer, AsyncTurboQuantizerBuild, CatalogAcceleratorKind, SyncStoreAsAsync, + }; + use std::future::Future; + use std::task::{Context, Poll}; + + fn block_on(future: F) -> F::Output { + let waker = futures_util::task::noop_waker(); + let mut context = Context::from_waker(&waker); + let mut future = Box::pin(future); + loop { + match future.as_mut().poll(&mut context) { + Poll::Ready(value) => return value, + Poll::Pending => std::thread::yield_now(), + } + } + } + + let source = records(4_097, 128); + let config = TurboQuantizationConfig { + bit_width: 3, + rerank_multiplier: 16, + seed: 73, + }; + let sync_store = Arc::new(MemStore::new()); + let sync_map = + ProximityMap::build(sync_store, ProximityConfig::new(128), source.clone()).unwrap(); + let (sync_index, sync_stats) = + TurboQuantizer::build(&sync_map, config.clone(), BuildParallelism::new(3).unwrap()) + .unwrap(); + + block_on(async { + let backing = Arc::new(MemStore::new()); + let initial = AsyncProximityMap::build( + SyncStoreAsAsync::new(backing.clone()), + ProximityConfig::new(128), + source, + ) + .await + .unwrap(); + assert_eq!(initial.tree().descriptor, sync_map.tree().descriptor); + + let bounded = PublicationBoundAsyncStore::new(backing); + let map = AsyncProximityMap::load(bounded.clone(), initial.tree().descriptor.clone()) + .await + .unwrap(); + let (async_index, async_stats) = AsyncTurboQuantizer::build_with_limits( + &map, + config, + BuildParallelism::new(3).unwrap(), + TurboQuantizationBuildLimits::default(), + 1_024, + &ContentGraphLimits::default(), + ) + .await + .unwrap(); + + assert_eq!(async_index.manifest_cid(), sync_index.manifest_cid()); + assert!(async_stats.peak_temporary_bytes <= sync_stats.peak_temporary_bytes); + let mut normalized_async_stats = async_stats.clone(); + normalized_async_stats.peak_temporary_bytes = sync_stats.peak_temporary_bytes; + assert_eq!(normalized_async_stats, sync_stats); + assert!(bounded.publications.load(Ordering::SeqCst) > 1); + assert_eq!(bounded.maximum_batch.load(Ordering::SeqCst), 16); + assert_eq!( + async_index + .verify(&map, &ContentGraphLimits::default()) + .await + .unwrap(), + sync_index.verify(&sync_map).unwrap() + ); + + bounded.publications.store(0, Ordering::SeqCst); + bounded.maximum_batch.store(0, Ordering::SeqCst); + let (catalog, catalog_stats) = AsyncAcceleratorCatalog::build( + &map, + AsyncAcceleratorBuildOptions { + turboquant: Some(AsyncTurboQuantizerBuild { + config: sync_index.config().clone(), + parallelism: BuildParallelism::new(3).unwrap(), + limits: TurboQuantizationBuildLimits::default(), + }), + publication_batch_items: 2, + ..Default::default() + }, + ) + .await + .unwrap(); + assert_eq!(catalog.entries().len(), 1); + assert_eq!( + catalog.entries()[0].kind, + CatalogAcceleratorKind::TurboQuantized + ); + assert_eq!(catalog.entries()[0].manifest, *sync_index.manifest_cid()); + let mut catalog_turboquant = catalog_stats.turboquant.clone().unwrap(); + assert!(catalog_turboquant.peak_temporary_bytes <= sync_stats.peak_temporary_bytes); + catalog_turboquant.peak_temporary_bytes = sync_stats.peak_temporary_bytes; + assert_eq!(catalog_turboquant, sync_stats); + assert!(catalog_stats.objects_published > 1); + assert!(catalog_stats.bytes_published > 0); + assert!(bounded.publications.load(Ordering::SeqCst) > 1); + assert!(bounded.maximum_batch.load(Ordering::SeqCst) <= 2); + }); +} + +#[cfg(feature = "async-store")] +#[test] +fn turboquant_async_composite_streams_the_structural_delta_canonically() { + use prolly::{ + walk_content_graph_async, AsyncAcceleratorSet, AsyncCompositeAccelerator, + AsyncCompositeBuildOptions, AsyncCompositeBuildOutcome, AsyncProximityMap, + AsyncSearchControl, AsyncTurboQuantizer, CompositeAccelerator, CompositeAcceleratorConfig, + CompositeBase, CompositeBuildLimits, CompositeBuildOutcome, ProximityMutation, SearchIo, + SearchRuntime, + }; + use std::future::Future; + use std::task::{Context, Poll}; + + fn block_on(future: F) -> F::Output { + let waker = futures_util::task::noop_waker(); + let mut context = Context::from_waker(&waker); + let mut future = Box::pin(future); + loop { + match future.as_mut().poll(&mut context) { + Poll::Ready(value) => return value, + Poll::Pending => std::thread::yield_now(), + } + } + } + + let source = records(129, 128); + let replacement_vector = vec![2.5; 128]; + let inserted_vector = vec![-1.25; 128]; + let mutations = vec![ + ProximityMutation { + key: b"vector-0001".to_vec(), + value: None, + }, + ProximityMutation { + key: b"vector-0021".to_vec(), + value: Some((replacement_vector.clone(), b"vector-updated".to_vec())), + }, + ProximityMutation { + key: b"vector-0030".to_vec(), + value: Some((source[30].vector.clone(), b"value-only".to_vec())), + }, + ProximityMutation { + key: b"vector-9999".to_vec(), + value: Some((inserted_vector.clone(), b"inserted".to_vec())), + }, + ]; + let quantizer_config = TurboQuantizationConfig { + rerank_multiplier: 256, + seed: 97, + ..TurboQuantizationConfig::default() + }; + + let sync_store = Arc::new(MemStore::new()); + let sync_base = ProximityMap::build( + sync_store.clone(), + ProximityConfig::new(128), + source.clone(), + ) + .unwrap(); + let (sync_current, _) = sync_base.mutate_batch(mutations.clone()).unwrap(); + let (sync_quantizer, _) = TurboQuantizer::build( + &sync_base, + quantizer_config.clone(), + BuildParallelism::new(3).unwrap(), + ) + .unwrap(); + let (sync_composite, sync_stats) = match CompositeAccelerator::build( + &sync_base, + &sync_current, + CompositeBase::TurboQuantized(sync_quantizer), + CompositeAcceleratorConfig::default(), + CompositeBuildLimits::default(), + ) + .unwrap() + { + CompositeBuildOutcome::Composite { accelerator, stats } => (accelerator, stats), + CompositeBuildOutcome::FullRebuildRequired { reasons, .. } => { + panic!("small TurboQuant delta unexpectedly required rebuild: {reasons:?}") + } + }; + let sync_manifest = sync_composite.manifest_cid().clone(); + let sync_set = AcceleratorSet::empty() + .with_composite(sync_current.tree(), *sync_composite) + .unwrap(); + let mut sync_request = SearchRequest::exact(&inserted_vector, 11); + sync_request.policy = SearchPolicy::FixedBudget; + sync_request.options.backend = SearchBackend::Composite; + let expected = sync_current + .search_with( + &sync_set, + &SearchIo::new(sync_store, Arc::new(SearchRuntime::default())), + sync_request.clone(), + ) + .unwrap(); + + block_on(async { + let backing = Arc::new(MemStore::new()); + let store = PublicationBoundAsyncStore::new(backing); + let async_base = AsyncProximityMap::build(store.clone(), ProximityConfig::new(128), source) + .await + .unwrap(); + let (async_quantizer, _) = AsyncTurboQuantizer::build( + &async_base, + quantizer_config, + BuildParallelism::new(3).unwrap(), + ) + .await + .unwrap(); + let (async_current, _) = async_base.mutate_batch(mutations).await.unwrap(); + assert_eq!(async_base.tree(), sync_base.tree()); + assert_eq!(async_current.tree(), sync_current.tree()); + + let publications_before_validation = store.publications.load(Ordering::SeqCst); + let invalid_limits = AsyncCompositeAccelerator::build_from_turboquant( + &async_base, + &async_current, + &async_quantizer, + AsyncCompositeBuildOptions { + turboquant_limits: TurboQuantizationBuildLimits { + max_records: Some(0), + ..Default::default() + }, + ..Default::default() + }, + ) + .await; + match invalid_limits { + Err(prolly::Error::InvalidProximityConfig { reason }) => { + assert!(reason.contains("TurboQuant max_records")); + } + _ => panic!("invalid co-resident TurboQuant limits must fail before publication"), + } + assert_eq!( + store.publications.load(Ordering::SeqCst), + publications_before_validation + ); + + store.publications.store(0, Ordering::SeqCst); + store.maximum_batch.store(0, Ordering::SeqCst); + let outcome = AsyncCompositeAccelerator::build_from_turboquant( + &async_base, + &async_current, + &async_quantizer, + AsyncCompositeBuildOptions { + publication_batch_items: 1, + ..Default::default() + }, + ) + .await + .unwrap(); + let AsyncCompositeBuildOutcome::Composite { + accelerator, + stats, + objects_published, + bytes_published, + } = outcome + else { + panic!("small async TurboQuant delta unexpectedly required rebuild") + }; + assert_eq!(accelerator.manifest_cid(), &sync_manifest); + assert_eq!(stats, sync_stats); + assert_eq!(bytes_published, stats.encoded_output_bytes); + assert!(objects_published >= 3); + assert_eq!(store.publications.load(Ordering::SeqCst), objects_published); + assert!(objects_published < 129); + assert_eq!(store.maximum_batch.load(Ordering::SeqCst), 1); + + let root = TypedContentRoot::new( + ContentObjectKind::CompositeAccelerator, + accelerator.manifest_cid().clone(), + ); + walk_content_graph_async(&store, &[root], &ContentGraphLimits::default()) + .await + .unwrap(); + + let serving = AsyncProximityMap::load_with_runtime( + store, + async_current.tree().descriptor.clone(), + Arc::new(SearchRuntime::default()), + ) + .await + .unwrap(); + let async_set = AsyncAcceleratorSet::empty() + .with_composite(serving.tree(), *accelerator) + .unwrap(); + let actual = serving + .search_with_accelerators(&async_set, sync_request, AsyncSearchControl::default()) + .await + .unwrap(); + assert_eq!(actual.plan, expected.plan); + assert_eq!(actual.neighbors, expected.neighbors); + assert_eq!(actual.completion, expected.completion); + assert_eq!(actual.stats.nodes_read, expected.stats.nodes_read); + assert_eq!(actual.stats.committed_bytes, expected.stats.committed_bytes); + assert_eq!( + actual.stats.distance_evaluations, + expected.stats.distance_evaluations + ); + assert_eq!( + actual.stats.quantized_distance_evaluations, + expected.stats.quantized_distance_evaluations + ); + }); +} + +#[cfg(feature = "async-store")] +#[test] +fn turboquant_async_composite_preserves_cross_store_complete_closure() { + use prolly::{ + walk_content_graph_async, AsyncCompositeAccelerator, AsyncCompositeBuildOptions, + AsyncCompositeBuildOutcome, AsyncProximityMap, AsyncTurboQuantizer, CompositeAccelerator, + CompositeAcceleratorConfig, CompositeBase, CompositeBuildLimits, CompositeBuildOutcome, + }; + use std::future::Future; + use std::task::{Context, Poll}; + + fn block_on(future: F) -> F::Output { + let waker = futures_util::task::noop_waker(); + let mut context = Context::from_waker(&waker); + let mut future = Box::pin(future); + loop { + match future.as_mut().poll(&mut context) { + Poll::Ready(value) => return value, + Poll::Pending => std::thread::yield_now(), + } + } + } + + let base_records = records(33, 128); + let mut current_records = base_records.clone(); + current_records[3].vector = vec![3.25; 128]; + current_records.push(ProximityRecord { + key: b"vector-9999".to_vec(), + vector: vec![-2.0; 128], + value: b"cross-store".to_vec(), + }); + let quantizer_config = TurboQuantizationConfig { + seed: 131, + ..TurboQuantizationConfig::default() + }; + + let expected_store = Arc::new(MemStore::new()); + let expected_base = ProximityMap::build( + expected_store.clone(), + ProximityConfig::new(128), + base_records.clone(), + ) + .unwrap(); + let expected_current = ProximityMap::build( + expected_store, + ProximityConfig::new(128), + current_records.clone(), + ) + .unwrap(); + let (expected_quantizer, _) = TurboQuantizer::build( + &expected_base, + quantizer_config.clone(), + BuildParallelism::serial(), + ) + .unwrap(); + let (expected_manifest, expected_stats) = match CompositeAccelerator::build( + &expected_base, + &expected_current, + CompositeBase::TurboQuantized(expected_quantizer), + CompositeAcceleratorConfig::default(), + CompositeBuildLimits::default(), + ) + .unwrap() + { + CompositeBuildOutcome::Composite { accelerator, stats } => { + (accelerator.manifest_cid().clone(), stats) + } + CompositeBuildOutcome::FullRebuildRequired { reasons, .. } => { + panic!("small cross-store delta unexpectedly required rebuild: {reasons:?}") + } + }; + + block_on(async { + let base_store = PublicationBoundAsyncStore::new(Arc::new(MemStore::new())); + let current_store = PublicationBoundAsyncStore::new(Arc::new(MemStore::new())); + let base = + AsyncProximityMap::build(base_store.clone(), ProximityConfig::new(128), base_records) + .await + .unwrap(); + let current = AsyncProximityMap::build( + current_store.clone(), + ProximityConfig::new(128), + current_records, + ) + .await + .unwrap(); + let (quantizer, _) = + AsyncTurboQuantizer::build(&base, quantizer_config, BuildParallelism::serial()) + .await + .unwrap(); + assert_eq!(base.tree(), expected_base.tree()); + assert_eq!(current.tree(), expected_current.tree()); + + current_store.publications.store(0, Ordering::SeqCst); + current_store.maximum_batch.store(0, Ordering::SeqCst); + let outcome = AsyncCompositeAccelerator::build_from_turboquant( + &base, + ¤t, + &quantizer, + AsyncCompositeBuildOptions { + publication_batch_items: 2, + ..Default::default() + }, + ) + .await + .unwrap(); + let AsyncCompositeBuildOutcome::Composite { + accelerator, + stats, + objects_published, + bytes_published, + } = outcome + else { + panic!("small cross-store delta unexpectedly required rebuild") + }; + assert_eq!(accelerator.manifest_cid(), &expected_manifest); + assert_eq!(stats, expected_stats); + assert!(objects_published > 0); + assert!(bytes_published >= stats.encoded_output_bytes); + assert!(current_store.publications.load(Ordering::SeqCst) > 0); + assert!(current_store.maximum_batch.load(Ordering::SeqCst) <= 2); + + AsyncTurboQuantizer::load(¤t_store, quantizer.manifest_cid().clone()) + .await + .unwrap(); + let root = TypedContentRoot::new( + ContentObjectKind::CompositeAccelerator, + accelerator.manifest_cid().clone(), + ); + let walk = + walk_content_graph_async(¤t_store, &[root], &ContentGraphLimits::default()) + .await + .unwrap(); + assert!(walk.objects.len() >= objects_published); + }); +} diff --git a/tests/proximity_wire.rs b/tests/proximity_wire.rs index 98b3b1b6..5d7c0673 100644 --- a/tests/proximity_wire.rs +++ b/tests/proximity_wire.rs @@ -1,6 +1,7 @@ use prolly::{ - BatchOp, Cid, DistanceMetric, Error, MemStore, NodePublication, ProximityConfig, ProximityMap, - ProximityRecord, Store, + walk_content_graph, BatchOp, BuildParallelism, Cid, ContentGraphLimits, ContentObjectKind, + DistanceMetric, Error, MemStore, NodePublication, ProximityConfig, ProximityMap, + ProximityRecord, Store, TurboQuantizationConfig, TurboQuantizer, TypedContentRoot, }; use std::fmt; use std::sync::Arc; @@ -239,3 +240,74 @@ fn proximity_build_publishes_the_descriptor_only_after_descendants() { .unwrap() .is_none()); } + +#[test] +fn checked_in_turboquant_wire_fixture_matches_canonical_closure() { + let store = Arc::new(MemStore::new()); + let map = ProximityMap::build( + store.clone(), + ProximityConfig::new(8), + [ + ProximityRecord { + key: b"a".to_vec(), + vector: vec![0.0; 8], + value: b"zero".to_vec(), + }, + ProximityRecord { + key: b"b".to_vec(), + vector: vec![1.0, 0.0, -1.0, 0.5, 2.0, -2.0, 0.25, -0.25], + value: b"one".to_vec(), + }, + ProximityRecord { + key: b"c".to_vec(), + vector: vec![0.25, 0.5, 0.75, 1.0, -0.25, -0.5, -0.75, -1.0], + value: b"two".to_vec(), + }, + ], + ) + .unwrap(); + let (index, _) = TurboQuantizer::build( + &map, + TurboQuantizationConfig { + bit_width: 3, + rerank_multiplier: 8, + seed: 0x5eed, + }, + BuildParallelism::new(2).unwrap(), + ) + .unwrap(); + let walk = walk_content_graph( + &store, + &[TypedContentRoot::new( + ContentObjectKind::TurboQuantization, + index.manifest_cid().clone(), + )], + &ContentGraphLimits::default(), + ) + .unwrap(); + let hex = |bytes: &[u8]| { + bytes + .iter() + .map(|byte| format!("{byte:02x}")) + .collect::() + }; + let fixture: serde_json::Value = + serde_json::from_str(include_str!("../conformance/proximity-fixtures.json")).unwrap(); + let fixture = &fixture["turboquant"]["wire_fixture"]; + assert_eq!( + hex(index.manifest_cid().as_bytes()), + fixture["manifest_cid"].as_str().unwrap(), + ); + let actual = walk + .objects + .iter() + .map(|object| { + serde_json::json!({ + "kind": format!("{:?}", object.root.kind), + "cid": hex(object.root.cid.as_bytes()), + "bytes": hex(&object.bytes), + }) + }) + .collect::>(); + assert_eq!(actual, fixture["objects"].as_array().unwrap().clone()); +}