Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for WebAssembly
  4. how to enable JSPI to use QSettings::WebIndexedDBFormat
Forum Updated to NodeBB v4.3 + New Features

how to enable JSPI to use QSettings::WebIndexedDBFormat

Scheduled Pinned Locked Moved Unsolved Qt for WebAssembly
4 Posts 3 Posters 1.1k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    LZHD
    wrote on 14 May 2024, 13:51 last edited by
    #1

    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

    1 Reply Last reply
    0
    • J Offline
      J Offline
      jsulm
      Lifetime Qt Champion
      wrote on 15 May 2024, 05:41 last edited by
      #2

      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."

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      L 1 Reply Last reply 15 May 2024, 10:27
      0
      • J jsulm
        15 May 2024, 05:41

        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."

        L Offline
        L Offline
        LZHD
        wrote on 15 May 2024, 10:27 last edited by
        #3

        @jsulm Thank you for your answer. I forgot to mention it. In fact, my chrome has enabled JSPI, but the error is as mentioned above...

        1 Reply Last reply
        0
        • J Offline
          J Offline
          jeannette9728miller
          wrote on 23 May 2024, 09:52 last edited by
          #4
          This post is deleted!
          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved