Skip to content

Commit

Permalink
updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Starke committed Jun 30, 2021
1 parent 5c99615 commit 5144e1f
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,29 @@
![Crates.io](https://img.shields.io/crates/v/libpefile?style=plastic)

# libpefile

library to parse PE files

## Installation

```
cargo install libpefile
```

## Usage example

```rust
use libpefile::*;
use std::path::PathBuf;

fn main() -> std::io::Result<()> {
let manifest_dir = std::env::var("CARGO_MANIFEST_DIR").unwrap();
let dll_file = PathBuf::from(format!("{}/samples/msaudite.dll", manifest_dir));
let pefile = PEFile::new(dll_file)?;

for msg in pefile.messages_iter()? {
println!("{}: '{}'", msg.msg_id, msg.text);
}
Ok(())
}
```

0 comments on commit 5144e1f

Please sign in to comment.