margelo / margelo/nitro

[Feature] Support for Rust language in nitrogen

Open
#258 8 comments 7 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement nitrogen
Dominant language
C++
Stars
1.9k
Forks
117
Avg merge
1d 8h
Merged PRs (30d)
44

Description

FWIW, came across this repo:
https://github.com/getditto/rn-jsi-rust-bridging
and accompanying article:
https://ditto.live/blog/bridging-react-native-and-rust-via-jsi
and some other of their related repos:
https://github.com/getditto/react-ditto
https://github.com/getditto/react-native-sample-app

where they are bridging react native to rust (for both old and new architecture). I know almost nothing about rust (so cannot help) but curious if nitro could simplify the process for such react native - rust bindings?

It would probably open a new world of possibilities since there is plenty of truely multiplatoform (mobile include) libraries in rust land and rust cargo is a godsend comparing to cmake - there is a lot of c++ libraries that officially don't support mobile but mostly because of build issues.

In rust there is plenty of nice gems that have functionality missing in react native (or are not as good):

opencv-rust - [autogenerated opencv + opencv_contrib bindings] https://github.com/twistedfall/opencv-rust
Cv-convert - [conversion between cv and different image libs ndarray] https://crates.io/crates/cv-convert
cpal - [realtime audio i/o processing] https://github.com/RustAudio/cpal
midir - [midi i/o] https://github.com/Boddlnagg/midir
wmidi or rimd - [midi encoding / decoding]
Peertalk-rst [ios - usb communication] https://github.com/AstroHQ/peertalk-rs
rust-sdl2 - [gamecontrollers, IMU sensors, audio, etc] https://github.com/Rust-SDL2/rust-sdl2
rodio - [audio player] https://github.com/RustAudio/rodio

Maybe worth to contact those guys from ditto.live to invite for collaboration? (they might not know about Nitro), they seem have big clients in Aviation industry so they probably know what they are doing.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked rn-jsi-rust-bridging repository and Ditto article, then compare their old and new architecture approaches with Nitro's existing native-module support. The issue names no Nitro files, tests, or entry point, and does not define a concrete acceptance criterion, so scope and what done means would need agreement before implementation.

Written by the indexing model from the issue text.

Assessment

Tech stack
react-native, rust
Domain
mobile-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.