Skip to content

Commit

Permalink
wasmtime: Document support for {extern,func}ref in Func::wrap
Browse files Browse the repository at this point in the history
  • Loading branch information
fitzgen committed Jul 7, 2020
1 parent 392bbad commit 62655cd
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions crates/wasmtime/src/func.rs
Original file line number Diff line number Diff line change
Expand Up @@ -341,16 +341,17 @@ impl Func {
/// function being called is known statically so the type signature can
/// be inferred. Rust types will map to WebAssembly types as follows:
///
/// | Rust Argument Type | WebAssembly Type |
/// |--------------------|------------------|
/// | `i32` | `i32` |
/// | `u32` | `i32` |
/// | `i64` | `i64` |
/// | `u64` | `i64` |
/// | `f32` | `f32` |
/// | `f64` | `f64` |
/// | (not supported) | `v128` |
/// | (not supported) | `externref` |
/// | Rust Argument Type | WebAssembly Type |
/// |---------------------|------------------|
/// | `i32` | `i32` |
/// | `u32` | `i32` |
/// | `i64` | `i64` |
/// | `u64` | `i64` |
/// | `f32` | `f32` |
/// | `f64` | `f64` |
/// | (not supported) | `v128` |
/// | `Option<Func>` | `funcref` |
/// | `Option<ExternRef>` | `externref` |
///
/// Any of the Rust types can be returned from the closure as well, in
/// addition to some extra types
Expand Down

0 comments on commit 62655cd

Please sign in to comment.