No. In fact, it's not even that hard to make a railgun, and it's a fairly common home physics "experiment". Making a weaponized home railgun would likely be rather more difficult. However, if you do so it's likely that you will be getting job offers, not criminal charges.