1
0
Fork 0
mirror of https://github.com/jugeeya/UltimateTrainingModpack.git synced 2024-12-13 11:59:51 +00:00
UltimateTrainingModpack/src/lib.rs

28 lines
507 B
Rust
Raw Normal View History

2020-04-08 04:21:52 +00:00
#![no_std]
#![feature(proc_macro_hygiene)]
2020-04-08 04:21:52 +00:00
2020-04-09 02:39:10 +00:00
use skyline::hook;
#[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 04:21:52 +00:00
pub fn main() {
2020-04-08 05:13:06 +00:00
println!("Hello from Skyline Rust Plugin!\n");
2020-04-08 04:21:52 +00:00
2020-04-08 05:13:06 +00:00
for i in 0..3 {
println!("{}", i);
2020-04-08 04:21:52 +00:00
}
2020-04-09 02:39:10 +00:00
for hook in skyline::iter_hooks() {
println!("hook: {}", hook.info.fn_name);
}
2020-04-08 04:21:52 +00:00
}