Zulip Chat Archive

Stream: general

Topic: Fun with SDL3


Greg Shuflin (Dec 27 2025 at 07:38):

I've been playing around with the Lean SDL3 bindings (https://github.com/ValorZard/lean-sdl3) originally written by @Srayan Jana , and I thought I'd post about it. I'm interested in using Lean as a language for ordinary software development, including software that interacts with the graphics, audio, etc. functionality that SDL3 provides.

https://code.everydayimshuflin.com/greg/lean-sdl3 is my fork of the lean-sdl3 bindings, to which I've added https://code.everydayimshuflin.com/greg/lean-sdl3/src/branch/master/WebcamApp.lean , which performs the fairly-simple task of opening the webcam (if one exists) and displaying it in a window. This mostly involved adding a few more SDL C FFI bindings to the ones that were already present (as well as fixing a few bugs in the existing bindings), namely the functions for interacting with the webcam, and working with displaying a texture obtained from the webcam in a window. If anyone wants to play with this this locally, lake build webcam-app, and let me know if there's any local state on your system that makes this not build.

I'm already getting sick of manually writing C bindings for lean and I now want to write something like Rust's bindgen (or adapt something that already exists perhaps?).

Srayan Jana (Dec 30 2025 at 06:54):

@Greg Shuflin https://github.com/karl-zylinski/odin-c-bindgen
Something like this might be a good reference for you

Srayan Jana (Jan 06 2026 at 21:14):

oh one more thing @Greg Shuflin , i dunno if youd be interested, but Id appreciate if you could send a PR my way. I've mostly moved on from working on Lean stuff or now, but I'd want to keep that repository up to date

Srayan Jana (Jan 06 2026 at 21:15):

If you're willing, I could even transfer ownership to you (or, maybe just make a github organziation called lean-gamedev and then adding you to it)

Greg Shuflin (Jan 07 2026 at 10:56):

Srayan Jana said:

If you're willing, I could even transfer ownership to you (or, maybe just make a github organziation called lean-gamedev and then adding you to it)

Sure, feel free to do either of those things with your existing repo. I like to host code I write on my own infrastructure rather than github where possible, but I do have a github account (I'm @neunenak there).

Srayan Jana (Jan 08 2026 at 08:33):

@Greg Shuflin for now I’ve added a link to your repo in the readme: https://github.com/ValorZard/lean-sdl3

I’ll wait until there are further developments I guess before doing anything else lol


Last updated: Feb 28 2026 at 14:05 UTC