mirror of
https://github.com/exoticorn/microw8.git
synced 2026-01-20 19:26:43 +01:00
add simple rust "script" to build platform binaries
This commit is contained in:
16
platform/src/main.rs
Normal file
16
platform/src/main.rs
Normal file
@@ -0,0 +1,16 @@
|
||||
use std::{fs::File, path::Path};
|
||||
use std::io::prelude::*;
|
||||
|
||||
use anyhow::Result;
|
||||
|
||||
fn main() -> Result<()> {
|
||||
uw8_tool::BaseModule::create_binary(&Path::new("target/base.upk"))?;
|
||||
|
||||
let loader = curlywas::compile_file("src/loader.cwa")?;
|
||||
File::create("bin/loader.wasm")?.write_all(&loader)?;
|
||||
|
||||
let platform = curlywas::compile_file("src/platform.cwa")?;
|
||||
File::create("bin/platform.uw8")?.write_all(&platform)?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
Reference in New Issue
Block a user