21 releases

0.7.42 May 13, 2023
0.7.41 Mar 31, 2023
0.7.33 Feb 19, 2022
0.7.26 Dec 8, 2021
0.2.0 Nov 19, 2020

#1038 in Encoding

Download history 134/week @ 2023-08-14 165/week @ 2023-08-21 110/week @ 2023-08-28 144/week @ 2023-09-04 118/week @ 2023-09-11 180/week @ 2023-09-18 121/week @ 2023-09-25 144/week @ 2023-10-02 136/week @ 2023-10-09 161/week @ 2023-10-16 183/week @ 2023-10-23 200/week @ 2023-10-30 195/week @ 2023-11-06 467/week @ 2023-11-13 302/week @ 2023-11-20 358/week @ 2023-11-27

1,340 downloads per month
Used in 3 crates (2 directly)

MIT license

13KB
199 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

~1MB
~31K SLoC