From af89a99a52d70cf5dd6babe2fed00dc9cc02b883 Mon Sep 17 00:00:00 2001 From: Elnu Date: Fri, 19 May 2023 11:43:17 -0700 Subject: [PATCH] Initial commit --- .envrc | 1 + .gitignore | 1 + Cargo.toml | 8 ++++++++ shell.nix | 21 +++++++++++++++++++++ src/main.rs | 3 +++ 5 files changed, 34 insertions(+) create mode 100644 .envrc create mode 100644 .gitignore create mode 100644 Cargo.toml create mode 100644 shell.nix create mode 100644 src/main.rs diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..1d953f4 --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +use nix diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ea8c4bf --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/target diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..d31d346 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,8 @@ +[package] +name = "" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..bd75433 --- /dev/null +++ b/shell.nix @@ -0,0 +1,21 @@ +# +{ pkgs ? import {}}: + +let + rust_overlay = import (builtins.fetchTarball "https://github.com/oxalica/rust-overlay/archive/master.tar.gz"); + pkgs = import { overlays = [ rust_overlay ]; }; + ruststable = (pkgs.rust-bin.stable.latest.default.override { + extensions = [ + "rust-src" + ]; + }); +in +pkgs.mkShell { + buildInputs = with pkgs; [ + ruststable + rust-analyzer + bacon + #pkg-config + #openssl + ]; +} diff --git a/src/main.rs b/src/main.rs new file mode 100644 index 0000000..e7a11a9 --- /dev/null +++ b/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("Hello, world!"); +}