[pulseaudio-discuss] [announce] Rust bindings!
Tanu Kaskinen
tanuk at iki.fi
Tue Jun 12 08:22:20 UTC 2018
On Mon, 2018-05-28 at 19:37 +0100, jnqnfe at gmail.com wrote:
> Hi everyone!
>
> Back in February I released 'binding' and 'sys' crates for using
> pulseaudio from Rust code. I had intended to make an announcement here
> at the time, but I failed to do so, so I'm doing it now.
>
> fyi, the 'sys' crates provide a simple description of the C interface;
> The 'binding' crates take this further, providing a cleaner/safer Rust
> interface.
>
> I have provided separate crates for each PA system library (per Rust
> guidelines for 'sys' crates), thus totalling six in all:
>
> [binding crates]
> - libpulse-binding: https://crates.io/crates/libpulse-binding
> - libpulse-simple-binding: https://crates.io/crates/libpulse-simple-bi
> nding
> - libpulse-mainloop-glib-binding: https://crates.io/crates/libpulse-gl
> ib-binding
> [sys crates]
> - libpulse-sys: https://crates.io/crates/libpulse-sys
> - libpulse-simple-sys: https://crates.io/crates/libpulse-simple-sys
> - libpulse-mainloop-glib-sys: https://crates.io/crates/libpulse-mainlo
> op-glib-sys
>
> The 'binding' crates include plenty of documentation (taken from the C
> API). This can be built locally of course (cargo doc), but is also
> available online at docs.rs, example: https://docs.rs/libpulse-binding/
>
> Long term I hope that the owners of the PA project itself would like to
> take over ownership and maintenance. Even longer term hopefully we will
> see PA itself converting to Rust - fyi the PA projects has my full
> consent to use this work of mine in converting PA itself.
Cool, thanks for the bindings! I'm afraid you'll have to keep
maintaining the bindings yourself for the foreseeable future - I don't
really want to take more work for myself at this point (I can of course
only talk only for myself, but I don't expect the other maintainers to
be enthusiastically adopting the bindings either). That said,
converting PA to Rust might very well be a good idea. From what I've
heard about combining Rust with C, such conversion could be done
gradually.
--
Tanu
https://liberapay.com/tanuk
https://www.patreon.com/tanuk
More information about the pulseaudio-discuss
mailing list