使用 Go 和 Web 技术构建桌面应用程序
Build desktop applications using Go and Web Technologies

原始链接: https://github.com/wailsapp/wails

## Wails:使用 Go 和 Web 技术构建桌面应用 Wails 通过结合 Go 的强大后端能力和熟悉的 Web 技术(HTML、JS、CSS)前端,简化桌面应用程序的构建,并将所有内容打包成一个轻量级的二进制文件。 与依赖 Web 服务器的传统方法不同,Wails 处理项目创建、编译和打包,让开发者专注于 UI 设计和功能实现。它支持原生对话框和菜单、深色/浅色模式以及现代视觉效果,利用原生渲染引擎,*无需*嵌入浏览器。 主要特性包括 Go 代码的自动 TypeScript 定义、统一的事件系统和强大的 CLI。Wails 非常适合希望为现有应用程序轻松添加前端,或无需 Electron 的开销即可创建新的桌面应用程序的 Go 程序员。 您可以在官方网站上找到项目路线图和安装说明。

黑客新闻 新 | 过去 | 评论 | 提问 | 展示 | 招聘 | 提交 登录 使用 Go 和 Web 技术构建桌面应用程序 (github.com/wailsapp) 6 分,作者 selvan,2 小时前 | 隐藏 | 过去 | 收藏 | 讨论 指南 | 常见问题 | 列表 | API | 安全 | 法律 | 申请 YC | 联系 搜索:
相关文章

原文


Build desktop applications using Go & Web Technologies.

GitHub Go Reference CodeFactor Awesome Discord
Build GitHub tag (latest SemVer pre-release)

The traditional method of providing web interfaces to Go programs is via a built-in web server. Wails offers a different approach: it provides the ability to wrap both Go code and a web frontend into a single binary. Tools are provided to make this easy for you by handling project creation, compilation and bundling. All you have to do is get creative!

  • Use standard Go for the backend
  • Use any frontend technology you are already familiar with to build your UI
  • Quickly create rich frontends for your Go programs using pre-built templates
  • Easily call Go methods from Javascript
  • Auto-generated Typescript definitions for your Go structs and methods
  • Native Dialogs & Menus
  • Native Dark / Light mode support
  • Supports modern translucency and "frosted window" effects
  • Unified eventing system between Go and Javascript
  • Powerful cli tool to quickly generate and build your projects
  • Multiplatform
  • Uses native rendering engines - no embedded browser!

The project roadmap may be found here. Please consult it before creating an enhancement request.

The installation instructions are on the official website.

This project is supported by these kind people / companies:

  • Is this an alternative to Electron?

    Depends on your requirements. It's designed to make it easy for Go programmers to make lightweight desktop applications or add a frontend to their existing applications. Wails does offer native elements such as menus and dialogs, so it could be considered a lightweight electron alternative.

  • Who is this project aimed at?

    Go programmers who want to bundle an HTML/JS/CSS frontend with their applications, without resorting to creating a server and opening a browser to view it.

  • What's with the name?

    When I saw WebView, I thought "What I really want is tooling around building a WebView app, a bit like Rails is to Ruby". So initially it was a play on words (Webview on Rails). It just so happened to also be a homophone of the English name for the Country I am from. So it stuck.

Star History Chart

The contributors list is getting too big for the readme! All the amazing people who have contributed to this project have their own page here.

FOSSA Status

This project was mainly coded to the following albums:

联系我们 contact @ memedata.com