wasmer/lib/runtime-core
bors[bot] 0790ebff0c
Merge #803
803: Add method to call function at index on Ctx r=MarkMcCaskey a=MarkMcCaskey

For #638 and #670

```Rust
fn call_guest_fn(ctx: &mut Ctx, guest_fn: u32) -> u32 {
    println!("{}", guest_fn);

    let guest_fn_typed = unsafe { std::mem::transmute(guest_fn) };

    let result = ctx.call_with_table_index(guest_fn_typed, &[]).unwrap();
    println!("  -> {:?}", result);

    0
}
```
is what this looks like from the Host side

See `examples/callback.rs` for an example that doesn't require `transmute`


# Review

- [x] Create a short description of the the change in the CHANGELOG.md file


Co-authored-by: Mark McCaskey <mark@wasmer.io>
Co-authored-by: Mark McCaskey <markmccaskey@users.noreply.github.com>
2019-09-19 20:55:09 +00:00
..
src Merge #803 2019-09-19 20:55:09 +00:00
build.rs Improved docs with custom logo and favicon 2019-09-03 17:06:31 -07:00
Cargo.toml Remove colored CLI output from runtime-core lib. 2019-09-15 03:21:04 +02:00
image-loading-linux-x86-64.s register_preservation_trampoline 2019-08-15 19:08:11 -07:00
image-loading-macos-x86-64.s register_preservation_trampoline 2019-08-15 19:08:11 -07:00
README.md doc(lib) Add basic README.md. 2019-03-29 10:17:24 +01:00

Wasmer logo

Build Status License Join the Wasmer Community Number of downloads from crates.io Read our API documentation

Wasmer Runtime Core

Wasmer is a standalone JIT WebAssembly runtime, aiming to be fully compatible with Emscripten, Rust and Go. Learn more.

This crate represents the core of the runtime.