Empower the Web community and invite more to build across platforms.
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
[Infra][Harmony] Add library plugin npm publishing workflow - Publish unpublished plugin versions independently of SDK HAR releases. - Support develop pushes and manual npm tags with trusted publishing. - Validate plugin tests and packed entry/type files before publishing. - Document the initial publication and trusted-publisher setup. | 7 天前 | |
[Refactor][Android] Share native async view creation scheduling Extract the legacy native create-view scheduler into a reusable per-context helper. Keep existing feature gates, deferred context attachment, producer-side flush snapshots and main-thread finalization positions unchanged. Centralize OnceTask and promise handling, high-priority dispatch, and LIFO preparation assistance while waiting. Preserve result ownership across nested waits and batch replacement, and settle empty results when a platform context has expired. This change does not integrate fragment-layer hosts. Add deterministic scheduler tests, register the native test target, and document the threading and ownership contract under the painting module's ai/docs directory. TEST: All 12 scheduler tests passed, including 200 shuffled repetitions. Full-stack Android and renderer regression results are recorded in the dependent change. Formatting, spelling and spec validation passed. | 4 天前 | |
[Doc][Agents] Align commit message guidance with contributing guide - Replace invalid `Docs` and `Test` types with `Doc` and `Testing`. - Add the omitted `doc:` and `TEST:` footer examples. - Align the agent guidance with `CONTRIBUTING.md`. - Verified with `git diff --check`. Assisted-by: TRAE | 10 天前 | |
[Doc] Correct CSS guidance in lynx-api-docs 0.3.9 - Distinguish unsupported CSS attribute selectors from DOM query matching and recommend explicit state classes. - Explain configuration and target SDK defaults for an omitted flex basis. - Distinguish initial box-sizing auto from its usual border-box behavior. - Update documentation summaries and bump both docs packages to 0.3.9. TEST: Public and internal docs package tests, including staged build/install; Markdown file links; git diff --check. | 11 小时前 | |
[Feature][DevTool] Add CDP controls for INFO log sublevels Add Lynx.setLogLevel and Lynx.getLogLevel for the process-wide threshold shared with host logging APIs. Accept named levels including MONITOR and OBSERVE without a separate CDP override or persistent state. Read current state directly and invoke platform setters through the existing Mediator and UI Executor on every platform. Reuse the existing UI runner and its run-now-or-post behavior. Keep JSON validation in the agent and level-name conversion in logging. Return empty success after setting. Query runtimeLevel and nativeCompileLevel through Lynx.getLogLevel. Resolve the compiled threshold in the native logger and report MONITOR when INFO macros are retained, since MONITOR is the lowest retained INFO sublevel. Document lifecycle and ordering, and test filtering, host updates, invalid parameters and calls without a UI runner. Link the common platform logger for native-only macOS consumers and tests through the common static library. TEST: CDP metadata and diff whitespace checks passed. AutoSubmit: True | 11 小时前 | |
[Feature][Core] Support isolated source replacements for decoder builds Allow core source sets to select alternate translation units through a source mapping. The default mapping is empty, preserving existing source lists and interfaces. TEST: Empty and explicit source mappings verified in generated build graphs. SkipChecks:macro | 4 天前 | |
[BugFix][Clay] Restore animated image playback callbacks Connect animated image playback to the image view start, current-loop, and final-loop callbacks. Report loop completion from platform frame results, including the final frame, and bind listeners independently for each image instance so autoplay and cloned images deliver events to the correct view. Guard callback-triggered destruction and avoid duplicate start events when resuming an animation that is already playing. Add coverage for event order, finite and infinite loops, decode failures, cancellation, and listener lifetime. TEST: 13 animated image player tests passed; Android, iOS, and desktop compile checks passed. Changed-file checks passed; pod header reference validation was unavailable because the local header mapping was missing. | 3 小时前 | |
Revert "[Feature][Recorder] Add cross-platform Fixture evaluator" This reverts commit 619bf702 | 6 小时前 | |
[Infra] Retry pnpm dependency installation Configure three retries for setup_corepack_pnpm in the default and Lynxtron dependency definitions. Habitat retries failed commands with 2, 4, and 8 second delays to tolerate transient installation failures. TEST: Python AST syntax and retry configuration checks passed for both dependency files; git diff --check passed. AutoSubmit: true AutoLand: release/4.3, release/4.2, release/4.1 | 5 天前 | |
[Feature][DevTool] Validate HSR results and add events and schema entry Validate successful load results as empty objects and evaluation results as consistent valueType/value pairs. Keep validation on the DevTool response path with coverage for malformed completion payloads. Publish opaque HSR.messageReceived strings through the existing global sender, independently of command completion. Normalize schema script and URL parameters into the load request boundary, leaving scheme handling to the resource fetcher. TEST: 184 DevTool agent tests and 6 CDP metadata scanner tests passed. CDP metadata validation, repository checks and whitespace checks passed. | 3 小时前 | |
[Feature][Explorer] Open cards into a named shared-context group - Cards opened with the same group=<name> query parameter share one LynxGroup, and thus one background JS context, on Android and iOS. - standalone_url=<url> evaluates a script, or the entry named by standalone_entry_name in a template bundle, in a LynxBackgroundRuntime. With a group, one runtime is started per group; it is attached to no card and outlives them, so every card in the group sees its globals. Without a group, the runtime becomes the opened card's own runtime. - Grouped cards get an "Open another page" entry that stacks the homepage through the route coordinator, so earlier cards stay alive. - Devtool launches of a grouped URL push instead of clearing the stack. - Verified with the Android and iOS routing unit tests and on an Android device: grouped cards share one context, a group starts its runtime only when standalone_url is given, and standalone_url without a group runs in the card's own runtime. | 1 天前 | |
[Feature][Animation] Add inspection hooks and playback controls Expose animation lifecycle notifications and timing data through an Inspector observer interface, with observer wiring through the engine, shell, and element manager. - Add seek and pause controls with a shared reference time and suppress lifecycle events caused by skipped timeline positions. - Expose runtime keyframe offsets and easing for animation inspection without querying author styles or changing timing-function creation. - Add animation timing and playback control test coverage. | 7 天前 | |
[BugFix][Runtime] Store multiApps on the page context under new share group Under the shared-VM per-page-context scheme corejs is evaluated once on the group global context, so its module-level nativeGlobal resolves to the shared realm. The page registry multiApps was written there instead of on the page realm, so per-page app lookup and teardown crossed into the shared context. - lynx-core appManager.ts / nativeGlobal.ts and oliver kernel appManager.ts: resolve the page globalThis from loadCard params and store multiApps, currentAppId there, falling back to nativeGlobal on the legacy path. - app.ts: read the unhandled-rejection app from the page globalThis registry. - js_app.cc: pass the page globalThis as a second argument to destroyCard and callDestroyLifetimeFun when the new share group is enabled, so native drops the correct page registry entry. - v8_runtime.cc: give same-group page and corejs contexts a shared security token so corejs can reach the page global it receives. - Why: without this the page multiApps leaked onto the shared corejs global and V8 rejected corejs access to the page global with a cross-context error. - Verified on a connected Android device with V8 and PrimJS: each page keeps its own multiApps, destroyCard removes only that page entry, and reload replaces the app entry; the legacy single-context path is unaffected. TEST: Manual device verification for V8 and PrimJS shared groups; existing lynx-core loadCard unit cases pass. AutoSubmit: True | 12 小时前 | |
[BugFix] Use fallback VSync and expose runtime control for Node views Use timer-based VSync for macOS Node embedders that drive tasks without an AppKit display-link run loop, and include the fallback service in the native build targets. Expose the headless enableJSRuntime option through the TypeScript and native bindings to the view builder, preserving the default enabled behavior. TEST: macOS clay_unittests build and link succeeded; 72 selected desktop tests passed; git diff --cached --check. Node addon runtime tests were not run. AutoSubmit: true | 3 天前 | |
[Infra] Update third-party dependency patches - Add the Vulkan Memory Allocator adaptation patch for Lynx. - Extend the SwiftShader adaptation patch to use alignof(T) in SPIRV-Tools SmallVector storage alignment. - Keep third-party local adaptation changes reproducible through patch files. | 28 天前 | |
[BugFix][MacOS] Use an object receiver for macOS NAPI module calls Use the NAPI global object when invoking embedder module methods on macOS to avoid passing undefined as a JSObjectRef to older JavaScriptCore. AutoLand: release/4.1,release/4.2,release/4.3 SkipChecks:macro | 12 小时前 | |
[Feature][iOS] Require native verification for resource handle bundles Introduce the public security contract and shared verification gate with the direct iOS snapshot consumer. Resolve registry linkage through one service_api-owned entry: active mobile API shared libraries, explicit iOS Pod dependency metadata, and standalone registry sources. Keep one Harmony SO provider while merging active-root API declarations. Keep native C++ API headers private to the Pod umbrella. Supply the installed source-Pod header root through the unified ServiceAPI entry so native consumers can include the API while Objective-C modules import only the public Core headers. Let Devtool consume that entry without duplicating package paths. Use plain example headings in the service API template comments so Apple Clang accepts the header with documentation warnings treated as errors. TEST: Paired isolated source-Pod arm64 Archives using identical sources reproduced the Objective-C module failure (65) and passed with private headers and the source root (0). The original Objective-C and Devtool C++ translation units plus an Objective-C++ service-type smoke compiled into static frameworks. GN formatting and coding-style checks passed. Validation covers the reduced Pod Archive. Change-Id: I463deb44ba822081085d55b8ac76ad7915d5a7a4 | 6 天前 | |
[Feature][ServiceAPI] Introduce service_api module with cross-module service registry Adds a new service_api module that provides a lightweight service registry for declaring service interfaces and registering implementations across modules (supports both dynamic and static linking). Key elements: - New service_api headers and implementation with BaseService, registry, service IDs/names, and macros for declaring and registering services - Two example services (AService, BService) and demo apps showing usage: dynamic SO loading demo and static linking demo - Build integration: include service_api in default/all targets and add testing group with demo and impl artifacts This enables consistent service discovery and instantiation across platforms, simplifies implementation registration, and provides sample executables for verification. AutoSubmit: True issue: m-6796747108 SkipChecks: macro | 8 个月前 | |
[BugFix][Renderer] Fix background image sizing and layer order Resolve Android auto background sizes from decoded image dimensions while preserving density, aspect ratio, percentage positioning, repetition, and asynchronous redraw. Keep the display-list item stride and existing fields compatible, with fallback behavior on other platforms. Encapsulate auto-size mask encoding in DisplayListBuilder. Callers pass semantic auto-width and auto-height flags instead of assembling protocol bits. Update the Android test bridge and cover all axis combinations and defaults. Paint background image layers back to front according to CSS stacking order, retaining original layer indices for properties and cached resources. Add native and Android regression coverage and document the rendering contract. TEST: 125 focused native tests and 43 Android instrumentation tests passed. Regression tests cover intrinsic sizing, positioning, layer order, property mapping, resource reuse, asynchronous redraw, and display-list ABI compatibility. | 1 天前 | |
[Infra] Remove unused Mako binding generator - Remove the legacy bind_gen pipeline and its stale entry point and dependency manifest. - Remove the vendored Mako runtime and package metadata used only by that pipeline. - Keep the active Jinja2-based N-API generator unchanged. TEST: Ran tools/gen_bindings.py without site packages or Mako and generated the gen_test bindings successfully. AutoSubmit: true | 25 天前 | |
[Infra] Update Habitat to 0.3.150 Update the repository version pin and Unix and Windows launcher defaults from 0.3.149 to 0.3.150 to make configurable action retries available. TEST: bash -n lynx/tools/hab; git diff --check. Release download validation pending publication of 0.3.150. AutoSubmit: true AutoLand: release/4.3, release/4.2, release/4.1 | 7 天前 | |
initial commit | 1 年前 | |
initial commit | 1 年前 | |
[BugFix][AutoLink] Support shared Node-API libraries Support source-built Node-API addons across Android, iOS, and Harmony, avoid eager Lynx dependencies for addon-only Harmony packages. AutoSubmit: true AutoLand: release/4.2 | 24 天前 | |
[Infra] Vendor Python setup dependencies - Vendor the Python packages required by repository setup under lynx/third_party/py_deps, which maps to third_party/py_deps in the standalone Lynx repository, so setup no longer depends on live pip installation. - Add lynx/third_party/py_deps to PYTHONPATH from template-assembler shell and PowerShell environment entry points, and add third_party/py_deps from Lynx envsetup entry points. - Run API/config checker subprocesses and Bits Android package bridge subprocesses with the vendored PYTHONPATH so package-time Gradle and GN Python scripts can import the bundled modules. - Keep vendored dependencies pure Python by excluding native source, extension, and bytecode artifacts, add a Doxygen parser compatibility wrapper for doxmlparser's stdlib XML fallback, and ignore vendored Python packages in the key-words checker. TEST: bash -n tools/env.sh tools/envsetup.sh tools/envinit.sh lynx/tools/envsetup.sh TEST: tools/env.sh python3 import smoke for yaml, doxmlparser, requests, jinja2, markupsafe, charset_normalizer TEST: source lynx/tools/envsetup.sh import smoke for yaml and doxmlparser TEST: tools/env.sh python3 tools_shared/git_lynx.py check --checkers api-check2 --all TEST: tools/env.sh python3 tools_shared/git_lynx.py check --checkers config-check --all TEST: tools/env.sh python3 tools/lynx_tools/checkers/key_words_checker.py TEST: python3 -m py_compile tools/bits_package/build_bridge.py TEST: platform/android ../../tools/env.sh python3 import smoke for yaml TEST: simulated tools/bits_package/build_bridge.py command construction TEST: find lynx/third_party/py_deps no native source, binary extension, or bytecode artifacts TEST: git diff --check SkipChecks:copyright | 4 个月前 | |
[Infra] Update Habitat to 0.3.150 Update the repository version pin and Unix and Windows launcher defaults from 0.3.149 to 0.3.150 to make configurable action retries available. TEST: bash -n lynx/tools/hab; git diff --check. Release download validation pending publication of 0.3.150. AutoSubmit: true AutoLand: release/4.3, release/4.2, release/4.1 | 7 天前 | |
[Infra] Migrate GitHub Actions to Node.js 24 Summary of change: Migrate CI and publishing workflow Actions to Node.js 24 ahead of the Node.js 20 retirement. - Read the Node.js version from .node-version in all setup-node actions. - Pin external Actions to reviewed, immutable SHAs and source refs. - Upgrade Actions that provide a Node.js 24 runtime. - Use the Node.js 24 cache revision that preserves the existing object-storage credential contract. - Replace the archived Node.js 12 Rust toolchain Action. - Retain the verified download-artifact revision because the dev revision requires unavailable object-storage credentials. - Disable persisted checkout credentials where they are unnecessary. TEST: git diff --check, Action reference scan, actionlint (baseline findings) Assisted-by: TRAE | 18 天前 | |
fix: revert "[Infra] Use standalone pnpm instead of the one managed by corepack" This reverts commit 2f4968000776f9a677d145460913931f1b1ae35a | 10 个月前 | |
initial commit | 1 年前 | |
initial commit | 1 年前 | |
[Feature] Support skity with pc. Support skity renderer backend for pc. SkipChecks: spell,cpplint | 2 个月前 | |
[Feature] Add Node-API addon examples to Explorer Add a shared Explorer addon loader and page-facing LynxNodeAPI modules for Android, iOS, Harmony, macOS, and Windows. The examples bind runtime-specific napi_env values from lifecycle callbacks, resolve addon binaries through each platform's native library packaging model, and publish addon exports under __lynx_node_addon_exports__ for page usage. Update the PrimJS/weak-node-api integration prerequisites and document how to package and enable addons with enable_napi_addon for each Explorer host. issue:m-6852187006 SkipChecks: macro AutoSubmit: true AutoLand: release/3.9, release/4.0 | 3 个月前 | |
[Feature] Expose Host Script native operations with lifecycle tests Implement HostScriptModule static callbacks for validated, synchronous view operations. Add the build targets and cover readiness, acceptance, argument errors, subscription changes and detachment. TEST: host_script_session_unittests_exec: 15 tests passed after rebasing. AutoSubmit: true | 12 天前 | |
initial commit | 1 年前 | |
[Doc] Add an AI contribution section in CONTRIBUTION.md | 4 个月前 | |
initial commit | 1 年前 | |
initial commit | 1 年前 | |
[Infra] use 15.6.1 macos runners and remove bundler 1. use the 15.6.1 macos with Xcode26.3 2. Since using CocoaPods via Bundler tends to cause inconsistent issues across different environments, we will no longer use Bundler and instead rely directly on the globally installed CocoaPods. | 3 个月前 | |
initial commit | 1 年前 | |
initial commit | 1 年前 | |
[Doc][Lynx] Link Lynx Explorer build guide | 6 个月前 | |
Update SECURITY.md to remove the HackerOne link and clarify the instructions. Signed-off-by: Max Moroz <mmoroz@chromium.org> | 1 年前 | |
[Optimize] Add enable_logbox gn args. In some situation, we don't want logbox, so we add enable_logbox args to disable it. SkipChecks: macro | 2 个月前 | |
[Feature][Explorer] Integrate Sparkling SDK into LynxExplorer SkipChecks:macro AutoSubmit: true Change-Id: I720020fd7b3ecaa3f2b85e2137b0dc5e0e375ad5 | 4 个月前 | |
[Feature] Support Explorer color schemes Add color scheme propagation for Android, iOS, and Harmony. Upgrade the CSS showcase package and add the Media Query entry. TEST: iOS simulator light/dark media query validation | 5 天前 | |
[Testing][Layout] Add grid lanes conformance harness - Add native Lynx and browser box-model differential testing. - Calibrate existing Grid geometry before Grid Lanes implementation. - Add Starlight snapshots, seeded fixtures, and Linux CI wiring. issue: #8616 TEST: Ring 0 3/3, harness 3/3, calibration 3/3 Co-authored-by: TRAE CLI <noreply@bytedance.com> | 1 个月前 | |
initial commit | 1 年前 |
目录
About Lynx
Lynx 是一系列开源技术,让开发者能够运用现有的 Web 技能,从单一代码库为移动和 Web 端创建真正的原生 UI,兼具大规模性能与开发效率。
- 💫 一次编写,随处渲染。 支持 Android、iOS 和 Web 端的原生渲染,或通过我们的自定义渲染器实现移动端与桌面端的像素级一致性。
- 🌐 Web 启发式设计。 充分利用您已有的 CSS 和 React 知识。我们在设计 Lynx 时充分考虑了 Web 知识体系和相关库。
- ⚡ 大规模性能。 通过我们的多线程引擎,无论是独立运行还是嵌入式集成,都能实现瞬时启动和流畅的 UI 响应。
本仓库包含 Lynx 的核心引擎。有关 Lynx 系列的其他仓库,请访问我们的 组织主页。
文档
您可以在 lynxjs.org 上找到 Lynx 的相关文档。
如何使用 Lynx
要求
Lynx 应用可支持 iOS 10 及以上版本,以及 Android 5.0(API 21)及以上版本。
我们建议使用 macOS 作为开发操作系统。Windows 和 Linux 目前尚未经过验证或提供使用保障,因此您在使用过程中可能会遇到问题。如果需要帮助,请提交 issue,我们将非常乐意协助您解决。
快速入门指南
- 通过 hello world 体验 Lynx
- 将 Lynx 集成到现有应用中
Lynx Explorer
Lynx Explorer 是官方用于测试和探索 Lynx 的应用。它提供了原生运行环境(Android/iOS/鸿蒙/Windows/macOS),并内置了基于 ReactLynx 的界面。
- 构建并运行 Lynx Explorer:详见 lynx/explorer/README.md
如何贡献
行为准则
我们致力于为所有贡献者营造一个积极、包容且安全的环境。详细信息请参见我们的 行为准则。
贡献指南
我们欢迎您加入并成为 Lynx 贡献者的一员。正是因为有像您这样的人,这个项目才会如此出色。
详情请参考我们的 贡献指南。
讨论交流
错误报告和功能需求请提交至 Github Issues
大型讨论和提案将在 Github Discussions 中进行
非常欢迎您加入 Discord 频道,与其他热衷于让 Lynx 变得更出色的人交流。
致谢
Lynx 借鉴了多个第三方库,并从各类项目中汲取了灵感。我们在此向这些资源的提供者表示诚挚的感谢。
第三方库
Lynx 整合了以下第三方库,这些库为其功能实现提供了重要支持。我们感谢这些项目背后的开发者及开源社区所付出的努力:
- aes
- benchmark
- binding
- boringssl
- boringssl_gen
- buildroot
- checkstyle
- cpp-httplib
- double-conversion
- googletest
- jsoncpp
- modp_b64
- node-addon-api
- NativeScript
- perfetto
- rapidjson
- v8
- xctestrunner
- xhook
- zlib
参考的 API 设计与实现
Lynx 中部分 API 的设计及部分实现受到了以下优秀项目的启发和参考。它们的创新设计与解决方案对 Lynx 的形成起到了不可估量的作用:
我们尊重所有这些项目的知识产权,并严格遵守相关的开源许可协议及使用规范。
许可协议
Lynx 采用 Apache 许可协议,详情参见 LICENSE 文件。