Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

>> A C based rtos inherits all the difficulties present in C.

Can you please expand on that, especially assuming(a big assumption) that the c code you're interfacing is high quality , with rare bugs ?



Even assuming the existing code is high quality, there is still a lot of problems with pointer ownership and type checking which Rust removes.

Personally I think the best way is to wrap existing C code into higher level, safer Rust APIs.


Exactly, even the most disciplined code base will have errors. Rust type system "automates" the process that many well designed C code bases will do by convention (e.g. borrowing and keeping ownership localised).

While wrapping C libraries in safer Rust APIs is useful for many application, having something as fundamental as time-sharing, task interruption, etc would be much better if written in Rust and care is taken to define simple semantics for the system (e.g. like the recent HN post regarding state-machine based asynchronous IO in Rust).




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: