Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Supported Rust Types and their JavaScript Representations

This section provides an overview of all the types that wasm-bindgen can send and receive across the WebAssembly ABI boundary, and how they translate into JavaScript.

Many core JavaScript types support generic type parameters using type erasure, allowing you to work with typed collections like Array<T>, Promise<T>, Map<K, V>, and more.