-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a first-class way of accessing caller's exports #1290
Merged
alexcrichton
merged 3 commits into
bytecodealliance:master
from
alexcrichton:rewrite-func
Mar 18, 2020
Merged
Add a first-class way of accessing caller's exports #1290
alexcrichton
merged 3 commits into
bytecodealliance:master
from
alexcrichton:rewrite-func
Mar 18, 2020
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alexcrichton
added
wasmtime:api
Related to the API of the `wasmtime` crate itself
wasmtime
Issues about wasmtime that don't fall into another label
labels
Mar 11, 2020
Gah it looks like the subscribe-to-label action also needs to run on a cron schedule for pull requests: https://github.com/bytecodealliance/wasmtime/pull/1290/checks?check_run_id=501503929#step:2:25 |
alexcrichton
force-pushed
the
rewrite-func
branch
from
March 12, 2020 19:47
3914410
to
bb021dd
Compare
alexcrichton
force-pushed
the
rewrite-func
branch
from
March 12, 2020 21:34
bb021dd
to
f9c96f0
Compare
Subscribe to Label ActionThis issue or pull request has been labeled: "wasi", "wasmtime", "wasmtime:api" Users Subscribed to "wasmtime:api"To subscribe or unsubscribe from this label, edit the |
github-actions
bot
added
the
wasmtime:docs
Issues related to Wasmtime's documentation
label
Mar 13, 2020
sunfishcode
reviewed
Mar 18, 2020
This commit is a continuation of bytecodealliance#1237 and updates the API of `Func` to allow defining host functions which have easy access to a caller's memory in particular. The new APIs look like so: * The `Func::wrap*` family of functions was condensed into one `Func::wrap` function. * The ABI layer of conversions in `WasmTy` were removed * An optional `Caller<'_>` argument can be at the front of all host-defined functions now. The old way the wasi bindings looked up memory has been removed and is now replaced with the `Caller` type. The `Caller` type has a `get_export` method on it which allows looking up a caller's export by name, allowing you to get access to the caller's memory easily, and even during instantiation.
alexcrichton
force-pushed
the
rewrite-func
branch
from
March 18, 2020 21:09
f9c96f0
to
063ddb0
Compare
Ok, updated! |
sunfishcode
approved these changes
Mar 18, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
wasi
Issues pertaining to WASI
wasmtime:api
Related to the API of the `wasmtime` crate itself
wasmtime:docs
Issues related to Wasmtime's documentation
wasmtime
Issues about wasmtime that don't fall into another label
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This commit is a continuation of #1237 and updates the API of
Func
toallow defining host functions which have easy access to a caller's
memory in particular. The new APIs look like so:
Func::wrap*
family of functions was condensed into oneFunc::wrap
function.WasmTy
were removedCaller<'_>
argument can be at the front of allhost-defined functions now.
The old way the wasi bindings looked up memory has been removed and is
now replaced with the
Caller
type. TheCaller
type has aget_export
method on it which allows looking up a caller's export byname, allowing you to get access to the caller's memory easily, and even
during instantiation.