1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
//! Identify game ROMs and extract their data and assets as structured files.
//!
//! romkit reads ROMs in layers, each knowing nothing about the ones above it:
//!
//! - [`io`]: [`ByteSource`], random access to bytes that may live in memory, in a file, or
//! behind a browser `Blob`. Only the bytes a parser needs are ever read.
//! - [`platforms`]: what a ROM is, from its header, and the DS and 3DS filesystems.
//! - [`formats`]: file formats found inside ROMs, such as NARC archives and DS 3D models.
//! - [`media`]: what romkit produces besides data: images (PNG), audio (WAV), and 3D models
//! (glTF).
//! - [`games`]: the catalog of recognized games and their extractors, each with a typed API
//! and the uniform [`Game`] asset view.
//!
//! [`Rom`] ties the layers together for hosts that take any ROM:
//!
//! ```no_run
//! use romkit::Rom;
//! use romkit::io::FileSource;
//!
//! let rom = Rom::open(FileSource::open("game.nds")?)?;
//! println!("{}", rom.identity());
//! if let Some(game) = rom.game() {
//! for path in game.assets()? {
//! let contents = game.extract(&path)?;
//! println!("{path}: {} bytes", contents.len());
//! }
//! }
//! # Ok::<(), romkit::Error>(())
//! ```
//!
//! Programs that need one game's data use its typed handle instead, such as
//! [`Gen4`](games::pokemon::gen4::Gen4).
pub use ;
pub use ;
pub use ByteSource;
pub use ;
pub use ;