Memory safety for SerenityOS

It seems there are ways to do this, but I think it will result in “worst of both worlds”: you can now have all the problems caused by C++ in addition to the problems caused by Rust! And you need to learn, understand and master two languages (and toolchains and libraries) instead of just one. and then figure out how to efficiently interface them together, which is not transparent at all. For example if you have an std::map from the C++ side, can you lookup items inside it from Rust? Can you store Rust references into it and how can the compiler keep track of that to make sure the objects are not freed?

2 Likes