Most guns fire ammunition which comes in a cartridge.
The cartridge consists of a shell (to hold things together),
a bullet, some propellant, and a primer. The primer
ignites when struck by the gun's hammer, and in turn
causes the propellant to ignite.
Most primer includes a lead compound,
and older primers
contained even more toxic chemicals.
Lead free primers (so called "green bullets") are being
developed, but they don't yet fire reliably, as of the time
I'm writing this idea.
This idea is to create a gun which can fire a bullet which
has no primer at all.
Now, maybe you're reading this and thinking, "Oh, let's use
something electrical, like a spark or a laser," but this idea
is to go the other direction.
Instead, we will have a certain amount of gas (or air)
behind the bullet, and our hammer will be a closely fitting
piston.
When the gun is fired, the piston moves forward quickly,
compressing the gas, and the gas will heat adiabaticly.
The hot gas then ignites the bullet's propellant, and
everything afterwards happens similarly to how it works in
a normal gun.
This idea is not new, but it is not widely known to exist.
The only gun I know of which used it was the Daisy V/L,
who stopped making it a year after they started, it because
the government classified it as a firearm, and Daisy
Outdoor Products (who made lots of air guns) was not
licenced as a firearms manufacturer and did not want get
such a licence.
That is, the gun failed due to legal bullshit reasons, not
technical reasons.
Note: The Daisy V/L happened to fire caseless ammo. I
honestly don't care one way or the other about that. There
are of course pros and cons for caseless, but they are
beyond the scope of this idea.