You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A proof-of-concept for defmt *without* interning strings.
This is just an experiment for now.
If the 'no-interning' feature is set, instead of
#[export_name = "{JSON...}"]
static S: u8 = 0;
&S as *const _ as usize
You get:
static S: &'static str = "{JSON...}";
&S as *const _ as usize
Note that I had to change the size of the interned ID from u16 to usize, because with no-interning it's now a pointer to actual data.
Copy file name to clipboardExpand all lines: book/src/setup.md
+7-1Lines changed: 7 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -59,4 +59,10 @@ To learn how to enable other logging levels and filters logs per modules read th
59
59
60
60
### Memory use
61
61
62
-
When in a tight memory situation and logging over RTT, the buffer size (default: 1024 bytes) can be configured with the `DEFMT_RTT_BUFFER_SIZE` environment variable. Use a power of 2 for best performance.
62
+
When in a tight memory situation and logging over RTT, the buffer size (default: 1024 bytes) can be configured with the `DEFMT_RTT_BUFFER_SIZE` environment variable. Use a power of 2 for best performance.
63
+
64
+
### Use on Windows/macOS/Linux
65
+
66
+
You can use `defmt` without string-interning by enabling the `no-interning` feature. This will mean that format strings are included as literal strings and not hidden in the symbol name.
67
+
68
+
You can optionally send the output to the `log` crate by enabling the `use-log-crate` feature.
0 commit comments