ryde
jsx my life up
Ryde는 한 사람, Rust 용 단일 파일 웹 프레임 워크입니다.
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 위에 웹 개발 DSL을 정의하기 위해 거시적학 과학의 광범위한 사용을 통해 달성됩니다.