1#![cfg_attr(not(target_arch = "wasm32"), no_std)]
2
3#[cfg(target_os = "none")]
4pub mod pico;
5
6#[cfg(target_arch = "wasm32")]
7pub mod web;
8
9pub use pico_engine_core::{Game, Engine};
11pub use pico_engine_hardware::Hardware;
12
13#[cfg(target_os = "none")]
15pub use pico::{run as run_pico, entry};
16
17#[cfg(target_arch = "wasm32")]
19pub use web::run as run_web;
20
21#[cfg(not(any(target_os = "none", target_arch = "wasm32")))]
24pub use pico_engine_core::Engine as entry;
25
26#[cfg(not(any(target_os = "none", target_arch = "wasm32")))]
27pub fn run_pico<G: Game>(_game: G) -> ! {
28 panic!("run_pico only available on embedded targets")
29}
30
31#[cfg(not(any(target_os = "none", target_arch = "wasm32")))]
32pub fn run_web<G: Game>(_game: G, _canvas_id: &str) {
33 panic!("run_web only available on wasm32 targets")
34}