#varint #protobuf #leb128

no-std const-varint

Protobuf's varint encoding/decoding with full const context operations supports

2 unstable releases

new 0.2.1 Feb 6, 2025
0.2.0 Feb 5, 2025
0.1.1 Feb 3, 2025
0.1.0 Feb 3, 2025

#1216 in Network programming

Download history 736/week @ 2025-02-02

736 downloads per month
Used in 7 crates (via dbutils)

MIT/Apache

41KB
763 lines

const-varint

Protobuf's varint encoding/decoding with full const context operations supports.

github LoC Build codecov

docs.rs crates.io crates.io license

Installation

[dependencies]
const-varint = "0.2"
  • For ruint::Uint<BITS, LBITS> support (not compatible in const context)

    const-varint = { version = "0.2", features = ["ruint_1"] }
    

License

const-varint is under the terms of both the MIT license and the Apache License (Version 2.0).

See LICENSE-APACHE, LICENSE-MIT for details.

Copyright (c) 2025 Al Liu.

Dependencies

~0.2–0.8MB
~19K SLoC