Skip to content

About

209 raylib examples in jank — native Clojure compiled to native code via C++/LLVM, calling raylib directly through jank's C++ interop

Topics

Resources

Contributing

Stars

3 stars

Watchers

0 watching

Forks

Latest commit

 

History

155 Commits

Folders and files

Repository files navigation

raylib-jnk

A guide to calling C and C++ from jank, a native Clojure dialect that compiles to native code via C++/LLVM rather than the JVM, written while porting the official raylib examples. It covers the rules that shape every jank/C++ interop pattern, from native-value lifetimes to coercion, numeric performance and which raylib APIs are reachable today.

The examples themselves live in b12n-oss/raylib-jank-demo: the ported example programs, the helper namespaces, the vendored raylib assets, the demo GIFs and the build tooling. This repo keeps only the documentation.

Where things are

Known limitations

  • rlgl-compute does not run out of the box. It needs OpenGL 4.3 compute-shader support (rlLoadShaderProgramCompute, SSBOs, rlComputeShaderDispatch). raylib is built by the official raylib-sys package at OpenGL 3.3, which is what raylib's own Desktop default resolves to, and 3.3 is the practical ceiling on macOS anyway (Apple caps out at OpenGL 4.1; GLFW rejects a 4.3 context request unconditionally there, regardless of any compatibility hint). Running it on a platform where 4.3 is real would mean building raylib yourself with OPENGL_VERSION "4.3" instead of taking the published package. The example is in raylib-jank-demo.

Documentation

The guide covers the native-value-lifetime rule that shapes every jank/C++ interop pattern, a C-interop toolbox, why a hot numeric loop wants cpp/ operators rather than ordinary jank arithmetic, raylib API coverage notes and the porting workflow. Where a page cites an example, it links to the source in raylib-jank-demo.

CI rebuilds the site on every pull request. Publishing from main is gated by the workflow, see .github/workflows/site.yml.

Credits

The overall lein-jank-based project layout the examples started from originates from Kyle Cesare's kylc/lein-jank-playground. raylib itself is by Ramon Santamaria (@raysan5) and contributors, under its own zlib license.

Changelog

CHANGELOG.md records what has changed since the repo went public.

Contributing

Corrections and additions to the guide are welcome. See CONTRIBUTING.md.

License

EPL 2.0, matching jolt and the rest of the fleet. It was zlib until 2026-09-05. EPL 2.0 relicenses nothing that arrived under another licence: raylib and its examples remain zlib, and the ports stay derived works of them, so those terms carry through. NOTICE records every attribution and what was altered in each.

About

209 raylib examples in jank — native Clojure compiled to native code via C++/LLVM, calling raylib directly through jank's C++ interop

Topics

Resources

Contributing

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors