3 ms·
This wasn't a rewrite-in-Rust effort, and I think that's the problem. Nothing valuable from curl has been rewritten in Rust. Only some existing Rust code has b
by pornel 2y ago
This wasn't a rewrite-in-Rust effort, and I think that's the problem. Nothing valuable from curl has been rewritten in Rust.
Only some existing Rust code has been added to curl, but the Rust ecosystem already has a better, safer way of using that code.
Curl is not planning to ever require Rust, so the rewrites are limited only to optional components, and can't fully guarantee that the code is safe. The Rust components are required to expose an unsafe unchecked C interface for the rest of curl. C compilers are unable to enforce the safety invariants of the interface, like the Rust compiler would in a program fully written in Rust.
- aragilar 2y agoProbably I misread the original announcement, but I got the impression this was a pilot to adding more rust to curl (and is exactly what a rewrite would start to look like)?
- pornel 2y agoThe original announcement explicitly said it's not a rewrite, multiple times: https://daniel.haxx.se/blog/2020/10/09/rust-in-curl-with-hyper/ https://daniel.haxx.se/blog/2020/10/09/rust-in-curl-with-hyp... > A rewrite of curl to another language is not considered > This is not converting curl to Rust. > Don’t be fooled into believing that we are getting rid of C in curl by taking this step. Curl plans to live and die with C: https://daniel.haxx.se/blog/2017/03/27/curl-is-c/ https://daniel.haxx.se/blog/2017/03/27/curl-is-c/ This has been reaffirmed recently in https://daniel.haxx.se/blog/2024/08/06/libcurl-is-24-years-old/ https://daniel.haxx.se/blog/2024/08/06/libcurl-is-24-years-o... > There was never any consideration to use another language than C for the library […] Not then, not now. Not only curl is rejecting possibility of being rewritten in Rust, it's also committed to supporting completely-Rust-free curl, because they pride themselves on supporting a lot of retro/niche platforms that Rust doesn't exist on.