6 releases

0.1.5 Feb 23, 2023
0.1.4 Nov 4, 2022
0.1.3 Oct 21, 2022
0.1.1 Sep 14, 2022

#152 in Profiling

Download history 289/week @ 2024-08-18 286/week @ 2024-08-25 227/week @ 2024-09-01 713/week @ 2024-09-08 1460/week @ 2024-09-15 1216/week @ 2024-09-22 1613/week @ 2024-09-29 2465/week @ 2024-10-06 2259/week @ 2024-10-13 3214/week @ 2024-10-20 1915/week @ 2024-10-27 1513/week @ 2024-11-03 2344/week @ 2024-11-10 2230/week @ 2024-11-17 2432/week @ 2024-11-24 2204/week @ 2024-12-01

9,353 downloads per month
Used in 16 crates (4 directly)

MIT/Apache

73KB
2K SLoC

Size Of

A crate for measuring the total memory usage of an object at runtime

Features

size-of has built-in support for many 3rd party crates that can be enabled with feature flags

  • std: Enables support for the rust standard library (enabled by default, when disabled size-of is #![no_std] compatible)
  • derive: Enables support for #[derive(SizeOf)] (enabled by default)
  • time: Enables support for the time crate
    • time-std: Enables support for time's std feature
  • chrono: Enables support for the chrono crate
  • hashbrown: Enables support for the hashbrown crate
  • fxhash: Enables support for the fxhash crate
  • rust_decimal: Enables support for the rust_decimal crate
  • ordered-float: Enables support for the ordered-float crate
  • ahash: Enables support for the ahash crate
    • ahash-std: Enables support for ahash's std feature
  • xxhash-rust: Enables support for the xxhash-rust crate
    • xxhash-xxh32: Enables support for xxhhash-rust's xxh32 feature
    • xxhash-xxh64: Enables support for xxhhash-rust's xxh64 feature
    • xxhash-xxh3: Enables support for xxhhash-rust's xxh3 feature

Dependencies

~0–1.3MB
~23K SLoC