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
31,195 downloads per month
Used in 409 crates
(5 directly)
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