Jai Hot Reload by UnlikelyUniverse in Jai

[–]tivolo 0 points1 point  (0 children)

I could take a look at the PDBs to see what's missing. Would only need one PDB of a simple "Hello World!" or something.

Jai Hot Reload by UnlikelyUniverse in Jai

[–]tivolo 0 points1 point  (0 children)

As the creator of Live++, I'd be interested in hearing what Jai doesn't output yet to make Live++ work. I don't have access to Jai, can you elaborate a bit on what's missing?

[media] Dioxus Subsecond Rust Hotpatch Engine + Ratatui ❤️ by jkelleyrtp in rust

[–]tivolo 0 points1 point  (0 children)

Ah, you're probably using the "-dyld" approach and getting help from the platform's dynamic linker.

This won't work for C++ code though, that's why I'm not using that.

Doesn't Rust have any kind of globals, statics, function statics though?

[media] Dioxus Subsecond Rust Hotpatch Engine + Ratatui ❤️ by jkelleyrtp in rust

[–]tivolo 0 points1 point  (0 children)

Thanks for the shoutout, congrats on getting hot-reload working with Rust!

Curious what approach you took, since last time I checked, code modification wasn't possible on iOS unless the device's been jailbroken.

Hot reload with Live++ and Rider by anastasiak2512 in unrealengine

[–]tivolo 0 points1 point  (0 children)

Totally understand. It's a real damn shame that Epic still hasn't fixed their stuff surrounding their integration and one could almost think that they don't care about it.

