Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Postponed: Inspect WASM size #88

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft

Conversation

maxammann
Copy link
Collaborator

@maxammann maxammann commented May 9, 2022

fixes #89

Findings so far:

  • maplibre (without winit) has 722kb (stable)
    1. Set crate-type = ["cdylib"]
    2. cargo build -p maplibre --features web-webgl --lib --release --target wasm32-unknown-unknown
  • maplibre-winit has 570kb (stable)
    1. Set crate-type = ["cdylib"]
    2. cargo build -p maplibre-winit --lib --release --target wasm32-unknown-unknown
  • web has 1.2M (nightly, opt-level = "z", strip = true)
    1. cargo build -p web --lib --release --target wasm32-unknown-unknown -Z build-std=std,panic_abort
  • web has 3.7M (stable, default rustflags, no build-std, opt-level = "s", strip = debuginfo)
    1. cargo build -p web --lib --release --target wasm32-unknown-unknown
  • web has 2.7M (stable, default rustflags, no build-std, opt-level = "z", strip = true)
    1. cargo build -p web --lib --release --target wasm32-unknown-unknown

Findings:

💻 Examples

🚨 Test instructions

✔️ PR Todo

  • Included links to related issues/PRs

@maxammann maxammann force-pushed the wasm-size branch 3 times, most recently from 4cb3e46 to f3911c7 Compare May 9, 2022 14:20
@maxammann maxammann force-pushed the main branch 3 times, most recently from 8c5d8ee to 4dbd47b Compare June 3, 2022 09:54
@maxammann maxammann changed the title Inspect WASM size Postphoned until needed: Inspect WASM size Nov 12, 2022
@maxammann maxammann changed the title Postphoned until needed: Inspect WASM size Postponed: Inspect WASM size Nov 19, 2022
@maxammann maxammann added the pr-postponed Postponed PR, which is not needed right now but might be needed (contains valuable information) label Nov 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-postponed Postponed PR, which is not needed right now but might be needed (contains valuable information)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Explain WASM size through Github Action
1 participant