From a12af938ba991ea5ae45173f1b90363c3a5b958c Mon Sep 17 00:00:00 2001 From: Nickiel12 Date: Fri, 9 Dec 2022 13:34:45 -0800 Subject: [PATCH] First commit --- .gitignore | 5 +++++ Cargo.toml | 15 +++++++++++++++ shell.nix | 20 ++++++++++++++++++++ src/main.rs | 5 +++++ 4 files changed, 45 insertions(+) create mode 100644 Cargo.toml create mode 100644 shell.nix create mode 100644 src/main.rs diff --git a/.gitignore b/.gitignore index 088ba6b..22d3516 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,8 @@ Cargo.lock # These are backup files generated by rustfmt **/*.rs.bk + + +# Added by cargo + +/target diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..8251974 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,15 @@ +[package] +name = "rusted_beats" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +clap = { version = "4.0.29", features = ["derive"] } +confy = "0.5.1" +dirs-next = "2.0.0" +regex = "1.6.0" +serde = { version = "1.0.143", features = ["derive"] } +serde_json = "1.0.83" +rusqlite = {version="0.28.0", features=["bundled"]} diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..498682e --- /dev/null +++ b/shell.nix @@ -0,0 +1,20 @@ +{ 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.latest.rustChannels.stable.default.override { + extensions = [ + "rust-src" + ]; + }); +in +pkgs.mkShell { + buildInputs = with pkgs; [ + ruststable + sqlite + sqliteman + ]; + + RUST_BACKTRACE = 1; +} diff --git a/src/main.rs b/src/main.rs new file mode 100644 index 0000000..d67ebfe --- /dev/null +++ b/src/main.rs @@ -0,0 +1,5 @@ +use clap::Parser; + +fn main() { + println!("Hello, world!"); +}