Just something I was wondering about when I've seen this on reddit today. Unlike in firearms where the pressure propels the projectile, in a railgun, wouldn't the pressure ahead/behind of the projectile slow it down instead? If so, would it be by a significant amount?
For both conventional guns and rail guns, the resistance from pressure ahead of the projectile is usually negligible. Venting probably won't help much either if the projectile gets near the speed of sound because the air ahead of the projectile won't have time to move out of the way. You could fire in an evacuated chamber to completely avoid the air resistance, but the gains probably wouldn't justify the added complexity.
Yes a pressure differential would act to slow down the projectile. But I see no reason why the chamber could not be vented behind the projectile, in which case this would greatly reduce any resistance due to a pressure differential. There is also no reason the projectile has to seal the barrel as in a traditional gun. So pressure could equalize by passing around the projectile also. How significant any slowing of the projectile would be would depend heavily on the construction of the gun and this would need to be considered in the design.