19 releases

0.7.33 Feb 19, 2022
0.7.26 Dec 8, 2021
0.7.20 Oct 23, 2021
0.7.4 Jul 22, 2021
0.2.0 Nov 19, 2020

#724 in Encoding

Download history 35/week @ 2022-04-20 181/week @ 2022-04-27 127/week @ 2022-05-04 298/week @ 2022-05-11 87/week @ 2022-05-18 105/week @ 2022-05-25 135/week @ 2022-06-01 39/week @ 2022-06-08 8/week @ 2022-06-15 8/week @ 2022-06-22 23/week @ 2022-06-29 15/week @ 2022-07-06 32/week @ 2022-07-13 60/week @ 2022-07-20 45/week @ 2022-07-27 22/week @ 2022-08-03

165 downloads per month
Used in rkyv_dyn

MIT license

12KB
198 lines

rkyv_typename adds type names for rkyv_dyn.

Resources

Learning Materials

  • The rkyv book covers the motivation, architecture, and major features of rkyv
  • The rkyv discord is a great place to get help with specific issues and meet other people using rkyv

Documentation

Benchmarks

  • The rust serialization benchmark is a shootout style benchmark comparing many rust serialization solutions. It includes special benchmarks for zero-copy serialization solutions like rkyv.

Sister Crates

  • bytecheck, which rkyv uses for validation
  • ptr_meta, which rkyv uses for pointer manipulation
  • rend, which rkyv uses for endian-agnostic features

Example

use rkyv_typename::TypeName;

#[derive(TypeName)]
#[typename = "CoolType"]
struct Example<T>(T);

fn main() {
    let mut type_name = String::new();
    Example::<i32>::build_type_name(|piece| type_name += piece);
    assert_eq!(type_name, "CoolType<i32>");
}

Dependencies

~215–620KB
~15K SLoC