libretro-backend

Crates.iolibretro-backend
lib.rslibretro-backend
version0.2.1
sourcesrc
created_at2016-10-24 16:24:11.617304
updated_at2017-04-18 14:50:22.011627
descriptionIdiomatic Rust API bindings to the libretro API
homepagehttps://github.com/koute/libretro-backend
repositoryhttps://github.com/koute/libretro-backend
max_upload_size
id6993
size38,653
Koute (koute)

documentation

README

Libretro API bindings for Rust

Documentation

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:

[lib]
crate-type = ["cdylib"]

[dependencies]
libretro-backend = "0.2"

and this to your crate root:

#[macro_use]
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.

License

Licensed under either of

at your option.

Contribution

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.

Commit count: 18

cargo fmt