Skip to content
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

runtime-c-api: create the import object separately from instance instantiation #616

Merged
merged 9 commits into from
Aug 2, 2019

Conversation

YaronWittenstein
Copy link
Contributor

@YaronWittenstein YaronWittenstein commented Aug 1, 2019

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.

* import.rs - adding `import_object_t` and `wasmer_import_object_destroy`
* instance.rs - adding `wasmer_module_import_instantiate`
* adding `wasmer_import_object_new` and `wasmer_import_object_extend`
* adding test file `test-module-import-instantiate.c`
@YaronWittenstein YaronWittenstein marked this pull request as ready for review August 1, 2019 15:52
@bjfish
Copy link
Contributor

bjfish commented Aug 1, 2019

bors try

bors bot added a commit that referenced this pull request Aug 1, 2019
@bjfish
Copy link
Contributor

bjfish commented Aug 2, 2019

LGTM
bors r+

bors bot added a commit that referenced this pull request Aug 2, 2019
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>
@bors bors bot merged commit 2a5aaee into wasmerio:master Aug 2, 2019
@YaronWittenstein YaronWittenstein deleted the c-api-import_object_t branch August 2, 2019 20:21
YaronWittenstein added a commit to spacemeshos/svm that referenced this pull request Aug 4, 2019
* using the new wasmer `wasmer_module_import_instantiate` instead of `wasmer_svm_module_instantiate`.
* using `wasmer_import_object_extend`
* removed `src/import.rs` (code is has moved to `wasmer-c-api`)

see PR: wasmerio/wasmer#616
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants