1
0
Fork 0
mirror of https://github.com/jugeeya/UltimateTrainingModpack.git synced 2025-03-04 13:52:21 +00:00
UltimateTrainingModpack/src/lib.rs

26 lines
463 B
Rust
Raw Normal View History

2020-04-08 00:21:52 -04:00
#![no_std]
#![feature(proc_macro_hygiene)]
2020-04-08 00:21:52 -04:00
use skyline::{hook, hooks};
#[hook(sym = "nn::fs::MountSaveData")]
fn test1(path: *const u8, user_id: u64) {
println!("user id: {}", user_id);
}
#[hook(inline, offset = 0x71000030)]
fn test2(x: u32) -> u64 {
(x as u64) + 1
}
#[skyline::main]
2020-04-08 00:21:52 -04:00
pub fn main() {
2020-04-08 01:13:06 -04:00
println!("Hello from Skyline Rust Plugin!\n");
2020-04-08 00:21:52 -04:00
2020-04-08 01:13:06 -04:00
for i in 0..3 {
println!("{}", i);
2020-04-08 00:21:52 -04:00
}
hooks![test1, test2].install_hooks();
2020-04-08 00:21:52 -04:00
}