Make wasmer optional for cli

This commit is contained in:
Brendan Hansknecht 2021-11-06 10:34:22 -07:00
parent 69f6ffadab
commit 0b3c95ca97
2 changed files with 10 additions and 3 deletions

View file

@ -411,6 +411,7 @@ fn roc_run(cmd: &mut Command) -> io::Result<i32> {
}
}
#[cfg(feature = "run-wasm32")]
fn run_with_wasmer(wasm_path: &std::path::Path, args: &[String]) {
use wasmer::{Instance, Module, Store};
@ -441,6 +442,11 @@ fn run_with_wasmer(wasm_path: &std::path::Path, args: &[String]) {
}
}
#[cfg(not(feature = "run-wasm32"))]
fn run_with_wasmer(_wasm_path: &std::path::Path, _args: &[String]) {
println!("Running wasm files not support");
}
enum Backend {
Host,
X86_32,