Minor wasm doc touchups. No code changes.

FossilOrigin-Name: 2c448368913a844bdb5e69f8fa3bad91a2b6612ba3b7f3f650dd07b81db25a77
This commit is contained in:
stephan 2022-11-07 12:12:27 +00:00
parent 1407458c6f
commit c0a18d6a5a
3 changed files with 31 additions and 20 deletions

View File

@ -17,22 +17,29 @@
conventions, and build process are very much under construction and conventions, and build process are very much under construction and
will be (re)documented once they've stopped fluctuating so much. will be (re)documented once they've stopped fluctuating so much.
Specific goals of this project: Project home page: https://sqlite.org
Documentation home page: https://sqlite.org/wasm
Specific goals of this subproject:
- Except where noted in the non-goals, provide a more-or-less - Except where noted in the non-goals, provide a more-or-less
feature-complete wrapper to the sqlite3 C API, insofar as WASM feature-complete wrapper to the sqlite3 C API, insofar as WASM
feature parity with C allows for. In fact, provide at least 3 feature parity with C allows for. In fact, provide at least 4
APIs... APIs...
1) Bind a low-level sqlite3 API which is as close to the native 1) 1-to-1 bindings as exported from WASM, with no automatic
one as feasible in terms of usage. type conversions between JS and C.
2) A binding of (1) which provides certain JS/C type conversions
to greatly simplify its use.
2) A higher-level API, more akin to sql.js and node.js-style 3) A higher-level API, more akin to sql.js and node.js-style
implementations. This one speaks directly to the low-level implementations. This one speaks directly to the low-level
API. This API must be used from the same thread as the API. This API must be used from the same thread as the
low-level API. low-level API.
3) A second higher-level API which speaks to the previous APIs via 4) A second higher-level API which speaks to the previous APIs via
worker messages. This one is intended for use in the main worker messages. This one is intended for use in the main
thread, with the lower-level APIs installed in a Worker thread, thread, with the lower-level APIs installed in a Worker thread,
and talking to them via Worker messages. Because Workers are and talking to them via Worker messages. Because Workers are
@ -90,11 +97,13 @@
config object is only honored the first time this is config object is only honored the first time this is
called. Subsequent calls ignore the argument and return the same called. Subsequent calls ignore the argument and return the same
(configured) object which gets initialized by the first call. (configured) object which gets initialized by the first call.
This function will throw if any of the required config options are
missing.
The config object properties include: The config object properties include:
- `exports`[^1]: the "exports" object for the current WASM - `exports`[^1]: the "exports" object for the current WASM
environment. In an Emscripten build, this should be set to environment. In an Emscripten-based build, this should be set to
`Module['asm']`. `Module['asm']`.
- `memory`[^1]: optional WebAssembly.Memory object, defaulting to - `memory`[^1]: optional WebAssembly.Memory object, defaulting to
@ -104,7 +113,7 @@
WASM-exported memory. WASM-exported memory.
- `bigIntEnabled`: true if BigInt support is enabled. Defaults to - `bigIntEnabled`: true if BigInt support is enabled. Defaults to
true if self.BigInt64Array is available, else false. Some APIs true if `self.BigInt64Array` is available, else false. Some APIs
will throw exceptions if called without BigInt support, as BigInt will throw exceptions if called without BigInt support, as BigInt
is required for marshalling C-side int64 into and out of JS. is required for marshalling C-side int64 into and out of JS.
@ -116,10 +125,12 @@
the `free(3)`-compatible routine for the WASM the `free(3)`-compatible routine for the WASM
environment. Defaults to `"free"`. environment. Defaults to `"free"`.
- `wasmfsOpfsDir`[^1]: if the environment supports persistent storage, this - `wasmfsOpfsDir`[^1]: if the environment supports persistent
directory names the "mount point" for that directory. It must be prefixed storage, this directory names the "mount point" for that
by `/` and may currently contain only a single directory-name part. Using directory. It must be prefixed by `/` and may contain only a
the root directory name is not supported by any current persistent backend. single directory-name part. Using the root directory name is not
supported by any current persistent backend. This setting is
only used in WASMFS-enabled builds.
[^1] = This property may optionally be a function, in which case this [^1] = This property may optionally be a function, in which case this

