PeLite
Lightweight, memory-safe, zero-allocation library for reading and navigating PE binaries.
Design
The purpose of this library is inspecting PE binaries (whether on disk or already loaded in memory).
A trade-off was made to not unify the 32-bit (PE32) and 64-bit (PE32+) formats for two reasons:
-
There are small but incompatible differences, which would add overhead by requiring constant matching even if at source code level the match arms look identical.
-
Most of the time you know (at build time) what format you're working with anyway.
This makes it rather awkward to work with both formats together transparently.
Note that while the correct name is PE32+, the name PE64 is used as it is a valid identifier; they are otherwise synonymous.
Tools
Included are bins showing some uses for the library, try them out on the demos!
Library
This library is available on crates.io.
Documentation can be found on docs.rs.
In your Cargo.toml, put
[dependencies]
pelite = "0.7"
Examples
Try this example out: cargo run --example readme
.
extern crate pelite;
use FileMap;
use ;
License
Licensed under MIT License, see license.txt.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, shall be licensed as above, without any additional terms or conditions.