this post was submitted on 28 Nov 2021
11 points (100.0% liked)
Rust Programming
8306 readers
12 users here now
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
This looks like a big one and common theme. You can in theory wrap any C API with Rust but it does not mean it is possible to make it safe in Rust - the programming models may be incompatible. Worst is that in C you can use different practices around "ownership" of objects and mix them up in single program - this will make it very difficult/impossible to wrap it in safe Rust and waste a lot of time trying.
It would be good to have some good practices around this so people can recognize what is worth wrapping and what is better done from scratch in Rust.