Stream: git-wasmtime

Topic: wasmtime / issue #8929 Implement wasi-runtime-config


view this post on Zulip Wasmtime GitHub notifications bot (Jul 10 2024 at 06:33):

iawia002 opened issue #8929:

Feature

The wasi-runtime-config API has entered Phase 2, I think we can start implementing it.

Benefit

For users, the env API from wasi-cli can currently be used to achieve similar functionality. However, from a semantic standpoint, some configuration items that the runtime wants to pass to the user should be implemented through the config API.

Implementation

Because the wasi-runtime-config API is very simple, its implementation will be quick. However, there is one issue: I'm not sure whether this API should be merged into the current wasi crate or if we should create a separate wasi-runtime-config crate like wasi-http. The current wasi crate essentially only implements the wasi-cli API, so I'm uncertain how we should handle new wasi APIs, eg: wasi-runtime-config or wasi-keyvalue, etc.

If this proposal is accepted, I would be happy to implement this API.

cc @alexcrichton

view this post on Zulip Wasmtime GitHub notifications bot (Jul 10 2024 at 15:18):

alexcrichton commented on issue #8929:

I think it'll be best to follow the pattern of wasi-nn here to have a separate crate. That would boil down to a few components:

That would then all get integrated into the CLI in the same manner as wasi-nn where it's off-by-default but a flag can be passed to enable it.

Does that sound reasonable to you?

view this post on Zulip Wasmtime GitHub notifications bot (Jul 11 2024 at 01:01):

iawia002 commented on issue #8929:

Yeah, thanks for the help, I'll start implementing it soon.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 22 2024 at 15:17):

alexcrichton closed issue #8929:

Feature

The wasi-runtime-config API has entered Phase 2, I think we can start implementing it.

Benefit

For users, the env API from wasi-cli can currently be used to achieve similar functionality. However, from a semantic standpoint, some configuration items that the runtime wants to pass to the user should be implemented through the config API.

Implementation

Because the wasi-runtime-config API is very simple, its implementation will be quick. However, there is one issue: I'm not sure whether this API should be merged into the current wasi crate or if we should create a separate wasi-runtime-config crate like wasi-http. The current wasi crate essentially only implements the wasi-cli API, so I'm uncertain how we should handle new wasi APIs, eg: wasi-runtime-config or wasi-keyvalue, etc.

If this proposal is accepted, I would be happy to implement this API.

cc @alexcrichton


Last updated: Nov 22 2024 at 17:03 UTC