#![deny(missing_debug_implementations, missing_copy_implementations)]
#![warn(missing_docs, rustdoc::missing_crate_level_docs)]
#![doc = include_str!("readme.md")]
#![doc(html_logo_url = "https://raw.githubusercontent.com/oovm/shape-rs/dev/projects/images/Trapezohedron.svg")]
#![doc(html_favicon_url = "https://raw.githubusercontent.com/oovm/shape-rs/dev/projects/images/Trapezohedron.svg")]
use crate::{formats::exe::writer::ExeWriter, helpers::PeWriter, types::PeProgram};
use gaia_types::{
helpers::{create_file, Url},
Result,
};
use std::path::Path;
pub mod formats;
pub mod helpers;
pub mod types;
pub fn exe_write_path(pe: &PeProgram, path: &Path) -> Result<Url> {
let (file, url) = create_file(path)?;
let mut exe = ExeWriter::new(file);
exe.write_program(pe)?;
Ok(url)
}