Engineering
kessoku-di avatar

kessoku-di

Accelerate Go application startup with parallel compile-time dependency injection. Optimize slow services, replace google/wire, and manage async dependencies with kessoku.

Introduction

Kessoku is a high-performance, compile-time dependency injection framework designed for Go developers who need to slash application startup times. By executing independent providers concurrently, it moves beyond the sequential limitations of tools like google/wire, making it ideal for microservices and cloud-native applications that struggle with heavy initialization chains or serverless cold-start penalties. The framework generates type-safe, optimized code that eliminates runtime overhead while maintaining clean architectural boundaries. Whether you are migrating existing projects or building new services that require complex, async initialization, Kessoku provides a robust API to wire dependencies effectively. It is particularly effective when managing multiple database connections, remote API clients, or cache warming tasks that can be performed in parallel rather than in a rigid, one-by-one sequence.

  • Automatically executes independent providers in parallel to minimize total startup latency.

  • Generates efficient Go code at compile time using go:generate and go tool kessoku, ensuring zero runtime reflection or performance penalties.

  • Seamlessly handles dependency graph resolution, including error propagation and resource cleanup functions, which are automatically integrated into the generated injector.

  • Provides a migration path for google/wire users, allowing for structured conversion of existing sets and bindings.

  • Supports interface binding, value injection, and struct field expansion to handle diverse constructor signatures.

  • Use kessoku.Inject to define your main application injectors, which generate standard Go functions.

  • Wrap providers in kessoku.Async to unlock parallel execution paths for expensive initialization tasks.

  • Organize complex dependency trees using kessoku.Set to improve code modularity and maintainability across large service implementations.

  • Note that parallel execution necessitates the use of context.Context in generated functions; ensure your application supports context propagation.

  • Refer to the internal documentation and provided migration tools for automating the conversion from legacy wireinject build tags to kessoku-based generation.

  • Troubleshooting and debugging can be performed using the provided CLI tools, which assist in identifying dependency cycles or generation errors.

Repository Stats

Stars
132
Forks
1
Open Issues
7
Language
Go
Default Branch
main
Sync Status
Idle
Last Synced
May 3, 2026, 06:45 PM
View on GitHub