-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
Over the years we have tried to prevent any kind of leakage of the Debug trait into wasm to decrease the size of the wasm binary. However, AFAIK we never really looked into the impact of having Debug implemented for types. Especially as the linker should remove unused Debug implementation any way. We even have introduced RuntimeDebug that just prints wasm:stripped on no_std. The problem with all this is that it complicates debugging in wasm. In the future when there will be no native runtime, it is even more important. So, we should look into deriving Debug everywhere instead of RuntimeDebug. We should also change RuntimeDebug to always derive the default Debug to not break any downstream code, but still have proper debug output.
So, for this issue:
- Compile some runtimes and note their size.
- Change
RuntimeDebugto always derive defaultDebug. - Compile again and compare the runtime sizes against the ones noted in 1.
- If the difference in size isn't that big, remove
RuntimeDebugeverywhere in the code base.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status