Skip to content

[wasm] Experiment with emscripten settings to shrink binary size #43694

@CoffeeFlux

Description

@CoffeeFlux

The emscripten settings file defines a lot of different settings we could possibly set to get size wins without too much effort, but it's hard to ballpark how much of a difference these will make.

Some options that appear initially promising:

  • dlmalloc - we could switch to a more compact implementation, or just remove this entirely from mono-codeman.c
  • EVAL_CTORS - this tries to evaluate global ctors at compile-time, and might potentially give us size wins on the ICU builds?
  • INCOMING_MODULE_JS_API - we probably don't need most of these?
  • WebGL - there are a lot of random WebGL settings that might be keeping things around?
  • ASSERTIONS - this adds runtime assertions that we may not need but bloat the code size

Metadata

Metadata

Assignees

Labels

arch-wasmWebAssembly architecturearea-Build-monosize-reductionIssues impacting final app size primary for size sensitive workloads

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions