Skip to content

decorate all global variables with @lazy #40

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

Merged
merged 1 commit into from
Apr 13, 2021

Conversation

ashutoshvarma
Copy link
Contributor

Rationale

If Global variables in the library are not decorated with @lazy then they are compiled even if they aren't referenced.
So every wasm built will have the copy of those variables and state

See, empty.ts and its output wat in this failing test log

Changes

Decorate all the global variables with @lazy

all consts are compiled even when not refrenced if not decorated
with @lazy

Signed-off-by: Ashutosh Varma <[email protected]>
@github-actions
Copy link

🎉 This PR is included in version 1.7.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants