Project setup

This commit is contained in:
maxstrb 2025-11-26 11:40:20 +01:00
commit 9944db3d2b
6 changed files with 89 additions and 0 deletions

1
.envrc Normal file
View file

@ -0,0 +1 @@
use flake

3
.gitignore vendored Normal file
View file

@ -0,0 +1,3 @@
target
.direnv

6
Cargo.toml Normal file
View file

@ -0,0 +1,6 @@
[package]
name = "floating-calculator"
version = "0.1.0"
edition = "2024"
[dependencies]

48
flake.lock generated Normal file
View file

@ -0,0 +1,48 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1763966396,
"narHash": "sha256-6eeL1YPcY1MV3DDStIDIdy/zZCDKgHdkCmsrLJFiZf0=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "5ae3b07d8d6527c42f17c876e404993199144b6a",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs",
"rust-overlay": "rust-overlay"
}
},
"rust-overlay": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1764124769,
"narHash": "sha256-vcoOEy3i8AGJi3Y2C48hrf6CuL2h8W1gLe1gNt72Kxg=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "5da8c00313b4434f00aed6b4c94cd3b207bafdc5",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

28
flake.nix Normal file
View file

@ -0,0 +1,28 @@
{
description = "My rust development shell";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = {nixpkgs, ...} @ inputs: let
system = "x86_64-linux";
overlays = [(import inputs.rust-overlay)];
pkgs = import nixpkgs {
inherit system overlays;
};
in {
devShells."${system}" = {
default = pkgs.mkShell {
buildInputs = with pkgs; [
gcc
gnumake
rust-bin.stable.latest.default
evcxr
];
};
};
};
}

3
src/main.rs Normal file
View file

@ -0,0 +1,3 @@
fn main() {
println!("Hello, world!");
}