28 Commits
Author SHA1 Message Date
Robin Krahl 3e9e218f55 Release v0.4.1
This patch also removes the bytes-from-array feature:  We originally
added it to the fork so that a wrong patched version would cause a
compiler error.  Now we can just bump the required minimum version
instead.
0.4.1
2024-10-08 15:48:14 +02:00
Robin Krahl 797f45de03 Revert "Never inline map value deserialization"
This reverts commit 6b3ce6928e.

The change has been superseded by
https://github.com/Nitrokey/cbor-smol/pull/4 =
https://github.com/trussed-dev/cbor-smol/pull/15 so it was unnecessary
to port it to upstream in
https://github.com/trussed-dev/cbor-smol/pull/16.
2024-10-07 19:45:38 +02:00
Robin Krahlandsosthene-nitrokey 2ba6ee356e Handle bytes identifier as UTF-8 strings
Previously, we visited either strings or bytes so that the visitor had
to handle both cases.  With this change, we always visit strings so that
the bytes visitor function can be optimized out. This significantly
reduces binary size.
2024-10-07 13:48:37 +02:00
Sosthène Guédonandsosthene-nitrokey c48b2b29df deserialize_identifier: add support for all types expected by serde
The default serde deserialize derive accepts 3 types for identifiers:

- The name of the field as `str`
- The name of the field as ascii bytes
- The index of the field as u64

This PR changes deserialize_identifier to have compatibility with all of these
This is necessary for https://github.com/Nitrokey/fido-authenticator/issues/57,
which needs compatibility with both the str variant and the index variant
2024-10-07 13:48:37 +02:00
Robin Krahl 6b3ce6928e Never inline map value deserialization
Inlining it means that the deserialization of basic datatypes is inlined
into all deserialization functions, leading to a significant overhead.
2024-10-07 13:20:53 +02:00
Robin Krahlandsosthene-nitrokey 6e243dd703 Never inline map and tuple deserialization 2024-10-07 10:24:44 +02:00
Sosthène Guédonandsosthene-nitrokey da58de381d Add feature for deserializing bytes from an array 2024-10-02 12:04:54 +02:00
Sosthène Guédonandsosthene-nitrokey cbd34a5616 deserialize_bytes: accept arrays 2024-10-02 12:04:54 +02:00
Sosthène Guédonandsosthene-nitrokey 336941c342 Use constants in match statement 2024-10-02 12:04:03 +02:00
Sosthène Guédonandsosthene-nitrokey 620f8c0c61 Fuzz added support for i64 and fix crash in fuzzing 2024-10-02 12:04:03 +02:00
Sosthène Guédonandsosthene-nitrokey 0326d75fee Implement deserializing ignored_any 2024-10-02 12:04:03 +02:00
Sosthène Guédonandsosthene-nitrokey 5d9247c34b Add ?Sized trait bound
Fix #9
2024-10-02 10:34:17 +02:00
Sosthène Guédonandsosthene-nitrokey f1774814ca Fix deserialization of u64 2024-09-13 17:18:40 +02:00
Sosthène Guédonandsosthene-nitrokey 538a6f147f Fix enum struct variant deserialization 2024-09-13 17:18:40 +02:00
Sosthène Guédonandsosthene-nitrokey 4a8ef46d19 Improve readability with consts 2024-09-13 17:18:40 +02:00
Sosthène Guédonandsosthene-nitrokey 812cbb8f5d Migrate to edition 2021 2024-09-13 17:18:40 +02:00
Sosthène Guédonandsosthene-nitrokey b9c1b9a80c Fix clippy warnings 2024-09-13 17:18:40 +02:00
Sosthène Guédonandsosthene-nitrokey c75337e658 Add basic fuzzing 2024-09-13 17:18:40 +02:00
Sosthène Guédonandsosthene-nitrokey baf84e4811 Fix enum struct variant deserialization bug 2024-09-13 17:18:40 +02:00
Sosthène Guédonandsosthene-nitrokey acf5a84acc Run cargo fmt 2024-09-13 17:18:40 +02:00
Nicolas Stalder 899b74f352 Bump heapless, no more generic-array 0.4.0 2021-06-10 22:56:15 +02:00
Nicolas StalderandNicolas Stalder 71b72fd6fc Release v0.3.1 0.3.1 2021-04-13 22:10:47 +02:00
Nicolas StalderandNicolas Stalder 4d55f665aa PRs can't publish the docs 2021-03-19 01:29:02 +01:00
Conor PatrickandNicolas Stalder f598fc123c add logging features 2021-03-19 01:21:09 +01:00
Nicolas Stalder fe1541c663 Change names of high-level serialization methods to heapless_bytes::Bytes 2021-03-06 13:20:16 +01:00