Since people keep bringing it up yes I know about cbindgen yes I know it's possible, this is me pointing out the irony and downfall of a toxic and self-defeating cultural practice in the Rust community which I have experienced firsthand
Top-level
Since people keep bringing it up yes I know about cbindgen yes I know it's possible, this is me pointing out the irony and downfall of a toxic and self-defeating cultural practice in the Rust community which I have experienced firsthand 18 comments | Expand all CWs
@ansuz Freenet actually got hit by its decade-long-inactive founder suddenly starting to rewrite something adjacently similar in Rust while gutting the essential features ("privacy is not a goal of …") and putting in crypto-contracts … https://www.hyphanet.org/freenet-renamed-to-hyphanet.html @cwebber @haskal @cwebber I mean yeah, any sort of dynamic linking is going to need some ABI, and supporting that is inevitably going to be some work for someone somewhere. but I think the point stands that dynamic linking still allows for some cross-language compatibility that static linking doesn't really allow at all. @imyxh @haskal @cwebber Unless it's built for that purpose. AmigaOS libraries are all statically linked, and they're shared across a wide variety of programs and languages. The OS itself is written as a collection of these libraries (most in C, dos.library in BCPL at one time), which nearly all apps use. Apps take on a variety of languages from BASIC to BCPL to Modula-2 to C to interpreted languages like ARexx. It's not impossible. Just not done under WIndows or Linux. @imyxh @haskal @cwebber there's the windows way, that every dynamic library is accompanied by a static library that dlopen()s it and calls it. or at least it used to be this way two decades ago. i'm not sure why they did that but these static libraries can be translated to different languages and implement an ffi internally. @cholling @haskal I do think it's annoying that C has become the lingua franca. Rust could provide an alternative, that would be a good initiative on its part. It would still require dynamic linking. Support for the C ABI isn't the primary thing I'm advocating for, it's pointing out that dynamic linking is where C has had the most success. @cwebber i don't think i understand your point. currently it's straightforward, using standard tooling, to make a rust dynamic linked shared library and export C headers for it. a lot of mozilla projects are doing this @haskal yes, you can do it. but you aren't having conversations with the same people in the Rust community as I have, clearly. (Notably all the annoying Rust developers are cis dudes, and most of the cool ones are trans girls, who don't typically share this same attitude. Despite the fediverse's reality distortion field, that's not the majority of Rust devs in the wild) @cwebber i mean i could write an imagemagick in rust today and export even fully imagemagick-compatible C bindings and have a drop in replacement shared library @cwebber langs that are supposed to be better but don't support like irritate me so fucking much. I don't want to download another fucking package manager and repository and deal with all that shit!! just let me use the tools that Already Exist and Work @cwebber |
@cwebber I wrote about this behaviour in the rust community back in 2016 (https://transitiontech.ca/random/RIIR) and I guess not much has changed since then :blobcat_thisisfine: