Configure rocket.rs project
This commit is contained in:
parent
9b386cd7b0
commit
234458e11c
5 changed files with 1491 additions and 2 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -3,3 +3,6 @@
|
||||||
|
|
||||||
# Ignore challenge data files
|
# Ignore challenge data files
|
||||||
/data/
|
/data/
|
||||||
|
|
||||||
|
# Added by cargo
|
||||||
|
/target
|
||||||
|
|
1466
Cargo.lock
generated
Normal file
1466
Cargo.lock
generated
Normal file
File diff suppressed because it is too large
Load diff
9
Cargo.toml
Normal file
9
Cargo.toml
Normal file
|
@ -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
|
let
|
||||||
rust_overlay = import (builtins.fetchTarball "https://github.com/oxalica/rust-overlay/archive/master.tar.gz");
|
rust_overlay = import (builtins.fetchTarball "https://github.com/oxalica/rust-overlay/archive/master.tar.gz");
|
||||||
pkgs = import <nixpkgs> { overlays = [ rust_overlay ]; };
|
pkgs = import <nixpkgs> { overlays = [ rust_overlay ]; };
|
||||||
ruststable = (pkgs.rust-bin.stable.latest.default.override {
|
rustnightly = (pkgs.rust-bin.nightly.latest.default.override {
|
||||||
extensions = [
|
extensions = [
|
||||||
"rust-src"
|
"rust-src"
|
||||||
];
|
];
|
||||||
|
@ -12,7 +12,7 @@ let
|
||||||
in
|
in
|
||||||
pkgs.mkShell {
|
pkgs.mkShell {
|
||||||
buildInputs = with pkgs; [
|
buildInputs = with pkgs; [
|
||||||
ruststable
|
rustnightly
|
||||||
rust-analyzer
|
rust-analyzer
|
||||||
bacon
|
bacon
|
||||||
#pkg-config
|
#pkg-config
|
||||||
|
|
11
src/main.rs
Normal file
11
src/main.rs
Normal file
|
@ -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…
Add table
Reference in a new issue