• gandalf_der_12te@discuss.tchncs.de
    link
    fedilink
    English
    arrow-up
    5
    arrow-down
    1
    ·
    21 hours ago

    But isn’t WASM for web browsers

    not really, no. WASM is a generic hardware-independent format for instructions. it’s like instructions for a virtual CPU, not a real one. it gets translated into the instructions for the real processor on the target device. in this way, it can run on any hardware.

    comparing it to other setups such as java or javascript (which are also both hardware-independent), it runs much faster because it is much hardware-oriented, while java and javascript require abstract features such as a garbage collector, which makes real-time processes impossible.

    • fonix232@fedia.io
      link
      fedilink
      arrow-up
      2
      ·
      10 hours ago

      See the main issue with that is you need to bundle everything into the app.

      Modern computing is inherently cross-dependent on runtimes and shared libraries and whatnot, to save space. Why bundle the same 300MB runtime into five different apps when you can download it once and share it between the apps? Or even better, have a newer, backwards compatible version of the runtime installed and still be able to share it between apps.

      With WASM you’re looking at bundling every single dependency, every single runtime, framework and whatnot, in the final binary. Which is fine for one-off small things, but when everything is built that way, you’re sacrificing tons of storage and bandwidth unnecessarily.

      • gandalf_der_12te@discuss.tchncs.de
        link
        fedilink
        English
        arrow-up
        1
        ·
        edit-2
        51 minutes ago

        With WASM you’re looking at bundling every single dependency, every single runtime, framework and whatnot, in the final binary.

        you just don’t know what you’re talking about. wasm has a module-import structure with which you can link libraries at program start-up, and some wasm runtimes also offer possibilities for linking libraries at run-time.