Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
extern crate proc_macro;
use proc_macro::TokenStream;

use std::{io::Write, thread::sleep, time::Duration};
const RICK: &[u8] = include_bytes!("../sus.bin");

#[proc_macro]
pub fn rickroll(_item: TokenStream) -> TokenStream {
	let mut out = std::io::stdout();
	println!("aaa");
	for frame in RICK.chunks_exact(96 * 36) {
		out.write_all(frame).unwrap();
		out.flush().unwrap();
		sleep(Duration::from_millis(115));
	}
	"".parse().unwrap()
}