You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)
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.
The text was updated successfully, but these errors were encountered:
The Component Model mostly leaves all these options open to the producer toolchain, providing the raw linking primitives to allow the producer toolchain to precisely say what it wants. For example, check out this example, which I think avoids DLL hell while also sharing the appropriate amount of code, all unambiguously linked together via the C-M: https://github.com/WebAssembly/component-model/blob/main/design/mvp/examples/SharedEverythingDynamicLinking.md
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 onlib.wasm
.app-final.wasm
]app-final.wasm
,lib.wasm
]--static-link lib.wasm
)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 forlegion-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.
The text was updated successfully, but these errors were encountered: