Initial commit

This commit is contained in:
2026-08-28 14:48:27 -05:00
parent f2da6969e6
commit 45605478f8
22 changed files with 276 additions and 0 deletions
+1
View File
@@ -0,0 +1 @@
flake-profile-2-link
+1
View File
@@ -0,0 +1 @@
/nix/store/nzs5pmy9n7c63z9bi62rl9qzkz7xbdpb-nix-shell-env
+9
View File
@@ -0,0 +1,9 @@
# EditorConfig for Rust template
root = false
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 2
trim_trailing_whitespace = true
+2
View File
@@ -0,0 +1,2 @@
# Direnv configuration for Nix flakes
use flake
+6
View File
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="uk.co.ben_gibson.git.link.SettingsState">
<option name="host" value="e0f86390-1091-4871-8aeb-f534fbc99cf0" />
</component>
</project>
+12
View File
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="EMPTY_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/tests" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/target" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
+13
View File
@@ -0,0 +1,13 @@
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="PyUnresolvedReferencesInspection" enabled="true" level="WARNING" enabled_by_default="true">
<option name="ignoredIdentifiers">
<list>
<option value="neopixel" />
<option value="board" />
</list>
</option>
</inspection_tool>
</profile>
</component>
+8
View File
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/game-kt.iml" filepath="$PROJECT_DIR$/.idea/game-kt.iml" />
</modules>
</component>
</project>
Generated
+6
View File
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>
+8
View File
@@ -0,0 +1,8 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
+9
View File
@@ -0,0 +1,9 @@
# Contributing
Thank you for considering contributing!
- Please follow the project coding style and directory structure.
- Submit issues or pull requests for bugs, features, or improvements.
- Add tests for new features where possible.
- Ensure your code builds and passes tests before submitting.
- Contributions are licensed under CC BY-SA 4.0.
Generated
+7
View File
@@ -0,0 +1,7 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 4
[[package]]
name = "game_kt"
version = "0.0.1"
+17
View File
@@ -0,0 +1,17 @@
Creative Commons Attribution-ShareAlike 4.0 International
<https://creativecommons.org/licenses/by-sa/4.0/>
You are free to:
- Share — copy and redistribute the material in any medium or format
- Adapt — remix, transform, and build upon the material for any purpose, even commercially.
Under the following terms:
- Attribution — You must give appropriate credit, provide a link to the license, and indicate if changes were made.
- ShareAlike — If you remix, transform, or build upon the material, you must distribute your contributions under the same license as the original.
No additional restrictions — You may not apply legal terms or technological measures that legally restrict others from doing anything the license permits.
See the full license at the link above.
+19
View File
@@ -0,0 +1,19 @@
build:
cargo build
run:
cargo run
test:
cargo test
clean:
cargo clean
.PHONY: build run test clean
# Flatpak build target
.PHONY: flatpak-build
flatpak-build:
flatpak-builder --force-clean build-flatpak flatpak/app.flatpak.json
+16
View File
@@ -0,0 +1,16 @@
# Coding Agent Instructions
This project is intended for educational purposes. To support this, please adhere to the following guidelines:
## Allowed Actions
- **Environment Maintenance:** Feel free to update Nix flakes, shell configurations, or other environment-related setup.
- **Project Housekeeping:** Maintain a standard project layout, keep `README.md` up-to-date, and clean up temporary or build-related files.
- **Documentation:** Add comments, manage project documentation, and add links to relevant external resources.
## Restricted Actions
- **Source Code Editing:** You are NOT allowed to edit the executable source code (`src/` directory) except to improve documentation..
- **Code Generation:** Do not provide example code unless explicitly asked by the user.
## Communication Guidelines
- **Educational Focus:** When asked about code, prioritize explaining the concepts and providing advice over writing code.
- **Documentation Links:** Always include links to official language or library documentation for references.
+29
View File
@@ -0,0 +1,29 @@
{ pkgs }:
let
lib = pkgs.lib;
templateName = builtins.baseNameOf (toString ./.);
in
{
${templateName} = pkgs.stdenvNoCC.mkDerivation {
pname = templateName;
version = "0.1.0";
src = ./.;
dontBuild = true;
installPhase = ''
mkdir -p $out/share/${templateName}
if [ -d src ]; then
cp -r src $out/share/${templateName}/
fi
for f in README.md project.toml flake.nix default.nix shell.nix Makefile .editorconfig .gitignore; do
if [ -f "$f" ]; then
cp "$f" $out/share/${templateName}/
fi
done
'';
meta = with lib; {
description = "Template project: ${templateName}";
license = licenses.unfreeRedistributable;
platforms = platforms.all;
};
};
}
Generated
+66
View File
@@ -0,0 +1,66 @@
{
"nodes": {
"fenix": {
"inputs": {
"nixpkgs": [
"nixpkgs"
],
"rust-analyzer-src": "rust-analyzer-src"
},
"locked": {
"lastModified": 1787941560,
"narHash": "sha256-dMvXIG1IrbpolQY6+4u5lxqtPPQWVVNPGwSh9Vy6fIA=",
"owner": "nix-community",
"repo": "fenix",
"rev": "2810303efc016eb3dcf9d3176c65ac732409fdbf",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "fenix",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1787736819,
"narHash": "sha256-cV5xEJJK3BvhU8rEd4mC9UsmDi5qscv/kzGPhBRC5WA=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "9fbb54b33e91ee4ca368e35a78e0613c720600b3",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"fenix": "fenix",
"nixpkgs": "nixpkgs"
}
},
"rust-analyzer-src": {
"flake": false,
"locked": {
"lastModified": 1787768781,
"narHash": "sha256-PMVtb917DTWjGLTQHHI+ATUguk7Wxuqu6J+DINiU+qI=",
"owner": "rust-lang",
"repo": "rust-analyzer",
"rev": "70d74f4d134c45b073c82167fb7e7d61334bd8f5",
"type": "github"
},
"original": {
"owner": "rust-lang",
"ref": "nightly",
"repo": "rust-analyzer",
"type": "github"
}
}
},
"root": "root",
"version": 7
}
+22
View File
@@ -0,0 +1,22 @@
{
"app-id": "org.example.rustdevshell",
"runtime": "org.freedesktop.Platform",
"runtime-version": "23.08",
"sdk": "org.freedesktop.Sdk",
"command": "rustdevshell-app",
"modules": [
{
"name": "rustdevshell-app",
"buildsystem": "simple",
"build-commands": [
"cargo build --release"
],
"sources": [
{
"type": "dir",
"path": ".."
}
]
}
]
}
+6
View File
@@ -0,0 +1,6 @@
[project]
name = "rust-template"
description = "A reusable Nix flake template for Rust development."
version = "0.1.0"
authors = ["gooba42 <your@email>"]
license = "MIT"
+15
View File
@@ -0,0 +1,15 @@
{
pkgs ? import <nixpkgs> { },
}:
pkgs.mkShell {
buildInputs = [
pkgs.rustc
pkgs.cargo
pkgs.rustfmt
pkgs.clippy
pkgs.rust-analyzer
];
shellHook = ''
echo "[shell.nix] Legacy shell for Rust dev. Use 'nix develop' for full flake support."
'';
}
View File
+4
View File
@@ -0,0 +1,4 @@
#[test]
fn test_sample() {
assert_eq!(1, 1);
}