summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authoreltrac <hi@eltr.ac>2026-10-16 18:24:02 +0800
committereltrac <hi@eltr.ac>2026-10-16 18:24:02 +0800
commit58980a56026c0a5d28ddfbe42f0790bb6ee6a028 (patch)
tree98b4b7dff5ae4e9bf184235345f20baadcaa7a96 /doc
parent22f74a2cd18ceb232172e718b5c28a12ee99cdef (diff)
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/...`
Diffstat (limited to 'doc')
-rw-r--r--doc/adr/0001-sqlite-jdbc-exclusions.md25
1 files changed, 25 insertions, 0 deletions
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.
+