rust-chess 0.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- rust_chess-0.2.0/.cargo/config.toml +3 -0
- rust_chess-0.2.0/.envrc +1 -0
- rust_chess-0.2.0/.github/workflows/CI.yml +197 -0
- rust_chess-0.2.0/.gitignore +10 -0
- rust_chess-0.2.0/Cargo.lock +1174 -0
- rust_chess-0.2.0/Cargo.toml +29 -0
- rust_chess-0.2.0/LICENSE +21 -0
- rust_chess-0.2.0/PKG-INFO +7 -0
- rust_chess-0.2.0/README.md +245 -0
- rust_chess-0.2.0/build.sh +2 -0
- rust_chess-0.2.0/compare.py +195 -0
- rust_chess-0.2.0/develop.sh +2 -0
- rust_chess-0.2.0/publish.sh +16 -0
- rust_chess-0.2.0/pyproject.toml +23 -0
- rust_chess-0.2.0/rust_chess.pyi +1333 -0
- rust_chess-0.2.0/shell.nix +22 -0
- rust_chess-0.2.0/src/bin/stub_gen.rs +8 -0
- rust_chess-0.2.0/src/lib.rs +146 -0
- rust_chess-0.2.0/src/types/bitboard.rs +435 -0
- rust_chess-0.2.0/src/types/board.rs +726 -0
- rust_chess-0.2.0/src/types/color.rs +115 -0
- rust_chess-0.2.0/src/types/file_rank.rs +31 -0
- rust_chess-0.2.0/src/types/mod.rs +7 -0
- rust_chess-0.2.0/src/types/move.rs +206 -0
- rust_chess-0.2.0/src/types/piece.rs +202 -0
- rust_chess-0.2.0/src/types/square.rs +353 -0
- rust_chess-0.2.0/test.py +13 -0
rust_chess-0.2.0/.envrc
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
use nix
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
# This file is autogenerated by maturin v1.10.0
|
|
2
|
+
# To update, run
|
|
3
|
+
#
|
|
4
|
+
# maturin generate-ci github
|
|
5
|
+
#
|
|
6
|
+
name: CI
|
|
7
|
+
|
|
8
|
+
on:
|
|
9
|
+
push:
|
|
10
|
+
branches:
|
|
11
|
+
- main
|
|
12
|
+
- master
|
|
13
|
+
tags:
|
|
14
|
+
- '*'
|
|
15
|
+
pull_request:
|
|
16
|
+
workflow_dispatch:
|
|
17
|
+
|
|
18
|
+
permissions:
|
|
19
|
+
contents: read
|
|
20
|
+
|
|
21
|
+
jobs:
|
|
22
|
+
linux:
|
|
23
|
+
runs-on: ${{ matrix.platform.runner }}
|
|
24
|
+
strategy:
|
|
25
|
+
matrix:
|
|
26
|
+
platform:
|
|
27
|
+
- runner: ubuntu-22.04
|
|
28
|
+
target: x86_64
|
|
29
|
+
- runner: ubuntu-22.04
|
|
30
|
+
target: x86
|
|
31
|
+
- runner: ubuntu-22.04
|
|
32
|
+
target: aarch64
|
|
33
|
+
- runner: ubuntu-22.04
|
|
34
|
+
target: armv7
|
|
35
|
+
- runner: ubuntu-22.04
|
|
36
|
+
target: s390x
|
|
37
|
+
- runner: ubuntu-22.04
|
|
38
|
+
target: ppc64le
|
|
39
|
+
steps:
|
|
40
|
+
- uses: actions/checkout@v4
|
|
41
|
+
- uses: actions/setup-python@v5
|
|
42
|
+
with:
|
|
43
|
+
python-version: 3.x
|
|
44
|
+
- name: Build wheels
|
|
45
|
+
uses: PyO3/maturin-action@v1
|
|
46
|
+
with:
|
|
47
|
+
target: ${{ matrix.platform.target }}
|
|
48
|
+
args: --release --out dist --find-interpreter
|
|
49
|
+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
|
50
|
+
manylinux: auto
|
|
51
|
+
before-script-linux: |
|
|
52
|
+
if command -v yum >/dev/null 2>&1; then
|
|
53
|
+
yum install -y clang gcc
|
|
54
|
+
elif command -v apt-get >/dev/null 2>&1; then
|
|
55
|
+
apt-get update && apt-get install -y clang gcc
|
|
56
|
+
else
|
|
57
|
+
apk add clang gcc
|
|
58
|
+
fi
|
|
59
|
+
- name: Upload wheels
|
|
60
|
+
uses: actions/upload-artifact@v4
|
|
61
|
+
with:
|
|
62
|
+
name: wheels-linux-${{ matrix.platform.target }}
|
|
63
|
+
path: dist
|
|
64
|
+
|
|
65
|
+
musllinux:
|
|
66
|
+
runs-on: ${{ matrix.platform.runner }}
|
|
67
|
+
strategy:
|
|
68
|
+
matrix:
|
|
69
|
+
platform:
|
|
70
|
+
- runner: ubuntu-22.04
|
|
71
|
+
target: x86_64
|
|
72
|
+
- runner: ubuntu-22.04
|
|
73
|
+
target: x86
|
|
74
|
+
- runner: ubuntu-22.04
|
|
75
|
+
target: aarch64
|
|
76
|
+
- runner: ubuntu-22.04
|
|
77
|
+
target: armv7
|
|
78
|
+
steps:
|
|
79
|
+
- uses: actions/checkout@v4
|
|
80
|
+
- uses: actions/setup-python@v5
|
|
81
|
+
with:
|
|
82
|
+
python-version: 3.x
|
|
83
|
+
- name: Build wheels
|
|
84
|
+
uses: PyO3/maturin-action@v1
|
|
85
|
+
with:
|
|
86
|
+
target: ${{ matrix.platform.target }}
|
|
87
|
+
args: --release --out dist --find-interpreter
|
|
88
|
+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
|
89
|
+
manylinux: musllinux_1_2
|
|
90
|
+
before-script-linux: |
|
|
91
|
+
if command -v yum >/dev/null 2>&1; then
|
|
92
|
+
yum install -y clang gcc
|
|
93
|
+
elif command -v apt-get >/dev/null 2>&1; then
|
|
94
|
+
apt-get update && apt-get install -y clang gcc
|
|
95
|
+
else
|
|
96
|
+
apk add clang gcc
|
|
97
|
+
fi
|
|
98
|
+
- name: Upload wheels
|
|
99
|
+
uses: actions/upload-artifact@v4
|
|
100
|
+
with:
|
|
101
|
+
name: wheels-musllinux-${{ matrix.platform.target }}
|
|
102
|
+
path: dist
|
|
103
|
+
|
|
104
|
+
windows:
|
|
105
|
+
runs-on: ${{ matrix.platform.runner }}
|
|
106
|
+
strategy:
|
|
107
|
+
matrix:
|
|
108
|
+
platform:
|
|
109
|
+
- runner: windows-latest
|
|
110
|
+
target: x64
|
|
111
|
+
- runner: windows-latest
|
|
112
|
+
target: x86
|
|
113
|
+
steps:
|
|
114
|
+
- uses: actions/checkout@v4
|
|
115
|
+
- uses: actions/setup-python@v5
|
|
116
|
+
with:
|
|
117
|
+
python-version: 3.x
|
|
118
|
+
architecture: ${{ matrix.platform.target }}
|
|
119
|
+
- name: Build wheels
|
|
120
|
+
uses: PyO3/maturin-action@v1
|
|
121
|
+
with:
|
|
122
|
+
target: ${{ matrix.platform.target }}
|
|
123
|
+
args: --release --out dist --find-interpreter
|
|
124
|
+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
|
125
|
+
- name: Upload wheels
|
|
126
|
+
uses: actions/upload-artifact@v4
|
|
127
|
+
with:
|
|
128
|
+
name: wheels-windows-${{ matrix.platform.target }}
|
|
129
|
+
path: dist
|
|
130
|
+
|
|
131
|
+
macos:
|
|
132
|
+
runs-on: ${{ matrix.platform.runner }}
|
|
133
|
+
strategy:
|
|
134
|
+
matrix:
|
|
135
|
+
platform:
|
|
136
|
+
- runner: macos-13
|
|
137
|
+
target: x86_64
|
|
138
|
+
- runner: macos-14
|
|
139
|
+
target: aarch64
|
|
140
|
+
steps:
|
|
141
|
+
- uses: actions/checkout@v4
|
|
142
|
+
- uses: actions/setup-python@v5
|
|
143
|
+
with:
|
|
144
|
+
python-version: 3.x
|
|
145
|
+
- name: Build wheels
|
|
146
|
+
uses: PyO3/maturin-action@v1
|
|
147
|
+
with:
|
|
148
|
+
target: ${{ matrix.platform.target }}
|
|
149
|
+
args: --release --out dist --find-interpreter
|
|
150
|
+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
|
151
|
+
- name: Upload wheels
|
|
152
|
+
uses: actions/upload-artifact@v4
|
|
153
|
+
with:
|
|
154
|
+
name: wheels-macos-${{ matrix.platform.target }}
|
|
155
|
+
path: dist
|
|
156
|
+
|
|
157
|
+
sdist:
|
|
158
|
+
runs-on: ubuntu-latest
|
|
159
|
+
steps:
|
|
160
|
+
- uses: actions/checkout@v4
|
|
161
|
+
- name: Build sdist
|
|
162
|
+
uses: PyO3/maturin-action@v1
|
|
163
|
+
with:
|
|
164
|
+
command: sdist
|
|
165
|
+
args: --out dist
|
|
166
|
+
- name: Upload sdist
|
|
167
|
+
uses: actions/upload-artifact@v4
|
|
168
|
+
with:
|
|
169
|
+
name: wheels-sdist
|
|
170
|
+
path: dist
|
|
171
|
+
|
|
172
|
+
release:
|
|
173
|
+
name: Release
|
|
174
|
+
runs-on: ubuntu-latest
|
|
175
|
+
if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
|
|
176
|
+
needs: [linux, musllinux, windows, macos, sdist]
|
|
177
|
+
permissions:
|
|
178
|
+
# Use to sign the release artifacts
|
|
179
|
+
id-token: write
|
|
180
|
+
# Used to upload release artifacts
|
|
181
|
+
contents: write
|
|
182
|
+
# Used to generate artifact attestation
|
|
183
|
+
attestations: write
|
|
184
|
+
steps:
|
|
185
|
+
- uses: actions/download-artifact@v4
|
|
186
|
+
- name: Generate artifact attestation
|
|
187
|
+
uses: actions/attest-build-provenance@v2
|
|
188
|
+
with:
|
|
189
|
+
subject-path: 'wheels-*/*'
|
|
190
|
+
- name: Publish to PyPI
|
|
191
|
+
if: ${{ startsWith(github.ref, 'refs/tags/') }}
|
|
192
|
+
uses: PyO3/maturin-action@v1
|
|
193
|
+
env:
|
|
194
|
+
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
|
|
195
|
+
with:
|
|
196
|
+
command: upload
|
|
197
|
+
args: --non-interactive --skip-existing wheels-*/*
|