Linux hot reload: opt-in linux-debug-hotreload preset, glue, and vendored loader - #2097
Open
sunmachine wants to merge 4 commits into
Open
Linux hot reload: opt-in linux-debug-hotreload preset, glue, and vendored loader#2097sunmachine wants to merge 4 commits into
sunmachine wants to merge 4 commits into
Conversation
Opt-in, Linux Debug only. It builds both game modules so a rebuilt translation unit can link against the live process: default visibility with -Bsymbolic, 16-byte function alignment, no gnu_unique symbols. The SDK's prebuilt archives are hidden-visibility, so the preset links against visibility-promoted copies; nothing under lib/ changes. make build and make watch run the toolchain in the build container and record the applied preset.
neo_hot_reload.cpp wraps the loader with sv_/cl_ ConVars, console output and the fixups a shim's static constructors need: duplicate ConVar and ConCommand registrations are pruned (scoped to this module's cvars), the ServerClass/ClientClass chain is rebuilt from a pre-apply snapshot, InstallFactory keeps the original entity factories, and NextBotManager::sInstance is restored. All edits to existing game code are under NEO_LINUX_HOT_RELOAD, defined only by the linux-debug-hotreload preset.
Copied from ntre-build-hot-reloader with its scripts/vendor.sh; VENDORED.md names the revision. Not edited here: changes go upstream and come back through the script.
sunmachine
marked this pull request as draft
August 27, 2026 03:19
Contributor
Author
|
|
sunmachine
marked this pull request as ready for review
August 27, 2026 03:29
README and CONTRIBUTING link the ntre-build-hot-reloader Quick start for the checkout, Rust toolchain and sniper image steps instead of restating them, and CONTRIBUTING gains a short troubleshooting list for make watch-configure.
sunmachine
force-pushed
the
hot-reload-linux
branch
from
August 27, 2026 03:56
c4e881b to
4c0aef3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Opt-in hot reload for Linux Debug builds: edit a
.cppwhile the game runs, save, and the rebuilt translation unit is applied to the live process in a few seconds. Nothing changes for the existing presets; every edit to game code is underNEO_LINUX_HOT_RELOAD, defined only by the newlinux-debug-hotreloadpreset.The loader core under
src/game/shared/neo/hotreload/vendor/is copied from ntre-build-hot-reloader at8587f7dby itsscripts/vendor.sh;VENDORED.mdnames the revision.Note
Files under
vendor/are not edited here. Changes go to the reloader repo and come back through the vendor script, so review comments on that directory belong upstream.The file watcher and compile driver (the "sidecar") live in the reloader repo and are not part of this PR;
make watch-configurebuilds it from a checkout next to this one. Setup is the reloader's Quick start; usage is in the new README and CONTRIBUTING sections, including what hot reload does not do by design (type layout or vtable changes, datadesc/network table/prediction map edits, wide header changes are still a rebuild).The root
Makefileandsrc/Makefileare convenience aliases over the CMake presets only;cmake --preset/cmake --build --presetremain the supported build path.Toolchain
Linked Issues