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

Better Wasmtime API for embedder #287

Merged
merged 4 commits into from
Aug 21, 2019

Conversation

yurydelendik
Copy link
Contributor

@yurydelendik yurydelendik commented Aug 20, 2019

Trying to address:

  • Simplify and reduce amount of boiler plate code for simple wasmtime embedding
  • Use somewhat standard WebAssembly API for embedding

There is the work happening to create wasm-c-api. The prototyping in happening in C++, though the goal is to make it in C. This PR translates existing C++ classes into Rust, and provides simple C stubs to be used from C code (see "c-examples" folder)

As example, there is "example/gcd.rs" that shows how to use the Rust API. The wasmtime was updated as well to use this API. This PR implements basic functionality needed to run the wasmtime, and requires future work (e.g. trap, tables, etc).

@yurydelendik yurydelendik marked this pull request as ready for review August 20, 2019 21:43
@sunfishcode
Copy link
Member

LGTM!

@sunfishcode sunfishcode merged commit ca79149 into bytecodealliance:master Aug 21, 2019
sunfishcode pushed a commit that referenced this pull request Aug 21, 2019
* Migrate wasm-rust-api code to wasmtime.
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