| > any real cases where you can afford Fil-C but you can’t afford WUFFS 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. |
But we literally do already have WebP for WUFFS.
> Like what?
Take a recent (September) double-free in the C codec, it's easy to write that in C. We have a Thing, we sometimes make an alias to the Thing, and then later we free both the alias and the original Thing. In Rust when you try to write this the compiler is unhappy. We can either have the same realisation which led to that being fixed (we do not need this alias, it should not be created) -- which I'd say is likely for a competent Rust programmer or we can clone the Thing, and then free both the clone and original, which is not a bug unlike the C library but is a waste of performance.