There’s nothing like months aboard the International Space Station to get an astronaut to hate space station food – one can only have so many servings of freeze-dried ice cream. In an attempt to not only expand the menu for Earth orbiters, but to also bring us one step closer to every Trekkie’s dream of a food replicator, NASA is funding a project that is aimed at creating a 3D printer to serve astronauts up some pizza.

“Earl Gray, hot…and extra pepperoni on the pizza.”

NASA has enlisted the help of mechanical engineer Anjan Contractor at Austin, Texas-based Systems and Materials Research in the form of $125,000 to build a 3D printer that makes pizzas. Contractor has already made a proof-of-concept printer able to print the chocolate chips onto a cookie. To print the pizza, he plans on first printing out the dough and letting it cook while printing out sauce and toppings.

The pizza printer won’t be a simple, automated layering of sauce and anchovies. It will be a true 3D printer, fabricating the different toppings from their component ingredients. This is important in space where the shelf life of food needs to be really, really long. A “digital recipe” will be used to combine powders, containing proteins and carbohydrates, and oils to create foodstuffs that have similar structure, taste, smell and nutrition as the real thing.

“The way we are working on it is,” Contractor explained to Quartz, “all the carbs, proteins and macro and micro nutrients are in powder form. We take moisture out, and in that form it will last maybe 30 years.”

That’ll definitely come in handy for a trip to Mars, until we can terraform the planet, of course, when fresh vegetables will be aplenty. But astronauts aren’t the only ones who stand to benefit from printing food.

A pizza is an ideal food for a 3D printer to tackle. It has a variety of ingredients arranged in layers. Contractor hopes to use the money from NASA to build the food-printing device by the end of the year. The following is a video of his prototype that can print chocolate on a cookie.

The idea of printing food has been around for a while now. In 2011, a group at Cornell created a printer that prints chocolate, cheese, scallops, celery, even turkey. But rather than use the layer-by-layer fabrication method that has come to define 3D printers, their food is made by layering ingredients squeezed out of tubes. And just last month a scientist in the Netherlands printed an entire burger, although with its $325,000 price tag it’ll be some time before our corner burger shops adopt the technology.

One can envision a day when 3D food printers will enable the long distance transmission of digital recipes, so Mom can “cook” you your spaghetti just the way you like it even if you’re miles – or planets – away. Ray Kurzweil predicts that, in the future, information will become a major commodity to be bought and sold. Recipes, furniture designs, unique toys – the blueprints for anything that can be 3D printed, instead of the finished products themselves – will compete on the open market. But the printers have to be built first. And who better than NASA to push even the culinary envelope? Hopefully their can-do attitude results in a delicious pizza with the workings, and eventually we can all eat like Captain Picard.