Turn any webpage into a desktop app with Rust. 利用 Rust 轻松构建轻量级多端桌面应用.
Turn any webpage into a desktop app with Rust with ease.
Features
- 🎐 Nearly 20 times smaller than an Electron package (around 5M!)
- 🚀 With Rust Tauri, Pake is much more lightweight and faster than JS-based frameworks.
- 📦 Battery-included package — shortcut pass-through, immersive windows, and minimalist customization.
- 👻 Pake is just a simple tool — replace the old bundle approach with Rust (though PWA is good enough).
Popular Packages
WeRead Mac Windows Linux | Twitter Mac Windows Linux |
ChatGPT Mac Windows Linux | Poe Mac Windows Linux |
YouTube Music Mac Windows Linux | YouTube Mac Windows Linux |
LiZhi Mac Windows Linux | ProgramMusic Mac Windows Linux |
Qwerty Mac Windows Linux | CodeRunner Mac Windows Linux |
Flomo Mac Windows Linux | XiaoHongShu Mac Windows Linux |
🏂 You can download more applications from Releases. Click here to expand the shortcuts reference!
Before starting
- For beginners: Play with Popular Packages to find out Pake's capabilities, or try to pack your application with GitHub Actions. Don't hesitate to reach for assistance at Discussion!
- For developers: “Command-Line Packaging” supports macOS fully. For Windows/Linux users, it requires some tinkering. Configure your environment before getting started.
- For hackers: For people who are good at both front-end development and Rust, how about customizing your apps' function more with the following Customized Development?
Command-Line Packaging
Pake provides a command line tool, making the flow of package customization quicker and easier. See documentation for more information.
# Install with npm
npm install -g pake-cli
# Command usage
pake url [OPTIONS]...
# Feel free to play with Pake! It might take a while to prepare the environment the first time you launch Pake.
pake https://weekly.tw93.fun --name Weekly --transparent
If you are new to the command line, you can compile packages online with GitHub Actions. See the Tutorial for more information.
Development
Prepare your environment before starting. Make sure you have Rust >=1.63
and Node >=16
(e.g., 16.18.1
) installed on your computer. For installation guidance, see Tauri documentation.
If you are unfamiliar with these, it is better to try out the above tool to pack with one click.
# Install Dependencies
npm i
# Local development [Right-click to open debug mode.]
npm run dev
# Pack application
npm run build
Advanced Usage
- You can refer to the codebase structure before working on Pake, which will help you much in development.
- Modify the
url
andproductName
fields in thepake.json
file under the src-tauri directory, the "domain" field in thetauri.config.json
file needs to be modified synchronously, as well as theicon
andidentifier
fields in thetauri.xxx.conf.json
file. You can select aicon
from theicons
directory or download one from macOSicons to match your product needs. - For configurations on window properties, you can modify the
pake.json
file to change the value ofwidth
,height
,fullscreen
(or not),resizable
(or not) of thewindows
property. To adapt to the immersive header on Mac, changetransparent
totrue
, look for theHeader
element, and add thepadding-top
property. - For advanced usages such as style rewriting, advertisement removal, JS injection, container message communication, and user-defined shortcut keys, see Advanced Usage of Pake.
from https://github.com/tw93/Pake
-----
Pake
Pake,一个开源的项目,很简单的用 Rust 打包网页生成很小的 Mac App,底层使用 Tauri,支持微信读书 Mac版、Flomo、ToolsFun、Witeboard、Vercel、即刻、RoamResearch等,下载dmg安装包打开直接安装。
Pake特征
🏂 小:相比传统的 Electron 套壳打包,大小要小将近 50 倍,一般不到 2M
😂 快:Pake 的底层使用的 Rust Tauri 框架,性能体验较 JS 框架要轻快不少,内存小很多
🩴 特:不是单纯打包,实现了通用快捷键的透传、沉浸式的窗口、拖动、打包样式兼容
🐶 玩:只是一个很简单的小玩具,用 Rust 替代之前套壳网页老的思路玩法,PWA 也很好,友好交流勿喷
微信读书 Mac版下载
微信读书Mac版:https://github.com/tw93/Pake/raw/master/download/WeRead.dmg
GitHub地址:https://github.com/tw93/Pake
------------------
把任意网站制作成桌面客户端程序:Pake
有些网站没有提供桌面客户端程序,如果你想要把网站或者自己的博客制作成桌面端程序的需求,给大家推荐这个「Pake」开源的工具,它提供支持 Mac / Windows / Linux。
据介绍是基于 Rust 编程语言开发,提供了一种简单而高效的方式,并且支持定制开发。项目作者也提供了一些编译成客户端的案例,例如:微信读书、小红书等。
功能特色
相比传统的 Electron 套壳打包,要小将近 20 倍,5M 上下。
Pake 的底层使用的 Rust Tauri 框架,性能体验较 JS 框架要轻快不少,内存小很多。
不是单纯打包,实现了快捷键的透传、沉浸式的窗口、拖动、样式改写、去广告、产品的极简风格定制。
只是一个很简单的小玩具,用 Tauri 替代之前套壳网页打包的老思路,其实 PWA 也很好。
开始之前
小白用户:使用 「常用包下载」 方式来把玩 Pake 的能力,可去 讨论群 寻求帮助,也可试试 Action 方式。
开发用户:使用 「命令行一键打包」,对 Mac 比较友好,Windows / Linux 需折腾下 环境配置。
折腾用户:假如你前端和 Rust 都会,那可试试下面的 「定制开发」,可深度二次开发定制你的功能。
在线编译
如果你是新手小白,可以直接用 Github 在线编译的方式,先 Fork 项目,然后前往 Actions 界面,选择 Build App with Pake-Cli,填写表单信息,点击 Run Workflow 即可。
项目地址:
https://github.com/tw93/Pake/fork
出现绿色小图标则代表打包成功,可以点击 Build App with Pake-Cli 查看打包详情和附件。
这里锋哥简单的编译了 xiaoyi 的博客,不过需要自定义项,如:样式改写、屏蔽广告、逻辑代码注入、容器消息通信、自定义快捷键等等,就需要你会一定的开发能力了,具体可以看作者的项目介绍。
项目地址:
https://github.com/tw93/Pake/blob/master/README_CN.md
No comments:
Post a Comment