Skip to content

Repository files navigation

Cube

0 - Introduction

This project is a Rubik's Cube solver built around a C++ re-implementation of Kociemba's twophase algorithm, inspired by the original mathematica code from [1].

It includes the following components:

  • libcube: the core C++ library with C-style interface exported;
  • pycube: the Python binding package via ctypes;
  • jscube: the JavaScript binding package via emscripten;
  • Cube.framework: the swift framework;
  • icube: the command-line executable.

1 - Build, install & package

Prerequisites:

  • Cmake: to build libcube;
  • Emscripten & npm: to build jscube;
  • Python: to build pycube.
  1. Build
# build
cmake -B build -G "Ninja" \
  -DCMAKE_BUILD_TYPE=Release \
  -DBUILD_SWIFT_MODULE=on \
  -DBUILD_PYTHON_BINDING=on \
  -DBUILD_WASM_BINDING=on \
  -DCMAKE_INSTALL_PREFIX="<prefix>" \
  -DCUBE_PACK_DIR="<dir>"

cmake --build build --config Release

# install 
# (default location: 
#   - linux,macOS: "/usr/local"
#   - win: "C:/Program Files/${PROJECT_NAME}")
cmake --build build --target install --config Release

# package (default location: "build/dist")
cmake --build build --target pack --config Release

2 - Usage

  1. icube icube-demo

  2. bindings

References

  1. http://kociemba.org/cube.htm

About

Rubik's cube solver

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages