<story><title>Rewriting Libimagequant in Rust for Portability</title><url>https://pngquant.org/rust.html</url></story><parent_chain></parent_chain><comment><author>bz2</author><text>Kornel is also behind the DSSIM library (in Rust), which I&amp;#x27;ve found useful for comparing images before and after compression.&lt;p&gt;&lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;github.com&amp;#x2F;kornelski&amp;#x2F;dssim&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;github.com&amp;#x2F;kornelski&amp;#x2F;dssim&lt;/a&gt;</text></comment>
<story><title>Rewriting Libimagequant in Rust for Portability</title><url>https://pngquant.org/rust.html</url></story><parent_chain></parent_chain><comment><author>roblabla</author><text>&amp;gt; Trying to make the library more object-oriented exposed a &amp;quot;drum-stick&amp;quot; design issue: does play(drum, stick) translate to drum.play(stick) or stick.hit(drum)?&lt;p&gt;In cases where OO doesn&amp;#x27;t make sense, the solution is to simply provide a functional API instead. Rust stdlib has plenty of such APIs, it&amp;#x27;s fine to have free-standing functions!</text></comment>