1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
//! This crate defines the **core** building blocks for [the Hexe chess
//! engine][hexe].
//!
//!
//! # Usage
//!
//! This crate is available [on crates.io][crate] and can be used by adding the
//! following to your project's `Cargo.toml`:
//!
//! ```toml
//! [dependencies]
//! hexe_core = "0.0.5"
//! ```
//!
//! and this to your crate root:
//!
//! ```
//! extern crate hexe_core;
//! # fn main() {}
//! ```
//!
//! [hexe]: https://docs.rs/hexe/0.0.5/hexe/
//! [crate]: https://crates.io/crates/hexe_core

#![doc(html_root_url = "https://docs.rs/hexe_core/0.0.5")]
#![doc(html_logo_url = "https://raw.githubusercontent.com/hexe-rs/Hexe/assets/Icon.png")]

// Lints ///////////////////////////////////////////////////////////////////////

// Built-in
#![allow(unknown_lints)]
#![deny(missing_docs)]

// Clippy
#![allow(cast_lossless)]
#![allow(explicit_into_iter_loop)]
#![allow(inline_always)]
#![allow(needless_lifetimes)]
#![allow(redundant_field_names)]
#![allow(suspicious_arithmetic_impl)]
#![allow(unreadable_literal)]
#![allow(verbose_bit_mask)]
#![allow(zero_prefixed_literal)]
#![deny(bool_comparison)]

// Attributes //////////////////////////////////////////////////////////////////

#![cfg_attr(not(feature = "std"), no_std)]
#![cfg_attr(all(test, nightly), feature(test))]
#![cfg_attr(feature = "simd", feature(stdsimd))]

// no_std //////////////////////////////////////////////////////////////////////
#[cfg(feature = "std")]
use std as core;

// Internal Crates /////////////////////////////////////////////////////////////

#[cfg(all(test, nightly))]
extern crate test;

// External Crates /////////////////////////////////////////////////////////////
#[cfg(any(test, feature = "rand"))]
extern crate rand;

#[cfg(test)]
#[macro_use]
extern crate static_assertions;

extern crate memchr;

#[macro_use]
extern crate uncon_derive;
extern crate uncon;

// Modules /////////////////////////////////////////////////////////////////////
#[macro_use]
mod macros;

pub mod prelude;

pub mod board;
pub mod castle;
pub mod color;
pub mod fen;
pub mod iter;
pub mod misc;
pub mod mv;
pub mod piece;
pub mod square;

// Modules shared with hexe that aren't meant for public use
#[doc(hidden)]
pub mod _shared {
    #[cfg(feature = "serde")]
    pub extern crate serde;
}

#[allow(unused_imports)]
use _shared::*;

mod consts;
mod util;
mod magic;