So if they leak the source code, does that mean we will get a port of Cyberpunk 2077 to the Switch in the soon future?
Probably not.
Something like this being leaked would be 10 kinds of too hot to handle* for most devs, and most public projects. This would slow things considerably, even with some kind of desire.
The Switch is also not exactly a powerhouse or that similar to the PC or consoles it is on, and its likely homebrew scene is not going to be up to too much (I know there are some but compared to the heady days of the xbox, wii, GBA, DS and PSP... yeah it is a ghost town).
*there are various levels of "open source" or at least source available. Not counting the open source from the start type games, and not counting games with free binaries that you can stick in a wrapper/emulator.
"full bore have at it with the code and the assets, basically public domain or near enough as does not matter". Don't know that I have really seen much like this outside of a few indy games and games for truly ancient systems.
"engine is open source but the assets are ours". This is what we normally see in the releases from ID and other things. There have been occasions where code is made available and then rescinded.
Some dedicated fans reverse engineer a game cleanroom style. Play it 1000 times and observe all the behaviours, recreate from such a thing. Very time consuming but does make for a more free product that are hard to smack down.
These three will form the bulk of
https://osgameclones.com/ with the additional stuff coming from "well it uses the same/broadly similar engine, let's make it speak to the assets from this other game we want to play".
Some dedicated fans reverse engineer a game using less than cleanroom abilities -- disassemblers (see various pokemon, Sonic and Mario efforts), decompilers (see the main Mario 64 before we got the straight up leaked), possibly combination leaked/included data (see
Diablo). Theoretically all kinds of legally dubious and able to see legal smackdowns but so rarely attacked it seems, and they usually go after the binaries (though curiously enough the source was gone after for a ds homebrew
https://gbatemp.net/threads/cave-story-ds-port-based-on-cse2-decompilation.582377/ ).
Someone hacked in/disgruntled employee hid a USB drive in their underwear and leaked accordingly. This is what this would be, and with the added bonus of coming for both their current engine and their current hotness of a game so likely to see all the ninja lawyers dispatched to shut it down hard. Unlikely to make things truly shut down (hard to get every torrent after all once it is out there) and things can still happen in private/underground (default mode of operation for many in the hacking community and has been for decades, though does rather cut down on people able to help out). Depending upon what goes may also face being cast out of any mod communities for making things as well
Dolphin devs commenting on leaks from Nintendo a while back.
So yeah mostly going to be useful for fans looking to fix/alter the game (could actually make it like the hype or like the board game it stems from, and generally having source code you can compile can do all sorts of fun things for mods), shameless Chinese game devs looking for a nice engine (though how nice is a matter for debate), those looking to make game exploits (not always an easy way to make exploits but if you can read source code well enough to find them then you might find more than more play based methods will yield. Much more useful if online anti cheat is the thing you seek to defeat), those curious about the code itself (and looking at what happened to that save overflow thing there is likely some serious janky code to look at here, though likely also some very shiny graphics code) and any game secrets it might hold. Outside chance some things happen for the console versions, and probably only marginally higher for those seeking a Linux version.