[LV2] [Rust] Anybody interested in Rust?

Stefan Riha hoitaus at gmail.com
Sun Dec 4 06:32:04 PST 2016


Great thanks I'll take look, something to generate the lv2 manifest from
json sounds good!

On Dec 4, 2016 21:00, "Torbjörn Rathsman" <milasudril at gmail.com> wrote:

Maybe this is useful: https://github.com/milasudril/lv2plug/blob/master/
lv2spectohpp.php

It takes a JSON file containing properties needed to describe an LV2 plug,
and generates a C++ include file. There is also a companion script that
generates the lv2 manifest from the same file. The class generated by the
php script, is used to instanciate the portmap
https://github.com/milasudril/lv2plug/blob/master/portmap.hpp. The portmap
is then used from

template<class Client> void portConnect(LV2_Handle handle,uint32_t port,void*
data)

https://github.com/milasudril/lv2plug/blob/master/client.hpp, which is the
module that interfaces with the host.

The system works well for audio and control ports. Atom (MIDI) ports are
also connected to the correct pointer type, but atoms themselfs are void
pointers, so the type safety does not go further than const correctness. If
possible, I would like to fix this, within the Zero Overhead Abstraction
Principle, but I do not know how.


2016-12-03 16:07 GMT+01:00 David Robillard <d at drobilla.net>:

> On Sat, 2016-12-03 at 12:41 +0700, Stefan Riha wrote:
> > I was wondering if this mailing list is open to questions about plugin
> > development in the Rust programming language?
> >
> > See e.g.:
> >
> > http://stackoverflow.com/questions/40944524/safe-rust-interf
> ace-for-c-plugin-interface
>
> All good, I'd love to see this taken further and find Rust very
> appealing in many ways, but haven't yet gotten any real experience
> working with it so can't be of much help on the idiomatic Rust side of
> things.
>
> I imagine that in order to make a type safe wrapper you'll have to deal
> with connect_port automagically in the wrapper since it inherently
> requires casting from untyped buffers...
>
> --
> dr
>
>
> _______________________________________________
> Devel mailing list
> Devel at lists.lv2plug.in
> http://lists.lv2plug.in/listinfo.cgi/devel-lv2plug.in
>


_______________________________________________
Devel mailing list
Devel at lists.lv2plug.in
http://lists.lv2plug.in/listinfo.cgi/devel-lv2plug.in
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lv2plug.in/pipermail/devel-lv2plug.in/attachments/20161204/cf091261/attachment-0001.htm>


More information about the Devel mailing list