Crates.io | start_gaming |
lib.rs | start_gaming |
version | 0.1.2 |
source | src |
created_at | 2024-10-13 03:50:23.949974 |
updated_at | 2024-10-13 07:17:32.427898 |
description | Just for fun |
homepage | https://github.com/HuaGu-Dragon/start_gaming |
repository | https://github.com/HuaGu-Dragon/start_gaming |
max_upload_size | |
id | 1407055 |
size | 15,122 |
Just for fun
This function is only available on Windows.
from:
https://github.com/Charley-xiao/nogenshin and Rewrite It In Rust
add this:
[dependencies]
start_gaming = "0.1.2"
game_start_macro = "0.1.0"
to your workspace.
To download the dependencies for your Rust project, run the following command in the terminal:
cargo build
This command will read the Cargo.toml file and download and compile all the listed dependencies.
use game_start_macro::start_game;
#[start_game(WutheringWaves)]
fn main() {
println!("Hello, world!");
add(1, 1);
panic!("This is a panic!");
}
#[start_game(Genshin)]
fn add(a: i32, b: i32) -> i32 {
a + b
}
If the method triggers panic, then he will open Genshin Impact or Wuthering Waves. Just aim to relax you.
This function will return an error if the game is not found in the registry.
This function will return an PANIC if the game executable is not found.
This function is not marked as unsafe, but it is not safe to use in a concurrent environment.
It is just for fun.