Create particle effect with Rust WASM & HTML Canvas

The previous post was a step-by-step tutorial on how to use wasm using Rust and run it in a browser. We built a simple web page with only an input field and a button. In this post, we will make something more interesting by creating a particle system in which 1000 randomly colored particles move in random directions at varying speeds. We will draw particles on HTML Canvas with all the logic done using the Rust wasm module.

Simple tutorial to run Wasm Rust module in a browser

Recently I was experimenting with WebAssembly, a binary format that can be executed in JavaScript environments, such as browsers. It was a lot of fun and I want to share how to create a simple web page that is using wasm module written in Rust language. We will use wasm-bindgen-cli tool to generate .js files and then create a web page that uses the wasm module and test what we created in the browser.

How to install Rust for Windows - A step by step guide

Rust is a general-purpose, somewhat new language, similar to C++ that compiles to a machine code. In this tutorial, we will first install Rust on the Windows system, then check to see if the installation was successful. Finally, we are going to create a hello world app using both the rustc command and cargo package manager.

Rust : Solving `()` doesn't implement `std::fmt::Display` error in Closure

Recently, I have started to learn Rust programming language and while making a simple example that uses a closure, I came across a compile error that was not very informative. It was telling me that `()` doesn't implement `std::fmt::Display`. This post will show the code causing the error, what the error means, and the solution to the error.