1#![deny(missing_debug_implementations, missing_copy_implementations)]
2#![warn(missing_docs, rustdoc::missing_crate_level_docs)]
3#![doc = include_str!("readme.md")]
4#![doc(html_logo_url = "https://raw.githubusercontent.com/oovm/shape-rs/dev/projects/images/Trapezohedron.svg")]
5#![doc(html_favicon_url = "https://raw.githubusercontent.com/oovm/shape-rs/dev/projects/images/Trapezohedron.svg")]
6
7use crate::{formats::exe::writer::ExeWriter, helpers::PeWriter, types::PeProgram};
8use gaia_types::{
9 helpers::{create_file, Url},
10 Result,
11};
12use std::path::Path;
13
14pub mod formats;
15pub mod helpers;
16pub mod types;
17
18pub fn exe_write_path(pe: &PeProgram, path: &Path) -> Result<Url> {
45 let (file, url) = create_file(path)?;
46 let mut exe = ExeWriter::new(file);
47 exe.write_program(pe)?;
48 Ok(url)
49}