mirror of
https://git.proxmox.com/git/rustc
synced 2025-08-16 16:40:17 +00:00
18 lines
328 B
Rust
18 lines
328 B
Rust
use curl::easy::Easy;
|
|
|
|
pub extern "C" fn hook() {
|
|
let mut easy = Easy::new();
|
|
easy.url("google.com").unwrap();
|
|
easy.write_function(|data| Ok(data.len())).unwrap();
|
|
easy.perform().unwrap();
|
|
}
|
|
|
|
fn main() {
|
|
curl::init();
|
|
hook();
|
|
unsafe {
|
|
libc::atexit(hook);
|
|
}
|
|
println!("Finishing...")
|
|
}
|