#api-bindings #n64 #mupen #m64p

mupen64plus

High-level Rust bindings to the Mupen64Plus Core API

3 releases (breaking)

0.3.0 Jan 19, 2024
0.2.0 Sep 15, 2021
0.1.0 Sep 14, 2021

#80 in Emulators

Download history 22/week @ 2024-02-12 22/week @ 2024-02-19 26/week @ 2024-02-26 2/week @ 2024-03-11 55/week @ 2024-04-01

57 downloads per month

GPL-2.0 license

42KB
1K SLoC

mupen64plus

crates.io badge docs.rs badge

High-level Rust bindings to the Mupen64Plus Core API.

use mupen64plus::{Core, Plugin};

let core = Core::load_from_directory(&path)
    .or_else(|_| Core::load_from_system())?;

let mut mupen = core.start(Some(&path), Some(&path))?;

mupen.open_rom(&mut load_rom()?)?;

for name in &["video-glide64mk2", "audio-sdl", "input-sdl", "rsp-hle"] {
    let p = format!("mupen64plus-{}.{}", name, std::env::consts::DLL_EXTENSION);
    mupen.attach_plugin(Plugin::load_from_path(p)?)?;
}

mupen.execute()?;

A more detailed example can be found here, which can be run with:

cargo run --example frontend

Dependencies

~0.6–3MB
~60K SLoC