“I put the ‘not’ in ‘astronaut,’” pleads Ryland Grace (Ryan Gosling), trying to argue his way out of salvaging humanity. Like another savior, he would take a way out if there were one. But he knows he’s been chosen. And that destiny can’t be denied.

The angel Gabriel might possibly cross one’s mind during “Project Hail Mary,” but the film—directed by Phil Lord and Christopher Miller, writers of “The Lego Movie” and “21 Jump Street,” and based on the 2021 novel of the same name by Andy Weir—is more about humanity throwing the astrophysical football from its own 30-yard line. The end zone is the sun; the goal is the survival of Earth. 

We don’t see many movies about global cooling, but here the sun is being eaten and the cause discovered by Ryland—middle-school science teacher and doctor of molecular biology—is what he calls “astrophages,” cellular creatures that consume energy and thrive and breed on CO2. (A nod to earthly climate change, one supposes.) The international effort to halt solar catastrophe, overseen by the stern Eva Stratt (the wonderfully dry German actress Sandra Hüller of “Anatomy of a Fall”) will actually use astrophages to counter what is admittedly a long-term but inevitable cosmic blackout. But there’s only enough fuel to get a team there. Not back. Hence Ryland Grace’s reluctance.

It’s been a while since a movie was touted as “the feel-good film of the year.” And it’s early in the season. But “Project Hail Mary” certainly qualifies as an uplifting experience at the cinema, being a mix of selflessness, sacrifice, camaraderie and even a certain amount of melancholy. Grace, as he’s called throughout, is a perfect choice for the project because he’s a scientist, and because he has no one. No girlfriend, no wife, no kids. “Not even a dog,” says Eva, who is often humorless to the point of hilarity.

There are a lot of echoes in “Project Hail Mary,” the solo flyer in deep space having been portrayed by Sandra Bullock (“Gravity”), “Matt Damon (“The Martian”), Charlton Heston (“Planet of the Apes”) and Sam Rockwell (the underappreciated “Moon”). Others, too. Grace doesn’t leave his planet alone—he has traveling companions, but they don’t survive the trip. In fact, he barely comes out of his induced coma intact—after 11 years, he’s disoriented, clumsy, a quasi-amnesiac and not exactly savior material. And he’s nearly scared out of his wits when he discovers after a while that he’s not alone—another one-man (or one-alien) rescue team, whose shipmates have also died, has come to solve the same problem. “Rocky,” as Grace dubs him, looks like a stone crab made out of stone, and through computerized translation the two form the kind of bond that can only send one’s heart into orbit. It may be true that in space no one can hear you scream. But they’ll probably hear you sigh.

But “Project Hail Mary” isn’t sappy, for all the sentiment. Rocky is clearly an homage to E.T., and he’s funny in the way a literal-minded character can be, talking without adverbs or articles. I say “he” because that’s the voice Rocky ends up with. But Grace tries out some others in his laptop’s program. One sounds like Ian McKellen, another like Meryl Streep. (“She can do anything,” Grace marvels. Gosling is pretty funny, too.)

There are a lot of spacey visual shenanigans going on in the film, pulsing and throbbing and blinking and bending. Viewers can only experience peril and chaos if they know where they are to begin with, and the center of gravity here is an elusive thing. This may prove something of an obstacle in the movie, as is the depth of the scientific bushwah that gets shoveled our way in the course of explaining the planet’s demise. But who knows? It may all check out. But most of us won’t know and, frankly, won’t care. 

It’s a richly emotional film, one with a deep sense of morality and virtue, and Gosling does nothing to diminish his position as probably the most charismatic male actor currently saving the world, or whatever movie stars are required to do. 

This “Hail Mary” is a pass completed, you might well say. And a righteous score.