Skip to main content

Module ffi

Module ffi 

Source
Expand description

C-ABI Foreign Function Interface for Syna database.

This module provides extern “C” functions for cross-language access. All functions use catch_unwind to prevent Rust panics from unwinding into foreign code.

Functions§

SYNA_cascade_close
Closes the Cascade Index.
SYNA_cascade_flush
Flushes the Cascade Index to disk.
SYNA_cascade_insert
Inserts a vector into the Cascade Index.
SYNA_cascade_insert_batch
Inserts multiple vectors into the Cascade Index.
SYNA_cascade_len
Returns the number of vectors in the Cascade Index.
SYNA_cascade_new
Creates a new Cascade Index.
SYNA_cascade_search
Searches the Cascade Index for nearest neighbors.
SYNA_cascade_search_params
Searches with custom parameters.
SYNA_close
Closes a database and removes it from the global registry.
SYNA_compact
Compacts the database by rewriting only the latest non-deleted entries.
SYNA_delete
Deletes a key from the database by appending a tombstone entry.
SYNA_exists
Checks if a key exists in the database and is not deleted.
SYNA_exp_end_run
Ends a run with the given status.
SYNA_exp_log_artifact
Logs an artifact for a run.
SYNA_exp_log_metric
Logs a metric value for a run.
SYNA_exp_log_param
Logs a parameter for a run.
SYNA_exp_start_run
Starts a new experiment run.
SYNA_exp_tracker_open
Opens or creates an experiment tracker at the given path.
SYNA_free_bytes
Frees memory allocated by SYNA_get_bytes().
SYNA_free_json
Frees a JSON string allocated by SYNA_vector_store_search().
SYNA_free_keys
Frees memory allocated by SYNA_keys().
SYNA_free_tensor
Frees memory allocated by SYNA_get_history_tensor().
SYNA_free_text
Frees memory allocated by SYNA_get_text().
SYNA_free_vector
Frees memory allocated by SYNA_get_vector().
SYNA_get_bytes
Reads a byte array from the database.
SYNA_get_float
Reads a float value from the database.
SYNA_get_history_tensor
Retrieves the complete history of float values for a key as a contiguous array.
SYNA_get_int
Reads an integer value from the database.
SYNA_get_text
Reads a text value from the database.
SYNA_get_vector
Retrieves a vector (embedding) from the database.
SYNA_gwi_close
Close a GWI and remove from registry
SYNA_gwi_flush
Flush GWI changes to disk
SYNA_gwi_initialize
Initialize GWI attractors from sample vectors
SYNA_gwi_insert
Insert a vector into the GWI
SYNA_gwi_insert_batch
Batch insert vectors into the GWI
SYNA_gwi_len
Get number of vectors in the GWI
SYNA_gwi_new
Create a new Gravity Well Index
SYNA_gwi_open
Open an existing Gravity Well Index
SYNA_gwi_search
Search for k nearest neighbors in the GWI
SYNA_gwi_search_nprobe
Search for k nearest neighbors with custom nprobe
SYNA_keys
Returns a list of all non-deleted keys in the database.
SYNA_mmap_vector_store_build_index
Builds the HNSW index for the mmap vector store.
SYNA_mmap_vector_store_close
Closes the mmap vector store and removes it from the registry.
SYNA_mmap_vector_store_flush
Flushes the mmap vector store to disk.
SYNA_mmap_vector_store_insert
Inserts a vector into the mmap vector store.
SYNA_mmap_vector_store_insert_batch
Inserts multiple vectors in a batch (maximum throughput).
SYNA_mmap_vector_store_len
Returns the number of vectors in the mmap vector store.
SYNA_mmap_vector_store_new
Creates or opens a memory-mapped vector store at the given path.
SYNA_mmap_vector_store_search
Searches for the k nearest neighbors in the mmap vector store.
SYNA_model_list
Lists all versions of a model.
SYNA_model_load
Loads a model from the registry with checksum verification.
SYNA_model_registry_open
Opens or creates a model registry at the given path.
SYNA_model_save
Saves a model to the registry with automatic versioning.
SYNA_model_set_stage
Sets the deployment stage for a model version.
SYNA_open
Opens a database at the given path and registers it in the global registry.
SYNA_open_with_config
Opens a database with sync_on_write disabled for high-throughput writes.
SYNA_put_bytes
Writes a byte array to the database.
SYNA_put_float
Writes a float value to the database.
SYNA_put_floats_batch
Writes multiple float values to the database in a single batch operation.
SYNA_put_int
Writes an integer value to the database.
SYNA_put_text
Writes a text value to the database.
SYNA_put_vector
Stores a vector (embedding) in the database.
SYNA_vector_store_build_index
Builds the HNSW index for a vector store.
SYNA_vector_store_close
Closes a vector store and saves any pending changes.
SYNA_vector_store_flush
Flushes any pending changes to disk without closing the store.
SYNA_vector_store_has_index
Returns whether a vector store has an HNSW index built.
SYNA_vector_store_insert
Inserts a vector into the store.
SYNA_vector_store_insert_batch
Inserts multiple vectors in a single batch operation.
SYNA_vector_store_insert_batch_fast
Inserts multiple vectors without updating the index (maximum write speed).
SYNA_vector_store_new
Creates a new vector store at the given path.
SYNA_vector_store_new_with_config
Creates a new vector store with sync_on_write configuration.
SYNA_vector_store_search
Searches for k nearest neighbors in the vector store.