Skip to content
zigslicePublic

About

xgo+llgo+llcppg+cef

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

xgoef

基于 CEF 的 XGo 客户端框架实验:用 LLGo + llcppg 对接 CEF C API,产品形态对标 Tauri 2(Web UI + 原生后端 + IPC/插件)。

本仓库从 fanfeilong/cefutil 的 src/xgoef 抽出,与其中的 src/cefdemo 并列演进。它还不是已可发布的发行版。

先读

  1. RESEARCH.md — 相关项目调研与选型
  2. DESIGN.md — 分层与进程模型
  3. docs/tauri2-gap.md — 对标 Tauri 2 的能力差距与补齐设计
  4. docs/classfile-design.md — XGo classfile × 应用/插件怎么写
  5. cefutil 仓库文档 docs/03-binary-boundary.md、docs/05-lifecycle.md、docs/07-javascript.md

目录

xgoef/
├── RESEARCH.md DESIGN.md README.md
├── go.mod
├── xgoef.conf.schema.json
├── cef/           # llcppg 配置 + 绑定说明(生成代码后续加入)
├── runtime/       # App / Window / 生命周期
├── ipc/           # Command + Event
├── plugin/        # 插件接口
├── conf/          # 配置
├── api/js/        # 前端桥
├── cmd/xgoef/     # create / dev / build
└── examples/hello # 最小应用形状

公式

xgoef ≈ Tauri2 的应用模型 × CEF 的 Chromium × (XGo + LLGo + llcppg)
Tauri 2 xgoef
系统 WebView CEF(自带 Chromium)
Rust 核心 XGo(LLGo 编译;底层可混编 Go)
invoke / events / plugins ipc + plugin(同形状)
tauri.conf.json xgoef.conf.json

当前可跑通路径(XGo 应用 + LLGo + CEF C API,无 cgo)

# 需工具链 + CEF + cefsimple_capi(作 xgoef-helper)
./scripts/install-xgo-toolchain.sh   # 一次
./scripts/build-xgoef-hello.sh       # 设置工具链后执行 xgoef build
cd build/hello && ./xgoef-hello
  • 应用一等语言:examples/hello/main.xgo(XGo)
  • 编译器:LLGo(go.mod 中 // llgo 1.0)
  • 宿主:cef/host_llgo.go → cef/shim;子进程 xgoef-helper

细节见 docs/run.md。

下一步

  1. llcppg 扩大到更多 include/capi 头,收窄 shim(MessageRouter 仍可留在 shim)
  2. 将 runtime / ipc 等框架 API 逐步迁到 .xgo

无 CEF 时 go test ./...(gc)仍可通过(!llgo stub)。

与 cefdemo

cefdemo 继续作为 C++ / Views / Chrome style 的对照实现。xgoef 验证同一套生命周期能否用 C API + LLGo 表达,并在其上长出 Tauri 式应用 API。

About

xgo+llgo+llcppg+cef

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages