Stream: git-wasmtime

Topic: wasmtime / PR #3895 Make `WasiCtx` overridable


view this post on Zulip Wasmtime GitHub notifications bot (Mar 07 2022 at 18:30):

rvolosatovs opened PR #3895 from feature/generic-wasi-ctx to main:

In some use cases it is desirable to provide a custom snapshot WASI
context. Facilitate this by depending on a combination of traits
required rather than concrete type in the signature.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 07 2022 at 18:31):

pchickey submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 07 2022 at 18:32):

rvolosatovs edited PR #3895 from feature/generic-wasi-ctx to main:

In some use cases it is desirable to provide a custom snapshot WASI
context. Facilitate this by depending on a combination of traits
required rather than concrete type in the signature.

This change allows for e.g. wrapping WasiCtx into a struct and providing custom implementations for traits

view this post on Zulip Wasmtime GitHub notifications bot (Mar 07 2022 at 19:37):

rvolosatovs updated PR #3895 from feature/generic-wasi-ctx to main.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 07 2022 at 19:39):

rvolosatovs created PR review comment:

Not the prettiest fix, but I didn't manage to find a simple way to modify the macro to emit , if bounds are provided. Are there any suggestions?

view this post on Zulip Wasmtime GitHub notifications bot (Mar 07 2022 at 19:39):

rvolosatovs submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 07 2022 at 19:40):

pchickey submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 07 2022 at 19:40):

pchickey created PR review comment:

iirc this is a common macro-rules problem. Not a big deal, we only use the macro in this file.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 07 2022 at 19:40):

pchickey submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 07 2022 at 19:47):

rvolosatovs updated PR #3895 from feature/generic-wasi-ctx to main.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 07 2022 at 19:48):

rvolosatovs submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 07 2022 at 19:48):

rvolosatovs created PR review comment:

Found a better way by simply reordering them

view this post on Zulip Wasmtime GitHub notifications bot (Mar 07 2022 at 20:20):

rvolosatovs updated PR #3895 from feature/generic-wasi-ctx to main.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 07 2022 at 21:18):

alexcrichton merged PR #3895.


Last updated: Dec 23 2024 at 12:05 UTC