Rust
use suprnova::{handler, inertia_response, InertiaProps, Request, Response}; #[derive(InertiaProps)] pub struct DashboardProps { pub title: String, pub user: UserDto, } #[derive(InertiaProps)] pub struct UserDto { pub name: String, pub email: String, } #[handler] pub async fn dashboard(req: Request) -> Response { inertia_response!( &req, "Dashboard", DashboardProps { title: "Welcome!".into(), user: UserDto { name: "Ada".into(), email: "ada@example.com".into(), }, } ) }
commit 33f9b71
Looks like we don't have syntax highlighting for Rust yet, wanna give it a shot? https://github.com/tempestphp/highlight/
GitHubGitHub - tempestphp/highlight: Fast, extensible, server-side code highlighting for web and terminalFast, extensible, server-side code highlighting for web and terminal - tempestphp/highlight