| Crates.io | par-particle-life |
| lib.rs | par-particle-life |
| version | 0.1.0 |
| created_at | 2025-12-03 07:06:20.836937+00 |
| updated_at | 2025-12-03 07:06:20.836937+00 |
| description | GPU-accelerated particle life simulation in Rust |
| homepage | |
| repository | https://github.com/paulrobello/par-particle-life |
| max_upload_size | |
| id | 1963490 |
| size | 2,942,951 |
A high-performance, cross-platform GPU-accelerated particle life simulation built with Rust and WebGPU. Watch emergent life-like behaviors arise from simple particle interaction rules.

# Install from crates.io
cargo install par-particle-life
# Or build from source
git clone https://github.com/paulrobello/par-particle-life.git
cd par-particle-life
make run
# Or download pre-built binaries from releases
See the Configuration Guide for detailed setup instructions.
See Generator Reference for complete generator documentation.
|
Emergent Clusters
|
Cellular Patterns
|
Chaos: Random, RandomSymmetric, RandomBiased Structured: Chains, Snake, RockPaperScissors, Predator-Prey Social: Tribes, Flocking, Segregation, Cooperation And more: Symbiosis, Parasitism, Hierarchy, Crystals...
Classic: Rainbow, Pastel, Neon, Earth Themed: CyberNeon, Aurora, Sunset, Ocean Scientific: Viridis, Plasma, Magma, Spectral
Geometric: Disk, Ring, Grid, Spiral Organic: Galaxy, Clusters, Noise Fun: Yin-Yang, Hearts, DNA Helix
# Install from crates.io
cargo install par-particle-life
# Run the application
par-particle-life
Requires Rust 1.88+. Install from rustup.rs.
Download pre-compiled binaries from the GitHub Releases page:
macOS users: Allow the app in System Preferences > Security & Privacy if prompted.
# Tap the official Homebrew tap
brew tap paulrobello/par-particle-life
# Install the application
brew install --cask par-particle-life
# Clone repository
git clone https://github.com/paulrobello/par-particle-life.git
cd par-particle-life
# Build and run (optimized)
make run
# Or use cargo directly
cargo run --release
# Run with default settings
par-particle-life
# Or use the Makefile for development
make run # Run in release mode
make build # Build debug
make test # Run tests
make lint # Run linter
make checkall # Run all checks
| Shortcut | Action |
|---|---|
| Space | Pause/resume simulation |
| R | Regenerate particles |
| M | Generate new interaction rules |
| H | Toggle UI visibility |
| C | Reset camera (zoom/pan) |
| F11 | Start/stop video recording |
| F12 | Save screenshot (PNG) |
| Escape | Quit application |
| Action | Effect |
|---|---|
| Scroll wheel | Zoom in/out |
| Right-click drag | Pan view |
| Middle-click drag | Pan view |
| Left-click drag | Use active brush tool |
Interactive particle manipulation tools:
| Tool | Effect |
|---|---|
| None | No brush active |
| Draw | Add particles at cursor |
| Erase | Remove particles within radius |
| Attract | Pull particles toward cursor |
| Repel | Push particles away from cursor |
Cross-platform compatibility through WebGPU (wgpu-rs).
graph TB
subgraph "Application Layer"
App[App State]
UI[egui UI]
Input[Input Handler]
end
subgraph "Simulation Core"
Physics[Physics Engine]
Spatial[Spatial Hash]
Particles[Particle Data]
end
subgraph "Generators"
Rules[31 Rule Generators]
Colors[37 Color Generators]
Positions[28 Position Generators]
end
subgraph "GPU Rendering"
Context[wgpu Context]
Compute[Compute Shaders]
Render[Render Shaders]
Buffers[Double Buffers]
end
subgraph "Media"
Video[Video Recorder]
Screenshot[Screenshot]
end
App --> UI
App --> Input
App --> Physics
App --> Context
Physics --> Spatial
Physics --> Particles
Physics --> Compute
Rules --> Particles
Colors --> Particles
Positions --> Particles
Context --> Compute
Context --> Render
Context --> Buffers
App --> Video
App --> Screenshot
style App fill:#e65100,stroke:#ff9800,stroke-width:3px,color:#ffffff
style Physics fill:#1b5e20,stroke:#4caf50,stroke-width:2px,color:#ffffff
style Context fill:#0d47a1,stroke:#2196f3,stroke-width:2px,color:#ffffff
style Rules fill:#4a148c,stroke:#9c27b0,stroke-width:2px,color:#ffffff
style Colors fill:#4a148c,stroke:#9c27b0,stroke-width:2px,color:#ffffff
style Positions fill:#4a148c,stroke:#9c27b0,stroke-width:2px,color:#ffffff
style Compute fill:#1a237e,stroke:#3f51b5,stroke-width:2px,color:#ffffff
style Render fill:#1a237e,stroke:#3f51b5,stroke-width:2px,color:#ffffff
style Video fill:#880e4f,stroke:#c2185b,stroke-width:2px,color:#ffffff
Simulation states can be saved and loaded as presets:
~/Library/Application Support/par-particle-life/presets/~/.local/share/par-particle-life/presets/%APPDATA%\par-particle-life\presets\Video recording requires ffmpeg:
# macOS (Homebrew)
brew install ffmpeg
# Ubuntu/Debian
sudo apt install ffmpeg
# Windows (Chocolatey)
choco install ffmpeg
Supported formats: MP4 (H.264), WebM (VP9), GIF
Contributions are welcome! Please read the contribution guidelines:
# Clone and setup
git clone https://github.com/paulrobello/par-particle-life.git
cd par-particle-life
cargo build
# Run quality checks
make checkall
All contributions must pass:
cargo fmt or make format)cargo clippy or make lint)cargo test or make test)For the best experience:
cargo run --release or make run)This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
See LICENSE file for the full license text.
This project is derived from SandboxScience by Luzzi Charly (@DicSo92), which is also licensed under AGPL-3.0.
Paul Robello - probello@gmail.com
Watch emergent life arise from simple rules through the power of GPU computing!