From 675ce6a8be11d2c2fcbe9ce9c85ca039df940209 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Sun, 5 May 2024 09:47:13 -0500 Subject: [PATCH] Initial commit --- .envrc | 1 + .gitignore | 9 +++++++++ Cargo.lock | 7 +++++++ Cargo.toml | 8 ++++++++ flake.lock | 27 +++++++++++++++++++++++++++ flake.nix | 35 +++++++++++++++++++++++++++++++++++ index.html | 3 +++ src/main.rs | 3 +++ 8 files changed, 93 insertions(+) create mode 100644 .envrc create mode 100644 .gitignore create mode 100644 Cargo.lock create mode 100644 Cargo.toml create mode 100644 flake.lock create mode 100644 flake.nix create mode 100644 index.html create mode 100644 src/main.rs diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..3550a30 --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +use flake diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0484576 --- /dev/null +++ b/.gitignore @@ -0,0 +1,9 @@ +/target +/.direnv + + +# Added by cargo +# +# already existing elements were commented out + +#/target diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 0000000..a2df423 --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "lyrs" +version = "0.1.0" diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..9e6d7f8 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,8 @@ +[package] +name = "lyrs" +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/flake.lock b/flake.lock new file mode 100644 index 0000000..44fcbcc --- /dev/null +++ b/flake.lock @@ -0,0 +1,27 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1714763106, + "narHash": "sha256-DrDHo74uTycfpAF+/qxZAMlP/Cpe04BVioJb6fdI0YY=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "e9be42459999a253a9f92559b1f5b72e1b44c13d", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..be6b512 --- /dev/null +++ b/flake.nix @@ -0,0 +1,35 @@ +{ + inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + outputs = { + self, + nixpkgs, + }: let + inherit (self) outputs; + supportedSystems = [ + "x86_64-linux" + "aarch64-linux" + + "x86_64-darwin" + "aarch64-darwin" + ]; + forEachSupportedSystem = nixpkgs.lib.genAttrs supportedSystems; + in { + devShells = forEachSupportedSystem (system: let + pkgs = import nixpkgs {inherit system;}; + in { + rust-dev = pkgs.mkShell { + buildInputs = with pkgs; [ + cargo + rustc + rustfmt + rustPackages.clippy + rust-analyzer + lldb + pkg-config + ]; + }; + + default = outputs.devShells.${system}.rust-dev; + }); + }; +} diff --git a/index.html b/index.html new file mode 100644 index 0000000..5942abd --- /dev/null +++ b/index.html @@ -0,0 +1,3 @@ +