본문으로 건너뛰기
AI NEWS JOURNAL
Hacker News Show HNAI NEWS / JOURNAL

Show HN: TalaDB – An embedded document and vector database that runs anywhere

Article URL: https://github.com/taladb/taladb Comments URL: https://news.ycombinator.com/item?id=50609192 Points: 1 # Comments: 1

번역 서비스가 일시 중지되어 원문을 표시합니다.

One database. Everywhere your app runs. An embedded document and vector database with a Rust core, for browser, server and mobile apps. Documentation · Get started · Web demo · Changelog TalaDB stores JSON documents and their vector embeddings in one embedded engine. You query them with MongoDB-style filters, secondary indexes, and vector, full-text and hybrid search, all inside your app process. There is no server to run and no cloud round-trip. The same Rust core runs in the browser, on Node.js, and in React Native, Android, iOS and macOS apps. Quickstart Browser example. Node.js uses @taladb/node and React Native uses @taladb/react-native with the same code. Kotlin, Swift and Rust are covered under Platforms. pnpm add taladb @taladb/web import { openDB } from 'taladb' const db = await openDB('app.db') // OPFS in the browser, a file elsewhere const articles = db.collection('articles') await articles.createVectorIndex('embedding', { dimensions: 384 }) await articles.insert({ title: 'How to reset your password', locale: 'en', embedding: await embed('How to reset your password'), // any embedding model }) // Structured query const english = await articles.find({ locale: 'en' }) // Filter on metadata first, then rank the matches by similarity const similar = await articles.findNearest('embedding', await embed('forgot my login'), 5, { locale: 'en', }) Browser apps also need a small bundler setup (cross-origin isolation headers for the OPFS worker). See the browser guide. Architecture Each platform has a thin binding over the taladb crate: WebAssembly in the browser, napi-rs on Node.js, and the C FFI behind React Native (JSI), Kotlin (JNI) and Swift. Filters, indexes and search behave the same everywhere. Storage and API style follow each platform's conventions. More in Introduction. Capabilities Documents and queries. Collections of JSON documents with MongoDB-style filters, updates, aggregation and secondary indexes picked by the query planner. Vector search. Exact k-NN (cosine, dot, euclidean) by default, optional HNSW, and metadata filters applied before ranking. See vector search. Full-text and hybrid search. BM25 ranking with searchText, and hybridSearch that fuses keyword and vector rankings with reciprocal rank fusion. See search. Transactions and persistence. ACID writes on redb. Optional AES-GCM-256 encryption at rest. Live queries and migrations. Subscribe to a filter, and version your data with migrations that run on open. Change webhook. TalaDB does not replicate. If your backend needs to hear about local writes, a webhook can send each committed change (JavaScript runtimes). Platforms React apps can add @taladb/react for hooks (guide). @taladb/node ships prebuilt binaries for linux-x64, darwin-arm64 and win32-x64. Android (Kotlin), minSdk 24, Kotlin 2.2+: dependencies { implementation("dev.taladb:taladb-android:0.2.3") } iOS & macOS (Swift), iOS 13+ / macOS 10.15+, Swift 5.9+: .package(url: "https://github.com/taladb/taladb-swift", from: "0.2.3") // target dependency: .product(name: "TalaDB", package: "taladb-swift") Rust, 1.90+: cargo add taladb Project links Documentation and API reference Live demos: web, React Native and Android (Kotlin) on Google Play Example: local-first storefront (Vite + @taladb/react/query) Changelog · Releases · Roadmap Discussions Development You need Rust 1.90+ (the repo pins its toolchain in rust-toolchain.toml), Node.js 18+, pnpm 9+ and wasm-pack. pnpm install pnpm build # every package cargo test --workspace # Rust tests pnpm docs:dev # docs site at http://localhost:5173 CONTRIBUTING.md has the full workflow, including the browser (WASM) tests and the Node.js native build. Contributing Bug reports, pull requests and feedback are welcome. Please open an issue before starting a large feature or an architectural change. Dual-licensed under either of Apache License, Version 2.0 (LICENSE-APACHE) MIT license (LICENSE-MIT) at your option. Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this project shall be dual-licensed as above, without any additional terms or conditions.

자료 출처

원문 읽기 ↗

관련 주제

← 전체 소식 이어 읽기