my company makes a water repellent spray for motorbike visors, the product is called Salclear TT-X, www.salclear.com
This could be used on your spectacles in heavy rain.
For light rain and to stop fogging you should try Salclear Sport.
In our testing programme I used prototypes of the above on spectacles and sunglasses whilst mountainbiking and running in all sorts of weather, and they proved perfect.
I ran an ultra mountain race recently with the defog on my wrap around sunglasses, without fogging up to half way through the race, (3hrs for me), when the sun went in and I took the glasses off.