Incompatible with ciborium
- Dominant language
- Rust
- Stars
- 285
- Forks
- 9
- PR merge metrics
- No merged PRs in 30d
Description
`ciborium` is a serde-compatible de/ser-ializer for CBOR. It encodes integers as compressed as possible, and deserializes them all as large integers. I wanted to use `MustBeU8` with `ciborium`. Unfortunately, it looks like this library only allows `visit_u8` to succeed, while calling `deserialize_any`, so not even giving any advice (the readme of ciborium doesn't read as if that would make a difference though).
I wonder if it would be a good idea to implement `visit_u64` etc also and accept the value if it is equivalent to that of the u8? That would provide compatibility with ciborium. But I don't know if there is a specific reason why this isn't already done?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating MustBeU8's serde deserialization entry point and compare its visitor methods with ciborium's integer deserialization behavior. Confirm the intended handling of equivalent integer values, then add focused compatibility coverage and run the relevant test suite.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100