How is your experience with using C++ libraries in Rust?

This page summarizes the projects mentioned and recommended in the original post on /r/rust

InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • rust-bindgen

    Automatically generates Rust FFI bindings to C (and some C++) libraries.

  • I tried using a C++ library using bindgen, and while it worked the generated Rust bindings where HUGE and included a ton of things from the C++ stdlib (isn't header files just a wonderful concept...). So instead I wrapped the C++ code in a small C library with a minimal API (basically just depending on stdint.h). That produced minimal Rust bindings and integrates with Rust very well (except for C strings which are a PITA), I think it was worth the extra hours spent.

  • cxx

    Safe interop between Rust and C++

  • A while ago I started integrating a C++ project using cxx. However, cxx was not straightforward to set up at the time, and the project had a mostly "C with classes" code style. So eventually I used bindgen, by creating my own C API. Nowadays, to work with a modern C++ API, I'd definitely give cxx another try.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Rust Bindgen

    1 project | news.ycombinator.com | 18 Sep 2023
  • the graphics driver doesn't work on gentoo.

    2 projects | /r/AsahiLinux | 15 May 2023
  • How can I use rust libraries in C++

    2 projects | /r/cpp_questions | 16 Apr 2023
  • Issue resolving dependencies when linking C libraries

    1 project | /r/rust | 7 Apr 2023
  • I implemented a NASA image compression algorithm

    4 projects | /r/programming | 23 Mar 2023