Skip to content

Latest commit

 

History

History
77 lines (50 loc) · 1.83 KB

README.md

File metadata and controls

77 lines (50 loc) · 1.83 KB

react-native-matrix-sdk

Matrix client SDK for React Native

CI

This SDK wraps the FFI bindings of matrix-rust-sdk for use in React Native via uniffi-bindgen-react-native.

Installation

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

Usage

See src/index.ts for the module's full API. You may also find a usage example in example/src/App.tsx.

Contributing

See the contributing guide to learn about the development and contribution workflow.

License

Apache-2.0


Made with create-react-native-library