mirror of
https://github.com/exoticorn/microw8.git
synced 2026-01-20 19:26:43 +01:00
add command to uw8-tool to write api include file
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
use std::path::PathBuf;
|
||||
|
||||
use anyhow::Result;
|
||||
use uw8_tool::BaseModule;
|
||||
use pico_args::Arguments;
|
||||
use uw8_tool::BaseModule;
|
||||
|
||||
fn main() -> Result<()> {
|
||||
let mut args = Arguments::from_env();
|
||||
@@ -32,6 +32,14 @@ fn main() -> Result<()> {
|
||||
let dest: PathBuf = args.free_from_str()?;
|
||||
uw8_tool::filter_exports(&source, &dest)?;
|
||||
}
|
||||
"base-cwa" => {
|
||||
let path: PathBuf = args.free_from_str()?;
|
||||
BaseModule::for_format_version(1)?.write_as_cwa(path)?;
|
||||
}
|
||||
"base-wat" => {
|
||||
let path: PathBuf = args.free_from_str()?;
|
||||
BaseModule::for_format_version(1)?.write_as_wat(path)?;
|
||||
}
|
||||
_ => {
|
||||
eprintln!("Unknown subcommand '{}'", cmd);
|
||||
print_help();
|
||||
|
||||
Reference in New Issue
Block a user