# Set up sqlite3.c and sqlite3.h...
#
# To build with SEE (https://sqlite.org/see), either put sqlite3-see.c
-# in $(dir.top) or pass sqlite3.c=PATH_TO_sqlite3-see.c to the $(MAKE)
-# invocation. Note that only encryption modules with no 3rd-party
+# in $(dir.top) or pass sqlite3.c=/path/to/sqlite3-see.c to the
+# $(MAKE) invocation. Only encryption modules with no 3rd-party
# dependencies will currently work here: AES256-OFB, AES128-OFB, and
# AES128-CCM. Not coincidentally, those 3 modules are included in the
-# sqlite3-see.c bundle. Note, however, that distributing an SEE build
-# of the WASM on a public site is in violation of the SEE license
-# because it effectively provides a usable copy of the SEE build to
-# all visitors.
+# sqlite3-see.c bundle. However, distributing an SEE build of the WASM
+# on a public site is in violation of the SEE license because it
+# effectively provides a usable copy of the SEE build to all visitors.
+# Its use is permitted within the intranet of an SEE licensee, but use
+# on networks accessible to non-licensees is in violation.
#
# A custom sqlite3.c must not have any spaces in its name.
-# $(sqlite3.canonical.c) must point to the sqlite3.c in
-# the sqlite3 canonical source tree, as that source file
-# is required for certain utility and test code.
+# $(sqlite3.canonical.c) must point to the sqlite3.c in the sqlite3
+# canonical source tree, as that source file is required for certain
+# utility and test code.
#
sqlite3.canonical.c = $(dir.top)/sqlite3.c
sqlite3.c ?= $(firstword $(wildcard $(dir.top)/sqlite3-see.c) $(sqlite3.canonical.c))
#
# Changing this may require a clean rebuild. It also might not work.
#
+# A value of 1 is required for the base64.wasm=1 build, as this custom
+# instantiator is where we embed the base64-encoded WASM files.
+#
+# 2026-07: it's been deployed almost a year now and the only issues
+# with it were in npm-/node-specific builds, where we now
+# automatically disable it.
WASM_CUSTOM_INSTANTIATE = 1
+ifeq (0,$(WASM_CUSTOM_INSTANTIATE))
+ifeq (1,$(base64.wasm))
+ $(error base64.wasm=1 is incompatible with WASM_CUSTOM_INSTANTIATE=0)
+endif
+endif
+
#
# $(bin.c-pp): a minimal text file preprocessor. Like C's but much
# less so.
#
# c-pp-lite.c was written specifically for the sqlite project's
# JavaScript builds but is maintained as a standalone project:
-# https://fossil.wanderinghorse.net/r/c-pp
+# https://fossil.wanderinghorse.net/r/c-pp. It has since been vastly
+# extended, largely reimplemented, and has dropped the "lite" suffix.
#
# The SQLITE_... build flags used here have NO EFFECT on the JS/WASM
# build. They are solely for use with $(bin.c-pp) itself.
#
# -D... flags which should be included in all invocations should be
-# appended to $(D.common)
+# appended to $(D.common).
#
bin.c-pp = ./c-pp
$(bin.c-pp): libcmpp.c $(sqlite3.c) $(MAKEFILE)
DISTCLEAN_FILES += $(bin.c-pp)
ifeq (0,$(MAKING_CLEAN))
- # omit-api="feature names..." disables various featuresw by name.
+ # omit-api="feature names..." disables various features by name.
# Recognized names are:
#
# kvvfs oo1 opfs opfs-sahpool opfs-wl vtab worker1
Xomit-api := $(subst ALL,kvvfs oo1 OPFS worker1,$(omit-api))
Xomit-api := $(subst OPFS,opfs opfs-sahpool opfs-wl,$(Xomit-api))
Xomit-api := $(sort $(Xomit-api))
- $(foreach X,$(Xomit-api),$(eval D.omit += -Domit-$(X)))
+ #$(foreach X,$(Xomit-api),$(eval D.omit += -Domit-$(X)))
+ D.omit = $(patsubst %,-Domit-%,$(Xomit-api))
endif
ifneq (,$(D.omit))
D.common += $(D.omit)
cflags.common = -I. -I$(dir $(sqlite3.c)) -std=c99 -fPIC
# emcc.WASM_BIGINT = 1 for BigInt (C int64) support, else 0. The API
# disables certain features if BigInt is not enabled and such builds
-# _are not tested_ on any regular basis.
+# _are not tested_ on any regular basis. Update 2026-07: Browsers old
+# enough to not have BigInt probably won't otherwise run the WASM
+# build (and we've never had direct access to such a browser to test
+# on). i.e. non-BigInt builds are effectively unnecessary and can be
+# safely removed at some point.
emcc.WASM_BIGINT ?= 1
emcc.MEMORY64 ?= 0
#
-C Random\sminor\sdoc\sand\sformatting\scleanups\sin\sthe\swasm\smakefile\sgenerator.
-D 2026-07-21T20:18:16.981
+C Random\smakefile\sdoc\supdates.\sNo\sfunctional\schanges.
+D 2026-07-21T20:56:55.567
F .fossil-settings/binary-glob 61195414528fb3ea9693577e1980230d78a1f8b0a54c78cf1b9b24d0a409ed6a x
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F ext/session/sqlite3session.c 673a2c71a3e1fc909301ed15daa30485d774419d015eb7688c79396e6cba6378
F ext/session/sqlite3session.h ca7c4422c1514a95056cc8d333217df6b1829d39058126b1de85d10cd62d7a9c
F ext/session/test_session.c f465f13c661919f8ba4485a9d0690c4df5bff1cc79e962cfdafa9ff376d5119f
-F ext/wasm/GNUmakefile 92936a75dc15057dae3a87d96fe8282b22e663edb139852551da9179b437f1b3
+F ext/wasm/GNUmakefile cc28e65dec12f1b992957152d8395484f4fcf7f94e6b6736a09ee4f48e7ec048
F ext/wasm/README-dist.txt f01081a850ce38a56706af6b481e3a7878e24e42b314cfcd4b129f0f8427066a
F ext/wasm/README.md 2e87804e12c98f1d194b7a06162a88441d33bb443efcfe00dc6565a780d2f259
F ext/wasm/SQLTester/GNUmakefile e0794f676d55819951bbfae45cc5e8d7818dc460492dc317ce7f0d2eca15caff
F tool/warnings.sh a554d13f6e5cf3760f041b87939e3d616ec6961859c3245e8ef701d1eafc2ca2
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
F tool/winmain.c 00c8fb88e365c9017db14c73d3c78af62194d9644feaf60e220ab0f411f3604c
-P 0ca4e748e1682046f2e060876bcf7e8d249aa5611d939d32dc1365d3bcf12b48
-R 75875ffe22b4164244371e2436934478
+P a24064919bcc187d5a4d9fa67cb1810fc4e7b9c92596fd2c8e6b0a66bc37e4b3
+R 6c02df29c06cbc9bfa3b4ee8f52145d6
U stephan
-Z 465d77400562fefe0f751887e6dd19fe
+Z 6dbaa3c79fb84d3f8bfc19f8334094ab
# Remove this line to create a well-formed Fossil manifest.