google / google/wasefire

Sharing modules between applets

Open
#48 1 comment 0 reactions 0 assignees View on GitHub
crate:scheduler for:footprint needs:design
Dominant language
Rust
Stars
188
Forks
41
Avg merge
1d 5h
Merged PRs (30d)
12

Description

If applets are made of multiple modules with a main module (the one exporting the main function and probably defining the applet properties like its name), then modules may be shared between applets. For example, there could be an `alloc` module that exports its linear memory and an `alloc`, `dealloc`, and `init` functions. All other modules of the applet would import that memory and use those functions.

Open design questions are:
- How is dependency resolution done? Is it described in the applet or modules need to be parsed recursively from the main module?
- How is version management done? If 2 applets depend on different versions of the same module. Should we rely on semantic versioning for modules?
- How is applet management done? Would it become more of a module management with some modules (the main modules) being applets? The CLI should deal with installing/updating/etc modules based on the applet provided on the command line.
- What are the implications of having 2 layers of linking (one linker invocation for each module, then linking those modules in the interpreter)? This may break some assumptions where an applet may look like a binary with a single linking phase.

This may be related to how components work in the component model of WebAssembly, so some answers may be there.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.