Commit a98b730
authored
chore(release): 0.3.1 with workspace split (#186)
## Motivation
Releasing 0.3.0 required a working-tree hack: the test harness depends
on `trussed-staging`, which isn't on crates.io and won't be published,
so its presence in the dev-deps blocked `cargo publish`. Each release
otherwise needs a manual dance to comment things out and revert.
Splitting the trussed-coupled test code into a non-published sibling
crate makes `cargo publish` clean and removes the recurring chore.
## Summary
Splits the repo into a Cargo workspace with two members:
- `libwebauthn` (publishable). Adds an opt-in `virt` feature that
exposes a small `HidPipeBackend` trait and a `virtual_device(backend)`
constructor. No trussed coupling in the published crate.
- `libwebauthn-tests` (`publish = false`). Owns the
trussed-staging-backed `TrussedVirtBackend` impl plus all integration
tests.
`cargo publish -p libwebauthn` now works without any working-tree hacks.
The workspace `[patch.crates-io]` keeps the trussed git pins for tests.
## Notable changes
- `cfg(test)` gates that integrated virt into production types in
`transport/hid/{device,channel}.rs`, `transport/{mod,channel}.rs` are
now `cfg(feature = "virt")`. Same for the `pin_protocol_override` hook
and the test-only `PartialEq` impls in `lib.rs`.
- `ctap2_preflight` is now `pub` so the preflight tests can run as
integration tests in libwebauthn-tests.
- The panic/unwrap deny lints in `lib.rs` are gated by `not(any(test,
feature = "virt"))` so the virt code path may use them.
- CI runs against the workspace (`cargo build --workspace`, `cargo test
--workspace`, etc.) and now also runs `cargo publish --dry-run -p
libwebauthn` as a check.
## Test plan
- [x] `cargo build -p libwebauthn` (no virt feature)
- [x] `cargo build -p libwebauthn --features virt`
- [x] `cargo build --workspace --all-targets --all-features`
- [x] `cargo fmt --all -- --check`
- [x] `cargo clippy --workspace --all-targets --all-features -- -D
warnings`
- [x] `cargo test --workspace` (134 tests pass)
- [x] `cargo publish --dry-run -p libwebauthn` (clean, no hacks)1 parent 1f05a58 commit a98b730
28 files changed
Lines changed: 1103 additions & 960 deletions
File tree
- .github/workflows
- libwebauthn-tests
- src
- virt
- data
- tests
- libwebauthn
- src
- proto/ctap2
- tests
- transport
- hid
- virt
- webauthn
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
47 | 48 | | |
48 | 49 | | |
49 | 50 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | 10 | | |
15 | 11 | | |
16 | 12 | | |
| |||
20 | 16 | | |
21 | 17 | | |
22 | 18 | | |
23 | | - | |
| 19 | + | |
24 | 20 | | |
25 | | - | |
| 21 | + | |
26 | 22 | | |
27 | | - | |
| 23 | + | |
28 | 24 | | |
29 | | - | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
0 commit comments