dynarmic-sys-mythrax
Rust bindings for the Dynarmic ARM dynamic recompiler — Mythrax fork, with Windows MSVC support.
What this fork adds over upstream
dynarmic-sys0.1.2:
- Builds on Windows MSVC. The vendored
mman.h/mman.cshim is extended withMAP_NORESERVE,MADV_WILLNEED, and amadvise()no-op stub so the wrapper code compiles cleanly under cl.exe.- Correct MSVC link line.
build.rsnow emitscargo:rustc-link-lib=static={fmt,mcl,Zydis,Zycore}on MSVC (upstream only emitted them on GNU/Apple), fixingLNK2001/LNK2019unresolved-external errors against the bundledfmt::v10/ Zydis symbols.Both fixes are minimal and intended to be upstreamed; this crate exists so projects depending on dynarmic-sys can build today on Windows without waiting for the merge.
Credits
- Original Project: Dynarmic by lioncash
- Initial Implementation Reference: rnidbg by fuqiuluo
- Upstream
dynarmic-sys: wyourname - Windows fork (this crate): Mythrax-ZS
Features
- High-level safe(r) wrapper for ARM32 and ARM64 emulation.
- Integrated C++ source (vendored) for easier building.
- Support for custom memory mapping and protection.
- Support for SVC and Unmapped memory callbacks.
- Builds out-of-the-box on Linux, macOS, and Windows MSVC.
Usage
Add to your Cargo.toml:
[]
= "0.2"
If you want to drop-in replace upstream dynarmic-sys without code changes, alias it:
[]
= { = "dynarmic-sys-mythrax", = "0.2" }
Build requirements
- A C++17 compiler (cl.exe on MSVC; clang/gcc on Linux/macOS).
- CMake ≥ 3.12 and Ninja on PATH.
- Boost headers ≥ 1.57 discoverable via
find_package(Boost)(e.g.BOOST_ROOT=C:\local\boost_1_83_0on Windows).
On Windows MSVC, if your environment includes devkitPro's MSYS2 cmake, force the real one + bundled Ninja:
$env:CMAKE = "C:\Program Files\CMake\bin\cmake.exe"
$env:PATH = "C:\Program Files\Microsoft Visual Studio\18\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\Ninja;" + $env:PATH
$env:BOOST_ROOT = "C:\local\boost_1_83_0"
cargo build
Example
use Dynarmic;
Configuration
DYNARMIC_JIT_SIZE— JIT cache size in MB (default: 64).
License
0BSD, matching upstream Dynarmic.