#cad #geometry #api-bindings #graphics #constraint-solver

slvs

Rust wrapper for the SolveSpace constraint solver library

4 releases (2 breaking)

0.6.0 Jun 20, 2023
0.5.1 May 1, 2023
0.5.0 May 1, 2023
0.0.0 Apr 4, 2023

#1251 in Math

GPL-3.0 license

2.5MB
57K SLoC

C++ 39K SLoC // 0.1% comments Rust 8K SLoC // 0.0% comments C 8K SLoC // 0.2% comments Objective-C++ 1.5K SLoC // 0.1% comments JavaScript 1K SLoC // 0.1% comments

rust_slvs

Rust binding for SolveSpace's geometric constraint solver library.

Documentation

Using slvs

Prerequisites

  • A C compiler

    The SolveSpace library is compiled using cc, which requires a C compiler.

    See here for more information.

  • libclang

    Bindings from C to Rust are generated using bindgen, which requires libclang. On Windows, the environment variable LIBCLANG_PATH will need to be set, pointing to the location of the clang library.

    See here for more information.

To add to your project

Run the following Cargo command in your project directory:

cargo add slvs

To Build

  1. Check out any necessary submodules

    git submodule update --init --recursive
    
  2. Run the build command

    cargo build
    

Dependencies