libmwemu/
lib.rs

1#![allow(non_snake_case)]
2#![allow(dead_code)]
3#![allow(unused_variables)]
4#![allow(unused_must_use)]
5#![allow(clippy::assertions_on_constants)]
6
7pub mod banzai;
8pub mod breakpoint;
9pub mod colors;
10pub mod config;
11pub mod console;
12pub mod constants;
13pub mod context;
14pub mod definitions;
15pub mod eflags;
16pub mod elf;
17pub mod emu;
18pub mod emu_context;
19pub mod engine;
20pub mod err;
21pub mod exception;
22pub mod flags;
23pub mod fpu;
24pub mod hooks;
25#[macro_use]
26pub mod macros;
27pub mod exception_type;
28pub mod maps;
29pub mod ntapi;
30pub mod pe;
31pub mod peb;
32pub mod regs64;
33pub mod script;
34pub mod serialization;
35pub mod structures;
36pub mod syscall;
37pub mod winapi;
38pub mod kuser_shared;
39pub mod crit_state;
40pub mod global_locks;
41pub mod thread_context;
42pub mod threading;
43pub mod tracing;
44
45#[cfg(test)]
46mod tests;
47
48use config::Config;
49use emu::Emu;
50
51pub fn emu64() -> Emu {
52    let mut emu = Emu::new();
53    let mut cfg = Config::new();
54    cfg.is_64bits = true;
55    emu.set_config(cfg);
56    emu.disable_ctrlc();
57    //tracing::init_tracing("/tmp/mwemu-tracing.bin");
58    emu
59}
60
61pub fn emu32() -> Emu {
62    let mut emu = Emu::new();
63    let mut cfg = Config::new();
64    cfg.is_64bits = false;
65    emu.set_config(cfg);
66    emu.disable_ctrlc();
67    //tracing::init_tracing("/tmp/mwemu-tracing.bin");
68    emu
69}