#catboost #github #bindings #api #api-bindings #bindgen #catboostlib

sys catboost-sys

Internal unsafe Rust bindings for catboostlib C apis using bindgen

5 releases

0.1.6 Oct 21, 2022
0.1.5 Oct 18, 2022
0.1.4 Oct 15, 2022
0.1.3 Sep 9, 2022
0.1.2 Sep 8, 2022

#48 in #bindgen

Download history 27/week @ 2024-06-16 19/week @ 2024-06-23 1/week @ 2024-06-30 65/week @ 2024-07-07 20/week @ 2024-07-14 24/week @ 2024-07-21 1/week @ 2024-08-18 5/week @ 2024-08-25 6/week @ 2024-09-01 14/week @ 2024-09-08 2/week @ 2024-09-15 41/week @ 2024-09-22 7/week @ 2024-09-29

64 downloads per month
Used in 4 crates (via catboost-rs)

MIT/Apache

39KB
675 lines

catboost-sys

  • Download catboost binary from https://github.com/catboost/catboost/releases/tag/v1.0.6.
    • If you are using Linux, download libcatboostmodel.so
    • If you are using MacOS, download libcatboostmodel.dylib
    • Place the file in /usr/lib/
    • Create a soft link to x.x.1, e.g. sudo ln -s libcatboostmodel.so libcatboostmodel.so.1

Introduction

Low level bindings for C API, adapted from https://github.com/catboost/catboost/tree/master/catboost/rust-package.

Major Differences vs official bindings

Major differences are:

  • We assume libcatboost shared library is already downloaded (see instructions below)
  • Splitting out from the main repo due to the catboost repo being very big
  • Most changes are in build.rs, no differences in the APIs
  • We keep a copy of the model_interface c_bindings from https://github.com/catboost/catboost/tree/v1.0.6/catboost/libs/model_interface in this repo to simplify things

Build Instructions

  • Make sure you have the dependencies for bindgen
apt-get install -y build-essential pkg-config libssl-dev libclang-dev clang cmake
  • Download catboost binary from https://github.com/catboost/catboost/releases/tag/v1.0.6.
    • If you are using Linux, download libcatboostmodel.so
    • If you are using MacOS, download libcatboostmodel.dylib
    • Place the file in /usr/lib/
    • Create a soft link to x.x.1, e.g. sudo ln -s libcatboostmodel.so libcatboostmodel.so.1
  • Build it with cargo build

No runtime deps

~0–2.1MB
~41K SLoC