pivot/src/main.rs
2020-12-10 20:02:00 -07:00

14 lines
351 B
Rust

use std::fs::File;
use std::io::prelude::*;
fn main() -> std::io::Result<()> {
// Read the source from a file.
let mut src = String::new();
File::open("test.pvt")?.read_to_string(&mut src)?;
// Compile it
let binary = pivot::compile(src);
// Write it to a file.
File::create("out.wasm")?.write_all(&binary)?;
Ok(())
}