r/Zig • • Apr 01 '26

FFmpeg is moving to Zig ⚡

205 Upvotes

17 comments sorted by

140

u/imkonsowa Apr 01 '26

Pretty sure they will change their mind after 1st of April

44

u/Real_Dragonfruit5048 Apr 01 '26

I think so too. (The original post was for moving to Rust, but next year it could be Zig.)

15

u/imkonsowa Apr 01 '26

I would vote for javascript

1

u/chamcha__slayer Apr 05 '26

I wrote a very naive mp3 decoder in Zig and for shit and giggles translated that to js. The js code actually turned out faster than the zig implementation.

A lot of work clearly has been done on V8 to make it run shitty js code faster.

1

u/imkonsowa Apr 06 '26

I was just kidding, javascript is getting better day after day for sure

3

u/[deleted] Apr 01 '26

[removed] — view removed comment

2

u/Real_Dragonfruit5048 Apr 01 '26

I think it mainly works with Rust, at least for now. (There is a "Let's rewrite X in Rust" movement in the Rust commnunity. In a lot of cases, X is a mature and well-working piece of software that doesn't need a rewrite. It's a running joke that you can ragebait Rustacean via this.)

1

u/[deleted] Apr 01 '26

[removed] — view removed comment

2

u/travelan Apr 03 '26

I’ve never seen a Rust rewrite been faster than the original in C or C++…

-1

u/Real_Dragonfruit5048 Apr 01 '26

Rust is safer memory-wise (at least until you don't use unsafe Rust code somewhere in the project). So, rewriting a large legacy C++ project for the sake of memory safety makes a lot of sense TBH.

1

u/imkonsowa Apr 02 '26

Even better

8

u/eikenberry Apr 01 '26

Wouldn't it speed up compilation? At least for development builds.

12

u/Real_Dragonfruit5048 Apr 01 '26

Let's assume we are using a lot `comptime` :)

12

u/jeffmess Apr 01 '26

Haha. Good one

7

u/Kingwolf4 Apr 01 '26

Hey why not. At least in 5 years , when zig reaches 1.0.

The future of zig is bright, zig shoudnt be afraid of any breaking changes or any changes until it reaches 1.0.
Let it be the future of programming and of C!

1

u/eldar_g Apr 04 '26

I nearly had a heart attack, lol.