|
|
|
|
|
by tialaramex
62 days ago
|
|
There are cases for which Fil-C makes plenty of sense but this isn't one of them. If you can't afford WUFFS then this Rust is the sensible choice. There aren't going to be any real cases where you can afford Fil-C but you can't afford WUFFS. A WUFFS codec is obviously going to be a lot faster than Fil-C for similar development effort but it's also going to be entirely safe at compile time whereas in Fil-C too bad any mistakes will get caught in production as denials of service. The Rust is a compromise in that regard, it's not going to catch everything WUFFS would catch during compilation but it will catch a lot more than Fil-C |
|
Anytime you already have the C or C++ code but not the WUFFS.
The main use case for the Fil-C build of webp is my memory safe web browser, which is built entirely using Fil-C (including all dependencies).
> WUFFS codec is obviously going to be a lot faster than Fil-C for similar development effort
For greater development effort. Fil-C is just C, so WUFFS is only comparable effort if that’s the only version of the codec you ever write, and in the unlikely case you are as productive in WUFFS as you would have been in C.
> it will catch a lot more than Fil-C
Like what?
Fil-C catches not just the bugs in your codec but any transitive misuse of it from other C or C++ code. So, while you might be able to pick out things Rust or WUFFS catch that Fil-C doesn’t, I can easily pick out things that Fil-C catches that nothing else can.