Commit Graph

169 Commits

Author SHA1 Message Date
Lena Hellström 7610408399 bump version to 2.0.1 (#760) 2025-03-10 18:27:15 +00:00
dependabot[bot] 2b5dbfc05c Update unty requirement from 0.0.3 to 0.0.4 (#753)
Updates the requirements on [unty](https://github.com/bincode-org/unty) to permit the latest version.
- [Commits](https://github.com/bincode-org/unty/compare/v0.0.3...v0.0.4)

---
updated-dependencies:
- dependency-name: unty
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-10 07:01:02 +01:00
Trangar bd694430e4 2.0.0 stable (#742)
Prepare for 2.0.0 stable release

---------

Co-authored-by: Zoey Riordan <zoey@dos.cafe>
2025-03-06 16:58:40 +00:00
Lena Hellström 2c87442fe6 Decode context (#749)
Add an optional context for decoding allowing additional data to be passed to decoded structs.

---------

Co-authored-by: branchseer <dk4rest@gmail.com>
2025-03-06 09:54:43 +00:00
dependabot[bot] 4e13a5cf8e Update glam requirement from 0.24 to 0.25 (#688)
Updates the requirements on [glam](https://github.com/bitshifter/glam-rs) to permit the latest version.
- [Changelog](https://github.com/bitshifter/glam-rs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/bitshifter/glam-rs/commits)

---
updated-dependencies:
- dependency-name: glam
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-21 15:49:11 +01:00
Trangar e03c9b06db Added unty dependency and added type checks (#667)
* Added unty dependency and added type checks

* Bumped unty 0.0.2

* Bump unty to 0.0.3

* Removed unneeded + Sized requirements
Optimize encode for [T; N]
Made BinaryHeap<T> proxy to Vec<T>
Made VecDeque decode/borrowdecode proxy to Vec<T>
Optimize VecDeque::<u8>::Encode to write 2 slices directly
Optimize Vec<u8> borrowdecode implementation

---------

Co-authored-by: Victor Koenders <git@trang.ar>
2023-09-28 17:32:11 +02:00
dependabot[bot] 602d5137bf Update criterion requirement from 0.4 to 0.5 (#641)
Updates the requirements on [criterion](https://github.com/bheisler/criterion.rs) to permit the latest version.
- [Changelog](https://github.com/bheisler/criterion.rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/bheisler/criterion.rs/compare/0.4.0...0.5.0)

---
updated-dependencies:
- dependency-name: criterion
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-24 08:44:21 +02:00
dependabot[bot] ad6cf2518a Update criterion requirement from 0.3 to 0.4 (#637) 2023-05-17 09:53:12 +00:00
dependabot[bot] 42dd409cd5 Update glam requirement from 0.21 to 0.24 (#640) 2023-05-17 09:23:46 +00:00
Trangar 958b439c38 Release rc.3 (#628)
Co-authored-by: Victor Koenders <victor.koenders@qrtech.se>
2023-03-30 16:12:47 +02:00
Trangar 9880abe499 Improved encoding and decoding speed of Vec<u8> (#619)
* Improved encoding and decoding speed of Vec<u8>

* Added black_box calls to benches/string.rs
Added a SizeWriter because someone finally has a benchmark to show it's faster

* Improved performance for `impl<T> Encode for [T]`

* Added #[inline] to `impl Encoder for EncoderImpl`

---------

Co-authored-by: Victor Koenders <victor.koenders@qrtech.se>
2023-03-30 11:45:47 +02:00
Trangar 00c5cb0ff0 Release 2.0.0-rc.2 (#588) 2022-10-04 13:27:43 +02:00
Trangar 922aba4b7a Updated test dependencies: uuid and glam (#576) 2022-08-18 16:23:56 +02:00
Lena Hellström f979383adb Fix tuple struct encoding in serde (#549) 2022-06-04 14:56:20 +02:00
Trangar e7d2292dc2 Switched to weak dependencies (#538)
* Switched to weak dependencies

* Removed old `serde_impl` references

* Fixed CI and updated documentation

* Fixed a cfg for a test

* Removed unneeded package in Cargo.toml
2022-05-21 14:19:13 +02:00
Sean Cross d7edfaa0b7 Fix riscv32 atomics and fix tests on 32-bit platforms (#533)
* tests: fix alloc range test on 32-bit Windows

This test checks the range, which is necessarily different when running
on another platform.

Signed-off-by: Sean Cross <sean@xobs.io>

* enc: case usize/isize as u64/i64 in serialization

The deserialization process assumes that usize/isize are 64-bits, as
does the spec at
https://github.com/bincode-org/bincode/blob/trunk/docs/spec.md#varintencoding

Force `usize` and `isize` to be encoded as `u64` and `i64` to force
32-bit platforms to conform to this spec.

This fixes running tests under `cargo test --target i686-pc-windows-msvc`

Signed-off-by: Sean Cross <sean@xobs.io>

* atomic: only provide Atomic*64 on supported platforms

Not all platforms support AtomicI64 or AtomicU64. Use the
`target_has_atomic` config flag to determine whether to include these.

This fixes #532.

Signed-off-by: Sean Cross <sean@xobs.io>

* atomic: remove feature and use new attributes

Now that there is an attribute to indicate which atomic features are
supported on this platform, remove the `atomic` Feature and use these
new attributes.

Signed-off-by: Sean Cross <sean@xobs.io>

* alloc: run `cargo fmt`

Signed-off-by: Sean Cross <sean@xobs.io>
2022-04-08 11:35:13 +02:00
Trangar fe611f77c0 Release 2.0.0-rc.1 (#510) 2022-03-04 11:05:38 +01:00
Trangar 7c72e4c1fa Release v2.0.0-beta.3 (#505) 2022-02-16 12:53:44 +01:00
Trangar 00eea110d7 Bincode 1 compatibility framework (#489)
* Added a basic compatibility test to compare bincode 1 and bincode 2 output

* Moved compatibility to the /compatibility/ crate, made bincode-derive support `#[bincode(crate = "bincode_2")]`

* Added decode/deserialize test to test_same

* Added random test cases to compatibility/src/sway.rs

* Added test for bincode_1::options().with_fixint_encoding() and bincode_2::config::legacy(). Added rand license

* Added comments on why the configs are chosen
2022-02-01 14:15:15 +01:00
Trangar 25dd4debc4 Release v2.0.0-beta.2 (#488) 2022-01-23 10:15:00 +01:00
Trangar 09e7a6265d Release v2.0.0-beta.1 (#484) 2022-01-19 19:11:35 +01:00
Trangar fc1f3acdcb Feature/improve serde (#477)
* Made serde able to be used with alloc and no_std targets

* Processed feedback
2022-01-19 18:14:21 +01:00
Trangar f3c21f2245 Made SerdeDecoder attempt to allocate a string before complaining about being able to decode borrowed data (#475) 2022-01-17 17:16:14 +01:00
Trangar a08e528cc7 Release v2.0.0-beta.0 (#464) 2022-01-08 15:42:49 +01:00
Trangar 45c0fa7782 Release v2.0.0-alpha.2 (#455) 2021-12-14 15:27:40 +01:00
Trangar 63f4607992 Feature/config limit (#439)
* Added Limit<N> and NoLimit to the configuration
* Added a limit check to Decoder and DecoderImpl
* Added test cases, added a helper function specialized for containers
* Added a test to see if inlining makes the limit config faster, added inlining to the decoder
2021-12-11 15:44:43 +01:00
Trangar c4fd7efa49 Release 2.0.0-alpha.1 (#435) 2021-11-09 10:15:12 +01:00
Trangar 8c1279feab functions to enable encoding/decoding serde types (#422)
* functions to enable encoding/decoding serde types
* Removed dev feature I forgot to remove
* Centralized option variant and len() decoding/encoding
2021-11-08 12:38:29 +01:00
Lena Hellström c6ba4ffc88 Update authors to reflect current code state (#418) 2021-10-25 10:39:58 +02:00
Victor Koenders 0be7e2f4f2 Updated to edition 2021 2021-10-21 17:34:56 +02:00
Victor Koenders dd7e8e8e43 Changed bincode version to 2.0.0-alpha.0 2021-10-21 13:39:45 +02:00
Victor Koenders 4b25114c59 Processed some of the feedback 2021-10-18 10:18:47 +02:00
Lena Hellström 83970d29cf Merge branch 'trunk' into feature/deserde 2021-10-17 21:54:26 +02:00
Victor Koenders 61c1e8a7cd Added badges to the functions to indicate which features they require 2021-10-17 15:00:14 +02:00
Victor Koenders 1f261cede3 Added support for atomic integers 2021-10-16 14:49:18 +02:00
Victor Koenders c969622384 Added alloc and std tests 2021-10-12 16:13:21 +02:00
Trangar a27b63b7fa Make bincode_derive 0 dependencies (#409)
Removed `syn`, `quote` and `proc_macro2` dependency
2021-10-12 15:53:02 +02:00
Lena Hellström e1aed75f14 Update logo (#407) 2021-10-07 14:25:53 +02:00
Victor Koenders 254b87c6eb Moved all feature flags to src/features, made the CI run tests on all feature combinations 2021-09-22 16:23:27 +02:00
Victor Koenders 6361ad7d69 Made clippy also check _derive, fixed clippy warnings 2021-09-21 10:00:53 +02:00
Victor Koenders cbd5c6b940 Enable CI for the deserde branch 2021-09-13 13:39:59 +02:00
Victor Koenders bab0cf4bd1 Started working on bincode_derive 2021-09-13 13:20:47 +02:00
Ben Kimock 5c541a297a Optimize varint parsing (#337)
* Add benchmarks for varint parsing

* Enable more inlining

* Outline error construction

* Add provided functions to BincodeRead to customize reading of literals

* Add #[inline] to deserialize_byte

* Outline SliceReader::unexpected_eof so that deserialize_varint inlines

* Implement BincodeRead for std::io::BufReader

* Reimplement all of BincodeRead in terms of BufRead-like functions

* Move branch into error-creation function to get below inline threshold
2021-06-19 18:16:13 -07:00
Lena Hellström e160c73acb a fresh new start 2021-06-19 19:31:34 +02:00
Alex Touchet cd58cf2e7e Update URLs and some cleanups (#383)
* Update URLs and some cleanups

* Capitalize Rust

* Remove accidental directory

* Update URLs and some cleanups

* Update URL

* Capitalize Rust
2021-04-09 14:46:05 +02:00
Lena Hellström e39a047b4b prep branch for 2.0 work (#379)
* prep branch for 2.0 work

* switch to 2018 edition

* fix clippy issues

* fix tests

* fix warnings

* fix formatting
2021-04-08 14:54:31 +02:00
Lena Hellström e15b8e911a clarify msrv support (#375)
* clarify msrv support

* pin byteorder to valid versions
2021-02-23 11:47:56 -08:00
Lena Hellström 00c43bf3b1 fix logic error in fill_buffer (#336) 2020-06-23 23:41:55 -07:00
Lena Hellström a822c09d93 bump version to 1.3.0 (#330) 2020-06-04 21:20:43 -07:00
Lena Hellström 38322212e6 update author name to current legal name 2020-03-09 18:39:39 -04:00