Crate wit_bindgen

Source
Expand description

Bindings generation support for Rust with the Component Model.

This crate is a bindings generator for WIT and the Component Model. Users are likely interested in the generate! macro which actually generates bindings. Otherwise this crate provides any runtime support necessary for the macro-generated code.

Modules§

examples
Examples of output of the generate! macro.

Macros§

generate
Generate bindings for an input WIT document.

Structs§

AbiBuffer
A helper structure used with a stream to handle the canonical ABI representation of lists and track partial writes.
FutureRead
Represents a read operation which may be cancelled prior to completion.
FutureReader
Represents the readable end of a Component Model future.
FutureWrite
Represents a write operation which may be cancelled prior to completion.
FutureWriteError
Error type in the result of FutureWrite, or the error type that is a result of a failure to write a future.
FutureWriter
Represents the writable end of a Component Model future.
StreamRead
Represents a read operation which may be cancelled prior to completion.
StreamReader
Represents the readable end of a Component Model stream.
StreamWrite
Represents a write operation which may be cancelled prior to completion.
StreamWriter
Represents the writable end of a Component Model stream.

Enums§

FutureWriteCancel
Result of FutureWrite::cancel.
StreamResult
Result of a StreamWriter::write or StreamReader::read operation, yielded by the StreamWrite or StreamRead futures.

Functions§

backpressure_set
Call the backpressure.set canonical built-in function.
block_on
Run the specified future to completion, returning the result.
spawn
Defer the specified future to be run after the current async-lifted export task has returned a value.
yield_async
The asynchronous counterpart to yield_blocking.
yield_blocking
Call the yield canonical built-in function.