By US law. In other parts of the world the definition of "gun" varies. In Finland for example, there is no definition of "gun" in the law. In Finland, the "gun" is its serial number. There are vague definitions of gun parts. So, any single part is not a "gun" but some parts that either touch the cartridge when the gun goes off, or are "under pressure", or touch parts that fall under former categories, are "gun parts" and need a permission. But not always: a Mosin bolt is not a restricted part... but an MP5 trigger housing is. It's the wookie defence equivalent of legislation.