| ▲ | jiggawatts 25 days ago | |||||||||||||||||||||||||||||||||||||||||||
Sorry, but that is an insanely defeatist attitude blended with a hint of blaming users for wanting features. Image decoders are pure functions and all should have been rewritten as 100% safe Rust years ago. Users need functionality. It’s up to us to figure out how to provide that safely. Saying to users they shouldn’t have those features isn’t sage advice, it’s admitting failure. | ||||||||||||||||||||||||||||||||||||||||||||
| ▲ | microtonal 25 days ago | parent | next [-] | |||||||||||||||||||||||||||||||||||||||||||
They are actually pushing Rust quite hard now in Android: https://blog.google/security/rust-in-android-move-fast-fix-t... Even to the baseband firmware: https://blog.google/security/bringing-rust-to-the-pixel-base... | ||||||||||||||||||||||||||||||||||||||||||||
| ▲ | yencabulator 24 days ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||||||||||||||
Since it's a pure function, you can even keep using the legacy C code while still putting it in a sandbox: compile to WASM, then AOT transform to native code, and now it runs in the WASM sandbox at practically-native speed. https://hacks.mozilla.org/2021/12/webassembly-and-back-again... (Of course, new code is preferred in Rust over C, for sure.) | ||||||||||||||||||||||||||||||||||||||||||||
| ▲ | anthk 24 days ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||||||||||||||
Rust wont save you from malicious SVG+JS files, EPS/PostScript files and so on. | ||||||||||||||||||||||||||||||||||||||||||||
| ▲ | michaelt 25 days ago | parent | prev [-] | |||||||||||||||||||||||||||||||||||||||||||
The thing is, nobody's happy just previewing jpegs and pngs. Before you know it, people want to preview SVGs, PDFs, video, HTML and so on. And to do that properly means you've got to support obscure formats like JBIG2 and CCITT Fax. Malicious vector images with a billion elements to render. XML that lets one file embed another. And good luck getting the budget to re-implement them all from scratch in a better language, when the only business value the feature delivers is a postage-stamp-sized preview image. | ||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||