typeway 0.1.0

Type-level web framework for Rust: your API is a type
Documentation
//! Minimal typeway server example.
//!
//! Run: cargo run -p typeway --example hello
//! Test: curl http://127.0.0.1:3000/hello

use typeway::prelude::*;

typeway_path!(type HelloPath = "hello");

type API = (GetEndpoint<HelloPath, String>,);

async fn hello() -> &'static str {
    "Hello from Typeway!"
}

#[tokio::main]
async fn main() {
    Server::<API>::new((bind::<_, _, _>(hello),))
        .serve("127.0.0.1:3000".parse().unwrap())
        .await
        .unwrap();
}