From 38d1cbbd509c551db596abbcdadedeb0d354f003 Mon Sep 17 00:00:00 2001 From: Julia Lange Date: Wed, 14 Jan 2026 12:15:07 -0800 Subject: [PATCH] Flake and Rust Project Init --- flake.lock | 27 +++++++++++++++++++++++++++ flake.nix | 33 +++++++++++++++++++++++++++++++++ koucha/.gitignore | 1 + koucha/Cargo.lock | 7 +++++++ koucha/Cargo.toml | 6 ++++++ koucha/src/bin/server.rs | 0 koucha/src/lib.rs | 0 7 files changed, 74 insertions(+) create mode 100644 flake.lock create mode 100644 flake.nix create mode 100644 koucha/.gitignore create mode 100644 koucha/Cargo.lock create mode 100644 koucha/Cargo.toml create mode 100644 koucha/src/bin/server.rs create mode 100644 koucha/src/lib.rs diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..2972d8a --- /dev/null +++ b/flake.lock @@ -0,0 +1,27 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1768127708, + "narHash": "sha256-1Sm77VfZh3mU0F5OqKABNLWxOuDeHIlcFjsXeeiPazs=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "ffbc9f8cbaacfb331b6017d5a5abb21a492c9a38", + "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..c3fa77f --- /dev/null +++ b/flake.nix @@ -0,0 +1,33 @@ +{ + description = "Koucha rust flake"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + }; + + outputs = { self, nixpkgs }: + let + forAllSystems = + function: + nixpkgs.lib.genAttrs nixpkgs.lib.systems.flakeExposed ( + system: function ( + import nixpkgs { + inherit system; + } + ) + ); + in + { + devShells = forAllSystems (pkgs: { + default = pkgs.mkShell { + buildInputs = with pkgs; [ + rustc + cargo + rust-analyzer + ]; + + RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}"; + }; + }); + }; +} diff --git a/koucha/.gitignore b/koucha/.gitignore new file mode 100644 index 0000000..ea8c4bf --- /dev/null +++ b/koucha/.gitignore @@ -0,0 +1 @@ +/target diff --git a/koucha/Cargo.lock b/koucha/Cargo.lock new file mode 100644 index 0000000..476c80f --- /dev/null +++ b/koucha/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "koucha" +version = "0.1.0" diff --git a/koucha/Cargo.toml b/koucha/Cargo.toml new file mode 100644 index 0000000..b58c658 --- /dev/null +++ b/koucha/Cargo.toml @@ -0,0 +1,6 @@ +[package] +name = "koucha" +version = "0.1.0" +edition = "2024" + +[dependencies] diff --git a/koucha/src/bin/server.rs b/koucha/src/bin/server.rs new file mode 100644 index 0000000..e69de29 diff --git a/koucha/src/lib.rs b/koucha/src/lib.rs new file mode 100644 index 0000000..e69de29