Commit 00c854d
authored
[PM-27740] Wrap wasm-bindgen CLI (#330)
## 🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-27740
## 📔 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](https://github.com/bitwarden/sdk-internal/tree/main/crates/uniffi-bindgen)
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
<!-- Suggested interactions but feel free to use (or not) as you desire!
-->
- 👍 (`:+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 1 parent 32a8d8a commit 00c854d
File tree
15 files changed
+444
-27
lines changed- .cargo
- .github
- workflows
- crates
- bitwarden-error-macro/src
- basic
- flat
- bitwarden-threading/.cargo
- bitwarden-wasm-internal
- wasm-bindgen-cli-runner
15 files changed
+444
-27
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
24 | 29 | | |
25 | 30 | | |
26 | 31 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
12 | 14 | | |
13 | 15 | | |
14 | 16 | | |
| |||
91 | 93 | | |
92 | 94 | | |
93 | 95 | | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | 96 | | |
98 | 97 | | |
99 | 98 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | 80 | | |
84 | 81 | | |
85 | 82 | | |
| |||
0 commit comments