Problem with guns is the recoil.
Recoil is a problem. But contrary to what the op states:
Weight of the chosen firearm itself isn't actually that large of a challenge…
The cost of putting mass into space is, in the current best case scenario (the lowest cost among competing commercial launchers) about $43,000
USD per pound to get it to the ISS. But the cost is highly dependent on where you want it once it's in space -- higher orbits cost significantly more.
Guns use mass to safely encapsulate chamber pressures and manage recoil forces. A gun of less than 1 pound (better to use .45Kg)* will only manage pistol-sized cartridges. You will want a couple pounds (1+ Kg) to manage rifle-sized cartridge chamber pressures, unless you move to very expensive metals, which you might want to do given the very expensive launch costs.
*Note: Pounds are a measure of weight, which will change radically as you go into the lower and lower gravity of various levels of orbit. Kgs are a measure of mass, which remains unchanged anywhere you go in space.
In any case, if you are building a "space force" of many armed soldiers, the weight / mass of the guns will matter. Imagine if the USMC had to pay $43,000 USD to ship each personal weapon to every outpost or depot. It adds up pretty quickly.
UshCha has it pretty much right on handling recoil. Using the mass of the gun to manage recoil is a massively expensive undertaking in space. Far better to use low- or no-recoil weapons to start.
Mass of the weapon can be mitigated by choosing weapon types that do not generate high chamber pressures. This favors directed energy weapons and rocket-propelled projectile weapons.
Add to UC's analysis the fact that there is almost no drag in space. This means that there is no counter-force to the acceleration a rocket engine provides -- all thrust generates additional velocity, none is use to maintain the velocity already established. Depending on the range to the target you can establish VERY high velocities with rockets in space. And there is no need to add mass to the projectile in the form of stabilizing fins (they wouldn't work anyways).
The shortcomings are the time-to-velocity of the rocket projectile relative to other weapon types, the collateral damage to "friendly" objects behind the rocket, and the weight of the loaded rocket projectile is greater -- the thrust-to-fuel is lower than a gun (as you are not effectively enclosing and directing as great of a % of the impulse of expanding gases, as you do in a gun) meaning you'll need more fuel than in a gun cartridge, and you need some mass to enclose the fuel and control the burn of the rocket. The longer and slower your burn, the less problem you have with mass to control and with collateral effects.
All of that said, if you go with very small, long-burning fast projectiles you could manage a fairly high number of projectiles for not-too-much mass. Or you can have a very small burst charge in a frangible projectile, which turns a single projectile into an expanding cloud of projectiles as it nears the target. Again, with no meaningful drag, half of the projectiles in this cloud will not loose any velocity at all, and will in fact gain velocity, from the bursting process.
But such rockets won't be particularly useful for visual-range fighting. Directed energy weapons will probably be better for the short-range fast fight.
Aim a laser at someone and they will overheat due to the problem of heat dissipation.
Space systems already manage heat dissipation. The sun's radiation, when not filtered by an atmosphere, is a right b!tch. An astronaut's space-walk suit already has to manage a 300f differential in the surface temparatures between the sunny and shady sides of the leg or arm.
So the emphasis will probably be on creating pin-holes or small slices. That's all you need to do to ruin an astronaut's day.
Or so I understand.
-Mark
(aka: Mk 1)