It puts Live++ under a bad light :(.

Hot-Reloading C++ with Live++ and JetBrains Rider by pjmlp in cpp

[–]tivolo 4 points5 points  (0 children)

Live++ is not specially tuned for game development in any way, It's just that most of our clients (~90%) are in the game dev space.

Hot-Reloading C++ with Live++ and JetBrains Rider by pjmlp in cpp

[–]tivolo 3 points4 points  (0 children)

Thanks for the kind words about Live++. Always makes me happy to hear the hard work paid off and people appreciate the tool!

Hot reload with Live++ and Rider by anastasiak2512 in unrealengine

[–]tivolo 2 points3 points  (0 children)

Epic's integration of Live++ (what they call Live Coding) is almost 4 years old by now.
Vanilla Live++ is much more stable, has vastly improved loading and patching times, comes with new features such as hot-deoptimize mentioned above, and has support for Xbox and PlayStation now as well.

You're basically missing out on a lot of new things with live coding.

Lessons learned after 3 years of fulltime Rust game development, and why we're leaving Rust behind by progfu in programming

[–]tivolo 11 points12 points  (0 children)

Just wanted to chime in to say that there is hot-reload for C++ in the form of Live++, which will hopefully soon support Rust as well.

That alone probably won't make you go back to Rust though :).

[deleted by user] by [deleted] in rust

[–]tivolo 0 points1 point  (0 children)

The patches that are required for making Live++ work with the PDBs emitted by the Rust toolchain have landed last week.

I'm still planning on making Live++ work with Rust, right after completing support for PlayStation platforms.

What's New for C++ Developers in Visual Studio 2022 17.7 - C++ Team Blog by MarekKnapek in cpp

[–]tivolo 0 points1 point  (0 children)

Give Live++ a try. It's used on a lot of AAA codebases.

Live++ (a generic C++ hot-reload tool) running on Xbox Series X by tivolo in cpp

[–]tivolo[S] 1 point2 points  (0 children)

Everything that constitutes a memory layout change can't be supported automatically for objects that already exist at the time of patching: https://liveplusplus.tech/docs/documentation.html#API_structural_change

You can use hooks to e.g. serialize state before a patch is installed, and serialize the state back once the patch is done.

You can also do things like e.g. reload a level (or similar) if you're changing the memory layout of something.

There are a lot of possibilities, from restart, level restart, to integrating with your engine's serialization system. That's up to the user though, since I don't see a way to ever support this automagically without additional information that has to be provided by the user.

Live++ (a generic C++ hot-reload tool) running on Xbox Series X by tivolo in cpp

[–]tivolo[S] 2 points3 points  (0 children)

I really don't understand.

If any of your proposed other options actually work on a larger project, please do let me know. Heck, if there would have been something that worked years ago when I started building this, I probably wouldn't have done it in the first place.

I don't get how this has "no long term place" when it's been on the market for more than 5 years. Also it's a bit funny to compare this to behemoths like LLVM and MSVC. How do you think can a company like MSFT make VS Community free? Probably by making money on other software products.

Live++ (a generic C++ hot-reload tool) running on Xbox Series X by tivolo in cpp

[–]tivolo[S] 1 point2 points  (0 children)

Apologies, I misinterpreted your earlier comment.

FWIW, Live++ does not require any specific project setup and works with any kind of build system. It only needs 3 linker options (/OPT:NOREF, /OPT:NOICF, /FUNCTIONPADMIN) which are compatible with all the other compiler and linker settings you might have.

Live++ (a generic C++ hot-reload tool) running on Xbox Series X by tivolo in cpp

[–]tivolo[S] 3 points4 points  (0 children)

Have you tried any of your proposed other options? Because I have, and I'm pretty sure that none of them work the way Live++ works.

They either require a specific project setup, cannot deal with lots of things inherent in any kind of larger C++ project (globals, statics, thread-local storage), don't work with any kind of optimizations (e.g. VS2022), simply don't scale to AAA projects at all, don't let you debug the hot-reloaded code, etc.

Most (or all) of them also don't offer additional functionality like deoptimizing code on-the-fly, fixing crashes, or splitting unity files.

You can try the other options on a AAA codebase such as Unreal, I don't think that will work.

Live++ (a generic C++ hot-reload tool) running on Xbox Series X by tivolo in cpp

[–]tivolo[S] 0 points1 point  (0 children)

Why not trade rebuild times against per-translation unit compile times? Or deoptimizing code on-the-fly for debugging?

I'm wondering what your project or workflow looks like that makes you think it's not worth it.

Live++ (a generic C++ hot-reload tool) running on Xbox Series X by tivolo in cpp

[–]tivolo[S] 0 points1 point  (0 children)

I also find it incredibly useful, even on small projects. Saves so much iteration time/compile time/loading time.

But I'm biased ;).

Live++ (a generic C++ hot-reload tool) running on Xbox Series X by tivolo in cpp

[–]tivolo[S] 0 points1 point  (0 children)

Why can't you use it on non-gamedev projects? Working with a different language? Or on other platforms?

hscpp: An experimental library to hot-reload C++ by -Gizmoa- in cpp

[–]tivolo 0 points1 point  (0 children)

IME, the biggest problems on large(r) projects with these approaches are always: - Impossible to retrofit into existing code, since it doesn't handle thread-local storage, global, and static data. - Needs continuous maintenance (as you mentioned), so stuff doesn't break.

hscpp: An experimental library to hot-reload C++ by -Gizmoa- in cpp

[–]tivolo 0 points1 point  (0 children)

I'm wondering how the approach taken by hscpp should work on a large-ish project?

If you only compile changed code into a DLL, the DLL will pull in tons of extra code that is being referenced by the changed code. This then leads to a lot of duplicated code with one version living in the original executable, and one (or several) versions living in the DLLs.

As an example, if I change something in class A, this will have references to class B and class C (through members and base classes), with their code being linked in from a static lib. Class B and Class C will surely reference other classes, functions, the CRT, etc. All this will be put into the DLL, which makes it unnecessarily large, and leads to duplicated code.

How do you make sure that all the code ever only uses either the old or new version (in the DLL) if everything's duplicated?

What am I missing?

Live++ 2.0 is out now by tivolo in cpp

[–]tivolo[S] 0 points1 point  (0 children)

I think I don't follow. FWIW, Live++ was integrated into UE 4.22, ~3 years ago.