Skip to content

Commit 414eddb

Browse files
committed
add docs for new debug and async Rust macro options
Signed-off-by: Joel Dice <joel.dice@fermyon.com>
1 parent ac21e8f commit 414eddb

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

crates/guest-rust/src/lib.rs

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -818,6 +818,32 @@
818818
/// // used in library-like situations. This is `false` by default with
819819
/// // `#[used]` statics being emitted.
820820
/// disable_custom_section_link_helpers: false,
821+
///
822+
/// // Write generated code to a .rs file, which allows the compiler to
823+
/// // emit more useful diagnostics for errors in the generated code. This
824+
/// // is primarily useful for `wit-bindgen` developers.
825+
/// //
826+
/// // This does the same thing as setting `WIT_BINDGEN_DEBUG=1`, except
827+
/// // that it can be used on a more fine-grained basis (i.e. it only affects
828+
/// // the specific `generate!` call where it is used.
829+
/// debug: true,
830+
///
831+
/// // Generate async import and/or export bindings.
832+
/// //
833+
/// // The resulting bindings will use the component model
834+
/// // [async ABI](https://github.com/WebAssembly/component-model/blob/main/design/mvp/Async.md).
835+
/// // This may be specified either as a boolean (e.g. `async: true`, meaning
836+
/// // all imports and exports should use the async ABI) or as lists of
837+
/// // specific imports and/or exports as shown here:
838+
/// async: {
839+
/// imports: [
840+
/// "wasi:http/types@0.3.0-draft#[static]body.finish",
841+
/// "wasi:http/handler@0.3.0-draft#handle",
842+
/// ],
843+
/// exports: [
844+
/// "wasi:http/handler@0.3.0-draft#handle",
845+
/// ]
846+
/// }
821847
/// });
822848
/// ```
823849
///

0 commit comments

Comments
 (0)