ryde
jsx my life up
rydeは錆のための一人の、単一のファイルWebフレームワークです
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を定義するために、マクロ学の科学を広範に使用することで達成されます。