Frontend Development 19 min read

Chameleon (CML) 1.0 Release: An Enterprise‑Grade Cross‑Platform Framework

Chameleon (CML) 1.0, Didi’s open‑source enterprise‑grade cross‑platform framework, now supports all major mini‑programs, H5 and native clients, offers a richer Vue‑like DSL, extensive component libraries, significant bundle size reduction, and tooling integrations, enabling developers to consolidate codebases and streamline multi‑platform development.

Didi Tech
Didi Tech
Didi Tech
Chameleon (CML) 1.0 Release: An Enterprise‑Grade Cross‑Platform Framework

Chameleon (CML), the cross‑platform solution open‑sourced by Didi on GitHub, has officially launched version 1.0. The name “卡梅龙” (Chameleon) reflects its ability to adapt to multiple environments like a chameleon, offering ease of use, lightweight design, and future‑oriented features.

The 1.0 release follows three years of development, dozens of contributors, and thousands of iterations, achieving a stable enterprise‑level solution. Key statistics include 70+ scaffold releases, 5,090 commits, 40+ runtime releases, 900 runtime commits, an 83% issue‑resolution rate on GitHub, and over 85% unit‑test coverage.

Major new features :

Extended platform support with the first MVVM+ cross‑platform standard protocol, enabling developers to add new targets easily.

Full support for all major mini‑program platforms (WeChat, Alipay, Baidu, Toutiao, QQ), H5, and native clients.

Enhanced usability: richer DSL syntax covering >50% of Vue template capabilities, VSCode plugin with syntax highlighting and auto‑completion, and comprehensive syntax checking (93% coverage).

Framework optimizations: improved UI consistency, 40% reduction in bundle size, mock multi‑domain requests, lifecycle and style polymorphism, mixins, event bubbling, dynamic component events, page lifecycle hooks, and setData optimization for mini‑programs.

Extended capabilities: support for wxs, sjs, filter.js, sub‑package loading, native abilities such as custom tabbars, and multi‑domain mock support.

Component ecosystem :

c‑design : a UI library built on CML with 12 components (e.g., multi‑column picker, index picker, toast).

light‑ui : a lightweight, highly configurable component set with over ten cross‑platform components.

chameleon‑ui‑miniapp : a mini‑program‑focused UI library offering unified components across all mini‑programs and web.

The framework also provides a progressive integration path: developers can gradually adopt CML in existing projects, export CML components to each target platform, and reduce maintenance from multiple codebases to a single shared codebase.

Engineering enhancements include a modern webpack plugin (easy‑chameleon) for seamless integration, advanced link management (API prefix, publicPath, router), native performance strategies (bundle pre‑loading, incremental updates), and plans to support Flutter and React Native.

Tooling and debugging are covered by a suite of editor plugins (VSCode, Atom, WebStorm) and a customized DoKit integration offering console logs, storage inspection, container info, and quick DevTool access.

Future roadmap focuses on expanding platform categories, enriching component libraries, improving native performance, and building a unified cloud development platform with serverless capabilities.

For more details, visit the official site: https://cmljs.org/ .

Cross-Platformperformance optimizationOpen Sourcecomponent libraryMini Programfrontend frameworkMVVM
Didi Tech
Written by

Didi Tech

Official Didi technology account

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.