Introducing il2cpp-bridge-rs (https://crates.io/crates/il2cpp-bridge-rs)
I just published il2cpp-bridge-rs, a Rust library for interacting with Unity's IL2CPP runtime from native code.
This project is aimed at people building Unity game modding, runtime debugging, reverse engineering, and IL2CPP tooling in Rust. If you have ever wanted to work with IL2CPP from Rust without rebuilding the usual layers around export resolution, metadata lookup, method binding, and thread attachment, that is the problem space I wanted to improve.
Why I built it
Working with IL2CPP natively usually means rebuilding the same foundations over and over:
- resolving exports from the loaded runtime
- walking assemblies and classes manually
- finding and invoking methods
- handling runtime/thread attachment correctly
- wrapping Unity objects in something usable
- dumping metadata for inspection and debugging
That works, but it is tedious and easy to get wrong.
I wanted a Rust-first foundation for this kind of work: something ergonomic enough for day-to-day use, but still close to the runtime model IL2CPP actually exposes.
What il2cpp-bridge-rs does
il2cpp-bridge-rs is a native Rust library for exploring and interacting with Unity's IL2CPP runtime at runtime.
It provides support for:
- resolving IL2CPP exports dynamically
- building and reusing a metadata cache
- looking up assemblies, classes, fields, properties, and methods
- invoking static and instance methods
- dumping runtime metadata
- accessing common Unity objects and wrappers
- working across platforms including iOS, macOS, Linux, Android, and Windows
The goal is not to hide what IL2CPP is doing. The goal is to make common workflows cleaner, more repeatable, and less error-prone.
Who this is for
This library is useful if you are building:
- native mods or injected libraries for Unity games
- IL2CPP debugging and inspection tools
- runtime diagnostics
- wrappers around raw Unity/IL2CPP metadata
- reverse engineering workflows that need runtime interaction
It is not meant to be a full mod loader or a complete game patching framework by itself. It is a building block for lower-level tooling.
Download
The library is published on https://crates.io/crates/il2cpp-bridge-rs so you can just do:
cargo add il2cpp-bridge-rs
Or if you want you can build it locally by cloning the repo out of github: https://github.com/Batchhh/il2cpp-bridge-rs
Why Rust here makes sense
Rust is a strong fit for this space.
You still have to deal with runtime-owned memory and unsafe boundaries, because IL2CPP integration is fundamentally native and pointer-heavy. But Rust helps tighten the edges around that work. It gives you a better foundation for organizing wrappers, isolating unsafe code, and building tools that do not immediately turn into fragile C++ glue.
This crate does not magically make IL2CPP “safe.” That would be dishonest. What it does do is make the experience much more structured.
What’s next
This is an early release, but the foundation is there. I want to keep improving the ergonomics, wrappers, documentation, and real-world workflows around modding and debugging Unity IL2CPP games.
If you work in this area and want to try it, break it, or build on top of it, take a look:
https://github.com/Batchhh/il2cpp-bridge-rs
https://crates.io/crates/il2cpp-bridge-rs
If you have feedback from actual modding, debugging, or reverse engineering use cases, that is the kind of input I care about most.
Don't forget to star the project to keep up with the updates! ❤️
Credits
- @Batch (https://x.com/BatchhRE)