3 ms·
Makes me wonder how easy/hard it is to write a library in Rust and expose it to other languages.
by gwbas1c 1y ago
Makes me wonder how easy/hard it is to write a library in Rust and expose it to other languages.
- steveklabnik 1y agoCan be viewed as either, you expose a C ABI and then the other languages can use it, which is fundamentally not super hard but fiddly, which could be viewed as hard but some languages have nice libraries that exist to make it easier, which is of course easier.
- tialaramex 1y agoOne extreme case of this would be rustls-openssl-compat which is basically what if you take a Rust TLS implementation but you give it the same ABI as the openssl C library so (where this works, which is far from everywhere) it's a drop-in replacement. e.g. you can run curl, and go fetch https://example.com/ https://example.com/ but using this ersatz openssl rather than your C openssl implementation. That's a thing which works today, albeit not a supported configuration from the point of view of Curl's author.