From 58980a56026c0a5d28ddfbe42f0790bb6ee6a028 Mon Sep 17 00:00:00 2001 From: eltrac Date: Fri, 16 Oct 2026 18:24:02 +0800 Subject: doc: add ADR-0001, regarding sqlite native libraries exclusions from now on, every major architecture decision should be documented. ADRs (architecture decision records) are stored in `/doc/adr/...` --- doc/adr/0001-sqlite-jdbc-exclusions.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 doc/adr/0001-sqlite-jdbc-exclusions.md diff --git a/doc/adr/0001-sqlite-jdbc-exclusions.md b/doc/adr/0001-sqlite-jdbc-exclusions.md new file mode 100644 index 0000000..7170892 --- /dev/null +++ b/doc/adr/0001-sqlite-jdbc-exclusions.md @@ -0,0 +1,25 @@ +# ADR: Exclude some native SQLite libraries in `sqlite-jdbc` + +Date: 2026-10-16 + +## Context + +Weepinbell needs to support SQLite and the only way to do it is to use JDBC (Java DataBase Connectivity). The [SQLite JDBC Driver](https://github.com/xerial/sqlite-jdbc) is quite large (> 12MB), because it includes `.so` native libraries **for every platforms and architectures it supports in a single `.jar`**. + +Bundling `sqlite-jdbc` inside weepinbell's uberjar makes it almost twice as big. + +## Decision + +Reasonbaly, web services like weepinbell does not run on macOS, Windows and Android. Therefore, I excluded these native libraries in uberjar. + +```clojure + :profiles {:uberjar {:aot :all + :uberjar-exclusions [#"^org/sqlite/native/mac/" + #"^org/sqlite/native/windows/" + #"^org/sqlite/native/linux-android/"]} +``` + +In theory, users can bring their own SQLite library to support these platforms. + +The SQLite storage feature officially only supports Linux and FreeBSD. + -- cgit v1.2.3