Skip to content

Search

Volver
· 2 min de lectura

A smaller web template

A web export ships a template without the editor, the Rune compiler, the WESL linker or egui's fonts: 18.9 MB raw and 5.1 MB brotli.

A web export ships a template built without the editor: 18.9 MB raw and 5.1 MB brotli, where the editor's module is 25.4 MB and 7.0 MB.

Raw and brotli sizes of the editor's module, the game template, and the template without each physics world

  • A web export ships compiled scripts, as every other target does, and the template has no Rune compiler: 1.0 MB of code.
  • Every shader the game draws with is linked at export and deflated into the pack, 9 KB for a game with no materials of its own, so the template has no WESL linker: 1.4 MB.
  • The exporter, the project store and a tab's editor entry points stay behind the editor feature: 0.4 MB.
  • egui's bundled faces stay in the editor too, behind fallback-fonts: 1.4 MB. A game draws with its own fonts/ and the Source Sans 3 face the engine carries.
  • Images decode as the seven formats a material and a sky read: PNG, JPEG, WebP, BMP, TGA, HDR and EXR.
  • egui fills its glyphs with zeno, the rasteriser the engine's own text already links, in place of vello_cpu: 1.4 MB, and half the time per glyph.
  • physics2d and physics3d each register one world, and [export] runtime = "2d" puts a game on its target's one-world template: web-2d is 17.1 MB raw and 4.7 MB brotli.
  • The export refuses that template for a game whose scenes or scripts use the other world.
  • The examples on this site play on the template their [export] runtime names.
  • --keep-sources still ships source, for an editor that shows the code; only a build with compile runs such a pack.
WEB_FEATURES=audio,browser,window,physics2d scripts/package_runtime.sh web
balaur export my-game --target web --runtime dist/balaur-runtime-web

The build size page has the table by crate.