Remix.run Logo
gwbas1c 2 days ago

Makes me wonder how easy/hard it is to write a library in Rust and expose it to other languages.

tialaramex 2 days ago | parent | next [-]

One 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/ 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.

steveklabnik 2 days ago | parent | prev [-]

Can 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.