Stream: git-wasmtime

Topic: wasmtime / PR #7778 add linker to wasi preview2 that acce...


view this post on Zulip Wasmtime GitHub notifications bot (Jan 15 2024 at 23:32):

sehz opened PR #7778 from sehz:custom_wasi_link to bytecodealliance:main:

Allow passing of closure to wasi command linking. Current add_to_linker is re-implemented more general API

view this post on Zulip Wasmtime GitHub notifications bot (Jan 15 2024 at 23:32):

sehz requested alexcrichton for a review on PR #7778.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 15 2024 at 23:32):

sehz requested wasmtime-core-reviewers for a review on PR #7778.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 15 2024 at 23:34):

sehz edited PR #7778:

Allow passing of closure to wasi command linking. Current add_to_linker is re-implemented more general API. Without this, it's hard to create reusable wasi context store

view this post on Zulip Wasmtime GitHub notifications bot (Jan 16 2024 at 18:43):

alexcrichton commented on PR #7778:

Thanks for the PR, but this is something we were ideally hoping to avoid with the WasiView trait design. Would it be possible to implement WasiView for your type T within the Store<T>?

view this post on Zulip Wasmtime GitHub notifications bot (Jan 18 2024 at 00:25):

sehz commented on PR #7778:

Problem is that T is becoming very complex. Ideally Store should be composable. Key problem is that store is tied to linker which makes difficult separate host implementation

view this post on Zulip Wasmtime GitHub notifications bot (Jan 18 2024 at 00:25):

sehz edited a comment on PR #7778:

Issue is that T is becoming very complex. Ideally Store should be composable. Key problem is that store is tied to linker which makes difficult separate host implementation

view this post on Zulip Wasmtime GitHub notifications bot (Jan 18 2024 at 16:43):

alexcrichton commented on PR #7778:

I understand that T can be complex, and I also understand that writing a closure is shorter than writing a trait impl, but I'm not sure why the complexity would make trait impls more difficult (as opposed to a simple T). The fact that the store and linker are tied together is indeed a bit limiting, but with trait bounds it should be possible to design roughly the sme APIs.

Is there anything preventing the trait impls on T in your case?

view this post on Zulip Wasmtime GitHub notifications bot (Feb 01 2024 at 04:17):

alexcrichton commented on PR #7778:

We chattec a bit more tonight about this and I think it's a reasonable enough feature to add given it's pretty small and solves a concrete use case. If you're ok fixing the failing test on CI (I think there's a new trait bound needed) I can r+

view this post on Zulip Wasmtime GitHub notifications bot (Feb 01 2024 at 14:18):

sehz commented on PR #7778:

Thanks. Will fix CI


Last updated: Dec 23 2024 at 12:05 UTC