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

Alexandre Janniaux ajanni at videolabs.io
Thu Sep 17 18:26:53 CEST 2020


Hi,

On Thu, Sep 17, 2020 at 04:28:53PM +0530, Kartik Ohri wrote:
> Hi!
> Regarding the rustfmt in CI, what do we want as the desired behaviour.
> Should the CI check and fail if the Rust style conventions are not followed
> ?

IMHO, yes! There's no point in having a code formatter if it's
not enforced. Else you get different style, which prevent you
from using this very code formatter.

> It is very easy to obey the style conventions. We just need to run cargo
> fmt in src/ and modules/ so should not be much of an issue for the
> developers. We can distribute a simple pre-commit hook as well to automate
> it as well. What are your thoughts?
> Thanks.
> Regards,
> Kartik

As you want :) A readme in the rust parts is also good with me.

Regards,
--
Alexandre Janniaux
Videolabs

> On Thu, Sep 17, 2020 at 1:49 AM Alexandre Janniaux <ajanni at videolabs.io>
> wrote:
>
> > Hi,
> >
> > On Thu, Sep 17, 2020 at 01:24:41AM +0530, Kartik Ohri wrote:
> > > > I noticed a problem during testing: src/vlccore-rs and src/vlccore-sys
> > > > are not rebuilt when sources are modified. Cargo should probably be
> > > > called everytime to check if it must rebuild things.
> > > >
> > >  Yes, this can be done. I can add a Rust Sources variable in the
> > common.am
> > >  makefile. It might also be fixed using a cargo workspace. I have been
> > >  exploring how to run rustfmt on all rust crates and execute all rust
> > tests.
> > >  The best solution seems to be a cargo workspace. I'll try it out and
> > report
> > >  my findings.
> >
> > A cargo workspace seems like the right tool for that indeed.
> > You probably want two of them so as to integrate within the
> > buildsystem nicely though.
> >
> > Regards,
> > --
> > Alexandre Janniaux
> > Videolabs
> > _______________________________________________
> > vlc-devel mailing list
> > To unsubscribe or modify your subscription options:
> > https://mailman.videolan.org/listinfo/vlc-devel

> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list