diff options
| author | Mica White <botahamec@outlook.com> | 2026-10-31 10:59:52 -0400 |
|---|---|---|
| committer | Mica White <botahamec@outlook.com> | 2026-10-31 10:59:52 -0400 |
| commit | fde01cceb898b944b646a8fed1ce81cb14e523ef (patch) | |
| tree | d1d5c97350fbbba2cc522c1f539c320ad4c2d1fc /src/main.rs | |
| parent | 0c128e472b1b49e32c313874eaeccc8c5f1b1202 (diff) | |
Testing and optimization
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 12 |
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."); +} |
