Crates.io | bitty_write_macro |
lib.rs | bitty_write_macro |
version | 0.1.2 |
source | src |
created_at | 2024-03-13 23:47:36.926871 |
updated_at | 2024-03-14 18:51:13.795475 |
description | A drop-in `write!` replacement that optimizes non-formatting writes for code size |
homepage | |
repository | |
max_upload_size | |
id | 1172692 |
size | 46,078 |
Size-optimized versions of the standard library's write!
and writeln!
macros.
In code size-constrained systems that perform string formatting,
using the write!
or writeln!
macro can generate larger code
than writing the contents directly, even after linking and inlining.
The write!
and writeln!
macros provided by this crate detect when
the write could be optimized as a direct write with write_str
(for fmt::Write
) or write
(for io::Write
) and calls that instead of
format_args!
and write_fmt
.