Search
 
SCRIPT & CODE EXAMPLE
 

RUST

how to check for os in rust

// rust programming language
if cfg!(windows) {
    println!("this is windows");
} else if cfg!(unix) {
    println!("this is unix alike");
}

//you can also use #[cfg(target_os="my_os")] or just #[cfg(my_os)]
Comment

PREVIOUS NEXT
Code Example
Rust :: rust round 2 decimal places 
Rust :: armanriazi•rust•vec•some•pop 
Rust :: rust concat 
Rust :: armanriazi•rust•Rc 
Rust :: pause rust 
Rust :: Project Euler #1 Multiples of 3 or 5 
Rust :: regex in rust 
Rust :: armanriazi•rust•borrowchecker•lifetime•static 
Rust :: floor float rust 
Rust :: armanriazi•rust•interior-mutability•vs•inherited-mutability 
Rust :: armanriazi•rust•clone•vs•copy 
Rust :: rust create derive trait 
Rust :: rust return the result with trait exit status 
Rust :: armanriazi•rust•error•E0605•non-primitive cast 
Rust :: armanriazi•rust•borrowchecker•lifetime•struct 
Rust :: armanriazi•rust•thread•channel 
Rust :: rust range step 
Lua :: lua how to get random object from a table 
Lua :: roblox player joined 
Lua :: roblox tween color 
Lua :: luau table find 
Lua :: roblox how to get character from player 
Lua :: roblox luau random number 
Lua :: lua len array 
Lua :: How to split license id fivem 
Lua :: lua input 
Lua :: insert item array pico8 
Lua :: roblox lua scripts 
Matlab :: octave mark axis labels 
Matlab :: how do i call a function inside another function in mat 
ADD CONTENT
Topic
Content
Source link
Name
6+3 =