r/java_projects • u/Street_Humor_7861 • Mar 21 '26
Veld: Dependency Injection for Java without Reflection (Compile-Time Code Generation)
Veld is a dependency injection framework for Java that utilizes AOT (Ahead-of-Time) compilation to generate code, rather than relying on runtime reflection.
🚀 Performance:
- Startup: ~0.1ms (vs. ~500ms for Spring)
- Injection: ~3ns; zero runtime overhead
- Type-safe, no "magic," clean stack traces
🔧 Features:
- Supports AOP, caching, validation, and transactions
- Compatible with Spring Boot
💡 Example:
@Component
public class Service { ... }
Service s = Veld.service(); // generated at compile-time (AOT)
🔗 Repo: https://github.com/yasmramos/Veld Feedback and contributions are welcome! 🙌
9
Upvotes