-
Notifications
You must be signed in to change notification settings - Fork 4
Wasm support #23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wasm support #23
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds WebAssembly (wasm) support to the button-driver crate by refactoring the JavaScript-based instant provider and removing the std dependency requirement for wasm targets.
- Refactored
JsInstantinto a nestedinstant::wasm::Instantmodule for better organization - Removed
stdrequirement from thewasmfeature, enablingno_stdwasm usage - Updated the wasm example to use the new module path
- Consolidated CI clippy checks for improved workflow efficiency
Reviewed Changes
Copilot reviewed 7 out of 10 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/lib.rs | Removed obsolete public export of JsInstant |
| src/instant.rs | Moved wasm instant provider into wasm module and renamed type from JsInstant to Instant |
| examples/wasm/src/lib.rs | Updated to use new instant::wasm::Instant path and added formatting improvements |
| examples/wasm/Cargo.lock | Updated dependency versions (wasm-bindgen, js-sys, etc.) |
| examples/stm32/Cargo.lock | Updated button-driver version to 0.2.4 and other dependency versions |
| examples/stm32-embassy/Cargo.lock | Updated button-driver version to 0.2.4 and other dependency versions |
| README.md | Added wasm to list of supported targets and updated example instructions |
| Cargo.toml | Bumped version to 0.2.5, removed std requirement from wasm feature, added default-features = false to js-sys, expanded docs.rs features |
| .vscode/settings.json | Added multiple features to rust-analyzer configuration |
| .github/workflows/rust.yml | Consolidated clippy checks into fewer steps, removed --release flag from wasm build |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
d5f9fd8 to
c57ff4f
Compare
No description provided.