how to enable JSPI to use QSettings::WebIndexedDBFormat
-
Hi,
I tried to store content larger than 5mb on Qt for webassembly through QSettings. I needed to use WebIndexedDBFormat, but I was asked to enable JSPI. I tried many methods without success, as follows:QMAKE_LFLAGS += -sASYNCIFY=2 QMAKE_CXXFLAGS += -feature-wasm-exceptions
or
QMAKE_LFLAGS += -sDYNCALLS=1 -sASYNCIFY=2 -sASYNCIFY_EXPORTS=dynCall_* QMAKE_CXXFLAGS += -feature-wasm-exceptions
Cannot enter the wasm:
Edge:Application exit (WebAssembly.Function is not a constructor)
Chrome:Application exit (Assertion failed: Missing __sig for invoke_dii)
There is no corresponding solution found in the official documents...
I'm using Qt6.7.0 multi-threaded build and emsdk 3.1.50 -
According to https://v8.dev/blog/jspi you have to enable it in the browser:
"To test it locally, go to chrome://flags in Chrome, search for “Experimental WebAssembly JavaScript Promise Integration (JSPI)” and check the box. Relaunch as suggested for it to take effect." -
This post is deleted!