ryde
jsx my life up
Ryde是一个人,生锈的单个文件网络框架
cargo add --git https://github.com/swlkr/ryde use ryde :: * ;
# [ router ]
fn router ( ) -> Router {
Router :: new ( ) . route ( "/" , get ( get_slash ) )
}
# [ main ]
async fn main ( ) {
serve ( "::1:9001" , router ( ) ) . await
}
async fn get_slash ( ) -> Html {
html ! {
<! DOCTYPE html>
<html>
<head>
<title>ryde with rust</title>
</head>
<body>
<div>you are here { url! ( get_slash ) } </div>
</body>
</html>
}
}克隆回购并查看其余的示例!
Ryde的目标是销毁所有样板。您写的每击击球都应该意味着什么。通过普遍使用宏观学科学来定义Axum,Tokio和Sqlite的Web开发DSL来实现此目标。