memuse
memuse copied to clipboard
Import ideas from `heapsize` crate
I searched for existing crates prior to writing this one, and somehow completely missed the heapsize
crate from the Servo devs. It takes a very similar approach to this crate, in that it defines a trait that individual library developers would implement for their own types. It is also used by a small but
However, the crate has been unmaintained since 2019, the Servo devs having abandoned this approach in favour of their internal malloc_size_of
crate. Had I discovered heapsize
, I probably would have tried extending it, but now that memuse
exists, we should take the opportunity to experiment and figure out a design we like (which may or may not stay close to heapsize
).
In any case, we should look over the heapsize
crate for useful ideas. In particular, it impls its traits for several more stdlib structs than we currently do.