| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
This repository provides detailed, cross-platform documentation for installing and using SQLite extensions in different environments.
Whether you're working with Python, C, Node.js, or on iOS/Android, this guide walks you through building, loading, and troubleshooting SQLite extensions.
SQLite extensions allow developers to extend SQLite’s capabilities by adding:
The official SQLite extension guide is available at https://sqlite.org/loadext.html
Depending on the platform, compiled extensions will have different formats:
| Platform | File Extension |
|---|---|
| Linux | .so |
| Android | .so, .aar |
| macOS | .dylib, .xcframework |
| iOS | .dylib, .xcframework |
| Windows | .dll |
On iOS, Apple heavily restricts loading arbitrary dynamic code for security reasons. You cannot just download and load a .dylib at runtime. The only dynamic code allowed must be signed, shipped with the app, and declared properly. A .xcframework is just a packaging format for distributing precompiled frameworks across platforms and architectures. It doesn’t give you new dynamic loading capabilities—it just makes it easier to bundle and ship libraries. When you include an .xcframework in your app, Xcode links the correct slice (device vs. simulator, arm64 vs. x86_64, etc.), and the framework becomes part of your app bundle. At runtime, iOS loads it like any other embedded framework, but you cannot load an arbitrary new .xcframework after your app is shipped. So, .xcframework is the standard and recommended way to distribute binary iOS frameworks, but it’s not the only way to load dynamic code—you can still use traditional .framework bundles (though .xcframework replaces the old “fat binary” approach).
On Windows and Linux, since universal binaries are not supported, you must explicitly load the extension that matches your system architecture. For example:
if (is_linux_arm) {
load_extension("sqlite-vector_linux_arm");
} else {
load_extension("sqlite-vector_linux_x86");
}Note that you can skip the file extension when loading. Only the extension name (with full path) is required. For details, see: https://www.sqlite.org/c3ref/load_extension.html
In the examples and sample code throughout this document, we’ll reference specific extensions that we’ve built (such as sqlite-vector, sqlite-ai, sqlite-js, and sqlite-sync). These are concrete illustrations of what’s possible, but the same code patterns and explanations apply to any SQLite extension you might want to develop or integrate. Whether you’re extending SQLite with your own custom functionality or adopting third-party extensions, the techniques remain consistent.
Extensions can be loaded dynamically at runtime via:
Refer to the platform-specific loading instructions below:
You can find practical code samples for loading SQLite extensions in various programming languages in the examples directory.
By default, some SQLite builds (especially in Python or mobile platforms) disable extension loading due to security risks. You'll need to explicitly enable it in most environments.
| Back | FazBrowse Home | New Git URL |