12 comments

  • AshleysBrain 0 minutes ago
    Shameless plug but if you like small file size overheads, our browser based game engine Construct[1] exports an empty web project with about 300 KB overhead for a fully-featured engine. We achieve this by going all-in on the web platform so we don't have to ship a heavyweight runtime with it, and using a modular approach where only the components you use get exported.

    [1] https://www.construct.net

  • CamouflagedKiwi 5 minutes ago
    So the engine is 35MB, but what does it run in? By itself it's a binary blob that doesn't do anything.

    Chrome seems to be ~404MB installed on here; that is conspicuously missing from the comparisons here to Docker containers which do account for more or less the complete runtime.

  • gbraad 11 minutes ago
    Quod is only 64K https://daivuk.itch.io/quod and looks more impressive
  • Tsarp 32 minutes ago
    Docker can be small too. In this example I was able to compile a full server (rust binary) and package it in a docker (scratch image base) and the total was < 5MB.

    https://github.com/srv1n/kurpod/pkgs/container/kurpod-server

    wasm version compiles to under a MB though!

  • andai 56 minutes ago
    Unity compiles down to 3MB wasm. Though they don't need to ship the dotnet runtime, they use IL2CPP, a proprietary thing that translates dotnet code into C++. Then they run Emscripten on it.

    Also I think Godot's WASM outputs used to be 2-3x smaller in Godot 3 (though the C# one was bigger).

    You can ship a JS game in kilobytes, although atop 30 million lines of Chromium that's cheating of course :) still good fun.

    https://js13kgames.com/

    Notch also made a bunch of 4kb Java (not JS) games back in the day, which is probably what got me into this stuff.

    https://web.archive.org/web/20090108001738/http://www.mojang...

  • po1nt 10 minutes ago
    WASM sounds great in theory but it's so much pain in practice. Once as a presentation demo I made it run on ESP32 but in the process of digging deep into runtimes and WASM spec, I wanted to disclose pros vs cons and it killed my presentation.

    I realize wasm wasn't designed for embedded but it made me open my eyes to it's intricacies like minimum memory allocation, why not native 1 byte variables?

  • unglaublich 12 minutes ago
    Sure but in WASM, the browser's environment is taking responsibility for many OS concerns (graphics, IO, 3D, hardware). In a Docker image, all that logic needs to be bundled in libraries as you'll only get to "reuse" the hosts' kernel.

    A 'fairer' comparison would be a optimized and compiled binary that dynamically links to the OS versus a WASM product (would be kilobytes-megabytes).

    Or having the WASM app in a Chromium browser in Docker (would be gigabytes).

  • feverzsj 3 minutes ago
    I believe you can create this demo using webgl in less than 4kb.
  • mmcconnell1618 19 minutes ago
    10MB for the Google Homepage! 44MB for Facebook Homepage! I have not been paying attention to website bloat. Wow, and people were annoyed when a site had to download a whole JQuery library for a single function.
    • 2ndorderthought 15 minutes ago
      It's more or less an abomination. Dropping the frameworks and js jazz you could have most of the features of either of these sites served in the kb range. It would save millions of dollars in electricity, billions in infrastructure, and be more secure.
      • gear54rus 13 minutes ago
        Yes, it's absolutely the frameworks. That each weigh <100KB. Definitely frameworks :D

        Edit:

        I don't even know where you lot get these numbers from nowadays, smh.

        Just checked, in Slovakia, google.com is 1MB (compressed) total with cache disabled. 400kib of those is my own extension that I installed which is counted among the 'loaded scripts'. Loads in 400ms, blink of an eye.

        Framework rants are completely detached from reality, as always.

        • voidUpdate 8 minutes ago
          What else would it be? Google is a picture, a text box, and few buttons. Not exactly a lot of HTML
  • xattt 29 minutes ago
    Is it fair to compare WASM app to a base install?

    The thing runs in a browser that has most of the stuff implemented to integrate with whatever system it runs on, and just needs to present.

    It’s payload versus payload + runtime.

  • glimshe 37 minutes ago
    Back in the Atari 2600 days, we had full AAA games that sold millions fitting in 4KB...
    • voidUpdate 15 minutes ago
      "AAA games" didn't even exist until 20 years after the 2600