Bindings to libkmod to manage linux kernel modules.
```
[dependencies] kmod = "0.2" ```
To get started, see the [docs] and the examples/ folder. ```rust extern crate kmod; extern crate env_logger;
fn main() { env_logger::init();
let ctx = kmod::Context::new().expect("kmod ctx failed");
for module in ctx.modules_loaded().unwrap() {
let name = module.name();
let refcount = module.refcount();
let size = module.size();
let holders: Vec<_> = module.holders()
.map(|x| x.name())
.collect();
println!("{:<19} {:8} {} {:?}", name, size, refcount, holders);
}
} ```
MIT/Apache-2.0