We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5d1c746 commit a45aa9fCopy full SHA for a45aa9f
Cargo.toml
@@ -15,3 +15,20 @@ features = ["color"]
15
16
[profile.release]
17
lto = true
18
+
19
+# Web
20
+[dependencies.rocket]
21
+version = "^0.2.6"
22
+optional = true
23
24
+[dependencies.rocket_codegen]
25
26
27
28
+[features]
29
+web = ["rocket", "rocket_codegen"]
30
31
+[[bin]]
32
+name = "web"
33
+path = "src/bin/web.rs"
34
+required-features = ["web"]
src/bin/web.rs
@@ -0,0 +1,13 @@
1
+#![feature(plugin)]
2
+#![plugin(rocket_codegen)]
3
4
+extern crate rocket;
5
6
+#[get("/")]
7
+fn index() -> &'static str {
8
+ "Hello world!"
9
+}
10
11
+fn main() {
12
+ rocket::ignite().mount("/", routes![index]).launch();
13
0 commit comments