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
- Host: GitHub
- URL: https://github.com/thebutlah/xtensor-rust
- Owner: TheButlah
- Archived: true
- Created: 2021-06-04T18:52:30.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-06-14T22:48:06.000Z (about 5 years ago)
- Last Synced: 2025-03-14T20:31:06.731Z (over 1 year ago)
- Language: C++
- Size: 31.3 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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.**