How speedupmate/magento2-spmt-fast-di-compile works
This Magento companion module preserves the setup:di:compile CLI entry point while selecting a trusted local Rust compiler when available, with standard PHP compilation as an explicit or automatic fallback. Its separate installer fetches and verifies a platform release binary. The graph reflects the README and shown source; Magento DI wiring and several installer internals are not fully sampled, so those links rely on documented behavior rather than inspected implementation details.
Main entry points: FastDiCompileCommand.php Compile wrapper · AggregateInterceptor.php Command loader interceptor · install-fast-di-compile.php Release installer · registration.php Module registration
Components 15
Magento integration
- Module registration
src/registration.php - DI preference
src/etc/di.xml - Command loader interceptor
src/Console/CommandLoader/AggregateInterceptor.php - Trusted binary selection
src/Console/CommandLoader/AggregateInterceptor.php
Compile command
- Compile wrapper
src/Console/Command/FastDiCompileCommand.php - Rust DI compiler
- Standard PHP compiler
- Option validation and forwarding
src/Console/Command/FastDiCompileCommand.php - Root-path and environment safeguards
src/Console/Command/FastDiCompileCommand.php - Sanitized compile output
src/Console/Command/FastDiCompileCommand.php
Binary installation
- Release installer
bin/install-fast-di-compile.php
Other components
- Magento operator
- Magento CLI
- GitHub release assets
- Installed compiler binary
Connections 17
- Magento operator → Magento CLI: runs command
README.md - Magento CLI → Command loader interceptor: loads command
README.md - DI preference → Command loader interceptor: registers preference
README.md - Command loader interceptor → Trusted binary selection: checks binary
src/Console/CommandLoader/AggregateInterceptor.php - Trusted binary selection → Compile wrapper: selects wrapper
src/Console/CommandLoader/AggregateInterceptor.php - Command loader interceptor → Standard PHP compiler: returns original
src/Console/CommandLoader/AggregateInterceptor.php - Compile wrapper → Option validation and forwarding: validates and forwards
src/Console/Command/FastDiCompileCommand.php - Compile wrapper → Root-path and environment safeguards: checks paths
src/Console/Command/FastDiCompileCommand.php - Compile wrapper → Rust DI compiler: runs process
README.md - Compile wrapper → Standard PHP compiler: runs on standard
src/Console/Command/FastDiCompileCommand.php - Rust DI compiler → Sanitized compile output: produces output
README.md - Compile wrapper → Sanitized compile output: sanitizes output
src/Console/Command/FastDiCompileCommand.php - Magento operator → Release installer: invokes installer
README.md - Release installer → GitHub release assets: downloads release
README.md - Release installer → Installed compiler binary: installs verified binary
bin/install-fast-di-compile.php - Installed compiler binary → Trusted binary selection: candidate for use
README.md - Module registration → Magento CLI: registers module
src/registration.php