Lime is a cross-platform library that is focused on game modding and tries to provide you with useful features for your journey.
- Detours
- x86/x86-64
- Lambda support
- (Cross-Platform) Calling Convention support (for lambdas!)
- Instruction
- Get next / prev instruction
- Get immediates, displacement, size, mnemonic
- Calculate absolute target (follow relative instructions...)
- Memory Pages
- Allocate pages
- Anywhere
- Exactly at specified address
- In Β±2GB range of specified address
- Read / Write / Restore protection
- Allocate pages
- Module
- Iterate Loaded Modules
- Iterate Symbols
- Load Modules
- Address
- Read / Write Data
- Signature Scanner
- Supports Traditional & IDA Signatures
- Cross-Platform Entrypoint
- [MinGW] Proxy-DLL Generation
Note
Lime follows RAII so you won't have to care about manually cleaning anything up (i.e. when allocating a page).
set(lime_static_entrypoint ON)Default is:
OFF
Use a platform-independent method for the entrypoint implementation.
You do not need to enable this to make use of the cross-platform entrypoint!
set(lime_no_alloc2 ON)Default is:
OFF
Can be used to disable the usage of VirtualAlloc2.
This should be used for compatibility with wine as it currently does not support the LowestStartingAddress requirement.
Should work since wine 8.11 π
-
Using CPM
CPMFindPackage( NAME lime VERSION 5.0 GIT_REPOSITORY "https://github.com/Curve/lime" )
-
Using FetchContent
include(FetchContent) FetchContent_Declare(lime GIT_REPOSITORY "https://github.com/Curve/lime" GIT_TAG v5.0) FetchContent_MakeAvailable(lime) target_link_libraries(<target> cr::lime)
Lines 46 to 52 in 7de073b
Lines 44 to 52 in 9ee66d3
For more examples see tests