Files
reth/crates/codecs
joshieDo bb014eea25 codecs: "type specialization" for Compact on Vec<T> & Option<T> (#297)
* maybe_zero no longer necessary on bytecode_hash

* add alt impl for Compact to/from

* add some more docs

* add default vec impl on generator test

* use default trait impl

* rename from alternative to specialized
2022-12-02 01:56:08 -08:00
..
2022-11-24 03:42:24 -08:00

Codecs

This crate allows to easily configure different codecs for different purposes (benchmarks, user configuration) with minimal changes. Having them to be configurable through annotations allows us to contain their implementations/leakage to isolated portions of the project.

Examples:

Features

Feature defines what is the main codec used by #[main_codec]. However it is still possible to define them directly: #[use_scale], #[use_postcat], #[no_codec].

default = ["scale"]
scale = ["codecs-derive/scale"]
postcard = ["codecs-derive/postcard"]
no_codec = ["codecs-derive/no_codec"]