Skip to content

Wrap wasm-bindgen CLI #330

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

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft

Wrap wasm-bindgen CLI #330

wants to merge 6 commits into from

Conversation

dani-garcia
Copy link
Member

@dani-garcia dani-garcia commented Jun 25, 2025

🎟️ Tracking

📔 Objective

Previously devs would need to install a version of wasm-bindgen-cli that matches with the version of wasm-bindgen used by the project. This step produces significant friction, specially when wasm-bindgen gets updated, as we need to deal with updating the CI files, and every dev needs to update their environment. It also introduces another avenue for builds to be non-reproducible.

This PR tries to do something similar to what uniffi does, in that we have a simple wrapper crate around the utility. This means that the crate gets versioned in the Cargo.lock like every other dependency.

While I was at it, I've also updated the renovate config to group all the wasm-bindgen crates together, and I've also included a small TS formatting error that was reported in #319. The reason we never saw it is that we always run prettier after, which gets rid of the extra semicolon.

Fixes #319.

⏰ Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) or informed the documentation
    team

🦮 Reviewer guidelines

  • 👍 (:+1:) or similar for great changes
  • 📝 (:memo:) or ℹ️ (:information_source:) for notes or general info
  • ❓ (:question:) for questions
  • 🤔 (:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed
    issue and could potentially benefit from discussion
  • 🎨 (:art:) for suggestions / improvements
  • ❌ (:x:) or ⚠️ (:warning:) for more significant problems or concerns needing attention
  • 🌱 (:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt
  • ⛏ (:pick:) for minor or nitpick changes

@dani-garcia dani-garcia requested a review from coroiu June 25, 2025 20:00
# Conflicts:
#	crates/bitwarden-wasm-internal/Cargo.toml

This comment was marked as resolved.

This comment was marked as resolved.

@dani-garcia dani-garcia marked this pull request as ready for review June 25, 2025 20:33
@dani-garcia dani-garcia requested a review from a team as a code owner June 25, 2025 20:33
@dani-garcia dani-garcia requested review from justindbaur and removed request for coroiu June 27, 2025 10:13
Copy link

@dani-garcia dani-garcia marked this pull request as draft June 27, 2025 10:34
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.

wasm-bindgen-cli should be in Cargo.lock file, not downloaded separately — the current setup makes reproducible OSS builds impossible
1 participant