A script extender for REDengine 4 (Cyberpunk 2077) — macOS Apple Silicon Port.
This is a macOS port of RED4ext by WopsS.
For Windows, use the original repository.
This is the initial macOS release. Not all features have full parity with Windows.
| Component | Status | Notes |
|---|---|---|
| Library injection | ✅ Working | DYLD_INSERT_LIBRARIES |
| Function hooks | ✅ Working | Frida-based (different from Windows Detours) |
| SDK addresses | 126/126 found, not all runtime-verified | |
| Plugin system | ✅ Working | .dylib format required |
| TweakXL | ✅ Tested | Basic functionality verified |
| Other plugins | ❓ Untested | May require porting work |
- No Windows plugin compatibility — All .dll plugins must be recompiled
- Different hook mechanism — Uses Frida instead of Detours; edge cases may differ
- Address verification — Addresses found via pattern matching, some untested at runtime
- Limited plugin testing — Only TweakXL verified; ArchiveXL, Codeware, etc. untested
Please report issues on GitHub.
- macOS 12+ (Monterey or later)
- Apple Silicon (M1/M2/M3/M4)
- Cyberpunk 2077 (Steam, macOS native version)
- Xcode Command Line Tools:
xcode-select --install - CMake 3.23+ (for building):
brew install cmake
Game Version: Tested with Cyberpunk 2077 v2.3.1 (macOS)
- Download from Releases
- Extract and install:
unzip RED4ext-macOS-ARM64-vX.X.X.zip
cd RED4ext-macOS-ARM64-vX.X.X
./scripts/macos_install.sh# 1. Clone with submodules (--recursive is required!)
git clone --recursive https://github.com/memaxo/RED4ext.git
cd RED4ext
# 2. Check requirements
./scripts/check_requirements.sh
# 3. Build
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make -j$(sysctl -n hw.ncpu)
# 4. Install
cd ..
./scripts/macos_install.sh# If you didn't use --recursive, run this:
git submodule update --init --recursiveAfter installation, you have two options:
cd "$HOME/Library/Application Support/Steam/steamapps/common/Cyberpunk 2077"
./launch_red4ext.shOr with the full path:
"$HOME/Library/Application Support/Steam/steamapps/common/Cyberpunk 2077/launch_red4ext.sh"What the launcher does:
- Sets
DYLD_INSERT_LIBRARIESto load RED4ext and Frida - Compiles any REDscript mods (if present)
- Launches Cyberpunk 2077 with mods enabled
You can also launch directly from Steam. The mods will load automatically if the installation was successful.
Note: Some users report better stability using the launch script.
After launching, check:
- Log file:
red4ext/logs/red4ext.logshould show plugins loading - In-game: Mod effects should be visible (e.g., TweakXL tweaks applied)
# Check RED4ext log for errors
cat "$HOME/Library/Application Support/Steam/steamapps/common/Cyberpunk 2077/red4ext/logs/red4ext.log"
# Verify launch script exists and is executable
ls -la "$HOME/Library/Application Support/Steam/steamapps/common/Cyberpunk 2077/launch_red4ext.sh"./scripts/macos_install.sh --help
Options:
--game-dir PATH Specify game location (if not default Steam path)
--build Build from source before installing
--skip-frida Don't install Frida GadgetThis port uses Frida Gadget for function hooking. Apple Silicon's W^X protection prevents traditional inline code patching, so Frida's JIT trampolines provide an alternative.
launch_red4ext.sh
├── DYLD_INSERT_LIBRARIES=RED4ext.dylib:FridaGadget.dylib
├── FridaGadget loads red4ext_hooks.js
├── Frida installs hooks via JIT trampolines
└── RED4ext loads plugins from red4ext/plugins/
This is architecturally different from Windows RED4ext, which uses Microsoft Detours for inline hooking.
Plugins must be:
- Recompiled for macOS ARM64 (.dylib)
- Updated for any platform-specific code
- Tested on macOS
Cyberpunk 2077/
└── red4ext/
├── RED4ext.dylib
├── cyberpunk2077_addresses.json
└── plugins/
└── YourPlugin/
└── YourPlugin.dylib
| Plugin | Status |
|---|---|
| TweakXL | ✅ Basic functionality works |
| ArchiveXL | ❓ Not tested |
| Codeware | ❓ Not tested |
| Cyber Engine Tweaks | ❓ Not tested |
cat "~/Library/Application Support/Steam/steamapps/common/Cyberpunk 2077/red4ext/logs/red4ext.log"file YourPlugin.dylib
# Should show: Mach-O 64-bit dynamically linked shared library arm64./scripts/macos_resign_for_hooks.shAddresses may change. Regenerate:
python3 scripts/generate_addresses.py \
"/path/to/Cyberpunk2077" \
--manual scripts/manual_addresses_template.json \
--output red4ext/cyberpunk2077_addresses.json| Document | Description |
|---|---|
| docs/MACOS_PORT.md | Port technical details |
| docs/FRIDA_INTEGRATION.md | Frida hooking implementation |
| docs/MACOS_CODE_SIGNING.md | Code signing requirements |
| BUILDING.md | Build instructions |
This is an early port. Contributions welcome:
- Runtime verification of SDK addresses
- Plugin compatibility testing
- Bug reports with logs
See CONTRIBUTING.md.
| Project | Description |
|---|---|
| RED4ext | Original Windows version |
| RED4ext.SDK | Original Windows SDK |
| RED4ext.SDK-macos | macOS SDK fork |
| TweakXL-macos | TweakXL macOS port |
MIT License — see LICENSE.md
- WopsS — Original RED4ext author
- Frida — Dynamic instrumentation toolkit
- Cyberpunk 2077 modding community