Convert Figma logo to code with AI

tw93 logoPake

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

25,831
4,681
25,831
11

Top Related Projects

81,614

Build smaller, faster, and more secure desktop applications with a web frontend.

Make any web page a desktop application

Clone to try a simple Electron app

24,320

Create beautiful applications using Go

Portable and lightweight cross-platform desktop application development framework

Quick Overview

Pake is an open-source tool that allows users to quickly turn any website into a desktop application using Rust. It simplifies the process of creating cross-platform desktop apps from web applications, providing a lightweight alternative to Electron.

Pros

  • Fast and lightweight compared to Electron-based alternatives
  • Cross-platform support (macOS, Windows, Linux)
  • Easy to use with minimal configuration required
  • Customizable with various options for app appearance and behavior

Cons

  • Limited documentation and examples for advanced use cases
  • Fewer features compared to more established frameworks like Electron
  • Potential compatibility issues with complex web applications
  • Relatively new project, which may lead to stability concerns

Getting Started

To use Pake, follow these steps:

  1. Install Rust and Cargo (Rust's package manager) on your system.
  2. Install Pake using Cargo:
cargo install pake-cli
  1. Create a desktop app from a website:
pake https://example.com
  1. For more options, use the help command:
pake --help

This will display available customization options such as app name, icon, and window size.

Competitor Comparisons

81,614

Build smaller, faster, and more secure desktop applications with a web frontend.

Pros of Tauri

  • More mature and feature-rich framework with extensive documentation
  • Supports multiple programming languages (Rust, JavaScript, TypeScript)
  • Offers greater customization and control over the application structure

Cons of Tauri

  • Steeper learning curve, especially for developers new to Rust
  • Larger bundle size due to its comprehensive feature set
  • More complex setup process compared to Pake's simplicity

Code Comparison

Pake (simplified web app creation):

pake 'https://example.com' --name 'ExampleApp' --icon 'path/to/icon.png'

Tauri (more complex, but flexible):

#[tauri::command]
fn greet(name: &str) -> String {
    format!("Hello, {}!", name)
}

fn main() {
    tauri::Builder::default()
        .invoke_handler(tauri::generate_handler![greet])
        .run(tauri::generate_context!())
        .expect("error while running tauri application");
}

Pake focuses on quickly converting websites into desktop apps with minimal configuration, while Tauri provides a more comprehensive framework for building cross-platform applications with native performance and advanced features. Pake is ideal for simple web-to-desktop conversions, whereas Tauri is better suited for complex, custom applications requiring fine-grained control and extensive functionality.

Make any web page a desktop application

Pros of Nativefier

  • More mature project with a larger community and extensive documentation
  • Supports a wider range of platforms, including Windows, macOS, and Linux
  • Offers more customization options and command-line arguments

Cons of Nativefier

  • Larger app size due to bundling Electron with each app
  • Higher resource usage, which can impact system performance
  • Slower startup times compared to Pake's Tauri-based apps

Code Comparison

Nativefier:

nativefier --name "My App" --icon icon.png https://example.com

Pake:

pake https://example.com MyApp --icon icon.png

Both tools aim to convert web applications into desktop apps, but they use different underlying technologies. Nativefier uses Electron, while Pake leverages Tauri. This fundamental difference impacts app size, performance, and resource usage.

Nativefier offers more flexibility and options, making it suitable for complex use cases and developers who need fine-grained control. However, this comes at the cost of larger app sizes and higher resource consumption.

Pake, being newer and built on Tauri, produces smaller, more efficient apps with faster startup times. It's ideal for simpler use cases and when minimizing resource usage is a priority. However, it may lack some of the advanced features and customization options available in Nativefier.

Clone to try a simple Electron app

Pros of electron-quick-start

  • Provides a basic template for Electron apps, making it easier to get started
  • Includes a minimal set of files and dependencies, allowing for customization
  • Maintained by the official Electron team, ensuring compatibility and updates

Cons of electron-quick-start

  • Lacks advanced features and optimizations out of the box
  • Requires more setup and configuration for complex applications
  • May result in larger app sizes compared to more optimized solutions

Code Comparison

electron-quick-start:

const { app, BrowserWindow } = require('electron')

function createWindow () {
  const win = new BrowserWindow({
    width: 800,
    height: 600,
    webPreferences: {
      nodeIntegration: true
    }
  })
  win.loadFile('index.html')
}

app.whenReady().then(createWindow)

Pake:

#[tauri::command]
fn greet(name: &str) -> String {
    format!("Hello, {}! You've been greeted from Rust!", name)
}

fn main() {
    tauri::Builder::default()
        .invoke_handler(tauri::generate_handler![greet])
        .run(tauri::generate_context!())
        .expect("error while running tauri application");
}

The code comparison shows that electron-quick-start uses JavaScript and the Electron framework, while Pake utilizes Rust and the Tauri framework for creating desktop applications. Pake's approach may lead to smaller app sizes and improved performance, but electron-quick-start offers a more familiar JavaScript environment for web developers.

24,320

Create beautiful applications using Go

Pros of Wails

  • More mature and feature-rich framework for building desktop applications
  • Supports multiple programming languages (Go, JavaScript, TypeScript)
  • Extensive documentation and larger community support

Cons of Wails

  • Steeper learning curve, especially for developers new to Go
  • Requires more setup and configuration compared to Pake
  • Larger application size due to bundled Go runtime

Code Comparison

Pake (JavaScript):

import { pake } from 'pake-cli';

pake({
  url: 'https://example.com',
  name: 'MyApp',
  icon: 'path/to/icon.png'
});

Wails (Go):

package main

import (
    "github.com/wailsapp/wails/v2"
    "github.com/wailsapp/wails/v2/pkg/options"
)

func main() {
    app := wails.CreateApp(&options.App{
        Width:  1024,
        Height: 768,
        Title:  "My Wails App",
    })
    app.Run()
}

Pake focuses on simplicity and quick setup for wrapping web applications, while Wails offers a more comprehensive framework for building native-feeling desktop applications with Go and web technologies. Pake is ideal for rapid prototyping and simple web-to-desktop conversions, whereas Wails is better suited for more complex, feature-rich desktop applications that require deeper integration with the operating system.

Portable and lightweight cross-platform desktop application development framework

Pros of Neutralinojs

  • More flexible and customizable, allowing developers to create a wider range of applications
  • Better documentation and larger community support
  • Cross-platform compatibility with Windows, macOS, and Linux

Cons of Neutralinojs

  • Steeper learning curve compared to Pake's simpler approach
  • Requires more setup and configuration to get started
  • Larger file size and potentially higher resource usage

Code Comparison

Pake (creating a simple window):

import { createWindow } from 'pake';

createWindow({
  url: 'https://example.com',
  width: 800,
  height: 600
});

Neutralinojs (creating a simple window):

const { app, window } = require('neutralino');

app.on('ready', () => {
  window.create('https://example.com', {
    width: 800,
    height: 600
  });
});

Both projects aim to simplify the process of creating desktop applications from web technologies. Pake focuses on quickly turning websites into desktop apps with minimal configuration, while Neutralinojs offers a more comprehensive framework for building cross-platform desktop applications with web technologies. The choice between the two depends on the specific needs of the project and the developer's preferences for simplicity versus flexibility.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

English | 简体中文 | 日本語

Pake

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 Tauri (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!
MacWindows/LinuxFunction
⌘ + [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
⌘ + rCtrl + rRefresh Page
⌘ + wCtrl + wHide window, not quite
⌘ + -Ctrl + -Zoom out the page
⌘ + +Ctrl + +Zoom in the page
⌘ + =Ctrl + =Zoom in the Page
⌘ + 0Ctrl + 0Reset 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. 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 --hide-title-bar

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 an 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 hideTitleBar 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.

Developers

Pake's development can not be without these Hackers. They contributed a lot of capabilities for Pake. Also, welcome to follow them! ❤️

tw93
Tw93
Tlntin
Tlntin
jeasonnow
Santree
pan93412
Pan93412
wanghanzhen
Volare
liby
Bryan Lee
essesoul
Essesoul
YangguangZhou
Jerry Zhou
AielloChan
Aiello
m1911star
Horus
Pake-Actions
Pake Actions
eltociear
Ikko Eltociear Ashimine
QingZ11
Steam
exposir
孟世博
2nthony
2nthony
ACGNnsj
Null
imabutahersiddik
Abu Taher Siddik
kidylee
An Li
nekomeowww
Ayaka Neko
turkyden
Dengju Deng
Fechin
Fechin
ImgBotApp
Imgbot
droid-Q
Jiaqi Gu
mattbajorek
Matt Bajorek
Milo123459
Milo
princemaple
Po Chen
Tianj0o
Qitianjia
geekvest
Null
houhoz
Hyzhao
lakca
Null
liudonghua123
Liudonghua
liusishan
Liusishan
piaoyidage
Ranger
hetz
贺天卓

Frequently Asked Questions

  1. Right-clicking on an image element in the page to open the menu and select download image or other events does not work (common in MacOS systems). This issue is due to the MacOS built-in webview not supporting this feature.

Support

  1. I have two cats, TangYuan and Coke. If you think Pake delights your life, you can feed them some canned food 🥩.
  2. If you like Pake, you can star it on GitHub. Also, welcome to recommend Pake to your friends.
  3. You can follow my Twitter to get the latest news of Pake or join our Telegram 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!