I want extern "fil-C"
- Programming
- Security
- Developer Tools
- Open Source
The post proposes a new Rust foreign function interface, `extern "fil-C"`, that would let Rust call libraries compiled with Fil-C instead of ordinary C. Fil-C is a C system that adds runtime metadata and checks to stop out-of-bounds and related memory errors with finer precision than tools like AddressSanitizer or Valgrind. The appeal is obvious. Rust could keep its compile-time guarantees for most code, then pay a runtime cost only when crossing into legacy C that has been recompiled under Fil-C.
If you want safer interop with legacy C today, treat `extern "fil-C"` as a research idea, not an integration plan. For production work, the practical options raised here were sandboxing approaches like RLBox or incremental hardening like Clang `-fbounds-safety`, depending on whether you need isolation or ABI compatibility.
-
domenkozar.com
- Discuss on HN