]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Update ext/wasm/README.md to reflect simplifications permitted by the current configu...
authorstephan <stephan@noemail.net>
Fri, 24 Jan 2025 09:18:19 +0000 (09:18 +0000)
committerstephan <stephan@noemail.net>
Fri, 24 Jan 2025 09:18:19 +0000 (09:18 +0000)
FossilOrigin-Name: 9abb56c6acb1c84c2df8534ca3ebb2894afd68bc7b8331d4d12611896c576749

ext/wasm/README.md
manifest
manifest.uuid

index 0c328310d9514f0ec9cd15b65f233d39e737fc6a..3c68755690c4000dad73c9906249455ee40d9cb9 100644 (file)
@@ -29,8 +29,16 @@ $ ./emsdk install latest
 $ ./emsdk activate latest
 ```
 
-The following needs to be run for each shell instance which needs the
-`emcc` compiler:
+(Sidebar: Emscripten updates can and do _change things_, i.e. _break
+things_, so it's considered _required practice_ to test thoroughly
+after upgrading it! Our build process makes no guarantees about which
+Emscripten version(s) will or won't work, but it's important that
+production builds are built using a compatible version. During active
+development, the EMSDK is frequently updated, the goal being to keep
+sqlite3.wasm working with "the latest" EMSDK)
+
+The SQLite configure script will search for the EMSDK. One way
+to ensure that it finds it is:
 
 ```
 # Activate PATH and other environment variables in the current terminal:
@@ -38,15 +46,27 @@ $ source ./emsdk_env.sh
 
 $ which emcc
 /path/to/emsdk/upstream/emscripten/emcc
+
+$ ./configure ...
+```
+
+Optionally, add that `source` part to your login shell's resource file
+(`~/.bashrc` or equivalent).
+
+Another way is to pass the EMSDK dir to configure:
+
+```
+$ ./configure --with-emsdk=/path/to/emsdk
 ```
 
-Optionally, add that to your login shell's resource file (`~/.bashrc`
-or equivalent).
+The build tree uses a small wrapper for invoking the `emcc` (the
+Emscripten compiler): `tool/emcc.sh` is generated from
+`tool/emcc.sh.in` using the EMSDK path found by the configure process.
 
-That `env` script needs to be sourced for building this application
-from the top of the sqlite3 build tree:
+With that in place, the most common build approaches are:
 
 ```
+# From the top of the tree:
 $ make fiddle
 ```
 
@@ -57,7 +77,7 @@ $ cd ext/wasm
 $ make
 ```
 
-That will generate the a number of files required for a handful of
+Those will generate the a number of files required for a handful of
 test and demo applications which can be accessed via
 `index.html`. WASM content cannot, due to XMLHttpRequest security
 limitations, be loaded if the containing HTML file is opened directly
@@ -68,8 +88,11 @@ needs to be served via an HTTP server.  For example, using
 ```
 $ cd ext/wasm
 $ althttpd --enable-sab --max-age 1 --page index.html
+# Or, more simply:
+$ make httpd
 ```
 
+
 That will open the system's browser and run the index page, from which
 all of the test and demo applications can be accessed.
 
index 90e606e2e407b9f0259a4b7bdfe8330a86f74b94..3ebae6c9f942b32c5cfd0ba6baf1ceb93c12b542 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Remove\sextraneous\sare-we-making-clean\sguards\sfrom\sthe\sgenerated\swasm\sbuild\srules,\sas\sthat\sguard\sis\sset\sat\sa\shigher\slevel.\sRename\sa\smakefile\scall()able\sfor\sconsistency.
-D 2025-01-24T08:58:54.139
+C Update\sext/wasm/README.md\sto\sreflect\ssimplifications\spermitted\sby\sthe\scurrent\sconfigure\sscript\sbehavior.
+D 2025-01-24T09:18:19.598
 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
 F LICENSE.md e108e1e69ae8e8a59e93c455654b8ac9356a11720d3345df2a4743e9590fb20d
@@ -620,7 +620,7 @@ F ext/session/test_session.c 12e0a2c15fd60f92da4bb29c697c9177ff0c0dbcdc5129a54c4
 F ext/wasm/EXPORTED_FUNCTIONS.fiddle.in 27450c8b8c70875a260aca55435ec927068b34cef801a96205adb81bdcefc65c
 F ext/wasm/GNUmakefile 47f121d057c08ba49443c06c1c51ba2572e3d5d28a06c968cf0b2ccd5878c3d3
 F ext/wasm/README-dist.txt 6382cb9548076fca472fb3330bbdba3a55c1ea0b180ff9253f084f07ff383576
-F ext/wasm/README.md a8a2962c3aebdf8d2104a9102e336c5554e78fc6072746e5daf9c61514e7d193
+F ext/wasm/README.md 463b41328cf5b286ca910731263337aecb76e7f821e2a96d2bbc78e425eba064
 F ext/wasm/SQLTester/GNUmakefile e0794f676d55819951bbfae45cc5e8d7818dc460492dc317ce7f0d2eca15caff
 F ext/wasm/SQLTester/SQLTester.mjs 66e1adc3d79467b68e3e40614fd42c1a577c7e219ec0985db966eded52a941e5
 F ext/wasm/SQLTester/SQLTester.run.mjs 57f2adb33f43f2784abbf8026c1bfd049d8013af1998e7dcb8b50c89ffc332e0
@@ -2208,8 +2208,8 @@ F tool/version-info.c 3b36468a90faf1bbd59c65fd0eb66522d9f941eedd364fabccd7227350
 F tool/warnings-clang.sh bbf6a1e685e534c92ec2bfba5b1745f34fb6f0bc2a362850723a9ee87c1b31a7
 F tool/warnings.sh 49a486c5069de041aedcbde4de178293e0463ae9918ecad7539eedf0ec77a139
 F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P 4aa025a943a4024094b91f13abfb8945bbbb8334e3ec904dee5315852845bfe1
-R 42d46d94722ee7e44271375fb148ccd7
+P 7f9074e2a7ff62bdcf343895e80a51224de62a22afbbf82068ec5fea7eeda0bb
+R 9870d8aac6c5ee0536c13705fc8fd884
 U stephan
-Z 819bc68a21feb3b1bb7fc8b14a535d25
+Z 82e929fd8c92d791a9c756aa05ed50ac
 # Remove this line to create a well-formed Fossil manifest.
index effe5e06c0f3751da6ae2b9b1e5b84c7a6028d4a..90b751cd4a1099ec24fe82cd3a3434f16e91a670 100644 (file)
@@ -1 +1 @@
-7f9074e2a7ff62bdcf343895e80a51224de62a22afbbf82068ec5fea7eeda0bb
+9abb56c6acb1c84c2df8534ca3ebb2894afd68bc7b8331d4d12611896c576749