Skip to main content

Module wasm_compat

Module wasm_compat 

Source
Expand description

WASM compatibility shims.

On native targets, async code requires Send bounds to work across threads. On WASM (single-threaded), those bounds are unnecessary and will prevent compilation. These traits alias to the appropriate bound per target.

Always use WasmCompatSend and WasmCompatSync instead of raw Send/Sync in trait bounds throughout this crate.

Traits§

WasmCompatSend
WasmCompatSync

Type Aliases§

BoxFuture
A heap-allocated, type-erased future.