Hacker News new | ask | show | jobs
by flumpcakes 7 days ago
I thought it was very obvious throughout the video what was happening...

Rust has compile time checks to enforce some safety. In comparison Fil-C is a lot more memory safe, it's more comparable to being a software implementation of CHERI.

Unfortunately it comes with downsides: runtime performance, runtime enforcement, granular safety (the safety is around allocations).

It also comes with huge upsides: you can run C/C++ with little to no code changes. Imagine compiling nginx and the associated system libraries with Fil-C, the performance hit is probably acceptable and now the web server is memory safe.

Rust probably provides enough memory safety (even if it is not complete safety) in most circumstances though.

2 comments

I'm not a native English speaker, I know "memory safe" has a precise technical meaning, but the word "safe" still feels a bit strange to me given that a memory-safety bug can make the program crash at run-time.

Sure, Fil-C prevents the bug from possibly being exploited, which is a huge improvement. But crashing can be a DoS attack, and if running a mission-critical system, it might not be an acceptable outcome.

I just feel the already very good presentation could have been made much better if it had put more weight on explaining these trade-offs.

Even in memory safe Rust, out-of-bounds array access also results in crashes.

The whole point of memory safety is that bugs can not be exploited. A memory safe program does not mean a crash safe program.

The main advantage of Rust is that you can rewrite GPL software and replace the license with MIT.