The most legit way to get it is to buy the Pico8 console and download it that way. You can also look at the source code.