wasmfs: use unix-none VFS by default to avoid locking errors in non-OPFS mode.

FossilOrigin-Name: 75561dea1a1afe9cb0a7d58dd82fa519e51cf42e330922cfd8e9ccdf6db4dc0f
This commit is contained in:
stephan 2022-08-13 16:36:06 +00:00
parent 1025227272
commit a7234901b2
4 changed files with 11 additions and 10 deletions

View File

@ -182,9 +182,10 @@ emcc.jsflags += -sEXPORTED_RUNTIME_METHODS=FS,wasmMemory # wasmMemory==>for -sIM
emcc.jsflags += -sUSE_CLOSURE_COMPILER=0
emcc.jsflags += -sIMPORTED_MEMORY
emcc.environment := -sENVIRONMENT=web
ENABLE_WASMFS := 1
ENABLE_WASMFS ?= 1
ifneq (0,$(ENABLE_WASMFS))
emcc.cflags += -pthread
emcc.cflags += '-DSQLITE_DEFAULT_UNIX_VFS="unix-none"'
emcc.jsflags += -pthread -sWASMFS -sPTHREAD_POOL_SIZE=2
emcc.environment := $(emcc.environment),worker
else

View File

@ -24,7 +24,7 @@
const stderr = error;
const test1 = function(db){
db.execMulti("create table if not exists t(a);")
db.exec("create table if not exists t(a);")
.callInTransaction(function(db){
db.prepare("insert into t(a) values(?)")
.bind(new Date().getTime())

View File

@ -1,5 +1,5 @@
C Add\sscratchpad/test\sapp\sfor\sWASMFS/OPFS\srunning\sin\sthe\smain\swindow\sthread.\sEnable\sWASMFS\sby\sdefault\sin\sthe\slibrary\sbuild.
D 2022-08-13T16:11:38.873
C wasmfs:\suse\sunix-none\sVFS\sby\sdefault\sto\savoid\slocking\serrors\sin\snon-OPFS\smode.
D 2022-08-13T16:36:06.930
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
@ -474,7 +474,7 @@ F ext/userauth/user-auth.txt e6641021a9210364665fe625d067617d03f27b04
F ext/userauth/userauth.c 7f00cded7dcaa5d47f54539b290a43d2e59f4b1eb5f447545fa865f002fc80cb
F ext/wasm/EXPORTED_FUNCTIONS.fiddle db7a4602f043cf4a5e4135be3609a487f9f1c83f05778bfbdf93766be4541b96
F ext/wasm/EXPORTED_RUNTIME_METHODS.fiddle a004bd5eeeda6d3b28d16779b7f1a80305bfe009dfc7f0721b042967f0d39d02
F ext/wasm/GNUmakefile 1bcfcde973bfbf1ea59acc551728aaf0fc74fcb52ddcd219a9b0f93e42c744f0
F ext/wasm/GNUmakefile 5c9b08139739819fc6223954c1b832d90398e9115789189ab39e5fbc6c764269
F ext/wasm/README.md 4b00ae7c7d93c4591251245f0996a319e2651361013c98d2efb0b026771b7331
F ext/wasm/api/EXPORTED_FUNCTIONS.sqlite3-api 77ef4bcf37e362b9ad61f9c175dfc0f1b3e571563fb311b96581cf422ee6a8ec
F ext/wasm/api/EXPORTED_RUNTIME_METHODS.sqlite3-api 1ec3c73e7d66e95529c3c64ac3de2470b0e9e7fbf7a5b41261c367cf4f1b7287
@ -503,7 +503,7 @@ F ext/wasm/jaccwabyt/jaccwabyt.md 447cc02b598f7792edaa8ae6853a7847b8178a18ed356a
F ext/wasm/jaccwabyt/jaccwabyt_test.c 39e4b865a33548f943e2eb9dd0dc8d619a80de05d5300668e9960fff30d0d36f
F ext/wasm/jaccwabyt/jaccwabyt_test.exports 5ff001ef975c426ffe88d7d8a6e96ec725e568d2c2307c416902059339c06f19
F ext/wasm/scratchpad-opfs-main.html 079b6ec0b3a6c35c9ac92e639ede1b253b901c52ec6a793e5411babb708ace40
F ext/wasm/scratchpad-opfs-main.js 55ac5a0841d6436ac2990a4c26fea7f7fb98b0cfbb02ac169dc91f3c9ed5303d
F ext/wasm/scratchpad-opfs-main.js a819ed26047c5539630cea59add6a5082ba04cdf82da2df2e0707d4d69af6cb1
F ext/wasm/testing1.html 0bf3ff224628c1f1e3ed22a2dc1837c6c73722ad8c0ad9c8e6fb9e6047667231
F ext/wasm/testing1.js a25069e20d5f8dc548cc98bcf7002cec812084421a1f7f70ffae2c706d1167b2
F ext/wasm/testing2.html 73e5048e666fd6fb28b6e635677a9810e1e139c599ddcf28d687c982134b92b8
@ -2001,8 +2001,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 41045be752a5bd7966849638f3ca56f4905308df70f79f2cb6196ca7dce9d525
R 767e1ce7730172518cd5acb6e01d575b
P ae24ac0f7dd9e12a40de0f6ccd61a16f010804da454085f886c217cc600cdba4
R 04c2d08427afe72dca8dfa59a558b201
U stephan
Z 6b8d7c0e41c798b0afb745ee9b8f505a
Z 16beafa09646f238ac043a3e648d875d
# Remove this line to create a well-formed Fossil manifest.

View File

@ -1 +1 @@
ae24ac0f7dd9e12a40de0f6ccd61a16f010804da454085f886c217cc600cdba4
75561dea1a1afe9cb0a7d58dd82fa519e51cf42e330922cfd8e9ccdf6db4dc0f