Indietro
· 2 min di lettura
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.
- Dragos Balaur
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.

- A web export ships compiled scripts, as every other target does; the template has no Rune compiler: 1.0 MB.
- 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
editorfeature: 0.4 MB. - egui's bundled faces stay in the editor too, behind
fallback-fonts: 1.4 MB. A game draws with its ownfonts/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 ofvello_cpu: 1.4 MB, and half the time per glyph. physics2dandphysics3deach register one world, and[export] runtime = "2d"puts a game on its target's one-world template:web-2dis 17.1 MB raw and 4.7 MB brotli.- The export refuses it for a game using the other world.
[export] runtime = "bare"leaves out both worlds,autopicks it for a game naming neither, andweb-bareis 10.38 MB raw, 2.98 MB brotli.- Packs carry compiled scripts, so the template drops its compiler, 0.49 MB.
- Tony McMapface's 864 KiB tonemap table rides only in a pack naming
tony_mcmapface: 350 KB more pack. - Web builds drop WebGL2 and
RUST_LOG's regex and build std for size, 2.5 MB;webglandWEB_STD=stockundo it. --keep-sourcesships source, which only a build withcompileruns.
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.