<div dir="auto"><div>Great thanks I'll take look, something to generate<span style="font-family:sans-serif;font-size:18.048px"> the lv2 manifest from json sounds good!</span><br><div class="gmail_extra"><br><div class="gmail_quote">On Dec 4, 2016 21:00, "Torbjörn Rathsman" <<a href="mailto:milasudril@gmail.com">milasudril@gmail.com</a>> wrote:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>Maybe this is useful: <a href="https://github.com/milasudril/lv2plug/blob/master/lv2spectohpp.php" target="_blank">https://github.com/milasudril/<wbr>lv2plug/blob/master/<wbr>lv2spectohpp.php</a><br><br></div>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 <a href="https://github.com/milasudril/lv2plug/blob/master/portmap.hpp" target="_blank">https://github.com/milasudril/<wbr>lv2plug/blob/master/portmap.<wbr>hpp</a>. The portmap is then used from<br><br><span class="m_425545703815041132gmail-pl-k">template</span><<span class="m_425545703815041132gmail-pl-k">class</span> <span class="m_425545703815041132gmail-pl-en">Client</span>>
      
      
                <span class="m_425545703815041132gmail-pl-k">void</span> <span class="m_425545703815041132gmail-pl-en">portConnect</span>(LV2_Handle handle,<span class="m_425545703815041132gmail-pl-c1">uint32_t</span> port,<span class="m_425545703815041132gmail-pl-k">void</span>* data)<br><br><a href="https://github.com/milasudril/lv2plug/blob/master/client.hpp" target="_blank">https://github.com/milasudril/<wbr>lv2plug/blob/master/client.hpp</a><wbr>, which is the module that interfaces with the host.<br><br></div>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.<br><div><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div class="elided-text">2016-12-03 16:07 GMT+01:00 David Robillard <span dir="ltr"><<a href="mailto:d@drobilla.net" target="_blank">d@drobilla.net</a>></span>:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="elided-text">On Sat, 2016-12-03 at 12:41 +0700, Stefan Riha wrote:<br>
> I was wondering if this mailing list is open to questions about plugin<br>
> development in the Rust programming language?<br>
><br>
> See e.g.:<br>
><br>
> <a href="http://stackoverflow.com/questions/40944524/safe-rust-interface-for-c-plugin-interface" rel="noreferrer" target="_blank">http://stackoverflow.com/quest<wbr>ions/40944524/safe-rust-interf<wbr>ace-for-c-plugin-interface</a><br>
<br>
All good, I'd love to see this taken further and find Rust very<br>
appealing in many ways, but haven't yet gotten any real experience<br>
working with it so can't be of much help on the idiomatic Rust side of<br>
things.<br>
<br>
I imagine that in order to make a type safe wrapper you'll have to deal<br>
with connect_port automagically in the wrapper since it inherently<br>
requires casting from untyped buffers...<br>
</div><span class="m_425545703815041132HOEnZb"><font color="#888888"><font color="#888888"><br>
--<br>
dr<br>
<br>
<br></font><div class="quoted-text">
______________________________<wbr>_________________<br>
Devel mailing list<br>
<a href="mailto:Devel@lists.lv2plug.in" target="_blank">Devel@lists.lv2plug.in</a><br>
<a href="http://lists.lv2plug.in/listinfo.cgi/devel-lv2plug.in" rel="noreferrer" target="_blank">http://lists.lv2plug.in/listin<wbr>fo.cgi/devel-lv2plug.in</a><br>
</div></font></span></blockquote></div><br></div>
<br>______________________________<wbr>_________________<br>
Devel mailing list<br>
<a href="mailto:Devel@lists.lv2plug.in">Devel@lists.lv2plug.in</a><br>
<a href="http://lists.lv2plug.in/listinfo.cgi/devel-lv2plug.in" rel="noreferrer" target="_blank">http://lists.lv2plug.in/<wbr>listinfo.cgi/devel-lv2plug.in</a><br>
<br></blockquote></div><br></div></div></div>