> ## Documentation Index
> Fetch the complete documentation index at: https://docs.flashcat.cloud/llms.txt
> Use this file to discover all available pages before exploring further.

# Compatibility

> Learn about WeChat Mini Program RUM SDK base library, development tool, and platform API compatibility requirements

The WeChat Mini Program RUM SDK runs in the WeChat Mini Program environment and collects data through lifecycle, network, storage, error listener, and performance APIs provided by the Mini Program base library. Before integration, confirm that your Mini Program's minimum base library version and development tool configuration meet the following requirements.

## Version Requirements

| Item                      | Requirement                      | Description                                                                                             |
| ------------------------- | -------------------------------- | ------------------------------------------------------------------------------------------------------- |
| Mini Program base library | `2.10.0+`                        | SDK initialization registers `wx.onUnhandledRejection`; runtimes below this version are not recommended |
| Recommended base library  | `2.12.0+`                        | Enables complete page rendering, startup, script execution, and setData update timing collection        |
| WeChat DevTools           | Recent stable version            | Must support npm dependency installation and **Tools > Build npm**                                      |
| npm package               | `@flashcatcloud/miniprogram-rum` | Includes core functionality, platform adapter, and the RUM entry point                                  |

<Warning>
  If your Mini Program allows users to run on base library versions below `2.10.0`, SDK initialization may fail to register unhandled Promise rejection listeners. We recommend setting a minimum base library version in the Mini Program admin console, or evaluating low-version user coverage before integration.
</Warning>

## Feature Compatibility

| Feature                    | Required capability                                                         | Minimum base library | Behavior on lower versions                                                       |
| -------------------------- | --------------------------------------------------------------------------- | -------------------- | -------------------------------------------------------------------------------- |
| Page lifecycle collection  | Global `Page` wrapping, `onLoad`, `onShow`, `onReady`, `onHide`, `onUnload` | Basic capability     | Limited by Mini Program page lifecycle support                                   |
| User action collection     | Page event handler wrapping                                                 | Basic capability     | Limited by page event support                                                    |
| Network request collection | `wx.request`, `wx.uploadFile`, `wx.downloadFile`                            | Basic capability     | Cannot automatically collect request types whose APIs are unavailable            |
| Error collection           | `wx.onError`, `wx.onUnhandledRejection`                                     | `2.10.0+`            | SDK is not recommended on lower versions                                         |
| Network status             | `wx.getNetworkType`, `wx.onNetworkStatusChange`                             | Basic capability     | Uses the default connected state if network detection fails                      |
| Local cache                | `wx.setStorageSync`, `wx.getStorageSync`, `wx.removeStorageSync`            | Basic capability     | Used for session state and failed payload retry                                  |
| Page performance           | `wx.getPerformance`                                                         | `2.11.0+`            | Performance API metrics are skipped when unsupported                             |
| setData update timing      | Page instance `setUpdatePerformanceListener`                                | `2.12.0+`            | The SDK checks whether the function exists and skips the metric when unsupported |

<Note>
  `trackPerformance` is enabled by default, but performance APIs are handled defensively in the SDK source code. If the base library does not support `wx.getPerformance` or the page instance does not support `setUpdatePerformanceListener`, basic page, action, request, and error events can still be collected.
</Note>

## Supported Platforms

| Platform                                           | Support status  | Description                                                                                                                                |
| -------------------------------------------------- | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| WeChat Mini Program                                | ✅ Supported     | The SDK is designed for the WeChat Mini Program runtime                                                                                    |
| WeChat Mini Game                                   | ❌ Not supported | The current SDK depends on Mini Program page lifecycle hooks and `Page` wrapping                                                           |
| Other Mini Program platforms                       | ❌ Not supported | Alipay, Baidu, ByteDance, QQ, and other Mini Program platform APIs are outside the current support scope                                   |
| uni-app / Taro and other cross-platform frameworks | ⚠️ Verify first | If the final build runs as a WeChat Mini Program and preserves standard `Page` and `wx.*` APIs, validate integration in a test environment |

## Development Tool and Build Requirements

When integrating through npm, build npm dependencies in WeChat DevTools:

1. Run `npm install @flashcatcloud/miniprogram-rum` in the Mini Program project root
2. Open the project in WeChat DevTools
3. Run **Tools > Build npm**
4. Confirm that the generated `miniprogram_npm` can be referenced by Mini Program code

<Tip>
  When validating compatibility locally, select different debug base library versions in WeChat DevTools local settings, then verify initialization, automatic collection, and data reporting behavior.
</Tip>

## Related Pages

<CardGroup cols={3}>
  <Card title="SDK Integration" icon="plug" href="/en/rum/sdk/wechat-miniprogram/sdk-integration">
    Install and initialize the WeChat Mini Program RUM SDK.
  </Card>

  <Card title="Advanced Configuration" icon="sliders" href="/en/rum/sdk/wechat-miniprogram/advanced-config">
    Configure proxying, tracing, sessions, and manual instrumentation.
  </Card>

  <Card title="Data Collection" icon="database" href="/en/rum/sdk/wechat-miniprogram/data-collection">
    Learn which page, action, request, error, and performance data the SDK collects automatically.
  </Card>
</CardGroup>
