Building external C++ libraries like oneTBB for react-native new arch C++ turbomodule

83 Views Asked by At

I have a react-native new arch project where I am trying to write a C++ turbo module that can use either oneTBB(formerly intel thread building blocks) or boost::asio to leverage thread pools.

Basically following this tutorial (https://reactnative.dev/docs/the-new-architecture/cxx-cxxturbomodules) I cannot figure out how to add the sources of these external libraries so they are built for the appropriate targets (ios/Android) and linked properly.

A version of boost 1.76.0 seems to be included but looks like only headers are available, if I try to access threadpools, things fail during linking.

How can I make this work assuming I have the oneTBB or boost library sources available at some location?

0

There are 0 best solutions below