<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Webassembly on Polaris64&#39;s blog</title>
		<link>https://blog.polaris64.net/tags/webassembly/</link>
		<description>Recent content in Webassembly on Polaris64&#39;s blog</description>
		<generator>Hugo</generator>
		<language>en-uk</language>
		
		
		
		
			<lastBuildDate>Sun, 22 Sep 2024 13:46:31 +0200</lastBuildDate>
		
			<atom:link href="https://blog.polaris64.net/tags/webassembly/index.xml" rel="self" type="application/rss+xml" />
			<item>
				<title>Rust WebAssembly and JavaScript: Floyd-Steinberg Dithering</title>
				<link>https://blog.polaris64.net/post/rust-webassembly-javascript-floyd-steinberg-dithering-performance/</link>
				<pubDate>Sat, 20 Jan 2018 13:16:00 +0100</pubDate>
				<guid>https://blog.polaris64.net/post/rust-webassembly-javascript-floyd-steinberg-dithering-performance/</guid>
				<description>&lt;h2 id=&#34;code-examples&#34;&gt;Code examples&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://www.polaris64.net/resources/programming/fs%5Fdither%5Fwasm/&#34;&gt;Demo&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://github.com/polaris64/floyd%5Fsteinberg%5Fwasm%5Frust&#34;&gt;Rust WASM library and HTML (GitHub)&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;introduction&#34;&gt;Introduction&lt;/h2&gt;&#xA;&lt;p&gt;Further to my &lt;a href=&#34;https://blog.polaris64.net/post/webassembly-wasm-rust-webgl-mandelbrot-performance-analysis&#34;&gt;recent post&lt;/a&gt; comparing the performance of a WebAssembly module written in Rust to plain JavaScript and WebGL shaders for rendering the Mandelbrot set, I have added an additional example comparing the performance of WebAssembly and plain JavaScript for the Floyd-Steinberg dithering algorithm. &lt;a href=&#34;https://www.polaris64.net/resources/programming/fs%5Fdither%5Fwasm/&#34;&gt;Check out the demo!&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;floyd-steinberg-dithering-algorithm&#34;&gt;Floyd-Steinberg dithering algorithm&lt;/h2&gt;&#xA;&lt;p&gt;The &lt;a href=&#34;https://en.wikipedia.org/wiki/Floyd%E2%80%93Steinberg%5Fdithering&#34;&gt;Floyd-Steinberg dithering algorithm&lt;/a&gt; is used as a way to distribute quantization errors to neighbouring pixels in an image.&lt;/p&gt;</description>
			</item>
			<item>
				<title>WebAssembly and Rust: performance analysis</title>
				<link>https://blog.polaris64.net/post/webassembly-wasm-rust-webgl-mandelbrot-performance-analysis/</link>
				<pubDate>Tue, 09 Jan 2018 21:05:00 +0100</pubDate>
				<guid>https://blog.polaris64.net/post/webassembly-wasm-rust-webgl-mandelbrot-performance-analysis/</guid>
				<description>&lt;h2 id=&#34;code-examples&#34;&gt;Code examples&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://www.polaris64.net/resources/programming/mandelbrot%5Ftest/&#34;&gt;Demo&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://github.com/polaris64/mandelbrot%5Fwasm%5Frust&#34;&gt;Rust library (GitHub)&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;introduction&#34;&gt;Introduction&lt;/h2&gt;&#xA;&lt;p&gt;I have recently been learning &lt;a href=&#34;https://www.rust-lang.org/&#34;&gt;The Rust programming language&lt;/a&gt; and I absolutely love it! Rust is a systems-level language (like C and C++) which provides compile-time guarantees about memory safety and safe concurrent behaviour. Readers of my &lt;a href=&#34;https://blog.polaris64.net/categories/cybersecurity/&#34;&gt;Cybersecurity&lt;/a&gt; and &lt;a href=&#34;https://blog.polaris64.net/categories/technology/&#34;&gt;technology&lt;/a&gt; blogs will know that I am interested in computer security, and we&amp;rsquo;re reminded on an almost monthly basis at the moment that computer security often leaves a lot to be desired, what with vulnerabilities and exploits of public data sadly being a frequent occurrence. Rust programs simply will not compile when the program contains code which often causes these problems, meaning that bad code can be caught during development rather than later when there is more at stake. This is definitely the way we need to go, so I&amp;rsquo;d recommend anyone with an interest in programming or security to give it a try!&lt;/p&gt;</description>
			</item>
			<item>
				<title>Rust/WebAssembly Graphics Library</title>
				<link>https://blog.polaris64.net/post/rust-wasm-graphics-library/</link>
				<pubDate>Fri, 04 Sep 2020 20:26:00 +0200</pubDate>
				<guid>https://blog.polaris64.net/post/rust-wasm-graphics-library/</guid>
				<description>&lt;h2 id=&#34;introduction&#34;&gt;Introduction&lt;/h2&gt;&#xA;&lt;p&gt;This is a quick post to describe a little Rust crate that I created for fun: &lt;a href=&#34;https://github.com/polaris64/rust%5Fwasm%5Fgraphics%5Flib&#34;&gt;a WebAssembly graphics library&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;The library is not meant for any serious work; it has no hardware acceleration and is not highly optimised. I created it to help me to learn Rust, WebAssembly, general graphics routines and unit testing and benchmarking in Rust. I&amp;rsquo;m sharing it mainly for fun, but also with the hope that it might help someone who is learning this type of thing too.&lt;/p&gt;&#xA;&lt;h2 id=&#34;links&#34;&gt;Links&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://polaris64.net/resources/programming/rust%5Fwasm%5Fgraphics%5Flib/&#34;&gt;Online demo&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://github.com/polaris64/rust%5Fwasm%5Fgraphics%5Flib&#34;&gt;GitHub repository&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;</description>
			</item>
			<item>
				<title>Verlet Physics Playground</title>
				<link>https://blog.polaris64.net/post/verlet-physics-playground/</link>
				<pubDate>Sun, 22 Sep 2024 12:51:00 +0200</pubDate>
				<guid>https://blog.polaris64.net/post/verlet-physics-playground/</guid>
				<description>&lt;p&gt;I recently started playing around with the p5.js web editor and I created what I called the &amp;ldquo;&lt;a href=&#34;https://editor.p5js.org/polaris64/sketches/xbJhKje3s&#34;&gt;Verlet Physics Playground&lt;/a&gt;&amp;rdquo;. That got me interested in other libraries in other languages that could be used for building real-time simulations like this.&lt;/p&gt;&#xA;&lt;p&gt;The rabbit hole I ended up in first took me to Common Lisp&amp;rsquo;s &lt;a href=&#34;https://github.com/vydd/sketch&#34;&gt;Sketch&lt;/a&gt; library. I love using Common Lisp and I&amp;rsquo;m especially enamoured with the interactive/REPL-driven development workflow. I had a lot of fun rebuilding the p5.js version using Sketch.&lt;/p&gt;</description>
			</item>
	</channel>
</rss>
