Abstract
At the moment, devs need rust toolchain to build this library.
A better DX would be to just run one command and the library gets installed, with no need to have the rust toolchain.
Proposed solution
- CI creates pre-built binaries on each release and adds to the release assets (with android/ios checksums) (example: https://github.com/Psycarlo/react-native-bdk-sdk/releases/tag/v0.1.9) (CI workflow example: https://github.com/Psycarlo/react-native-bdk-sdk/blob/main/.github/workflows/release.yml) (Might need to run patch script because of react-native-uniffi-bindgen generation problems. Example: https://github.com/Psycarlo/react-native-bdk-sdk/blob/main/scripts/patch-bindings.sh)
- User installs with one command and downloads the pre-build binaries via postinstall script (some pkg managers might block postinstall scripts. Need explicit allow) (example postinstall script: https://github.com/Psycarlo/react-native-bdk-sdk/blob/main/scripts/postinstall.js)
For expo, you need to create a plugin. Example: https://github.com/Psycarlo/react-native-bdk-sdk/tree/main/plugin
Be aware of what files you publish to npm. Example: https://github.com/Psycarlo/react-native-bdk-sdk/blob/main/package.json#L32
References
https://github.com/Psycarlo/react-native-bdk-sdk/tree/main
Abstract
At the moment, devs need rust toolchain to build this library.
A better DX would be to just run one command and the library gets installed, with no need to have the rust toolchain.
Proposed solution
For expo, you need to create a plugin. Example: https://github.com/Psycarlo/react-native-bdk-sdk/tree/main/plugin
Be aware of what files you publish to npm. Example: https://github.com/Psycarlo/react-native-bdk-sdk/blob/main/package.json#L32
References
https://github.com/Psycarlo/react-native-bdk-sdk/tree/main