When I met Elon Musk in March 2012, he told me that he planned to build spaceships and retire on Mars. We had all been drinking that evening, so I thought it was the wine. I have since learned that he was dead serious: Musk fancies himself a modern-day James T. Kirk, captain of the fictional starship U.S.S. Enterprise. He is building not only the Tesla terrestrial sustainable transport vehicles but also spaceships for interplanetary travel.

The amazing future we saw in “Star Trek” could arrive 300 years ahead of the TV show’s timeline. Technologies are advancing at an incredible pace and in some cases are more advanced than the Enterprise’s.

Captain Kirk’s communicator, for instance, didn’t receive email, play music, surf the web, provide directions, or take photos. It also didn’t tell you jokes, as Google Assistant does. It was an inspiration for the 1990s flip phones, which have evolved into smartphones, far more advanced than the communicator.

Do you remember the tricorder, the hand-held medical instrument that Dr. McCoy used for checking a patient’s health? Try the new Apple Watch. It will detect atrial fibrillation, hypertension, sleep apnea, and even diabetes. Apple AAPL, +3.75% plans to turn our smartphones into medical tricorders, as do Google GOOG, +1.16% GOOGL, +1.13% , Microsoft MSFT, +2.27% , Samsung 005930, +0.17% and others.

One New Delhi startup, Healthcubed, has developed a portable compact medical device that provides more than 40 measures and tests, including blood pressure, electrocardiography, blood oxygenation, heart-rate variability, blood sugar and urine protein, and is able to diagnose diseases such as HIV AIDS, syphilis, dengue fever and malaria.

Dr. McCoy’s tricorder didn’t do blood and urine tests as Healthcubed does.

Read:India can teach the U.S. how to slash health-care costs by 40% — without rationing care

We already have “Star Trek”–like video-chat capabilities on our smartphones, with Skype, WhatsApp, and FaceTime; and these don’t require the large, clunky monitors that we saw on “Star Trek.”

“Star Trek” replicators would print food and everyday objects in seconds. Today’s 3-D printers are version 0.1 of this technology, able to create objects in plastic, metal, glass, titanium and human cells, though painfully slowly. Give them a few years, and they will become as fast and inexpensive as our laser document printers are. By 2030, we can expect to be 3-D-printing our dinner as well as our electronics.

What you need to know to invest in the space economy

Wasn’t it strange that no matter what planet the crew from “Star Trek” visited, everyone seemed to speak English? This was made possible by the Universal Translator, a device on the lapel of their shirts. Google and Microsoft Translator apps are already doing this across dozens of languages. They also let you hold your phone camera over foreign text and have it translated instantly into a script you recognize. To prepare for our interactions with the Klingon Empire, Microsoft has readied a translator that supports the Klingon language and script, pIqaD.

The holodecks we saw in “Star Trek” were mind-blowing; the crew would walk into an otherwise empty room and experience a different vista. Try out the HTC Vive, Oculus, or PlayStation virtual-reality headsets, and you will realize that holodecks are only a few years away. The first time I used the Vive, I almost had a heart attack because I lost my footing at the top of Mount Everest.

The most incredible “Star Trek” technology was the transporter. “Beam me up, Scotty” was all that Kirk had to say to his chief engineer to find himself transported to the spaceship from a nearby planet. The transporter converted physical objects and people into an energy patterns, “beamed” them to a target, and reconverted these into matter.

Even on this, we have made progress. Scientists have made significant breakthroughs in quantum teleportation, duplicating the spin state of an electron between one place and another through quantum tunneling — without transmitting matter or energy through the space intervening. The distance record is held by China, which teleported matter as far as 1,200 kilometers using its Micius satellite.

This is a technology that I have no interest in using, however; there is no way that I will willingly allow my atoms to be disintegrated in one location and reassembled in another. I would worry about a software bug or a hardware crash. We saw these, too, in “Star Trek.” I am content with my self-driving Tesla TSLA, +5.04% and look forward to the drones that will soon transport us between cities.

Yes, the flying cars we saw on TV too are coming, and they will take the form of human-transportation drones such as those China’s EHang is testing in Dubai.

The most exciting “Star Trek” marvel of all — the Starship Enterprise — is also on its way. Musk’s company SpaceX has built heavy, reusable rockets; docked a spacecraft with the International Space Station; and returned with cargo. Musk tweeted Christmas Eve that his first spaceship would feature “raptor” engines and come in stainless steel.

He isn’t alone; billionaires such as Richard Branson and Jeff Bezos are also building their own spacecraft.

So we are on the cusp of creating the amazing future we saw in science fiction. The challenge for humanity is to make sure that it doesn’t self-destruct along the way. We have make sure that we use technology wisely and equitably, so that all benefit from it. And we must gain greater autonomy rather than dependence.

Vivek Wadhwa is a distinguished fellow at Harvard Law School and Carnegie Mellon’s School of Engineering at Silicon Valley. He is the author, with Alex Salkever, of “Your Happiness Was Hacked: Why Tech Is Winning the Battle to Control Your Brain — and How to Fight Back” and “The Driver In the Driverless Car.” Follow him on Twitter @wadhwa.