15 releases (7 breaking)

new 0.7.4 Jul 22, 2021
0.7.0-pre.1 Jun 21, 2021
0.4.0 Feb 19, 2021
0.2.1 Dec 12, 2020
0.2.0 Nov 19, 2020

#494 in Encoding

Download history 35/week @ 2021-04-03 19/week @ 2021-04-10 19/week @ 2021-04-17 18/week @ 2021-04-24 13/week @ 2021-05-01 4/week @ 2021-05-08 10/week @ 2021-05-15 1/week @ 2021-05-22 2/week @ 2021-05-29 11/week @ 2021-06-05 20/week @ 2021-06-12 20/week @ 2021-06-19 3/week @ 2021-06-26 45/week @ 2021-07-03 4/week @ 2021-07-10 36/week @ 2021-07-17

60 downloads per month
Used in rkyv_dyn

MIT license

17KB
311 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

~320–750KB
~18K SLoC