- Introduction
- 1. Examples
- 1.1. Hello, World!
- 1.2. Using console.log
- 1.3. Small Wasm files
- 1.4. Without a Bundler
- 1.5. Synchronous Instantiation
- 1.6. Importing functions from JS
- 1.7. Working with char
- 1.8. js-sys: WebAssembly in WebAssembly
- 1.9. web-sys: DOM hello world
- 1.10. web-sys: Closures
- 1.11. web-sys: performance.now
- 1.12. web-sys: using fetch
- 1.13. web-sys: Weather report
- 1.14. web-sys: canvas hello world
- 1.15. web-sys: canvas Julia set
- 1.16. web-sys: WebAudio
- 1.17. web-sys: WebGL
- 1.18. web-sys: WebSockets
- 1.19. web-sys: WebRTC DataChannel
- 1.20. web-sys: requestAnimationFrame
- 1.21. web-sys: A Simple Paint Program
- 1.22. web-sys: Wasm in Web Worker
- 1.23. Parallel Raytracing
- 1.24. Wasm Audio Worklet
- 1.25. web-sys: A TODO MVC App
- 2. Reference
- 2.1. Working with Generics
- 2.2. Deployment
- 2.3. Community Projects
- 2.4. JS snippets
- 2.5. Static JS Objects
- 2.6. Passing Rust Closures to JS
- 2.7. Receiving JS Closures in Rust
- 2.8. Promises and Futures
- 2.9. Iterating over JS Values
- 2.10. Arbitrary Data with Serde
- 2.11. Accessing Properties of Untyped JS Values
- 2.12. Working with Duck-Typed Interfaces
- 2.13. Command Line Interface
- 2.14. Optimizing for Size
- 2.15. Debug information
- 2.16. Supported Rust Targets
- 2.17. Supported Browsers
- 2.18. Support for Weak References
- 2.19. Support for Reference Types
- 2.20. Catching Panics
- 2.21. Handling Aborts
- 2.22. Supported Types
- 2.22.1. Imported JavaScript Types
- 2.22.2. Exported Rust Types
- 2.22.3. JsValue
- 2.22.4. js-sys
- 2.22.5. Box<[T]> and Vec<T>
- 2.22.6. *const T and *mut T
- 2.22.7. NonNull<T>
- 2.22.8. Numbers
- 2.22.9. bool
- 2.22.10. char
- 2.22.11. str
- 2.22.12. String
- 2.22.13. Number Slices
- 2.22.14. Boxed Number Slices
- 2.22.15. Result<T, E>
- 2.23. #[wasm_bindgen] Attributes
- 2.23.1. On JavaScript Imports
- 2.23.1.1. catch
- 2.23.1.2. constructor
- 2.23.1.3. extends
- 2.23.1.4. getter and setter
- 2.23.1.5. final
- 2.23.1.6. indexing_getter, indexing_setter, and indexing_deleter
- 2.23.1.7. js_class = "Blah"
- 2.23.1.8. js_name
- 2.23.1.9. js_namespace
- 2.23.1.10. method
- 2.23.1.11. module = "blah"
- 2.23.1.12. raw_module = "blah"
- 2.23.1.13. no_deref
- 2.23.1.14. no_upcast
- 2.23.1.15. no_promising
- 2.23.1.16. reexport
- 2.23.1.17. static_method_of = Blah
- 2.23.1.18. structural
- 2.23.1.19. typescript_type
- 2.23.1.20. variadic
- 2.23.1.21. vendor_prefix
- 2.23.2. On Rust Exports
- 2.23.2.1. constructor
- 2.23.2.2. js_name = Blah
- 2.23.2.3. js_namespace
- 2.23.2.4. js_class = Blah
- 2.23.2.5. readonly
- 2.23.2.6. skip
- 2.23.2.7. skip_jsdoc
- 2.23.2.8. start
- 2.23.2.9. main
- 2.23.2.10. this
- 2.23.2.11. typescript_custom_section
- 2.23.2.12. getter and setter
- 2.23.2.13. inspectable
- 2.23.2.14. skip_typescript
- 2.23.2.15. getter_with_clone
- 2.23.2.16. private
- 2.23.2.17. unchecked_return_type, unchecked_param_type, and unchecked_optional_param_type
- 2.23.2.18. return_description and param_description
- 3. web-sys
- 3.1. Using web-sys
- 3.2. Cargo Features
- 3.3. Function Overloads
- 3.4. Type Translations
- 3.5. Inheritance
- 3.6. Unstable APIs
- 4. Testing with wasm-bindgen-test
- 4.1. Usage
- 4.2. Writing Asynchronous Tests
- 4.3. Testing in Headless Browsers
- 4.4. Continuous Integration
- 4.5. Coverage (Experimental)
- 4.6. Benchmark
- 5. Contributing to wasm-bindgen
- 5.1. Testing
- 5.2. Internal Design
- 5.2.1. JS Objects in Rust
- 5.2.2. Exporting a function to JS
- 5.2.3. Exporting a struct to JS
- 5.2.4. Importing a function from JS
- 5.2.5. Importing a class from JS
- 5.2.6. Rust Type conversions
- 5.2.7. Types in wasm-bindgen
- 5.3. js-sys
- 5.3.1. Testing
- 5.3.2. Adding More APIs
- 5.4. web-sys
- 5.4.1. Overview
- 5.4.2. Testing
- 5.4.3. Logging
- 5.4.4. Supporting More Web APIs
- 5.5. Publishing
- 5.6. Governance
- 5.7. Team