Earlier quoted context omitted.
> I'm curious if it is at all competitive with the Wuffs decoder You could try adapting https://github.com/google/wuffs/tree/main/script/bench-rust-... > https://github.com/bschwind/png-decoder Note that statements like: let bytes_per_scanline = ((header.width * header.bit_depth as u32 * header.color_type.sample_multiplier()) + 7) / 8; can silently overflow a u32 if width is 0x800_0000, bit_depth is 8 and sample_mult…
> You could try adapting ... Do you accept PRs for the Rust benchmarks? My code is nowhere near competitive to the Wuffs implementation, but it would be a fun goal to work towards. > Note that statements like ... can silently overflow a u32 Thank you for catching that, I'll go through the entire codebase and try to fix those up. That's a part of Rust that always makes me feel uneasy - the compiler will tell you if yo…
Sure! I'll take a PR that adds script/bench-rust-png-decoder to the Wuffs repo.
I'll also take patches to script/bench-rust-png. I'm not as fluent in Rust as I am in C/C++ or Go, so I might easily be doing something silly there.