Skip to content

Instantly share code, notes, and snippets.

@vurpo
Last active May 12, 2016 21:08
Show Gist options
  • Save vurpo/260896077262650a9421eb1bc5a42cfb to your computer and use it in GitHub Desktop.
Save vurpo/260896077262650a9421eb1bc5a42cfb to your computer and use it in GitHub Desktop.
Simple enough Rust quine (no cheats, doesn't depend on environment, filename, file, encoding, etc.)
static CODE: &'static str = r#"fn main() {print!("static CODE: &'static str = r#\"{}\"{};\n{}", CODE, '#', CODE);}"#;
fn main() {print!("static CODE: &'static str = r#\"{}\"{};\n{}", CODE, '#', CODE);}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment