Portability of Rust in 2021

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

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • tch-rs

    Rust bindings for the C++ api of PyTorch.

    - PyTorch/libtorch - https://github.com/LaurentMazare/tch-rs seems pretty good. But on Android and iOS this seems to be an issue. Although this issue exists for C++ as well as there are currently some hacky scripts to download the Java AAR from Maven and then extract the .so libs from there to make sure you got the thing built correctly ;). I actually went the path now to run torch mobile from Java (it's a sequence of 3 neural networks) and call my C++ code between those with JNI. It's mostly passing strings and float arrays, so not too bad. So this could work with Rust as well.

  • jni-rs

    Rust bindings to the Java Native Interface — JNI

    - JNI - how well does https://github.com/jni-rs/jni-rs work? Assuming that Firefox runs on Android and uses Rust this should be reasonable to work with?

  • 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.

  • cbindgen

    A project for generating C bindings from Rust code

    - I still got to wrap one C library. I ran it through https://github.com/eqrion/cbindgen once and seemed to work but didn't do any deeper tests.

  • tokenizers

    💥 Fast State-of-the-Art Tokenizers optimized for Research and Production

    In sum I would like the idea to go with Rust as I more or less got to rewrite the whole thing anyway, but I am a bit skeptical if I will be able to interface with everything that might come up at some point. Or probably end up in a wrapper hell if I got to use more C++ libraries. On the other hand there are definitely a few Rust projects out there that might come in handy (for example https://github.com/huggingface/tokenizers). And the build process is pretty awful right now (CMake it is but with lots of hacks).

  • com-rs

    **DEPRECATED** in favor of github.com/microsoft/windows-rs

    regarding COM - check https://github.com/microsoft/com-rs

  • windows-rs

    Rust for Windows

    There's also https://github.com/microsoft/windows-rs for consuming all sorts of windows APIs (COM included)!

  • onnx-tensorflow

    Tensorflow Backend for ONNX

    We had a few small issues with ONNX. Export worked but when running with e.g. tflite stumbled for example across this https://github.com/onnx/onnx-tensorflow/issues/853 Also the support for sampling from distributions is generally still pretty weak, but we were able to work around that.

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

  • onnxruntime

    ONNX Runtime: cross-platform, high performance ML inferencing and training accelerator

    Also briefly tried https://github.com/microsoft/onnxruntime

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