No, I don't mean missiles or anything...But rather, just experimental guns, such as the first designs of the automatic rifle... How did they form and shape the metal?
Metal casting is a very old technique.
The desired part is carved from wax and then ceramic molded around it with a small hole. When the ceramic is fired, the wax melts leaving a negative impression of its shape inside the mold. The heat resistant ceramic can then have molten metal poured into it.
Here's a simple video showing the technique. Obviously for making a gun, the quality and precision of the work would be higher, but the concept is the same.