vldb-sqlite
vldb-sqlite is a Rust SQLite gateway that can be used as a gRPC service, an embeddable Rust library, or a C-compatible FFI dynamic library. It is part of the OpenVulcan local data gateway stack and focuses on predictable SQLite access from multi-language hosts.
The crate provides JSON result queries, Arrow IPC streaming queries, batch execution, script execution, SQLite FTS helpers, and stable FFI entry points for native callers.
Features
- SQLite gRPC gateway built with
tonic - Embeddable Rust library API for local hosts
- C ABI / FFI exports for Go, C, Lua, and other native runtimes
ExecuteScript,ExecuteBatch,QueryJson, andQueryStreamexecution paths- Arrow IPC output for larger result sets
- JSON compatibility interface for scripting and diagnostics
- SQLite FTS5 helpers with Jieba tokenizer support
- Configurable PRAGMA and hardening options
Installation
Add the crate to a Rust project:
Or add it manually:
[]
= "0.1.5"
Run the Gateway
Build and run the gRPC service from this repository:
The default gRPC endpoint is:
127.0.0.1:19501
Use vldb-sqlite.json.example as the starting point for a custom service configuration.
Rust Library Usage
The library mode exposes the same SQLite execution core used by the gRPC service. Typical callers open a runtime/database handle and invoke the typed SQL execution helpers from the public modules.
Important modules:
runtime: programmatic SQLite runtime and database opening optionssql_exec: shared SQL execution corefts: FTS index and document helperstokenizer: tokenizer and custom dictionary helpersffi: exported FFI symbols and FFI-safe types
Generated protobuf types are available under vldb_sqlite::pb.
FFI Usage
The crate also builds a cdylib and ships the C header in include/vldb_sqlite.h. Native hosts should prefer the non-JSON FFI entry points for hot paths and keep the JSON FFI interface for compatibility, scripting, and diagnostics.
Build the dynamic library:
The platform-specific shared library is emitted under target/release.
Documentation
- English guide
- Chinese guide
- Library and FFI guide
- gRPC integration guide
- Go FFI example
- API documentation
Package Contents
The crates.io package intentionally includes only the files required for Rust builds, generated documentation, protobuf compilation, FFI headers, and user-facing crate documentation. CI, Docker packaging, local runtime data, and release automation files are kept out of the published crate.
License
This project is licensed under the MIT License. See LICENSE.