目录
Hierifer

feat(harmony): add getAppBaseInfo, filter cache result (#237)

  • feat: add tabbar on harmony

  • feat(fe): add h5 tabbar

  • fix(fe): tabbar height

  • fix: code review issue and compile tabbar icon

  • fix: code review issue

  • feat: remove useless comment

  • fix(fe): modal 样式问题

  • fix(fe): modal 样式问题

  • feat: merge conflicts

  • feat: change style logic

  • feat: add tabbar function and style

  • feat(fe): adapt relative icon path issue

  • feat: 修复展示tabbar 展开缓慢的问题

  • feat(fe): border color issue

  • feat(jssdk): provide promiselike

  • fix(harmony): resolve QuickJS VERSION file conflict with C++ header on macOS

On case-insensitive filesystems (macOS), QuickJS’s plain-text VERSION file shadows the C++17/20 standard header when quickjs_SOURCE_DIR is in the include path, causing “expected unqualified-id” compilation errors.

Delete the VERSION file at both configure time and after git updates in the build-time update_quickjs_latest target.

Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com

  • feat(harmony,fe): implement getAppBaseInfo with hostEnv snapshot and field filtering
  • Add getAppBaseInfo bridge method on Harmony with filtered fields (SDKVersion, enableDebug, host, language, version, theme, fontSizeScaleFactor, fontSizeSetting)
  • Add missing systemInfo fields on Harmony: enableDebug, language, theme, host, fontSizeScaleFactor, fontSizeSetting
  • Add DMPHostEnvBuilder to build and cache hostEnv snapshot for loadResource message
  • Add pick() function in service layer to filter hostEnv-resolved API responses
  • Add missing fields to H5 getSystemInfoSync (theme, fontSizeScaleFactor, fontSizeSetting, language)
  • Regenerate JSSDK to v1.0.15

Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com

  • test(service): update system-info tests for field filtering

Use toEqual instead of toBe for APIs that now return filtered subsets via pick(), and expand test data to cover all API field groups.

Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com

  • feat(JSSDK): update version

Co-authored-by: huteng huteng@echo.tech Co-authored-by: Claude Opus 4.6 noreply@anthropic.com

3天前626次提交

English Version

dimina

Dimina is released under the Apache 2.0 license. Platform PRs welcome!

星河小程序(Dimina)——滴滴开源跨端小程序

Dimina 发音为 /diːminə/,是 didi miniprogram 的缩写,旨在打造灵活、轻量的小程序跨端开发框架。

简介效果展示上手使用参与共建星标趋势开源协议

简介

星河小程序(以下简称 Dimina)是滴滴自研的一套轻量级跨端小程序框架,可以理解为开源版的小程序方案,致力于为开发者提供高性能、跨平台、低门槛的开发体验。

目前,Dimina 已支持 Android、iOS、Harmony 和 Web 四大平台。开发者可以将 Dimina 作为移动端跨平台开发框架,将已有小程序逻辑以独立模块方式集成到现有 App,也可以直接使用小程序语法开发,并通过 Dimina 工具链编译为各端容器可加载的资源包。

🔧 技术特性

  • 资源离线化: 资源本地存储减少网络请求
  • 逻辑视图分离: 独立 JS 引擎避免主线程阻塞
  • 原生能力封装: 统一 API 调用原生功能
  • 页面预加载: WebView 预热提升性能

🚀 跨平台支持

  • Android: QuickJS + Android WebView
  • iOS: JavaScriptCore + WKWebView
  • Harmony: QuickJS + Harmony WebView
  • Web: Web Worker + Browser

效果展示

在线演示:https://didi.github.io/dimina/

Android iOS Harmony
Android iOS Harmony

上手使用

graph TD
    A[创建小程序项目] --> B[开发小程序页面]
    B --> C[使用小程序语法编写逻辑]
    C --> D[使用 DMCC 编译打包]
    D --> E[生成星河小程序包]
    E --> F{目标平台}
    F -->|Android| G[集成Android SDK]
    F -->|iOS| H[集成iOS SDK]
    F -->|Harmony| I[集成Harmony SDK]
    F -->|Web| M[运行Web容器预览]
    G --> J[运行到Android设备]
    H --> K[运行到iOS设备]
    I --> L[运行到Harmony设备]

详细步骤

  1. 创建小程序项目

    • 使用小程序开发工具创建项目
    • 配置 app.json 和页面路由
  2. 开发小程序页面

    • 编写 WXML 模板
    • 添加 WXSS 样式
    • 使用 JavaScript 编写页面逻辑
  3. 编译打包

    • 进入 前端工作区 安装依赖并执行编译
    • 使用 DMCC 编译器 将小程序代码编译为 Dimina 运行时资源
    • 执行 pnpm generate:app 生成小程序包到 shared/jsapp
    • 执行 pnpm generate:sdk 生成 JSSDK 包到 shared/jssdk
  4. 平台接入

  5. 调试与发布

    • Android、iOS、Harmony 示例工程会从 shared/ 同步资源到各端资源目录
    • 集成 App 进行真机调试,确认 API、组件和生命周期行为
    • 按各平台发布流程打包发布

参与共建

Dimina 遵循小程序标准化白皮书进行设计,目前已对齐微信小程序的主要功能。

已支持能力详见Dimina 能力参考指南

得益于 Vue3 与小程序语法的高度相似,Dimina 底层视图渲染框架选择基于 Vue 构建。Dimina 框架通过 DMCC 将小程序语法转译为 Vue 语法,并在此基础上实现小程序标准组件体系。最终,通过实现端侧小程序容器来提供原生能力,同时灵活加载并展示视图页面。

如需了解更多关于框架底层实现的原理,欢迎查阅详细文档

由于行业内各类小程序方案已迭代多年,Dimina 目前尚未完全覆盖全部小程序 API/组件/特性。欢迎大家积极贡献代码、提出建议,与我们共同完善 Dimina。

微信群

WeChat

星标趋势

如果你觉得 Dimina 对你有帮助,欢迎点击右上角 ⭐Star 支持我们,让更多人了解和使用这个项目。

开源协议

Dimina 遵循 Apache-2.0 协议进行分发和使用,更多详情请参见协议文件

邀请码