Hot Reloading Plans
Hot reloading is one of the two most important features for Shim (the other being time-travel debugging). Hot reloading lets you update the code for a live running application. For example, you could update how a character moves in a game, tweak UI layouts, or quickly iterate on gameplay concepts. It’s also very useful for adding debug drawing to better understand bugs. Hot reloading and time travelling work hand-in-hand. If there’s a bug you can time-travel back to the frame with the issue and add debug drawing to see what’s going on frame-by-frame.
Shim is a bit more capable than some other systems for hot reloading. In particular most hot reloading systems don’t allow you to add/remove members from objects/structs. There are practical limitations to what can be supported, but here’s a list of features that will be explicitly supported:
- Changing the body of a function
- Changing the signature of a function
- Adding functions
- Removing functions
- Adding fields to a struct (if there’s a default)
- Removing fields from a struct
- Adding methods to a struct
- Removing methods from a struct
- Reordering fields in a struct
Other hot reloading features introduce some additional challenges.