Imagine you're arbitrarily close to the physical limits of technology. You do or could understand how living things work, down to the molecular level, for example, and know how to engineer self-replicating machinery analogous to DNA. At the very least, you could build a 'spaceship' that can grow something at least as efficient as people, who can replicate however and disassemble earth for raw materials. Presumably, you can do much better, and you end up with something like a self-packaged deployable technological superintelligent ecosystem.
Haha, nah, it was more the general idea. An amalgam of sci-fi. Greg Egan had a story where an advanced civ sends a gram-sized slug into the gas giant of a solar system, which bootstraps to machinery that 3d prints people and machinery, which is a plausible enough inspiration that I can give it here. Just remove the implausible 'nobody just decides to go bacteria-mode' aspect from Egan's far-future stories.