1 use anyhow::Result; 2 use std::fs::File; 3 use std::io::Write; 4 use wasi_headers::generate; 5 main() -> Result<()>6pub fn main() -> Result<()> { 7 let c_header = generate()?; 8 let mut file = File::create("../../libc-bottom-half/headers/public/wasi/api.h")?; 9 file.write_all(c_header.as_bytes())?; 10 Ok(()) 11 } 12