The escape velocity for Earth is 11 km/s. The escape velocity for mars is 5 km/s. The situation for a ground launched projectile is of course worse because of air resistance losses.
It's still really difficult to accelerate something to 5 km/s. (It's 2.5 km/s on the moon)
Wikipedia says there are prototype railguns that can shoot at 3km/s now (wording: "can regulary exceed 3km/s")... are we at a point now where I could put a rail gun and a bunch of solar panels and batteries on the moon and just shoot (tiny) stuff into orbit?
Not like the rocks on the moon are that useful for anything, but....