summaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorMica White <botahamec@outlook.com>2026-10-31 10:59:52 -0400
committerMica White <botahamec@outlook.com>2026-10-31 10:59:52 -0400
commitfde01cceb898b944b646a8fed1ce81cb14e523ef (patch)
treed1d5c97350fbbba2cc522c1f539c320ad4c2d1fc /src/main.rs
parent0c128e472b1b49e32c313874eaeccc8c5f1b1202 (diff)
Testing and optimization
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.");
+}