And fictional. :’) The mass needed to build it was (if memory serves) about that of Jupiter, but of course, not of the same material as Jupiter. The ring turned and the high wall on each side kept the atmosphere from spilling out. Maybe a force field was involved, I don’t remember. “Ringworld” and “Ringworld Engineers” were the last two book-length works of fiction I ever read, I think. The second of these was inspired in part by a group of geek physics grad students who chanted, “the Ringworld is unstable!”
Time to buy new copies.