This is the first step of a revised radix index implementation in Rust that
was previously implemented in Python and C [1]. The importance of the data
structure is mentioned in the original commit message [1]. And the
performance win is significant when used properly [2].
Choosing Rust for its high level abstractions, type safety, and
compelling-to-C performance.
The radixbuf uses a flat, continuous buffer as the source of truth of the
index. Therefore it needs serialization support. This patch adds basic
serialization interface and implements serialization for common unsigned
integers.
[1]: https://www.mercurial-scm.org/pipermail/mercurial-devel/2017-June/099184.html
[2]: https://www.mercurial-scm.org/pipermail/mercurial-devel/2017-June/099197.html