There’s a good recent book series about this by Daniel Suarez called Delta V (in the first book they process regolith from an asteroid; in the second book its on the moon; presumably the unreleased third book is on Mars).