mirror of
https://github.com/exoticorn/microw8.git
synced 2026-01-20 11:16:42 +01:00
22 lines
542 B
Rust
22 lines
542 B
Rust
mod filewatcher;
|
|
#[cfg(feature = "native")]
|
|
mod run_native;
|
|
#[cfg(feature = "browser")]
|
|
mod run_web;
|
|
|
|
pub use filewatcher::FileWatcher;
|
|
#[cfg(feature = "native")]
|
|
pub use run_native::MicroW8;
|
|
#[cfg(feature = "browser")]
|
|
pub use run_web::RunWebServer;
|
|
|
|
use anyhow::Result;
|
|
|
|
pub trait Runtime {
|
|
fn is_open(&self) -> bool;
|
|
fn set_timeout(&mut self, _timeout: u32) {
|
|
eprintln!("Warning: runtime doesn't support timeout");
|
|
}
|
|
fn load(&mut self, module_data: &[u8]) -> Result<()>;
|
|
fn run_frame(&mut self) -> Result<()>;
|
|
} |