WebAssembly / WebAssembly/component-model
Static and dynamic libraries
Nobody has claimed this yet.
- Dominant language
- WebAssembly
- Stars
- 1.4k
- Forks
- 130
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 15
Description
Is there a specification to mark whether a component model should be (as a suggestion) a static library or a dynamic library?
Assume lib.wasm is a library, app.wasm is an application, and depends on lib.wasm.
- Static library means the product is only one file [
app-final.wasm] - Dynamic library means the product is two files [
app-final.wasm,lib.wasm]- Unless the user forces static linking of this library (similar to
--static-link lib.wasm)
- Unless the user forces static linking of this library (similar to
Motivation
Although dynamic linking hell is a very bad problem, I think limited dynamic linking helps reduce the overall size of the final executable file
I developed a command line tool legion.wasm, which automatically looks for legion-plugin.wasm when encountering unknown instructions.
The plugin needs to use some definitions of the original application, which makes the plugin even larger.
Therefore, I hope there is some convention to specify that some dependencies should be compiled as a shared library as a whole, This can effectively reduce the overall size.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the component model specification and the issue's existing discussion about static and dynamic library behavior. Determine whether the model needs a convention for dependency linking and how forced static linking would be represented. Done means the behavior and any required specification changes are agreed and documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- wasm
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100