tpack-macros 0.1.0

Procedural macros for native TPACK schema binding
Documentation
  • Coverage
  • 0%
    0 out of 3 items documented0 out of 2 items with examples
  • Size
  • Source code size: 34.4 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 348.07 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 14s Average build duration of successful builds.
  • all releases: 14s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • pluveto/tpack
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • pluveto

tpack-macros

Procedural macros for native schema binding.

This crate generates TpackSerialize and TpackDeserialize implementations from Rust item definitions.

Purpose

  • avoid runtime reflection tables
  • avoid string-based field lookup in the hot path
  • preserve stable field identity through explicit field_id annotations

Example

#[tpack(auto)]
#[derive(TpackSerialize, TpackDeserialize)]
pub struct LogEntry {
    pub timestamp: u64,
    pub message: String,
}

By default, each field must declare #[tpack(field_id = N)]. Add #[tpack(auto)] to opt into declaration-order numbering starting at 1.