0

I would like to use Rust to perform linear algebra and tensor operations. So I would like to use Eigen3, which is a C++ library, from Rust by wrapping it with Rust.

I was able to find a way to compile C and C++ files from Rust at the same time as Cargo, but I don't know how to bring the library as is.

trent
  • 25,033
  • 7
  • 51
  • 90
musako
  • 897
  • 2
  • 10
  • 26
  • Does [this](https://stackoverflow.com/a/52940455/1695172) answer it? – Netwave Feb 24 '21 at 08:39
  • 2
    Eigen is a C++ template library. Those are notoriously difficult to use from other languages. You'd need a C interface, that exposes only a subset of types. – mcarton Feb 24 '21 at 10:01
  • @mcarton thank you for your comment! Does any documentation exist anywhere about C interfaces that regret the subset of types? – musako Feb 24 '21 at 10:17
  • 1
    nominated as dupe: [How to call a C++ dynamic library from Rust?](https://stackoverflow.com/questions/52923460/how-to-call-a-c-dynamic-library-from-rust) – underscore_d Feb 24 '21 at 13:38

0 Answers0