Search
 
SCRIPT & CODE EXAMPLE
 

RUST

rust get crate version

const VERSION: &'static str = env!("CARGO_PKG_VERSION");
const OPTION_VERSION: Option<&'static str> = option_env!("CARGO_PKG_VERSION");

// ...

println!("MyProgram v{}", VERSION);
println!("MyProgram v{}", OPTION_VERSION.unwrap_or("unknown"));
Comment

PREVIOUS NEXT
Code Example
Rust :: rust comment 
Rust :: rust reverse an array 
Rust :: create empty string rust 
Rust :: rustlang string 
Rust :: rust import file 
Rust :: read line rust 
Rust :: rust option 
Rust :: enum rust 
Rust :: struct in rust 
Rust :: char to upper case rust 
Rust :: rust html parser 
Rust :: input output rust 
Rust :: rust•armanriazi•type•wraper•mutable 
Rust :: rust spinning rod animation in text 
Rust :: rust Pause execution for several seconds 
Rust :: armanriazi•rust•comparison•iter•vs•for 
Rust :: bevy disable plugin 
Rust :: rust•armanriazi•error•[E0596]: cannot borrow `self.` as mutable, as it is behind a `&` reference 
Rust :: rust run tests without cargo 
Lua :: luau rainbow part 
Lua :: luau make region 
Lua :: roblox how to tween part color 
Lua :: roblox how to find value in table 
Lua :: how to make a color changing brick in roblox studio 
Lua :: round to the nearest number lua 
Lua :: lua script 
Lua :: lua hash table length 
Lua :: can you throw an error forceable in lua 
Lua :: when do true loop on roblox 
Matlab :: matlab get real and imaginary part 
ADD CONTENT
Topic
Content
Source link
Name
5+7 =