View File

@ -1,5 +1,5 @@
C Fix\sthe\sdocumentation\sregarding\snegative\slength\sparameters\sfor\nsqlite3_result_text()\sinterfaces,\sto\spoint\sout\sthat\sthe\slength\sparameter\nto\ssqlite3_result_text64()\scannot\sbe\snegative.\n[forum:/forumpost/cf1d043b07|Forum\spost\scf1d043b07].\nComment/documentation\schange\sonly. C Minor\swasm\sdoc\stouchups.\sNo\scode\schanges.
D 2022-11-07T11:19:28.025 D 2022-11-07T12:12:27.335
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724 F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
@ -502,7 +502,7 @@ F ext/wasm/api/sqlite3-api-cleanup.js ecdc69dbfccfe26146f04799fcfd4a6f5790d46e7e
F ext/wasm/api/sqlite3-api-glue.js 056f44b82c126358a0175e08a892d56fadfce177b0d7a0012502a6acf67ea6d5 F ext/wasm/api/sqlite3-api-glue.js 056f44b82c126358a0175e08a892d56fadfce177b0d7a0012502a6acf67ea6d5
F ext/wasm/api/sqlite3-api-oo1.js e9a83489bbb4838ce0aee46eaaa9350e0e25a5b926b565e4f5ae8e840e4fbaed F ext/wasm/api/sqlite3-api-oo1.js e9a83489bbb4838ce0aee46eaaa9350e0e25a5b926b565e4f5ae8e840e4fbaed
F ext/wasm/api/sqlite3-api-opfs.js cdcbb57acc66f4569ac9e18f9d13d5a3657d8aae195725c6324943da56c1005d F ext/wasm/api/sqlite3-api-opfs.js cdcbb57acc66f4569ac9e18f9d13d5a3657d8aae195725c6324943da56c1005d
F ext/wasm/api/sqlite3-api-prologue.js 952ba908cc5ee42728c5c09dd549af32ef0c3cc15ab7b919a8007c5684f69320 F ext/wasm/api/sqlite3-api-prologue.js 80ec5c035b0fd06ae6fbb4fb9de4cada005d044e4bd9bb60cfa7c0f313e927ba
F ext/wasm/api/sqlite3-api-worker1.js e94ba98e44afccfa482874cd9acb325883ade50ed1f9f9526beb9de1711f182f F ext/wasm/api/sqlite3-api-worker1.js e94ba98e44afccfa482874cd9acb325883ade50ed1f9f9526beb9de1711f182f
F ext/wasm/api/sqlite3-license-version-header.js a661182fc93fc2cf212dfd0b987f8e138a3ac98f850b1112e29b5fbdaecc87c3 F ext/wasm/api/sqlite3-license-version-header.js a661182fc93fc2cf212dfd0b987f8e138a3ac98f850b1112e29b5fbdaecc87c3
F ext/wasm/api/sqlite3-opfs-async-proxy.js ab7d2888ad9b3dd24bb782bd882fcada2a20cb88eb78c8f36e7bfe708857dbd1 F ext/wasm/api/sqlite3-opfs-async-proxy.js ab7d2888ad9b3dd24bb782bd882fcada2a20cb88eb78c8f36e7bfe708857dbd1
@ -2054,8 +2054,8 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
P ea30a6bfc463acce26a4d710e7bf56519ad096ce2fe904ee7e199f5c55068034 P 8016507651f377b08deb3a13cc559d56ce6e934c3073a8e63d05fd946b8403a4
R 061e473e36c5f0cba5c53d7cebd5abaf R af437730f2e2fe46fe54c47d2818a8df
U drh U stephan
Z cccd331808932afe75bd690520d4669f Z 08ec6481128f12897d827be1afc2d44a
# Remove this line to create a well-formed Fossil manifest. # Remove this line to create a well-formed Fossil manifest.

View File

@ -1 +1 @@
8016507651f377b08deb3a13cc559d56ce6e934c3073a8e63d05fd946b8403a4 2c448368913a844bdb5e69f8fa3bad91a2b6612ba3b7f3f650dd07b81db25a77