3 ms·
If anyone happens to know, can you make a lib in Rust and call it from Rust or C? > zbus: Why oh why? also how? From that link: > D-Bus is a popular IPC mech
by karmakaze 5y ago
If anyone happens to know, can you make a lib in Rust and call it from Rust or C?
> zbus: Why oh why? also how?
From that link:
> D-Bus is a popular IPC mechanism [...] there was only one Rust D-Bus crate and [...] not happy [...] that it depends on a notoriously bad C library, libdbus. zbus, was created out of this demand for a pure Rust API that makes D-Bus easy and simple.
- steveklabnik 5y agoYes, you can call a library written in Rust from C. You need to do some work to make it work, but it can be done. There was even a project to implement a libc in Rust, though I haven’t heard about it in a while, I’m not sure what it’s current state is.
- karmakaze 5y agoThanks for the info. I'm one of perhaps many who wish had a need to use Rust in day to day work. In the meantime, Go or Ruby with Sorbet isn't the worst.
- steveklabnik 5y agoOne of, if not the first, production uses of Rust was a Ruby gem :)
- vlmutolo 5y agoIt sounds like you're thinking of relibc. https://gitlab.redox-os.org/redox-os/relibc/ https://gitlab.redox-os.org/redox-os/relibc/ From someone who only loosely follows the project, it seems like things are going really well.