Configure rocket.rs project

rust
Elnu 2 years ago
parent 9b386cd7b0
commit 234458e11c

3
.gitignore vendored

@ -3,3 +3,6 @@
# Ignore challenge data files
/data/
# Added by cargo
/target

1466
Cargo.lock generated

File diff suppressed because it is too large Load Diff

@ -0,0 +1,9 @@
[package]
name = "tegakituesday"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
rocket = "=0.5.0-rc.3"

@ -4,7 +4,7 @@
let
rust_overlay = import (builtins.fetchTarball "https://github.com/oxalica/rust-overlay/archive/master.tar.gz");
pkgs = import <nixpkgs> { overlays = [ rust_overlay ]; };
ruststable = (pkgs.rust-bin.stable.latest.default.override {
rustnightly = (pkgs.rust-bin.nightly.latest.default.override {
extensions = [
"rust-src"
];
@ -12,7 +12,7 @@ let
in
pkgs.mkShell {
buildInputs = with pkgs; [
ruststable
rustnightly
rust-analyzer
bacon
#pkg-config

@ -0,0 +1,11 @@
#[macro_use] extern crate rocket;
#[get("/")]
fn index() -> &'static str {
"Hello, world!"
}
#[launch]
fn rocket() -> _ {
rocket::build().mount("/", routes![index])
}
Loading…
Cancel
Save