about summary refs log tree commit diff
path: root/templates/rust
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2023-12-15 08:13:26 -0800
committerFranck Cuny <franck@fcuny.net>2023-12-15 08:13:26 -0800
commit9f2310ed32e30a99fd32086d1b9a8bda5ca4af22 (patch)
treeec1fe8d61de235055edfbb20bd0a3a76effccdfd /templates/rust
parentformat yaml (diff)
downloadworld-9f2310ed32e30a99fd32086d1b9a8bda5ca4af22.tar.gz
remove rust template, add GHA to go template
Diffstat (limited to 'templates/rust')
-rw-r--r--templates/rust/.envrc1
-rw-r--r--templates/rust/LICENSE20
-rw-r--r--templates/rust/deny.toml44
-rw-r--r--templates/rust/flake.nix102
-rw-r--r--templates/rust/rust-toolchain.toml3
-rw-r--r--templates/rust/rustfmt.toml1
6 files changed, 0 insertions, 171 deletions
diff --git a/templates/rust/.envrc b/templates/rust/.envrc
deleted file mode 100644
index a5dbbcb..0000000
--- a/templates/rust/.envrc
+++ /dev/null
@@ -1 +0,0 @@
-use flake .
diff --git a/templates/rust/LICENSE b/templates/rust/LICENSE
deleted file mode 100644
index ac375e1..0000000
--- a/templates/rust/LICENSE
+++ /dev/null
@@ -1,20 +0,0 @@
-Copyright (c) 2022 Franck Cuny
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/templates/rust/deny.toml b/templates/rust/deny.toml
deleted file mode 100644
index acefd37..0000000
--- a/templates/rust/deny.toml
+++ /dev/null
@@ -1,44 +0,0 @@
-[advisories]
-db-path = "~/.cargo/advisory-db"
-db-urls = ["https://github.com/rustsec/advisory-db"]
-vulnerability = "deny"
-unmaintained = "warn"
-yanked = "warn"
-notice = "warn"
-ignore = []
-
-[licenses]
-unlicensed = "deny"
-allow = ["MIT", "Apache-2.0", "ISC", "Unicode-DFS-2016", "OpenSSL"]
-deny = []
-copyleft = "allow"
-default = "deny"
-confidence-threshold = 0.8
-exceptions = []
-
-[licenses.private]
-ignore = false
-registries = []
-
-# see https://embarkstudios.github.io/cargo-deny/checks/licenses/cfg.html#example
-[[licenses.clarify]]
-name = "ring"
-expression = "MIT AND ISC AND OpenSSL"
-license-files = [{ path = "LICENSE", hash = 0xbd0eed23 }]
-
-[bans]
-multiple-versions = "warn"
-wildcards = "allow"
-highlight = "all"
-allow = []
-deny = []
-skip = []
-skip-tree = []
-
-[sources]
-unknown-registry = "warn"
-unknown-git = "warn"
-allow-registry = ["https://github.com/rust-lang/crates.io-index"]
-allow-git = []
-
-[sources.allow-org]
diff --git a/templates/rust/flake.nix b/templates/rust/flake.nix
deleted file mode 100644
index fdce743..0000000
--- a/templates/rust/flake.nix
+++ /dev/null
@@ -1,102 +0,0 @@
-{
-  description = "A CLI to manage public SSH keys for GitHub.";
-
-  inputs = {
-    flake-utils.url = "github:numtide/flake-utils";
-    nixpkgs.url = "github:NixOS/nixpkgs";
-    rust-overlay = {
-      url = "github:oxalica/rust-overlay";
-      inputs = {
-        flake-utils.follows = "flake-utils";
-        nixpkgs.follows = "nixpkgs";
-      };
-    };
-    crane = {
-      url = "github:ipetkov/crane";
-      inputs.nixpkgs.follows = "nixpkgs";
-    };
-    pre-commit-hooks = {
-      url = "github:cachix/pre-commit-hooks.nix";
-      inputs = {
-        flake-utils.follows = "flake-utils";
-        nixpkgs.follows = "nixpkgs";
-      };
-    };
-  };
-
-  outputs =
-    { self
-    , flake-utils
-    , nixpkgs
-    , rust-overlay
-    , crane
-    , pre-commit-hooks
-    }:
-
-    flake-utils.lib.eachDefaultSystem
-      (system:
-      let
-        pkgs = import nixpkgs {
-          inherit system;
-          overlays = [ (import rust-overlay) ];
-        };
-        rust-toolchain = pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml;
-
-        craneLib = (crane.mkLib pkgs).overrideScope' (_: _: {
-          cargo = rust-toolchain;
-          clippy = rust-toolchain;
-          rustc = rust-toolchain;
-          rustfmt = rust-toolchain;
-        });
-
-        src = ./.;
-
-        cargoArtifacts = craneLib.buildDepsOnly {
-          inherit src;
-        };
-
-        my-crate = craneLib.buildPackage {
-          inherit cargoArtifacts src;
-        };
-      in
-      {
-        packages.default = my-crate;
-        apps.default = flake-utils.lib.mkApp {
-          drv = my-crate;
-        };
-
-        checks = {
-          pre-commit = pre-commit-hooks.lib.${system}.run {
-            inherit src;
-            hooks = {
-              clippy = {
-                enable = true;
-                entry = pkgs.lib.mkForce "cargo clippy -- -D warnings";
-              };
-              nixpkgs-fmt = {
-                enable = true;
-              };
-              rustfmt = {
-                enable = true;
-                entry = pkgs.lib.mkForce "cargo fmt -- --check --color always";
-              };
-            };
-          };
-        };
-
-        devShell = pkgs.mkShell {
-          nativeBuildInputs = with pkgs; [
-            rust-toolchain
-            cargo-deny
-            rust-analyzer
-          ];
-
-          inherit (self.checks.${system}.pre-commit) shellHook;
-        };
-      })
-    // {
-      overlay = final: prev: {
-        XXX = self.defaultPackage.${prev.system};
-      };
-    };
-}
diff --git a/templates/rust/rust-toolchain.toml b/templates/rust/rust-toolchain.toml
deleted file mode 100644
index cc8f987..0000000
--- a/templates/rust/rust-toolchain.toml
+++ /dev/null
@@ -1,3 +0,0 @@
-[toolchain]
-channel = "1.64.0"
-components = ["rustfmt", "clippy"]
diff --git a/templates/rust/rustfmt.toml b/templates/rust/rustfmt.toml
deleted file mode 100644
index 3a26366..0000000
--- a/templates/rust/rustfmt.toml
+++ /dev/null
@@ -1 +0,0 @@
-edition = "2021"