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來實現此目標。