Laravel semantics with Rust type safety
Minimal, async-first Rust web framework inspired by Laravel, providing routing, controllers, middleware, configuration, and a CLI—all built with Rust’s performance and safety in mind.
- Goals
- Features
- Architecture
- MVP Scope
- Getting Started
- Project Structure
- Milestones
- Contribution
- License
Kernel aims to provide:
- A developer-friendly, structured Rust web framework
- Laravel-inspired conventions and philosophy
- Modular components that can be extended over time
- CLI tooling for server management and project scaffolding
- Async HTTP server (GET & POST)
- Simple routing system with path parameters
- Controller abstractions
- Middleware pipeline
- Basic dependency injection container
- Configuration loading from
.env - CLI tool for running the server and generating controllers
- Basic test harness for integration testing
Kernel follows an MVC-inspired modular design:
- App – central orchestrator holding router, container, and middleware
- Router – handles route registration and matching
- Middleware – global request/response pipeline
- Container – dependency injection for services
- Config – environment-based configuration
Included in MVP:
- HTTP server
- Routing & controllers
- Middleware
- DI container
- Config system
- CLI scaffold
- Test harness
Out of Scope:
- ORM / database integration
- Auth / sessions / CSRF
- View templating
- WebSockets / background jobs
- Macro-based routing
- Rust 1.70+
- Cargo
cargo run -- servecargo run -- make:controller UserControllercargo testkernel/
├── src/
│ ├── main.rs # Entry point / CLI
│ ├── app.rs # App kernel
│ ├── router.rs # Routing system
│ ├── middleware.rs # Middleware pipeline
│ ├── container.rs # Dependency injection
│ ├── request.rs # Request abstraction
│ ├── response.rs # Response abstraction
│ ├── config.rs # Configuration loader
│ └── cli.rs # CLI commands
└── Cargo.toml
- Server – Hardcoded route responding to requests
- Router – Dynamic route table with path parameters
- Middleware – Logging pipeline example
- DI Container – Singleton service registration and resolution
- Config –
.envloading into typed structs - CLI –
serve&make:controller - Tests – Async integration test harness
Kernel is open for contributions. Developers are welcome to improve features, add components, or enhance the CLI.
- Keep code idiomatic and safe
- Use async/await for all I/O operations
- Document your code
- Follow Rustfmt and Clippy recommendations
- Discuss major changes via issues before submitting pull requests
- Fork the repo
- Create a feature branch (
git checkout -b feature/my-feature) - Commit your changes (
git commit -am 'Add feature') - Push to the branch (
git push origin feature/my-feature) - Open a Pull Request
MIT License. See LICENSE for details.