@ctatedev:zero-native 推出用 Zig 建置原生應用。
 Chris Tate (@ctatedev) 介紹 zero-native,這是 Vercel Lab… episode artwork

EPISODE · May 9, 2026 · 4 MIN

@ctatedev:zero-native 推出用 Zig 建置原生應用。 Chris Tate (@ctatedev) 介紹 zero-native,這是 Vercel Lab…

from EasyVibeCoding Podcast · host Chris Tate

zero-native 推出用 Zig 建置原生應用。 Chris Tate (@ctatedev) 介紹 zero-native,這是 Vercel Labs 的 Zig 桌面應用層,專為現代網頁前端設計,強調輕量二進位檔、最小記憶體佔用與即時重建,支援 macOS、Linux、Windows、iOS 與 Android,並可選擇系統 WebView 或 Chromium/CEF 引擎。 快速入門步驟 安裝 CLI 工具: `bash npm install -g zero-native ` 建立並執行應用: `bash zero-native init my_app --frontend next cd my_app zig build run ` 首次執行會安裝前端依賴、建置原生層,並開啟渲染網頁 UI 的桌面視窗。完整指南見 zero-native.dev/quick-start。 核心優勢 zero-native 旨在提供輕量化的桌面應用開發體驗,提供以下關鍵特點: 極小且快速:使用系統 WebView(如 macOS 的 WKWebView、Linux 的 WebKitGTK),不內嵌瀏覽器運行時,二進位檔極小且啟動迅速。 選擇網頁引擎:系統 WebView 確保輕量原生足跡;需一致渲染時,可透過 CEF 內嵌 Chromium,固定支援平台的網頁標準。 快速原生重建:Zig 建置原生層,應用邏輯、橋接指令與平台整合重建極快,前端仍可沿用熟悉的網頁工具。 原生能力無需繁重中介:Zig 直接呼叫 C,輕鬆存取平台 SDK、原生函式庫、編解碼器與本地系統整合,讓 WebView 執行真實原生工作。 明確安全模型:預設視 WebView 為不信任環境,原生指令、權限、導航、外連結與視窗 API 皆需選擇性啟用並受政策控制。 專案現況 zero-native 目前為 pre-release 階段,桌面支援涵蓋 macOS、Linux 與 Windows 建置路徑,Chromium/CEF 以平台特定運行時分發。行動裝置嵌入範例已提供,包括 iOS 與 Android 主機應用連結 libzero-native.a 的 C ABI。 核心概念 App:小型 Zig 物件,描述應用名稱、WebView 來源、生命週期鉤子與可選原生服務。 Runtime:擁有事件迴圈、視窗、橋接分派、自動化鉤子、追蹤與平台服務。 WebViewSource:指示載入內容,如內嵌 HTML、URL 或從本地應用來源提供的封裝前端 asset。 app.zon:應用清單,宣告中繼資料、圖示、視窗、前端 asset、網頁引擎選擇、安全政策、橋接權限與封裝輸入。 window.zero.invoke():JavaScript 至 Zig 橋接,呼叫受大小限制、來源檢查、權限驗證,並僅路由至註冊處理器。 配置範例 專案行為主要在 app.zon 定義,以下為典型設定: `zig .{ .id = "com.example.my-app", .name = "my-app", .display_name = "My App", .version = "0.1.0", .web_engine = "system", .permissions = .{ "window" }, .capabilities = .{ "webview", "js_bridge" }, .security = .{ .navigation = .{ .allowed_origins = .{ "zero://app", "http://127.0.0.1:5173" }, }, }, .windows = .{ .{ .label = "main", .title = "My App", .width = 960, .height = 640 }, }, } ` 使用 .webengine = "system" 選系統 WebView;在 macOS 支援建置中,可設 .webengine = "chromium" 並搭配 .cef 配置內嵌 Chromium。 文件與範例 完整文件在 zero-native.dev,涵蓋: Quick Start Web Engines App Model Bridge Security Packaging 框架特定啟動範例位於 examples/ 資料夾: examples/next examples/react examples/svelte examples/vue 每個範例為完整 zero-native 應用,包含 app.zon、Zig 層與最小前端專案,從其目錄執行 zig build run 即可運行。行動嵌入範例: examples/ios examples/android 本地框架開發見 CONTRIBUTING.md。 zero-native 專案目前由 Vercel Labs 維護,Chris Tate 鼓勵開發者透過 GitHub 參與專案,儲存庫連結為 https://github.com/vercel-labs/zero-native,歡迎 star 與 fork。原文:https://easyvibecoding.app/curated/1238

Episode metadata supplied by the publisher feed · Published May 9, 2026

Embed this episode

Ready to play

@ctatedev:zero-native 推出用 Zig 建置原生應用。 Chris Tate (@ctatedev) 介紹 zero-native,這是 Vercel Lab…

0:00 4:59

No transcript for this episode yet

We transcribe on demand. Request one and we'll notify you when it's ready — usually under 10 minutes.

No similar episodes found.

No similar podcasts found.

Frequently Asked Questions

How long is this episode of EasyVibeCoding Podcast?

This episode is 4 minutes long.

When was this EasyVibeCoding Podcast episode published?

This episode was published on May 9, 2026.

Is there a transcript available for this episode?

Yes, a full transcript is available for this episode. You can read the complete transcript on the episode page.

Can I download this EasyVibeCoding Podcast episode?

Yes. Use the download control on the episode player to save the publisher-provided media file.
URL copied to clipboard!