tangled
alpha
login
or
join now
nove.dev
/
outsider
0
fork
atom
cleanroom implementation of a chess engine. doesn't work :)
0
fork
atom
overview
issues
pulls
pipelines
initial (jujutsu) change
nove.dev
8 months ago
877bd162
+172
7 changed files
expand all
collapse all
unified
split
.envrc
.gitignore
Cargo.lock
Cargo.toml
flake.lock
flake.nix
src
lib.rs
+1
.envrc
···
1
1
+
use flake
+3
.gitignore
···
1
1
+
/target
2
2
+
.direnv
3
3
+
.jj
+7
Cargo.lock
···
1
1
+
# This file is automatically @generated by Cargo.
2
2
+
# It is not intended for manual editing.
3
3
+
version = 4
4
4
+
5
5
+
[[package]]
6
6
+
name = "chessbot"
7
7
+
version = "0.1.0"
+6
Cargo.toml
···
1
1
+
[package]
2
2
+
name = "chessbot"
3
3
+
version = "0.1.0"
4
4
+
edition = "2024"
5
5
+
6
6
+
[dependencies]
+100
flake.lock
···
1
1
+
{
2
2
+
"nodes": {
3
3
+
"fenix": {
4
4
+
"inputs": {
5
5
+
"nixpkgs": [
6
6
+
"nixpkgs"
7
7
+
],
8
8
+
"rust-analyzer-src": "rust-analyzer-src"
9
9
+
},
10
10
+
"locked": {
11
11
+
"lastModified": 1751784058,
12
12
+
"narHash": "sha256-0WteTl/CqlYNEYQZFW76r9Y5/F4qVoX7Z5QIK0pErCM=",
13
13
+
"owner": "nix-community",
14
14
+
"repo": "fenix",
15
15
+
"rev": "632549aad97975cbcdf19d0cf291e5d107208e51",
16
16
+
"type": "github"
17
17
+
},
18
18
+
"original": {
19
19
+
"owner": "nix-community",
20
20
+
"repo": "fenix",
21
21
+
"type": "github"
22
22
+
}
23
23
+
},
24
24
+
"flake-utils": {
25
25
+
"inputs": {
26
26
+
"systems": "systems"
27
27
+
},
28
28
+
"locked": {
29
29
+
"lastModified": 1731533236,
30
30
+
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
31
31
+
"owner": "numtide",
32
32
+
"repo": "flake-utils",
33
33
+
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
34
34
+
"type": "github"
35
35
+
},
36
36
+
"original": {
37
37
+
"owner": "numtide",
38
38
+
"repo": "flake-utils",
39
39
+
"type": "github"
40
40
+
}
41
41
+
},
42
42
+
"nixpkgs": {
43
43
+
"locked": {
44
44
+
"lastModified": 1751741127,
45
45
+
"narHash": "sha256-t75Shs76NgxjZSgvvZZ9qOmz5zuBE8buUaYD28BMTxg=",
46
46
+
"owner": "NixOS",
47
47
+
"repo": "nixpkgs",
48
48
+
"rev": "29e290002bfff26af1db6f64d070698019460302",
49
49
+
"type": "github"
50
50
+
},
51
51
+
"original": {
52
52
+
"owner": "NixOS",
53
53
+
"ref": "nixos-25.05",
54
54
+
"repo": "nixpkgs",
55
55
+
"type": "github"
56
56
+
}
57
57
+
},
58
58
+
"root": {
59
59
+
"inputs": {
60
60
+
"fenix": "fenix",
61
61
+
"flake-utils": "flake-utils",
62
62
+
"nixpkgs": "nixpkgs"
63
63
+
}
64
64
+
},
65
65
+
"rust-analyzer-src": {
66
66
+
"flake": false,
67
67
+
"locked": {
68
68
+
"lastModified": 1751744599,
69
69
+
"narHash": "sha256-amKNucbl2FvRKnyAzkvsxwCJlywA+f1ImF3Myg4SUME=",
70
70
+
"owner": "rust-lang",
71
71
+
"repo": "rust-analyzer",
72
72
+
"rev": "2d518c73d9a9de0dc96d013db7fd98b964f3a7de",
73
73
+
"type": "github"
74
74
+
},
75
75
+
"original": {
76
76
+
"owner": "rust-lang",
77
77
+
"ref": "nightly",
78
78
+
"repo": "rust-analyzer",
79
79
+
"type": "github"
80
80
+
}
81
81
+
},
82
82
+
"systems": {
83
83
+
"locked": {
84
84
+
"lastModified": 1681028828,
85
85
+
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
86
86
+
"owner": "nix-systems",
87
87
+
"repo": "default",
88
88
+
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
89
89
+
"type": "github"
90
90
+
},
91
91
+
"original": {
92
92
+
"owner": "nix-systems",
93
93
+
"repo": "default",
94
94
+
"type": "github"
95
95
+
}
96
96
+
}
97
97
+
},
98
98
+
"root": "root",
99
99
+
"version": 7
100
100
+
}
+41
flake.nix
···
1
1
+
{
2
2
+
inputs = {
3
3
+
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
4
4
+
flake-utils.url = "github:numtide/flake-utils";
5
5
+
fenix = {
6
6
+
url = "github:nix-community/fenix";
7
7
+
inputs.nixpkgs.follows = "nixpkgs";
8
8
+
};
9
9
+
#naersk = {
10
10
+
# url = "github:nix-community/naersk";
11
11
+
# inputs.nixpkgs.follows = "nixpkgs";
12
12
+
#};
13
13
+
};
14
14
+
15
15
+
outputs = { self, flake-utils, fenix, nixpkgs }:
16
16
+
flake-utils.lib.eachDefaultSystem (system:
17
17
+
let
18
18
+
pkgs = (import nixpkgs) {
19
19
+
inherit system;
20
20
+
};
21
21
+
22
22
+
#toolchain = fenix.packages.${system}.stable;
23
23
+
24
24
+
#naersk' = naersk.lib.${system}.override {
25
25
+
# rustc = toolchain.rustc;
26
26
+
# cargo = toolchain.cargo;
27
27
+
#};
28
28
+
29
29
+
in {
30
30
+
# For `nix build` & `nix run`:
31
31
+
#defaultPackage = naersk'.buildPackage {
32
32
+
# src = ./.;
33
33
+
#};
34
34
+
35
35
+
# For `nix develop` (optional, can be skipped):
36
36
+
devShell = pkgs.mkShell {
37
37
+
nativeBuildInputs = [ fenix.packages.${system}.stable.toolchain ];
38
38
+
};
39
39
+
}
40
40
+
);
41
41
+
}
+14
src/lib.rs
···
1
1
+
pub fn add(left: u64, right: u64) -> u64 {
2
2
+
left + right
3
3
+
}
4
4
+
5
5
+
#[cfg(test)]
6
6
+
mod tests {
7
7
+
use super::*;
8
8
+
9
9
+
#[test]
10
10
+
fn it_works() {
11
11
+
let result = add(2, 2);
12
12
+
assert_eq!(result, 4);
13
13
+
}
14
14
+
}