Skip to content

Just a simple proof-of-concept of using Raylib from LLVM IR directly

License

Notifications You must be signed in to change notification settings

TsukiGva2/raylib-llvm-ir

 
 

Repository files navigation

llvm-ir-raylib

Simple llvm-ir example using raylib to make a bouncing square.

tsoding

Watch the stream by Tsoding Daily!

First, i want to thank Tsoding for this cool learning experience, llvm ir is something i've been wanting to dive in for a while, and that was just what i needed to get me hooked into it!

Many thanks to the creator and contributors of raysan5/raylib for providing such a nice and simple API for game development.

I also want to thank the author(s) of rhysd/vim-llvm for the amazing work, worked like a charm and it's got the coolest syntax highlighting ever.

this repo contains my notes and me messing around with the clang compiler's llvm backend. it consists of a simple bouncing square animation using nothing more than raylib and LLVM IR, which is commonly used as a target language for compilers and not as an actual programming language. But it still crazy what you can do with it (and how readable it can actually get if you try hard enough XD).

My approach to writing the code and uncovering things was quite a bit different, as i tried to keep some comments so i wouldn't get lost in this thing, this made it quite a cool learning experience if you want to get llvm basics down. I'd say check out loop.ll/hello.ll first, then move on to game.ll to really get hands-on with it.

Some cool screenshots

Screenshot_2024-08-08_00-14-19

Screenshot_2024-08-08_00-09-18

About

Just a simple proof-of-concept of using Raylib from LLVM IR directly

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • LLVM 99.2%
  • Makefile 0.8%