Feature request: Deferred formating
Deferred formating would be a nice feature to have in microzig.
Deferred formating could help to
- reduce binary size
- speed up serial transmission
- reduce cpu time
defmt achieves high performance using deferred formatting and string compression.
Deferred formatting means that formatting is not done on the machine that's logging data but on a second machine. That is, instead of formatting 255u8 into "255" and sending the string, the single-byte binary data is sent to a second machine, the host, and the formatting happens there.
defmt's string compression consists of building a table of string literals, like "Hello, world" or "The answer is {:?}", at compile time. At runtime the logging machine sends indices instead of complete strings.
-- https://defmt.ferrous-systems.com/#operating-principle