├── .gitignore ├── Cargo.toml ├── README.md ├── Makefile ├── src └── lib.rs ├── .github └── workflows │ └── test.yaml ├── tests └── test-loadable.py └── Cargo.lock /.gitignore: -------------------------------------------------------------------------------- 1 | target/ 2 | dist/ -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "sqlite-base64" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | sqlite-loadable = "0.0.5" 8 | base64 = "0.13.0" 9 | 10 | [lib] 11 | crate-type=["lib", "staticlib", "cdylib"] -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # sqlite-base64 2 | 3 | A base64 encoder/decoder for SQLite, written in Rust. See [`sqlite-loadable-rs`](https://github.com/asg017/sqlite-loadable-rs), the framework that makes this extension possible. 4 | md). 5 | 6 | ## WORK IN PROGRESS 7 | 8 | This extension isn't 100% complete yet, but hoping to release soon! Once it's ready, you'll be able to do things like: 9 | 10 | ```sql 11 | select base64_decode('YWxleA=='); -- 'alex' 12 | select base64_encode('angel'); -- 'YW5nZWw=' 13 | ``` 14 | 15 | In the meantime, checkout the very-new and more offical [base64.c](https://github.com/sqlite/sqlite/blob/master/ext/misc/base64.c) SQLite extension. 16 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | ifeq ($(shell uname -s),Darwin) 2 | CONFIG_DARWIN=y 3 | else ifeq ($(OS),Windows_NT) 4 | CONFIG_WINDOWS=y 5 | else 6 | CONFIG_LINUX=y 7 | endif 8 | 9 | LIBRARY_PREFIX=lib 10 | ifdef CONFIG_DARWIN 11 | LOADABLE_EXTENSION=dylib 12 | endif 13 | 14 | ifdef CONFIG_LINUX 15 | LOADABLE_EXTENSION=so 16 | endif 17 | 18 | 19 | ifdef CONFIG_WINDOWS 20 | LOADABLE_EXTENSION=dll 21 | LIBRARY_PREFIX= 22 | endif 23 | 24 | prefix=dist 25 | TARGET_LOADABLE=$(prefix)/debug/basesixfour0.$(LOADABLE_EXTENSION) 26 | TARGET_STATIC=$(prefix)/debug/basesixfour0.a 27 | 28 | TARGET_LOADABLE_RELEASE=$(prefix)/release/basesixfour0.$(LOADABLE_EXTENSION) 29 | TARGET_STATIC_RELEASE=$(prefix)/release/basesixfour0.a 30 | 31 | 32 | ifdef target 33 | CARGO_TARGET=--target=$(target) 34 | BUILT_LOCATION=target/$(target)/debug/$(LIBRARY_PREFIX)sqlite_base64.$(LOADABLE_EXTENSION) 35 | else 36 | CARGO_TARGET= 37 | BUILT_LOCATION=target/debug/$(LIBRARY_PREFIX)sqlite_base64.$(LOADABLE_EXTENSION) 38 | endif 39 | 40 | 41 | $(prefix): 42 | mkdir -p $(prefix)/debug 43 | mkdir -p $(prefix)/release 44 | 45 | $(TARGET_LOADABLE): $(prefix) $(shell find . -type f -name '*.rs') 46 | cargo build $(CARGO_TARGET) 47 | cp $(BUILT_LOCATION) $@ 48 | 49 | $(TARGET_STATIC): $(prefix) $(shell find . -type f -name '*.rs') 50 | cargo build 51 | cp target/debug/$(LIBRARY_PREFIX)sqlite_basesixfour.a $@ 52 | 53 | 54 | $(TARGET_LOADABLE_RELEASE): $(prefix) $(shell find . -type f -name '*.rs') 55 | cargo build --release 56 | cp target/release/$(LIBRARY_PREFIX)sqlite_basesixfour.$(LOADABLE_EXTENSION) $@ 57 | 58 | $(TARGET_STATIC_RELEASE): $(prefix) $(shell find . -type f -name '*.rs') 59 | cargo build 60 | cp target/debug/$(LIBRARY_PREFIX)sqlite_basesixfour.a $@ 61 | 62 | sqlite-basesixfour.h: cbindgen.toml 63 | rustup run nightly cbindgen --config $< -o $@ 64 | 65 | release: $(TARGET_LOADABLE_RELEASE) $(TARGET_STATIC_RELEASE) 66 | 67 | loadable: $(TARGET_LOADABLE) 68 | loadable-release: $(TARGET_LOADABLE_RELEASE) 69 | static: $(TARGET_STATIC) 70 | 71 | clean: 72 | rm dist/* 73 | cargo clean 74 | 75 | test: 76 | python3 tests/test-loadable.py 77 | 78 | .PHONY: clean test loadable static -------------------------------------------------------------------------------- /src/lib.rs: -------------------------------------------------------------------------------- 1 | use sqlite_loadable::prelude::*; 2 | use sqlite_loadable::{api, define_scalar_function, Error, Result}; 3 | 4 | /// base64_version() 5 | pub fn base64_version(context: *mut sqlite3_context, _values: &[*mut sqlite3_value]) -> Result<()> { 6 | api::result_text(context, &format!("v{}", env!("CARGO_PKG_VERSION")))?; 7 | Ok(()) 8 | } 9 | 10 | /// base64_debug() 11 | pub fn base64_debug(context: *mut sqlite3_context, _values: &[*mut sqlite3_value]) -> Result<()> { 12 | api::result_text( 13 | context, 14 | &format!( 15 | "Version: v{} 16 | Source: {} 17 | ", 18 | env!("CARGO_PKG_VERSION"), 19 | env!("GIT_HASH") 20 | ), 21 | )?; 22 | Ok(()) 23 | } 24 | 25 | /// base64_decode(data) 26 | pub fn base64_decode(context: *mut sqlite3_context, values: &[*mut sqlite3_value]) -> Result<()> { 27 | let contents = api::value_text( 28 | values 29 | .get(0) 30 | .ok_or_else(|| Error::new_message("expected 1st argument as contents"))? 31 | , 32 | )?; 33 | let res = base64::decode(contents) 34 | .map_err(|e| Error::new_message(format!("error decoding: {}", e).as_str()))?; 35 | let result = std::str::from_utf8(&res)?; 36 | api::result_text(context, result)?; 37 | Ok(()) 38 | } 39 | /// base64_encode(data) 40 | pub fn base64_encode(context: *mut sqlite3_context, values: &[*mut sqlite3_value]) -> Result<()> { 41 | let contents = api::value_text( 42 | values 43 | .get(0) 44 | .ok_or_else(|| Error::new_message("expected 1st argument as contents"))? 45 | , 46 | )?; 47 | let res = base64::encode(contents.as_bytes()); 48 | //base64::encode_config_slice(input, config, output) 49 | api::result_text(context, &res)?; 50 | Ok(()) 51 | } 52 | 53 | #[sqlite_entrypoint] 54 | fn sqlite3_basesixfour_init(db: *mut sqlite3) -> Result<()> { 55 | let flags = FunctionFlags::UTF8 | FunctionFlags::DETERMINISTIC; 56 | define_scalar_function(db, "base64_version", 0, base64_version, flags)?; 57 | define_scalar_function(db, "base64_debug", 0, base64_debug, flags)?; 58 | 59 | define_scalar_function(db, "base64_decode", 1, base64_decode, flags)?; 60 | define_scalar_function(db, "base64_encode", 1, base64_encode, flags)?; 61 | Ok(()) 62 | } 63 | -------------------------------------------------------------------------------- /.github/workflows/test.yaml: -------------------------------------------------------------------------------- 1 | name: "test build" 2 | on: 3 | push: 4 | branches: 5 | - main 6 | permissions: 7 | contents: read 8 | jobs: 9 | test-ubuntu: 10 | name: Testing ubuntu-latest 11 | runs-on: ubuntu-latest 12 | steps: 13 | - uses: actions/checkout@v2 14 | - uses: actions/cache@v3 15 | with: 16 | path: | 17 | ~/.cargo/bin/ 18 | ~/.cargo/registry/index/ 19 | ~/.cargo/registry/cache/ 20 | ~/.cargo/git/db/ 21 | target/ 22 | key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} 23 | - uses: actions-rs/toolchain@v1 24 | with: 25 | toolchain: stable 26 | - run: make loadable 27 | - name: Upload artifacts 28 | uses: actions/upload-artifact@v2 29 | with: 30 | name: sqlite-base64-ubuntu 31 | path: dist/debug/basesixfour0.so 32 | test-macos: 33 | name: Testing macos-latest 34 | runs-on: macos-latest 35 | steps: 36 | - uses: actions/checkout@v2 37 | - uses: actions/cache@v3 38 | with: 39 | path: | 40 | ~/.cargo/bin/ 41 | ~/.cargo/registry/index/ 42 | ~/.cargo/registry/cache/ 43 | ~/.cargo/git/db/ 44 | target/ 45 | key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} 46 | - uses: actions-rs/toolchain@v1 47 | with: 48 | toolchain: stable 49 | - run: make loadable 50 | #- run: make test 51 | - name: Upload artifacts 52 | uses: actions/upload-artifact@v2 53 | with: 54 | name: sqlite-base64-macos 55 | path: dist/debug/basesixfour0.dylib 56 | test-macos-arm: 57 | name: Testing macos-latest with arm 58 | runs-on: macos-latest 59 | steps: 60 | - uses: actions/checkout@v3 61 | - uses: actions/cache@v3 62 | with: 63 | path: | 64 | ~/.cargo/bin/ 65 | ~/.cargo/registry/index/ 66 | ~/.cargo/registry/cache/ 67 | ~/.cargo/git/db/ 68 | target/ 69 | key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} 70 | - uses: actions-rs/toolchain@v1 71 | with: 72 | toolchain: stable 73 | - run: rustup target add aarch64-apple-darwin 74 | - run: make target=aarch64-apple-darwin loadable 75 | #- run: make test 76 | - name: Upload artifacts 77 | uses: actions/upload-artifact@v3 78 | with: 79 | name: sqlite-regex-macos-arm 80 | path: dist/debug/regex0.dylib 81 | test-windows: 82 | name: Testing windows-latest 83 | runs-on: windows-latest 84 | steps: 85 | - uses: actions/checkout@v2 86 | - uses: actions/cache@v3 87 | with: 88 | path: | 89 | ~/.cargo/bin/ 90 | ~/.cargo/registry/index/ 91 | ~/.cargo/registry/cache/ 92 | ~/.cargo/git/db/ 93 | target/ 94 | key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} 95 | - uses: actions-rs/toolchain@v1 96 | with: 97 | toolchain: stable 98 | - run: make loadable 99 | #- run: make test 100 | - name: Upload artifacts 101 | uses: actions/upload-artifact@v2 102 | with: 103 | name: sqlite-base64-windows 104 | path: dist/debug/basesixfour0.dll 105 | -------------------------------------------------------------------------------- /tests/test-loadable.py: -------------------------------------------------------------------------------- 1 | import sqlite3 2 | import unittest 3 | 4 | EXT_PATH="./target/debug/libbasesixfour0" 5 | 6 | def connect(ext): 7 | db = sqlite3.connect(":memory:") 8 | 9 | db.execute("create table base_functions as select name from pragma_function_list") 10 | db.execute("create table base_modules as select name from pragma_module_list") 11 | 12 | db.enable_load_extension(True) 13 | db.load_extension(ext) 14 | 15 | db.execute("create temp table loaded_functions as select name from pragma_function_list where name not in (select name from base_functions) order by name") 16 | db.execute("create temp table loaded_modules as select name from pragma_module_list where name not in (select name from base_modules) order by name") 17 | 18 | db.row_factory = sqlite3.Row 19 | return db 20 | 21 | 22 | db = connect(EXT_PATH) 23 | 24 | def explain_query_plan(sql): 25 | return db.execute("explain query plan " + sql).fetchone()["detail"] 26 | 27 | def execute_all(sql, args=None): 28 | if args is None: args = [] 29 | results = db.execute(sql, args).fetchall() 30 | return list(map(lambda x: dict(x), results)) 31 | 32 | FUNCTIONS = [ 33 | "base64_debug", 34 | "base64_decode", 35 | "base64_encode", 36 | "base64_version", 37 | ] 38 | 39 | MODULES = [] 40 | 41 | class TestBase64(unittest.TestCase): 42 | def test_funcs(self): 43 | funcs = list(map(lambda a: a[0], db.execute("select name from loaded_functions").fetchall())) 44 | self.assertEqual(funcs, FUNCTIONS) 45 | 46 | def test_modules(self): 47 | modules = list(map(lambda a: a[0], db.execute("select name from loaded_modules").fetchall())) 48 | self.assertEqual(modules, MODULES) 49 | 50 | def test_base64_version(self): 51 | version = 'v0.1.0' 52 | self.assertEqual(db.execute("select base64_version()").fetchone()[0], version) 53 | 54 | def test_base64_debug(self): 55 | debug = db.execute("select base64_debug()").fetchone()[0] 56 | self.assertEqual(len(debug.splitlines()), 2) 57 | 58 | def test_base64_decode(self): 59 | base64_decode = lambda content: db.execute("select base64_decode(?)", [content]).fetchone()[0] 60 | self.assertEqual(base64_decode('YWxleA=='), 'alex') 61 | #with self.assertRaisesRegex(sqlite3.OperationalError, "Unexpected null value"): 62 | # base64_decode(None) 63 | 64 | with self.assertRaisesRegex(sqlite3.OperationalError, "error decoding: Invalid byte 32, offset 3."): 65 | base64_decode("not base64") 66 | 67 | with self.assertRaisesRegex(sqlite3.OperationalError, "error decoding: Encoded text cannot have a 6-bit remainder."): 68 | base64_decode("not base6") 69 | 70 | def test_base64_encode(self): 71 | base64_encode = lambda content: db.execute("select base64_encode(?)", [content]).fetchone()[0] 72 | self.assertEqual(base64_encode('angel'), 'YW5nZWw=') 73 | 74 | 75 | 76 | class TestCoverage(unittest.TestCase): 77 | def test_coverage(self): 78 | test_methods = [method for method in dir(TestBase64) if method.startswith('test_')] 79 | funcs_with_tests = set([x.replace("test_", "") for x in test_methods]) 80 | 81 | for func in FUNCTIONS: 82 | self.assertTrue(func in funcs_with_tests, f"{func} does not have corresponding test in {funcs_with_tests}") 83 | 84 | for module in MODULES: 85 | self.assertTrue(module in funcs_with_tests, f"{module} does not have corresponding test in {funcs_with_tests}") 86 | 87 | if __name__ == '__main__': 88 | unittest.main() -------------------------------------------------------------------------------- /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 = "aho-corasick" 7 | version = "0.7.19" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "b4f55bd91a0978cbfd91c457a164bab8b4001c833b7f323132c0a4e1922dd44e" 10 | dependencies = [ 11 | "memchr", 12 | ] 13 | 14 | [[package]] 15 | name = "atty" 16 | version = "0.2.14" 17 | source = "registry+https://github.com/rust-lang/crates.io-index" 18 | checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" 19 | dependencies = [ 20 | "hermit-abi", 21 | "libc", 22 | "winapi", 23 | ] 24 | 25 | [[package]] 26 | name = "autocfg" 27 | version = "1.1.0" 28 | source = "registry+https://github.com/rust-lang/crates.io-index" 29 | checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" 30 | 31 | [[package]] 32 | name = "base64" 33 | version = "0.13.0" 34 | source = "registry+https://github.com/rust-lang/crates.io-index" 35 | checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" 36 | 37 | [[package]] 38 | name = "bindgen" 39 | version = "0.60.1" 40 | source = "registry+https://github.com/rust-lang/crates.io-index" 41 | checksum = "062dddbc1ba4aca46de6338e2bf87771414c335f7b2f2036e8f3e9befebf88e6" 42 | dependencies = [ 43 | "bitflags", 44 | "cexpr", 45 | "clang-sys", 46 | "clap", 47 | "env_logger", 48 | "lazy_static", 49 | "lazycell", 50 | "log", 51 | "peeking_take_while", 52 | "proc-macro2", 53 | "quote", 54 | "regex", 55 | "rustc-hash", 56 | "shlex", 57 | "which", 58 | ] 59 | 60 | [[package]] 61 | name = "bitflags" 62 | version = "1.3.2" 63 | source = "registry+https://github.com/rust-lang/crates.io-index" 64 | checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" 65 | 66 | [[package]] 67 | name = "cc" 68 | version = "1.0.73" 69 | source = "registry+https://github.com/rust-lang/crates.io-index" 70 | checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11" 71 | 72 | [[package]] 73 | name = "cexpr" 74 | version = "0.6.0" 75 | source = "registry+https://github.com/rust-lang/crates.io-index" 76 | checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" 77 | dependencies = [ 78 | "nom", 79 | ] 80 | 81 | [[package]] 82 | name = "cfg-if" 83 | version = "1.0.0" 84 | source = "registry+https://github.com/rust-lang/crates.io-index" 85 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 86 | 87 | [[package]] 88 | name = "clang-sys" 89 | version = "1.4.0" 90 | source = "registry+https://github.com/rust-lang/crates.io-index" 91 | checksum = "fa2e27ae6ab525c3d369ded447057bca5438d86dc3a68f6faafb8269ba82ebf3" 92 | dependencies = [ 93 | "glob", 94 | "libc", 95 | "libloading", 96 | ] 97 | 98 | [[package]] 99 | name = "clap" 100 | version = "3.2.22" 101 | source = "registry+https://github.com/rust-lang/crates.io-index" 102 | checksum = "86447ad904c7fb335a790c9d7fe3d0d971dc523b8ccd1561a520de9a85302750" 103 | dependencies = [ 104 | "atty", 105 | "bitflags", 106 | "clap_lex", 107 | "indexmap", 108 | "strsim", 109 | "termcolor", 110 | "textwrap", 111 | ] 112 | 113 | [[package]] 114 | name = "clap_lex" 115 | version = "0.2.4" 116 | source = "registry+https://github.com/rust-lang/crates.io-index" 117 | checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5" 118 | dependencies = [ 119 | "os_str_bytes", 120 | ] 121 | 122 | [[package]] 123 | name = "either" 124 | version = "1.8.0" 125 | source = "registry+https://github.com/rust-lang/crates.io-index" 126 | checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797" 127 | 128 | [[package]] 129 | name = "env_logger" 130 | version = "0.9.1" 131 | source = "registry+https://github.com/rust-lang/crates.io-index" 132 | checksum = "c90bf5f19754d10198ccb95b70664fc925bd1fc090a0fd9a6ebc54acc8cd6272" 133 | dependencies = [ 134 | "atty", 135 | "humantime", 136 | "log", 137 | "regex", 138 | "termcolor", 139 | ] 140 | 141 | [[package]] 142 | name = "glob" 143 | version = "0.3.0" 144 | source = "registry+https://github.com/rust-lang/crates.io-index" 145 | checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" 146 | 147 | [[package]] 148 | name = "hashbrown" 149 | version = "0.12.3" 150 | source = "registry+https://github.com/rust-lang/crates.io-index" 151 | checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" 152 | 153 | [[package]] 154 | name = "hermit-abi" 155 | version = "0.1.19" 156 | source = "registry+https://github.com/rust-lang/crates.io-index" 157 | checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" 158 | dependencies = [ 159 | "libc", 160 | ] 161 | 162 | [[package]] 163 | name = "humantime" 164 | version = "2.1.0" 165 | source = "registry+https://github.com/rust-lang/crates.io-index" 166 | checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" 167 | 168 | [[package]] 169 | name = "indexmap" 170 | version = "1.9.1" 171 | source = "registry+https://github.com/rust-lang/crates.io-index" 172 | checksum = "10a35a97730320ffe8e2d410b5d3b69279b98d2c14bdb8b70ea89ecf7888d41e" 173 | dependencies = [ 174 | "autocfg", 175 | "hashbrown", 176 | ] 177 | 178 | [[package]] 179 | name = "itoa" 180 | version = "1.0.4" 181 | source = "registry+https://github.com/rust-lang/crates.io-index" 182 | checksum = "4217ad341ebadf8d8e724e264f13e593e0648f5b3e94b3896a5df283be015ecc" 183 | 184 | [[package]] 185 | name = "lazy_static" 186 | version = "1.4.0" 187 | source = "registry+https://github.com/rust-lang/crates.io-index" 188 | checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" 189 | 190 | [[package]] 191 | name = "lazycell" 192 | version = "1.3.0" 193 | source = "registry+https://github.com/rust-lang/crates.io-index" 194 | checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" 195 | 196 | [[package]] 197 | name = "libc" 198 | version = "0.2.135" 199 | source = "registry+https://github.com/rust-lang/crates.io-index" 200 | checksum = "68783febc7782c6c5cb401fbda4de5a9898be1762314da0bb2c10ced61f18b0c" 201 | 202 | [[package]] 203 | name = "libloading" 204 | version = "0.7.3" 205 | source = "registry+https://github.com/rust-lang/crates.io-index" 206 | checksum = "efbc0f03f9a775e9f6aed295c6a1ba2253c5757a9e03d55c6caa46a681abcddd" 207 | dependencies = [ 208 | "cfg-if", 209 | "winapi", 210 | ] 211 | 212 | [[package]] 213 | name = "log" 214 | version = "0.4.17" 215 | source = "registry+https://github.com/rust-lang/crates.io-index" 216 | checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" 217 | dependencies = [ 218 | "cfg-if", 219 | ] 220 | 221 | [[package]] 222 | name = "memchr" 223 | version = "2.5.0" 224 | source = "registry+https://github.com/rust-lang/crates.io-index" 225 | checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" 226 | 227 | [[package]] 228 | name = "minimal-lexical" 229 | version = "0.2.1" 230 | source = "registry+https://github.com/rust-lang/crates.io-index" 231 | checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" 232 | 233 | [[package]] 234 | name = "nom" 235 | version = "7.1.1" 236 | source = "registry+https://github.com/rust-lang/crates.io-index" 237 | checksum = "a8903e5a29a317527874d0402f867152a3d21c908bb0b933e416c65e301d4c36" 238 | dependencies = [ 239 | "memchr", 240 | "minimal-lexical", 241 | ] 242 | 243 | [[package]] 244 | name = "once_cell" 245 | version = "1.15.0" 246 | source = "registry+https://github.com/rust-lang/crates.io-index" 247 | checksum = "e82dad04139b71a90c080c8463fe0dc7902db5192d939bd0950f074d014339e1" 248 | 249 | [[package]] 250 | name = "os_str_bytes" 251 | version = "6.3.0" 252 | source = "registry+https://github.com/rust-lang/crates.io-index" 253 | checksum = "9ff7415e9ae3fff1225851df9e0d9e4e5479f947619774677a63572e55e80eff" 254 | 255 | [[package]] 256 | name = "peeking_take_while" 257 | version = "0.1.2" 258 | source = "registry+https://github.com/rust-lang/crates.io-index" 259 | checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" 260 | 261 | [[package]] 262 | name = "proc-macro2" 263 | version = "1.0.46" 264 | source = "registry+https://github.com/rust-lang/crates.io-index" 265 | checksum = "94e2ef8dbfc347b10c094890f778ee2e36ca9bb4262e86dc99cd217e35f3470b" 266 | dependencies = [ 267 | "unicode-ident", 268 | ] 269 | 270 | [[package]] 271 | name = "quote" 272 | version = "1.0.21" 273 | source = "registry+https://github.com/rust-lang/crates.io-index" 274 | checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179" 275 | dependencies = [ 276 | "proc-macro2", 277 | ] 278 | 279 | [[package]] 280 | name = "regex" 281 | version = "1.6.0" 282 | source = "registry+https://github.com/rust-lang/crates.io-index" 283 | checksum = "4c4eb3267174b8c6c2f654116623910a0fef09c4753f8dd83db29c48a0df988b" 284 | dependencies = [ 285 | "aho-corasick", 286 | "memchr", 287 | "regex-syntax", 288 | ] 289 | 290 | [[package]] 291 | name = "regex-syntax" 292 | version = "0.6.27" 293 | source = "registry+https://github.com/rust-lang/crates.io-index" 294 | checksum = "a3f87b73ce11b1619a3c6332f45341e0047173771e8b8b73f87bfeefb7b56244" 295 | 296 | [[package]] 297 | name = "rustc-hash" 298 | version = "1.1.0" 299 | source = "registry+https://github.com/rust-lang/crates.io-index" 300 | checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" 301 | 302 | [[package]] 303 | name = "ryu" 304 | version = "1.0.11" 305 | source = "registry+https://github.com/rust-lang/crates.io-index" 306 | checksum = "4501abdff3ae82a1c1b477a17252eb69cee9e66eb915c1abaa4f44d873df9f09" 307 | 308 | [[package]] 309 | name = "serde" 310 | version = "1.0.147" 311 | source = "registry+https://github.com/rust-lang/crates.io-index" 312 | checksum = "d193d69bae983fc11a79df82342761dfbf28a99fc8d203dca4c3c1b590948965" 313 | dependencies = [ 314 | "serde_derive", 315 | ] 316 | 317 | [[package]] 318 | name = "serde_derive" 319 | version = "1.0.147" 320 | source = "registry+https://github.com/rust-lang/crates.io-index" 321 | checksum = "4f1d362ca8fc9c3e3a7484440752472d68a6caa98f1ab81d99b5dfe517cec852" 322 | dependencies = [ 323 | "proc-macro2", 324 | "quote", 325 | "syn", 326 | ] 327 | 328 | [[package]] 329 | name = "serde_json" 330 | version = "1.0.87" 331 | source = "registry+https://github.com/rust-lang/crates.io-index" 332 | checksum = "6ce777b7b150d76b9cf60d28b55f5847135a003f7d7350c6be7a773508ce7d45" 333 | dependencies = [ 334 | "itoa", 335 | "ryu", 336 | "serde", 337 | ] 338 | 339 | [[package]] 340 | name = "shlex" 341 | version = "1.1.0" 342 | source = "registry+https://github.com/rust-lang/crates.io-index" 343 | checksum = "43b2853a4d09f215c24cc5489c992ce46052d359b5109343cbafbf26bc62f8a3" 344 | 345 | [[package]] 346 | name = "sqlite-base64" 347 | version = "0.1.0" 348 | dependencies = [ 349 | "base64", 350 | "sqlite-loadable", 351 | ] 352 | 353 | [[package]] 354 | name = "sqlite-loadable" 355 | version = "0.0.5" 356 | source = "registry+https://github.com/rust-lang/crates.io-index" 357 | checksum = "a916b7bb8738eef189dea88731b619b80bf3f62b3acf05138fa43fbf8621cc94" 358 | dependencies = [ 359 | "bitflags", 360 | "serde", 361 | "serde_json", 362 | "sqlite-loadable-macros", 363 | "sqlite3ext-sys", 364 | ] 365 | 366 | [[package]] 367 | name = "sqlite-loadable-macros" 368 | version = "0.0.2" 369 | source = "registry+https://github.com/rust-lang/crates.io-index" 370 | checksum = "f98bc75a8d6fd24f6a2cfea34f28758780fa17279d3051eec926efa381971e48" 371 | dependencies = [ 372 | "proc-macro2", 373 | "quote", 374 | "syn", 375 | ] 376 | 377 | [[package]] 378 | name = "sqlite3ext-sys" 379 | version = "0.0.1" 380 | source = "registry+https://github.com/rust-lang/crates.io-index" 381 | checksum = "3afdc2b3dc08f16d6eecf8aa07d19975a268603ab1cca67d3f9b4172c507cf16" 382 | dependencies = [ 383 | "bindgen", 384 | "cc", 385 | ] 386 | 387 | [[package]] 388 | name = "strsim" 389 | version = "0.10.0" 390 | source = "registry+https://github.com/rust-lang/crates.io-index" 391 | checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" 392 | 393 | [[package]] 394 | name = "syn" 395 | version = "1.0.102" 396 | source = "registry+https://github.com/rust-lang/crates.io-index" 397 | checksum = "3fcd952facd492f9be3ef0d0b7032a6e442ee9b361d4acc2b1d0c4aaa5f613a1" 398 | dependencies = [ 399 | "proc-macro2", 400 | "quote", 401 | "unicode-ident", 402 | ] 403 | 404 | [[package]] 405 | name = "termcolor" 406 | version = "1.1.3" 407 | source = "registry+https://github.com/rust-lang/crates.io-index" 408 | checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755" 409 | dependencies = [ 410 | "winapi-util", 411 | ] 412 | 413 | [[package]] 414 | name = "textwrap" 415 | version = "0.15.1" 416 | source = "registry+https://github.com/rust-lang/crates.io-index" 417 | checksum = "949517c0cf1bf4ee812e2e07e08ab448e3ae0d23472aee8a06c985f0c8815b16" 418 | 419 | [[package]] 420 | name = "unicode-ident" 421 | version = "1.0.5" 422 | source = "registry+https://github.com/rust-lang/crates.io-index" 423 | checksum = "6ceab39d59e4c9499d4e5a8ee0e2735b891bb7308ac83dfb4e80cad195c9f6f3" 424 | 425 | [[package]] 426 | name = "which" 427 | version = "4.3.0" 428 | source = "registry+https://github.com/rust-lang/crates.io-index" 429 | checksum = "1c831fbbee9e129a8cf93e7747a82da9d95ba8e16621cae60ec2cdc849bacb7b" 430 | dependencies = [ 431 | "either", 432 | "libc", 433 | "once_cell", 434 | ] 435 | 436 | [[package]] 437 | name = "winapi" 438 | version = "0.3.9" 439 | source = "registry+https://github.com/rust-lang/crates.io-index" 440 | checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" 441 | dependencies = [ 442 | "winapi-i686-pc-windows-gnu", 443 | "winapi-x86_64-pc-windows-gnu", 444 | ] 445 | 446 | [[package]] 447 | name = "winapi-i686-pc-windows-gnu" 448 | version = "0.4.0" 449 | source = "registry+https://github.com/rust-lang/crates.io-index" 450 | checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 451 | 452 | [[package]] 453 | name = "winapi-util" 454 | version = "0.1.5" 455 | source = "registry+https://github.com/rust-lang/crates.io-index" 456 | checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" 457 | dependencies = [ 458 | "winapi", 459 | ] 460 | 461 | [[package]] 462 | name = "winapi-x86_64-pc-windows-gnu" 463 | version = "0.4.0" 464 | source = "registry+https://github.com/rust-lang/crates.io-index" 465 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 466 | --------------------------------------------------------------------------------