Skip to content

Conversation

@maxwase
Copy link
Owner

@maxwase maxwase commented Nov 16, 2025

No description provided.

Copy link

Copilot AI left a 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 JsInstant into a nested instant::wasm::Instant module for better organization
  • Removed std requirement from the wasm feature, enabling no_std wasm 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.

@maxwase maxwase merged commit 8729e57 into master Nov 16, 2025
1 check passed
@maxwase maxwase deleted the wasm-support branch November 16, 2025 16:46
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.

2 participants