From 62655cdbe72c78dab219bb45d4a32c1f73ca9f92 Mon Sep 17 00:00:00 2001 From: Nick Fitzgerald Date: Tue, 7 Jul 2020 13:52:14 -0700 Subject: [PATCH] wasmtime: Document support for `{extern,func}ref` in `Func::wrap` --- crates/wasmtime/src/func.rs | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/crates/wasmtime/src/func.rs b/crates/wasmtime/src/func.rs index 865c7025aee6..660a9e84a233 100644 --- a/crates/wasmtime/src/func.rs +++ b/crates/wasmtime/src/func.rs @@ -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` | `funcref` | + /// | `Option` | `externref` | /// /// Any of the Rust types can be returned from the closure as well, in /// addition to some extra types