In China, its place of invention, it's called "fire medicine", so don't need to be guns.
Before guns and cannons they were used in fireworks and bombs/grenades
A further question I would ask would be was there any use of gunpowder before guns.
Gunpowder is called "fire medicine" (火藥 huoyao) in sources from China, where it was first invented. Early guns were called "fire spears/lances" (火槍 huoqiang), early cannons were named "fire catapaults" (火砲 huopao), and early rockets were "fire arrows" (huojian 火箭). Notice that the radical for pao 砲 is 石, which means stone. As cannons become more popular in Chinese warfare, the radical is eventually supplanted by 火 (fire) to form the new character 炮.
In Arabic, gunpowder was known as "Chinese snow" (ثلج الصين thalj al-ṣīn) in a source by Ibn al-Baitar of Malaga.
Gunpowder was brought to Europe from Asia around the 13th century. Roger Bacon describes it as an ingredient for an exotic toy. The relevant passage is reproduced below.
We have an example of these things (that act on the senses) in that children's toy which is made in many [diverse] parts of the world; i.e. a device no bigger than one's thumb. From the violence of that salt called salpetre so horrible a sound is made by the bursting of a thing so small, no more than a bit of parchment, that we find exceeding the roar of strong thunder, and a flash brighter than the most brilliant lightning.