Skip to content

Commit 194b718

Browse files
committed
Update sqlite-rembed integration documentation for tar.gz packaging
- Update Integration Architecture section to include source packaging step - Add Packaging subsection detailing tar.gz distribution pattern - Update Build Process to mention tar.gz extraction - Update Code Changes Summary for deps/Makefile tar.gz handling - Update Build Verification instructions to use cleanpart and verify extraction - Add Source Distribution reference section
1 parent 9f30d85 commit 194b718

1 file changed

Lines changed: 27 additions & 10 deletions

File tree

doc/sqlite-rembed-integration.md

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,11 @@ This document describes the integration of the `sqlite-rembed` Rust SQLite exten
1717
The 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
4950
1. 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
171184
nm 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

Comments
 (0)