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 anInstanceHandle
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.
[ ] This has been discussed in issue #..., or if not, please tell us why
here.[ ] A short description of what this does, why it is needed; if the
description becomes long, the matter should probably be discussed in an issue
first.[ ] This PR contains test cases, if meaningful.
- [ ] A reviewer from the core maintainer team has been assigned for this PR.
If you don't know who could review this, please indicate so. The list of
suggested reviewers on the right can help you.Please ensure all communication adheres to the code of conduct.
-->
bjorn3 submitted PR Review.
bjorn3 submitted PR Review.
bjorn3 created PR Review Comment:
_start must be a function
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 anInstanceHandle
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.
[ ] This has been discussed in issue #..., or if not, please tell us why
here.[ ] A short description of what this does, why it is needed; if the
description becomes long, the matter should probably be discussed in an issue
first.[ ] This PR contains test cases, if meaningful.
- [ ] A reviewer from the core maintainer team has been assigned for this PR.
If you don't know who could review this, please indicate so. The list of
suggested reviewers on the right can help you.Please ensure all communication adheres to the code of conduct.
-->
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 anInstanceHandle
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.
[ ] This has been discussed in issue #..., or if not, please tell us why
here.[ ] A short description of what this does, why it is needed; if the
description becomes long, the matter should probably be discussed in an issue
first.[ ] This PR contains test cases, if meaningful.
- [ ] A reviewer from the core maintainer team has been assigned for this PR.
If you don't know who could review this, please indicate so. The list of
suggested reviewers on the right can help you.Please ensure all communication adheres to the code of conduct.
-->
sunfishcode submitted PR Review.
sunfishcode created PR Review Comment:
Fixed!
sunfishcode closed without merge PR #1516.
Last updated: Nov 22 2024 at 17:03 UTC