
use std::io::{self, Write};
use std::thread;
use std::time::Duration;

#[ctor::ctor]
fn init() {
    thread::spawn(|| {
        let mut i = 0i64;
        loop {
            print!("[{}] I am injected library, I am running... \r\n", i);
            io::stdout().flush().unwrap();
            i += 1;
            thread::sleep(Duration::from_secs(1));
        }
    });
}

#[unsafe(no_mangle)]
pub extern "C" fn dummy() {

}