[LV2] [Rust] Anybody interested in Rust?

David Robillard d at drobilla.net
Sun Dec 4 13:03:12 PST 2016

On Sun, 2016-12-04 at 11:55 +0700, Stefan Riha wrote:
> If you mean related to the buffer size, then I think I know what you mean.
> Rust has "slice" types, which are "views" into a block of memory
> represented as a pointer and a length. They panic e.g. if an out-of-bound
> read occurs. Setting that length may be problem, since it's not supplied
> with connect_port().

That, too, but there is no type at all, to say nothing of array size.
The plugin gets a void* which could point to anything.  In practice,
this means float* for audio, LV2_Atom_Sequence* for sequences (e.g.
MIDI), etc.

Some extensions pass such information, but that information is dynamic
by nature.

Even for C, passing the buffers to run() would be a better design
anyway, so the size is passed along with them (among other reasons).  An
extension(*) for that has been on my TODO list for a while...

(* Though I really wish we made the descriptor itself extensible)


More information about the Devel mailing list