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