Ultra-fast Dependency Injection for Java - Zero Reflection, Pure Code Generation
Veld is a compile-time Dependency Injection framework that generates pure Java code. Zero reflection at runtime means maximum performance - up to 100x faster than Spring in dependency resolution benchmarks.
Designed for developers who want maximum performance, full control, and zero runtime magic.
Maven:
<dependency>
<groupId>io.github.yasmramos</groupId>
<artifactId>veld-runtime</artifactId>
<version>1.0.3</version>
</dependency>
<dependency>
<groupId>io.github.yasmramos</groupId>
<artifactId>veld-annotations</artifactId>
<version>1.0.3</version>
</dependency>Gradle:
implementation 'io.github.yasmramos:veld-runtime:1.0.3'
implementation 'io.github.yasmramos:veld-annotations:1.0.3'<build>
<plugins>
<plugin>
<groupId>io.github.yasmramos</groupId>
<artifactId>veld-maven-plugin</artifactId>
<version>1.0.3</version>
</plugin>
</plugins>
</build>import io.github.yasmramos.veld.annotation.Component;
import io.github.yasmramos.veld.annotation.Inject;
@Component
public class UserService {
private final UserRepository repository;
@Inject
public UserService(UserRepository repository) {
this.repository = repository;
}
public User getUser(Long id) {
return repository.findById(id);
}
}import io.github.yasmramos.veld.Veld;
public class Main {
public static void main(String[] args) {
UserService userService = Veld.get(UserService.class);
User user = userService.getUser(1L);
}
}| Feature | Veld | Spring | Guice |
|---|---|---|---|
| Reflection at runtime | None | Heavy | Moderate |
| Startup time | ~0.1ms | ~500ms+ | ~100ms |
| Injection speed | ~0.001ms | ~0.01ms | ~0.005ms |
- Up to 100x faster than Spring in dependency resolution benchmarks
- 3ns average injection latency
- 0.003ms startup time
- Zero runtime reflection overhead
| Topic | Location |
|---|---|
| Getting Started | docs/getting-started.md |
| Annotations Reference | docs/annotations.md |
| Core Features | docs/core-features.md |
| API Reference | docs/api.md |
| AOP Guide | docs/aop.md |
| EventBus | docs/eventbus.md |
| Performance Benchmarks | docs/benchmarks.md |
| Architecture | docs/architecture.md |
| Examples | docs/examples.md |
| Module | Description |
|---|---|
veld-annotations |
Core annotations |
veld-runtime |
Runtime utilities |
veld-processor |
Annotation processor |
veld-weaver |
Bytecode weaving |
veld-maven-plugin |
Unified build plugin |
veld-aop |
Aspect-Oriented Programming |
veld-resilience |
Circuit Breaker, Retry, Rate Limiter |
veld-cache |
Caching support |
veld-validation |
Bean validation |
veld-security |
Method-level security |
veld-metrics |
Metrics collection |
veld-tx |
Transaction management |
veld-spring-boot-starter |
Spring Boot integration |
To integrate Veld with Spring Boot applications, use the Spring Boot starter.
Maven:
<dependency>
<groupId>io.github.yasmramos</groupId>
<artifactId>veld-spring-boot-starter</artifactId>
<version>1.0.3</version>
</dependency>Gradle:
implementation 'io.github.yasmramos:veld-spring-boot-starter:1.0.3'git clone https://github.com/yasmramos/Veld.git
cd Veld
mvn clean installVeld - Dependency Injection at the speed of direct method calls.
