What programming languages can be used in writing cores?

A libretro implementation should be compiled into a dynamically loadable executable (.dll/.so/.dylib) or a static library (.a/.lib) that exports all the functions outlined in libretro.h.

What programming languages satisfy the above requirements? I know that C and C++ can use the library directly. I also know that there are Rust bindings. Are there other languages that work, though?

Yeah, pretty much anything that can work with C should be fine.

In the libretro-samples repository, there are also examples about freebasic and pascal :wink:

For Rust, there is for example this project Unicorn Console which has libretro backend.

2 Likes

I also have a python sample here https://github.com/bparker06/button_test_py that uses C to set everything up normally and then calls retro_run() from a python script.

3 Likes

That is an interesting way of working with Python. How would that work with a Libretro frontend? What about the fact that Python is an interpreted language?