1. A method to secure execution of a non-native application coded in non-native code, the method comprising: modifying the non-native application to obtain a native code function and an application stub, the native code function being executable within a predefined trusted module, the pre-defined trusted module having one or more native environment security functions, the application stub having at least one execution dependency dependent on the native code function, the at least one execution dependency including a call to the native code function; and packaging the application stub with the native code function.