Skip to content

Add WebAssembly (WASM) support#847

Open
sanks011 wants to merge 3 commits intoXAMPPRocky:mainfrom
sanks011:wasm-support
Open

Add WebAssembly (WASM) support#847
sanks011 wants to merge 3 commits intoXAMPPRocky:mainfrom
sanks011:wasm-support

Conversation

@sanks011
Copy link

This commit adds comprehensive WASM support to octocrab, enabling its use in browser-based applications with frameworks like Yew, Leptos, and Dioxus.

Changes:

  • Add new wasm module with ReqwestTowerService for WASM compatibility
  • Implement wasm_builder() function for easy WASM initialization
  • Add conditional WASM dependencies (wasm-bindgen-futures, reqwest, thiserror)
  • Create wasm_example.rs demonstrating WASM usage
  • Update README.md with WASM usage documentation
  • Update CHANGELOG.md with new feature

Fixes #224

This commit adds comprehensive WASM support to octocrab, enabling its use in
browser-based applications with frameworks like Yew, Leptos, and Dioxus.

Changes:
- Add new wasm module with ReqwestTowerService for WASM compatibility
- Implement wasm_builder() function for easy WASM initialization
- Add conditional WASM dependencies (wasm-bindgen-futures, reqwest, thiserror)
- Create wasm_example.rs demonstrating WASM usage
- Update README.md with WASM usage documentation
- Update CHANGELOG.md with new feature

Fixes XAMPPRocky#224
- Add missing error variants (InvalidUriParts, ChannelCanceled) to ReqwestTowerError
- Add conditional compilation for unused imports in non-default-client builds
- Fix formatting to match project style guidelines
- Fix import ordering (alphabetical)
- Fix function signature formatting
- Remove trailing whitespace
- Simplify method chains per rustfmt guidelines
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Octocrab doesn't compile with Yew (for me)

1 participant