8 ms·
This could be big in safety-critical firmware business. Some utility to assist bulk conversion from C to Rust would be nice. That way Rust-based firmware could
by vardump 11y ago
This could be big in safety-critical firmware business.
Some utility to assist bulk conversion from C to Rust would be nice. That way Rust-based firmware could be reality in 2025. :-)
- deleted 11y ago[deleted]
- deleted 11y ago[deleted]
- vardump 11y agoThe requirements are often 1-100 microsecond response time and absolutely no memory allocation. But I guess those could be met?
- deleted 11y ago[deleted]
- steveklabnik 11y ago> Some utility to assist bulk conversion from C to Rust would be nice One of the problems with this is that Rust's guarnatees usually really affect your design. I'd imagine that a bulk C -> Rust translator would have to use `unsafe` all over the place. Doesn't mean that it wouldn't be useful, but I wonder if slowly replacing APIs bit by bit isn't a better approach overall.
- coldpie 11y agoYeah, the ease and mostly-cost-free nature of C-Rust interop is a really big selling point, as you can pretty much just drop Rust in piecemeal to replace your legacy libraries.
- posborne 11y agoI think the better approach here is to phase out existing applications in chunks. You can link call rust code from C (when externed and rustc is told not to mangle) and C code from rust (via ffi). My experience with code automatically converted has not been good.