I smoked salt a bunch of times. I use dry wood and lump coal. But be mindful of moisture. Use chunks instead of logs as the chunk with create a less moisture in the unit. I wrap the salt in cheese cloth and hang it in the unit. I have cooked while doing it as well. I used course sea salt and would grind it in a mill when necessary.
As for sugar I can't see the reason. I would love to hear what application you would use it with though. As well i am sure that the same method will work.