forked from tetratelabs/wazero
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added CallFunctionContext to pass a context.Context through to host c…
…alls Signed-off-by: Phil Kedy <[email protected]>
- Loading branch information
Showing
5 changed files
with
50 additions
and
14 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,15 @@ | ||
package wasm | ||
|
||
import "context" | ||
|
||
// Engine is the interface implemented by interpreters. | ||
type Engine interface { | ||
// Call invokes a function instance f with given parameters. | ||
// Returns the results from the function. | ||
Call(f *FunctionInstance, params ...uint64) (results []uint64, err error) | ||
// CallContext invokes a function instance f with given parameters. | ||
// Returns the results from the function. | ||
CallContext(ctx context.Context, f *FunctionInstance, params ...uint64) (results []uint64, err error) | ||
// Compile compiles down the function instance. | ||
Compile(f *FunctionInstance) error | ||
} |
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
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
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
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