summaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs
index 6f5a695..9c00c67 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1,14 +1,19 @@
+#[cfg(feature = "tinywasm")]
use std::path::{Path, PathBuf};
+#[cfg(feature = "tinywasm")]
use bpaf::Bpaf;
-use tortuise::{apply_patches, file::FileManager, init_logger, script::WasmRunner};
+#[cfg(feature = "tinywasm")]
+use tortuise::{apply_patches, file::FileManager, init_logger, script::wasm::WasmRunner};
#[derive(Debug, Clone, Bpaf)]
#[bpaf(options)]
+#[cfg(feature = "tinywasm")]
struct Options {
module: PathBuf,
}
+#[cfg(feature = "tinywasm")]
fn main() {
let mut files = FileManager::default();
let wasm_runner = WasmRunner::new();
@@ -24,3 +29,8 @@ fn main() {
};
tortuise::run_game(files, wasm_runner, manifest);
}
+
+#[cfg(not(feature = "tinywasm"))]
+fn main() {
+ panic!("WebAssembly support is needed for a main runtime.");
+}