Skip to main content

Crate ldconfig

Crate ldconfig 

Source
Expand description

A portable Rust implementation of ldconfig for managing dynamic linker cache files.

This library provides high-level APIs for:

  • Reading and exploring ld.so.cache files
  • Parsing ld.so.conf configuration files
  • Building cache files by scanning library directories
  • Writing cache files to disk

§Example: Read a cache file

use ldconfig::Cache;

let cache = Cache::from_file("/etc/ld.so.cache")?;
println!("{}", cache);

§Example: Build and write a cache

use ldconfig::{SearchPaths, Cache};

let search_paths = SearchPaths::from_file("/etc/ld.so.conf", None)?;
let cache = Cache::builder()
    .build(&search_paths)?;
cache.write_to_file("/etc/ld.so.cache")?;

Structs§

Cache
Cache for dynamic linker library information
CacheBuilder
Use builder syntax to set the inputs and finish with build().
CacheEntry
A cache entry representing a library
CacheInfo
Information about the cache file
Error
Errors encountered while reading or writing the cache
SearchPaths
List of directories to scan for libraries