# plug-in

Plug-in development and use is supported since Weixin Mini Program base library version {% version ('1.9.6')%}.(If the plugin contains pages, the base library version {% version ('2.1.0')%} is required.))

A plug-in is an encapsulation of a set of js interfaces, custom components, or pages that are embedded in Weixin Mini Program. The plug-in cannot run independently and must be embedded in other Mini Programs to be used by the user; And third-party Mini Programs cannot see the code of the plug-in when they use it. Therefore, plug-ins are suitable for encapsulating their own functions or services and making them available to third-party Mini Programs for display and use.

Plug-in developers can write a plug-in and upload the code just as they did with Weixin Mini Program. After the plug-in is released, other Mini Programs can call it. The Mini Program platform hosts the plug-in code, and when other Mini Programs are called, the uploaded plug-in is downloaded and run with the Mini Program.

Compared to regular JavaScript files or custom components, plug-ins are more independent, with separate API interfaces, domain name lists, etc., but they are also subject to some restrictions, such as some APIs cannot be called or are limited in functionality .There are also individual special interfaces, which can be implemented indirectly by using the plug-in function page although the plug-in cannot be called directly.

At the same time, the framework provides data security protection for each plug-in used by Weixin Mini Program and the Mini Program so that neither party can steal data (unless it is actively passed to the other party).

For plugin developers, please read the Developing Plugins chapter;For plug-ins users, please read the Using plug-ins section.