-
Notifications
You must be signed in to change notification settings - Fork 0
API Reference
ViewWay edited this page Jun 6, 2026
·
1 revision
Status: 62 Crates, 10 Domains / 62 个 Crate,10 个功能域 状态: 全阶段完成 ✅
Hiver provides comprehensive API documentation across multiple channels. Hiver 通过多个渠道提供全面的 API 文档。
| Resource / 资源 | Link / 链接 | Description / 描述 |
|---|---|---|
| AI-Optimized Reference | AGENTS.md | Compact LLM-injectable reference (62 crates) |
| JSON Schema | api-schema.json | Machine-parseable API catalog |
| Full API Reference | full-api-reference.md | Human-readable with code examples |
| Annotations Reference | annotations-reference.md | All 150+ procedural macros |
| Codemap | CODEMAP.md | Full crate reference, dependency graph |
| docs.rs | docs.rs/hiver | Auto-generated rustdoc |
| Crate | Description / 描述 |
|---|---|
hiver-runtime |
Custom async runtime (io-uring/epoll/kqueue) |
hiver-core |
Core types, error handling |
hiver-http |
HTTP/1.1 server, Request, Response |
hiver-router |
Router with path params, state, middleware |
hiver-middleware |
Middleware trait (CORS, compression, timeout) |
hiver-extractors |
Request parameter extraction |
hiver-response |
Response builders |
| Crate | Description / 描述 |
|---|---|
hiver-data-commons |
Repository traits, Page/Sort, entity metadata |
hiver-data-rdbc |
Reactive database client, connection pool, RowMapper |
hiver-data-orm |
ActiveRecord, Model derive, QueryBuilder, Relationships, Migrations |
hiver-data-redis |
Redis template, distributed locks, caching |
hiver-data-mongodb |
MongoDB template and repository |
hiver-flyway |
Database migration framework |
hiver-data-annotations |
@Entity, @Table, @Column, @Id
|
hiver-data-macros |
#[derive(Model)], #[derive(Repository)]
|
| Crate | Description / 描述 |
|---|---|
hiver-resilience |
Circuit breaker, rate limiter, retry, timeout |
hiver-observability |
Distributed tracing, metrics, structured logging |
| Crate | Description / 描述 |
|---|---|
hiver-web3 |
Chain abstraction, wallet, transactions, RPC, smart contracts |
| Crate | Description / 描述 |
|---|---|
hiver-ioc |
Dependency injection container, @Component, @Autowired
|
hiver-aop |
Aspect-oriented programming, @Aspect
|
| Crate | Description / 描述 |
|---|---|
hiver-security |
Authentication, authorization, password encoding |
hiver-validation |
Bean Validation (JSR 380) |
hiver-validation-annotations |
@NotNull, @Size, @Email, @Pattern
|
hiver-scheduling |
@Scheduled cron/fixed-rate/delay tasks |
hiver-i18n |
Internationalization, MessageSource |
| Crate | Description / 描述 |
|---|---|
hiver-ai |
AI/LLM integration, chat models, embeddings |
hiver-agent |
AI agent framework (Spring AI Agent) |
hiver-cloud |
Cloud-native support, service discovery |
hiver-ws |
WebSocket server/client |
| Crate | Description / 描述 |
|---|---|
hiver-macros |
150+ procedural macros |
hiver-lombok |
@Data, @Getter, @Setter, @Builder
|
hiver-retry-macros |
@Retryable, @Recover
|
hiver-spel |
Spring Expression Language engine |
hiver-modulith |
Modular monolith support |
hiver-starter |
Auto-configuration, one-line startup |
hiver-test |
Test utilities, TestClient |
use hiver_http::Server;
use hiver_router::Router;
fn main() -> std::io::Result<()> {
let mut rt = hiver_runtime::Runtime::new()?;
rt.block_on(async {
let app = Router::new()
.get("/", || async { "Hello, Hiver!" });
Server::bind("0.0.0.0:8080").run(app).await
})
}use hiver_starter::HiverApp;
fn main() -> std::io::Result<()> {
HiverApp::new()
.with_router(Router::new().get("/", handler))
.run()
}use hiver_data_orm::prelude::*;
use hiver_data_annotations::{Entity, Table, Id, Column};
#[derive(Entity, Table, Model)]
#[table_name = "users"]
struct User {
#[id]
id: i64,
#[column]
name: String,
email: String,
}
// Auto-generated by #[derive(Repository)]
impl UserRepository {
async fn find_by_email(&self, email: &str) -> Result<Option<User>> { ... }
async fn find_by_name_and_email(&self, name: &str, email: &str) -> Result<Vec<User>> { ... }
}← Previous / 上一页 | Next / 下一页 →
Hiver Framework
Getting Started / 快速开始
Core Concepts / 核心概念
Data Layer / 数据层
Security / 安全
Advanced / 高级主题
Cloud & Messaging
AI
Reference / 参考