[PD-dev] Pure Rust Pure Data Externals

Julian Brooks jbeezez at gmail.com
Wed Jul 31 11:06:17 CEST 2019


Nice work Alex,

Look fwd to digging through these on my return from holidays.

All the best,

Julian

On Tue, 30 Jul 2019 at 16:57, x nor <x37v.alex at gmail.com> wrote:

> This is very much still a work in progress, but recently I've been working
> on writing pure data externals in Rust and I figured I'd share:
>
> https://github.com/x37v/puredata-rust
>
> Rust can create dynamic libraries that can be loaded in C based projects
> without the need for any external build tools, building simply uses rusts
> `cargo` build system (and package manager).
> I've setup the automatic binding to `m_pd.h` (puredata-sys), some ease of
> use classes for creating externals, and a macro that generates a bunch of
> boiler plate code so you don't have to.
>
> With this I've created Rust versions of the 4 example externals from the
> HOWTO:
> https://github.com/pure-data/externals-howto
> https://github.com/x37v/puredata-rust/tree/develop/examples
>
> With the help of a macro and attributes, beyond the dependency setup, this
> is all you need to write a signal external:
>
> https://github.com/x37v/puredata-rust/blob/develop/examples/xfade/src/lib.rs
> or a control external:
>
> https://github.com/x37v/puredata-rust/blob/develop/examples/complex_counter/src/lib.rs
>
> Anyways, I figured I'd share in case anyone else is interested, maybe
> wants to contribute or just use it themselves.
> I'm tired/done with c/c++ and Rust has presented itself as a great
> alternative for a lot of situations.
> It was fun to discover that I can generate pure data externals with Rust
> and its build system.
>
> --Alex
> _______________________________________________
> Pd-dev mailing list
> Pd-dev at lists.iem.at
> https://lists.puredata.info/listinfo/pd-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-dev/attachments/20190731/eea1b300/attachment.html>


More information about the Pd-dev mailing list