maplibre-rs icon indicating copy to clipboard operation
maplibre-rs copied to clipboard

Explain WASM size through Github Action

Open maxammann opened this issue 2 years ago • 2 comments

Goal of this task is to give some more insights into the size of the wasm/native binary.

Note: This is a beginner task because it requires no insight into maplibre-rs. But its probably not tivial.

🤔 Expected Behavior

  • We want a cargo profile, which includes debug symbols, but is else identical to a release build. This gives a good estimate of actual sizes and allows to debug the usage.
  • Track wasm size through a custom Github Action. Post diffs in the PR.
    • MVP: Post size differences of binary output between builds
    • Future: Breakdown usage by function/crate/....
    • For linux binaries we can use: https://github.com/RazrFalcon/cargo-bloat
    • For wasm we must use: https://github.com/rustwasm/twiggy

😯 Current Behavior

No insights.

💁 Possible Solution

There is https://github.com/orf/cargo-bloat-action/tree/master/src Sadly this does not support WASM. Also it sends data to some cloudflare service in the US.

🔦 Context

💻 Examples

maxammann avatar May 09 '22 09:05 maxammann

I created a PR which covers the first task of this PR. Create binaries in release mode with debug symbols.

maxammann avatar Jun 03 '22 10:06 maxammann

Twiggy has a bug right now: https://github.com/rustwasm/twiggy/issues/326

maxammann avatar Jun 03 '22 10:06 maxammann