Skip to content

Define a 'management' module for loading. #378

@ghost

Description

There are a good number of unresolved matters that might be possible to lump under a 'management' module. This might be responsible for early negotiations on the loading of the code, could implement decompression and macro expansion, and perhaps also load time fixups, before the main code runs. It might also be able to manage stopping and restarting the main code to respond to memory pressure etc, to resize the memory, to move from a wasm32 to wasm64 mode etc.

There is already a wasm polyfill, and the loading of asm.js code can already be managed by JS, and perhaps this module could fill a similar role.

A general solution such as this might avoid a lot of spec work on defining a macro layer etc, and leave these as open matters for the community to explore by writing their own management modules.

This could be responsible for negotiating the initial memory size for #331 after which it could compute constants and rewrite the code during macro expansion.

Most languages with macros have some compile time computation support, and this could fill this role.

It might use a separate memory area, with an interface to the main memory once available.

Perhaps like a service worker it could be transient, and restarted as needed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions