Forty-six years after the last flight to the moon, humans are a decade or so away from putting a boot down on Mars.

Like early explorations of Asia and the New World centuries ago, expeditions to Mars will last years. Depending on Mars' position relative to Earth's orbit, it will most likely take about nine months just to get there. But arriving will be only the beginning. Those pioneering astronauts will have to spend another 500 days on the red planet until its orbit aligns with Earth's, then travel nine months again to return home. So what do we have to do to keep them well-supplied and healthy?

In a word, everything.

NASA researchers and various companies are working on ways to grow nutritious leafy greens, make spare parts on the fly (literally), brew drinks -- even develop tech that repairs itself -- to help astronauts go years without outside help.

Some experiments are further along than others, but all play important roles in accomplishing necessary tasks made tricky by low gravity.

We asked ourselves, how good will life on Mars be if you can't enjoy a cold beer? Ricardo Marques, Budweiser

"The day we actually set foot on Mars will be an amazing day. But there's going to be a lot of mundane stuff that leads up to that," says NASA test director Ralph Fritsche.

Here are a few of the more interesting space experiments that will help humans survive, and even thrive, on Mars.

Eat your greens

We've come a long way since 1962, when John Glenn, the first American to orbit the Earth, dined on applesauce squeezed from a tube.

Back then, scientists didn't know if humans could swallow food in space, let alone digest it.

Snacking on baby food was never so risky.

But after decades of serving chow in microgravity, researchers' new task is providing fresh foods in space. It's why NASA built the Vegetable Production System, better known as Veggie. On the International Space Station since 2014, the growth chamber uses LED lighting and water reservoirs beneath bags of soil, baked clay, controlled-release fertilizer and seeds.

The goal, says NASA, is "to provide the crew with a palatable, nutritious and safe source of fresh food and a tool to support relaxation and recreation."

Well, that gives "grow your own" new meaning.

NASA Johnson

So far, Veggie has been used to grow red romaine lettuce, cabbage, mustard greens and zinnias. The original crop of lettuce was frozen and sent back to Earth to test for harmful microbes. Thankfully, space salad is safe to eat.

"When [astronauts] come back, a lot of times they'll say, 'I thought I'd be missing a pizza or a cheeseburger, and the first thing I wanted was a salad," says Gioia Massa, a NASA project scientist who led the Veggie science team. Massa says NASA plans to grow tomatoes in the fall.

There's also the nutritional aspect. Many vitamins and minerals, including C, B-6, thiamin and folic acid, degrade over time. As tantalizing as dehydrated salmon might sound (mmmm, dehydrated salmon!), it just won't pack the same nutritional punch that fresh food can. Space-grown vegetation could fill in some nourishment gaps.

As the worm turns

Believe it or not, worms could offer the clues to help things and people regenerate. Planarian flatworms, specifically. That's because these flatworms can be cut into pieces, and each piece will grow into a whole new worm.

Four years ago, Tufts University sent flatworm segments to space to see what would happen. The results of the flatworm experiments were a little freaky: One of the middle sections of the flatworms grew an extra head.

Researchers still aren't quite sure why, but they're hopeful new insight into planarian flatworm regeneration could one day help fight spinal cord injuries, degenerative brain diseases and heart failure. They also hope such understanding could lead to technology that automatically detects damage and fixes itself -- a huge plus when you're 140 million miles from the nearest repair shop.

Built in space

It costs about $10,000 to launch a pound of payload into orbit, according to NASA. We'll need to pack light.

Or we can just build what we need when we need it.

"Let's skip launch," says Matt Napoli, a vice president of Made In Space, whose tagline, "Dream on Earth. Build among the stars," pretty much sums up its mission.

"Let's skip that whole process and build things where they're needed, whether it's in space, on the moon or Mars."

Made In Space

Architects of the Death Star would probably agree.

For the past two years, the company's Additive Manufacturing Facility (AMF) has provided 3D printing on the International Space Station. Manufacturing is controlled from the ground.

NASA and commercial customers use the AMF as a service for making parts, tools, assemblies and medical materials.

But first, the Mountain View, California, company had to get a 3D printer to work in space. Its engineers realized, for example, that the heat melting the feedstock material would gather at the extruder in microgravity instead of dissipating into the air as it does on Earth. They had to find a way to diffuse the heat. Made In Space also had to figure out if microgravity would prevent printed layers from sticking together, and whether fumes from the melted materials would be safe to breathe in the ISS's atmosphere.

So far, they've printed everything from wrenches to finger splints (in case an astronaut floats into a wall and jams a finger). They even printed a part for their first 3D printer.

Production has been on the small scale, but Made In Space sees "a future where life and work in space are commonplace." That eventually means large-scale construction projects.

Amazon founder Jeff Bezos also wants to move industry off Earth so we're producing stuff up there instead of down here. "We need to protect [Earth] and the only way to really protect it is to eventually ... move heavy industry off Earth," Bezos, who also founded the Blue Origin spaceflight company, told the BBC last year.

Hey, someone has to keep an eye on our big blue marble when everyone else focuses on the red planet.

Drink up

Imagine stepping off a spaceship after months in space. You'd be forgiven for wanting to crack open a cold one.

Travel is exhausting.

Budweiser is way ahead of you. Parent company Anheuser-Busch wants to corner the Mars beer market.

"We asked ourselves, 'How good will life on Mars be if you can't enjoy a cold beer?'" says Ricardo Marques, Budweiser's vice president of marketing. Last year, the company announced its goal to be the first beer on Mars.

Space Tango

"While socializing on Mars might be in the near-distant future, Budweiser is taking steps now to better understand how its ingredients react in microgravity environments so that when we get to Mars, Budweiser will be there," Anheuser-Busch said in a November press release.

Unfortunately, it won't be as easy as whipping out hops, barley, yeast, and some plastic buckets upon arrival. (Otherwise, Matt Damon probably would've tried.)

In partnership with Space Tango, of Lexington, Kentucky -- maker of special 10-centimeter cubes (3.9 inches) called CubeLabs that run experiments in microgravity -- Budweiser has already conducted two monthlong tests with barley, a core ingredient in beer making.

Mark Mann

The first experiment was designed to show how barley seeds react to microgravity. The second aimed to find out if barley would grow at the same rate in space as on Earth, and whether it developed any genetic mutations. Detailed research results are still pending.

Many of the things we learn in space will be applicable here, says Gentry Barnett, a program manager at Space Tango.

"If we find the stress of microgravity can affect the height or the water tolerance or the heat tolerance of a plant, then that makes it very beneficial to all the crop production here on Earth," she says.

Future experiments will look at making carbonation work in space, too, says Gary Hanning, director of global barley research at Anheuser-Busch. (Gross detail: Carbonation gives astronauts "wet burps.")

Barnett says they might eventually test malting the barley.

Cheers to that.

This story appears in the summer 2018 edition of CNET Magazine. Click here for more magazine stories.

Blockchain Decoded: CNET looks at the tech powering bitcoin -- and soon, too, a myriad of services that will change your life.

Follow the Money: This is how digital cash is changing the way we save, shop and work.