-
Notifications
You must be signed in to change notification settings - Fork 823
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
616: runtime-c-api: create the import object separately from instance instantiation r=bjfish a=YaronWittenstein Creating an `import object` separately from the `wasmer` instance, let's us build the import object incrementally and support the use-case of having import functions (a.k.a `vmcalls`) implemented in 2 programming languages (Rust and Golang for example) and consumed by the same `wasmer` instance. Co-authored-by: Yaron Wittenstein <yaron.wittenstein@gmail.com> Co-authored-by: Brandon Fish <bjfish@users.noreply.github.com>
- Loading branch information
Showing
11 changed files
with
364 additions
and
18 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,3 +24,4 @@ test-module-serialize | |
test-tables | ||
test-validate | ||
test-context | ||
test-module-import-instantiate |
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
Binary file not shown.
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,7 +1,12 @@ | ||
(module | ||
(func $inc (import "env" "inc")) | ||
(func $mul (import "env" "mul")) | ||
(func $get (import "env" "get") (result i32)) | ||
|
||
(func (export "inc_and_get") (result i32) | ||
call $inc | ||
call $get) | ||
|
||
(func (export "mul_and_get") (result i32) | ||
call $mul | ||
call $get)) |
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
Oops, something went wrong.