An open API service indexing awesome lists of open source software.

https://github.com/thebutlah/xtensor-rust

Supports conversion between ndarray-rust and xtensor
https://github.com/thebutlah/xtensor-rust

Last synced: over 1 year ago
JSON representation

Supports conversion between ndarray-rust and xtensor

Awesome Lists containing this project

README

          

# xtensor_rust

`xtensor_rust` adds the ability to pass tensors back and forth between Rust and C++, by
providing compatibility between Rust's [ndarray](docs.rs/ndarray) crate and c++'s
[xtensor](https://github.com/xtensor-stack/xtensor) library.

**THIS LIBRARY IS UNDER ACTIVE DEVELOPMENT, AND IS NOT YET READY FOR USE.**

## Design

This FFI library relies on Rust's [cxx](docs.rs/cxx) library to handle the initial
bridge between C++ and Rust. On the Rust side, this code is ergonomic enough to use
directly, but on the C++ side some additional work has been done to make the API more
ergonomic.

There are several components to this:
- Because `cxx` cannot handle generics, `cpp/bridge` wraps the underlying autogenerated
C++ types with a template class.
- Then to support xtensor's semantics, the code in `cpp` exposes the template class as a
`xtensor_container`. **This component is not yet finished.**