You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(nfc): require backend feature; rename to nfc-backend-{pcsc,libnfc} (#193)
Stacked on top of #186.
## Summary
- Fix build failure when only the `nfc` umbrella feature is enabled (no
backend).
- Gate `transport::nfc` on `any(nfc-backend-pcsc, nfc-backend-libnfc)`
so the broken code never compiles in the bad combo.
- Emit a single clear `compile_error!` from `lib.rs` instead of three
cascade errors out of `transport/nfc/device.rs`.
- Rename backend features to `nfc-backend-pcsc` and `nfc-backend-libnfc`
to make the umbrella relationship explicit.
- Restructure the example list in the top-level README into a transport
× protocol table.
- NFC cells show both backend variants (`nfc-backend-pcsc`,
`nfc-backend-libnfc`).
- Extend CI with per-backend coverage so this can't regress.
- Build `libwebauthn` with only `nfc-backend-pcsc` enabled.
- Build `libwebauthn` with only `nfc-backend-libnfc` enabled.
## Build matrix verified locally
| Command | Behavior |
| ------------------------------------------- |
--------------------------------------- |
| `cargo build` (no features) | Builds; NFC examples auto-skipped. |
| `cargo build --features nfc` | Single clear `compile_error!`. |
| `cargo build --features nfc-backend-pcsc` | Builds NFC examples. |
| `cargo build --features nfc-backend-libnfc` | Checks pass (link needs
`libnfc`). |
## Test plan
- [x] `cargo build` (default features) succeeds, NFC examples skipped.
- [x] `cargo build --features nfc` produces a single `compile_error!`
with the helpful message.
- [x] `cargo build --example webauthn_nfc --features nfc-backend-pcsc`
builds.
- [x] On a CI/dev machine with `libnfc` installed, `--features
nfc-backend-libnfc` links successfully.
- [x] New CI steps run green on this PR.
|**USB (HID)**|`cargo run --example u2f_hid`|`cargo run --example webauthn_hid`<br>`cargo run --example webauthn_json_hid`|
67
+
|**Bluetooth (BLE)**|`cargo run --example u2f_ble`| — |
68
+
|**NFC**[^nfc]|`cargo run --features nfc-backend-pcsc --example u2f_nfc`<br>`cargo run --features nfc-backend-libnfc --example u2f_nfc`|`cargo run --features nfc-backend-pcsc --example webauthn_nfc`<br>`cargo run --features nfc-backend-libnfc --example webauthn_nfc`|
69
+
|**Hybrid (caBLE v2)**| — |`cargo run --example webauthn_cable`|
70
+
71
+
[^nfc]: `nfc-backend-pcsc` is pure userspace and recommended on most systems. `nfc-backend-libnfc` requires the `libnfc` system library. Both can be enabled together; the first FIDO device found by either backend is used.
72
+
73
+
Additional HID-only examples cover specific FIDO2 features and authenticator management:
0 commit comments