1. A method for automatically persisting variable data, the method comprising: identifying, by a computer system upon compiling or interpreting source code for an application, a variable in the source code that is declared with a predefined keyword, the predefined keyword indicating that the variable should be persistent; and for each instance in the source code where data is assigned to the variable, generating, by the computer system, runtime code for saving the data in a nonvolatile data store.