Stream: git-wasmtime

Topic: wasmtime / PR #1480 Add APIs to lookup values in `Linker`


view this post on Zulip Wasmtime GitHub notifications bot (Apr 07 2020 at 17:26):

alexcrichton opened PR #1480 from linker-get to master:

This commit adds three new methods to Linker in order to inspect it
after values have been inserted:

Closes #1454

view this post on Zulip Wasmtime GitHub notifications bot (Apr 07 2020 at 19:41):

sunfishcode submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 07 2020 at 19:41):

sunfishcode submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 07 2020 at 19:41):

sunfishcode created PR Review Comment:

Could we factor this out into a method on Linker, something like self.linker.get_one_by_name(module, name) or so? I realize it'll require a special error type to be able to report both "no item named {}" and "too many items named {}", but this seems like it'll be a common use case -- I'm even picturing something like the wasmtime CLI but backed by a Linker so that you can provide multiple modules and then do --invoke.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 07 2020 at 19:41):

sunfishcode created PR Review Comment:

Could you add a brief mention of what the components of the tuple return are? Looking at the code, I'm not surprised it's module, name, extern, but it feels like something worth making explicit in the docs.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 07 2020 at 19:41):

sunfishcode created PR Review Comment:

yay!

view this post on Zulip Wasmtime GitHub notifications bot (Apr 07 2020 at 19:41):

sunfishcode created PR Review Comment:

Could we factor out this logic too, with something like self.linker.alias(name, as_name) or so?

view this post on Zulip Wasmtime GitHub notifications bot (Apr 07 2020 at 21:38):

alexcrichton updated PR #1480 from linker-get to master:

This commit adds three new methods to Linker in order to inspect it
after values have been inserted:

Closes #1454

view this post on Zulip Wasmtime GitHub notifications bot (Apr 07 2020 at 23:03):

sunfishcode submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 07 2020 at 23:17):

alexcrichton merged PR #1480.


Last updated: Dec 23 2024 at 12:05 UTC