19 releases (5 major breaking)

7.0.0 Feb 26, 2023
6.0.0 Dec 14, 2022
5.0.0 Nov 15, 2022
4.0.0 Dec 8, 2021
2.0.0-alpha.5 Mar 24, 2020

#297 in #node

Download history 4102/week @ 2022-12-03 6374/week @ 2022-12-10 5728/week @ 2022-12-17 2615/week @ 2022-12-24 2642/week @ 2022-12-31 4904/week @ 2023-01-07 4764/week @ 2023-01-14 5875/week @ 2023-01-21 6183/week @ 2023-01-28 6084/week @ 2023-02-04 5613/week @ 2023-02-11 6646/week @ 2023-02-18 10178/week @ 2023-02-25 6924/week @ 2023-03-04 7466/week @ 2023-03-11 5766/week @ 2023-03-18

31,195 downloads per month
Used in 409 crates (5 directly)

Apache-2.0

9KB
154 lines

sp-debug-derive

Auto-generated README.md for publishing to crates.io


lib.rs:

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

~0.7–1MB
~26K SLoC