From 2ea9247391be9c5a3e78d6d60d930c4c3baf4f28 Mon Sep 17 00:00:00 2001 From: Pat Hickey Date: Tue, 15 Nov 2022 16:47:12 -0800 Subject: [PATCH] mention in macro docs --- crates/wiggle/macro/src/lib.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crates/wiggle/macro/src/lib.rs b/crates/wiggle/macro/src/lib.rs index 1b5cfb9d6f2a..9ea2cf104857 100644 --- a/crates/wiggle/macro/src/lib.rs +++ b/crates/wiggle/macro/src/lib.rs @@ -39,6 +39,10 @@ use syn::parse_macro_input; /// `{ errno => YourErrnoType }`. This allows you to use the `UserErrorConversion` /// trait to map these rich errors into the flat witx type, or to terminate /// WebAssembly execution by trapping. +/// * Instead of requiring the user to define an error type, wiggle can +/// generate an error type for the user which has conversions to/from +/// the base type, and permits trapping, using the syntax +/// `errno => trappable AnErrorType`. /// * Optional: `async` takes a set of witx modules and functions which are /// made Rust `async` functions in the module trait. ///