4 ms·
Rust could expose a C ABI while keeping safe internals. The interface itself would be unsafe of course. There are a few things that rust doesn't handle natively
by simias 10y ago
Rust could expose a C ABI while keeping safe internals. The interface itself would be unsafe of course. There are a few things that rust doesn't handle natively (like varargs functions IIRC) but other than that you could probably write a Rurl that would be completely backward compatible with Curl.
- tyingq 10y agoYes...the post above me was talking about Ocaml. Similar arguments for not redoing curl in Go.
- steveklabnik 10y agoTo be clear, Rust itself does not have varargs, but can handle them with the C ABI.
- Manishearth 10y agoWell, we can call into vararg functions, but not define them. Since vararg functions have the same ABI as the function with only one of the vararg one idea I've always had is to write a macro that lets you write a one-arg function and have it desugar via asm hax.