News for hackers. Stuff that matters.
Re:Rust for Embedded Systems: Current state, challenges and ... by adrianN on Monday March 04, 2024 @02:18PM (#39594703)
>To be fair, these problems are not inherent to Rust--any language which tries to interface with C will have them.

Yes, including C.

Re:Rust for Embedded Systems: Current state, challenges and ... by palata on Monday March 04, 2024 @03:16PM (#39595447)
I guess in that case, at least it's done by a C developer...
Re:Rust for Embedded Systems: Current state, challenges and ... by bsder on Monday March 04, 2024 @05:51PM (#39597228)
Incorrect.

Two C libraries interface just fine if library 1 handles ownership and library 2 (or your program) simply operates on the resulting things being passed around.

Rust, on the other hand, will go bananas and your life will be miserable. See: http://way-cooler.org/blog/2019/04/29/rewriting-way-cooler-i...

Re:Rust for Embedded Systems: Current state, challenges and ... by tialaramex on Monday March 04, 2024 @07:03PM (#39597765)
That 2019 blog post explains how, having made a whole series of mistakes, they're now going to rewrite everything in C and it'll go much better. The next blog post says they've abandoned the project instead.

To me, it seems like they'd lost motivation years previously and were increasingly flailing around for something that would spark the same joy as initial work on an exciting new project, and Rust has little to do with that.

Lots of crates exist which wrap popular C libraries, and they don't seem to run into the sort of misery you describe.

Re:Rust for Embedded Systems: Current state, challenges and ... by adrianN on Tuesday March 05, 2024 @01:25AM (#39600051)
So the author tried very hard to provide a safe interface for things that are inherently unsafe and found it to be too much work. That’s similar but different to just calling C from Rust and living with unsafe code like you normally do in C.