1 use curl::easy::Easy;
2 
hook()3 pub extern "C" fn hook() {
4     let mut easy = Easy::new();
5     easy.url("google.com").unwrap();
6     easy.write_function(|data| Ok(data.len())).unwrap();
7     easy.perform().unwrap();
8 }
9 
main()10 fn main() {
11     curl::init();
12     hook();
13     unsafe {
14         libc::atexit(hook);
15     }
16     println!("Finishing...")
17 }
18