Matrix client SDK for React Native
This SDK wraps the FFI bindings of matrix-rust-sdk for use in React Native via uniffi-bindgen-react-native.
Since this is a fairly young project we're not making releases yet. To use the module, clone the repository into a sibling folder of your app and then install it using a relative path.
npm add ../react-native-matrix-sdk
Additionally you need to change metro.config.js
to find and watch the module's source
code.
const config = {
resolver: {
extraNodeModules: {
'react-native-matrix-sdk': path.resolve(__dirname, '../react-native-matrix-sdk'),
}, ...
},
watchFolders: [
path.resolve(__dirname, '../react-native-matrix-sdk'), ...
]
};
On the first build or any time you update the version of matrix-rust-sdk, you'll have to rebuild the Rust code and regenerate the module with
yarn generate
In future, you will be able to install the module from npm.
npm install react-native-matrix-sdk
See src/index.ts for the module's full API. You may also find a usage example in example/src/App.tsx.
See the contributing guide to learn about the development and contribution workflow.
Apache-2.0
Made with create-react-native-library