Stream: general

Topic: ✔ understanding component model


view this post on Zulip Merlijn Sebrechts (Aug 11 2023 at 15:25):

Hi all, I'm trying to better understand the component model and how it relates to "modules". I have some questions:

  1. The docs sometimes talk about "webassembly core modules". Does this refer to "modules as described in the webassembly core specification"?
  2. Will components typically have multiple modules inside of them; or do you expect all composition to happen on the component level instead of on the module level in the future?

I'm a bit confused by the statement of "modules are shared libraries, components are executables". Do we expect some runtimes to provide some shared functionality using modules, like how shared libraries work on Linux? Or do we expect them to only provide such functionality using components?

view this post on Zulip Merlijn Sebrechts (Aug 11 2023 at 15:35):

(moving to wasi stream)

view this post on Zulip Notification Bot (Aug 11 2023 at 15:35):

Merlijn Sebrechts has marked this topic as resolved.

view this post on Zulip Peter Huene (Aug 11 2023 at 15:35):

Hi. @Merlijn Sebrechts.

  1. Yes, that's exactly what is meant by "wasm core module".
  2. There's nothing prohibiting having a "standalone" (my term meaning not composed with other components) component that is comprised of multiple modules, only that generally the language-specific tooling produces a single implementation module and thus is "componentized" with that single module. Technically, even these components have more than one module defined in them, but the extra modules are tooling-created to facilitate in the lowering of imports and contain no executable functions. But that's different from having multiple implementation modules.

view this post on Zulip Peter Huene (Aug 11 2023 at 15:36):

I'll copy my answer to the other thread and continue this there.


Last updated: Nov 22 2024 at 16:03 UTC