Skip to content

leo60228/rust-saber

Repository files navigation

rust-saber

rust-saber allows writing mods for the Oculus Quest version of Beat Saber in Rust.

Examples

#[repr(C)]
#[derive(Default)]
pub struct Color {
    pub r: f32,
    pub g: f32,
    pub b: f32,
    pub a: f32,
}

#[rust_saber::hook(0x12DC59C, "example")]
pub unsafe fn get_color(orig: GetColorFn, this: *mut std::ffi::c_void) -> Color {
    let orig_color = unsafe { orig(this) };
    Color {
        r: 1.0,
        g: orig_color.g,
        b: orig_color.b,
        a: orig_color.a,
    }
}

The full version of this example can be found at https://github.com/leo60228/rust-saber/tree/master/sample_mod.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages