Fil-c:
- You have a great existing c program that may have memory bugs, and you wanna make it safer.
- Or you wanna write a new program in c, and be extra sure it's safe and don't mind a little performance penalty.
- Or you wanna find subtle memory bugs by building your c program with fil-c (asan style) and disable it for performance in your release build.
Rust is great when you want to build a new codebase from scratch, and have the time and patience to deal with the borrow checker. It also gives you some thread safety, (which is different from memory safety) at the development time cost of dealing with the borrow checker. Rust:
- A new codebase where you need multithreading and safety, and want excellent performance
- You need a broad ecosystem of existing packages
- Your problem space benefits from a robust type system.
Rust tries to prevent you from writing memory-unsafe code. But it has official ways of overcoming these barriers ("unsafe" keyword, which tells compiler - "trust me bro, I know what I'm doing) and some soundness holes. But beause safety is proven statically by compiler, it is mostly zero-cost. ("Mostly" because some things compiler can't prove and people resort to "unsafe" + runtime checks)
Two orthogonal approaches to safety. You could have Fil-C style runtime checks in Rust, in principle.