chiark / gitweb /
copy example from Rocket
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 16 May 2020 23:37:15 +0000 (00:37 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 16 May 2020 23:37:15 +0000 (00:37 +0100)
.dir-locals.el [new file with mode: 0644]
src/main.rs

diff --git a/.dir-locals.el b/.dir-locals.el
new file mode 100644 (file)
index 0000000..8d31cb3
--- /dev/null
@@ -0,0 +1,3 @@
+((rust-mode . ((rust-indent-offset . 2)))
+ (css-mode . ((css-indent-offset . 2)))
+ (js-mode . ((js-indent-level . 2))))
index e4360c1df69ec8d151a6fe6bb34b35bf0252b27a..04731de2f845ec8557b34a76a9f64d97ad4a24ba 100644 (file)
@@ -1 +1,13 @@
-fn main(){ }
+
+#![feature(proc_macro_hygiene, decl_macro)]
+
+#[macro_use] extern crate rocket;
+
+#[get("/t")]
+fn index() -> &'static str {
+  "Hello, world!"
+}
+
+fn main() {
+  rocket::ignite().mount("/", routes![index]).launch();
+}