Poem 0.8 released!

Poem is a full-featured and easy-to-use web framework with the Rust programming language.


  • Both Ease of use and performance.
  • Minimizing the use of generics.
  • Blazing fast and flexible routing.
  • tower::Service and tower::Layer compatibility.
  • Use Poem-openapi to write APIs that comply with OAS3 specifications and automatically generate documents.

Basic example

use poem::{handler, listener::TcpListener, route, route::get, web::Path, Server};

fn hello(Path(name): Path<String>) -> String {
    format!("hello: {}", name)

async fn main() -> Result<(), std::io::Error> {
    let app = route().at("/hello/:name", get(hello));
    let listener = TcpListener::bind("");
    let server = Server::new(listener).await?;

OpenAPI example

use poem::{listener::TcpListener, route};
use poem_openapi::{payload::PlainText, OpenApi, OpenApiService};

struct Api;

impl Api {
    #[oai(path = "/hello", method = "get")]
    async fn index(
        #[oai(name = "name", in = "query")] name: Option<String>,
    ) -> PlainText<String> {
        match name {
            Some(name) => PlainText(format!("hello, {}!", name)),
            None => PlainText("hello!".to_string()),

async fn main() -> Result<(), std::io::Error> {
    let listener = TcpListener::bind("");
    let api_service = OpenApiService::new(Api)
        .title("Hello World")
    let ui = api_service.swagger_ui("http://localhost:3000");

        .run(route().nest("/api", api_service).nest("/", ui))
1 Like

Looks fairly powerful - how does it compare in terms of performance to Rocket / Actix, though?

Also, what made you write your own framework when those two already exist?

Poem is easy to use, and routing is powerful and flexible. It is based on hyper so the performance is quite good (the advantage is more obvious when there are many routes).

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.