Hacker News new | ask | show | jobs
by polyfractal 3457 days ago
That's why I quite like the approach of using existing C tooling and SDK, then linking in "user-land" Rust. I wanted to run stuff on the RTL8710, and it seemed crazy to start rewriting all the HAL from scratch.

But it only took an afternoon to bolt Rust into the C build because Rust's FFI story is really nice (imo). So I get the best of both worlds: existing C HAL and SDK with the pleasantness and safety of Rust.*

* With the assumption/hope that the HAL isn't buggy, since Rust will rely on that to not explode :)

1 comments

Brilliant! Thanks for the proof of concept. I've been debating this method, but it looks like you got it setup relatively quickly. Almost as easy as transitioning to another C compiler/tool chain.