fix rust template

This commit is contained in:
Jonas Röger 2025-03-16 18:24:13 +01:00
parent e2c38ef18e
commit ba364b8195
Signed by: jonas
GPG Key ID: 4000EB35E1AE0F07
4 changed files with 8 additions and 15 deletions

View File

@ -1,6 +1,6 @@
[package]
name = "RustBinary"
description = "A rust binary"
name = "hello"
description = "A test rust binary"
publish = false
version = "0.1.0"

View File

@ -1,8 +1,8 @@
{
description = "Rust-Nix";
description = "Rust-Hello";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/unstable";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs.nixpkgs.follows = "nixpkgs";
@ -32,7 +32,7 @@
# Use rust-bin to generate the toolchain from rust-toolchain.toml
rust-toolchain = pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml;
buildRustCrateForPkgs = pkgs:
buildRustCrateForPkgs = _:
pkgs.buildRustCrate.override {
rustc = rust-toolchain; # Use rustc from toolchain
cargo = rust-toolchain; # Use cargo from toolchain
@ -52,6 +52,7 @@
hello = cargoNix.rootCrate.build;
default = hello;
};
devShell = pkgs.mkShell {
buildInputs = [rust-toolchain];
};

View File

@ -1,3 +1,3 @@
[toolchain]
channel = "1.80.1"
channel = "1.85.0"
components = [ "rustfmt", "rustc-dev", "rust-analyzer", "rust-src"]

View File

@ -1,11 +1,3 @@
use colored::*;
fn main() {
println!("{}", "Hello, world!".red());
println!("{}", "Hello, world!".green());
println!("{}", "Hello, world!".yellow());
println!("{}", "Hello, world!".blue());
println!("{}", "Hello, world!".purple());
println!("{}", "Hello, world!".cyan());
println!("{}", "Hello, world!".white());
println!("{}", "Hello, world!");
}