componentized/directory

componentized:config-remap

component

Maps the keys in a wasi:config/store based on the content of a 'mapping' import which mimics wasi:config/store.

Imports

Exports

WIT

package root:component;

world root {
  import wasi:config/store@0.2.0-rc.1;
  import mapping: interface {
    variant error {
      upstream(string),
      io(string),
    }

    get: func(key: string) -> result<option<string>, error>;

    get-all: func() -> result<list<tuple<string, string>>, error>;
  }

  export wasi:config/store@0.2.0-rc.1;
}