1. A computer-implemented method for accessing a native application programming interface (API) of a computing device, the method comprising: executing, on a computing device, a first application written in a device-independent programming language; providing one or more control objects from the executing first application to a compiler on the computing device, wherein the control objects include state information that defines a context for accessing the native API and the control objects include at least one control script; compiling the control script on the computing device to create a second application that is native to the operating system of the computing device; executing the second application on the computing device, wherein the executed second application accesses the native API of the computing device to generate an output through a hardware interface of the computing device based on the context; receiving, by the first application, user input; and providing, based at least in part on the received user input and from the executing first application to the executing second application, one or more updates to cause the executing second application to accesses the native API of the computing device to generate one or more additional outputs through the hardware interface of the computing device and wherein the one or more updates include one or more updates to the state information in the control objects.