23 releases

0.7.44 Feb 4, 2024
0.7.43 Dec 17, 2023
0.7.42 May 13, 2023
0.7.41 Mar 31, 2023
0.2.0 Nov 19, 2020

#1782 in Encoding

Download history 422/week @ 2024-05-16 488/week @ 2024-05-23 220/week @ 2024-05-30 221/week @ 2024-06-06 440/week @ 2024-06-13 596/week @ 2024-06-20 746/week @ 2024-06-27 952/week @ 2024-07-04 1028/week @ 2024-07-11 679/week @ 2024-07-18 794/week @ 2024-07-25 572/week @ 2024-08-01 351/week @ 2024-08-08 364/week @ 2024-08-15 524/week @ 2024-08-22 420/week @ 2024-08-29

1,752 downloads per month
Used in 23 crates (2 directly)

MIT license

12KB
201 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

~1.5MB
~36K SLoC