@@ -17,10 +17,11 @@ This document describes the integration of the `sqlite-rembed` Rust SQLite exten
1717The integration follows the same pattern as ` sqlite-vec ` (vector search extension):
1818
1919### Static Linking Approach
20- 1 . ** Rust static library** : ` libsqlite_rembed.a ` built from Rust source
21- 2 . ** Build system integration** : Makefile targets for Rust compilation
22- 3 . ** Auto-registration** : ` sqlite3_auto_extension() ` in ProxySQL initialization
23- 4 . ** Single binary deployment** : No external dependencies at runtime
20+ 1 . ** Source packaging** : ` sqlite-rembed-0.0.1-alpha.9.tar.gz ` included in git repository
21+ 2 . ** Rust static library** : ` libsqlite_rembed.a ` built from extracted source
22+ 3 . ** Build system integration** : Makefile targets for tar.gz extraction and Rust compilation
23+ 4 . ** Auto-registration** : ` sqlite3_auto_extension() ` in ProxySQL initialization
24+ 5 . ** Single binary deployment** : No external dependencies at runtime
2425
2526### Technical Implementation
2627
@@ -47,17 +48,25 @@ libclang-dev
4748
4849### Build Process
49501 . Rust toolchain detection in ` deps/Makefile `
50- 2 . Static library build with ` cargo build --release --features=sqlite-loadable/static --lib `
51- 3 . Linking into ` libproxysql.a ` via ` lib/Makefile `
52- 4 . Final binary linking via ` src/Makefile `
51+ 2 . Extract ` sqlite-rembed-0.0.1-alpha.9.tar.gz ` from GitHub release
52+ 3 . Static library build with ` cargo build --release --features=sqlite-loadable/static --lib `
53+ 4 . Linking into ` libproxysql.a ` via ` lib/Makefile `
54+ 5 . Final binary linking via ` src/Makefile `
55+
56+ ### Packaging
57+ Following ProxySQL's dependency packaging pattern, sqlite-rembed is distributed as a compressed tar.gz file:
58+ - ` deps/sqlite3/sqlite-rembed-0.0.1-alpha.9.tar.gz ` - Official GitHub release tarball
59+ - Extracted during build via ` tar -zxf sqlite-rembed-0.0.1-alpha.9.tar.gz `
60+ - Clean targets remove extracted source directories
5361
5462## Code Changes Summary
5563
5664### 1. ` deps/Makefile `
5765- Added Rust toolchain detection (` rustc ` , ` cargo ` )
5866- SQLite environment variables for sqlite-rembed build
59- - New target: ` sqlite3/libsqlite_rembed.a `
67+ - New target: ` sqlite3/libsqlite_rembed.a ` that extracts from tar.gz and builds
6068- Added dependency to ` sqlite3 ` target
69+ - Clean targets remove ` sqlite-rembed-*/ ` and ` sqlite-rembed-source/ ` directories
6170
6271### 2. ` lib/Makefile `
6372- Added ` SQLITE_REMBED_LIB ` variable pointing to static library
@@ -164,8 +173,12 @@ The extension provides SQLite error messages for:
164173
165174### Build Verification
166175``` bash
167- # Verify Rust library builds
168- cd deps && make sqlite3
176+ # Clean and rebuild with tar.gz extraction
177+ cd deps && make cleanpart && make sqlite3
178+
179+ # Verify tar.gz extraction and Rust library build
180+ ls deps/sqlite3/sqlite-rembed-source/
181+ ls deps/sqlite3/libsqlite_rembed.a
169182
170183# Verify symbol exists
171184nm deps/sqlite3/libsqlite_rembed.a | grep sqlite3_rembed_init
@@ -218,6 +231,10 @@ VALUES ('test', 'ollama', 'nomic-embed-text');
218231- [ SQLite Loadable Extensions] ( https://www.sqlite.org/loadext.html )
219232- [ Rust C FFI] ( https://doc.rust-lang.org/nomicon/ffi.html )
220233
234+ ### Source Distribution
235+ - ` deps/sqlite3/sqlite-rembed-0.0.1-alpha.9.tar.gz ` - Official GitHub release tarball
236+ - Extracted to ` deps/sqlite3/sqlite-rembed-source/ ` during build
237+
221238## Maintainers
222239
223240- Integration: [ Your Name/Team]
0 commit comments