Kayrx

异步非阻塞-事件驱动, I/O-Net-HTTP-Web-Client全栈开源平台

  • 全栈式
    客户端-服务端
  • 事件驱动
    非阻塞事件驱动
  • 全异步
    全异步无锁并发
  • 高性能
    高性能服务器
  • 轻量级
    轻量,简单,灵活
use kayrx::web::{web, App, HttpServer, Responder}; #[get("/{id}/{name}/index.html")] async fn index(info: web::Path<(u32, String)>) -> impl Responder { format!("Hello {}! id:{}", info.1, info.0) } #[kayrx::main] async fn main() -> std::io::Result<()> { HttpServer::new(|| App::new().service(index)) .bind("127.0.0.1:8080")? .run() .await }