The ultra-fast, Rust-powered bridge between Python and the Web.
Project description
CactusCat
The ultra-fast, Rust-powered bridge between Python and the Web.
CactusCat is a modern, high-performance hybrid framework designed to build desktop applications using Python for logic and Modern Web Tech (React, Vue, Svelte, Next.js) for the UI. Rebuilt from the ground up in Rust, it provides a "Zero-Cost" abstraction layer for enterprise-grade applications.
Recent Evolution: The "Betrayal of Tauri"
CactusCat has evolved beyond a simple WebView wrapper. It is now a Multi-Engine Application Platform.
- CNB (Cactus Native Bundle): A new hybrid packaging paradigm. We use PyInstaller for dependency analysis (tree-shaking) but replace the actual bundling with a high-performance Rust Packer.
- Shielded VFS Bootloader: Applications run inside a memory-backed, isolated, and encrypted Virtual File System. Your source code never touches the disk in plain text.
- Multi-Engine Hotswapping: Hotswap your browser backend with a single CLI flag. Use the lightweight Native Engine (Tao/Wry) for performance, or the Chrome Engine (Enterprise Chromium stack) for full web compatibility.
- Aggressive Pruning: The native Rust packer prunes non-essential metadata (
.dist-info, test suites, docs) resulting in binaries significantly smaller than standard Python bundlers.
Features
- Native Rust Engine: Built on
taoandwry, eliminating legacyctypesoverhead. - Multi-Engine Runtime: Choose between Native WebView or a full Chromium/Electron stack.
- Reactive State: Magic bi-directional sync between Python
app.stateand JavaScriptccat.state. - Zstd-Compressed Archives: Custom
.catarchive format for ultra-fast startup and small footprints. - MetaEdit Integration: Powered by the brand new
metaeditRust crate for 1:1 binary metadata surgery. - Powerhouse CLI: One-stop shop for initializing, running, and packaging your apps.
Quick Start
1. Installation
Install the development version (pre-compiled wheels available):
pip install cactuscat
2. Scaffold a New Project
cactuscat init MySweetApp --template react
3. Run with Engine Hotswapping
# Default Native Run
cactuscat run --dev
# Run with Enterprise Chrome Engine
cactuscat run --dev --engine chrome
Code Example
Python Backend (app.py)
from cactuscat import App
app = App()
app.state.counter = 0
@app.expose
def increment():
app.state.counter += 1
return f"Count is now {app.state.counter}"
app.run()
Frontend UI (App.jsx)
import ccat from 'ccat' // Unified CactusCat Client
async function handleAction() {
// Dynamic Python calling
const msg = await ccat.increment();
console.log(msg);
// Access reactive state directly
console.log(ccat.state.counter);
}
CLI Reference
| Command | Description |
|---|---|
init |
Scaffold a project with React, Vue, Svelte, or Next.js. |
run --dev |
Launch backend + frontend dev server with hot-reload. |
run --engine <name> |
Launch with a specific engine (native or chrome). |
package --native |
Trigger the [CNB] workflow with aggressive Rust pruning. |
package --secure |
Build a native Rust bootloader with an encrypted payload. |
engine install |
Manage browser runtimes (e.g., download Chrome engine). |
doctor |
Comprehensive system health and dependency check. |
Architecture: The CNB Paradigm
Unlike traditional "OneDir" or "OneFile" approaches, CactusCat's Native Bundle logic works in three stages:
- Analysis: PyInstaller maps the dependency tree.
- Pruning: Rust strips the "fat" (PDFs, tests, info folders) and Compresses.
- Execution: A Rust Bootloader initializes a shielded environment, decrypts the
ccat://assets, and executes the entry point from memory.
License
CactusCat is open-source software licensed under the MIT License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cactuscat-0.1.9.tar.gz.
File metadata
- Download URL: cactuscat-0.1.9.tar.gz
- Upload date:
- Size: 537.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e72ee5be64a7cb55c9afc4c1d781a44dd27af2756e3760c5c0eb0e7e0a6a9cb8
|
|
| MD5 |
89e237cda8e75caf64d406b56b58e1e3
|
|
| BLAKE2b-256 |
a301b5ee19fa937df7a83e147684f8d0d2d0235954b86044db3490ca722e8005
|
Provenance
The following attestation bundles were made for cactuscat-0.1.9.tar.gz:
Publisher:
pypi-publish.yml on Ghua8088/cactuscat
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cactuscat-0.1.9.tar.gz -
Subject digest:
e72ee5be64a7cb55c9afc4c1d781a44dd27af2756e3760c5c0eb0e7e0a6a9cb8 - Sigstore transparency entry: 836060227
- Sigstore integration time:
-
Permalink:
Ghua8088/cactuscat@bb6d5c5afc327f26c7531f48e95a5375b659e2a1 -
Branch / Tag:
refs/heads/master - Owner: https://github.com/Ghua8088
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@bb6d5c5afc327f26c7531f48e95a5375b659e2a1 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file cactuscat-0.1.9-cp311-cp311-manylinux_2_39_x86_64.whl.
File metadata
- Download URL: cactuscat-0.1.9-cp311-cp311-manylinux_2_39_x86_64.whl
- Upload date:
- Size: 82.1 MB
- Tags: CPython 3.11, manylinux: glibc 2.39+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2370687b454f58ef2f00f546d56fa1075d7d8be44577b0f8dee2a4d742f6f022
|
|
| MD5 |
ffb858373e0ab013cf6d8356ebd857bd
|
|
| BLAKE2b-256 |
4343674c7efb593286302a932c8c4e16914afb5a4adfea14f02999207cbd4bf3
|
Provenance
The following attestation bundles were made for cactuscat-0.1.9-cp311-cp311-manylinux_2_39_x86_64.whl:
Publisher:
pypi-publish.yml on Ghua8088/cactuscat
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cactuscat-0.1.9-cp311-cp311-manylinux_2_39_x86_64.whl -
Subject digest:
2370687b454f58ef2f00f546d56fa1075d7d8be44577b0f8dee2a4d742f6f022 - Sigstore transparency entry: 836060230
- Sigstore integration time:
-
Permalink:
Ghua8088/cactuscat@bb6d5c5afc327f26c7531f48e95a5375b659e2a1 -
Branch / Tag:
refs/heads/master - Owner: https://github.com/Ghua8088
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@bb6d5c5afc327f26c7531f48e95a5375b659e2a1 -
Trigger Event:
workflow_dispatch
-
Statement type: