#libretro #backend #api-bindings #emulation


Idiomatic Rust API bindings to the libretro API

3 unstable releases

Uses old Rust 2015

0.2.1 Apr 18, 2017
0.2.0 Mar 24, 2017
0.1.0 Oct 24, 2016

47 downloads per month


604 lines

Libretro API bindings for Rust


This crate exposes idiomatic Rust API bindings to the excellent libretro API.

The target audience of this library are emulator authors who want to turn their emulator into a libretro core, which relieves them from the necessity of creating a full blown frontend for their emulator and allows them to concentrate on actual emulation.

In its current state there is still a lot of features missing, nevertheless it should be useful enough to create a basic emulator.

As always, contributions are welcome!

Getting started

Add this to your Cargo.toml:

crate-type = ["cdylib"]

libretro-backend = "0.2"

and this to your crate root:

extern crate libretro_backend;

then just implement the Core trait:

struct Emulator {
    // ...

impl libretro_backend::Core for Emulator {
    // ...

and use a macro:

libretro_core!( Emulator );

For a full example you can check out this file, which is part of my NES emulator Pinky.


Licensed under either of

at your option.


Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.