[vlc-devel] [RFC: PATCH 1/2] libvlc: Add Rust API for writing modules in rust

Kartik Ohri kartikohri13 at gmail.com
Thu Sep 10 22:03:45 CEST 2020


On Fri, Sep 11, 2020 at 1:13 AM Rémi Denis-Courmont <remi at remlab.net> wrote:

>         Hi,
>
> Manually wrapping the API sounds like a lose-lose proposition, as not all
> core
> developers know Rust in general, and/or Rust C bindings in particular, and
> you
> cannot expect/require them to update Rust code. This raises two separate
> questions:
>
> 1) Why are the bindings not generated automatically? Rust has tools
> specifically for this purpose. VLC is not particularly heavy on
> preprocessor
> macros so automatic binding generators should work just fine - or then,
> *they*
> need to be fixed.
>
> The intent is to generate the bindings automatically using bindgen.
However, there are a couple of fixes required after bindgen does its work
(relating to va_list). Also, these bindings have been generated
automatically by bindgen and then modified manually as required.

Also, there is the question should the bindings be generated automatically
during the build or when the developer wants to. clang is required to auto
generate the bindings that may or may not be an issue.


> 2) Who's in charge of updating the Rust modules when the core API changes?
> We
> can't expect all developers of core patches to know Rust, and know it well
> enough to update Rust code properly. FWIW, I believe that only a minority
> of
> the TC knows Rust well at this point in time even, not to speak of the
> broader
> vlc-devel active membership.
>
> Professional (sponsored) developers may or may not be granted the time and
> material to train any time soon. And hobbbyists - in particular, but not
> limited, to TC members David, Denis and myself* - are potentially in an
> even
> worse position. And this problem is _not_ on the same level of difficulty
> as
> with C++ and Objectionable C.
>
> (*) I did buy a Rust book out of my own pocket, but it's unclear if/when
> I'll
> have the time to actually read and assimilate it, regardless of motivation.
>
> --
> Реми Дёни-Курмон
> http://www.remlab.net/
>
>
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20200911/695534dd/attachment.html>


More information about the vlc-devel mailing list