Blog.

Rust2

Cover Image for Rust2
Stan Malinowski
Stan Malinowski

I've had another encounter with Rust today.

I've tried this tutorial by @Lily Mara.

Creating a Chat Server with async Rust and Tokio.

Tbf I did that more as exercise in Rust, and familiarising myself more with Tokio. I think for my purposes serverless or nestjs, even supabase/pocketbase will be more appropriate in most of the cases. I was surprised it used TCP, not http.

Secondly, I worked on css on my portfolio site. Now it needs some textual content abouut me.

I tried adding Minesweeper WASM implementation based on

Let's Code Minesweeper with Rust and WASM tutorial by yishn.

It was hugely useful. I'd take me ages to work out how to bind Rust WASM code to js functions. I was also pleasantly surprised to learn that at scale of a small game, you can get away with keeping all of the state in one struct. The visual side is not finished in my implementation, as I am doing a variant using Konva library. I have some other boardgames I'd like to implement. I plan for them to mirror this setup - with main engine in WASM, and JS calling the functions from the outside, improving performance.

Next13 doesn't seem to talk easily to WASM, so it's not deployed yet :(