native-sdk

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Native SDK

Native SDK

The Native SDK is the complete toolkit for building native desktop applications. Views are declarative markup in
.native
files, logic is plain Zig, and the toolkit's own engine draws every pixel into real OS windows — no browser, no WebView, no interpreter in the binary. Every app embeds a deterministic automation server, so agents can snapshot, drive, and screenshot the running window. Desktop is the mature surface (macOS deepest, Linux and Windows exercised in CI); mobile embedding is experimental. WebView surfaces coexist as the optional path for embedding web content or hosting an existing web frontend.
Native SDK是用于构建原生桌面应用的完整工具包。视图采用
.native
文件中的声明式标记,逻辑使用纯Zig编写,工具包自带引擎将每一个像素绘制到真实的操作系统窗口中——二进制文件中不包含浏览器、WebView或解释器。每个应用都嵌入了一个确定性自动化服务器,因此Agent可以对运行中的窗口进行快照、操控和截图。桌面平台是成熟的应用场景(macOS支持最深入,Linux和Windows在CI中经过充分测试);移动平台嵌入功能尚处于实验阶段。WebView界面可作为可选路径共存,用于嵌入网页内容或托管现有网页前端。

Start here

入门指南

This file is a discovery stub for agents that installed the Native SDK once with a skills installer such as
npx skills add native-sdk
. Before implementing or explaining Native SDK app work, use the installed CLI to discover and load the current skill content:
bash
native skills list
native skills get core
native skills get core --full
Use
native skills get core
for initial orientation. Use
native skills get core --full
for implementation tasks because it includes the reference files for project anatomy, runtime, frontend assets, bridge/security/native capabilities, packaging, and debugging. Use
native skills get automation
when testing a running app, taking snapshots, requesting reloads, or using the built-in automation server.
本文件是为已通过
npx skills add native-sdk
等技能安装器安装过Native SDK的Agent准备的发现存根。在实现或讲解Native SDK应用开发工作之前,请使用已安装的CLI来发现并加载当前技能内容:
bash
native skills list
native skills get core
native skills get core --full
使用
native skills get core
进行初始定位。使用
native skills get core --full
处理实现任务,因为它包含项目结构、运行时、前端资源、桥接/安全/原生能力、打包和调试的参考文件。在测试运行中的应用、拍摄快照、请求重载或使用内置自动化服务器时,请使用
native skills get automation

Quick orientation

快速入门

bash
npm install -g @native-sdk/cli
native init my_app
cd my_app
native dev
Generated apps center on
app.zon
,
src/app.native
(the markup view), and
src/main.zig
(Model, Msg, update). Inspect those files before editing an existing app; web-frontend shells additionally carry
frontend/
and a
build.zig
.
bash
npm install -g @native-sdk/cli
native init my_app
cd my_app
native dev
生成的应用以
app.zon
src/app.native
(标记视图)和
src/main.zig
(Model、Msg、update)为核心。在编辑现有应用前,请先查看这些文件;网页前端外壳还会包含
frontend/
目录和
build.zig
文件。