ProductPromotion
Logo

Rust

made by https://0x3d.site

GitHub - rwf2/Rocket: A web framework for Rust.
A web framework for Rust. Contribute to rwf2/Rocket development by creating an account on GitHub.
Visit Site

GitHub - rwf2/Rocket: A web framework for Rust.

GitHub - rwf2/Rocket: A web framework for Rust.

Rocket

Build Status Rocket Homepage Current Crates.io Version Matrix: #rocket:mozilla.org

Rocket is an async web framework for Rust with a focus on usability, security, extensibility, and speed.

#[macro_use] extern crate rocket;

#[get("/<name>/<age>")]
fn hello(name: &str, age: u8) -> String {
    format!("Hello, {} year old named {}!", age, name)
}

#[launch]
fn rocket() -> _ {
    rocket::build().mount("/hello", routes![hello])
}

Visiting localhost:8000/hello/John/58, for example, will trigger the hello route resulting in the string Hello, 58 year old named John! being sent to the browser. If an <age> string was passed in that can't be parsed as a u8, the route won't get called, resulting in a 404 error.

Documentation

Rocket is extensively documented:

Documentation for the master branch is available at https://rocket.rs/master and https://api.rocket.rs/master.

Documentation for major release version ${x} is available at https://[api.]rocket.rs/v${x}. For example, the v0.4 docs are available at https://rocket.rs/v0.4 and https://api.rocket.rs/v0.4.

Finally, API docs for active git branches are available at https://api.rocket.rs/${branch}. For example, API docs for the master branch are available at https://api.rocket.rs/master. Branch rustdocs are built and deployed on every commit.

Examples

The examples directory contains complete crates that showcase Rocket's features and usage. Each example can be compiled and run with Cargo. For instance, the following sequence of commands builds and runs the hello example:

cd examples/hello
cargo run

Getting Help

If you find yourself needing help outside of the documentation, you may:

Contributing

Contributions are absolutely, positively welcomed and encouraged! If you're interested in contributing code, please first read CONTRIBUTING for complete guidelines. Additionally, you could:

  1. Submit a feature request or bug report as an issue.
  2. Ask for improved documentation as an issue.
  3. Comment on issues that require feedback.
  4. Answers questions in GitHub discussions questions.
  5. Share a project in GitHub discussions show & tell.

License

Rocket is licensed under either of the following, at your option:

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in Rocket by you shall be dual licensed under the MIT License and Apache License, Version 2.0, without any additional terms or conditions.

The Rocket website docs are licensed under separate terms. Any contribution intentionally submitted for inclusion in the Rocket website docs by you shall be licensed under those terms.

More Resources
to explore the angular.

mail [email protected] to add your project or resources here 🔥.

Related Articles
to learn about angular.

FAQ's
to learn more about Angular JS.

mail [email protected] to add more queries here 🔍.

More Sites
to check out once you're finished browsing here.

0x3d
https://www.0x3d.site/
0x3d is designed for aggregating information.
NodeJS
https://nodejs.0x3d.site/
NodeJS Online Directory
Cross Platform
https://cross-platform.0x3d.site/
Cross Platform Online Directory
Open Source
https://open-source.0x3d.site/
Open Source Online Directory
Analytics
https://analytics.0x3d.site/
Analytics Online Directory
JavaScript
https://javascript.0x3d.site/
JavaScript Online Directory
GoLang
https://golang.0x3d.site/
GoLang Online Directory
Python
https://python.0x3d.site/
Python Online Directory
Swift
https://swift.0x3d.site/
Swift Online Directory
Rust
https://rust.0x3d.site/
Rust Online Directory
Scala
https://scala.0x3d.site/
Scala Online Directory
Ruby
https://ruby.0x3d.site/
Ruby Online Directory
Clojure
https://clojure.0x3d.site/
Clojure Online Directory
Elixir
https://elixir.0x3d.site/
Elixir Online Directory
Elm
https://elm.0x3d.site/
Elm Online Directory
Lua
https://lua.0x3d.site/
Lua Online Directory
C Programming
https://c-programming.0x3d.site/
C Programming Online Directory
C++ Programming
https://cpp-programming.0x3d.site/
C++ Programming Online Directory
R Programming
https://r-programming.0x3d.site/
R Programming Online Directory
Perl
https://perl.0x3d.site/
Perl Online Directory
Java
https://java.0x3d.site/
Java Online Directory
Kotlin
https://kotlin.0x3d.site/
Kotlin Online Directory
PHP
https://php.0x3d.site/
PHP Online Directory
React JS
https://react.0x3d.site/
React JS Online Directory
Angular
https://angular.0x3d.site/
Angular JS Online Directory