[pulseaudio-discuss] [announce] Rust bindings!

jnqnfe at gmail.com jnqnfe at gmail.com
Mon May 28 18:37:05 UTC 2018


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.

fyi, I am not subscribed to this list; I am contactable at this email
address though, and bug-reports/questions/etc specific to the bindings
can be made on github (https://github.com/jnqnfe/pulse-binding-rust),
but understand that I am no PA guru :)
I do not currently have a home internet connection with my current
living situation, and manage to get online typically only once a week
at the moment, so bare in mind that it could take a while to get a
response. Appoligies in advance if I keep you waiting, I know it's not
ideal.

News related, I have two new version, v1.0.5 and v1.1.0 ready to
publish (when I next get an internet connection, at which point this
email will also get sent out of my outbox :p). The next thing planned
is to consider whether use of "Futures" would be a good idea for use in
the bindings to tidy up use of callbacks - there are some details, most
specifically callbacks, where underlying C details are exposed.

Regards,
Lyndon Brown (aka jnqnfe)


More information about the pulseaudio-discuss mailing list