I wrote a science fiction short several years ago that had this technology. This was how they colonized Mars. In my story they used the soil and an imaginary type of glue for raw material.
How about a space station built around a massive one, to print spacecraft too large to launch from our gravity well?
I don’t know where you’d get the raw materials, maybe a space elevator, or launching them up with a rail gun.
Heinlein used to write about how primitive our building technology was. Compared how much a car would cost if you brought the raw steel, rubber etc to your house and built the car there.
I read a book called Armor while still in high school(early 80’s) that included this exact idea. They used the soil and glue to form walls for a fort while attemting to defeat an alien enemy. Hard to tell where the original idea came from but its been around for awhile. The tech is only now catching up to the idea.