Skip to content

Conversation

juj
Copy link
Collaborator

@juj juj commented Sep 22, 2025

Optimize code size in MINIMAL_RUNTIME: not all users want to override INITIAL_MEMORY via Module.

#if MINIMAL_RUNTIME
var INITIAL_MEMORY = {{{ INITIAL_MEMORY }}};
#else
var INITIAL_MEMORY = {{{ makeModuleReceiveExpr('INITIAL_MEMORY', INITIAL_MEMORY) }}};
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The makeModuleReceiveExpr macro already takes care of this I think.

IIRC, MINIMAL_RUNTIME sets INCOMING_MODULE_JS_API to empty by default which should make this expand to just INITIAL_MEMORY

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

Successfully merging this pull request may close these issues.

2 participants