Expand description
§uasm-rs
A library to build the UASM compiler, for usage in build scripts.
§Usage
This crate provides the path to the built UASM executable.
Example usage:
use std::result::Result;
use std::error::Error;
use uasm::UASM_PATH;
fn main() -> Result<(),Box<dyn Error>>{
std::process::Command::new(UASM_PATH).arg("-h").spawn()?;
Ok(())
}or from a build.rs script:
use std::result::Result;
use std::error::Error;
use uasm::UASM_PATH;
fn main() -> Result<(),Box<dyn Error>>{
let uasm = std::env::var("DEP_UASM_PATH").unwrap();
std::process::Command::new(uasm).arg("-h").spawn()?;
Ok(())
}Constants§
- UASM_
PATH - The path to the built
uasmexecutable. for now this will be a &str until const Path::new gets moved to stable - https://github.com/rust-lang/rust/issues/143773