Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-113849

Deploy WebAssembly shared libraries using the CMake deployment API

    XMLWordPrintable

Details

    • Task
    • Resolution: Unresolved
    • P2: Important
    • None
    • None
    • Build System: CMake
    • None
    • WebAssembly

    Description

      We’d like to drive WebAssembly shared libraries deployment using the CMake deployment API, using the following workflow:

      qt-cmake . -DCMAKE_STAGING_PREFIX=path/to/app-install
      ninja install

      (See also https://www.qt.io/blog/cmake-deployment-api)

      Deployment on WebAssembly consists of detecting which plugins and QML imports the app is using, and then emitting a list of files in json format. That list is then passed to qtloader which downloads the required files on startup. This is currently implemented using python scripts (which call qmlimportscanner etc). See QTBUG-63925 for top-level shared libraries task.

      Tasks:

      Make “ninja install” work

      • The default install location is “RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}”, but we don’t want the “bin/“ suffix
      • Currently only the app.js file is installed -  app.wasm, qtloader.js, and app.html is missing.

      Drive deployment from cmake:

      • We would like cmake code to determine plugin dependencies and run qmlimportscanner.
        • the current impl in the cmake build uses file(GET_RUNTIME_DEPENDENCIES), which is linux only.
        • cmake does generate a list of in-use plugins for linux deploymnt, this could maybe be reused
      • Creating wasmdeployqt is maybe not needed, or we can crate a minimal one
      • Can we generate then json files directly from cmake code?

      Attachments

        For Gerrit Dashboard: QTBUG-113849
        # Subject Branch Project Status CR V

        Activity

          People

            lpotter Lorn Potter
            sorvig Morten Sørvig
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There is 1 open Gerrit change