* Add `bare-expo` to "Bare on Mobile" w/ brief Pear-end explanation * Add footnote about the term worklet to Bare on Mobile * Add phrase about using RPC to communicate w/ worklet in Bare on Mobile * Reword note about `bare-ios` & `bare-android` examples
1.2 KiB
Bare on Mobile
Bare can be embedded into mobile applications to serve as the "Pear-end" where the peer-to-peer code of the application is run.
To get started with embedding Bare into an Expo mobile application use the Bare on Expo example as reference. This example integrates Bare as an isolated thread, called a worklet1 , via react-native-bare-kit. All code passed when starting the worklet will run in the Bare runtime and can be communicated with via remote procedure calls.
For deeper integration with a mobile application, the following examples can be used as references:
The Bare JavaScript runtime runs equally well on both mobile and desktop applications.
For further reference on using Bare, please refer to GitHub (Bare).
-
This term was chosen to avoid ambiguity with worker threads as implemented by https://github.com/holepunchto/bare-worker. ↩︎