Skip to content

Instantly share code, notes, and snippets.

@kestein
kestein / main.rs
Created March 9, 2016 21:02
Rust conditional compile blocks
#![feature(stmt_expr_attributes)] // Need this in order to put the #[cfg] around a block
fn main() {
#[cfg(not(windows))] // Applies to the entire block OR the line directly after it
{
println!("HAHA, WINDOWS NERD");
println!("Richard Stallman > Bill Gates");
}
println!("All done.");
}