commit 46a69826aceb4dd05b2826d81bac484799bb64b7 Author: andromeda Date: Tue Apr 14 21:51:19 2026 +0200 init diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8ea0ee8 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/target +result* diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 0000000..86f024f --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "anki-cli" +version = "0.1.0" diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..c6d55f2 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,6 @@ +[package] +name = "anki-cli" +version = "0.1.0" +edition = "2024" + +[dependencies] diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..1546c3b --- /dev/null +++ b/flake.lock @@ -0,0 +1,127 @@ +{ + "nodes": { + "fenix": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ], + "rust-analyzer-src": "rust-analyzer-src" + }, + "locked": { + "lastModified": 1776153734, + "narHash": "sha256-QvkVX4Go+BnNgQQLc5Ma3WNBZOG5Jpdqsy8Ri0/CbSQ=", + "owner": "nix-community", + "repo": "fenix", + "rev": "a8b0e62fb39299fbeb1aa365f4b57e2c258a178e", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "fenix", + "type": "github" + } + }, + "fenix_2": { + "inputs": { + "nixpkgs": [ + "naersk", + "nixpkgs" + ], + "rust-analyzer-src": "rust-analyzer-src_2" + }, + "locked": { + "lastModified": 1752475459, + "narHash": "sha256-z6QEu4ZFuHiqdOPbYss4/Q8B0BFhacR8ts6jO/F/aOU=", + "owner": "nix-community", + "repo": "fenix", + "rev": "bf0d6f70f4c9a9cf8845f992105652173f4b617f", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "fenix", + "type": "github" + } + }, + "naersk": { + "inputs": { + "fenix": "fenix_2", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1776193198, + "narHash": "sha256-U4w4GpgYt72z8pBKMDaqzlnPJRxI9pn+8tr7SOAxocE=", + "owner": "nix-community", + "repo": "naersk", + "rev": "e4e2ee6c9af67ecd4abb102fc32b9e49c70d92ff", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "naersk", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1775888245, + "narHash": "sha256-nwASzrRDD1JBEu/o8ekKYEXm/oJW6EMCzCRdrwcLe90=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "13043924aaa7375ce482ebe2494338e058282925", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "fenix": "fenix", + "naersk": "naersk", + "nixpkgs": "nixpkgs" + } + }, + "rust-analyzer-src": { + "flake": false, + "locked": { + "lastModified": 1776115521, + "narHash": "sha256-N/R1//Xd8vr84LtyTy8CVz7V2n9NJXXlJEODSunLE9c=", + "owner": "rust-lang", + "repo": "rust-analyzer", + "rev": "5205b52ea60dd49c7e33dd2ad1a3e7ef55bb30ec", + "type": "github" + }, + "original": { + "owner": "rust-lang", + "ref": "nightly", + "repo": "rust-analyzer", + "type": "github" + } + }, + "rust-analyzer-src_2": { + "flake": false, + "locked": { + "lastModified": 1752428706, + "narHash": "sha256-EJcdxw3aXfP8Ex1Nm3s0awyH9egQvB2Gu+QEnJn2Sfg=", + "owner": "rust-lang", + "repo": "rust-analyzer", + "rev": "591e3b7624be97e4443ea7b5542c191311aa141d", + "type": "github" + }, + "original": { + "owner": "rust-lang", + "ref": "nightly", + "repo": "rust-analyzer", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..8106847 --- /dev/null +++ b/flake.nix @@ -0,0 +1,36 @@ +{ + inputs = { + nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; + fenix = { + inputs.nixpkgs.follows = "nixpkgs"; + url = "github:nix-community/fenix"; + }; + naersk = { + inputs.nixpkgs.follows = "nixpkgs"; + url = "github:nix-community/naersk"; + }; + }; + outputs = { + nixpkgs, + naersk, + fenix, + ... + }: let + pkgs = nixpkgs.legacyPackages.x86_64-linux; + toolchain = fenix.packages.x86_64-linux.minimal.toolchain; + in { + devShells.x86_64-linux.default = pkgs.mkShell { + buildInputs = [toolchain]; + shellHook = '' + export RUSTUP_TOOLCHAIN=${toolchain} + ''; + }; + packages.x86_64-linux.default = + (naersk.lib.x86_64-linux.override { + cargo = toolchain; + rustc = toolchain; + }).buildPackage { + src = ./.; + }; + }; +} diff --git a/src/main.rs b/src/main.rs new file mode 100644 index 0000000..e7a11a9 --- /dev/null +++ b/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("Hello, world!"); +}