[package]
name = "sisyphus32"
version = "1.0.0"
edition = "2021"
default-run = "sisyphus32"
license = "MIT"
description = "Feature-based UCI Chess Engine"
repository = "https://github.com/juules32/sisyphus32"
readme = "README.md"
keywords = ["chess", "optimization"]
exclude = [
    "openings/openings.pgn",
]

[dependencies]
rayon = "1.10.0"
ctor = "0.4.0"
shakmaty-syzygy = "0.25.3"
shakmaty = "0.27.3"
thiserror = "2.0.12"
serde = { version = "1.0.219", features = ["derive"] }
serde_json = "1.0.140"

# Features that are optional to comply with wasm:
ureq = { version = "3.0.11", features = ["json"], optional = true }
rand = { version = "0.9.1", optional = true }

[profile.release-with-debug]
inherits = "release"
debug = true

[profile.release-all]
inherits = "release"

[features]
#  /*-------------------------*\ 
#    WASM-compatible versions
#  \*-------------------------*/
wasm = ["lockless_hashing"]

#  /*-------------------------*\ 
#        Playable versions
#  \*-------------------------*/
random =                    ["base_default"]
minimax =                   ["base_default", "unit_minimax"]
negamax =                   ["base_default", "unit_negamax"]
pst =                       ["negamax", "unit_pst"]
sort_moves =                ["pst", "unit_sort_moves"]
iterative_deepening =       ["sort_moves", "unit_iterative_deepening"]
quiescence =                ["iterative_deepening", "unit_quiescence"]
quiescence_en_passant =     ["quiescence", "unit_quiescence_en_passant"]
checks_add_depth =          ["quiescence_en_passant", "unit_checks_add_depth"]
killer_heuristic =          ["checks_add_depth", "unit_killer_heuristic"]
history_heuristic =         ["killer_heuristic", "unit_history_heuristic"]
tt =                        ["history_heuristic", "unit_tt"]
eval_tt =                   ["tt", "unit_eval_tt"]
tt_two_tier =               ["eval_tt", "unit_tt_two_tier"]
null_move_pruning =         ["tt_two_tier", "unit_null_move_pruning"]
late_move_reductions =      ["null_move_pruning", "unit_late_move_reductions"]
tapered_eval =              ["late_move_reductions", "unit_tapered_eval"]
positional_eval =           ["tapered_eval", "unit_positional_eval"]
pseudo_pins =               ["tapered_eval", "unit_pseudo_pins"]
capture_with_check_eval =   ["tapered_eval", "unit_capture_with_check_eval"]
move_flag_eval =            ["tapered_eval", "unit_move_flag_eval"]
lazy_smp =                  ["move_flag_eval", "unit_lazy_smp"]
lockless_hashing =          ["lazy_smp", "unit_lockless_hashing"]
opening_book =              ["lockless_hashing", "unit_opening_book"]
syzygy_tablebase =          ["opening_book", "unit_syzygy_tablebase"]
default =                   ["syzygy_tablebase"]

#  /*------------------------------------------------------------*\ 
#        Base versions (should not be set as default feature)
#  \*------------------------------------------------------------*/
base_basic =                ["unit_bb",       "unit_revert_undo"                                           ]
base_magic_number =         ["unit_bb",       "unit_revert_undo",  "unit_magic_bbs"                        ]
base_clone =                ["unit_bb",       "unit_revert_clone", "unit_magic_bbs"                        ]
base_parallel =             ["unit_bb",       "unit_revert_clone", "unit_magic_bbs", "unit_parallel_perft" ]
base_array =                ["unit_bb_array", "unit_revert_clone", "unit_magic_bbs"                        ]
base_parallel_array =       ["unit_bb_array", "unit_revert_clone", "unit_magic_bbs", "unit_parallel_perft" ]
base_default = ["base_parallel_array"] # The feature used for all playable versions

#  /*------------------------------------------------------------*\ 
#     Individual features (should not be set as default feature)
#  \*------------------------------------------------------------*/
unit_bb = []
unit_bb_array = []

unit_revert_undo = []
unit_revert_clone = []

unit_magic_bbs = []

unit_parallel_perft = []

unit_minimax = []
unit_negamax = []

unit_pst = []

unit_iterative_deepening = []

unit_quiescence = []

unit_sort_moves = []

unit_quiescence_en_passant = []

unit_tt = []

unit_small_tt = []

unit_eval_tt = []

unit_tt_two_tier = []

unit_killer_heuristic = []

unit_history_heuristic = []

unit_checks_add_depth = []

unit_null_move_pruning = []

unit_late_move_reductions = []

unit_tapered_eval = []

unit_positional_eval = []

unit_pseudo_pins = []

unit_capture_with_check_eval = []

unit_move_flag_eval = []

unit_lazy_smp = []

unit_lockless_hashing = []

unit_opening_book = ["ureq", "rand"]

unit_syzygy_tablebase = []
