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

fix: avoid importing net/http on wasm #449

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

Commits on Apr 7, 2024

  1. Merge branch 'dev'

    nhooyr committed Apr 7, 2024
    Configuration menu
    Copy the full SHA
    bd07a64 View commit details
    Browse the repository at this point in the history

Commits on May 4, 2024

  1. fix: avoid importing net/http on wasm

    Using goweight: https://github.com/paralin/goweight
    
    GOOS=js GOARCH=wasm goweight | less
    
    Without this change:
    
      7.9 MB runtime
      6.6 MB net/http
      3.1 MB net
      3.0 MB crypto/tls
      2.0 MB reflect
      1.4 MB math/big
      1.3 MB crypto/x509
      935 kB os
      ...
    
    With this change:
    
      7.9 MB runtime
      3.1 MB net
      2.0 MB reflect
      935 kB os
      ...
    
    Slight modifications to avoid importing net/http reduce the binary size significantly.
    
    Signed-off-by: Christian Stewart <[email protected]>
    paralin committed May 4, 2024
    Configuration menu
    Copy the full SHA
    2358de6 View commit details
    Browse the repository at this point in the history