# Operating environment of Weixin Mini Program

Weixin Mini Program runs on multiple platforms: iOS / iPadOS WeChatAndroid WeChat Client, Windows PC WeChat Client and Mac WeChat Client; Weixin Mini Program hardware framework and WeChat developer tools for debugging, etc.

In different runtime environments, the script execution environment and the environment used for component rendering are different, and there are differences in performance:

  • On iOS, iPadOS, and Mac OS, the JavaScript code for the logic layer runs in JavaScriptCore, the view layer is rendered by the environment. IOS 14, iPad OS 14, Mac OS 11.4, etc.;
  • On Android, the JavaScript code for the Weixin Mini Program logic layer runs in V8 and the view layer is rendered by the WeChat proprietary XWeb engine based on the Mobile Chromium kernel;
  • On Windows, Weixin Mini Program logic layer JavaScript and view layer are all using Chromium kernel;
  • On the development tool, the JavaScript code for the logic layer runs in the [NW.js, and the view layer is rendered by Chromium Webview.

JavaScriptCore does not enable Just-In-Time Compiler (JIT) compilation, and its performance under the same conditions is significantly lower than other platforms.

# Platform differences

Although the operating environments are very similar, there are some differences:

  • JavaScriptsyntax and API support are inconsistent: syntactically, developers can simply turn onES6bypass the functions ofES5to circumvent details );In addition, the Weixin Mini Program base library has the necessary Polyfill built in to compensate for the API differences ( details ).

  • WXSSrendering performance is inconsistent: Although most of the problems can be avoided by turning on style patching , developers are advised to check the true performance of Weixin Mini Program separately at each end.

The developer tools are for debugging purposes only, and the final performance is dependent on the client.