Download the PHP package chrisnetonline/turbo-composer without Composer
On this page you can find all versions of the php package chrisnetonline/turbo-composer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download chrisnetonline/turbo-composer
More information about chrisnetonline/turbo-composer
Files in chrisnetonline/turbo-composer
Package turbo-composer
Short Description Rust-powered Composer acceleration: parallel extraction + fast classmap generation
License MIT
Informations about the package turbo-composer
turbo-composer
Rust-powered Composer acceleration: parallel extraction, fast classmap generation, integrity verification, and vendor validation.
Features
- Fast classmap generation — byte-scanning PHP tokenizer with parallel directory walking, up to 7x faster than Composer's built-in classmap generator
- Incremental caching — caches symbols by file mtime with directory-level cache; warm runs skip entire directory walks and vendor stat calls
- Staged file writes — Rust writes autoload files directly to disk with atomic rename, eliminating JSON serialization overhead for large classmaps
- Smart parent::dump() skip — when infrastructure files already exist from a prior install, the Composer PHP-side dump is skipped entirely on warm runs
- Batched operations — clean, verify, and extract operations are combined into a single Rust process invocation, reducing process spawn overhead
- Parallel package extraction — extracts zip/tar archives using Rust + rayon for parallel I/O
- Parallel integrity verification — SHA256/SHA1 hash verification of package archives, ~7x faster than PHP's
hash_file() - Fast vendor state validation — checks all packages are present in vendor/ in parallel, up to 13x faster than PHP
- Parallel vendor cleanup — concurrent removal of package directories during updates/uninstalls
- Drop-in Composer plugin — integrates transparently with
composer installandcomposer dump-autoload -o - Automatic binary management — downloads platform-specific binaries on first use
Installation
Once installed, the plugin activates automatically. Run Composer as usual:
How it works
turbo-composer replaces Composer's autoload generator with a Rust-accelerated version. When you run composer dump-autoload --optimize, it:
- Resolves the autoloader suffix and builds the autoload payload in PHP
- Starts the Rust engine as a background subprocess with a staging suffix (
.turbo) - Rust walks all directories in parallel (two-phase: collect paths, then rayon parallel read+parse), extracts class/interface/trait/enum symbols using a single-pass byte scanner, and writes all 7 autoload files directly to disk as staged files
- If infrastructure files (
ClassLoader.php,installed.php) already exist, Composer'sparent::dump()is skipped entirely; otherwise it runs in parallel with Rust - Once both complete, the staged
.turbofiles are atomically renamed to their final names
Rust generates all autoload files directly: autoload.php, autoload_real.php, autoload_classmap.php, autoload_psr4.php, autoload_namespaces.php, autoload_files.php, and autoload_static.php. An incremental mtime cache skips re-reading unchanged files, and vendor files skip stat calls entirely on warm runs.
During composer install/update, clean, verify, and extract operations are batched into a single Rust process invocation to minimize process spawn overhead.
Configuration
The plugin works out of the box with zero configuration. The binary version is automatically matched to the installed plugin version.
For advanced use cases (e.g., private mirrors), you can override the download URL in your project's composer.json:
| Setting | Default | Description |
|---|---|---|
base-url |
GitHub releases URL | Override base URL for binary downloads |
Platform support
| Platform | Architecture | Binary |
|---|---|---|
| Linux | x86_64 | Yes |
| Linux | aarch64 | Yes |
| macOS | x86_64 | Yes |
| macOS | aarch64 (Apple Silicon) | Yes |
| Windows | x86_64 | Yes |
Development
Prerequisites
- PHP 8.1+
- Composer 2.6+
- Rust toolchain (
cargo,rustc,clippy) — install via rustup orbrew install rust
Building from source
PHP checks
The unit tests cover BinaryInstaller and RustBridge using fake shell-script binaries — no Rust build required. The correctness tests generate classmaps with both vanilla Composer and turbo-composer across multiple fixtures (small, medium, large, laravel-app, symfony-app) and assert they match exactly.
Rust checks
Benchmarks
The benchmark script builds the binary if needed, creates temporary projects with varying sizes, and compares vanilla Composer vs turbo-composer (cold cache vs warm cache).
Performance
Classmap Generation (dump-autoload --optimize)
| Fixture | PHP Files | Vanilla | Turbo (cold) | Turbo (warm) |
|---|---|---|---|---|
| symfony-real | 4,334 | 4,917ms | 696ms (7.1x) | 741ms (6.6x) |
| laravel-real | 5,594 | 2,795ms | 845ms (3.3x) | 804ms (3.5x) |
| monolith | 8,874 | 3,886ms | 1,055ms (3.7x) | 1,062ms (3.7x) |
Rust writes all 7 autoload files directly to disk using a staging + atomic rename approach, eliminating JSON serialization overhead. On warm runs, parent::dump() is skipped when infrastructure files already exist, and the incremental mtime cache skips entire directory walks and vendor stat calls.
Integrity Verification (SHA256)
| Fixture | Files | Rust | PHP | Speedup |
|---|---|---|---|---|
| symfony-real | 200 | 23ms | 169ms | 7.3x |
| laravel-real | 200 | 113ms | 201ms | 1.8x |
| monolith | 200 | 24ms | 158ms | 6.6x |
Parallel SHA256 hashing using Rust's sha2 crate + rayon, vs PHP's sequential hash_file().
Vendor State Validation
| Fixture | Packages | Rust | PHP | Speedup |
|---|---|---|---|---|
| symfony-real | 70 | 124ms | 214ms | 1.7x |
| laravel-real | 76 | 14ms | 136ms | 9.7x |
| monolith | 115 | 9ms | 118ms | 13.1x |
Parallel check that all packages from composer.lock are present and non-empty in vendor/. Useful for CI warm-cache validation.
Architecture
License
MIT
All versions of turbo-composer with dependencies
composer-plugin-api Version ^2.6