-
Notifications
You must be signed in to change notification settings - Fork 65
Updating to modern Rust #84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
umgefahren
wants to merge
7
commits into
jordanbray:main
Choose a base branch
from
umgefahren:new-stuff
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 6 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
aee2137
Initial new things
umgefahren b10c30a
Move to 2021 edition
umgefahren 0c5cd7b
Apply clippy
umgefahren ecadf2f
Addressed issues raised by clippy
umgefahren 1878257
Modify version
umgefahren 7d3cd76
Minor additions
umgefahren 0eaafac
Include changes from code review
umgefahren File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| [package] | ||
| name = "chess" | ||
| version = "3.2.0" | ||
| edition = "2018" | ||
| version = "4.0.0" | ||
| edition = "2021" | ||
| authors = ["Jordan Bray <[email protected]>"] | ||
| description = "This is a fast chess move generator. It has a very good set of documentation, so you should take advantage of that. It (now) generates all lookup tables with a build.rs file, which means that very little pseudo-legal move generation requires branching. There are some convenience functions that are exposed to, for example, find all the squares between two squares. This uses a copy-on-make style structure, and the Board structure is as slimmed down as possible to reduce the cost of copying the board. There are places to improve perft-test performance further, but I instead opt to be more feature-complete to make it useful in real applications. For example, I generate both a hash of the board and a pawn-hash of the board for use in evaluation lookup tables (using Zobrist hashing). There are two ways to generate moves, one is faster, the other has more features that will be useful if making a chess engine. See the documentation for more details." | ||
| build = "src/build.rs" | ||
|
|
@@ -12,15 +12,18 @@ readme = "README.md" | |
| keywords = ["chess", "move", "generator"] | ||
| license = "MIT" | ||
| documentation = "https://jordanbray.github.io/chess/chess/index.html" | ||
| rust-version = "1.56.0" | ||
|
|
||
| [dependencies] | ||
| arrayvec = "0.7.2" | ||
| const_for = "0.1.2" | ||
| nodrop = "0.1.14" | ||
| failure = "0.1.6" | ||
| thiserror = "1.0.44" | ||
|
|
||
| [profile.release] | ||
| opt-level = 3 | ||
| debug = false | ||
| lto = "yes" | ||
|
|
||
| [profile.dev] | ||
| opt-level = 3 | ||
|
|
@@ -38,5 +41,6 @@ opt-level = 3 | |
| opt-level = 3 | ||
|
|
||
| [build-dependencies] | ||
| rand = { version = "0.7.2", default_features = false, features = ["small_rng"] } | ||
| failure = "0.1.6" | ||
| const_for = "0.1.2" | ||
| rand = { version = "0.7.2", default-features = false, features = ["small_rng"] } | ||
| thiserror = "1.0.44" | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.