Skip to content

Launching Rocket without codegen #1772

Answered by baptiste0928
bubelov asked this question in Questions
Discussion options

You must be logged in to vote

You can manually launch a Rocket instance with the launch() method :

#[rocket::main]
async fn main() {
    rocket::build()
        .mount("/hello", routes![world])
        .launch()
        .await;
}

More information : https://rocket.rs/v0.5-rc/guide/overview/#launching

Replies: 1 comment 8 replies

Comment options

You must be logged in to vote
8 replies
@bubelov
Comment options

@SergioBenitez
Comment options

@baptiste0928
Comment options

@cmcqueen
Comment options

@the10thWiz
Comment options

Answer selected by bubelov
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
5 participants