Remix.run Logo
gpderetta 2 days ago

GC is problematic for cross-language foundational libraries though (unless they run on the same VM of course).

gwbas1c 2 days ago | parent | next [-]

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.

PaulHoule 2 days ago | parent | prev [-]

But what’s so bad about that Clojure and Java make a great team.

Grikbdl 2 days ago | parent | next [-]

Yeah but now try to make your Java library useful to a C#, Go or Python application.

PaulHoule 2 days ago | parent [-]

In the case of Python I think you could produce something like Jython that runs inside the Java runtime and lines up

https://openjdk.org/jeps/454

with the Python FFA so you could run things like numpy inside of it. Would be transformative for my side projects.

gpderetta 2 days ago | parent | prev [-]

Nothing, hence my "unless they run on the same VM" comment.