-
Notifications
You must be signed in to change notification settings - Fork 92
Description
I came across the use case in the wasmCloud runtime linking docs.
Excerpt:
For example, a component may use the
wasi:keyvalue
interface to link to both a local key-value cache for ephemeral storage and a cloud-based store for more resilient storage.
In this example, you're using the same key-value interface and the same operations, but the interface needs to be configured differently. These different configurations of the interface can be differentiated with a link name.
Wouldn't this be better standardized as native component model functionality, avoiding different vendor solutions?
Perhaps by giving imports names or aliases somehow? One must be able to determine which storage import (local or cloud-based) is used in the language bindings/source code.
Using the LEGO brick terminology which is popular for illustrating wasm component imports/exports: when giving imports names or aliases, each aliased import get its own tube/socket that must be filled separately.
Did this make sense? Perhaps it could be done another way, but I think solving the use case in wit/wasm components is reasonable..?