Our great sponsors
-
glicol-wgpu
A wgpu-based code editor for Glicol programming language, offering cross-platform functionality for desktop and web browsers, powered by WebGPU.
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
https://github.com/bebrws/bevy-snake
I had a lot of fun practicing Rust and Learning some Bevy concepts with this repository.
Bevy has an incredibly powerful dependency injection system and follows a pattern called ECS which makes it very powerful (and new to me).
This simple < 300 lines of code might help with learning some Bevy concepts.
It also shows how to copmile for the web/WASM and inject a canvas for the game (or use a pre existing div).
Nice.
Speaking of Snake game, if you want to go even deeper, you can try to use the wgpu crate to combine Rust and WebGPU to write everything from scratch. Here is the tutorial:
https://sotrh.github.io/learn-wgpu/#what-is-wgpu
I once wrote a code editor with wgpu, from font rendering to char/line state management (very rough) for music live coding:
https://github.com/glicol/glicol-wgpu
It runs in browsers, even including Safari!
Nice.
Speaking of Snake game, if you want to go even deeper, you can try to use the wgpu crate to combine Rust and WebGPU to write everything from scratch. Here is the tutorial:
https://sotrh.github.io/learn-wgpu/#what-is-wgpu
I once wrote a code editor with wgpu, from font rendering to char/line state management (very rough) for music live coding:
https://github.com/glicol/glicol-wgpu
It runs in browsers, even including Safari!