3 ms·
I wonder if Rust could become used as a standard library for other languages in the future. It seems well fitted for this role due to it's safety, relatively ea
by foota 8y ago
I wonder if Rust could become used as a standard library for other languages in the future. It seems well fitted for this role due to it's safety, relatively easy ffi, and speed next to languages with similarly large standard libraries.
- kjeetgill 8y agoI believe rust can compile down to a shared object and thus trivially used via any CFFI. Sure you lose the expressivness of the rust language APIs but that's a nightmare for interop anyways.
- deleted 8y ago[deleted]
- roblabla 8y agoOnly because rust has an unstable ABI. I feel like it'd be nice to have rust provide an explicit "rust-stable" ABI for those kind of things.
- foota 8y agoI can't find much documentation on it, but it sounds like there's support for the Itanium c++ ABI
- kjeetgill 8y agoReally curious, is there much of a usecase for a stable rust ABI? There is no ecosystem of "rusty shared objects" to support and cargo tends to build things fine without it. As an outside observer it looks like an unnecessary complication.
- roblabla 8y agoPlugin systems and distributing dynamic libraries are the two big use-cases. For the second use-case, distributions can handle that somewhat okay by simply enforcing that all packages are compiled with the same rustc version. That works okay, but it means that, as an external user, you can't really depend on those libraries for your own executables, as you'll need to recompile when the distribution updates.