1. 11
  1. 2

    Why not target WASM instead of JS/TS? (Is the author on Lobsters?)

    1. 5

      WASM isn’t just a “lower-level JS” and a completely separate execution environment. Features of JS might be cheap to use in WASM or not, depending on the amount of glue needed (e.g. JS numbers are notoriously FFI unfriendly).

      1. 3

        I’m not the author, but WASM is not ready for general use yet. It can’t do much without requiring a heavy JS wrapper.

        1. 4

          Figma runs on WebAssembly… I guess you could still argue it is not “general use”, but it certainly is production ready.

          1. 1

            He’s the compiler, he can emit whatever code he wants, including arbitrary JS linkage via exports and imports on the instance.

            1. 2

              Yes, but the JS linkage would have to be heavy. Have you seen how much bloat is added by Emscripten?