Skip to content

Repository files navigation

LingXia — one runtime, every platform

/lɪŋ ʃiə/ - Cross-platform app runtime for lxapps, native host apps, and Rust extensions

CI

Quick Start · AI Skill · LxApp Guide · Host Apps · CLI Reference


LingXia is a cross-platform app framework for building standalone lxapps and native host apps on Android, iOS, macOS, HarmonyOS, and Windows.

An lxapp is a page-based mini-app with a strict split between:

Layer Runs in Owns
View WebView React, Vue, or HTML rendering
Logic Native JavaScript runtime or Rust host code state, business logic, platform API calls
Bridge Rust runtime setData, streams, channels, and native calls

This keeps UI rendering separate from business work. View code renders; Logic code owns state and platform APIs; the bridge moves data and events between them.

What You Build

Shape Use when Starting point
Standalone lxapp You are building pages that run inside any LingXia host. lingxia new my-lxapp -t lxapp -y
Native host app You need an installable Android, iOS, macOS, Harmony, or Windows app embedding one or more lxapps. lingxia new my-app -t native-app -p macos --package-id com.example.myapp -y
Rust native extension You need host APIs, background services, native file/media integration, or Rust-owned app logic. #[lingxia::native] plus HostAddon

Quick Start

Install the CLI.

macOS (or Git Bash, MSYS, Cygwin on Windows):

curl -fsSL https://raw.githubusercontent.com/LingXia-Dev/LingXia/main/install.sh | sh
lingxia version

Windows PowerShell:

irm https://raw.githubusercontent.com/LingXia-Dev/LingXia/main/install.ps1 | iex
lingxia version

Create and run a native host app:

lingxia new my-app -t native-app -p macos --package-id com.example.myapp -y
cd my-app
lingxia dev

Or create a standalone lxapp:

lingxia new my-lxapp -t lxapp -y
cd my-lxapp
lingxia dev

See Quick Start for Node.js, platform SDK, Android NDK, Harmony, Xcode, and Rust setup notes.

AI Assistant Skill

LingXia ships an agent-oriented markdown skill inside the CLI. It contains the decision tree, CLI reference, lxapp recipes, native component docs, lx.* API map, host project docs, and Rust native development guide.

There is nothing to install. lingxia new writes the skill to ~/.claude/skills/lingxia/, and every later lingxia command rewrites it whenever it differs from the one that CLI carries — so the skill on disk always describes the CLI on this machine.

lingxia new also writes a pointer from <project>/AGENTS.md to the installed SKILL.md, which is what OpenAI Codex CLI reads. The content is plain markdown, so Cursor, GitHub Copilot, and other tools can use the same files when pointed at SKILL.md.

Browse the source directly at docs/skill/SKILL.md — that directory is what the CLI embeds.

Documentation

Need Doc
Install CLI and create the first project docs/quick-start.md
Agent entrypoint and topic router docs/skill/SKILL.md
Page authoring, Page({}), useLxPage, events docs/skill/lxapp/guide.md
Native components such as LxInput, LxVideo, LxPicker docs/skill/lxapp/components.md
Logic-side lx.* API surface docs/skill/lxapp/lx-api.md
Bridge mechanics: setData, stream, channel docs/skill/lxapp/bridge.md
Host project config and lingxia.yaml docs/skill/app/project.md
iOS/macOS SDK embedding docs/skill/app/apple-sdk.md
Universal links and app links docs/skill/app/applinks.md
Rust native routes and host addons docs/skill/native/development.md
Every CLI command and flag docs/skill/cli/lingxia.md

Packages

Package Purpose
@lingxia/react React bindings and native component wrappers for lxapp Views
@lingxia/vue Vue bindings and native component wrappers for lxapp Views
@lingxia/html HTML-only View helpers
@lingxia/types TypeScript declarations for Logic-side Page({}), App({}), and lx.*
@lingxia/bridge Low-level bridge runtime
@lingxia/elements Custom elements behind the framework wrappers

Repository Layout

crates/                  Rust runtime, bridge, lxapp loader, platform abstraction
tools/lingxia-cli/       CLI: new, build, dev, publish, doctor
lingxia-sdk/             Android, Apple, and Harmony native SDKs
packages/                npm packages for View bindings, types, bridge, skill
examples/                Example host apps and lxapps
docs/                    Quick start, skill docs, internal docs
scripts/release/         Release automation

License

MIT

About

LingXia is a cross-platform app framework for building standalone lxapps and native host apps on Android, iOS, HarmonyOS,macOS, and Windows

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages