1. A method performed by a device having an operating system and a system library, the method comprising: receiving, by a processor of the device, a request to perform a function-call of an application, wherein the function-call references one or more features of a first version of the operating system; at run-time of the application on the device, based on an identification of a version of the operating system and the system library on the device, determining whether the version supports the function-call of the application so as to be able to perform dynamic compilation of code in the system library for the function-call; based on the version of the operating system and the system library on the device being unable to support the function-call, accessing a compatibility library associated with the application, wherein the compatibility library includes pre-compiled code for execution by a reference device having a given version of the operating system other than the first version of the operating system; determining, based on the given version of the operating system hardware requirements for using the given version of the operating system; identifying compatibility between hardware of the device and the determined hardware requirements; and based on the identification of the compatibility, at run-time of the application on the device, executing given pre-compiled code from the compatibility library to emulate at least a portion of functionality of the code in the system library referenced by the function-call of the application.