1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
|
# `findshlibs`
[](https://crates.io/crates/findshlibs)
[](https://docs.rs/findshlibs)
[](https://github.com/gimli-rs/findshlibs/actions)
Find the shared libraries loaded in the current process with a cross platform
API.
## Documentation
[📚 Documentation on docs.rs 📚](https://docs.rs/findshlibs)
## Example
Here is an example program that prints out each shared library that is
loaded in the process and the addresses where each of its segments are
mapped into memory.
```rust
extern crate findshlibs;
use findshlibs::{Segment, SharedLibrary, TargetSharedLibrary};
fn main() {
TargetSharedLibrary::each(|shlib| {
println!("{}", shlib.name().to_string_lossy());
for seg in shlib.segments() {
println!(" {}: segment {}",
seg.actual_virtual_memory_address(shlib),
seg.name().to_string_lossy());
}
});
}
```
## Supported OSes
These are the OSes that `findshlibs` currently supports:
* Linux
* macOS
* Windows
* Android
* iOS
If a platform is not supported then a fallback implementation is used that
does nothing. To see if your platform does something at runtime the
`TARGET_SUPPORTED` constant can be used.
Is your OS missing here? Send us a pull request!
|