[vlc-devel] Rust work (discussion)

Lyndon Brown jnqnfe at gmail.com
Tue Sep 22 20:46:54 CEST 2020


On Tue, 2020-09-22 at 11:34 +0200, Thomas Guillem wrote:
> Hello Lyndon,
> 
> First, thanks a lot for your contributions to the ML recently.

No problem, I'm very happy to participate in improving VLC's code.

> I do really think than porting VLC from C to Rust need to be done
> incrementally.

As said to others, I can completely appreciate people feeling that way.

> Here is a plan I suggest:
> 
> 1/ We enable Rust contribs supports.
> 2/ We write proper Rust API that will be used by Rust modules to
> interact with VLC Core (actually WIP by Kartik, Johan and Romain).
> 3/ We add new and optional Rust modules
> 4/ We add new mandatory Rust modules
> 5/ We start rewriting some C modules (MKV, MP4 in priority as said by
> RĂ©mi)
> 6/ We add Rust support in the CORE.
> 7/ We start writing some CORE functionalities in Rust.
> 
> The first 3 steps will likely be ready for VLC 4.0. We need to
> discuss it, but we can imagine that Rust is not enabled by default in
> VLC 4.0, or enabled by default but not mandatory.
> 
> When we hit the next 2 steps (4/ and 5/), we enable Rust everywhere
> on all VLC ports/arch (so, windows-arm and tvos that are not
> disabled).
> 
> The last steps (6/ and 7/) are a bonus for me. We don't have many
> security issues on the CORE part of VLC, and it's not as important as
> rewriting our demuxers in Rust.

Yes I can agree that getting more error prone components like codecs
and demuxers converted and into users hands as soon as possible is
ideal, and the compatibility layer approach is offering a quicker path
to get there, which is a huge plus.

I felt it prudent that fresh though be given to the worth of the
compatibility layer effort in light of revealing the existence of my
alternate effort (without meaning to offend at all those involved), but
there are obviously undeniable positives that will come from the
compatibility approach, and a lot of support in favour of still pushing
ahead with it which I can understand.

> Lyndon, we would love to have your help on all these steps.

:) I'm sure you'll find me getting involved with the conversion of
plugins at least, and I hope my working from the other end of things
will ultimately successfully complement it and help bring about a final
total Rust solution later on.

> Best regards,
> Thomas Guillem
> 
> On Tue, Sep 22, 2020, at 10:27, Romain Vimont wrote:
> > Hi Lyndon,
> > 
> > On Sun, Sep 20, 2020 at 04:25:13AM +0100, Lyndon Brown wrote:
> > > Specifically, a years-old project to achieve a complete
> > > conversion of
> > > the whole VLC codebase (to Rust).
> > 
> > That's impressive, but if the goal is to rewrite every single line
> > of
> > VLC in Rust "at once", why not writing an alternate Rust media
> > player
> > project (possibly inspired by VLC architecture) instead?
> > 
> > This would remove a lot of constraints.
> > 
> > In particular, the design of an API is heavily impacted by the
> > language
> > in which it is written. Designing it in Rust from the beginning
> > would
> > probably result in a better Rust API.
> > 
> > And a synchronized "switchover" would become unnecessary: if the
> > project
> > gets enough traction, people interested would join.
> > 
> > That's what happened for other projects. For example, rg is a grep-
> > like
> > tool written in Rust, the author was not constrained by the grep
> > design,
> > did not require validation and synchronization from grep authors,
> > and no
> > "switchover" was needed. And many people use it (including me).
> > 
> > Regards
> > _______________________________________________
> > 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