Skip to content

Building Steppable

Andy Zhang edited this page Jun 10, 2024 · 4 revisions

Building Steppable (CMake)

Important

It is reported that CL.EXE cannot build Steppable, as nanobind, one of Steppable's dependencies cannot be built under Visual Studio. There is nothing that we can do, except to wait for a new release of Visual Studio. In the meantime, check out this Discussion post for more information.

Thank you.

Introduction

Steppable is configured using CMake, in order to enable building across different platforms and compilers. As a result, one needs an external build system, e.g., Make to build it.

Get Started

To get started, you would need:

Software Purpose Alternatives Required?
LLVM Clang C++ Compiler GCC, MSVC... YES
CMake Configure None YES
Make Building Ninja, Visual Studio... YES
Python Building None YES
Git Downloading Download as Zip NO

First, clone the repository using the command:

$ git clone https://github.com/ZCG-coder/Steppable.git
Cloning into Steppable
...

For more information on getting the source code, see Getting the Source Code.

Then, in the local folder, make a new directory. You can call it whatever you like, but I would recommend calling it build.

$ mkdir build

Release Build

Release builds are commonly used for production. Therefore, the executables and libraries are often optimized, in order to save some storage for end users.

CMake defaults to release builds, which means that one need not to specify any options to make a release build.

To make a release build:

  1. Open up a new terminal window, or CMD.EXE for Windows at the build directory.

  2. After the prompt, type:

    $ cmake ..
    -- The C Compiler indentification is Clang 17.0.6
    ...

    For users with ninja installed and working, please use the build below:

    $ cmake .. -GNinja
    -- The C Compiler indentification is Clang 17.0.6
  3. Then, invoke the build tool. CMake generates Makefiles by default, so the command to build is:

    $ make

    CMake also supports invoking the build command itself. You can also call:

    $ cmake ---build .
    [1/70] Build CXX object...
  4. The binaries are in the bin/ directory in the build directory, and the libraries are in the lib/ directory.

Debug build

Debug builds are commonly used for development. The build also includes debug symbols, linking binary code to a human-readable format.

To make a release build:

  1. Open up a new terminal window, or CMD.EXE for Windows at the build directory.

  2. After the prompt, type:

    $ cmake .. -DCMAKE_BUILD_TYPE=Debug
    -- The C Compiler indentification is Clang 17.0.6
    ...

    For users with ninja installed and working, please use the build below:

    $ cmake .. -GNinja -DCMAKE_BUILD_TYPE=Debug
    -- The C Compiler indentification is Clang 17.0.6
  3. Then, invoke the build tool. CMake generates Makefiles by default, so the command to build is:

    $ make

    CMake also supports invoking the build command itself. You can also call

    $ cmake ---build . ---config Debug
    [1/70] Build CXX object...
  4. The binaries are in the bin/ directory in the build directory, and the libraries are in the lib/ directory. You can run the binaries with a debugger to inspect them for bugs.

Using the built libraries

In the lib directory, there should be a file starting steppyble. It is a compiled Python shared object, which can be imported from Python.

>>> import steppyble

Contents

Introduction

Contributing

Building

Development

API Documentation

Others

  • Performance - Some benchmarks of Steppable for reference
  • Status - Status of Steppable, at a glance
Clone this wiki locally