lief

Crates.iolief
lib.rslief
version0.16.0
sourcesrc
created_at2022-07-03 05:37:47.16286
updated_at2024-12-10 11:13:35.639291
descriptionOfficial Rust bindings for LIEF
homepagehttps://lief.re
repositoryhttps://github.com/lief-project/LIEF
max_upload_size
id618181
size4,288,406
Romain Thomas (romainthomas)

documentation

https://lief.re/doc/stable/rust/lief/

README

LIEF Rust Bindings

These are the offical rust bindings for LIEF.

LIEF Architecture

Getting Started

[dependencies]
lief = "0.16.0"

The bindings require Rust edition 2021 and rustc >= 1.74.0

use lief;

if let Some(lief::Binary::ELF(elf)) = lief::Binary::from(&mut file) {
    println!("Dependencies:");
    for entry in elf.dynamic_entries() {
        if let dynamic::Entries::Library(lib) = entry {
            println!("  - {}", lib.name());
        }
    }
    println!("Versions:");
    for version in elf.symbols_version_requirement() {
        println!("  From {}", version.name());
        for aux in version.auxiliary_symbols() {
            println!("    - {}", aux.name());
        }
    }
}

Documentation

Commit count: 1798

cargo fmt