Pake
Turn any webpage into a desktop app with Rust with ease.
## Features
đ **Small**: Nearly 40 times smaller than an Electron package (less than 3M!) \
đ **Fast**: With Rust Tauri, Pake is much more lightweight and faster than JS-based frameworks. \
𩴠**Special**: Battery-included package â shortcut pass-through, immersive windows, and minimalist customization. \
đļ **Toy**: Pake is just a simple tool â replace the old bundle approach with Rust (though PWA is good enough).
## Popular Packages
đ You can download more applications (such as Flomo / YuQue / RunCode) from Releases. Click here to expand the shortcuts reference!
| Mac | Windows/Linux | Function |
| --------------------------- | ------------------------------ | ----------------------------- |
| â + [ | Ctrl + â | Return to the previous page |
| â + ] | Ctrl + â | Go to the next page |
| â + â | Ctrl + â | Auto scroll to top of page |
| â + â | Ctrl + â | Auto scroll to bottom of page |
| â + r | Ctrl + r | Refresh Page |
| â + w | Ctrl + w | Hide window, not quite |
| â + - | Ctrl + - | Zoom out the page |
| â + + | Ctrl + + | Zoom in the page |
| â + = | Ctrl + = | Zoom in the Page |
| â + 0 | Ctrl + 0 | Reset the page zoom |
In addition, double-click the title bar to switch to full-screen mode. For Mac users, you can also use the gesture to go to the previous or next page and drag the title bar to move the window.
## Before starting
1. **For beginners**: Play with Popular Packages to find out Pake's capabilities, or try to pack your application with [GitHub Actions](https://github.com/tw93/Pake/wiki/GitHub-Actions-Online-Compilation-Multi-system-Version). Don't hesitate to reach for assistance at [Discussion](https://github.com/tw93/Pake/discussions)!
2. **For developers**: Packaging with Command-Like Packaging fully supports macOS. For Windows/Linux users, it requires some tinkering. [Configure your environment](https://tauri.app/v1/guides/getting-started/prerequisites) 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](#development)?
## Command-Line Packaging

**Pake provides a command line tool, making the flow of package customization quicker and easier. See [documentation](./bin/README_EN.md) for more information.**
```bash
# 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](https://github.com/tw93/Pake/wiki/GitHub-Actions-Online-Compilation-Multi-system-Version) 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](https://tauri.app/v1/guides/getting-started/prerequisites).
If you are unfamiliar with these, it is better to try out the above tool to pack with one click.
```sh
# Install Dependencies
npm i
# Local development
npm run dev
# Local debug
npm run dev:debug
# Pack application
npm run build
```
## Advanced Usage
1. You can refer to the [codebase structure](https://github.com/tw93/Pake/wiki/Description-of-Pake's-code-structure) before working on Pake, which will help you much in development.
2. Add four fields (`url`, `productName`, `icon`, and `identifier`) to the `tauri.conf.json` and `tauri.xxx.conf.json` in the `src-tauri` directory. You can select a `icon` from the `icons` directory or download one from [macOSicons](https://macosicons.com/#/) to match your product needs.
3. For configurations on window properties, you can modify the `tauri.conf.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 Make](https://github.com/tw93/Pake/wiki/Advanced-Usage-of-Make).
## Developer
Pake's development can not be without these Hackers. They contributed a lot of capabilities for Pake. Also, welcome to follow them! â¤ī¸
## Support
1. I have two cats, TangYuan and Coke. If you think Pake delights your life, you can feed my cats some canned food đĨŠđ¤.
2. If you like Pake, you can star it on GitHub. Also, welcome to [recommend Pake](https://twitter.com/intent/tweet?url=https://github.com/tw93/Pake&text=%23Pake%20-%20A%20simple%20Rust%20packaged%20web%20pages%20to%20generate%20Mac%20App%20tool,%20compared%20to%20traditional%20Electron%20package,%20the%20size%20of%20nearly%2040%20times%20smaller,%20generally%20about%202M,%20the%20underlying%20use%20of%20Tauri,%20performance%20experience%20than%20the%20JS%20framework%20is%20much%20lighter~) to your friends.
3. You can follow my [Twitter](https://twitter.com/HiTw93) to get the latest news of Pake or join our [Telegram](https://t.me/miaoyan) chat group.
4. I hope that you enjoy playing with it. Let us know if you find a website that would be great for a Mac App!