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

feat(runtime-c-api) Implement the wasmer_export_to_memory function #296

Merged
merged 4 commits into from
Mar 27, 2019

Conversation

Hywan
Copy link
Contributor

@Hywan Hywan commented Mar 27, 2019

This new function returns a wasmer_memory_t from a wasmer_export_t. It allows to use the wasmer_memory_* API over the exported memories from a Wasm instance.

See tests/assets/return_hello.rs and tests/test-exported-memory.c for an end-to-end example.

This PR also moves all tests/.wasm files into tests/assets/. I've added the source of return_hello.wasm to be exhaustive and to serve as a documentation.

@Hywan Hywan added 🎉 enhancement New feature! 📦 lib-c-api About wasmer-c-api 🧪 tests I love tests labels Mar 27, 2019
@Hywan Hywan self-assigned this Mar 27, 2019
@Hywan Hywan requested a review from bjfish March 27, 2019 09:56
@Hywan
Copy link
Contributor Author

Hywan commented Mar 27, 2019

bors r+

bors bot added a commit that referenced this pull request Mar 27, 2019
296: feat(runtime-c-api) Implement the `wasmer_export_to_memory` function r=Hywan a=Hywan

This new function returns a `wasmer_memory_t` from a `wasmer_export_t`. It allows to use the `wasmer_memory_*` API over the exported memories from a Wasm instance.

See `tests/assets/return_hello.rs` and `tests/test-exported-memory.c` for an end-to-end example.

This PR also moves all `tests/.wasm` files into `tests/assets/`. I've added the source of `return_hello.wasm` to be exhaustive and to serve as a documentation.

Co-authored-by: Ivan Enderlin <ivan.enderlin@hoa-project.net>
@bors
Copy link
Contributor

bors bot commented Mar 27, 2019

@bors bors bot merged commit a59ce13 into wasmerio:master Mar 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🎉 enhancement New feature! 📦 lib-c-api About wasmer-c-api 🧪 tests I love tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants