{"id":26323473,"url":"https://github.com/illarionov/wasm-sqlite-driver-binary","last_synced_at":"2026-03-05T09:02:06.219Z","repository":{"id":242292996,"uuid":"808545870","full_name":"illarionov/wasm-sqlite-driver-binary","owner":"illarionov","description":"SQLite WebAssembly binaries built using Gradle with Emscripten and published for Kotlin Multiplatform","archived":false,"fork":false,"pushed_at":"2026-02-28T17:50:11.000Z","size":979,"stargazers_count":2,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-28T20:09:28.594Z","etag":null,"topics":["android","emscripten","gradle","kotlin","kotlin-multiplatform","sqlite","wasm","webassembly"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/illarionov.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-05-31T09:41:51.000Z","updated_at":"2026-02-28T17:50:13.000Z","dependencies_parsed_at":"2024-06-02T01:33:23.881Z","dependency_job_id":"8a7ee08e-cb11-4edf-bf7c-ffafa82e836e","html_url":"https://github.com/illarionov/wasm-sqlite-driver-binary","commit_stats":null,"previous_names":["illarionov/wasm-sqlite-driver-binary"],"tags_count":18,"template":false,"template_full_name":null,"purl":"pkg:github/illarionov/wasm-sqlite-driver-binary","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/illarionov%2Fwasm-sqlite-driver-binary","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/illarionov%2Fwasm-sqlite-driver-binary/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/illarionov%2Fwasm-sqlite-driver-binary/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/illarionov%2Fwasm-sqlite-driver-binary/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/illarionov","download_url":"https://codeload.github.com/illarionov/wasm-sqlite-driver-binary/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/illarionov%2Fwasm-sqlite-driver-binary/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30117480,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-05T08:19:04.902Z","status":"ssl_error","status_checked_at":"2026-03-05T08:17:37.148Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","emscripten","gradle","kotlin","kotlin-multiplatform","sqlite","wasm","webassembly"],"created_at":"2025-03-15T17:18:05.242Z","updated_at":"2026-03-05T09:02:06.198Z","avatar_url":"https://github.com/illarionov.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Wasm SQLite binaries\n\nThis repository contains build scripts for compiling SQLite WebAssembly binaries using Gradle and Emscripten, \nand publishing them to a Maven-compatible repository for use in Kotlin Multiplatform projects.\n\nYou can find the latest snapshot of the Maven repository, along with archives containing the SQLite Wasm binaries,\nin the [Releases section][Releases].\n\nThe code for building SQLite has been moved to this repository after multiple unsuccessful attempts to eliminate\nfull recompilation of SQLite each time there were minor changes to the Gradle build scripts in the main project. \nThese binaries are primarily intended for use in the [Wasm-sqlite-open-helper] project.\n\n## SQLite configurations\n\nThis project provides four different SQLite builds, differing in compilation settings:\n\n| Name | SQLite | Multithreading | ICU | Android Extensions | Runtime | Binaries |\n| :- | :- | :-: | :- | :-: | :- | :-: |\n| [sqlite-android-wasm-emscripten-icu-349](#Sqlite-android-wasm-emscripten-icu-349) | 3.49.1 |  | 76.1 STATIC | ✔ | Emscripten 4.0.1 | [link](https://github.com/illarionov/wasm-sqlite-driver-binary/releases/download/0.7/sqlite-android-wasm-emscripten-icu-349-3490100-debug-0.7.zip) |\n| [sqlite-android-wasm-emscripten-icu-mt-pthread-349](#Sqlite-android-wasm-emscripten-icu-mt-pthread-349) | 3.49.1 | ✔ | 76.1 STATIC | ✔ | Emscripten 4.0.1 | [link](https://github.com/illarionov/wasm-sqlite-driver-binary/releases/download/0.7/sqlite-android-wasm-emscripten-icu-mt-pthread-349-3490100-debug-0.7.zip) |\n| [sqlite-wasm-emscripten-349](#Sqlite-wasm-emscripten-349) | 3.49.1 |  |  |  | Emscripten 4.0.1 | [link](https://github.com/illarionov/wasm-sqlite-driver-binary/releases/download/0.7/sqlite-wasm-emscripten-349-3490100-debug-0.7.zip) |\n| [sqlite-wasm-emscripten-mt-pthread-349](#Sqlite-wasm-emscripten-mt-pthread-349) | 3.49.1 | ✔ |  |  | Emscripten 4.0.1 | [link](https://github.com/illarionov/wasm-sqlite-driver-binary/releases/download/0.7/sqlite-wasm-emscripten-mt-pthread-349-3490100-debug-0.7.zip) |\n\nAlso there are 2 variants of AOT-precompiled modules to .class using [wasm2class-gradle-plugin](https://github.com/illarionov/wasm2class-gradle-plugin)\nfor JVM projects with Chicory:\n\n* sqlite-wasm-emscripten-aot-349\n* sqlite-android-wasm-emscripten-icu-aot-349\n\n### Sqlite-android-wasm-emscripten-icu-349\n\n* Gradle dependency: `implementation(\"at.released.wasm-sqlite-driver:sqlite-android-wasm-emscripten-icu-349:0.7\")`\n* Debug binaries: [sqlite-android-wasm-emscripten-icu-349-3490100-debug-0.7.zip](https://github.com/illarionov/wasm-sqlite-driver-binary/releases/download/0.7/sqlite-android-wasm-emscripten-icu-349-3490100-debug-0.7.zip)\n\nSingle-threaded SQLite build with a configuration similar to that used in the Android system.\n\n* Based on the AOSP SQLite configuration\n* Includes Android-specific patches\n* Supports Android-specific localized collators\n* ICU is statically compiled\n* No multithreading support\n\nThe ICU library is statically compiled, resulting in a SQLite binary size of about 30 megabytes.\nThis binary is loaded into RAM during execution, so the RAM requirements are quite high.\n\nCompilation settings:\n```\nEmscripten flags:\n-sALLOW_MEMORY_GROWTH\n-sALLOW_TABLE_GROWTH\n-sDYNAMIC_EXECUTION=0\n-sENVIRONMENT=worker\n-sERROR_ON_UNDEFINED_SYMBOLS=0\n-sEXPORTED_RUNTIME_METHODS=wasmMemory\n-sEXPORT_ES6\n-sEXPORT_NAME=sqlite3InitModule\n-sGLOBAL_BASE=4096\n-sIMPORTED_MEMORY,\n-sINITIAL_MEMORY=50331648\n-sLLD_REPORT_UNDEFINED\n-sMODULARIZE\n-sNO_POLYFILL\n-sSTACK_SIZE=512KB\n-sSTANDALONE_WASM=0\n-sSTRICT_JS=0\n-sUSE_CLOSURE_COMPILER=0\n-sUSE_ES6_IMPORT_META\n-sWASM_BIGINT\n\nSQLite flags:\n-DBIONIC_IOCTL_NO_SIGNEDNESS_OVERLOAD\n-DHAVE_MALLOC_H=1\n-DHAVE_MALLOC_USABLE_SIZE\n-DHAVE_USLEEP=1\n-DNDEBUG=1\n-DSQLITE_ALLOW_ROWID_IN_VIEW\n-DSQLITE_DEFAULT_AUTOVACUUM=1\n-DSQLITE_DEFAULT_FILE_FORMAT=4\n-DSQLITE_DEFAULT_FILE_PERMISSIONS=0600\n-DSQLITE_DEFAULT_JOURNAL_SIZE_LIMIT=1048576\n-DSQLITE_DEFAULT_LEGACY_ALTER_TABLE\n-DSQLITE_DEFAULT_MEMSTATUS=0\n-DSQLITE_DEFAULT_UNIX_VFS=\\\"unix-excl\\\"\n-DSQLITE_ENABLE_BATCH_ATOMIC_WRITE\n-DSQLITE_ENABLE_BYTECODE_VTAB\n-DSQLITE_ENABLE_DBPAGE_VTAB\n-DSQLITE_ENABLE_DBSTAT_VTAB\n-DSQLITE_ENABLE_FTS3\n-DSQLITE_ENABLE_FTS3_BACKWARDS\n-DSQLITE_ENABLE_FTS3_PARENTHESIS\n-DSQLITE_ENABLE_FTS4\n-DSQLITE_ENABLE_FTS5\n-DSQLITE_ENABLE_ICU\n-DSQLITE_ENABLE_JSON1\n-DSQLITE_ENABLE_MEMORY_MANAGEMENT=1\n-DSQLITE_ENABLE_RBU\n-DSQLITE_ENABLE_RTREE\n-DSQLITE_ENABLE_STAT4\n-DSQLITE_ENABLE_STMTVTAB\n-DSQLITE_HAVE_ISNAN\n-DSQLITE_MAX_MMAP_SIZE=0\n-DSQLITE_MAX_WORKER_THREADS=0\n-DSQLITE_OMIT_BUILTIN_TEST\n-DSQLITE_OMIT_COMPILEOPTION_DIAGS\n-DSQLITE_OMIT_DEPRECATED\n-DSQLITE_OMIT_LOAD_EXTENSION\n-DSQLITE_OMIT_SHARED_CACHE\n-DSQLITE_POWERSAFE_OVERWRITE=1\n-DSQLITE_SECURE_DELETE\n-DSQLITE_TEMP_STORE=3\n-DSQLITE_THREADSAFE=0\n-DSQLITE_WASM_ENABLE_C_TESTS\n-Dfdatasync=fdatasync\n-Wno-unused-parameter\n-ftrivial-auto-var-init=pattern\n\nCode generation flags:\n-g3 -fPIC --minify 0 --no-entry -O2 -flto -Wno-limited-postlink-optimizations -fdebug-compilation-dir=/build \n\nAdditional source files:\nsqlite3-wasm.c callbacks-wasm.c sqlite3_android.cpp PhoneNumberUtils.cpp OldPhoneNumberUtils.cpp\n\nAdditional libraries: ICU76.1\n\nICU build flags:\n--with-data-packaging=static -lm -O3 DU_HAVE_MMAP=0 -DUCONFIG_NO_FILE_IO -DUCONFIG_NO_FORMATTING -DUCONFIG_NO_LEGACY_CONVERSION -DUCONFIG_NO_TRANSLITERATION\n```\n\n### Sqlite-android-wasm-emscripten-icu-mt-pthread-349\n\n* Gradle dependency: `implementation(\"at.released.wasm-sqlite-driver:sqlite-android-wasm-emscripten-icu-mt-pthread-349:0.7\")`\n* Binaries with debug symbols: [sqlite-android-wasm-emscripten-icu-mt-pthread-349-3490100-debug-0.7.zip](https://github.com/illarionov/wasm-sqlite-driver-binary/releases/download/0.7/sqlite-android-wasm-emscripten-icu-mt-pthread-349-3490100-debug-0.7.zip)\n\nThe same configuration as [sqlite-android-wasm-emscripten-icu-349](#sqlite-android-wasm-emscripten-icu-349), but with multithreading enabled.\n\nBuild flag differences:\n```\nEmscripten flags:\n\nAdditional code generation flags: -pthread\nAdditional Emscripten flags: -sSHARED_MEMORY\nAdditional SQLite flags: -DSQLITE_THREADSAFE=2\n```\n\n### Sqlite-wasm-emscripten-349\n\n* Gradle dependency: `implementation(\"at.released.wasm-sqlite-driver:sqlite-wasm-emscripten-349:0.7\")`\n* Binaries with debug symbols: [sqlite-wasm-emscripten-349-3490100-debug-0.7.zip](https://github.com/illarionov/wasm-sqlite-driver-binary/releases/download/0.7/sqlite-wasm-emscripten-349-3490100-debug-0.7.zip)\n\nSingle-threaded SQLite configuration without ICU and Android extensions.\n\nCompilation settings:\n```\nEmscripten flags:\n-sALLOW_MEMORY_GROWTH\n-sALLOW_TABLE_GROWTH\n-sDYNAMIC_EXECUTION=0\n-sENVIRONMENT=worker\n-sERROR_ON_UNDEFINED_SYMBOLS=0\n-sEXPORTED_RUNTIME_METHODS=wasmMemory\n-sEXPORT_ES6\n-sEXPORT_NAME=sqlite3InitModule\n-sGLOBAL_BASE=4096\n-sIMPORTED_MEMORY\n-sINITIAL_MEMORY=4194304\n-sLLD_REPORT_UNDEFINED\n-sMODULARIZE\n-sNO_POLYFILL\n-sSTACK_SIZE=512KB\n-sSTANDALONE_WASM=0\n-sSTRICT_JS=0\n-sUSE_CLOSURE_COMPILER=0\n-sUSE_ES6_IMPORT_META\n-sWASM_BIGINT\n\nSQLite flags:\n-DBIONIC_IOCTL_NO_SIGNEDNESS_OVERLOAD\n-DHAVE_MALLOC_H=1\n-DHAVE_MALLOC_USABLE_SIZE\n-DHAVE_USLEEP=1\n-DNDEBUG=1\n-DSQLITE_ALLOW_ROWID_IN_VIEW\n-DSQLITE_DEFAULT_AUTOVACUUM=1\n-DSQLITE_DEFAULT_FILE_FORMAT=4\n-DSQLITE_DEFAULT_FILE_PERMISSIONS=0600\n-DSQLITE_DEFAULT_JOURNAL_SIZE_LIMIT=1048576\n-DSQLITE_DEFAULT_LEGACY_ALTER_TABLE\n-DSQLITE_DEFAULT_MEMSTATUS=0\n-DSQLITE_DEFAULT_UNIX_VFS=\\\"unix-excl\\\"\n-DSQLITE_ENABLE_BATCH_ATOMIC_WRITE\n-DSQLITE_ENABLE_BYTECODE_VTAB\n-DSQLITE_ENABLE_DBPAGE_VTAB\n-DSQLITE_ENABLE_DBSTAT_VTAB\n-DSQLITE_ENABLE_FTS3\n-DSQLITE_ENABLE_FTS3_BACKWARDS\n-DSQLITE_ENABLE_FTS3_PARENTHESIS\n-DSQLITE_ENABLE_FTS4\n-DSQLITE_ENABLE_FTS5\n-DSQLITE_ENABLE_JSON1\n-DSQLITE_ENABLE_MEMORY_MANAGEMENT=1\n-DSQLITE_ENABLE_RBU\n-DSQLITE_ENABLE_RTREE\n-DSQLITE_ENABLE_STAT4\n-DSQLITE_ENABLE_STMTVTAB\n-DSQLITE_HAVE_ISNAN\n-DSQLITE_MAX_MMAP_SIZE=0\n-DSQLITE_MAX_WORKER_THREADS=0\n-DSQLITE_OMIT_BUILTIN_TEST\n-DSQLITE_OMIT_COMPILEOPTION_DIAGS\n-DSQLITE_OMIT_DEPRECATED\n-DSQLITE_OMIT_LOAD_EXTENSION\n-DSQLITE_OMIT_SHARED_CACHE\n-DSQLITE_OMIT_UTF16\n-DSQLITE_POWERSAFE_OVERWRITE=1\n-DSQLITE_SECURE_DELETE\n-DSQLITE_TEMP_STORE=3\n-DSQLITE_THREADSAFE=0\n-DSQLITE_WASM_ENABLE_C_TESTS\n-Dfdatasync=fdatasync\n-Wno-unused-parameter\n-ftrivial-auto-var-init=pattern\n\nCode generation flags:\n-g3 -fPIC --minify 0 --no-entry -O2 -flto -Wno-limited-postlink-optimizations -fdebug-compilation-dir=/build \n\nAdditional source files:\nsqlite3-wasm.c callbacks-wasm.c\n```\n\n### Sqlite-wasm-emscripten-mt-pthread-349\n\n* Gradle dependency: `implementation(\"at.released.wasm-sqlite-driver:sqlite-wasm-emscripten-mt-pthread-349:0.7\")`\n* Binaries with debug symbols: [sqlite-wasm-emscripten-mt-pthread-349-3490100-debug-0.9.zip](https://github.com/illarionov/wasm-sqlite-driver-binary/releases/download/0.9/sqlite-wasm-emscripten-mt-pthread-349-3490100-debug-0.7.zip)\n\nThe same configuration as [sqlite-wasm-emscripten-349](#sqlite-wasm-emscripten-349), but with multithreading enabled.\n\nBuild flag differences:\n```\nEmscripten flags:\n\nAdditional code generation flags: -pthread\nAdditional Emscripten flags: -sSHARED_MEMORY\nAdditional SQLite flags: -DSQLITE_THREADSAFE=2\n```\n\n## Publication format\n\nSQLite WebAssembly binary files are published to a Maven-compatible repository with Gradle Module Metadata for use\nin Kotlin Multiplatform projects.\n\nFor Android target, `.wasm` files are packed as Android assets within AAR archives, so no additional Gradle plugins\nare needed for their use.\n\nFor JVM target, `.wasm` files are packed as Java Resources, which can be handled with standard tools.\n\nFor native Kotlin Multiplatform targets (`iosArm64`, `iosSimulatorArm64`, `linuxX64`, `macosX64`, etc.), `.wasm`\nbinaries are packaged and published in a format compatible with Kotlin Multiplatform Resources (though this format\nis not yet publicly announced).\nTo use it in your project, you can try the [Compose Multiplatform Resources] plugin, or check the [resources.gradle.kts] of the main project.\n\nTo simplify loading binaries across different platforms, a helper library \"cassettes-playhead\" is available.\n\nGradle dependency:\n```\nimplementation(\"at.released.cassettes:cassettes-playhead:0.1-alpha01\")\n```\n\nSample usage:\n```kotlin\nimport at.released.wasm.sqlite.binary.base.WasmSqliteConfiguration\nimport at.released.wasm.sqlite.binary.reader.WasmSourceReader\nimport at.released.wasm.sqlite.binary.reader.readOrThrow\n\n// Implementation of the Reader. Use AndroidAssetsWasmSourceReader(appContext.assets) on Android\nval reader = WasmSourceReader \n\n// Build configuration from `sqlite-wasm-emscripten-349` module\nval sqlite = SqliteWasmEmscripten349\n\nval wasmBinary: ByteArray = reader.readBytesOrThrow(sqlite.sqliteUrl)\n```\n\n[Compose Multiplatform Resources]: https://www.jetbrains.com/help/kotlin-multiplatform-dev/compose-images-resources.html\n[resources.gradle.kts]: https://github.com/illarionov/wasm-sqlite-open-helper/blob/main/build-logic/project/multiplatform/src/main/kotlin/resources.gradle.kts\n\n## Installation\n\nRelease and snapshot versions are published to a temporary repository, since it is highly experimental.\nFile a bug report if you think it could be useful on Maven Central.\n\nAdd the following to your project's settings.gradle:\n\n```kotlin\npluginManagement {\n    repositories {\n        maven {\n            url = uri(\"https://maven.pixnews.ru\")\n            mavenContent {\n                includeGroup(\"at.released.wasm-sqlite-driver\")\n            }\n        }\n    }\n}\n```\n\nYou can also download a snapshot of the repository from the [Releases section][Releases].\n\nAdd the required dependencies:\n\n```kotlin\ndependencies {\n    implementation(\"at.released.cassettes:cassettes-playhead:0.1-alpha01\")\n    implementation(\"at.released.wasm-sqlite-driver:sqlite-android-wasm-emscripten-icu-mt-pthread-349:0.7\")\n}\n```\n\n## Development notes\n\nTo build the project, you will need to install the following software in addition to the JVM:\n\n - GNU Make \n   - on macOS: `brew install make`\n - [WABT](https://github.com/WebAssembly/wabt) (The WebAssembly Binary Toolkit)\n   - on macOS: `brew install wabt`\n   - on Ubuntu Linux: `apt install wabt`\n - llvm-dwarfdump\n   - on macOS: `brew install llvm`\n - [Emscripten SDK](https://emscripten.org/)\n   - Check [this link](https://emscripten.org/docs/getting_started/downloads.html#installation-instructions-using-the-emsdk-recommended)\n   for instructions on installing the Emscripten SDK.\n\n`EMSDK` environment variable must point to the root of the installed SDK.\nVersion of the SDK used in the project must be activated (check the `emscripten` version\nin [gradle/libs.versions.toml](gradle/libs.versions.toml)).\n\nAlternatively, you can specify the Emscripten SDK root by setting the `emsdkRoot` project property.\nYou can do this for example in `~/.gradle/gradle.properties`:\n\n```properties\nemsdkRoot=/opt/emsdk\n```\n\nInstall and activate the SDK version used in the project (not the latest one):\n\n```shell\n./emsdk install 4.0.4\n./emsdk activate 4.0.4\nsource ./emsdk_env.sh\n```\n\nThe first build may take quite a long time, since the ICU and SQLite libraries are build from source code.\n\n## Contributing\n\nAny type of contributions are welcome. Please see the [contribution guide](CONTRIBUTING.md).\n\n## License\n\nThese services are licensed under Apache 2.0 License. Authors and contributors are listed in the\n[Authors](AUTHORS) file.\n\n```\nCopyright 2024-2025 wasm-sqlite-open-helper project authors and contributors.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n   http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n\n[Wasm-sqlite-open-helper]: https://github.com/illarionov/wasm-sqlite-open-helper\n[Releases]: https://github.com/illarionov/wasm-sqlite-driver-binary/releases\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fillarionov%2Fwasm-sqlite-driver-binary","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fillarionov%2Fwasm-sqlite-driver-binary","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fillarionov%2Fwasm-sqlite-driver-binary/lists"}