GriffinCanCode/Retrigger
The fastest hot reloader for webpack
High-Performance File System Watcher for Modern Development Workflows
Retrigger is a native file system monitoring daemon designed to eliminate the performance bottlenecks in development tooling. By replacing slow JavaScript-based file watchers with a multi-language native implementation, Retrigger delivers 100-160x faster hot reload times for modern web development workflows.
Retrigger monitors your project files and instantly detects changes with sub-millisecond latency. When you save a file, the system:
Modern development workflows suffer from a fundamental performance problem: file watching. JavaScript-based watchers like Chokidar are convenient but prohibitively slow on large codebases. When working with projects containing 10,000+ files, developers experience:
Retrigger solves this by leveraging native system capabilities and advanced algorithms that JavaScript cannot access efficiently. The result is a development experience that feels instant rather than sluggish.
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ File System │ │ Retrigger │ │ Development │
│ Changes │ │ Daemon │ │ Tools │
└─────────────────┘ └─────────────────┘ └─────────────────┘
│ │ │
│ inotify/FSEvents │ │
├──────────────────────►│ │
│ │ │
│ ┌──▼──────────────────┐ │
│ │ System Watcher │ │
│ │ (Zig/C) │ │
│ └──┬──────────────────┘ │
│ │ │
│ ┌──▼──────────────────┐ │
│ │ Hash Engine │ │
│ │ (SIMD-optimized) │ │
│ └──┬──────────────────┘ │
│ │ │
│ ┌──▼──────────────────┐ │
│ │ Cache & IPC │ │
│ │ (Rust daemon) │ │
│ └──┬──────────────────┘ │
│ │ │
│ ┌──▼──────────────────┐ │
│ │ Node.js Bindings │ │
│ │ (Zero-copy IPC) │ │
│ └──┬──────────────────┘ │
│ │ │
│ │ Plugin Interface │
│ ├──────────────────────►│
│ │ │
│ <5ms latency webpack
│ Vite
│ Rspack
Performance
System Integration
Developer Experience
Metric | JavaScript Watchers | Retrigger | Improvement |
---|---|---|---|
Hot reload latency | 500-2000ms | <5ms | 100-400x |
CPU usage (idle) | 5-15% | <1% | 5-15x |
Memory usage | 50-200MB | 10-30MB | 2-7x |
File scan time (50K files) | 5-10s | <200ms | 25-50x |
# Install the daemon
cargo install retrigger-daemon
# Install Node.js bindings
npm install @retrigger/webpack-plugin
// webpack.config.js
const RetriggerPlugin = require('@retrigger/webpack-plugin');
module.exports = {
plugins: [
new RetriggerPlugin({
// Plugin automatically connects to running daemon
})
]
};
# Start the daemon
retrigger start --config retrigger.toml
# Generate default configuration
retrigger config --output retrigger.toml
# Check daemon status
retrigger status
# Run performance benchmarks
retrigger benchmark --files 10000
Retrigger implements a multi-layer architecture optimized for performance:
The system maintains compatibility with existing development tools while providing dramatic performance improvements through native optimization and advanced system programming techniques.
MIT License - see LICENSE file for details.
Contributions are welcome. Please read CONTRIBUTING.md for guidelines on submitting pull requests and reporting issues.