skyline

Crates.ioskyline
lib.rsskyline
version0.2.1
sourcesrc
created_at2020-09-08 01:49:34.87317
updated_at2022-08-31 18:52:23.985022
descriptionA library for helping patch and modify Nintendo Switch games
homepage
repositoryhttps://github.com/ultimate-research/skyline-rs
max_upload_size
id285977
size47,112
(jam1garner)

documentation

README

skyline-rs

A Rust library for working with Skyline to allow you to write game code modification for Nintendo Switch games using Rust.

For no_std use, disable the std feature (enabled by default).

Suggested for use with cargo-skyline.

Example:

extern "C" fn test() -> u32 {
    2
}

#[skyline::hook(replace = test)]
fn test_replacement() -> u32 {

    let original_test = original!();

    let val = original_test();

    println!("[override] original value: {}", val); // 2

    val + 1
}

#[skyline::main(name = "skyline_rs_template")]
pub fn main() {
    println!("Hello from Skyline Rust Plugin!");

    skyline::install_hook!(test_replacement);

    let x = test();

    println!("[main] test returned: {}", x); // 3
}
Commit count: 82

cargo fmt