A framework for building native iOS, Android and visionOS apps with JavaScript or TypeScript, using native UI and APIs directly.
Tencent/MMKV
An efficient, small key-value storage framework for mobile and desktop apps, originally built for WeChat, using mmap and protobuf.
Open-source alternative to:SharedPreferences
- Stars
- 18,771
- Forks
- 1,998
- Open issues
- 2
- Last commit
- 2 days ago
What is it?
MMKV is a key-value storage framework for mobile and desktop applications, used in the WeChat app. It keeps data in memory-mapped files via mmap and encodes values with protobuf, and writes are saved immediately without calls to sync, apply, or save.
The library supports Android, iOS and macOS (including tvOS, watchOS and visionOS via the Apple bindings), Windows, generic POSIX systems, and HarmonyOS NEXT, with experimental Kotlin Multiplatform packages for Android and iOS. Multi-process access is supported, with concurrent read-read and read-write access between processes.
The project emphasizes a small footprint: the README gives binary size overheads of roughly 50K per architecture on Android, under 30K on iOS/macOS, and about 7K on POSIX. Bindings are also listed for Flutter, Go, Python and Swift.
Key features
- 01Stores data via mmap and encodes values with protobuf for fast reads and writes.
- 02All changes are saved immediately, with no sync or save calls required.
- 03Supports concurrent multi-process access on supported platforms.
- 04Small binary footprint, adding roughly 7K to 50K per architecture depending on platform.
- 05Covers Android, iOS, macOS, Windows, POSIX and HarmonyOS NEXT.
Use cases
- Persisting app settings and small key-value state in Android or iOS apps.
- Sharing stored values between multiple processes of the same app.
- Adding lightweight local storage to desktop or embedded POSIX programs.
Quick start
- 1
Install the Android library via Maven/Gradle
implementation 'com.tencent:mmkv:2.4.3' - 2
Install the iOS/macOS library via CocoaPods
pod install - 3
Install the HarmonyOS NEXT library via OHPM
ohpm install @tencent/mmkv - 4
Clone the source code for Windows or POSIX builds
git clone https://github.com/Tencent/MMKV.git
Things to know
- Officially supports only Android, iOS/macOS, Windows, POSIX and HarmonyOS NEXT; Kotlin Multiplatform support is experimental.
- Starting from v2.0.0 it no longer supports 32-bit architectures or API levels 21-22 on Android.
- The license is listed as NOASSERTION in metadata, though the README states BSD 3-Clause.
In collections
Topics
FAQ
- What is MMKV?
- An efficient, small key-value storage framework for mobile and desktop apps, originally built for WeChat, using mmap and protobuf. MMKV is a key-value storage framework for mobile and desktop applications, used in the WeChat app. It keeps data in memory-mapped files via mmap and encodes values with protobuf, and writes are saved immediately without calls to sync, apply, or save.
- Is MMKV free to use? What license does it have?
- MMKV is open source under the Other license. Check the license terms before using it in commercial products.
- Is MMKV still maintained?
- Actively maintained. The last commit to MMKV was on Nov 4, 2026.
- What can I use MMKV for?
- Persisting app settings and small key-value state in Android or iOS apps. Sharing stored values between multiple processes of the same app. Adding lightweight local storage to desktop or embedded POSIX programs.
- How do I install MMKV?
- Install the Android library via Maven/Gradle: implementation 'com.tencent:mmkv:2.4.3' Install the iOS/macOS library via CocoaPods: pod install Install the HarmonyOS NEXT library via OHPM: ohpm install @tencent/mmkv Clone the source code for Windows or POSIX builds: git clone https://github.com/Tencent/MMKV.git
- Where can I get MMKV?
- The source code and installation instructions are on GitHub: https://github.com/Tencent/MMKV
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
Python framework for building web, desktop and mobile apps with a Flutter-based UI, no frontend experience needed.
An in-app debugging and efficiency toolkit for Android, iOS, mini-programs, Flutter and Web, with performance monitoring, mock data and visual inspection panels.
Open-source, privacy-first analytics for mobile, desktop and web apps, offered as an alternative to Firebase and Google Analytics.
Google's open-source SDK for building natively compiled mobile, web, and desktop apps from a single Dart codebase.
A framework for building native Android and iOS apps using React, with JavaScript UI rendered by native platform components.