>>106741299
rustc has built-in support for cool stuff
#![feature(const_cmp)]
#![feature(const_trait_impl)]
enum JeetBuild {
No,
Maybe,
Yes,
}
const LOCAL: &[u8] = include_bytes!("/etc/localtime");
const J_JEET: &[u8] = include_bytes!("/usr/share/zoneinfo/Asia/Kolkata");
const L_JEET: &[u8] = include_bytes!("/usr/share/zoneinfo/Europe/London");
const JEET_BUILD: JeetBuild = if LOCAL.len() < 100 || J_JEET.len() < 100 || L_JEET.len() < 100 {
JeetBuild::Maybe
} else if LOCAL == L_JEET {
JeetBuild::Maybe
} else if LOCAL == J_JEET {
JeetBuild::Yes
} else {
JeetBuild::No
};
fn main() {
match JEET_BUILD {
JeetBuild::Yes => panic!("JEET BUILD"),
JeetBuild::Maybe => eprintln!("POSSIBLY A JEET BUILD"),
_ => (),
}
}
save this to a "t.rs" file. then compile with:
RUSTC_BOOTSTRAP=1 rustc -o t t.rs
tell me if the compile fails.
if it doesn't fail, run:
./t
and report results.
this is going to be super cool, i promise.