├── VERSION ├── examples ├── go │ ├── .gitignore │ ├── Makefile │ ├── go.mod │ ├── demo.go │ └── go.sum ├── rust │ ├── .gitignore │ ├── README.md │ ├── Cargo.toml │ ├── demo.rs │ └── Cargo.lock ├── node │ └── demo.js ├── datasette │ └── demo.sh ├── ruby │ ├── README.md │ └── demo.rb ├── sqlite3 │ ├── README.md │ └── demo.sql ├── python │ └── demo.py ├── deno │ └── demo.ts └── README.md ├── bindings ├── elixir │ ├── demo │ │ ├── example.db │ │ └── demo.exs │ ├── README.md │ ├── test │ │ ├── test_helper.exs │ │ └── sqlite_hello_test.exs │ ├── .gitignore │ ├── lib │ │ ├── mix │ │ │ └── tasks │ │ │ │ └── sqlite_hello.install.ex │ │ └── sqlite_hello.ex │ ├── sqlite-hello-checksum.exs.tmpl │ ├── mix.exs │ └── mix.lock ├── rust │ ├── .gitignore │ ├── README.md │ ├── Cargo.toml │ ├── Cargo.toml.tmpl │ ├── src │ │ └── lib.rs │ ├── build.rs │ └── Cargo.lock └── go │ ├── go.mod │ ├── lib.go │ ├── hola │ ├── sqlite-hola.h │ └── hola.go │ └── hello │ ├── sqlite-hello.h │ └── hello.go ├── .gitignore ├── test.sql ├── sqlite-hello.h ├── sqlite-hola.h ├── README.md ├── sqlite-dist.toml ├── sqlite-hello.c ├── sqlite-hola.c ├── scripts └── elixir_generate_checksum.sh ├── LICENSE ├── .github └── workflows │ ├── test.yaml │ └── release.yaml ├── Makefile └── vendor └── sqlite3ext.h /VERSION: -------------------------------------------------------------------------------- 1 | 0.1.0-alpha.79 -------------------------------------------------------------------------------- /examples/go/.gitignore: -------------------------------------------------------------------------------- 1 | demo -------------------------------------------------------------------------------- /bindings/elixir/demo/example.db: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /bindings/rust/.gitignore: -------------------------------------------------------------------------------- 1 | target/ -------------------------------------------------------------------------------- /examples/rust/.gitignore: -------------------------------------------------------------------------------- 1 | target/ -------------------------------------------------------------------------------- /bindings/elixir/README.md: -------------------------------------------------------------------------------- 1 | TODO 2 | -------------------------------------------------------------------------------- /examples/node/demo.js: -------------------------------------------------------------------------------- 1 | import {load} 2 | -------------------------------------------------------------------------------- /examples/go/Makefile: -------------------------------------------------------------------------------- 1 | demo: demo.go 2 | go build -o $@ -------------------------------------------------------------------------------- /bindings/elixir/test/test_helper.exs: -------------------------------------------------------------------------------- 1 | ExUnit.start() 2 | -------------------------------------------------------------------------------- /examples/datasette/demo.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | datasette --memory -- 3 | -------------------------------------------------------------------------------- /bindings/elixir/.gitignore: -------------------------------------------------------------------------------- 1 | deps/ 2 | _build/ 3 | 4 | sqlite-hello-checksum.exs 5 | -------------------------------------------------------------------------------- /bindings/go/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/asg017/sqlite-hello/bindings/go 2 | 3 | go 1.20 4 | -------------------------------------------------------------------------------- /bindings/rust/README.md: -------------------------------------------------------------------------------- 1 | ```bash 2 | cargo build --release 3 | ``` 4 | 5 | ``` 6 | ./target/release/demo 7 | ``` 8 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | dist/ 2 | *.dylib 3 | *.so 4 | *.dll 5 | 6 | .ruby-version 7 | .vscode 8 | examples/c 9 | examples/c++ 10 | -------------------------------------------------------------------------------- /examples/ruby/README.md: -------------------------------------------------------------------------------- 1 | ``` 2 | gem install ../../dist/sqlite_hello_TODO.gem 3 | ``` 4 | 5 | ``` 6 | ruby demo.rb 7 | ``` 8 | -------------------------------------------------------------------------------- /examples/sqlite3/README.md: -------------------------------------------------------------------------------- 1 | ``` 2 | make loadable 3 | ``` 4 | 5 | ```bash 6 | `sqlite3 :memory: '.read demo.sql'` 7 | ``` 8 | -------------------------------------------------------------------------------- /examples/rust/README.md: -------------------------------------------------------------------------------- 1 | ```bash 2 | LIB_SQLITE_HELLO=/Users/alex/projects/sqlite-hello/dist/ cargo build --release 3 | ``` 4 | 5 | ``` 6 | ./target/release/demo 7 | ``` 8 | -------------------------------------------------------------------------------- /test.sql: -------------------------------------------------------------------------------- 1 | .bail on 2 | 3 | .load dist/hello0 4 | .load dist/hola0 5 | .mode box 6 | .header on 7 | 8 | select hello('Alex'); 9 | select hello_version(); 10 | 11 | select hola('Alex'); 12 | select hola_version(); -------------------------------------------------------------------------------- /examples/sqlite3/demo.sql: -------------------------------------------------------------------------------- 1 | .bail on 2 | 3 | .load ../../dist/hello0 4 | .load ../../dist/hola0 5 | 6 | .mode box 7 | .header on 8 | 9 | select hello_version(); 10 | 11 | select hello('Alex'); 12 | 13 | select hola('Alex'); 14 | -------------------------------------------------------------------------------- /bindings/go/lib.go: -------------------------------------------------------------------------------- 1 | // asdflakdjf 2 | package hello 3 | 4 | import ( 5 | hello "github.com/asg017/sqlite-hello/bindings/go/hello" 6 | hola "github.com/asg017/sqlite-hello/bindings/go/hola" 7 | ) 8 | 9 | // please?? 10 | func init() { 11 | hello.Auto() 12 | hola.Auto() 13 | } 14 | -------------------------------------------------------------------------------- /examples/ruby/demo.rb: -------------------------------------------------------------------------------- 1 | require 'sqlite3' 2 | require 'sqlite_hello' 3 | 4 | db = SQLite3::Database.new(':memory:') 5 | db.enable_load_extension(true) 6 | SqliteHello.load(db) 7 | db.enable_load_extension(false) 8 | 9 | result = db.execute('SELECT hello("Alex")') 10 | puts result.first.first 11 | -------------------------------------------------------------------------------- /bindings/elixir/lib/mix/tasks/sqlite_hello.install.ex: -------------------------------------------------------------------------------- 1 | defmodule Mix.Tasks.SqliteHello.Install do 2 | @shortdoc "Installs SqliteHello extension files" 3 | use Mix.Task 4 | 5 | @impl true 6 | def run(_args) do 7 | Application.ensure_all_started(:sqlite_hello) 8 | 9 | SqliteHello.install() 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /examples/go/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/asg017/sqlite-hello/examples/go 2 | 3 | go 1.20 4 | 5 | require github.com/mattn/go-sqlite3 v1.14.16 6 | 7 | require github.com/asg017/sqlite-hello/bindings/go v0.0.0-20230529051321-8bd578f11697 // indirect 8 | 9 | //replace github.com/asg017/sqlite-hello/bindings/go => ../../bindings/go 10 | -------------------------------------------------------------------------------- /examples/python/demo.py: -------------------------------------------------------------------------------- 1 | import sqlite3 2 | import sqlite_hello 3 | 4 | db = sqlite3.connect(':memory:') 5 | db.enable_load_extension(True) 6 | sqlite_hello.load(db) 7 | db.enable_load_extension(False) 8 | 9 | version, result = db.execute('select hello_version(), hello("alex")').fetchone() 10 | 11 | print(version, result) 12 | -------------------------------------------------------------------------------- /bindings/elixir/sqlite-hello-checksum.exs.tmpl: -------------------------------------------------------------------------------- 1 | %{ 2 | "${LOADABLE_ASSET_LINUX_X86_64_NAME}" => "sha256:${LOADABLE_ASSET_LINUX_X86_64_SHA256}", 3 | "${LOADABLE_ASSET_MACOS_X86_64_NAME}" => "sha256:${LOADABLE_ASSET_MACOS_X86_64_SHA256}", 4 | "${LOADABLE_ASSET_MACOS_AARCH64_NAME}" => "sha256:${LOADABLE_ASSET_MACOS_AARCH64_SHA256}", 5 | } 6 | -------------------------------------------------------------------------------- /sqlite-hello.h: -------------------------------------------------------------------------------- 1 | #ifndef _SQLITE_HELLO_H 2 | #define _SQLITE_HELLO_H 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | int sqlite3_hello_init(sqlite3*, char**, const sqlite3_api_routines*); 9 | 10 | #ifdef __cplusplus 11 | } /* end of the 'extern "C"' block */ 12 | #endif 13 | 14 | #endif /* ifndef _SQLITE_HELLO_H */ 15 | -------------------------------------------------------------------------------- /sqlite-hola.h: -------------------------------------------------------------------------------- 1 | #ifndef _SQLITE_HOLA_H 2 | #define _SQLITE_HOLA_H 3 | 4 | 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #endif 8 | 9 | int sqlite3_hola_init(sqlite3*, char**, const sqlite3_api_routines*); 10 | 11 | #ifdef __cplusplus 12 | } /* end of the 'extern "C"' block */ 13 | #endif 14 | 15 | #endif /* ifndef _SQLITE_HOLA_H */ 16 | -------------------------------------------------------------------------------- /bindings/go/hola/sqlite-hola.h: -------------------------------------------------------------------------------- 1 | #ifndef _SQLITE_HOLA_H 2 | #define _SQLITE_HOLA_H 3 | 4 | 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #endif 8 | 9 | int sqlite3_hola_init(sqlite3*, char**, const sqlite3_api_routines*); 10 | 11 | #ifdef __cplusplus 12 | } /* end of the 'extern "C"' block */ 13 | #endif 14 | 15 | #endif /* ifndef _SQLITE_HOLA_H */ 16 | -------------------------------------------------------------------------------- /examples/rust/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "sqlite-hello-demo" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | rusqlite = {version="0.29.0", features=["bundled"]} 8 | libsqlite3-sys = "0.26.0" 9 | sqlite-hello = {path="../../bindings/rust", features=["download-libs"]} 10 | 11 | [[bin]] 12 | name="demo" 13 | path="demo.rs" 14 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # sqlite-hello 2 | 3 | The smallest possible "hello world" SQLite extension. Meant for testing and debugging loadable SQLite extensions. 4 | 5 | Exposes a single SQL scalar function `hello()`, that takes a single `name` argument and returns the string `"Hello, name!"`. 6 | 7 | ```sql 8 | .load ./hello0 9 | select hello('Alex'); 10 | 'Hello, Alex!' 11 | ``` 12 | -------------------------------------------------------------------------------- /bindings/go/hello/sqlite-hello.h: -------------------------------------------------------------------------------- 1 | #ifndef _SQLITE_HELLO_H 2 | #define _SQLITE_HELLO_H 3 | 4 | //#include "sqlite3.h" 5 | 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | int sqlite3_hello_init(sqlite3*, char**, const sqlite3_api_routines*); 11 | 12 | #ifdef __cplusplus 13 | } /* end of the 'extern "C"' block */ 14 | #endif 15 | 16 | #endif /* ifndef _SQLITE_HELLO_H */ 17 | -------------------------------------------------------------------------------- /examples/deno/demo.ts: -------------------------------------------------------------------------------- 1 | import { Database } from "https://deno.land/x/sqlite3@0.8.0/mod.ts"; 2 | import * as sqlite_hello from "https://deno.land/x/sqlite_hello/mod.ts"; 3 | 4 | const db = new Database(":memory:"); 5 | db.enableLoadExtension = true; 6 | db.loadExtension(sqlite_hello.getLoadablePath()); 7 | db.enableLoadExtension = false; 8 | 9 | const [version] = db.prepare("select hello_version()").value<[string]>()!; 10 | 11 | console.log(version); 12 | -------------------------------------------------------------------------------- /sqlite-dist.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "sqlite-hello" 3 | version = "0.1.0-alpha.79" 4 | license = "MIT OR Apache" 5 | homepage = "https://alexgarcia.xyz/sqlite-hello" 6 | repo = "https://github.com/asg017/sqlite-hello" 7 | description = "A hello SQLite extension to test sqlite-dist." 8 | authors = ["Alex Garcia"] 9 | 10 | [targets] 11 | github_releases = {} 12 | sqlpkg = {} 13 | spm = {} 14 | 15 | pip = {} 16 | datasette = {} 17 | sqlite_utils = {} 18 | 19 | npm = {} 20 | 21 | gem = { module_name="SqliteHello" } 22 | -------------------------------------------------------------------------------- /bindings/elixir/demo/demo.exs: -------------------------------------------------------------------------------- 1 | Mix.install([ 2 | {:sqlite_hello, path: "../"}, 3 | {:exqlite, "~> 0.13.0"} 4 | ], verbose: true) 5 | 6 | Mix.Task.run("sqlite_hello.install") 7 | 8 | alias Exqlite.Basic 9 | 10 | {:ok, conn} = Basic.open("example.db") 11 | 12 | :ok = Exqlite.Basic.enable_load_extension(conn) 13 | Exqlite.Basic.load_extension(conn, SqliteHello.loadable_path_hola0()) 14 | Exqlite.Basic.load_extension(conn, SqliteHello.loadable_path_hello0()) 15 | 16 | {:ok, [[version]], [_]} = Basic.exec(conn, "select hello_version()") |> Basic.rows() 17 | 18 | IO.puts("version: #{version}") 19 | -------------------------------------------------------------------------------- /examples/go/demo.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "database/sql" 5 | "fmt" 6 | "log" 7 | 8 | _ "github.com/asg017/sqlite-hello/bindings/go" 9 | _ "github.com/mattn/go-sqlite3" 10 | ) 11 | 12 | // #cgo LDFLAGS: -L../../dist 13 | import "C" 14 | 15 | func main() { 16 | db, err := sql.Open("sqlite3", ":memory:") 17 | if err != nil { 18 | log.Fatal(err) 19 | } 20 | defer db.Close() 21 | 22 | var hello string 23 | var hola string 24 | err = db.QueryRow("select hello('alex'), hola('alex')").Scan(&hello, &hola) 25 | if err != nil { 26 | log.Fatal(err) 27 | } 28 | 29 | fmt.Printf("hello result: %s\n", hello) 30 | fmt.Printf("hola result: %s\n", hola) 31 | } 32 | -------------------------------------------------------------------------------- /examples/go/go.sum: -------------------------------------------------------------------------------- 1 | github.com/asg017/sqlite-hello/bindings/go v0.0.0-20230529050301-2662b4252066 h1:UHVEl//NldOOT8JQS42rbHKHfQQeidOO/JWhI7Pa3So= 2 | github.com/asg017/sqlite-hello/bindings/go v0.0.0-20230529050301-2662b4252066/go.mod h1:WegztKRpGqZfgNHyK22jVsNbLXNBSsYfARGJABaKMYk= 3 | github.com/asg017/sqlite-hello/bindings/go v0.0.0-20230529051321-8bd578f11697 h1:lqsCMWV7Vv3U7cQJM7wbPBysDpG0Se1X2bMq1+EchjU= 4 | github.com/asg017/sqlite-hello/bindings/go v0.0.0-20230529051321-8bd578f11697/go.mod h1:WegztKRpGqZfgNHyK22jVsNbLXNBSsYfARGJABaKMYk= 5 | github.com/mattn/go-sqlite3 v1.14.16 h1:yOQRA0RpS5PFz/oikGwBEqvAWhWg5ufRz4ETLjwpU1Y= 6 | github.com/mattn/go-sqlite3 v1.14.16/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg= 7 | -------------------------------------------------------------------------------- /bindings/go/hola/hola.go: -------------------------------------------------------------------------------- 1 | // utilities 2 | package hola 3 | 4 | // #cgo LDFLAGS: -lsqlite_hola0 5 | // #cgo CFLAGS: -DSQLITE_CORE 6 | // #include 7 | // #include "sqlite-hola.h" 8 | import "C" 9 | 10 | // Once called, every future new SQLite3 connection created in this process 11 | // will have the hola extension loaded. It will persist until Cancel() is 12 | // called. 13 | // 14 | // Calls sqlite3_auto_extension() under the hood. 15 | func Auto() { 16 | C.sqlite3_auto_extension( (*[0]byte) ((C.sqlite3_hola_init)) ); 17 | } 18 | 19 | // "Cancels" any previous calls to Auto(). Any new SQLite3 connections created 20 | // will not have the hola extension loaded. 21 | // 22 | // Calls sqlite3_cancel_auto_extension() under the hood. 23 | func Cancel() { 24 | C.sqlite3_cancel_auto_extension( (*[0]byte) (C.sqlite3_hola_init) ); 25 | } 26 | -------------------------------------------------------------------------------- /examples/rust/demo.rs: -------------------------------------------------------------------------------- 1 | use libsqlite3_sys::sqlite3_auto_extension; 2 | use rusqlite::{Connection, Result}; 3 | use sqlite_hello; 4 | 5 | fn main() -> Result<()> { 6 | unsafe { 7 | sqlite3_auto_extension(Some(sqlite_hello::sqlite3_hello_init)); 8 | sqlite3_auto_extension(Some(sqlite_hello::sqlite3_hola_init)); 9 | } 10 | 11 | let conn = Connection::open_in_memory()?; 12 | let mut stmt = conn.prepare("SELECT 1 + 1, hello('alex'), hola('alex')")?; 13 | let mut rows = stmt.query([]).unwrap(); 14 | let row = rows.next().unwrap().unwrap(); 15 | 16 | let value: i32 = row.get(0).unwrap(); 17 | println!("{:?}", value); 18 | 19 | let value: String = row.get(1).unwrap(); 20 | println!("{:?}", value); 21 | 22 | let value: String = row.get(2).unwrap(); 23 | println!("{:?}", value); 24 | 25 | Ok(()) 26 | } 27 | -------------------------------------------------------------------------------- /examples/README.md: -------------------------------------------------------------------------------- 1 | | Language | Code | 2 | | ---------------------------------- | --------------------------- | 3 | | Python | [`python/`](./python) | 4 | | Node.js | [`node/`](./node) | 5 | | Deno | [`deno/`](./deno) | 6 | | Ruby | [`ruby/`](./ruby) | 7 | | [Datasette](https://datasette.io/) | [`datasette/`](./datasette) | 8 | | `sqlite3` | [`sqlite3/`](./sqlite3) | 9 | | C | [`c/`](./c) | 10 | | C++ | [`c++/`](./c++) | 11 | | Go | [`go/`](./go) | 12 | | Rust | [`rust/`](./rust) | 13 | -------------------------------------------------------------------------------- /bindings/go/hello/hello.go: -------------------------------------------------------------------------------- 1 | // yoyo 2 | package hello 3 | 4 | // #cgo LDFLAGS: -lsqlite_hello0 5 | // #cgo CFLAGS: -DSQLITE_CORE 6 | // #include 7 | // #include "sqlite-hello.h" 8 | // 9 | import "C" 10 | 11 | // Once called, every future new SQLite3 connection created in this process 12 | // will have the hello extension loaded. It will persist until [Cancel] is 13 | // called. 14 | // 15 | // Calls [sqlite3_auto_extension()] under the hood. 16 | // 17 | // [sqlite3_auto_extension()]: https://www.sqlite.org/c3ref/auto_extension.html 18 | func Auto() { 19 | C.sqlite3_auto_extension( (*[0]byte) ((C.sqlite3_hello_init)) ); 20 | } 21 | 22 | // "Cancels" any previous calls to [Auto]. Any new SQLite3 connections created 23 | // will not have the hello extension loaded. 24 | // 25 | // Calls sqlite3_cancel_auto_extension() under the hood. 26 | func Cancel() { 27 | C.sqlite3_cancel_auto_extension( (*[0]byte) (C.sqlite3_hello_init) ); 28 | } 29 | -------------------------------------------------------------------------------- /bindings/rust/Cargo.toml: -------------------------------------------------------------------------------- 1 | # autogenerated, don't edit by hand. 2 | 3 | [package] 4 | name = "sqlite-hello" 5 | version = "0.1.0-alpha.79" 6 | edition = "2021" 7 | authors = ["Alex Garcia "] 8 | description = "FFI bindings to the sqlite-hello SQLite extension" 9 | homepage = "https://github.com/asg017/sqlite-hello" 10 | repository = "https://github.com/asg017/sqlite-hello" 11 | keywords = ["sqlite", "sqlite-extension"] 12 | license = "MIT/Apache-2.0" 13 | 14 | [dependencies] 15 | 16 | [build-dependencies] 17 | anyhow = "1.0.71" 18 | ureq = { version = "2.6.2", optional = true } 19 | flate2 = { version = "1.0.26", optional = true } 20 | tar = { version = "0.4.38", optional = true } 21 | zip = { version = "0.6.6", optional = true } 22 | 23 | [dev-dependencies] 24 | rusqlite = "0.29.0" 25 | 26 | [features] 27 | default = ["hello", "hola"] 28 | download-libs = ["ureq", "flate2", "tar", "zip"] 29 | hello = [] 30 | hola = [] 31 | -------------------------------------------------------------------------------- /bindings/rust/Cargo.toml.tmpl: -------------------------------------------------------------------------------- 1 | # autogenerated, don't edit by hand. 2 | 3 | [package] 4 | name = "sqlite-hello" 5 | version = "${VERSION}" 6 | edition = "2021" 7 | authors = ["Alex Garcia "] 8 | description = "FFI bindings to the sqlite-hello SQLite extension" 9 | homepage = "https://github.com/asg017/sqlite-hello" 10 | repository = "https://github.com/asg017/sqlite-hello" 11 | keywords = ["sqlite", "sqlite-extension"] 12 | license = "MIT/Apache-2.0" 13 | 14 | [dependencies] 15 | 16 | [build-dependencies] 17 | anyhow = "1.0.71" 18 | ureq = { version = "2.6.2", optional = true } 19 | flate2 = { version = "1.0.26", optional = true } 20 | tar = { version = "0.4.38", optional = true } 21 | zip = { version = "0.6.6", optional = true } 22 | 23 | [dev-dependencies] 24 | rusqlite = "0.29.0" 25 | 26 | [features] 27 | default = ["hello", "hola"] 28 | download-libs = ["ureq", "flate2", "tar", "zip"] 29 | hello = [] 30 | hola = [] 31 | -------------------------------------------------------------------------------- /sqlite-hello.c: -------------------------------------------------------------------------------- 1 | #include "sqlite3ext.h" 2 | SQLITE_EXTENSION_INIT1 3 | 4 | static void hello(sqlite3_context *context, int argc, sqlite3_value **argv) { 5 | sqlite3_result_text( 6 | context, 7 | (char *) sqlite3_mprintf("Hello, %s!", sqlite3_value_text(argv[0])), 8 | -1, 9 | sqlite3_free 10 | ); 11 | } 12 | static void hello_version(sqlite3_context *context, int argc, sqlite3_value **argv) { 13 | sqlite3_result_text(context, SQLITE_HELLO_VERSION, -1, SQLITE_STATIC); 14 | } 15 | 16 | #ifdef _WIN32 17 | __declspec(dllexport) 18 | #endif 19 | int sqlite3_hello_init(sqlite3 *db, char **pzErrMsg, const sqlite3_api_routines *pApi) { 20 | SQLITE_EXTENSION_INIT2(pApi); 21 | int rc = SQLITE_OK; 22 | if(rc == SQLITE_OK) rc = sqlite3_create_function_v2(db, "hello", 1, SQLITE_UTF8 | SQLITE_DETERMINISTIC, 0, hello, 0, 0, 0); 23 | if(rc == SQLITE_OK) rc = sqlite3_create_function_v2(db, "hello_version", 0, SQLITE_UTF8 | SQLITE_DETERMINISTIC, 0, hello_version, 0, 0, 0); 24 | return rc; 25 | } 26 | -------------------------------------------------------------------------------- /sqlite-hola.c: -------------------------------------------------------------------------------- 1 | #include "sqlite3ext.h" 2 | 3 | SQLITE_EXTENSION_INIT1 4 | 5 | static void hola(sqlite3_context *context, int argc, sqlite3_value **argv) { 6 | sqlite3_result_text( 7 | context, 8 | (char *) sqlite3_mprintf("¡Hola, %s!", sqlite3_value_text(argv[0])), 9 | -1, 10 | sqlite3_free 11 | ); 12 | } 13 | static void hola_version(sqlite3_context *context, int argc, sqlite3_value **argv) { 14 | sqlite3_result_text(context, SQLITE_HELLO_VERSION, -1, SQLITE_STATIC); 15 | } 16 | 17 | 18 | #ifdef _WIN32 19 | __declspec(dllexport) 20 | #endif 21 | int sqlite3_hola_init(sqlite3 *db, char **pzErrMsg, const sqlite3_api_routines *pApi) { 22 | SQLITE_EXTENSION_INIT2(pApi); 23 | int rc = SQLITE_OK; 24 | if(rc == SQLITE_OK) rc = sqlite3_create_function_v2(db, "hola", 1, SQLITE_UTF8 | SQLITE_DETERMINISTIC, 0, hola, 0, 0, 0); 25 | if(rc == SQLITE_OK) rc = sqlite3_create_function_v2(db, "hola_version", 0, SQLITE_UTF8 | SQLITE_DETERMINISTIC, 0, hola_version, 0, 0, 0); 26 | return rc; 27 | } 28 | -------------------------------------------------------------------------------- /scripts/elixir_generate_checksum.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # ./scripts/elixir_generate_checksum.sh "$(cat ~/tmp/checksums.txt)" 4 | 5 | CHECKSUMS_TXT="$1" 6 | 7 | 8 | generate () { 9 | export PLATFORM=$1 10 | export TARGET_ENV_NAME=$2 11 | export TARGET_ENV_SHA=$3 12 | result="$(echo "$CHECKSUMS_TXT" | grep "loadable-$PLATFORM")" 13 | 14 | NAME=$(echo "$result" | sed -E 's/.* (.*)/\1/') 15 | CHECKSUM=$(echo "$result" | sed -E 's/([^ ]*) .*/\1/') 16 | 17 | export "$TARGET_ENV_NAME"="$NAME" 18 | export "$TARGET_ENV_SHA"="$CHECKSUM" 19 | } 20 | 21 | 22 | generate linux-x86_64 LOADABLE_ASSET_LINUX_X86_64_NAME LOADABLE_ASSET_LINUX_X86_64_SHA256 23 | generate macos-x86_64 LOADABLE_ASSET_MACOS_X86_64_NAME LOADABLE_ASSET_MACOS_X86_64_SHA256 24 | generate macos-aarch64 LOADABLE_ASSET_MACOS_AARCH64_NAME LOADABLE_ASSET_MACOS_AARCH64_SHA256 25 | 26 | 27 | envsubst < bindings/elixir/sqlite-hello-checksum.exs.tmpl > bindings/elixir/sqlite-hello-checksum.exs 28 | echo "✅ generated bindings/elixir/sqlite-hello-checksum.exs" 29 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2023 Alexander Garcia 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 8 | -------------------------------------------------------------------------------- /bindings/rust/src/lib.rs: -------------------------------------------------------------------------------- 1 | #[cfg(feature = "hello")] 2 | #[link(name = "sqlite_hello0")] 3 | extern "C" { 4 | pub fn sqlite3_hello_init(); 5 | } 6 | 7 | #[cfg(feature = "hola")] 8 | #[link(name = "sqlite_hola0")] 9 | extern "C" { 10 | pub fn sqlite3_hola_init(); 11 | } 12 | 13 | #[cfg(test)] 14 | mod tests { 15 | use super::*; 16 | 17 | use rusqlite::{ffi::sqlite3_auto_extension, Connection}; 18 | 19 | #[test] 20 | fn test_rusqlite_auto_extension() { 21 | unsafe { 22 | sqlite3_auto_extension(Some(sqlite3_hello_init)); 23 | sqlite3_auto_extension(Some(sqlite3_hola_init)); 24 | } 25 | 26 | let conn = Connection::open_in_memory().unwrap(); 27 | 28 | let result: String = conn 29 | .query_row("select hello(?)", ["alex"], |x| x.get(0)) 30 | .unwrap(); 31 | 32 | assert_eq!(result, "Hello, alex!"); 33 | 34 | let result: String = conn 35 | .query_row("select hola(?)", ["alex"], |x| x.get(0)) 36 | .unwrap(); 37 | 38 | assert_eq!(result, "¡Hola, alex!"); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /.github/workflows/test.yaml: -------------------------------------------------------------------------------- 1 | name: "build" 2 | on: 3 | push: 4 | branches: 5 | - main 6 | permissions: 7 | contents: read 8 | jobs: 9 | build-linux-x86_64-extension: 10 | runs-on: ubuntu-20.04 11 | steps: 12 | - uses: actions/checkout@v3 13 | - run: make loadable 14 | - uses: actions/upload-artifact@v3 15 | with: 16 | name: sqlite-hello-linux-x86_64-extension 17 | path: dist/* 18 | build-macos-x86_64-extension: 19 | runs-on: macos-11 20 | steps: 21 | - uses: actions/checkout@v3 22 | - run: make loadable 23 | - uses: actions/upload-artifact@v3 24 | with: 25 | name: sqlite-hello-macos-x86_64-extension 26 | path: dist/* 27 | build-macos-aarch64-extension: 28 | runs-on: macos-11 29 | steps: 30 | - uses: actions/checkout@v3 31 | - run: make loadable static CFLAGS="-target arm64-apple-macos11" 32 | - uses: actions/upload-artifact@v3 33 | with: 34 | name: sqlite-hello-macos-aarch64-extension 35 | path: dist/* 36 | build-windows-x86_64-extension: 37 | runs-on: windows-2019 38 | steps: 39 | - uses: actions/checkout@v3 40 | - run: make loadable static 41 | - uses: actions/upload-artifact@v3 42 | with: 43 | name: sqlite-hello-windows-x86_64-extension 44 | path: dist/* 45 | -------------------------------------------------------------------------------- /bindings/elixir/mix.exs: -------------------------------------------------------------------------------- 1 | defmodule SqliteHello.MixProject do 2 | use Mix.Project 3 | 4 | @source_url "https://github.com/asg017/sqlite-hello/bindings/elixir" 5 | @version File.read!(Path.expand("../../VERSION", __DIR__)) |> String.trim() 6 | 7 | def project do 8 | [ 9 | app: :sqlite_hello, 10 | version: @version, 11 | elixir: "~> 1.14", 12 | start_permanent: Mix.env() == :prod, 13 | deps: deps(), 14 | name: "sqlite_hello", 15 | source_url: "https://github.com/asg017/sqlite-hello", 16 | homepage_url: "https://github.com/asg017/sqlite-hello", 17 | docs: [ 18 | main: "SqliteHello", 19 | extras: ["README.md"], 20 | source_ref: "v0.1.0" 21 | ], 22 | description: description(), 23 | package: package() 24 | ] 25 | end 26 | 27 | def application do 28 | [ 29 | extra_applications: [:logger, inets: :optional, ssl: :optional], 30 | mod: {SqliteHello, []}, 31 | env: [default: []] 32 | ] 33 | end 34 | 35 | defp deps do 36 | [ 37 | {:ex_doc, "~> 0.14", only: :dev, runtime: false}, 38 | {:ecto_sqlite3, ">= 0.0.0"}, 39 | {:castore, ">= 0.0.0"}, 40 | {:hex_core, "~> 0.10.0"} 41 | ] 42 | end 43 | 44 | defp description() do 45 | "sqlite-hello please." 46 | end 47 | 48 | defp package do 49 | [ 50 | files: [ 51 | "lib", 52 | "mix.exs", 53 | "README.md", 54 | "sqlite-hello-checksum.exs" 55 | ], 56 | links: %{"GitHub" => @source_url}, 57 | maintainers: ["Alex Garcia", "Tommy Rodriguez"], 58 | licenses: ["MIT"], 59 | ] 60 | end 61 | end 62 | -------------------------------------------------------------------------------- /bindings/elixir/test/sqlite_hello_test.exs: -------------------------------------------------------------------------------- 1 | defmodule SqliteHelloTest do 2 | use ExUnit.Case 3 | doctest SqliteHello 4 | 5 | describe "current_target/1" do 6 | test "aarch64 in an Apple machine with Darwin-based OS" do 7 | target_system = %{arch: "aarch64", vendor: "apple", os: "darwin20.3.0"} 8 | 9 | config = %{ 10 | target_system: target_system, 11 | os_type: {:unix, :darwin} 12 | } 13 | 14 | assert {:ok, "macos-aarch64"} = SqliteHello.current_target(config) 15 | end 16 | 17 | test "x86_64 in an Apple machine with Darwin-based OS" do 18 | target_system = %{arch: "x86_64", vendor: "apple", os: "darwin20.3.0"} 19 | 20 | config = %{ 21 | target_system: target_system, 22 | os_type: {:unix, :darwin} 23 | } 24 | 25 | assert {:ok, "macos-x86_64"} = SqliteHello.current_target(config) 26 | end 27 | 28 | test "x86_64 in a PC running RedHat Linux" do 29 | target_system = %{arch: "x86_64", vendor: "redhat", os: "linux", abi: "gnu"} 30 | 31 | config = %{ 32 | target_system: target_system, 33 | os_type: {:unix, :linux} 34 | } 35 | 36 | assert {:ok, "linux-x86_64"} = SqliteHello.current_target(config) 37 | end 38 | 39 | test "aarch64 in a PC running Linux" do 40 | target_system = %{arch: "aarch64", vendor: "pc", os: "linux", abi: "gnu"} 41 | 42 | config = %{ 43 | target_system: target_system, 44 | os_type: {:unix, :linux} 45 | } 46 | 47 | assert {:ok, "linux-aarch64"} = SqliteHello.current_target(config) 48 | end 49 | 50 | test "target not available" do 51 | config = %{ 52 | target_system: %{arch: "i686", vendor: "unknown", os: "linux", abi: "gnu"}, 53 | nif_version: "2.14", 54 | os_type: {:unix, :linux} 55 | } 56 | 57 | error_message = 58 | """ 59 | precompiled artifact is not available for this target: \"gnu-i686-linux-unknown\". 60 | The available targets are: 61 | - linux-x86_64 62 | - macos-aarch64 63 | - macos-x86_64 64 | """ 65 | |> String.trim() 66 | 67 | assert {:error, ^error_message} = SqliteHello.current_target(config) 68 | end 69 | end 70 | 71 | test "loads the hello and hola path" do 72 | assert String.match?(SqliteHello.loadable_path_hello0(), ~r/hellxo0/) 73 | assert String.match?(SqliteHello.loadable_path_hola0(), ~r/hola0/) 74 | end 75 | end 76 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | VERSION=$(shell cat VERSION) 2 | 3 | ifeq ($(shell uname -s),Darwin) 4 | CONFIG_DARWIN=y 5 | else ifeq ($(OS),Windows_NT) 6 | CONFIG_WINDOWS=y 7 | else 8 | CONFIG_LINUX=y 9 | endif 10 | 11 | ifdef CONFIG_DARWIN 12 | LOADABLE_EXTENSION=dylib 13 | endif 14 | 15 | ifdef CONFIG_LINUX 16 | LOADABLE_EXTENSION=so 17 | endif 18 | 19 | ifdef CONFIG_WINDOWS 20 | LOADABLE_EXTENSION=dll 21 | endif 22 | 23 | 24 | ifdef python 25 | PYTHON=$(python) 26 | else 27 | PYTHON=python3 28 | endif 29 | 30 | 31 | ifdef IS_MACOS_ARM 32 | RENAME_WHEELS_ARGS=--is-macos-arm 33 | else 34 | RENAME_WHEELS_ARGS= 35 | endif 36 | 37 | prefix=dist 38 | $(prefix): 39 | mkdir -p $(prefix) 40 | 41 | DEFINE_HELLO=-DSQLITE_HELLO_VERSION="\"v$(VERSION)\"" 42 | 43 | TARGET_LOADABLE_HELLO=$(prefix)/hello0.$(LOADABLE_EXTENSION) 44 | TARGET_LOADABLE_HOLA=$(prefix)/hola0.$(LOADABLE_EXTENSION) 45 | TARGET_LOADABLE=$(TARGET_LOADABLE_HELLO) $(TARGET_LOADABLE_HOLA) 46 | 47 | TARGET_STATIC_HELLO=$(prefix)/libsqlite_hello0.a 48 | TARGET_STATIC_HELLO_H=$(prefix)/sqlite-hello.h 49 | TARGET_STATIC_HOLA=$(prefix)/libsqlite_hola0.a 50 | TARGET_STATIC_HOLA_H=$(prefix)/sqlite-hola.h 51 | TARGET_STATIC=$(TARGET_STATIC_HELLO) $(TARGET_STATIC_HELLO_H) $(TARGET_STATIC_HOLA) $(TARGET_STATIC_HOLA_H) 52 | 53 | 54 | loadable: $(TARGET_LOADABLE) 55 | static: $(TARGET_STATIC) 56 | 57 | $(TARGET_LOADABLE_HELLO): sqlite-hello.c $(prefix) 58 | gcc -fPIC -shared \ 59 | -Ivendor \ 60 | -O3 \ 61 | $(DEFINE_HELLO) $(CFLAGS) \ 62 | $< -o $@ 63 | 64 | $(TARGET_STATIC_HELLO): sqlite-hello.c $(prefix) 65 | gcc -Ivendor $(DEFINE_HELLO) $(CFLAGS) -DSQLITE_CORE \ 66 | -O3 -c $< -o $(prefix)/hello.o 67 | ar rcs $@ $(prefix)/hello.o 68 | 69 | $(TARGET_STATIC_HELLO_H): sqlite-hello.h $(prefix) 70 | cp $< $@ 71 | 72 | $(TARGET_LOADABLE_HOLA): sqlite-hola.c $(prefix) 73 | gcc -fPIC -shared \ 74 | -Ivendor \ 75 | -O3 \ 76 | $(DEFINE_HELLO) $(CFLAGS) \ 77 | $< -o $@ 78 | 79 | $(TARGET_STATIC_HOLA): sqlite-hola.c $(prefix) 80 | gcc -Ivendor $(DEFINE_HELLO) $(CFLAGS) -DSQLITE_CORE \ 81 | -O3 -c $< -o $(prefix)/hola.o 82 | ar rcs $@ $(prefix)/hola.o 83 | 84 | $(TARGET_STATIC_HOLA_H): sqlite-hola.h $(prefix) 85 | cp $< $@ 86 | 87 | clean: 88 | rm -rf dist/* 89 | 90 | test: 91 | sqlite3 :memory: '.read test.sql' 92 | 93 | .PHONY: version loadable static test clean gh-release \ 94 | ruby 95 | 96 | gh-release: 97 | make version 98 | git add --all 99 | git commit -m "v$(VERSION)" 100 | git tag v$(VERSION) 101 | git push origin main v$(VERSION) 102 | gh release create v$(VERSION) --prerelease --notes="" --title=v$(VERSION) 103 | 104 | 105 | TARGET_WHEELS=$(prefix)/wheels 106 | INTERMEDIATE_PYPACKAGE_EXTENSION=bindings/python/sqlite_hello/ 107 | 108 | $(TARGET_WHEELS): $(prefix) 109 | mkdir -p $(TARGET_WHEELS) 110 | 111 | bindings/rust/Cargo.toml: bindings/rust/Cargo.toml.tmpl VERSION 112 | VERSION=$(VERSION) envsubst < $< > $@ 113 | 114 | bindings/rust/Cargo.lock: bindings/rust/Cargo.toml 115 | cargo update --manifest-path=$< 116 | 117 | bindings/go/hello/sqlite-hello.h: sqlite-hello.h 118 | cp $< $@ 119 | 120 | bindings/go/hola/sqlite-hola.h: sqlite-hola.h 121 | cp $< $@ 122 | 123 | rust: bindings/rust/Cargo.toml bindings/rust/Cargo.lock 124 | 125 | version: 126 | make rust 127 | -------------------------------------------------------------------------------- /bindings/rust/build.rs: -------------------------------------------------------------------------------- 1 | #[cfg(feature = "download-libs")] 2 | use flate2::read::GzDecoder; 3 | use std::path::PathBuf; 4 | 5 | #[cfg(feature = "download-libs")] 6 | use std::io::BufReader; 7 | #[cfg(feature = "download-libs")] 8 | use tar::Archive; 9 | #[cfg(feature = "download-libs")] 10 | use ureq::get; 11 | #[cfg(feature = "download-libs")] 12 | use zip::read::ZipArchive; 13 | 14 | #[cfg(feature = "download-libs")] 15 | enum Platform { 16 | MacosX86_64, 17 | MacosAarch64, 18 | LinuxX86_64, 19 | WindowsX86_64, 20 | } 21 | 22 | #[cfg(not(feature = "download-libs"))] 23 | fn download_static_for_platform(_version: String, _output_directory: &PathBuf) {} 24 | #[cfg(feature = "download-libs")] 25 | fn download_static_for_platform(version: String, output_directory: &PathBuf) { 26 | let os = std::env::var("CARGO_CFG_TARGET_OS").expect("CARGO_CFG_TARGET_OS not found"); 27 | let arch = std::env::var("CARGO_CFG_TARGET_ARCH").expect("CARGO_CFG_TARGET_ARCH not found"); 28 | let platform = match (os.as_str(), arch.as_str()) { 29 | ("linux", "x86_64") => Platform::LinuxX86_64, 30 | ("windows", "x86_64") => Platform::WindowsX86_64, 31 | ("macos", "x86_64") => Platform::MacosX86_64, 32 | ("macos", "aarch64") => Platform::MacosAarch64, 33 | _ => todo!("TODO"), 34 | }; 35 | 36 | let base = "https://github.com/asg017/sqlite-hello/releases/download"; 37 | let url = match platform { 38 | Platform::MacosX86_64 => { 39 | format!("{base}/{version}/sqlite-hello-{version}-static-macos-x86_64.tar.gz") 40 | } 41 | 42 | Platform::MacosAarch64 => { 43 | format!("{base}/{version}/sqlite-hello-{version}-static-macos-aarch64.tar.gz") 44 | } 45 | Platform::LinuxX86_64 => { 46 | format!("{base}/{version}/sqlite-hello-{version}-static-linux-x86_64.tar.gz") 47 | } 48 | Platform::WindowsX86_64 => { 49 | format!("{base}/{version}/sqlite-hello-{version}-static-windows-x86_64.zip") 50 | } 51 | }; 52 | 53 | println!("{url}"); 54 | let response = get(url.as_str()).call().expect("Failed to download file"); 55 | println!("{}", response.get_url()); 56 | let mut reader = response.into_reader(); 57 | 58 | if url.ends_with(".zip") { 59 | let mut buf = Vec::new(); 60 | reader 61 | .read_to_end(&mut buf) 62 | .expect("reading zip file failed"); 63 | let mut archive = 64 | ZipArchive::new(std::io::Cursor::new(buf)).expect("Failed to open zip archive"); 65 | archive 66 | .extract(output_directory) 67 | .expect("failed to extract .zip file"); 68 | } else { 69 | let buf_reader = BufReader::new(reader); 70 | let decoder = GzDecoder::new(buf_reader); 71 | let mut archive = Archive::new(decoder); 72 | archive 73 | .unpack(output_directory) 74 | .expect("Failed to extract tar.gz file"); 75 | } 76 | } 77 | fn main() { 78 | let version = format!("v{}", env!("CARGO_PKG_VERSION")); 79 | 80 | let output_directory = if cfg!(feature = "download-libs") { 81 | let output_directory = std::path::Path::new(std::env::var("OUT_DIR").unwrap().as_str()) 82 | .join(format!("sqlite-hello-v{version}")); 83 | eprintln!("{}", output_directory.to_string_lossy()); 84 | if !output_directory.exists() { 85 | download_static_for_platform(version, &output_directory); 86 | } else { 87 | println!("{} already exists", output_directory.to_string_lossy()) 88 | } 89 | output_directory 90 | } else { 91 | std::env::var("LIB_SQLITE_HELLO").expect("The LIB_SQLITE_HELLO environment variable needs to be defined if the download-libs feature is not enabled").into() 92 | }; 93 | 94 | println!("Extraction completed successfully!"); 95 | 96 | println!( 97 | "cargo:rustc-link-search=native={}", 98 | output_directory.to_string_lossy() 99 | ); 100 | if cfg!(feature = "hello") { 101 | println!("cargo:rustc-link-lib=static=sqlite_hello0"); 102 | } 103 | if cfg!(feature = "hola") { 104 | println!("cargo:rustc-link-lib=static=sqlite_hola0"); 105 | } 106 | println!("cargo:rustc-link-arg=-Wl,-undefined,dynamic_lookup"); 107 | } 108 | -------------------------------------------------------------------------------- /bindings/elixir/mix.lock: -------------------------------------------------------------------------------- 1 | %{ 2 | "castore": {:hex, :castore, "1.0.2", "0c6292ecf3e3f20b7c88408f00096337c4bfd99bd46cc2fe63413ddbe45b3573", [:mix], [], "hexpm", "40b2dd2836199203df8500e4a270f10fc006cc95adc8a319e148dc3077391d96"}, 3 | "cc_precompiler": {:hex, :cc_precompiler, "0.1.7", "77de20ac77f0e53f20ca82c563520af0237c301a1ec3ab3bc598e8a96c7ee5d9", [:mix], [{:elixir_make, "~> 0.7.3", [hex: :elixir_make, repo: "hexpm", optional: false]}], "hexpm", "2768b28bf3c2b4f788c995576b39b8cb5d47eb788526d93bd52206c1d8bf4b75"}, 4 | "db_connection": {:hex, :db_connection, "2.5.0", "bb6d4f30d35ded97b29fe80d8bd6f928a1912ca1ff110831edcd238a1973652c", [:mix], [{:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "c92d5ba26cd69ead1ff7582dbb860adeedfff39774105a4f1c92cbb654b55aa2"}, 5 | "decimal": {:hex, :decimal, "2.1.1", "5611dca5d4b2c3dd497dec8f68751f1f1a54755e8ed2a966c2633cf885973ad6", [:mix], [], "hexpm", "53cfe5f497ed0e7771ae1a475575603d77425099ba5faef9394932b35020ffcc"}, 6 | "earmark_parser": {:hex, :earmark_parser, "1.4.32", "fa739a0ecfa34493de19426681b23f6814573faee95dfd4b4aafe15a7b5b32c6", [:mix], [], "hexpm", "b8b0dd77d60373e77a3d7e8afa598f325e49e8663a51bcc2b88ef41838cca755"}, 7 | "ecto": {:hex, :ecto, "3.10.1", "c6757101880e90acc6125b095853176a02da8f1afe056f91f1f90b80c9389822", [:mix], [{:decimal, "~> 1.6 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "d2ac4255f1601bdf7ac74c0ed971102c6829dc158719b94bd30041bbad77f87a"}, 8 | "ecto_sql": {:hex, :ecto_sql, "3.10.1", "6ea6b3036a0b0ca94c2a02613fd9f742614b5cfe494c41af2e6571bb034dd94c", [:mix], [{:db_connection, "~> 2.4.1 or ~> 2.5", [hex: :db_connection, repo: "hexpm", optional: false]}, {:ecto, "~> 3.10.0", [hex: :ecto, repo: "hexpm", optional: false]}, {:myxql, "~> 0.6.0", [hex: :myxql, repo: "hexpm", optional: true]}, {:postgrex, "~> 0.16.0 or ~> 0.17.0 or ~> 1.0", [hex: :postgrex, repo: "hexpm", optional: true]}, {:tds, "~> 2.1.1 or ~> 2.2", [hex: :tds, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4.0 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "f6a25bdbbd695f12c8171eaff0851fa4c8e72eec1e98c7364402dda9ce11c56b"}, 9 | "ecto_sqlite3": {:hex, :ecto_sqlite3, "0.10.3", "82ce316a8727f1daec397a9932b1a20130ea1ac33c3257b78eded1d3f45ae9b3", [:mix], [{:decimal, "~> 1.6 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:ecto, "~> 3.10", [hex: :ecto, repo: "hexpm", optional: false]}, {:ecto_sql, "~> 3.10", [hex: :ecto_sql, repo: "hexpm", optional: false]}, {:exqlite, "~> 0.9", [hex: :exqlite, repo: "hexpm", optional: false]}], "hexpm", "b4fa32d09f5e5c05d3401ade3dd4416e3c7072d5117c150cb4adeea72760fb93"}, 10 | "elixir_make": {:hex, :elixir_make, "0.7.6", "67716309dc5d43e16b5abbd00c01b8df6a0c2ab54a8f595468035a50189f9169", [:mix], [{:castore, "~> 0.1 or ~> 1.0", [hex: :castore, repo: "hexpm", optional: true]}], "hexpm", "5a0569756b0f7873a77687800c164cca6dfc03a09418e6fcf853d78991f49940"}, 11 | "ex_doc": {:hex, :ex_doc, "0.29.4", "6257ecbb20c7396b1fe5accd55b7b0d23f44b6aa18017b415cb4c2b91d997729", [:mix], [{:earmark_parser, "~> 1.4.31", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1", [hex: :makeup_erlang, repo: "hexpm", optional: false]}], "hexpm", "2c6699a737ae46cb61e4ed012af931b57b699643b24dabe2400a8168414bc4f5"}, 12 | "exqlite": {:hex, :exqlite, "0.13.12", "29996a0773869f98b6764b27fe55ab48744d03baabbbca8c1b990a3f15448a30", [:make, :mix], [{:cc_precompiler, "~> 0.1", [hex: :cc_precompiler, repo: "hexpm", optional: false]}, {:db_connection, "~> 2.1", [hex: :db_connection, repo: "hexpm", optional: false]}, {:elixir_make, "~> 0.7", [hex: :elixir_make, repo: "hexpm", optional: false]}, {:table, "~> 0.1.0", [hex: :table, repo: "hexpm", optional: true]}], "hexpm", "0fdc3ec52e432d45379265d0aad3e0e8524656cdf45f19a9d6dc45e3ce048cd7"}, 13 | "hex_core": {:hex, :hex_core, "0.10.0", "6e739a159b0141fa6c3c60c92b73aa6dec5b7909647a9b9ecea9da6709b75709", [:rebar3], [], "hexpm", "1c229aeb2df3a7ffc0c00fa4fc1721995058b2c617f083cf617e29258b1d9f57"}, 14 | "makeup": {:hex, :makeup, "1.1.0", "6b67c8bc2882a6b6a445859952a602afc1a41c2e08379ca057c0f525366fc3ca", [:mix], [{:nimble_parsec, "~> 1.2.2 or ~> 1.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "0a45ed501f4a8897f580eabf99a2e5234ea3e75a4373c8a52824f6e873be57a6"}, 15 | "makeup_elixir": {:hex, :makeup_elixir, "0.16.1", "cc9e3ca312f1cfeccc572b37a09980287e243648108384b97ff2b76e505c3555", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}, {:nimble_parsec, "~> 1.2.3 or ~> 1.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "e127a341ad1b209bd80f7bd1620a15693a9908ed780c3b763bccf7d200c767c6"}, 16 | "makeup_erlang": {:hex, :makeup_erlang, "0.1.1", "3fcb7f09eb9d98dc4d208f49cc955a34218fc41ff6b84df7c75b3e6e533cc65f", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "174d0809e98a4ef0b3309256cbf97101c6ec01c4ab0b23e926a9e17df2077cbb"}, 17 | "nimble_parsec": {:hex, :nimble_parsec, "1.3.1", "2c54013ecf170e249e9291ed0a62e5832f70a476c61da16f6aac6dca0189f2af", [:mix], [], "hexpm", "2682e3c0b2eb58d90c6375fc0cc30bc7be06f365bf72608804fb9cffa5e1b167"}, 18 | "telemetry": {:hex, :telemetry, "1.2.1", "68fdfe8d8f05a8428483a97d7aab2f268aaff24b49e0f599faa091f1d4e7f61c", [:rebar3], [], "hexpm", "dad9ce9d8effc621708f99eac538ef1cbe05d6a874dd741de2e689c47feafed5"}, 19 | } 20 | -------------------------------------------------------------------------------- /.github/workflows/release.yaml: -------------------------------------------------------------------------------- 1 | name: "Release" 2 | on: 3 | release: 4 | types: [published] 5 | permissions: 6 | contents: read 7 | jobs: 8 | build-linux-x86_64-extension: 9 | runs-on: ubuntu-20.04 10 | steps: 11 | - uses: actions/checkout@v3 12 | - run: make loadable static 13 | - uses: actions/upload-artifact@v4 14 | with: 15 | name: sqlite-hello-linux-x86_64-extension 16 | path: dist/* 17 | build-macos-x86_64-extension: 18 | runs-on: macos-11 19 | steps: 20 | - uses: actions/checkout@v3 21 | - run: make loadable static 22 | - uses: actions/upload-artifact@v4 23 | with: 24 | name: sqlite-hello-macos-x86_64-extension 25 | path: dist/* 26 | build-macos-aarch64-extension: 27 | runs-on: macos-11 28 | steps: 29 | - uses: actions/checkout@v3 30 | - run: make loadable static CFLAGS="-target arm64-apple-macos11" 31 | - uses: actions/upload-artifact@v4 32 | with: 33 | name: sqlite-hello-macos-aarch64-extension 34 | path: dist/* 35 | build-windows-x86_64-extension: 36 | runs-on: windows-2019 37 | steps: 38 | - uses: actions/checkout@v3 39 | - run: make loadable static 40 | - uses: actions/upload-artifact@v4 41 | with: 42 | name: sqlite-hello-windows-x86_64-extension 43 | path: dist/* 44 | dist: 45 | runs-on: ubuntu-latest 46 | needs: 47 | [ 48 | build-linux-x86_64-extension, 49 | build-macos-x86_64-extension, 50 | build-macos-aarch64-extension, 51 | build-windows-x86_64-extension, 52 | ] 53 | permissions: 54 | contents: write 55 | steps: 56 | - uses: actions/checkout@v3 57 | - uses: actions/download-artifact@v4 58 | with: 59 | name: sqlite-hello-linux-x86_64-extension 60 | path: dist/linux-x86_64 61 | - uses: actions/download-artifact@v4 62 | with: 63 | name: sqlite-hello-macos-x86_64-extension 64 | path: dist/macos-x86_64 65 | - uses: actions/download-artifact@v4 66 | with: 67 | name: sqlite-hello-macos-aarch64-extension 68 | path: dist/macos-aarch64 69 | - uses: actions/download-artifact@v4 70 | with: 71 | name: sqlite-hello-windows-x86_64-extension 72 | path: dist/windows-x86_64 73 | - run: | 74 | curl -L https://github.com/asg017/sqlite-dist/releases/download/v0.0.1-alpha.3/sqlite-dist-x86_64-unknown-linux-gnu.tar.xz \ 75 | | tar xfJ - --strip-components 1 76 | - run: ./sqlite-dist ./sqlite-dist.toml --input dist/ --output distx/ 77 | - run: | 78 | gh release upload ${{ github.ref_name }} \ 79 | distx/github_releases/* \ 80 | distx/spm/* \ 81 | distx/sqlpkg/* \ 82 | distx/checksums.txt \ 83 | distx/sqlite-dist-manifest.json \ 84 | distx/install.sh 85 | env: 86 | GH_TOKEN: ${{ github.token }} 87 | - name: Install node 88 | uses: actions/setup-node@v3 89 | with: 90 | node-version: "16" 91 | registry-url: "https://registry.npmjs.org" 92 | - run: | 93 | npm publish --access public distx/npm/sqlite-hello-darwin-arm64.tar.gz 94 | npm publish --access public distx/npm/sqlite-hello-darwin-x64.tar.gz 95 | npm publish --access public distx/npm/sqlite-hello-linux-x64.tar.gz 96 | npm publish --access public distx/npm/sqlite-hello-windows-x64.tar.gz 97 | npm publish --access public distx/npm/sqlite-hello.tar.gz 98 | env: 99 | NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} 100 | - uses: ruby/setup-ruby@v1 101 | with: 102 | ruby-version: 3.2 103 | #- run: | 104 | # for file in distx/gem/*; do 105 | # gem push "$file" 106 | # done 107 | # env: 108 | # GEM_HOST_API_KEY: ${{ secrets.GEM_HOST_API_KEY }} 109 | - uses: actions/setup-python@v5 110 | with: 111 | python-version: "3.12" 112 | - run: pip install twine 113 | - run: | 114 | twine upload distx/pip/* 115 | twine upload distx/datasette/* 116 | twine upload distx/sqlite_utils/* 117 | env: 118 | TWINE_USERNAME: __token__ 119 | TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} 120 | 121 | #upload-hex: 122 | # runs-on: ubuntu-latest 123 | # needs: [upload-extensions] 124 | # steps: 125 | # - uses: actions/checkout@v2 126 | # - uses: erlef/setup-beam@v1 127 | # with: 128 | # otp-version: "24" 129 | # rebar3-version: "3.16.1" 130 | # elixir-version: "1.14" 131 | # - run: ./scripts/elixir_generate_checksum.sh "${{ needs.upload-extensions.outputs.checksums }}" 132 | # - run: mix deps.get 133 | # working-directory: ./bindings/elixir 134 | # - run: mix compile --docs 135 | # working-directory: ./bindings/elixir 136 | # - run: mix hex.publish --yes 137 | # working-directory: ./bindings/elixir 138 | # env: 139 | # HEX_API_KEY: ${{ secrets.HEX_API_KEY }} 140 | #upload-crate: 141 | # runs-on: ubuntu-latest 142 | # needs: [upload-extensions] 143 | # steps: 144 | # - uses: actions/checkout@v2 145 | # - uses: actions-rs/toolchain@v1 146 | # with: 147 | # toolchain: stable 148 | # - run: cargo publish --no-verify 149 | # working-directory: ./bindings/rust 150 | # env: 151 | # CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} 152 | -------------------------------------------------------------------------------- /bindings/elixir/lib/sqlite_hello.ex: -------------------------------------------------------------------------------- 1 | defmodule SqliteHello do 2 | @moduledoc """ 3 | `SqliteHello` module which installs the hello0 and hola0 extensions. 4 | """ 5 | use Application 6 | require Logger 7 | 8 | @doc false 9 | def start(_, _) do 10 | Supervisor.start_link([], strategy: :one_for_one) 11 | end 12 | 13 | @doc """ 14 | Returns the configured sqlite_hello version. 15 | """ 16 | def current_version do 17 | config = :hex_core.default_config() 18 | 19 | {:ok, _} = Application.ensure_all_started(:inets) 20 | {:ok, _} = Application.ensure_all_started(:ssl) 21 | 22 | updated_config = 23 | Map.put(config, :http_adapter, {:hex_http_httpc, %{http_options: http_options()}}) 24 | 25 | case :hex_api_package.get(updated_config, "sqlite_hello") do 26 | {:ok, {200, _headers, response}} -> 27 | response 28 | |> Map.get("releases") 29 | |> Enum.map(& &1["version"]) 30 | |> List.first() 31 | 32 | {:ok, {404, _, _}} -> 33 | # TODO: remove this fallback once sqlite_hello is published 34 | "0.1.0-alpha.39" 35 | 36 | {:error, reason} -> 37 | reason 38 | end 39 | end 40 | 41 | @doc """ 42 | Installs sqlite_hello with `current_version/0`. 43 | """ 44 | def install(base_url \\ default_base_url()) do 45 | url = get_url(base_url) 46 | 47 | tar_binary = fetch_body!(url) 48 | 49 | bin_path = bin_path() 50 | 51 | with :ok <- 52 | :erl_tar.extract({:binary, tar_binary}, [ 53 | :compressed, 54 | cwd: to_charlist(bin_path) 55 | ]) do 56 | Logger.debug("Copying artifact from release and extracting to #{bin_path}") 57 | :ok 58 | end 59 | end 60 | 61 | @doc """ 62 | Returns the path to the executable. 63 | 64 | The executable may not be available if it was not yet installed. 65 | """ 66 | def bin_path do 67 | {:ok, current_target} = current_target() 68 | name = "sqlite-hello-#{current_target}" 69 | 70 | Application.get_env(:sqlite_hello, :path) || 71 | if Code.ensure_loaded?(Mix.Project) do 72 | Path.join(Path.dirname(Mix.Project.build_path()), name) 73 | else 74 | Path.expand("_build/#{name}") 75 | end 76 | end 77 | 78 | def filename(target) do 79 | "sqlite-hello-v#{current_version()}-loadable-#{target}.tar.gz" 80 | end 81 | 82 | @doc """ 83 | The default URL to install SqliteHello from. 84 | """ 85 | def default_base_url do 86 | "https://github.com/asg017/sqlite-hello/releases/download/v$version/sqlite-hello-v$version-loadable-$target.tar.gz" 87 | end 88 | 89 | def loadable_path_hola0() do 90 | SqliteHello.bin_path() <> "/hola0" 91 | end 92 | 93 | def loadable_path_hello0() do 94 | SqliteHello.bin_path() <> "/hello0" 95 | end 96 | 97 | defp target_config do 98 | current_system_arch = system_arch() 99 | 100 | %{ 101 | os_type: :os.type(), 102 | target_system: current_system_arch, 103 | word_size: :erlang.system_info(:wordsize) 104 | } 105 | end 106 | 107 | def current_target!(target_config \\ target_config()) do 108 | current_target(target_config) 109 | |> elem(1) 110 | end 111 | 112 | def current_target(target_config \\ target_config()) do 113 | %{os_type: os_type, target_system: target_system} = target_config 114 | arch_str = target_system |> Map.values() |> Enum.join("-") 115 | 116 | case os_type do 117 | {:win32, _} -> 118 | {:error, "sqlite-hello is not available for architecture: #{arch_str}"} 119 | 120 | {:unix, osname} -> 121 | osname = if osname == :darwin, do: "macos", else: osname 122 | 123 | case target_config.target_system.arch do 124 | "x86_64" -> 125 | {:ok, "#{osname}-x86_64"} 126 | 127 | "aarch64" -> 128 | {:ok, "#{osname}-aarch64"} 129 | 130 | _ -> 131 | {:error, 132 | "precompiled artifact is not available for this target: \"#{arch_str}\".\nThe available targets are:\n - linux-x86_64\n - macos-aarch64\n - macos-x86_64"} 133 | end 134 | end 135 | end 136 | 137 | defp http_options(scheme) do 138 | http_options() 139 | |> maybe_add_proxy_auth(scheme) 140 | end 141 | 142 | defp http_options do 143 | # https://erlef.github.io/security-wg/secure_coding_and_deployment_hardening/inets 144 | cacertfile = cacertfile() |> String.to_charlist() 145 | 146 | [ 147 | ssl: [ 148 | verify: :verify_peer, 149 | cacertfile: cacertfile, 150 | depth: 2, 151 | customize_hostname_check: [ 152 | match_fun: :public_key.pkix_verify_hostname_match_fun(:https) 153 | ] 154 | ] 155 | ] 156 | end 157 | 158 | defp fetch_body!(url) do 159 | scheme = URI.parse(url).scheme 160 | url = String.to_charlist(url) 161 | Logger.debug("Downloading sqlite-hello from #{url}") 162 | 163 | {:ok, _} = Application.ensure_all_started(:inets) 164 | {:ok, _} = Application.ensure_all_started(:ssl) 165 | 166 | if proxy = proxy_for_scheme(scheme) do 167 | %{host: host, port: port} = URI.parse(proxy) 168 | Logger.debug("Using #{String.upcase(scheme)}_PROXY: #{proxy}") 169 | set_option = if "https" == scheme, do: :https_proxy, else: :proxy 170 | :httpc.set_options([{set_option, {{String.to_charlist(host), port}, []}}]) 171 | end 172 | 173 | options = [body_format: :binary] 174 | 175 | case :httpc.request(:get, {url, []}, http_options(scheme), options) do 176 | {:ok, {{_, 200, _}, _headers, body}} -> 177 | body 178 | 179 | other -> 180 | raise """ 181 | couldn't fetch #{url}: #{inspect(other)} 182 | 183 | You may also install the "sqlite_hello" executable manually, \ 184 | see the docs: https://hexdocs.pm/sqlite_hello 185 | """ 186 | end 187 | end 188 | 189 | defp proxy_for_scheme("http") do 190 | System.get_env("HTTP_PROXY") || System.get_env("http_proxy") 191 | end 192 | 193 | defp proxy_for_scheme("https") do 194 | System.get_env("HTTPS_PROXY") || System.get_env("https_proxy") 195 | end 196 | 197 | defp maybe_add_proxy_auth(http_options, scheme) do 198 | case proxy_auth(scheme) do 199 | nil -> http_options 200 | auth -> [{:proxy_auth, auth} | http_options] 201 | end 202 | end 203 | 204 | defp proxy_auth(scheme) do 205 | with proxy when is_binary(proxy) <- proxy_for_scheme(scheme), 206 | %{userinfo: userinfo} when is_binary(userinfo) <- URI.parse(proxy), 207 | [username, password] <- String.split(userinfo, ":") do 208 | {String.to_charlist(username), String.to_charlist(password)} 209 | else 210 | _ -> nil 211 | end 212 | end 213 | 214 | defp cacertfile() do 215 | Application.get_env(:sqlite_hello, :cacerts_path) || CAStore.file_path() 216 | end 217 | 218 | defp get_url(base_url, target \\ current_target!()) do 219 | base_url 220 | |> String.replace("$version", current_version()) 221 | |> String.replace("$target", target) 222 | end 223 | 224 | # Returns a map with `:arch`, `:vendor`, `:os` and maybe `:abi`. 225 | defp system_arch do 226 | base = 227 | :erlang.system_info(:system_architecture) 228 | |> List.to_string() 229 | |> String.split("-") 230 | 231 | triple_keys = 232 | case length(base) do 233 | 4 -> 234 | [:arch, :vendor, :os, :abi] 235 | 236 | 3 -> 237 | [:arch, :vendor, :os] 238 | 239 | _ -> 240 | # It's too complicated to find out, and we won't support this for now. 241 | [] 242 | end 243 | 244 | triple_keys 245 | |> Enum.zip(base) 246 | |> Enum.into(%{}) 247 | end 248 | end 249 | -------------------------------------------------------------------------------- /bindings/rust/Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "adler" 7 | version = "1.0.2" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" 10 | 11 | [[package]] 12 | name = "aes" 13 | version = "0.8.4" 14 | source = "registry+https://github.com/rust-lang/crates.io-index" 15 | checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" 16 | dependencies = [ 17 | "cfg-if", 18 | "cipher", 19 | "cpufeatures", 20 | ] 21 | 22 | [[package]] 23 | name = "ahash" 24 | version = "0.8.11" 25 | source = "registry+https://github.com/rust-lang/crates.io-index" 26 | checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" 27 | dependencies = [ 28 | "cfg-if", 29 | "once_cell", 30 | "version_check", 31 | "zerocopy", 32 | ] 33 | 34 | [[package]] 35 | name = "allocator-api2" 36 | version = "0.2.16" 37 | source = "registry+https://github.com/rust-lang/crates.io-index" 38 | checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" 39 | 40 | [[package]] 41 | name = "anyhow" 42 | version = "1.0.81" 43 | source = "registry+https://github.com/rust-lang/crates.io-index" 44 | checksum = "0952808a6c2afd1aa8947271f3a60f1a6763c7b912d210184c5149b5cf147247" 45 | 46 | [[package]] 47 | name = "base64" 48 | version = "0.21.7" 49 | source = "registry+https://github.com/rust-lang/crates.io-index" 50 | checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" 51 | 52 | [[package]] 53 | name = "base64ct" 54 | version = "1.6.0" 55 | source = "registry+https://github.com/rust-lang/crates.io-index" 56 | checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" 57 | 58 | [[package]] 59 | name = "bitflags" 60 | version = "1.3.2" 61 | source = "registry+https://github.com/rust-lang/crates.io-index" 62 | checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" 63 | 64 | [[package]] 65 | name = "bitflags" 66 | version = "2.5.0" 67 | source = "registry+https://github.com/rust-lang/crates.io-index" 68 | checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" 69 | 70 | [[package]] 71 | name = "block-buffer" 72 | version = "0.10.4" 73 | source = "registry+https://github.com/rust-lang/crates.io-index" 74 | checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" 75 | dependencies = [ 76 | "generic-array", 77 | ] 78 | 79 | [[package]] 80 | name = "byteorder" 81 | version = "1.5.0" 82 | source = "registry+https://github.com/rust-lang/crates.io-index" 83 | checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" 84 | 85 | [[package]] 86 | name = "bzip2" 87 | version = "0.4.4" 88 | source = "registry+https://github.com/rust-lang/crates.io-index" 89 | checksum = "bdb116a6ef3f6c3698828873ad02c3014b3c85cadb88496095628e3ef1e347f8" 90 | dependencies = [ 91 | "bzip2-sys", 92 | "libc", 93 | ] 94 | 95 | [[package]] 96 | name = "bzip2-sys" 97 | version = "0.1.11+1.0.8" 98 | source = "registry+https://github.com/rust-lang/crates.io-index" 99 | checksum = "736a955f3fa7875102d57c82b8cac37ec45224a07fd32d58f9f7a186b6cd4cdc" 100 | dependencies = [ 101 | "cc", 102 | "libc", 103 | "pkg-config", 104 | ] 105 | 106 | [[package]] 107 | name = "cc" 108 | version = "1.0.90" 109 | source = "registry+https://github.com/rust-lang/crates.io-index" 110 | checksum = "8cd6604a82acf3039f1144f54b8eb34e91ffba622051189e71b781822d5ee1f5" 111 | dependencies = [ 112 | "jobserver", 113 | "libc", 114 | ] 115 | 116 | [[package]] 117 | name = "cfg-if" 118 | version = "1.0.0" 119 | source = "registry+https://github.com/rust-lang/crates.io-index" 120 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 121 | 122 | [[package]] 123 | name = "cipher" 124 | version = "0.4.4" 125 | source = "registry+https://github.com/rust-lang/crates.io-index" 126 | checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" 127 | dependencies = [ 128 | "crypto-common", 129 | "inout", 130 | ] 131 | 132 | [[package]] 133 | name = "constant_time_eq" 134 | version = "0.1.5" 135 | source = "registry+https://github.com/rust-lang/crates.io-index" 136 | checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" 137 | 138 | [[package]] 139 | name = "cpufeatures" 140 | version = "0.2.12" 141 | source = "registry+https://github.com/rust-lang/crates.io-index" 142 | checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" 143 | dependencies = [ 144 | "libc", 145 | ] 146 | 147 | [[package]] 148 | name = "crc32fast" 149 | version = "1.4.0" 150 | source = "registry+https://github.com/rust-lang/crates.io-index" 151 | checksum = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa" 152 | dependencies = [ 153 | "cfg-if", 154 | ] 155 | 156 | [[package]] 157 | name = "crossbeam-utils" 158 | version = "0.8.19" 159 | source = "registry+https://github.com/rust-lang/crates.io-index" 160 | checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" 161 | 162 | [[package]] 163 | name = "crypto-common" 164 | version = "0.1.6" 165 | source = "registry+https://github.com/rust-lang/crates.io-index" 166 | checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" 167 | dependencies = [ 168 | "generic-array", 169 | "typenum", 170 | ] 171 | 172 | [[package]] 173 | name = "deranged" 174 | version = "0.3.11" 175 | source = "registry+https://github.com/rust-lang/crates.io-index" 176 | checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" 177 | dependencies = [ 178 | "powerfmt", 179 | ] 180 | 181 | [[package]] 182 | name = "digest" 183 | version = "0.10.7" 184 | source = "registry+https://github.com/rust-lang/crates.io-index" 185 | checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" 186 | dependencies = [ 187 | "block-buffer", 188 | "crypto-common", 189 | "subtle", 190 | ] 191 | 192 | [[package]] 193 | name = "errno" 194 | version = "0.3.8" 195 | source = "registry+https://github.com/rust-lang/crates.io-index" 196 | checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" 197 | dependencies = [ 198 | "libc", 199 | "windows-sys", 200 | ] 201 | 202 | [[package]] 203 | name = "fallible-iterator" 204 | version = "0.2.0" 205 | source = "registry+https://github.com/rust-lang/crates.io-index" 206 | checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" 207 | 208 | [[package]] 209 | name = "fallible-streaming-iterator" 210 | version = "0.1.9" 211 | source = "registry+https://github.com/rust-lang/crates.io-index" 212 | checksum = "7360491ce676a36bf9bb3c56c1aa791658183a54d2744120f27285738d90465a" 213 | 214 | [[package]] 215 | name = "filetime" 216 | version = "0.2.23" 217 | source = "registry+https://github.com/rust-lang/crates.io-index" 218 | checksum = "1ee447700ac8aa0b2f2bd7bc4462ad686ba06baa6727ac149a2d6277f0d240fd" 219 | dependencies = [ 220 | "cfg-if", 221 | "libc", 222 | "redox_syscall", 223 | "windows-sys", 224 | ] 225 | 226 | [[package]] 227 | name = "flate2" 228 | version = "1.0.28" 229 | source = "registry+https://github.com/rust-lang/crates.io-index" 230 | checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" 231 | dependencies = [ 232 | "crc32fast", 233 | "miniz_oxide", 234 | ] 235 | 236 | [[package]] 237 | name = "form_urlencoded" 238 | version = "1.2.1" 239 | source = "registry+https://github.com/rust-lang/crates.io-index" 240 | checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" 241 | dependencies = [ 242 | "percent-encoding", 243 | ] 244 | 245 | [[package]] 246 | name = "generic-array" 247 | version = "0.14.7" 248 | source = "registry+https://github.com/rust-lang/crates.io-index" 249 | checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" 250 | dependencies = [ 251 | "typenum", 252 | "version_check", 253 | ] 254 | 255 | [[package]] 256 | name = "getrandom" 257 | version = "0.2.12" 258 | source = "registry+https://github.com/rust-lang/crates.io-index" 259 | checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" 260 | dependencies = [ 261 | "cfg-if", 262 | "libc", 263 | "wasi", 264 | ] 265 | 266 | [[package]] 267 | name = "hashbrown" 268 | version = "0.14.3" 269 | source = "registry+https://github.com/rust-lang/crates.io-index" 270 | checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" 271 | dependencies = [ 272 | "ahash", 273 | "allocator-api2", 274 | ] 275 | 276 | [[package]] 277 | name = "hashlink" 278 | version = "0.8.4" 279 | source = "registry+https://github.com/rust-lang/crates.io-index" 280 | checksum = "e8094feaf31ff591f651a2664fb9cfd92bba7a60ce3197265e9482ebe753c8f7" 281 | dependencies = [ 282 | "hashbrown", 283 | ] 284 | 285 | [[package]] 286 | name = "hmac" 287 | version = "0.12.1" 288 | source = "registry+https://github.com/rust-lang/crates.io-index" 289 | checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" 290 | dependencies = [ 291 | "digest", 292 | ] 293 | 294 | [[package]] 295 | name = "idna" 296 | version = "0.5.0" 297 | source = "registry+https://github.com/rust-lang/crates.io-index" 298 | checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" 299 | dependencies = [ 300 | "unicode-bidi", 301 | "unicode-normalization", 302 | ] 303 | 304 | [[package]] 305 | name = "inout" 306 | version = "0.1.3" 307 | source = "registry+https://github.com/rust-lang/crates.io-index" 308 | checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" 309 | dependencies = [ 310 | "generic-array", 311 | ] 312 | 313 | [[package]] 314 | name = "jobserver" 315 | version = "0.1.28" 316 | source = "registry+https://github.com/rust-lang/crates.io-index" 317 | checksum = "ab46a6e9526ddef3ae7f787c06f0f2600639ba80ea3eade3d8e670a2230f51d6" 318 | dependencies = [ 319 | "libc", 320 | ] 321 | 322 | [[package]] 323 | name = "libc" 324 | version = "0.2.153" 325 | source = "registry+https://github.com/rust-lang/crates.io-index" 326 | checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" 327 | 328 | [[package]] 329 | name = "libsqlite3-sys" 330 | version = "0.26.0" 331 | source = "registry+https://github.com/rust-lang/crates.io-index" 332 | checksum = "afc22eff61b133b115c6e8c74e818c628d6d5e7a502afea6f64dee076dd94326" 333 | dependencies = [ 334 | "pkg-config", 335 | "vcpkg", 336 | ] 337 | 338 | [[package]] 339 | name = "linux-raw-sys" 340 | version = "0.4.13" 341 | source = "registry+https://github.com/rust-lang/crates.io-index" 342 | checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" 343 | 344 | [[package]] 345 | name = "log" 346 | version = "0.4.21" 347 | source = "registry+https://github.com/rust-lang/crates.io-index" 348 | checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" 349 | 350 | [[package]] 351 | name = "miniz_oxide" 352 | version = "0.7.2" 353 | source = "registry+https://github.com/rust-lang/crates.io-index" 354 | checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" 355 | dependencies = [ 356 | "adler", 357 | ] 358 | 359 | [[package]] 360 | name = "num-conv" 361 | version = "0.1.0" 362 | source = "registry+https://github.com/rust-lang/crates.io-index" 363 | checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" 364 | 365 | [[package]] 366 | name = "once_cell" 367 | version = "1.19.0" 368 | source = "registry+https://github.com/rust-lang/crates.io-index" 369 | checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" 370 | 371 | [[package]] 372 | name = "password-hash" 373 | version = "0.4.2" 374 | source = "registry+https://github.com/rust-lang/crates.io-index" 375 | checksum = "7676374caaee8a325c9e7a2ae557f216c5563a171d6997b0ef8a65af35147700" 376 | dependencies = [ 377 | "base64ct", 378 | "rand_core", 379 | "subtle", 380 | ] 381 | 382 | [[package]] 383 | name = "pbkdf2" 384 | version = "0.11.0" 385 | source = "registry+https://github.com/rust-lang/crates.io-index" 386 | checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" 387 | dependencies = [ 388 | "digest", 389 | "hmac", 390 | "password-hash", 391 | "sha2", 392 | ] 393 | 394 | [[package]] 395 | name = "percent-encoding" 396 | version = "2.3.1" 397 | source = "registry+https://github.com/rust-lang/crates.io-index" 398 | checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" 399 | 400 | [[package]] 401 | name = "pkg-config" 402 | version = "0.3.30" 403 | source = "registry+https://github.com/rust-lang/crates.io-index" 404 | checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" 405 | 406 | [[package]] 407 | name = "powerfmt" 408 | version = "0.2.0" 409 | source = "registry+https://github.com/rust-lang/crates.io-index" 410 | checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" 411 | 412 | [[package]] 413 | name = "proc-macro2" 414 | version = "1.0.79" 415 | source = "registry+https://github.com/rust-lang/crates.io-index" 416 | checksum = "e835ff2298f5721608eb1a980ecaee1aef2c132bf95ecc026a11b7bf3c01c02e" 417 | dependencies = [ 418 | "unicode-ident", 419 | ] 420 | 421 | [[package]] 422 | name = "quote" 423 | version = "1.0.35" 424 | source = "registry+https://github.com/rust-lang/crates.io-index" 425 | checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" 426 | dependencies = [ 427 | "proc-macro2", 428 | ] 429 | 430 | [[package]] 431 | name = "rand_core" 432 | version = "0.6.4" 433 | source = "registry+https://github.com/rust-lang/crates.io-index" 434 | checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" 435 | 436 | [[package]] 437 | name = "redox_syscall" 438 | version = "0.4.1" 439 | source = "registry+https://github.com/rust-lang/crates.io-index" 440 | checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" 441 | dependencies = [ 442 | "bitflags 1.3.2", 443 | ] 444 | 445 | [[package]] 446 | name = "ring" 447 | version = "0.17.8" 448 | source = "registry+https://github.com/rust-lang/crates.io-index" 449 | checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" 450 | dependencies = [ 451 | "cc", 452 | "cfg-if", 453 | "getrandom", 454 | "libc", 455 | "spin", 456 | "untrusted", 457 | "windows-sys", 458 | ] 459 | 460 | [[package]] 461 | name = "rusqlite" 462 | version = "0.29.0" 463 | source = "registry+https://github.com/rust-lang/crates.io-index" 464 | checksum = "549b9d036d571d42e6e85d1c1425e2ac83491075078ca9a15be021c56b1641f2" 465 | dependencies = [ 466 | "bitflags 2.5.0", 467 | "fallible-iterator", 468 | "fallible-streaming-iterator", 469 | "hashlink", 470 | "libsqlite3-sys", 471 | "smallvec", 472 | ] 473 | 474 | [[package]] 475 | name = "rustix" 476 | version = "0.38.32" 477 | source = "registry+https://github.com/rust-lang/crates.io-index" 478 | checksum = "65e04861e65f21776e67888bfbea442b3642beaa0138fdb1dd7a84a52dffdb89" 479 | dependencies = [ 480 | "bitflags 2.5.0", 481 | "errno", 482 | "libc", 483 | "linux-raw-sys", 484 | "windows-sys", 485 | ] 486 | 487 | [[package]] 488 | name = "rustls" 489 | version = "0.22.2" 490 | source = "registry+https://github.com/rust-lang/crates.io-index" 491 | checksum = "e87c9956bd9807afa1f77e0f7594af32566e830e088a5576d27c5b6f30f49d41" 492 | dependencies = [ 493 | "log", 494 | "ring", 495 | "rustls-pki-types", 496 | "rustls-webpki", 497 | "subtle", 498 | "zeroize", 499 | ] 500 | 501 | [[package]] 502 | name = "rustls-pki-types" 503 | version = "1.4.0" 504 | source = "registry+https://github.com/rust-lang/crates.io-index" 505 | checksum = "868e20fada228fefaf6b652e00cc73623d54f8171e7352c18bb281571f2d92da" 506 | 507 | [[package]] 508 | name = "rustls-webpki" 509 | version = "0.102.2" 510 | source = "registry+https://github.com/rust-lang/crates.io-index" 511 | checksum = "faaa0a62740bedb9b2ef5afa303da42764c012f743917351dc9a237ea1663610" 512 | dependencies = [ 513 | "ring", 514 | "rustls-pki-types", 515 | "untrusted", 516 | ] 517 | 518 | [[package]] 519 | name = "serde" 520 | version = "1.0.197" 521 | source = "registry+https://github.com/rust-lang/crates.io-index" 522 | checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2" 523 | dependencies = [ 524 | "serde_derive", 525 | ] 526 | 527 | [[package]] 528 | name = "serde_derive" 529 | version = "1.0.197" 530 | source = "registry+https://github.com/rust-lang/crates.io-index" 531 | checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" 532 | dependencies = [ 533 | "proc-macro2", 534 | "quote", 535 | "syn", 536 | ] 537 | 538 | [[package]] 539 | name = "sha1" 540 | version = "0.10.6" 541 | source = "registry+https://github.com/rust-lang/crates.io-index" 542 | checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" 543 | dependencies = [ 544 | "cfg-if", 545 | "cpufeatures", 546 | "digest", 547 | ] 548 | 549 | [[package]] 550 | name = "sha2" 551 | version = "0.10.8" 552 | source = "registry+https://github.com/rust-lang/crates.io-index" 553 | checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" 554 | dependencies = [ 555 | "cfg-if", 556 | "cpufeatures", 557 | "digest", 558 | ] 559 | 560 | [[package]] 561 | name = "smallvec" 562 | version = "1.13.2" 563 | source = "registry+https://github.com/rust-lang/crates.io-index" 564 | checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" 565 | 566 | [[package]] 567 | name = "spin" 568 | version = "0.9.8" 569 | source = "registry+https://github.com/rust-lang/crates.io-index" 570 | checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" 571 | 572 | [[package]] 573 | name = "sqlite-hello" 574 | version = "0.1.0-alpha.79" 575 | dependencies = [ 576 | "anyhow", 577 | "flate2", 578 | "rusqlite", 579 | "tar", 580 | "ureq", 581 | "zip", 582 | ] 583 | 584 | [[package]] 585 | name = "subtle" 586 | version = "2.5.0" 587 | source = "registry+https://github.com/rust-lang/crates.io-index" 588 | checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" 589 | 590 | [[package]] 591 | name = "syn" 592 | version = "2.0.53" 593 | source = "registry+https://github.com/rust-lang/crates.io-index" 594 | checksum = "7383cd0e49fff4b6b90ca5670bfd3e9d6a733b3f90c686605aa7eec8c4996032" 595 | dependencies = [ 596 | "proc-macro2", 597 | "quote", 598 | "unicode-ident", 599 | ] 600 | 601 | [[package]] 602 | name = "tar" 603 | version = "0.4.40" 604 | source = "registry+https://github.com/rust-lang/crates.io-index" 605 | checksum = "b16afcea1f22891c49a00c751c7b63b2233284064f11a200fc624137c51e2ddb" 606 | dependencies = [ 607 | "filetime", 608 | "libc", 609 | "xattr", 610 | ] 611 | 612 | [[package]] 613 | name = "time" 614 | version = "0.3.34" 615 | source = "registry+https://github.com/rust-lang/crates.io-index" 616 | checksum = "c8248b6521bb14bc45b4067159b9b6ad792e2d6d754d6c41fb50e29fefe38749" 617 | dependencies = [ 618 | "deranged", 619 | "num-conv", 620 | "powerfmt", 621 | "serde", 622 | "time-core", 623 | ] 624 | 625 | [[package]] 626 | name = "time-core" 627 | version = "0.1.2" 628 | source = "registry+https://github.com/rust-lang/crates.io-index" 629 | checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" 630 | 631 | [[package]] 632 | name = "tinyvec" 633 | version = "1.6.0" 634 | source = "registry+https://github.com/rust-lang/crates.io-index" 635 | checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" 636 | dependencies = [ 637 | "tinyvec_macros", 638 | ] 639 | 640 | [[package]] 641 | name = "tinyvec_macros" 642 | version = "0.1.1" 643 | source = "registry+https://github.com/rust-lang/crates.io-index" 644 | checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" 645 | 646 | [[package]] 647 | name = "typenum" 648 | version = "1.17.0" 649 | source = "registry+https://github.com/rust-lang/crates.io-index" 650 | checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" 651 | 652 | [[package]] 653 | name = "unicode-bidi" 654 | version = "0.3.15" 655 | source = "registry+https://github.com/rust-lang/crates.io-index" 656 | checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" 657 | 658 | [[package]] 659 | name = "unicode-ident" 660 | version = "1.0.12" 661 | source = "registry+https://github.com/rust-lang/crates.io-index" 662 | checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" 663 | 664 | [[package]] 665 | name = "unicode-normalization" 666 | version = "0.1.23" 667 | source = "registry+https://github.com/rust-lang/crates.io-index" 668 | checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" 669 | dependencies = [ 670 | "tinyvec", 671 | ] 672 | 673 | [[package]] 674 | name = "untrusted" 675 | version = "0.9.0" 676 | source = "registry+https://github.com/rust-lang/crates.io-index" 677 | checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" 678 | 679 | [[package]] 680 | name = "ureq" 681 | version = "2.9.6" 682 | source = "registry+https://github.com/rust-lang/crates.io-index" 683 | checksum = "11f214ce18d8b2cbe84ed3aa6486ed3f5b285cf8d8fbdbce9f3f767a724adc35" 684 | dependencies = [ 685 | "base64", 686 | "flate2", 687 | "log", 688 | "once_cell", 689 | "rustls", 690 | "rustls-pki-types", 691 | "rustls-webpki", 692 | "url", 693 | "webpki-roots", 694 | ] 695 | 696 | [[package]] 697 | name = "url" 698 | version = "2.5.0" 699 | source = "registry+https://github.com/rust-lang/crates.io-index" 700 | checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" 701 | dependencies = [ 702 | "form_urlencoded", 703 | "idna", 704 | "percent-encoding", 705 | ] 706 | 707 | [[package]] 708 | name = "vcpkg" 709 | version = "0.2.15" 710 | source = "registry+https://github.com/rust-lang/crates.io-index" 711 | checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" 712 | 713 | [[package]] 714 | name = "version_check" 715 | version = "0.9.4" 716 | source = "registry+https://github.com/rust-lang/crates.io-index" 717 | checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" 718 | 719 | [[package]] 720 | name = "wasi" 721 | version = "0.11.0+wasi-snapshot-preview1" 722 | source = "registry+https://github.com/rust-lang/crates.io-index" 723 | checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" 724 | 725 | [[package]] 726 | name = "webpki-roots" 727 | version = "0.26.1" 728 | source = "registry+https://github.com/rust-lang/crates.io-index" 729 | checksum = "b3de34ae270483955a94f4b21bdaaeb83d508bb84a01435f393818edb0012009" 730 | dependencies = [ 731 | "rustls-pki-types", 732 | ] 733 | 734 | [[package]] 735 | name = "windows-sys" 736 | version = "0.52.0" 737 | source = "registry+https://github.com/rust-lang/crates.io-index" 738 | checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" 739 | dependencies = [ 740 | "windows-targets", 741 | ] 742 | 743 | [[package]] 744 | name = "windows-targets" 745 | version = "0.52.4" 746 | source = "registry+https://github.com/rust-lang/crates.io-index" 747 | checksum = "7dd37b7e5ab9018759f893a1952c9420d060016fc19a472b4bb20d1bdd694d1b" 748 | dependencies = [ 749 | "windows_aarch64_gnullvm", 750 | "windows_aarch64_msvc", 751 | "windows_i686_gnu", 752 | "windows_i686_msvc", 753 | "windows_x86_64_gnu", 754 | "windows_x86_64_gnullvm", 755 | "windows_x86_64_msvc", 756 | ] 757 | 758 | [[package]] 759 | name = "windows_aarch64_gnullvm" 760 | version = "0.52.4" 761 | source = "registry+https://github.com/rust-lang/crates.io-index" 762 | checksum = "bcf46cf4c365c6f2d1cc93ce535f2c8b244591df96ceee75d8e83deb70a9cac9" 763 | 764 | [[package]] 765 | name = "windows_aarch64_msvc" 766 | version = "0.52.4" 767 | source = "registry+https://github.com/rust-lang/crates.io-index" 768 | checksum = "da9f259dd3bcf6990b55bffd094c4f7235817ba4ceebde8e6d11cd0c5633b675" 769 | 770 | [[package]] 771 | name = "windows_i686_gnu" 772 | version = "0.52.4" 773 | source = "registry+https://github.com/rust-lang/crates.io-index" 774 | checksum = "b474d8268f99e0995f25b9f095bc7434632601028cf86590aea5c8a5cb7801d3" 775 | 776 | [[package]] 777 | name = "windows_i686_msvc" 778 | version = "0.52.4" 779 | source = "registry+https://github.com/rust-lang/crates.io-index" 780 | checksum = "1515e9a29e5bed743cb4415a9ecf5dfca648ce85ee42e15873c3cd8610ff8e02" 781 | 782 | [[package]] 783 | name = "windows_x86_64_gnu" 784 | version = "0.52.4" 785 | source = "registry+https://github.com/rust-lang/crates.io-index" 786 | checksum = "5eee091590e89cc02ad514ffe3ead9eb6b660aedca2183455434b93546371a03" 787 | 788 | [[package]] 789 | name = "windows_x86_64_gnullvm" 790 | version = "0.52.4" 791 | source = "registry+https://github.com/rust-lang/crates.io-index" 792 | checksum = "77ca79f2451b49fa9e2af39f0747fe999fcda4f5e241b2898624dca97a1f2177" 793 | 794 | [[package]] 795 | name = "windows_x86_64_msvc" 796 | version = "0.52.4" 797 | source = "registry+https://github.com/rust-lang/crates.io-index" 798 | checksum = "32b752e52a2da0ddfbdbcc6fceadfeede4c939ed16d13e648833a61dfb611ed8" 799 | 800 | [[package]] 801 | name = "xattr" 802 | version = "1.3.1" 803 | source = "registry+https://github.com/rust-lang/crates.io-index" 804 | checksum = "8da84f1a25939b27f6820d92aed108f83ff920fdf11a7b19366c27c4cda81d4f" 805 | dependencies = [ 806 | "libc", 807 | "linux-raw-sys", 808 | "rustix", 809 | ] 810 | 811 | [[package]] 812 | name = "zerocopy" 813 | version = "0.7.32" 814 | source = "registry+https://github.com/rust-lang/crates.io-index" 815 | checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be" 816 | dependencies = [ 817 | "zerocopy-derive", 818 | ] 819 | 820 | [[package]] 821 | name = "zerocopy-derive" 822 | version = "0.7.32" 823 | source = "registry+https://github.com/rust-lang/crates.io-index" 824 | checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" 825 | dependencies = [ 826 | "proc-macro2", 827 | "quote", 828 | "syn", 829 | ] 830 | 831 | [[package]] 832 | name = "zeroize" 833 | version = "1.7.0" 834 | source = "registry+https://github.com/rust-lang/crates.io-index" 835 | checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" 836 | 837 | [[package]] 838 | name = "zip" 839 | version = "0.6.6" 840 | source = "registry+https://github.com/rust-lang/crates.io-index" 841 | checksum = "760394e246e4c28189f19d488c058bf16f564016aefac5d32bb1f3b51d5e9261" 842 | dependencies = [ 843 | "aes", 844 | "byteorder", 845 | "bzip2", 846 | "constant_time_eq", 847 | "crc32fast", 848 | "crossbeam-utils", 849 | "flate2", 850 | "hmac", 851 | "pbkdf2", 852 | "sha1", 853 | "time", 854 | "zstd", 855 | ] 856 | 857 | [[package]] 858 | name = "zstd" 859 | version = "0.11.2+zstd.1.5.2" 860 | source = "registry+https://github.com/rust-lang/crates.io-index" 861 | checksum = "20cc960326ece64f010d2d2107537f26dc589a6573a316bd5b1dba685fa5fde4" 862 | dependencies = [ 863 | "zstd-safe", 864 | ] 865 | 866 | [[package]] 867 | name = "zstd-safe" 868 | version = "5.0.2+zstd.1.5.2" 869 | source = "registry+https://github.com/rust-lang/crates.io-index" 870 | checksum = "1d2a5585e04f9eea4b2a3d1eca508c4dee9592a89ef6f450c11719da0726f4db" 871 | dependencies = [ 872 | "libc", 873 | "zstd-sys", 874 | ] 875 | 876 | [[package]] 877 | name = "zstd-sys" 878 | version = "2.0.9+zstd.1.5.5" 879 | source = "registry+https://github.com/rust-lang/crates.io-index" 880 | checksum = "9e16efa8a874a0481a574084d34cc26fdb3b99627480f785888deb6386506656" 881 | dependencies = [ 882 | "cc", 883 | "pkg-config", 884 | ] 885 | -------------------------------------------------------------------------------- /examples/rust/Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "adler" 7 | version = "1.0.2" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" 10 | 11 | [[package]] 12 | name = "aes" 13 | version = "0.8.2" 14 | source = "registry+https://github.com/rust-lang/crates.io-index" 15 | checksum = "433cfd6710c9986c576a25ca913c39d66a6474107b406f34f91d4a8923395241" 16 | dependencies = [ 17 | "cfg-if", 18 | "cipher", 19 | "cpufeatures", 20 | ] 21 | 22 | [[package]] 23 | name = "ahash" 24 | version = "0.7.6" 25 | source = "registry+https://github.com/rust-lang/crates.io-index" 26 | checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" 27 | dependencies = [ 28 | "getrandom", 29 | "once_cell", 30 | "version_check", 31 | ] 32 | 33 | [[package]] 34 | name = "anyhow" 35 | version = "1.0.71" 36 | source = "registry+https://github.com/rust-lang/crates.io-index" 37 | checksum = "9c7d0618f0e0b7e8ff11427422b64564d5fb0be1940354bfe2e0529b18a9d9b8" 38 | 39 | [[package]] 40 | name = "base64" 41 | version = "0.13.1" 42 | source = "registry+https://github.com/rust-lang/crates.io-index" 43 | checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" 44 | 45 | [[package]] 46 | name = "base64ct" 47 | version = "1.6.0" 48 | source = "registry+https://github.com/rust-lang/crates.io-index" 49 | checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" 50 | 51 | [[package]] 52 | name = "bitflags" 53 | version = "1.3.2" 54 | source = "registry+https://github.com/rust-lang/crates.io-index" 55 | checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" 56 | 57 | [[package]] 58 | name = "bitflags" 59 | version = "2.2.1" 60 | source = "registry+https://github.com/rust-lang/crates.io-index" 61 | checksum = "24a6904aef64d73cf10ab17ebace7befb918b82164785cb89907993be7f83813" 62 | 63 | [[package]] 64 | name = "block-buffer" 65 | version = "0.10.4" 66 | source = "registry+https://github.com/rust-lang/crates.io-index" 67 | checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" 68 | dependencies = [ 69 | "generic-array", 70 | ] 71 | 72 | [[package]] 73 | name = "bumpalo" 74 | version = "3.13.0" 75 | source = "registry+https://github.com/rust-lang/crates.io-index" 76 | checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" 77 | 78 | [[package]] 79 | name = "byteorder" 80 | version = "1.4.3" 81 | source = "registry+https://github.com/rust-lang/crates.io-index" 82 | checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" 83 | 84 | [[package]] 85 | name = "bzip2" 86 | version = "0.4.4" 87 | source = "registry+https://github.com/rust-lang/crates.io-index" 88 | checksum = "bdb116a6ef3f6c3698828873ad02c3014b3c85cadb88496095628e3ef1e347f8" 89 | dependencies = [ 90 | "bzip2-sys", 91 | "libc", 92 | ] 93 | 94 | [[package]] 95 | name = "bzip2-sys" 96 | version = "0.1.11+1.0.8" 97 | source = "registry+https://github.com/rust-lang/crates.io-index" 98 | checksum = "736a955f3fa7875102d57c82b8cac37ec45224a07fd32d58f9f7a186b6cd4cdc" 99 | dependencies = [ 100 | "cc", 101 | "libc", 102 | "pkg-config", 103 | ] 104 | 105 | [[package]] 106 | name = "cc" 107 | version = "1.0.79" 108 | source = "registry+https://github.com/rust-lang/crates.io-index" 109 | checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" 110 | dependencies = [ 111 | "jobserver", 112 | ] 113 | 114 | [[package]] 115 | name = "cfg-if" 116 | version = "1.0.0" 117 | source = "registry+https://github.com/rust-lang/crates.io-index" 118 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 119 | 120 | [[package]] 121 | name = "cipher" 122 | version = "0.4.4" 123 | source = "registry+https://github.com/rust-lang/crates.io-index" 124 | checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" 125 | dependencies = [ 126 | "crypto-common", 127 | "inout", 128 | ] 129 | 130 | [[package]] 131 | name = "constant_time_eq" 132 | version = "0.1.5" 133 | source = "registry+https://github.com/rust-lang/crates.io-index" 134 | checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" 135 | 136 | [[package]] 137 | name = "cpufeatures" 138 | version = "0.2.7" 139 | source = "registry+https://github.com/rust-lang/crates.io-index" 140 | checksum = "3e4c1eaa2012c47becbbad2ab175484c2a84d1185b566fb2cc5b8707343dfe58" 141 | dependencies = [ 142 | "libc", 143 | ] 144 | 145 | [[package]] 146 | name = "crc32fast" 147 | version = "1.3.2" 148 | source = "registry+https://github.com/rust-lang/crates.io-index" 149 | checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" 150 | dependencies = [ 151 | "cfg-if", 152 | ] 153 | 154 | [[package]] 155 | name = "crossbeam-utils" 156 | version = "0.8.15" 157 | source = "registry+https://github.com/rust-lang/crates.io-index" 158 | checksum = "3c063cd8cc95f5c377ed0d4b49a4b21f632396ff690e8470c29b3359b346984b" 159 | dependencies = [ 160 | "cfg-if", 161 | ] 162 | 163 | [[package]] 164 | name = "crypto-common" 165 | version = "0.1.6" 166 | source = "registry+https://github.com/rust-lang/crates.io-index" 167 | checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" 168 | dependencies = [ 169 | "generic-array", 170 | "typenum", 171 | ] 172 | 173 | [[package]] 174 | name = "digest" 175 | version = "0.10.7" 176 | source = "registry+https://github.com/rust-lang/crates.io-index" 177 | checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" 178 | dependencies = [ 179 | "block-buffer", 180 | "crypto-common", 181 | "subtle", 182 | ] 183 | 184 | [[package]] 185 | name = "fallible-iterator" 186 | version = "0.2.0" 187 | source = "registry+https://github.com/rust-lang/crates.io-index" 188 | checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" 189 | 190 | [[package]] 191 | name = "fallible-streaming-iterator" 192 | version = "0.1.9" 193 | source = "registry+https://github.com/rust-lang/crates.io-index" 194 | checksum = "7360491ce676a36bf9bb3c56c1aa791658183a54d2744120f27285738d90465a" 195 | 196 | [[package]] 197 | name = "filetime" 198 | version = "0.2.21" 199 | source = "registry+https://github.com/rust-lang/crates.io-index" 200 | checksum = "5cbc844cecaee9d4443931972e1289c8ff485cb4cc2767cb03ca139ed6885153" 201 | dependencies = [ 202 | "cfg-if", 203 | "libc", 204 | "redox_syscall", 205 | "windows-sys", 206 | ] 207 | 208 | [[package]] 209 | name = "flate2" 210 | version = "1.0.26" 211 | source = "registry+https://github.com/rust-lang/crates.io-index" 212 | checksum = "3b9429470923de8e8cbd4d2dc513535400b4b3fef0319fb5c4e1f520a7bef743" 213 | dependencies = [ 214 | "crc32fast", 215 | "miniz_oxide", 216 | ] 217 | 218 | [[package]] 219 | name = "form_urlencoded" 220 | version = "1.1.0" 221 | source = "registry+https://github.com/rust-lang/crates.io-index" 222 | checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" 223 | dependencies = [ 224 | "percent-encoding", 225 | ] 226 | 227 | [[package]] 228 | name = "generic-array" 229 | version = "0.14.7" 230 | source = "registry+https://github.com/rust-lang/crates.io-index" 231 | checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" 232 | dependencies = [ 233 | "typenum", 234 | "version_check", 235 | ] 236 | 237 | [[package]] 238 | name = "getrandom" 239 | version = "0.2.9" 240 | source = "registry+https://github.com/rust-lang/crates.io-index" 241 | checksum = "c85e1d9ab2eadba7e5040d4e09cbd6d072b76a557ad64e797c2cb9d4da21d7e4" 242 | dependencies = [ 243 | "cfg-if", 244 | "libc", 245 | "wasi", 246 | ] 247 | 248 | [[package]] 249 | name = "hashbrown" 250 | version = "0.12.3" 251 | source = "registry+https://github.com/rust-lang/crates.io-index" 252 | checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" 253 | dependencies = [ 254 | "ahash", 255 | ] 256 | 257 | [[package]] 258 | name = "hashlink" 259 | version = "0.8.1" 260 | source = "registry+https://github.com/rust-lang/crates.io-index" 261 | checksum = "69fe1fcf8b4278d860ad0548329f892a3631fb63f82574df68275f34cdbe0ffa" 262 | dependencies = [ 263 | "hashbrown", 264 | ] 265 | 266 | [[package]] 267 | name = "hmac" 268 | version = "0.12.1" 269 | source = "registry+https://github.com/rust-lang/crates.io-index" 270 | checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" 271 | dependencies = [ 272 | "digest", 273 | ] 274 | 275 | [[package]] 276 | name = "idna" 277 | version = "0.3.0" 278 | source = "registry+https://github.com/rust-lang/crates.io-index" 279 | checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" 280 | dependencies = [ 281 | "unicode-bidi", 282 | "unicode-normalization", 283 | ] 284 | 285 | [[package]] 286 | name = "inout" 287 | version = "0.1.3" 288 | source = "registry+https://github.com/rust-lang/crates.io-index" 289 | checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" 290 | dependencies = [ 291 | "generic-array", 292 | ] 293 | 294 | [[package]] 295 | name = "jobserver" 296 | version = "0.1.26" 297 | source = "registry+https://github.com/rust-lang/crates.io-index" 298 | checksum = "936cfd212a0155903bcbc060e316fb6cc7cbf2e1907329391ebadc1fe0ce77c2" 299 | dependencies = [ 300 | "libc", 301 | ] 302 | 303 | [[package]] 304 | name = "js-sys" 305 | version = "0.3.63" 306 | source = "registry+https://github.com/rust-lang/crates.io-index" 307 | checksum = "2f37a4a5928311ac501dee68b3c7613a1037d0edb30c8e5427bd832d55d1b790" 308 | dependencies = [ 309 | "wasm-bindgen", 310 | ] 311 | 312 | [[package]] 313 | name = "libc" 314 | version = "0.2.144" 315 | source = "registry+https://github.com/rust-lang/crates.io-index" 316 | checksum = "2b00cc1c228a6782d0f076e7b232802e0c5689d41bb5df366f2a6b6621cfdfe1" 317 | 318 | [[package]] 319 | name = "libsqlite3-sys" 320 | version = "0.26.0" 321 | source = "registry+https://github.com/rust-lang/crates.io-index" 322 | checksum = "afc22eff61b133b115c6e8c74e818c628d6d5e7a502afea6f64dee076dd94326" 323 | dependencies = [ 324 | "cc", 325 | "pkg-config", 326 | "vcpkg", 327 | ] 328 | 329 | [[package]] 330 | name = "log" 331 | version = "0.4.17" 332 | source = "registry+https://github.com/rust-lang/crates.io-index" 333 | checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" 334 | dependencies = [ 335 | "cfg-if", 336 | ] 337 | 338 | [[package]] 339 | name = "miniz_oxide" 340 | version = "0.7.1" 341 | source = "registry+https://github.com/rust-lang/crates.io-index" 342 | checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" 343 | dependencies = [ 344 | "adler", 345 | ] 346 | 347 | [[package]] 348 | name = "once_cell" 349 | version = "1.17.1" 350 | source = "registry+https://github.com/rust-lang/crates.io-index" 351 | checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3" 352 | 353 | [[package]] 354 | name = "password-hash" 355 | version = "0.4.2" 356 | source = "registry+https://github.com/rust-lang/crates.io-index" 357 | checksum = "7676374caaee8a325c9e7a2ae557f216c5563a171d6997b0ef8a65af35147700" 358 | dependencies = [ 359 | "base64ct", 360 | "rand_core", 361 | "subtle", 362 | ] 363 | 364 | [[package]] 365 | name = "pbkdf2" 366 | version = "0.11.0" 367 | source = "registry+https://github.com/rust-lang/crates.io-index" 368 | checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" 369 | dependencies = [ 370 | "digest", 371 | "hmac", 372 | "password-hash", 373 | "sha2", 374 | ] 375 | 376 | [[package]] 377 | name = "percent-encoding" 378 | version = "2.2.0" 379 | source = "registry+https://github.com/rust-lang/crates.io-index" 380 | checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" 381 | 382 | [[package]] 383 | name = "pkg-config" 384 | version = "0.3.27" 385 | source = "registry+https://github.com/rust-lang/crates.io-index" 386 | checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" 387 | 388 | [[package]] 389 | name = "proc-macro2" 390 | version = "1.0.59" 391 | source = "registry+https://github.com/rust-lang/crates.io-index" 392 | checksum = "6aeca18b86b413c660b781aa319e4e2648a3e6f9eadc9b47e9038e6fe9f3451b" 393 | dependencies = [ 394 | "unicode-ident", 395 | ] 396 | 397 | [[package]] 398 | name = "quote" 399 | version = "1.0.28" 400 | source = "registry+https://github.com/rust-lang/crates.io-index" 401 | checksum = "1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488" 402 | dependencies = [ 403 | "proc-macro2", 404 | ] 405 | 406 | [[package]] 407 | name = "rand_core" 408 | version = "0.6.4" 409 | source = "registry+https://github.com/rust-lang/crates.io-index" 410 | checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" 411 | 412 | [[package]] 413 | name = "redox_syscall" 414 | version = "0.2.16" 415 | source = "registry+https://github.com/rust-lang/crates.io-index" 416 | checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" 417 | dependencies = [ 418 | "bitflags 1.3.2", 419 | ] 420 | 421 | [[package]] 422 | name = "ring" 423 | version = "0.16.20" 424 | source = "registry+https://github.com/rust-lang/crates.io-index" 425 | checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" 426 | dependencies = [ 427 | "cc", 428 | "libc", 429 | "once_cell", 430 | "spin", 431 | "untrusted", 432 | "web-sys", 433 | "winapi", 434 | ] 435 | 436 | [[package]] 437 | name = "rusqlite" 438 | version = "0.29.0" 439 | source = "registry+https://github.com/rust-lang/crates.io-index" 440 | checksum = "549b9d036d571d42e6e85d1c1425e2ac83491075078ca9a15be021c56b1641f2" 441 | dependencies = [ 442 | "bitflags 2.2.1", 443 | "fallible-iterator", 444 | "fallible-streaming-iterator", 445 | "hashlink", 446 | "libsqlite3-sys", 447 | "smallvec", 448 | ] 449 | 450 | [[package]] 451 | name = "rustls" 452 | version = "0.20.8" 453 | source = "registry+https://github.com/rust-lang/crates.io-index" 454 | checksum = "fff78fc74d175294f4e83b28343315ffcfb114b156f0185e9741cb5570f50e2f" 455 | dependencies = [ 456 | "log", 457 | "ring", 458 | "sct", 459 | "webpki", 460 | ] 461 | 462 | [[package]] 463 | name = "sct" 464 | version = "0.7.0" 465 | source = "registry+https://github.com/rust-lang/crates.io-index" 466 | checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4" 467 | dependencies = [ 468 | "ring", 469 | "untrusted", 470 | ] 471 | 472 | [[package]] 473 | name = "serde" 474 | version = "1.0.163" 475 | source = "registry+https://github.com/rust-lang/crates.io-index" 476 | checksum = "2113ab51b87a539ae008b5c6c02dc020ffa39afd2d83cffcb3f4eb2722cebec2" 477 | 478 | [[package]] 479 | name = "sha1" 480 | version = "0.10.5" 481 | source = "registry+https://github.com/rust-lang/crates.io-index" 482 | checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3" 483 | dependencies = [ 484 | "cfg-if", 485 | "cpufeatures", 486 | "digest", 487 | ] 488 | 489 | [[package]] 490 | name = "sha2" 491 | version = "0.10.6" 492 | source = "registry+https://github.com/rust-lang/crates.io-index" 493 | checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" 494 | dependencies = [ 495 | "cfg-if", 496 | "cpufeatures", 497 | "digest", 498 | ] 499 | 500 | [[package]] 501 | name = "smallvec" 502 | version = "1.10.0" 503 | source = "registry+https://github.com/rust-lang/crates.io-index" 504 | checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" 505 | 506 | [[package]] 507 | name = "spin" 508 | version = "0.5.2" 509 | source = "registry+https://github.com/rust-lang/crates.io-index" 510 | checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" 511 | 512 | [[package]] 513 | name = "sqlite-hello" 514 | version = "0.1.0-alpha.29" 515 | dependencies = [ 516 | "anyhow", 517 | "flate2", 518 | "tar", 519 | "ureq", 520 | "zip", 521 | ] 522 | 523 | [[package]] 524 | name = "sqlite-hello-demo" 525 | version = "0.1.0" 526 | dependencies = [ 527 | "libsqlite3-sys", 528 | "rusqlite", 529 | "sqlite-hello", 530 | ] 531 | 532 | [[package]] 533 | name = "subtle" 534 | version = "2.5.0" 535 | source = "registry+https://github.com/rust-lang/crates.io-index" 536 | checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" 537 | 538 | [[package]] 539 | name = "syn" 540 | version = "2.0.18" 541 | source = "registry+https://github.com/rust-lang/crates.io-index" 542 | checksum = "32d41677bcbe24c20c52e7c70b0d8db04134c5d1066bf98662e2871ad200ea3e" 543 | dependencies = [ 544 | "proc-macro2", 545 | "quote", 546 | "unicode-ident", 547 | ] 548 | 549 | [[package]] 550 | name = "tar" 551 | version = "0.4.38" 552 | source = "registry+https://github.com/rust-lang/crates.io-index" 553 | checksum = "4b55807c0344e1e6c04d7c965f5289c39a8d94ae23ed5c0b57aabac549f871c6" 554 | dependencies = [ 555 | "filetime", 556 | "libc", 557 | "xattr", 558 | ] 559 | 560 | [[package]] 561 | name = "time" 562 | version = "0.3.21" 563 | source = "registry+https://github.com/rust-lang/crates.io-index" 564 | checksum = "8f3403384eaacbca9923fa06940178ac13e4edb725486d70e8e15881d0c836cc" 565 | dependencies = [ 566 | "serde", 567 | "time-core", 568 | ] 569 | 570 | [[package]] 571 | name = "time-core" 572 | version = "0.1.1" 573 | source = "registry+https://github.com/rust-lang/crates.io-index" 574 | checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" 575 | 576 | [[package]] 577 | name = "tinyvec" 578 | version = "1.6.0" 579 | source = "registry+https://github.com/rust-lang/crates.io-index" 580 | checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" 581 | dependencies = [ 582 | "tinyvec_macros", 583 | ] 584 | 585 | [[package]] 586 | name = "tinyvec_macros" 587 | version = "0.1.1" 588 | source = "registry+https://github.com/rust-lang/crates.io-index" 589 | checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" 590 | 591 | [[package]] 592 | name = "typenum" 593 | version = "1.16.0" 594 | source = "registry+https://github.com/rust-lang/crates.io-index" 595 | checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" 596 | 597 | [[package]] 598 | name = "unicode-bidi" 599 | version = "0.3.13" 600 | source = "registry+https://github.com/rust-lang/crates.io-index" 601 | checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" 602 | 603 | [[package]] 604 | name = "unicode-ident" 605 | version = "1.0.9" 606 | source = "registry+https://github.com/rust-lang/crates.io-index" 607 | checksum = "b15811caf2415fb889178633e7724bad2509101cde276048e013b9def5e51fa0" 608 | 609 | [[package]] 610 | name = "unicode-normalization" 611 | version = "0.1.22" 612 | source = "registry+https://github.com/rust-lang/crates.io-index" 613 | checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" 614 | dependencies = [ 615 | "tinyvec", 616 | ] 617 | 618 | [[package]] 619 | name = "untrusted" 620 | version = "0.7.1" 621 | source = "registry+https://github.com/rust-lang/crates.io-index" 622 | checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" 623 | 624 | [[package]] 625 | name = "ureq" 626 | version = "2.6.2" 627 | source = "registry+https://github.com/rust-lang/crates.io-index" 628 | checksum = "338b31dd1314f68f3aabf3ed57ab922df95ffcd902476ca7ba3c4ce7b908c46d" 629 | dependencies = [ 630 | "base64", 631 | "flate2", 632 | "log", 633 | "once_cell", 634 | "rustls", 635 | "url", 636 | "webpki", 637 | "webpki-roots", 638 | ] 639 | 640 | [[package]] 641 | name = "url" 642 | version = "2.3.1" 643 | source = "registry+https://github.com/rust-lang/crates.io-index" 644 | checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643" 645 | dependencies = [ 646 | "form_urlencoded", 647 | "idna", 648 | "percent-encoding", 649 | ] 650 | 651 | [[package]] 652 | name = "vcpkg" 653 | version = "0.2.15" 654 | source = "registry+https://github.com/rust-lang/crates.io-index" 655 | checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" 656 | 657 | [[package]] 658 | name = "version_check" 659 | version = "0.9.4" 660 | source = "registry+https://github.com/rust-lang/crates.io-index" 661 | checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" 662 | 663 | [[package]] 664 | name = "wasi" 665 | version = "0.11.0+wasi-snapshot-preview1" 666 | source = "registry+https://github.com/rust-lang/crates.io-index" 667 | checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" 668 | 669 | [[package]] 670 | name = "wasm-bindgen" 671 | version = "0.2.86" 672 | source = "registry+https://github.com/rust-lang/crates.io-index" 673 | checksum = "5bba0e8cb82ba49ff4e229459ff22a191bbe9a1cb3a341610c9c33efc27ddf73" 674 | dependencies = [ 675 | "cfg-if", 676 | "wasm-bindgen-macro", 677 | ] 678 | 679 | [[package]] 680 | name = "wasm-bindgen-backend" 681 | version = "0.2.86" 682 | source = "registry+https://github.com/rust-lang/crates.io-index" 683 | checksum = "19b04bc93f9d6bdee709f6bd2118f57dd6679cf1176a1af464fca3ab0d66d8fb" 684 | dependencies = [ 685 | "bumpalo", 686 | "log", 687 | "once_cell", 688 | "proc-macro2", 689 | "quote", 690 | "syn", 691 | "wasm-bindgen-shared", 692 | ] 693 | 694 | [[package]] 695 | name = "wasm-bindgen-macro" 696 | version = "0.2.86" 697 | source = "registry+https://github.com/rust-lang/crates.io-index" 698 | checksum = "14d6b024f1a526bb0234f52840389927257beb670610081360e5a03c5df9c258" 699 | dependencies = [ 700 | "quote", 701 | "wasm-bindgen-macro-support", 702 | ] 703 | 704 | [[package]] 705 | name = "wasm-bindgen-macro-support" 706 | version = "0.2.86" 707 | source = "registry+https://github.com/rust-lang/crates.io-index" 708 | checksum = "e128beba882dd1eb6200e1dc92ae6c5dbaa4311aa7bb211ca035779e5efc39f8" 709 | dependencies = [ 710 | "proc-macro2", 711 | "quote", 712 | "syn", 713 | "wasm-bindgen-backend", 714 | "wasm-bindgen-shared", 715 | ] 716 | 717 | [[package]] 718 | name = "wasm-bindgen-shared" 719 | version = "0.2.86" 720 | source = "registry+https://github.com/rust-lang/crates.io-index" 721 | checksum = "ed9d5b4305409d1fc9482fee2d7f9bcbf24b3972bf59817ef757e23982242a93" 722 | 723 | [[package]] 724 | name = "web-sys" 725 | version = "0.3.63" 726 | source = "registry+https://github.com/rust-lang/crates.io-index" 727 | checksum = "3bdd9ef4e984da1187bf8110c5cf5b845fbc87a23602cdf912386a76fcd3a7c2" 728 | dependencies = [ 729 | "js-sys", 730 | "wasm-bindgen", 731 | ] 732 | 733 | [[package]] 734 | name = "webpki" 735 | version = "0.22.0" 736 | source = "registry+https://github.com/rust-lang/crates.io-index" 737 | checksum = "f095d78192e208183081cc07bc5515ef55216397af48b873e5edcd72637fa1bd" 738 | dependencies = [ 739 | "ring", 740 | "untrusted", 741 | ] 742 | 743 | [[package]] 744 | name = "webpki-roots" 745 | version = "0.22.6" 746 | source = "registry+https://github.com/rust-lang/crates.io-index" 747 | checksum = "b6c71e40d7d2c34a5106301fb632274ca37242cd0c9d3e64dbece371a40a2d87" 748 | dependencies = [ 749 | "webpki", 750 | ] 751 | 752 | [[package]] 753 | name = "winapi" 754 | version = "0.3.9" 755 | source = "registry+https://github.com/rust-lang/crates.io-index" 756 | checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" 757 | dependencies = [ 758 | "winapi-i686-pc-windows-gnu", 759 | "winapi-x86_64-pc-windows-gnu", 760 | ] 761 | 762 | [[package]] 763 | name = "winapi-i686-pc-windows-gnu" 764 | version = "0.4.0" 765 | source = "registry+https://github.com/rust-lang/crates.io-index" 766 | checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 767 | 768 | [[package]] 769 | name = "winapi-x86_64-pc-windows-gnu" 770 | version = "0.4.0" 771 | source = "registry+https://github.com/rust-lang/crates.io-index" 772 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 773 | 774 | [[package]] 775 | name = "windows-sys" 776 | version = "0.48.0" 777 | source = "registry+https://github.com/rust-lang/crates.io-index" 778 | checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" 779 | dependencies = [ 780 | "windows-targets", 781 | ] 782 | 783 | [[package]] 784 | name = "windows-targets" 785 | version = "0.48.0" 786 | source = "registry+https://github.com/rust-lang/crates.io-index" 787 | checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" 788 | dependencies = [ 789 | "windows_aarch64_gnullvm", 790 | "windows_aarch64_msvc", 791 | "windows_i686_gnu", 792 | "windows_i686_msvc", 793 | "windows_x86_64_gnu", 794 | "windows_x86_64_gnullvm", 795 | "windows_x86_64_msvc", 796 | ] 797 | 798 | [[package]] 799 | name = "windows_aarch64_gnullvm" 800 | version = "0.48.0" 801 | source = "registry+https://github.com/rust-lang/crates.io-index" 802 | checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" 803 | 804 | [[package]] 805 | name = "windows_aarch64_msvc" 806 | version = "0.48.0" 807 | source = "registry+https://github.com/rust-lang/crates.io-index" 808 | checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" 809 | 810 | [[package]] 811 | name = "windows_i686_gnu" 812 | version = "0.48.0" 813 | source = "registry+https://github.com/rust-lang/crates.io-index" 814 | checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" 815 | 816 | [[package]] 817 | name = "windows_i686_msvc" 818 | version = "0.48.0" 819 | source = "registry+https://github.com/rust-lang/crates.io-index" 820 | checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" 821 | 822 | [[package]] 823 | name = "windows_x86_64_gnu" 824 | version = "0.48.0" 825 | source = "registry+https://github.com/rust-lang/crates.io-index" 826 | checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" 827 | 828 | [[package]] 829 | name = "windows_x86_64_gnullvm" 830 | version = "0.48.0" 831 | source = "registry+https://github.com/rust-lang/crates.io-index" 832 | checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" 833 | 834 | [[package]] 835 | name = "windows_x86_64_msvc" 836 | version = "0.48.0" 837 | source = "registry+https://github.com/rust-lang/crates.io-index" 838 | checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" 839 | 840 | [[package]] 841 | name = "xattr" 842 | version = "0.2.3" 843 | source = "registry+https://github.com/rust-lang/crates.io-index" 844 | checksum = "6d1526bbe5aaeb5eb06885f4d987bcdfa5e23187055de9b83fe00156a821fabc" 845 | dependencies = [ 846 | "libc", 847 | ] 848 | 849 | [[package]] 850 | name = "zip" 851 | version = "0.6.6" 852 | source = "registry+https://github.com/rust-lang/crates.io-index" 853 | checksum = "760394e246e4c28189f19d488c058bf16f564016aefac5d32bb1f3b51d5e9261" 854 | dependencies = [ 855 | "aes", 856 | "byteorder", 857 | "bzip2", 858 | "constant_time_eq", 859 | "crc32fast", 860 | "crossbeam-utils", 861 | "flate2", 862 | "hmac", 863 | "pbkdf2", 864 | "sha1", 865 | "time", 866 | "zstd", 867 | ] 868 | 869 | [[package]] 870 | name = "zstd" 871 | version = "0.11.2+zstd.1.5.2" 872 | source = "registry+https://github.com/rust-lang/crates.io-index" 873 | checksum = "20cc960326ece64f010d2d2107537f26dc589a6573a316bd5b1dba685fa5fde4" 874 | dependencies = [ 875 | "zstd-safe", 876 | ] 877 | 878 | [[package]] 879 | name = "zstd-safe" 880 | version = "5.0.2+zstd.1.5.2" 881 | source = "registry+https://github.com/rust-lang/crates.io-index" 882 | checksum = "1d2a5585e04f9eea4b2a3d1eca508c4dee9592a89ef6f450c11719da0726f4db" 883 | dependencies = [ 884 | "libc", 885 | "zstd-sys", 886 | ] 887 | 888 | [[package]] 889 | name = "zstd-sys" 890 | version = "2.0.8+zstd.1.5.5" 891 | source = "registry+https://github.com/rust-lang/crates.io-index" 892 | checksum = "5556e6ee25d32df2586c098bbfa278803692a20d0ab9565e049480d52707ec8c" 893 | dependencies = [ 894 | "cc", 895 | "libc", 896 | "pkg-config", 897 | ] 898 | -------------------------------------------------------------------------------- /vendor/sqlite3ext.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** 2006 June 7 3 | ** 4 | ** The author disclaims copyright to this source code. In place of 5 | ** a legal notice, here is a blessing: 6 | ** 7 | ** May you do good and not evil. 8 | ** May you find forgiveness for yourself and forgive others. 9 | ** May you share freely, never taking more than you give. 10 | ** 11 | ************************************************************************* 12 | ** This header file defines the SQLite interface for use by 13 | ** shared libraries that want to be imported as extensions into 14 | ** an SQLite instance. Shared libraries that intend to be loaded 15 | ** as extensions by SQLite should #include this file instead of 16 | ** sqlite3.h. 17 | */ 18 | #ifndef SQLITE3EXT_H 19 | #define SQLITE3EXT_H 20 | #include "sqlite3.h" 21 | 22 | /* 23 | ** The following structure holds pointers to all of the SQLite API 24 | ** routines. 25 | ** 26 | ** WARNING: In order to maintain backwards compatibility, add new 27 | ** interfaces to the end of this structure only. If you insert new 28 | ** interfaces in the middle of this structure, then older different 29 | ** versions of SQLite will not be able to load each other's shared 30 | ** libraries! 31 | */ 32 | struct sqlite3_api_routines { 33 | void * (*aggregate_context)(sqlite3_context*,int nBytes); 34 | int (*aggregate_count)(sqlite3_context*); 35 | int (*bind_blob)(sqlite3_stmt*,int,const void*,int n,void(*)(void*)); 36 | int (*bind_double)(sqlite3_stmt*,int,double); 37 | int (*bind_int)(sqlite3_stmt*,int,int); 38 | int (*bind_int64)(sqlite3_stmt*,int,sqlite_int64); 39 | int (*bind_null)(sqlite3_stmt*,int); 40 | int (*bind_parameter_count)(sqlite3_stmt*); 41 | int (*bind_parameter_index)(sqlite3_stmt*,const char*zName); 42 | const char * (*bind_parameter_name)(sqlite3_stmt*,int); 43 | int (*bind_text)(sqlite3_stmt*,int,const char*,int n,void(*)(void*)); 44 | int (*bind_text16)(sqlite3_stmt*,int,const void*,int,void(*)(void*)); 45 | int (*bind_value)(sqlite3_stmt*,int,const sqlite3_value*); 46 | int (*busy_handler)(sqlite3*,int(*)(void*,int),void*); 47 | int (*busy_timeout)(sqlite3*,int ms); 48 | int (*changes)(sqlite3*); 49 | int (*close)(sqlite3*); 50 | int (*collation_needed)(sqlite3*,void*,void(*)(void*,sqlite3*, 51 | int eTextRep,const char*)); 52 | int (*collation_needed16)(sqlite3*,void*,void(*)(void*,sqlite3*, 53 | int eTextRep,const void*)); 54 | const void * (*column_blob)(sqlite3_stmt*,int iCol); 55 | int (*column_bytes)(sqlite3_stmt*,int iCol); 56 | int (*column_bytes16)(sqlite3_stmt*,int iCol); 57 | int (*column_count)(sqlite3_stmt*pStmt); 58 | const char * (*column_database_name)(sqlite3_stmt*,int); 59 | const void * (*column_database_name16)(sqlite3_stmt*,int); 60 | const char * (*column_decltype)(sqlite3_stmt*,int i); 61 | const void * (*column_decltype16)(sqlite3_stmt*,int); 62 | double (*column_double)(sqlite3_stmt*,int iCol); 63 | int (*column_int)(sqlite3_stmt*,int iCol); 64 | sqlite_int64 (*column_int64)(sqlite3_stmt*,int iCol); 65 | const char * (*column_name)(sqlite3_stmt*,int); 66 | const void * (*column_name16)(sqlite3_stmt*,int); 67 | const char * (*column_origin_name)(sqlite3_stmt*,int); 68 | const void * (*column_origin_name16)(sqlite3_stmt*,int); 69 | const char * (*column_table_name)(sqlite3_stmt*,int); 70 | const void * (*column_table_name16)(sqlite3_stmt*,int); 71 | const unsigned char * (*column_text)(sqlite3_stmt*,int iCol); 72 | const void * (*column_text16)(sqlite3_stmt*,int iCol); 73 | int (*column_type)(sqlite3_stmt*,int iCol); 74 | sqlite3_value* (*column_value)(sqlite3_stmt*,int iCol); 75 | void * (*commit_hook)(sqlite3*,int(*)(void*),void*); 76 | int (*complete)(const char*sql); 77 | int (*complete16)(const void*sql); 78 | int (*create_collation)(sqlite3*,const char*,int,void*, 79 | int(*)(void*,int,const void*,int,const void*)); 80 | int (*create_collation16)(sqlite3*,const void*,int,void*, 81 | int(*)(void*,int,const void*,int,const void*)); 82 | int (*create_function)(sqlite3*,const char*,int,int,void*, 83 | void (*xFunc)(sqlite3_context*,int,sqlite3_value**), 84 | void (*xStep)(sqlite3_context*,int,sqlite3_value**), 85 | void (*xFinal)(sqlite3_context*)); 86 | int (*create_function16)(sqlite3*,const void*,int,int,void*, 87 | void (*xFunc)(sqlite3_context*,int,sqlite3_value**), 88 | void (*xStep)(sqlite3_context*,int,sqlite3_value**), 89 | void (*xFinal)(sqlite3_context*)); 90 | int (*create_module)(sqlite3*,const char*,const sqlite3_module*,void*); 91 | int (*data_count)(sqlite3_stmt*pStmt); 92 | sqlite3 * (*db_handle)(sqlite3_stmt*); 93 | int (*declare_vtab)(sqlite3*,const char*); 94 | int (*enable_shared_cache)(int); 95 | int (*errcode)(sqlite3*db); 96 | const char * (*errmsg)(sqlite3*); 97 | const void * (*errmsg16)(sqlite3*); 98 | int (*exec)(sqlite3*,const char*,sqlite3_callback,void*,char**); 99 | int (*expired)(sqlite3_stmt*); 100 | int (*finalize)(sqlite3_stmt*pStmt); 101 | void (*free)(void*); 102 | void (*free_table)(char**result); 103 | int (*get_autocommit)(sqlite3*); 104 | void * (*get_auxdata)(sqlite3_context*,int); 105 | int (*get_table)(sqlite3*,const char*,char***,int*,int*,char**); 106 | int (*global_recover)(void); 107 | void (*interruptx)(sqlite3*); 108 | sqlite_int64 (*last_insert_rowid)(sqlite3*); 109 | const char * (*libversion)(void); 110 | int (*libversion_number)(void); 111 | void *(*malloc)(int); 112 | char * (*mprintf)(const char*,...); 113 | int (*open)(const char*,sqlite3**); 114 | int (*open16)(const void*,sqlite3**); 115 | int (*prepare)(sqlite3*,const char*,int,sqlite3_stmt**,const char**); 116 | int (*prepare16)(sqlite3*,const void*,int,sqlite3_stmt**,const void**); 117 | void * (*profile)(sqlite3*,void(*)(void*,const char*,sqlite_uint64),void*); 118 | void (*progress_handler)(sqlite3*,int,int(*)(void*),void*); 119 | void *(*realloc)(void*,int); 120 | int (*reset)(sqlite3_stmt*pStmt); 121 | void (*result_blob)(sqlite3_context*,const void*,int,void(*)(void*)); 122 | void (*result_double)(sqlite3_context*,double); 123 | void (*result_error)(sqlite3_context*,const char*,int); 124 | void (*result_error16)(sqlite3_context*,const void*,int); 125 | void (*result_int)(sqlite3_context*,int); 126 | void (*result_int64)(sqlite3_context*,sqlite_int64); 127 | void (*result_null)(sqlite3_context*); 128 | void (*result_text)(sqlite3_context*,const char*,int,void(*)(void*)); 129 | void (*result_text16)(sqlite3_context*,const void*,int,void(*)(void*)); 130 | void (*result_text16be)(sqlite3_context*,const void*,int,void(*)(void*)); 131 | void (*result_text16le)(sqlite3_context*,const void*,int,void(*)(void*)); 132 | void (*result_value)(sqlite3_context*,sqlite3_value*); 133 | void * (*rollback_hook)(sqlite3*,void(*)(void*),void*); 134 | int (*set_authorizer)(sqlite3*,int(*)(void*,int,const char*,const char*, 135 | const char*,const char*),void*); 136 | void (*set_auxdata)(sqlite3_context*,int,void*,void (*)(void*)); 137 | char * (*xsnprintf)(int,char*,const char*,...); 138 | int (*step)(sqlite3_stmt*); 139 | int (*table_column_metadata)(sqlite3*,const char*,const char*,const char*, 140 | char const**,char const**,int*,int*,int*); 141 | void (*thread_cleanup)(void); 142 | int (*total_changes)(sqlite3*); 143 | void * (*trace)(sqlite3*,void(*xTrace)(void*,const char*),void*); 144 | int (*transfer_bindings)(sqlite3_stmt*,sqlite3_stmt*); 145 | void * (*update_hook)(sqlite3*,void(*)(void*,int ,char const*,char const*, 146 | sqlite_int64),void*); 147 | void * (*user_data)(sqlite3_context*); 148 | const void * (*value_blob)(sqlite3_value*); 149 | int (*value_bytes)(sqlite3_value*); 150 | int (*value_bytes16)(sqlite3_value*); 151 | double (*value_double)(sqlite3_value*); 152 | int (*value_int)(sqlite3_value*); 153 | sqlite_int64 (*value_int64)(sqlite3_value*); 154 | int (*value_numeric_type)(sqlite3_value*); 155 | const unsigned char * (*value_text)(sqlite3_value*); 156 | const void * (*value_text16)(sqlite3_value*); 157 | const void * (*value_text16be)(sqlite3_value*); 158 | const void * (*value_text16le)(sqlite3_value*); 159 | int (*value_type)(sqlite3_value*); 160 | char *(*vmprintf)(const char*,va_list); 161 | /* Added ??? */ 162 | int (*overload_function)(sqlite3*, const char *zFuncName, int nArg); 163 | /* Added by 3.3.13 */ 164 | int (*prepare_v2)(sqlite3*,const char*,int,sqlite3_stmt**,const char**); 165 | int (*prepare16_v2)(sqlite3*,const void*,int,sqlite3_stmt**,const void**); 166 | int (*clear_bindings)(sqlite3_stmt*); 167 | /* Added by 3.4.1 */ 168 | int (*create_module_v2)(sqlite3*,const char*,const sqlite3_module*,void*, 169 | void (*xDestroy)(void *)); 170 | /* Added by 3.5.0 */ 171 | int (*bind_zeroblob)(sqlite3_stmt*,int,int); 172 | int (*blob_bytes)(sqlite3_blob*); 173 | int (*blob_close)(sqlite3_blob*); 174 | int (*blob_open)(sqlite3*,const char*,const char*,const char*,sqlite3_int64, 175 | int,sqlite3_blob**); 176 | int (*blob_read)(sqlite3_blob*,void*,int,int); 177 | int (*blob_write)(sqlite3_blob*,const void*,int,int); 178 | int (*create_collation_v2)(sqlite3*,const char*,int,void*, 179 | int(*)(void*,int,const void*,int,const void*), 180 | void(*)(void*)); 181 | int (*file_control)(sqlite3*,const char*,int,void*); 182 | sqlite3_int64 (*memory_highwater)(int); 183 | sqlite3_int64 (*memory_used)(void); 184 | sqlite3_mutex *(*mutex_alloc)(int); 185 | void (*mutex_enter)(sqlite3_mutex*); 186 | void (*mutex_free)(sqlite3_mutex*); 187 | void (*mutex_leave)(sqlite3_mutex*); 188 | int (*mutex_try)(sqlite3_mutex*); 189 | int (*open_v2)(const char*,sqlite3**,int,const char*); 190 | int (*release_memory)(int); 191 | void (*result_error_nomem)(sqlite3_context*); 192 | void (*result_error_toobig)(sqlite3_context*); 193 | int (*sleep)(int); 194 | void (*soft_heap_limit)(int); 195 | sqlite3_vfs *(*vfs_find)(const char*); 196 | int (*vfs_register)(sqlite3_vfs*,int); 197 | int (*vfs_unregister)(sqlite3_vfs*); 198 | int (*xthreadsafe)(void); 199 | void (*result_zeroblob)(sqlite3_context*,int); 200 | void (*result_error_code)(sqlite3_context*,int); 201 | int (*test_control)(int, ...); 202 | void (*randomness)(int,void*); 203 | sqlite3 *(*context_db_handle)(sqlite3_context*); 204 | int (*extended_result_codes)(sqlite3*,int); 205 | int (*limit)(sqlite3*,int,int); 206 | sqlite3_stmt *(*next_stmt)(sqlite3*,sqlite3_stmt*); 207 | const char *(*sql)(sqlite3_stmt*); 208 | int (*status)(int,int*,int*,int); 209 | int (*backup_finish)(sqlite3_backup*); 210 | sqlite3_backup *(*backup_init)(sqlite3*,const char*,sqlite3*,const char*); 211 | int (*backup_pagecount)(sqlite3_backup*); 212 | int (*backup_remaining)(sqlite3_backup*); 213 | int (*backup_step)(sqlite3_backup*,int); 214 | const char *(*compileoption_get)(int); 215 | int (*compileoption_used)(const char*); 216 | int (*create_function_v2)(sqlite3*,const char*,int,int,void*, 217 | void (*xFunc)(sqlite3_context*,int,sqlite3_value**), 218 | void (*xStep)(sqlite3_context*,int,sqlite3_value**), 219 | void (*xFinal)(sqlite3_context*), 220 | void(*xDestroy)(void*)); 221 | int (*db_config)(sqlite3*,int,...); 222 | sqlite3_mutex *(*db_mutex)(sqlite3*); 223 | int (*db_status)(sqlite3*,int,int*,int*,int); 224 | int (*extended_errcode)(sqlite3*); 225 | void (*log)(int,const char*,...); 226 | sqlite3_int64 (*soft_heap_limit64)(sqlite3_int64); 227 | const char *(*sourceid)(void); 228 | int (*stmt_status)(sqlite3_stmt*,int,int); 229 | int (*strnicmp)(const char*,const char*,int); 230 | int (*unlock_notify)(sqlite3*,void(*)(void**,int),void*); 231 | int (*wal_autocheckpoint)(sqlite3*,int); 232 | int (*wal_checkpoint)(sqlite3*,const char*); 233 | void *(*wal_hook)(sqlite3*,int(*)(void*,sqlite3*,const char*,int),void*); 234 | int (*blob_reopen)(sqlite3_blob*,sqlite3_int64); 235 | int (*vtab_config)(sqlite3*,int op,...); 236 | int (*vtab_on_conflict)(sqlite3*); 237 | /* Version 3.7.16 and later */ 238 | int (*close_v2)(sqlite3*); 239 | const char *(*db_filename)(sqlite3*,const char*); 240 | int (*db_readonly)(sqlite3*,const char*); 241 | int (*db_release_memory)(sqlite3*); 242 | const char *(*errstr)(int); 243 | int (*stmt_busy)(sqlite3_stmt*); 244 | int (*stmt_readonly)(sqlite3_stmt*); 245 | int (*stricmp)(const char*,const char*); 246 | int (*uri_boolean)(const char*,const char*,int); 247 | sqlite3_int64 (*uri_int64)(const char*,const char*,sqlite3_int64); 248 | const char *(*uri_parameter)(const char*,const char*); 249 | char *(*xvsnprintf)(int,char*,const char*,va_list); 250 | int (*wal_checkpoint_v2)(sqlite3*,const char*,int,int*,int*); 251 | /* Version 3.8.7 and later */ 252 | int (*auto_extension)(void(*)(void)); 253 | int (*bind_blob64)(sqlite3_stmt*,int,const void*,sqlite3_uint64, 254 | void(*)(void*)); 255 | int (*bind_text64)(sqlite3_stmt*,int,const char*,sqlite3_uint64, 256 | void(*)(void*),unsigned char); 257 | int (*cancel_auto_extension)(void(*)(void)); 258 | int (*load_extension)(sqlite3*,const char*,const char*,char**); 259 | void *(*malloc64)(sqlite3_uint64); 260 | sqlite3_uint64 (*msize)(void*); 261 | void *(*realloc64)(void*,sqlite3_uint64); 262 | void (*reset_auto_extension)(void); 263 | void (*result_blob64)(sqlite3_context*,const void*,sqlite3_uint64, 264 | void(*)(void*)); 265 | void (*result_text64)(sqlite3_context*,const char*,sqlite3_uint64, 266 | void(*)(void*), unsigned char); 267 | int (*strglob)(const char*,const char*); 268 | /* Version 3.8.11 and later */ 269 | sqlite3_value *(*value_dup)(const sqlite3_value*); 270 | void (*value_free)(sqlite3_value*); 271 | int (*result_zeroblob64)(sqlite3_context*,sqlite3_uint64); 272 | int (*bind_zeroblob64)(sqlite3_stmt*, int, sqlite3_uint64); 273 | /* Version 3.9.0 and later */ 274 | unsigned int (*value_subtype)(sqlite3_value*); 275 | void (*result_subtype)(sqlite3_context*,unsigned int); 276 | /* Version 3.10.0 and later */ 277 | int (*status64)(int,sqlite3_int64*,sqlite3_int64*,int); 278 | int (*strlike)(const char*,const char*,unsigned int); 279 | int (*db_cacheflush)(sqlite3*); 280 | /* Version 3.12.0 and later */ 281 | int (*system_errno)(sqlite3*); 282 | /* Version 3.14.0 and later */ 283 | int (*trace_v2)(sqlite3*,unsigned,int(*)(unsigned,void*,void*,void*),void*); 284 | char *(*expanded_sql)(sqlite3_stmt*); 285 | /* Version 3.18.0 and later */ 286 | void (*set_last_insert_rowid)(sqlite3*,sqlite3_int64); 287 | /* Version 3.20.0 and later */ 288 | int (*prepare_v3)(sqlite3*,const char*,int,unsigned int, 289 | sqlite3_stmt**,const char**); 290 | int (*prepare16_v3)(sqlite3*,const void*,int,unsigned int, 291 | sqlite3_stmt**,const void**); 292 | int (*bind_pointer)(sqlite3_stmt*,int,void*,const char*,void(*)(void*)); 293 | void (*result_pointer)(sqlite3_context*,void*,const char*,void(*)(void*)); 294 | void *(*value_pointer)(sqlite3_value*,const char*); 295 | int (*vtab_nochange)(sqlite3_context*); 296 | int (*value_nochange)(sqlite3_value*); 297 | const char *(*vtab_collation)(sqlite3_index_info*,int); 298 | /* Version 3.24.0 and later */ 299 | int (*keyword_count)(void); 300 | int (*keyword_name)(int,const char**,int*); 301 | int (*keyword_check)(const char*,int); 302 | sqlite3_str *(*str_new)(sqlite3*); 303 | char *(*str_finish)(sqlite3_str*); 304 | void (*str_appendf)(sqlite3_str*, const char *zFormat, ...); 305 | void (*str_vappendf)(sqlite3_str*, const char *zFormat, va_list); 306 | void (*str_append)(sqlite3_str*, const char *zIn, int N); 307 | void (*str_appendall)(sqlite3_str*, const char *zIn); 308 | void (*str_appendchar)(sqlite3_str*, int N, char C); 309 | void (*str_reset)(sqlite3_str*); 310 | int (*str_errcode)(sqlite3_str*); 311 | int (*str_length)(sqlite3_str*); 312 | char *(*str_value)(sqlite3_str*); 313 | /* Version 3.25.0 and later */ 314 | int (*create_window_function)(sqlite3*,const char*,int,int,void*, 315 | void (*xStep)(sqlite3_context*,int,sqlite3_value**), 316 | void (*xFinal)(sqlite3_context*), 317 | void (*xValue)(sqlite3_context*), 318 | void (*xInv)(sqlite3_context*,int,sqlite3_value**), 319 | void(*xDestroy)(void*)); 320 | /* Version 3.26.0 and later */ 321 | const char *(*normalized_sql)(sqlite3_stmt*); 322 | /* Version 3.28.0 and later */ 323 | int (*stmt_isexplain)(sqlite3_stmt*); 324 | int (*value_frombind)(sqlite3_value*); 325 | /* Version 3.30.0 and later */ 326 | int (*drop_modules)(sqlite3*,const char**); 327 | /* Version 3.31.0 and later */ 328 | sqlite3_int64 (*hard_heap_limit64)(sqlite3_int64); 329 | const char *(*uri_key)(const char*,int); 330 | const char *(*filename_database)(const char*); 331 | const char *(*filename_journal)(const char*); 332 | const char *(*filename_wal)(const char*); 333 | /* Version 3.32.0 and later */ 334 | const char *(*create_filename)(const char*,const char*,const char*, 335 | int,const char**); 336 | void (*free_filename)(const char*); 337 | sqlite3_file *(*database_file_object)(const char*); 338 | /* Version 3.34.0 and later */ 339 | int (*txn_state)(sqlite3*,const char*); 340 | /* Version 3.36.1 and later */ 341 | sqlite3_int64 (*changes64)(sqlite3*); 342 | sqlite3_int64 (*total_changes64)(sqlite3*); 343 | /* Version 3.37.0 and later */ 344 | int (*autovacuum_pages)(sqlite3*, 345 | unsigned int(*)(void*,const char*,unsigned int,unsigned int,unsigned int), 346 | void*, void(*)(void*)); 347 | /* Version 3.38.0 and later */ 348 | int (*error_offset)(sqlite3*); 349 | int (*vtab_rhs_value)(sqlite3_index_info*,int,sqlite3_value**); 350 | int (*vtab_distinct)(sqlite3_index_info*); 351 | int (*vtab_in)(sqlite3_index_info*,int,int); 352 | int (*vtab_in_first)(sqlite3_value*,sqlite3_value**); 353 | int (*vtab_in_next)(sqlite3_value*,sqlite3_value**); 354 | /* Version 3.39.0 and later */ 355 | int (*deserialize)(sqlite3*,const char*,unsigned char*, 356 | sqlite3_int64,sqlite3_int64,unsigned); 357 | unsigned char *(*serialize)(sqlite3*,const char *,sqlite3_int64*, 358 | unsigned int); 359 | const char *(*db_name)(sqlite3*,int); 360 | /* Version 3.40.0 and later */ 361 | int (*value_encoding)(sqlite3_value*); 362 | /* Version 3.41.0 and later */ 363 | int (*is_interrupted)(sqlite3*); 364 | }; 365 | 366 | /* 367 | ** This is the function signature used for all extension entry points. It 368 | ** is also defined in the file "loadext.c". 369 | */ 370 | typedef int (*sqlite3_loadext_entry)( 371 | sqlite3 *db, /* Handle to the database. */ 372 | char **pzErrMsg, /* Used to set error string on failure. */ 373 | const sqlite3_api_routines *pThunk /* Extension API function pointers. */ 374 | ); 375 | 376 | /* 377 | ** The following macros redefine the API routines so that they are 378 | ** redirected through the global sqlite3_api structure. 379 | ** 380 | ** This header file is also used by the loadext.c source file 381 | ** (part of the main SQLite library - not an extension) so that 382 | ** it can get access to the sqlite3_api_routines structure 383 | ** definition. But the main library does not want to redefine 384 | ** the API. So the redefinition macros are only valid if the 385 | ** SQLITE_CORE macros is undefined. 386 | */ 387 | #if !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION) 388 | #define sqlite3_aggregate_context sqlite3_api->aggregate_context 389 | #ifndef SQLITE_OMIT_DEPRECATED 390 | #define sqlite3_aggregate_count sqlite3_api->aggregate_count 391 | #endif 392 | #define sqlite3_bind_blob sqlite3_api->bind_blob 393 | #define sqlite3_bind_double sqlite3_api->bind_double 394 | #define sqlite3_bind_int sqlite3_api->bind_int 395 | #define sqlite3_bind_int64 sqlite3_api->bind_int64 396 | #define sqlite3_bind_null sqlite3_api->bind_null 397 | #define sqlite3_bind_parameter_count sqlite3_api->bind_parameter_count 398 | #define sqlite3_bind_parameter_index sqlite3_api->bind_parameter_index 399 | #define sqlite3_bind_parameter_name sqlite3_api->bind_parameter_name 400 | #define sqlite3_bind_text sqlite3_api->bind_text 401 | #define sqlite3_bind_text16 sqlite3_api->bind_text16 402 | #define sqlite3_bind_value sqlite3_api->bind_value 403 | #define sqlite3_busy_handler sqlite3_api->busy_handler 404 | #define sqlite3_busy_timeout sqlite3_api->busy_timeout 405 | #define sqlite3_changes sqlite3_api->changes 406 | #define sqlite3_close sqlite3_api->close 407 | #define sqlite3_collation_needed sqlite3_api->collation_needed 408 | #define sqlite3_collation_needed16 sqlite3_api->collation_needed16 409 | #define sqlite3_column_blob sqlite3_api->column_blob 410 | #define sqlite3_column_bytes sqlite3_api->column_bytes 411 | #define sqlite3_column_bytes16 sqlite3_api->column_bytes16 412 | #define sqlite3_column_count sqlite3_api->column_count 413 | #define sqlite3_column_database_name sqlite3_api->column_database_name 414 | #define sqlite3_column_database_name16 sqlite3_api->column_database_name16 415 | #define sqlite3_column_decltype sqlite3_api->column_decltype 416 | #define sqlite3_column_decltype16 sqlite3_api->column_decltype16 417 | #define sqlite3_column_double sqlite3_api->column_double 418 | #define sqlite3_column_int sqlite3_api->column_int 419 | #define sqlite3_column_int64 sqlite3_api->column_int64 420 | #define sqlite3_column_name sqlite3_api->column_name 421 | #define sqlite3_column_name16 sqlite3_api->column_name16 422 | #define sqlite3_column_origin_name sqlite3_api->column_origin_name 423 | #define sqlite3_column_origin_name16 sqlite3_api->column_origin_name16 424 | #define sqlite3_column_table_name sqlite3_api->column_table_name 425 | #define sqlite3_column_table_name16 sqlite3_api->column_table_name16 426 | #define sqlite3_column_text sqlite3_api->column_text 427 | #define sqlite3_column_text16 sqlite3_api->column_text16 428 | #define sqlite3_column_type sqlite3_api->column_type 429 | #define sqlite3_column_value sqlite3_api->column_value 430 | #define sqlite3_commit_hook sqlite3_api->commit_hook 431 | #define sqlite3_complete sqlite3_api->complete 432 | #define sqlite3_complete16 sqlite3_api->complete16 433 | #define sqlite3_create_collation sqlite3_api->create_collation 434 | #define sqlite3_create_collation16 sqlite3_api->create_collation16 435 | #define sqlite3_create_function sqlite3_api->create_function 436 | #define sqlite3_create_function16 sqlite3_api->create_function16 437 | #define sqlite3_create_module sqlite3_api->create_module 438 | #define sqlite3_create_module_v2 sqlite3_api->create_module_v2 439 | #define sqlite3_data_count sqlite3_api->data_count 440 | #define sqlite3_db_handle sqlite3_api->db_handle 441 | #define sqlite3_declare_vtab sqlite3_api->declare_vtab 442 | #define sqlite3_enable_shared_cache sqlite3_api->enable_shared_cache 443 | #define sqlite3_errcode sqlite3_api->errcode 444 | #define sqlite3_errmsg sqlite3_api->errmsg 445 | #define sqlite3_errmsg16 sqlite3_api->errmsg16 446 | #define sqlite3_exec sqlite3_api->exec 447 | #ifndef SQLITE_OMIT_DEPRECATED 448 | #define sqlite3_expired sqlite3_api->expired 449 | #endif 450 | #define sqlite3_finalize sqlite3_api->finalize 451 | #define sqlite3_free sqlite3_api->free 452 | #define sqlite3_free_table sqlite3_api->free_table 453 | #define sqlite3_get_autocommit sqlite3_api->get_autocommit 454 | #define sqlite3_get_auxdata sqlite3_api->get_auxdata 455 | #define sqlite3_get_table sqlite3_api->get_table 456 | #ifndef SQLITE_OMIT_DEPRECATED 457 | #define sqlite3_global_recover sqlite3_api->global_recover 458 | #endif 459 | #define sqlite3_interrupt sqlite3_api->interruptx 460 | #define sqlite3_last_insert_rowid sqlite3_api->last_insert_rowid 461 | #define sqlite3_libversion sqlite3_api->libversion 462 | #define sqlite3_libversion_number sqlite3_api->libversion_number 463 | #define sqlite3_malloc sqlite3_api->malloc 464 | #define sqlite3_mprintf sqlite3_api->mprintf 465 | #define sqlite3_open sqlite3_api->open 466 | #define sqlite3_open16 sqlite3_api->open16 467 | #define sqlite3_prepare sqlite3_api->prepare 468 | #define sqlite3_prepare16 sqlite3_api->prepare16 469 | #define sqlite3_prepare_v2 sqlite3_api->prepare_v2 470 | #define sqlite3_prepare16_v2 sqlite3_api->prepare16_v2 471 | #define sqlite3_profile sqlite3_api->profile 472 | #define sqlite3_progress_handler sqlite3_api->progress_handler 473 | #define sqlite3_realloc sqlite3_api->realloc 474 | #define sqlite3_reset sqlite3_api->reset 475 | #define sqlite3_result_blob sqlite3_api->result_blob 476 | #define sqlite3_result_double sqlite3_api->result_double 477 | #define sqlite3_result_error sqlite3_api->result_error 478 | #define sqlite3_result_error16 sqlite3_api->result_error16 479 | #define sqlite3_result_int sqlite3_api->result_int 480 | #define sqlite3_result_int64 sqlite3_api->result_int64 481 | #define sqlite3_result_null sqlite3_api->result_null 482 | #define sqlite3_result_text sqlite3_api->result_text 483 | #define sqlite3_result_text16 sqlite3_api->result_text16 484 | #define sqlite3_result_text16be sqlite3_api->result_text16be 485 | #define sqlite3_result_text16le sqlite3_api->result_text16le 486 | #define sqlite3_result_value sqlite3_api->result_value 487 | #define sqlite3_rollback_hook sqlite3_api->rollback_hook 488 | #define sqlite3_set_authorizer sqlite3_api->set_authorizer 489 | #define sqlite3_set_auxdata sqlite3_api->set_auxdata 490 | #define sqlite3_snprintf sqlite3_api->xsnprintf 491 | #define sqlite3_step sqlite3_api->step 492 | #define sqlite3_table_column_metadata sqlite3_api->table_column_metadata 493 | #define sqlite3_thread_cleanup sqlite3_api->thread_cleanup 494 | #define sqlite3_total_changes sqlite3_api->total_changes 495 | #define sqlite3_trace sqlite3_api->trace 496 | #ifndef SQLITE_OMIT_DEPRECATED 497 | #define sqlite3_transfer_bindings sqlite3_api->transfer_bindings 498 | #endif 499 | #define sqlite3_update_hook sqlite3_api->update_hook 500 | #define sqlite3_user_data sqlite3_api->user_data 501 | #define sqlite3_value_blob sqlite3_api->value_blob 502 | #define sqlite3_value_bytes sqlite3_api->value_bytes 503 | #define sqlite3_value_bytes16 sqlite3_api->value_bytes16 504 | #define sqlite3_value_double sqlite3_api->value_double 505 | #define sqlite3_value_int sqlite3_api->value_int 506 | #define sqlite3_value_int64 sqlite3_api->value_int64 507 | #define sqlite3_value_numeric_type sqlite3_api->value_numeric_type 508 | #define sqlite3_value_text sqlite3_api->value_text 509 | #define sqlite3_value_text16 sqlite3_api->value_text16 510 | #define sqlite3_value_text16be sqlite3_api->value_text16be 511 | #define sqlite3_value_text16le sqlite3_api->value_text16le 512 | #define sqlite3_value_type sqlite3_api->value_type 513 | #define sqlite3_vmprintf sqlite3_api->vmprintf 514 | #define sqlite3_vsnprintf sqlite3_api->xvsnprintf 515 | #define sqlite3_overload_function sqlite3_api->overload_function 516 | #define sqlite3_prepare_v2 sqlite3_api->prepare_v2 517 | #define sqlite3_prepare16_v2 sqlite3_api->prepare16_v2 518 | #define sqlite3_clear_bindings sqlite3_api->clear_bindings 519 | #define sqlite3_bind_zeroblob sqlite3_api->bind_zeroblob 520 | #define sqlite3_blob_bytes sqlite3_api->blob_bytes 521 | #define sqlite3_blob_close sqlite3_api->blob_close 522 | #define sqlite3_blob_open sqlite3_api->blob_open 523 | #define sqlite3_blob_read sqlite3_api->blob_read 524 | #define sqlite3_blob_write sqlite3_api->blob_write 525 | #define sqlite3_create_collation_v2 sqlite3_api->create_collation_v2 526 | #define sqlite3_file_control sqlite3_api->file_control 527 | #define sqlite3_memory_highwater sqlite3_api->memory_highwater 528 | #define sqlite3_memory_used sqlite3_api->memory_used 529 | #define sqlite3_mutex_alloc sqlite3_api->mutex_alloc 530 | #define sqlite3_mutex_enter sqlite3_api->mutex_enter 531 | #define sqlite3_mutex_free sqlite3_api->mutex_free 532 | #define sqlite3_mutex_leave sqlite3_api->mutex_leave 533 | #define sqlite3_mutex_try sqlite3_api->mutex_try 534 | #define sqlite3_open_v2 sqlite3_api->open_v2 535 | #define sqlite3_release_memory sqlite3_api->release_memory 536 | #define sqlite3_result_error_nomem sqlite3_api->result_error_nomem 537 | #define sqlite3_result_error_toobig sqlite3_api->result_error_toobig 538 | #define sqlite3_sleep sqlite3_api->sleep 539 | #define sqlite3_soft_heap_limit sqlite3_api->soft_heap_limit 540 | #define sqlite3_vfs_find sqlite3_api->vfs_find 541 | #define sqlite3_vfs_register sqlite3_api->vfs_register 542 | #define sqlite3_vfs_unregister sqlite3_api->vfs_unregister 543 | #define sqlite3_threadsafe sqlite3_api->xthreadsafe 544 | #define sqlite3_result_zeroblob sqlite3_api->result_zeroblob 545 | #define sqlite3_result_error_code sqlite3_api->result_error_code 546 | #define sqlite3_test_control sqlite3_api->test_control 547 | #define sqlite3_randomness sqlite3_api->randomness 548 | #define sqlite3_context_db_handle sqlite3_api->context_db_handle 549 | #define sqlite3_extended_result_codes sqlite3_api->extended_result_codes 550 | #define sqlite3_limit sqlite3_api->limit 551 | #define sqlite3_next_stmt sqlite3_api->next_stmt 552 | #define sqlite3_sql sqlite3_api->sql 553 | #define sqlite3_status sqlite3_api->status 554 | #define sqlite3_backup_finish sqlite3_api->backup_finish 555 | #define sqlite3_backup_init sqlite3_api->backup_init 556 | #define sqlite3_backup_pagecount sqlite3_api->backup_pagecount 557 | #define sqlite3_backup_remaining sqlite3_api->backup_remaining 558 | #define sqlite3_backup_step sqlite3_api->backup_step 559 | #define sqlite3_compileoption_get sqlite3_api->compileoption_get 560 | #define sqlite3_compileoption_used sqlite3_api->compileoption_used 561 | #define sqlite3_create_function_v2 sqlite3_api->create_function_v2 562 | #define sqlite3_db_config sqlite3_api->db_config 563 | #define sqlite3_db_mutex sqlite3_api->db_mutex 564 | #define sqlite3_db_status sqlite3_api->db_status 565 | #define sqlite3_extended_errcode sqlite3_api->extended_errcode 566 | #define sqlite3_log sqlite3_api->log 567 | #define sqlite3_soft_heap_limit64 sqlite3_api->soft_heap_limit64 568 | #define sqlite3_sourceid sqlite3_api->sourceid 569 | #define sqlite3_stmt_status sqlite3_api->stmt_status 570 | #define sqlite3_strnicmp sqlite3_api->strnicmp 571 | #define sqlite3_unlock_notify sqlite3_api->unlock_notify 572 | #define sqlite3_wal_autocheckpoint sqlite3_api->wal_autocheckpoint 573 | #define sqlite3_wal_checkpoint sqlite3_api->wal_checkpoint 574 | #define sqlite3_wal_hook sqlite3_api->wal_hook 575 | #define sqlite3_blob_reopen sqlite3_api->blob_reopen 576 | #define sqlite3_vtab_config sqlite3_api->vtab_config 577 | #define sqlite3_vtab_on_conflict sqlite3_api->vtab_on_conflict 578 | /* Version 3.7.16 and later */ 579 | #define sqlite3_close_v2 sqlite3_api->close_v2 580 | #define sqlite3_db_filename sqlite3_api->db_filename 581 | #define sqlite3_db_readonly sqlite3_api->db_readonly 582 | #define sqlite3_db_release_memory sqlite3_api->db_release_memory 583 | #define sqlite3_errstr sqlite3_api->errstr 584 | #define sqlite3_stmt_busy sqlite3_api->stmt_busy 585 | #define sqlite3_stmt_readonly sqlite3_api->stmt_readonly 586 | #define sqlite3_stricmp sqlite3_api->stricmp 587 | #define sqlite3_uri_boolean sqlite3_api->uri_boolean 588 | #define sqlite3_uri_int64 sqlite3_api->uri_int64 589 | #define sqlite3_uri_parameter sqlite3_api->uri_parameter 590 | #define sqlite3_uri_vsnprintf sqlite3_api->xvsnprintf 591 | #define sqlite3_wal_checkpoint_v2 sqlite3_api->wal_checkpoint_v2 592 | /* Version 3.8.7 and later */ 593 | #define sqlite3_auto_extension sqlite3_api->auto_extension 594 | #define sqlite3_bind_blob64 sqlite3_api->bind_blob64 595 | #define sqlite3_bind_text64 sqlite3_api->bind_text64 596 | #define sqlite3_cancel_auto_extension sqlite3_api->cancel_auto_extension 597 | #define sqlite3_load_extension sqlite3_api->load_extension 598 | #define sqlite3_malloc64 sqlite3_api->malloc64 599 | #define sqlite3_msize sqlite3_api->msize 600 | #define sqlite3_realloc64 sqlite3_api->realloc64 601 | #define sqlite3_reset_auto_extension sqlite3_api->reset_auto_extension 602 | #define sqlite3_result_blob64 sqlite3_api->result_blob64 603 | #define sqlite3_result_text64 sqlite3_api->result_text64 604 | #define sqlite3_strglob sqlite3_api->strglob 605 | /* Version 3.8.11 and later */ 606 | #define sqlite3_value_dup sqlite3_api->value_dup 607 | #define sqlite3_value_free sqlite3_api->value_free 608 | #define sqlite3_result_zeroblob64 sqlite3_api->result_zeroblob64 609 | #define sqlite3_bind_zeroblob64 sqlite3_api->bind_zeroblob64 610 | /* Version 3.9.0 and later */ 611 | #define sqlite3_value_subtype sqlite3_api->value_subtype 612 | #define sqlite3_result_subtype sqlite3_api->result_subtype 613 | /* Version 3.10.0 and later */ 614 | #define sqlite3_status64 sqlite3_api->status64 615 | #define sqlite3_strlike sqlite3_api->strlike 616 | #define sqlite3_db_cacheflush sqlite3_api->db_cacheflush 617 | /* Version 3.12.0 and later */ 618 | #define sqlite3_system_errno sqlite3_api->system_errno 619 | /* Version 3.14.0 and later */ 620 | #define sqlite3_trace_v2 sqlite3_api->trace_v2 621 | #define sqlite3_expanded_sql sqlite3_api->expanded_sql 622 | /* Version 3.18.0 and later */ 623 | #define sqlite3_set_last_insert_rowid sqlite3_api->set_last_insert_rowid 624 | /* Version 3.20.0 and later */ 625 | #define sqlite3_prepare_v3 sqlite3_api->prepare_v3 626 | #define sqlite3_prepare16_v3 sqlite3_api->prepare16_v3 627 | #define sqlite3_bind_pointer sqlite3_api->bind_pointer 628 | #define sqlite3_result_pointer sqlite3_api->result_pointer 629 | #define sqlite3_value_pointer sqlite3_api->value_pointer 630 | /* Version 3.22.0 and later */ 631 | #define sqlite3_vtab_nochange sqlite3_api->vtab_nochange 632 | #define sqlite3_value_nochange sqlite3_api->value_nochange 633 | #define sqlite3_vtab_collation sqlite3_api->vtab_collation 634 | /* Version 3.24.0 and later */ 635 | #define sqlite3_keyword_count sqlite3_api->keyword_count 636 | #define sqlite3_keyword_name sqlite3_api->keyword_name 637 | #define sqlite3_keyword_check sqlite3_api->keyword_check 638 | #define sqlite3_str_new sqlite3_api->str_new 639 | #define sqlite3_str_finish sqlite3_api->str_finish 640 | #define sqlite3_str_appendf sqlite3_api->str_appendf 641 | #define sqlite3_str_vappendf sqlite3_api->str_vappendf 642 | #define sqlite3_str_append sqlite3_api->str_append 643 | #define sqlite3_str_appendall sqlite3_api->str_appendall 644 | #define sqlite3_str_appendchar sqlite3_api->str_appendchar 645 | #define sqlite3_str_reset sqlite3_api->str_reset 646 | #define sqlite3_str_errcode sqlite3_api->str_errcode 647 | #define sqlite3_str_length sqlite3_api->str_length 648 | #define sqlite3_str_value sqlite3_api->str_value 649 | /* Version 3.25.0 and later */ 650 | #define sqlite3_create_window_function sqlite3_api->create_window_function 651 | /* Version 3.26.0 and later */ 652 | #define sqlite3_normalized_sql sqlite3_api->normalized_sql 653 | /* Version 3.28.0 and later */ 654 | #define sqlite3_stmt_isexplain sqlite3_api->stmt_isexplain 655 | #define sqlite3_value_frombind sqlite3_api->value_frombind 656 | /* Version 3.30.0 and later */ 657 | #define sqlite3_drop_modules sqlite3_api->drop_modules 658 | /* Version 3.31.0 and later */ 659 | #define sqlite3_hard_heap_limit64 sqlite3_api->hard_heap_limit64 660 | #define sqlite3_uri_key sqlite3_api->uri_key 661 | #define sqlite3_filename_database sqlite3_api->filename_database 662 | #define sqlite3_filename_journal sqlite3_api->filename_journal 663 | #define sqlite3_filename_wal sqlite3_api->filename_wal 664 | /* Version 3.32.0 and later */ 665 | #define sqlite3_create_filename sqlite3_api->create_filename 666 | #define sqlite3_free_filename sqlite3_api->free_filename 667 | #define sqlite3_database_file_object sqlite3_api->database_file_object 668 | /* Version 3.34.0 and later */ 669 | #define sqlite3_txn_state sqlite3_api->txn_state 670 | /* Version 3.36.1 and later */ 671 | #define sqlite3_changes64 sqlite3_api->changes64 672 | #define sqlite3_total_changes64 sqlite3_api->total_changes64 673 | /* Version 3.37.0 and later */ 674 | #define sqlite3_autovacuum_pages sqlite3_api->autovacuum_pages 675 | /* Version 3.38.0 and later */ 676 | #define sqlite3_error_offset sqlite3_api->error_offset 677 | #define sqlite3_vtab_rhs_value sqlite3_api->vtab_rhs_value 678 | #define sqlite3_vtab_distinct sqlite3_api->vtab_distinct 679 | #define sqlite3_vtab_in sqlite3_api->vtab_in 680 | #define sqlite3_vtab_in_first sqlite3_api->vtab_in_first 681 | #define sqlite3_vtab_in_next sqlite3_api->vtab_in_next 682 | /* Version 3.39.0 and later */ 683 | #ifndef SQLITE_OMIT_DESERIALIZE 684 | #define sqlite3_deserialize sqlite3_api->deserialize 685 | #define sqlite3_serialize sqlite3_api->serialize 686 | #endif 687 | #define sqlite3_db_name sqlite3_api->db_name 688 | /* Version 3.40.0 and later */ 689 | #define sqlite3_value_encoding sqlite3_api->value_encoding 690 | /* Version 3.41.0 and later */ 691 | #define sqlite3_is_interrupted sqlite3_api->is_interrupted 692 | #endif /* !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION) */ 693 | 694 | #if !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION) 695 | /* This case when the file really is being compiled as a loadable 696 | ** extension */ 697 | # define SQLITE_EXTENSION_INIT1 const sqlite3_api_routines *sqlite3_api=0; 698 | # define SQLITE_EXTENSION_INIT2(v) sqlite3_api=v; 699 | # define SQLITE_EXTENSION_INIT3 \ 700 | extern const sqlite3_api_routines *sqlite3_api; 701 | #else 702 | /* This case when the file is being statically linked into the 703 | ** application */ 704 | # define SQLITE_EXTENSION_INIT1 /*no-op*/ 705 | # define SQLITE_EXTENSION_INIT2(v) (void)v; /* unused parameter */ 706 | # define SQLITE_EXTENSION_INIT3 /*no-op*/ 707 | #endif 708 | 709 | #endif /* SQLITE3EXT_H */ 710 | --------------------------------------------------------------------------------