Total Pageviews

Friday 18 August 2023

pake

  Turn any webpage into a desktop app with Rust. 利用 Rust 轻松构建轻量级多端桌面应用.

Turn any webpage into a desktop app with Rust with ease.

Pake supports Mac, Windows, and Linux. Check out README for Popular Packages, Command-Line Packaging, and Customized Development information. Feel free to share your suggestions in Discussions.

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

  1. 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!
  2. For developers: “Command-Line Packaging” supports macOS fully. For Windows/Linux users, it requires some tinkering. Configure your environment before getting started.
  3. 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

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

  1. You can refer to the codebase structure before working on Pake, which will help you much in development.
  2. Modify the url and productName fields in the pake.json file under the src-tauri directory, the "domain" field in the tauri.config.json file needs to be modified synchronously, as well as the icon and identifier fields in the tauri.xxx.conf.json file. You can select a icon from the icons directory or download one from macOSicons to match your product needs.
  3. For configurations on window properties, you can modify the pake.json file to change the value of width, height, fullscreen (or not), resizable (or not) of the windows property. To adapt to the immersive header on Mac, change transparent to true, look for the Header element, and add the padding-top property.
  4. 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

 

No comments:

Post a Comment