2026-05-04
Discoveries
- How far behind is each major Chromium browser?
- Embedded Rust or C firmware? Lessons from an industrial microcontroller use case
Rust Things
Cheap trace in no_std:
struct ErrorInfo {
message: &'static str,
file: &'static str,
line: u32,
}
macro_rules! error_info {
($msg:expr) => {
ErrorInfo {
message: $msg,
file: file!(), // built-in macro, returns &'static str
line: line!(), // built-in macro, returns u32
}
};
}
fn something() -> Result<(), ErrorInfo> {
Err(error_info!("something went wrong"))
}