From 27e5e253ae7aef3177424072ddbcdd5508ce4d04 Mon Sep 17 00:00:00 2001 From: Greg Shuflin Date: Tue, 6 Jan 2026 13:05:54 -0800 Subject: [PATCH] Documentation update --- README.md | 27 +++++++++++++++++++++------ justfile | 3 +++ 2 files changed, 24 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 1e77903..8fca476 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,25 @@ # Lean SDL3 Bindings -How to use: -Add this library as a dependency in your lakefile.lean (Not .toml) +This is my (Greg Shuflin's) fork of Srayan Jana's [Lean +SDL3](https://github.com/ValorZard/lean-sdl3) bindings. I've added a few +additional SDL3 bindings, particularly ones necessary to make the webcam work. +Note that this is an incomplete, work-in-progress project. + +## Sample Projects + +In this repo, run `just run` to build and run the original sdl3 demo, which +displays some basic graphics and plays an mp3. Run `just webcam` to build and +run the webcam demo, which accesses a webcam (if one exists) and mirrors its +video on the screen. + +If you want to see an example project that uses these bindings, check this out: + +https://github.com/ValorZard/lean-sdl-test + +## How to use: + +If you want to use SDL3 bindings in your own Lean4 project, add this library as +a dependency in your `lakefile.lean` (Not `.toml`) In your default target in your project, make sure you do something like this @@ -14,13 +32,10 @@ lean_exe «lean-sdl-test» where moreLinkArgs := if !System.Platform.isWindows then #["-Wl,--allow-shlib-undefined", "-Wl,-rpath=$ORIGIN"] else #[] ``` -If you want to see an example project that uses these bindings, check this out: - -https://github.com/ValorZard/lean-sdl-test ## Acknowledgements MASSIVE thanks to Oliver Dressler (@oOo0oOo) and Mac Malone (@tydeu) for all the help they gave! ## License & Attribution -MIT \ No newline at end of file +MIT diff --git a/justfile b/justfile index 2c01405..e40b52e 100644 --- a/justfile +++ b/justfile @@ -2,14 +2,17 @@ _default: @just --list +[doc: "Build the sdl3 test app"] build: lake build test-app patchelf --set-interpreter /usr/lib/ld-linux-x86-64.so.2 .lake/build/bin/test-app patchelf --set-rpath '$ORIGIN:/usr/lib' .lake/build/bin/test-app +[doc: "Run the sdl3 test app"] run: build .lake/build/bin/test-app +[doc: "Build and run the webcam demo"] webcam: lake build webcam-app patchelf --set-interpreter /usr/lib/ld-linux-x86-64.so.2 .lake/build/bin/webcam-app