Skip to content

Instantly share code, notes, and snippets.

@AwlsomeAlex
Created June 9, 2019 15:49
Show Gist options
  • Save AwlsomeAlex/47780528ccab426e06a292af80c802a2 to your computer and use it in GitHub Desktop.
Save AwlsomeAlex/47780528ccab426e06a292af80c802a2 to your computer and use it in GitHub Desktop.
Small little Rust Executable to run as Linux Kernel /init when Statically Linked
use std::{thread, time};
fn main() {
let sleep_time = time::Duration::from_millis(1000000);
let now = time::Instant::now();
println!("\x1B[33mHello from Rust!\x1B[0m");
thread::sleep(sleep_time);
assert!(now.elapsed() >= sleep_time);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment