Add an optional context for decoding allowing additional data to be passed to decoded structs.
---------
Co-authored-by: branchseer <dk4rest@gmail.com>
* Made arrays with 32 elements or less never encode their length
* Removed `write_fixed_array_length` and `skip_fixed_array_length` as this was based on incorrect assumptions on how serde and bincode 1 works
---------
Co-authored-by: Victor Koenders <victor.koenders@qrtech.se>
* Fixed an issue where serde would decode a sequence with an u32 instead of a usize
* Added serde to the `the_same` test for roundtrips, fixed several issues.
* Fixed backwards compatibility for result, ipv4addr and ipv6addr
* Processed feedback
* 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