Hacker News new | ask | show | jobs
by marmaduke 609 days ago
Hi! Thanks for your reply. First time hearing about Brski, I’ll have a look

I guess your takeaway is that despite spotty support, the benefits of rust are net positive? I guess learning to call C from Rust is gonna be part of it too right ?

1 comments

I would say that the benefits are definitely worth it. I make a point to only never use `unwrap` or even `expect` because the panic handler can be a bit spotty on uncommon hardware. I throw an `anyhow` error (a common crate) to a top level handler, log the error there and then crash. Saves extensive logging and I never get the seemingly random crashes I got with C hardware. I almost never use the debugger anymore. The only system crash I get are when I accidentally flood the stack space.

> I guess learning to call C from Rust is gonna be part of it too right

Depends on the platform, but for ESP32, all native C SDK functions have thin Rust wrappers.