So anything goes eh? Does that mean that you think that we shouldn't have prosecuted the Japanese and Germans for war crimes, including for the Rape of Nanking? If not, what is your point?
You brought up the “rules of war.” History shows that those rules often far short of lofty ideals when the rubber meets the road and the bullets start to fly. The use of the atomic bomb is different only in effectiveness to a siege engine employed against a European city in the Middle Ages, for in both cases whole cities, civilians and all, were laid waste. If one seeks perfection in waging war every nation would be found wanting.
Furthermore, as others have pointed out, both Hiroshima and Nagasaki represented military targets. Unlike the Rape of Nanking, where the Japanese took part in the wholesale slaughter of civilians just for sport, without any military objective whatsoever, the use of atomic weapons destroyed military capacity as well as addressed the Japanese will to fight and therefore shortened the war. And in the case of Nagasaki, a warning was given for people to clear out before dropping the second bomb.
Finally, the government of Japan was prepared to use those same grandmothers and children as soldiers to repel an Allied invasion should it have taken place, and untold millions would have died if the bombs were not dropped. Any clear thinking Japanese citizen should give thanks to Groves and Oppenheimer, for without them the blood of Nippon would have flown into the sea like a river of death beyond that ever seen before or since.