I've always questioned the feasibility of spacecraft mounted railguns as in what has made popular in science fiction. IMO, the much feared kinetic bombardment seems unlikely given the yield per lift cost. Perhaps, projectiles could be manufactured off planet on a low gravity moon. But that is just my neophyte view. There is undoubtedly a lot of astrophysics that I don't understand.