33 releases (12 major breaking)

14.0.0 Jan 23, 2024
13.0.0 Dec 12, 2023
12.0.0 Nov 1, 2023
11.0.0 Oct 4, 2023
2.0.0-alpha.5 Mar 24, 2020

#14 in #prevent

Download history 9591/week @ 2024-07-28 10017/week @ 2024-08-04 11037/week @ 2024-08-11 10719/week @ 2024-08-18 10369/week @ 2024-08-25 9054/week @ 2024-09-01 9736/week @ 2024-09-08 28245/week @ 2024-09-15 36484/week @ 2024-09-22 39010/week @ 2024-09-29 38452/week @ 2024-10-06 39226/week @ 2024-10-13 44863/week @ 2024-10-20 36174/week @ 2024-10-27 50538/week @ 2024-11-03 34922/week @ 2024-11-10

167,608 downloads per month
Used in 807 crates (10 directly)

Apache-2.0

11KB
154 lines

Macros to derive runtime debug implementation.

This custom derive implements a core::fmt::Debug trait, but in case the std feature is enabled the implementation will actually print out the structure as regular derive(Debug) would do. If std is disabled the implementation will be empty.

This behaviour is useful to prevent bloating the runtime WASM blob from unneeded code.

#[derive(sp_debug_derive::RuntimeDebug)]
struct MyStruct;

assert_eq!(format!("{:?}", MyStruct), "MyStruct");

Dependencies

~240–690KB
~16K SLoC