Inital (stash) commit

This commit is contained in:
2023-05-12 22:23:58 +02:00
commit f86ed5fda6
14 changed files with 558 additions and 0 deletions

2
rs/.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
/target
/Cargo.lock

11
rs/Cargo.toml Normal file
View File

@@ -0,0 +1,11 @@
[package]
name = "loud"
version = "0.1.0"
edition = "2021"
[lib]
crate-type = ["cdylib"]
[dependencies]
libc = "0.2.144"
ctor = "0.2.0"

14
rs/src/lib.rs Normal file
View File

@@ -0,0 +1,14 @@
#[ctor::ctor]
fn pre() {
println!("Fuck you");
}
/*
#[no_mangle]
unsafe extern "C" fn write(fd: libc::c_int, buf: *const libc::c_void, len: libc::size_t) -> libc::ssize_t {
println!("hook'd!");
libc::write(fd, buf, len)
}
*/
#[cfg(test)]
mod test;