Hacker News new | ask | show | jobs
by vlovich123 31 days ago
Are there any examples how to force C/C++ libraries within a Rust build to use Fil-C instead to improve security? Is it just a matter of overriding CC/CXX?
1 comments

Won’t work

Can’t link Fil-C code to regular C code

And rust uses regular C ABI

You could make it work, if you teach Rust and Fil-C about each other. Nobody has done that (to my knowledge)

I keep day-dreaming about how to leverage the ideas in Fil-C. (a) use it for both Python interpreter and all C libs i want to call from there. (b) use the ideas for extra security in the OS kernel.

https://drive.google.com/file/d/1yVlKs_GPspxTq95MXLPgj5QuggT...

https://drive.google.com/file/d/14HG52S0TrrBbqwzisTupebCD1Im...

This would be a fun and popular project for the right sort of person
Do you think it’s possible to have fil-c ideas applied to protect unsafe blocks in Rust?
You’d have to teach rust about Fil-C pointers and their special rules. You’d also have to teach the rust compiler to play nice with the Fil-C GC.

It would be a big change. Probably not backwards compatible with today’s rust.