|
1 | 1 | # Grincel - GPU Vanity Address Generator |
2 | 2 |
|
3 | | -A high-performance GPU-accelerated Solana vanity address generator written in Zig with Metal and Vulkan compute shaders. |
| 3 | +A high-performance GPU-accelerated Solana vanity address generator written in Zig. |
| 4 | + |
| 5 | +**Platforms:** macOS, Linux |
| 6 | +**GPU Backends:** Metal (macOS), Vulkan (Linux, macOS via MoltenVK) |
4 | 7 |
|
5 | 8 | ## Features |
6 | 9 |
|
7 | 10 | - **Full GPU acceleration** - SHA-512, Ed25519, Base58, and pattern matching all run on GPU |
8 | | -- **Cross-platform** - Metal on macOS, Vulkan on Linux/Windows |
| 11 | +- **Cross-platform** - Metal on macOS (default), Vulkan on Linux (default) and macOS (via MoltenVK) |
9 | 12 | - **~820k keys/sec** on Apple Silicon (vs ~2.3k/sec CPU-only, ~357x faster) |
10 | 13 | - **Flexible pattern matching** - prefix, suffix, or anywhere in address |
11 | 14 | - **Case-insensitive by default** (like solana-keygen) |
@@ -237,23 +240,38 @@ The P50 (median) time is when you have a 50% chance of finding a match. Progress |
237 | 240 | ## Architecture |
238 | 241 |
|
239 | 242 | ``` |
240 | | -src/ |
241 | | - main.zig # Entry point |
242 | | - cli.zig # CLI parsing, validation, search orchestration |
243 | | - pattern.zig # Pattern matching logic |
244 | | - grinders/ |
245 | | - mod.zig # Shared types and config |
246 | | - cpu.zig # CPU-only grinder |
247 | | - metal.zig # Metal GPU implementation (macOS) |
248 | | - vulkan.zig # Vulkan GPU implementation (cross-platform) |
249 | | - cpu/ |
250 | | - ed25519.zig # Ed25519 implementation |
251 | | - base58.zig # Base58 encoding |
252 | | - shaders/ |
253 | | - vanity.metal # Metal compute shader |
254 | | - vanity.comp # Vulkan/GLSL compute shader |
| 243 | +. |
| 244 | +├── build.zig # Zig build configuration |
| 245 | +├── build.zig.zon # Dependencies (vulkan-zig, zig-metal, etc.) |
| 246 | +├── libs/ |
| 247 | +│ └── zigtrait/ # Vendored zigtrait library |
| 248 | +├── src/ |
| 249 | +│ ├── main.zig # Entry point |
| 250 | +│ ├── cli.zig # CLI parsing, validation, search orchestration |
| 251 | +│ ├── pattern.zig # Pattern matching logic |
| 252 | +│ ├── grinders/ |
| 253 | +│ │ ├── mod.zig # Shared types and conditional exports |
| 254 | +│ │ ├── cpu.zig # CPU-only grinder |
| 255 | +│ │ ├── metal.zig # Metal GPU implementation (macOS) |
| 256 | +│ │ └── vulkan.zig # Vulkan GPU implementation (Linux, macOS) |
| 257 | +│ ├── cpu/ |
| 258 | +│ │ ├── ed25519.zig # Ed25519 implementation |
| 259 | +│ │ └── base58.zig # Base58 encoding |
| 260 | +│ └── shaders/ |
| 261 | +│ ├── vanity.metal # Metal compute shader (embedded at compile time) |
| 262 | +│ └── vanity.comp # Vulkan/GLSL compute shader (compiled to SPIR-V) |
| 263 | +├── Formula/ |
| 264 | +│ └── grincel.rb # Homebrew formula |
| 265 | +└── Dockerfile # Multi-arch Linux container |
255 | 266 | ``` |
256 | 267 |
|
| 268 | +### Dependencies |
| 269 | + |
| 270 | +Managed via Zig's package manager (`build.zig.zon`): |
| 271 | +- **zig-metal** - Metal bindings for Zig (macOS GPU) |
| 272 | +- **vulkan-zig** - Vulkan bindings for Zig (cross-platform GPU) |
| 273 | +- **zigtrait** - Zig trait library (vendored) |
| 274 | + |
257 | 275 | ## License |
258 | 276 |
|
259 | 277 | This project is released into the public domain. See LICENSE file for details. |
0 commit comments