Stream: git-wasmtime

Topic: wasmtime / PR #1516 Add an instance API for invoking the ...


view this post on Zulip Wasmtime GitHub notifications bot (Apr 15 2020 at 20:04):

sunfishcode opened PR #1516 from reactor to master:

This adds support for the WASI reactor ABI proposed in
https://github.com/WebAssembly/WASI/pull/256, as well as the existing
_start ABI for commands.

This also implements the semantics that command instances should not
persist after their _start function is called. As a safety measure,
this includes a check that the instance refcount is 1, so that other
references to the instance don't hold it live.

Implementing that prompted a change to how the main Instance API works.
Instead having instances eagerly compute a Vec of Externs, and bumping
the refcount for each Extern, compute Externs on demand.

This also means that the closure returned by get0 and friends now
holds an InstanceHandle to dynamically hold the instance live rather
than being scoped to a lifetime.

This is a draft PR for now while I think more about whether this is a good
approach.

<!--

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Apr 15 2020 at 20:44):

bjorn3 submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 15 2020 at 20:44):

bjorn3 submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 15 2020 at 20:44):

bjorn3 created PR Review Comment:

_start must be a function

view this post on Zulip Wasmtime GitHub notifications bot (Apr 16 2020 at 05:32):

sunfishcode updated PR #1516 from reactor to master:

This adds support for the WASI reactor ABI proposed in
https://github.com/WebAssembly/WASI/pull/256, as well as the existing
_start ABI for commands.

This also implements the semantics that command instances should not
persist after their _start function is called. As a safety measure,
this includes a check that the instance refcount is 1, so that other
references to the instance don't hold it live.

Implementing that prompted a change to how the main Instance API works.
Instead having instances eagerly compute a Vec of Externs, and bumping
the refcount for each Extern, compute Externs on demand.

This also means that the closure returned by get0 and friends now
holds an InstanceHandle to dynamically hold the instance live rather
than being scoped to a lifetime.

This is a draft PR for now while I think more about whether this is a good
approach.

<!--

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Apr 16 2020 at 05:37):

sunfishcode updated PR #1516 from reactor to master:

This adds support for the WASI reactor ABI proposed in
https://github.com/WebAssembly/WASI/pull/256, as well as the existing
_start ABI for commands.

This also implements the semantics that command instances should not
persist after their _start function is called. As a safety measure,
this includes a check that the instance refcount is 1, so that other
references to the instance don't hold it live.

Implementing that prompted a change to how the main Instance API works.
Instead having instances eagerly compute a Vec of Externs, and bumping
the refcount for each Extern, compute Externs on demand.

This also means that the closure returned by get0 and friends now
holds an InstanceHandle to dynamically hold the instance live rather
than being scoped to a lifetime.

This is a draft PR for now while I think more about whether this is a good
approach.

<!--

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Apr 16 2020 at 05:37):

sunfishcode submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 16 2020 at 05:37):

sunfishcode created PR Review Comment:

Fixed!

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

sunfishcode closed without merge PR #1516.


Last updated: Oct 23 2024 at 20:03 UTC