]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Emit sqlite3-api.(m)js during the JS build process, which are the JS APIs without...
authorstephan <stephan@noemail.net>
Wed, 18 Jan 2023 17:39:04 +0000 (17:39 +0000)
committerstephan <stephan@noemail.net>
Wed, 18 Jan 2023 17:39:04 +0000 (17:39 +0000)
FossilOrigin-Name: 966b55c513a14c6ab3ec128cfe6d157ecd9bec32e3fce2f559f130249cec50ab

ext/wasm/GNUmakefile
ext/wasm/README-dist.txt
manifest
manifest.uuid

index 92e552c76677934a74fede74b4e22880adae620d..f391868d487e591471ba2c846cffef82a4dfb29b 100644 (file)
@@ -333,6 +333,32 @@ $(sqlite3-api.js.in): $(sqlite3-api.jses) $(MAKEFILE)
                echo "/* END FILE: $$i */"; \
        done > $@
 
+########################################################################
+# $(sqlite3-api.js) and $(sqlite3-api.mjs) (ES6 module) contain the
+# core library code but not the Emscripten-related glue which deals
+# with loading sqlite3.wasm. In theory they can be used by arbitrary
+# build environments and WASM loaders, but in practice that breaks
+# down because the WASM loader has to be able to provide all of the
+# necessary "imports" to sqlite3.wasm, and that list of imports is
+# unknown until sqlite3.wasm is compiled, at which point Emscripten
+# sets up the imports appropriately. Abstractly speaking, it's
+# impossible for other build environments to know exactly which
+# imports are needed and provide them. Tools like wasm-objdump can be
+# used to find the list of imports but it's questionable whether a
+# non-Emscripten tool could realistically use that info to provide
+# proper implementations. Sidebar: some of the imports are used soley
+# by the Emscripten glue, which the sqlite3 JS code does not rely on.
+#
+# We build $(sqlite3-api.js) and $(sqlite3-api.mjs) "because we can"
+# and because it might be a useful point of experimentation for some
+# clients, but the above-described caveat may well make them unusable
+# for real-life clients.
+sqlite3-api.js := $(dir.dout)/sqlite3-api.js
+sqlite3-api.mjs := $(dir.dout)/sqlite3-api.mjs
+$(eval $(call C-PP.FILTER, $(sqlite3-api.js.in), $(sqlite3-api.js)))
+$(eval $(call C-PP.FILTER, $(sqlite3-api.js.in), $(sqlite3-api.mjs), $(c-pp.D.esm)))
+all: $(sqlite3-api.js) $(sqlite3-api.mjs)
+
 $(sqlite3-api-build-version.js): $(bin.version-info) $(MAKEFILE)
        @echo "Making $@..."
        @{ \
index ca6bef93e87e8b382762928113cd949191bb77a2..909a5ebbe0102e2bc0822f89ed9dc0fcb01e3854 100644 (file)
@@ -4,13 +4,14 @@ Main project page: https://sqlite.org
 
 Documentation: https://sqlite.org/wasm
 
-This archive contains the sqlite3.js and sqlite3.wasm file which make
-up the sqlite3 WASM/JS build.
+This archive contains the sqlite3.js, sqlite3.mjs, and sqlite3.wasm
+files which make up the sqlite3 WASM/JS build.
 
 The jswasm directory contains the core sqlite3 deliverables and the
-top-level directory contains demonstration and test apps. Browsers
-will not serve WASM files from file:// URLs, so the demo/test apps
-require a web server and that server must include the following
+top-level directory contains demonstration and test applications.
+
+Browsers will not serve WASM files from file:// URLs, so the demo/test
+apps require a web server and that server must include the following
 headers in its response when serving the files:
 
     Cross-Origin-Opener-Policy: same-origin
@@ -20,4 +21,3 @@ One simple way to get the demo apps up and running on Unix-style
 systems is to install althttpd (https://sqlite.org/althttpd) and run:
 
     althttpd --enable-sab --page index.html
-
index 6bb4eebb52f8d9de672d472a34d7f5ec97351e91..ac17d1cd1b4eb92aa48b02e5f322644e45cc3dbe 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Fix\sanother\sissue\swith\svery\slarge\scompressed\sLSM\sdatabases.
-D 2023-01-17T19:34:01.586
+C Emit\ssqlite3-api.(m)js\sduring\sthe\sJS\sbuild\sprocess,\swhich\sare\sthe\sJS\sAPIs\swithout\sthe\sEmscripten/wasm-loading\sparts.\sThey\sare\shypothetically\suseful\sfor\sarbitrary\sbuild\senvironments/toolchains\sbut\shave\snotable\scaveats\srelated\sto\sthe\swasm\simports,\sas\selaborated\son\sin\sthe\smakefile.
+D 2023-01-18T17:39:04.990
 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
 F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
@@ -466,8 +466,8 @@ F ext/userauth/sqlite3userauth.h 7f3ea8c4686db8e40b0a0e7a8e0b00fac13aa7a3
 F ext/userauth/user-auth.txt e6641021a9210364665fe625d067617d03f27b04
 F ext/userauth/userauth.c 7f00cded7dcaa5d47f54539b290a43d2e59f4b1eb5f447545fa865f002fc80cb
 F ext/wasm/EXPORTED_FUNCTIONS.fiddle.in 27450c8b8c70875a260aca55435ec927068b34cef801a96205adb81bdcefc65c
-F ext/wasm/GNUmakefile ffe0e9818a3b6b36c85a1d10dab76b220a8f5cd83439c62e50223a7970b3d68a
-F ext/wasm/README-dist.txt 2d670b426fc7c613b90a7d2f2b05b433088fe65181abead970980f0a4a75ea20
+F ext/wasm/GNUmakefile 4ce83fdda22c6fde2bd311e87d6bec7469ca3859e758d1f34cd601e64c539efa
+F ext/wasm/README-dist.txt dab111337028af58ec11cb35c2e1a82398217c399c7499fefab0509a0499a5d7
 F ext/wasm/README.md ef39861aa21632fdbca0bdd469f78f0096f6449a720f3f39642594af503030e9
 F ext/wasm/api/EXPORTED_FUNCTIONS.sqlite3-api d6a5078f48a5301ed17b9a30331075d9b2506e1360c1f0dee0c7816c10acd9ab
 F ext/wasm/api/EXPORTED_RUNTIME_METHODS.sqlite3-api 1ec3c73e7d66e95529c3c64ac3de2470b0e9e7fbf7a5b41261c367cf4f1b7287
@@ -2043,8 +2043,8 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
 F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
 F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
-P 517b2c4c4ee9afc50e5457a6877e5af34358a6267d8dad669d25410c124866ac
-R 8f8f74b60987ef0c37f51221fc78f86c
-U dan
-Z b44db4fb84a9476892cd583f8ab587a9
+P d71154265a294a1ece89d257f55f6855db7c30aec55ea0dc4eeb61bce1e8fad3
+R 9999b5fb19f6515ae070f0d44ac959cb
+U stephan
+Z c0250e6423aa26692c2978bfc28218c3
 # Remove this line to create a well-formed Fossil manifest.
index 47f3243df6f02110750a8592efd4d63f570e75b0..a265221f3687b981fe9861c3ae895fab15fb1afe 100644 (file)
@@ -1 +1 @@
-d71154265a294a1ece89d257f55f6855db7c30aec55ea0dc4eeb61bce1e8fad3
\ No newline at end of file
+966b55c513a14c6ab3ec128cfe6d157ecd9bec32e3fce2f559f130249cec50ab
\ No newline at end of file