Skip to main content

x86/
lib.rs

1//! Cross-platform native x86 machine library.
2//!
3//! The crate intentionally exposes platform-neutral Rust APIs. It does not
4//! require a browser, WebAssembly runtime, DOM, or platform-specific GUI.
5
6pub mod bootloader;
7pub mod error;
8pub mod image;
9pub mod machine;
10pub mod state;
11
12pub use bootloader::{Bootloader, FetchOptions, Resource, copy_resource_to, load_resource};
13pub use error::{Result, X86Error};
14pub use image::{Image, ImageKind};
15pub use machine::{
16    ConsoleConfig, ConsoleMode, ExecutionBackend, Machine, MachineConfig, MachineStatus,
17    RunOptions, RunReport,
18};
19pub use state::{SavedState, StateHeader, StateSummary};
20
21pub const API_VERSION: &str = env!("CARGO_PKG_VERSION");
22
23pub fn native_capabilities() -> &'static [&'static str] {
24    &[
25        "raw-image-memory",
26        "raw-image-file",
27        "bootloader-file",
28        "bootloader-http",
29        "bootloader-https",
30        "saved-state-v86-v6",
31        "console-host-api",
32        "backend-trait",
33        "no-webassembly-runtime",
34    ]
35}