From fde01cceb898b944b646a8fed1ce81cb14e523ef Mon Sep 17 00:00:00 2001 From: Mica White Date: Sat, 31 Oct 2026 10:59:52 -0400 Subject: Testing and optimization --- src/main.rs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/main.rs') 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."); +} -- cgit v1.3.1