pub fn dylib_write_path(macho: &MachoProgram, path: &Path) -> Result<Url>Expand description
将 Mach-O 程序写入到指定路径的动态库文件
这是一个高级 API 函数,隐藏了 DylibWriter 的直接使用细节。
§参数
macho- 要写入的 Mach-O 程序path- 输出文件路径
§返回值
成功时返回文件的 URL,失败时返回 GaiaError
§示例
use macho_assembler::dylib_write_path;
use std::path::Path;
// let macho_program = /* 创建 Mach-O 程序 */;
// let output_path = Path::new("output.dylib");
// let url = dylib_write_path(&macho_program, output_path)?;