pe-assembler 0.1.1

PE/COFF assembler for Windows instruction sets - strongly typed, object-oriented, zero-dependency core
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#![doc = include_str!("readme.md")]

pub mod reader;

use crate::types::CoffObject;
use gaia_types::{helpers::open_file, GaiaError};
pub use reader::ObjReader;
use std::{io::BufReader, path::Path};

// Convenience function, maintaining backward compatibility
pub fn coff_from_file<P: AsRef<Path>>(path: P) -> Result<CoffObject, GaiaError> {
    let (file, _url) = open_file(path.as_ref())?;
    let reader = ObjReader::new(BufReader::new(file));
    reader.read_object().result
}