Chess


May 11, 2025

Rust & Iced: Let's draw some arrows!

I have been working on a chess desktop application using the iced GUI library. This is my first big project using rust, so it has been a fun endeavor learning iced as well as rust at the same time. The iced documentation is almost non-existent, so hopefully i can document some of my learnings here for future reference. The iced API is also evolving rapidly, so its possible this gets obsolete pretty quickly, but the general ideas here will still be valid. One of the features I am implementing is the ability to show the contents of a chess pgn file on a chessboard, which means building out a full fledged chessboard in iced. Visual annotations, like arrows, are incredibly useful for highlighting key moves and strategic ideas in chess analysis. In this post, I’ll guide you through the process of drawing these arrows using the Iced Rust GUI library’s canvas feature.