I ran a test on diatomaceous earth to see if it really works. With a teaspoon of the stuff in one container of rice and none in the other container of rice, I added bugs to both. The next morning, all of the bugs in the diatomaceous earth container were dead - zero survivors. Rice with DE tastes just fine; I tested that too.
It’s a good idea to wash the grain before cooking to rinse away the diatomaceous earth.