Software reuse has always been a story about boundaries. We divide a program into pieces so teams can work independently, then spend the next decade discovering that the seam between those pieces was never as stable as the diagram suggested. Native shared libraries made that seam a convention among compilers. The WASM Component Model tries to make it a contract.

A shared library exports symbols and trusts the caller to agree on their meaning; a component exports a typed interface and lets the runtime translate between two independent implementations of that type.

The ABI is an accident of one toolchain

When you link against a .so or .dll, the linker sees names. A symbol such as parse_config resolves to an address, and the calling convention, structure padding, integer width, and error semantics are assumed rather than described. Those assumptions are stable only inside a narrow family of compiler versions and flags. Change the standard library, enable a different ABI flag, or reorder a structure, and a function still exists at the same symbol while returning nonsense.

Dynamic loading adds a second layer of fragility. A soname and a version script can express compatibility, but the expression is coarse: it says which symbols exist, not what they mean. Dependency resolution happens against the host's search path, so the same binary can load different implementations on two machines. This is the familiar dependency hell, and it is not a bug of any one linker. It follows from a boundary that records addresses and forgets types.

The practical consequences are well known to anyone maintaining a plugin system. A host application supplies a header file, a plugin compiles against it, and every upgrade becomes a coordination exercise. Teams ameliorate the problem with versioned interfaces, opaque handles, and a rule that no structure ever changes, which is really a rule that the interface never evolves.

What the component model standardizes

A WebAssembly component starts from a different premise. Its interface is written in WIT, an interface definition language that describes records, variants, lists, flags, and resources with explicit types. Imports and exports are named and typed, so a runtime can check whether two components agree before either runs. A component does not hand out a pointer into its linear memory; it hands over a value expressed in terms the interface understands.

The mechanism that makes this work is the canonical ABI together with lifting and lowering. When a caller passes a string, the runtime lowers it into the flat representation that core WebAssembly understands; when the callee returns a record, the runtime lifts it back into a typed value. Because components own separate linear memories, there is no shared address space to corrupt and no implicit assumption about allocation. Each side can be written in a different language, compiled by a different toolchain, and still compose with the other, provided both agree on the WIT interface.

Adapters extend the idea to existing code. A library written for a native ABI or a core WebAssembly module can be wrapped so it appears as a component, which means the ecosystem does not need to be rewritten in a single day. The trade-off is that the boundary remains a real place where copying and translation happen, and neither is free.

Versioning is where the typed interface earns its keep. A WIT package can add an optional field or a new function in a way the runtime can reason about, and a host can reject a component that requires a capability it does not provide. A native library has no equivalent vocabulary: it can only offer a newer symbol name and hope the caller checks. Components gather their imports and exports into worlds, which act as a declared environment for a particular deployment, so the question of what a plugin is allowed to use becomes answerable before the plugin starts. That shift moves compatibility failures from runtime crashes to startup validation, which is a much cheaper place to find them.

Instantiating a component and lowering values across its boundary costs microseconds where a direct native call costs nanoseconds, so a plugin host loading thirty plugins for twenty thousand tenants pays roughly six hundred thousand transitions an hour, which at two milliseconds each consumes about twenty minutes of CPU per hour before any plugin does work.

An everyday analogy: plugs, sockets, and adapters

Think about charging a phone in a foreign country. A native shared library is an appliance wired directly into a house's electrical system: it works perfectly in the building where it was installed, and it requires an electrician whenever the wiring changes. The component model is a standardized plug shape with a written specification for voltage and pin layout. Any device with that plug works in any socket with that specification, and a travel adapter handles the older appliances.

The analogy captures the cost too. A plug adds a small resistance and a bit of bulk to every connection, and a universal adapter is slower to use than a fixed wire. You accept that overhead because the alternative is owning a different house for every device. In software, the overhead is a typed boundary crossing; the alternative is owning a different build of your application for every plugin.

Where each belongs

Native shared libraries still win when the call is hot, the types are simple, and everything is built by one organization. A graphics driver, a numerical kernel, or a codec loaded once and called millions of times benefits from a direct call with no translation layer. The ABI risk is manageable when the same CI pipeline builds both sides, because the compiler becomes the contract enforcer. The tooling is mature, the debuggers understand it, and every operating system supports it.

Components shine when the boundary is organizational rather than technical. A platform that accepts extensions from third parties, a desktop application with plugins, or a service composing functions written in several languages all gain from an interface that a runtime can validate. Sandboxing comes for free with WebAssembly's memory isolation, so an untrusted extension cannot read its host's address space. The price is a younger ecosystem: asynchronous calls, threads, and some resource types are still evolving, and debugging across a canonical ABI boundary is less pleasant than stepping through a native stack frame.

The choice is less about execution speed than about where you want to spend your engineering attention, because a native ABI makes calls cheap and evolution expensive, while a component interface makes calls slightly dearer and evolution cheap.

Most systems will end up with both: a fast native core surrounded by typed components at the points where code from different teams meets. That arrangement is not a compromise so much as an admission that a boundary has two jobs, and no single design has yet done both perfectly.

SOL: HCqPmPJM3NVtS6YrmVaTZYnuP8XZ2PFgQZKT94VK1LkS
Creating this takes real effort — thank you for the support.