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

#15 in #prevent

Download history 36020/week @ 2024-11-16 38488/week @ 2024-11-23 33925/week @ 2024-11-30 43170/week @ 2024-12-07 33996/week @ 2024-12-14 13090/week @ 2024-12-21 16433/week @ 2024-12-28 30927/week @ 2025-01-04 47786/week @ 2025-01-11 40716/week @ 2025-01-18 36469/week @ 2025-01-25 41908/week @ 2025-02-01 44049/week @ 2025-02-08 44676/week @ 2025-02-15 39093/week @ 2025-02-22 33445/week @ 2025-03-01

169,549 downloads per month
Used in 841 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

~200–630KB
~15K SLoC