rustshogi Documentation

rustshogi is a high-performance shogi library implemented in Rust. It can be used from Python applications through Python bindings.

Features

  • Fast shogi board representation and manipulation

  • Legal move generation and search

  • Piece placement and movement

  • Hand piece management

  • Game state management

  • Python bindings

Installation

pip install rustshogi

Quickstart

from rustshogi import Board, ColorType, Move, Address

# Create an initial position
board = Board("startpos")

# Search for legal moves
legal_moves = board.search_moves(ColorType.Black)

# Execute a move
if legal_moves:
    board.execute_move(legal_moves[0])

For detailed usage, please refer to Quickstart.

API Reference

The complete API reference can be found at rustshogi package.

API Reference:

Indices and tables