Skip to content

Commit

Permalink
chore: readme formatting (#487)
Browse files Browse the repository at this point in the history
  • Loading branch information
tuddman authored Feb 12, 2024
1 parent 25df883 commit ebcecc2
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 8 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ or
Command line build using docker

```bash
$ docker build . -t libxmtp:1
docker build . -t libxmtp:1
```

## Structure
Expand All @@ -68,4 +68,4 @@ libxmtp/

[`xmtp_proto`](./xmtp_proto): Generated code for handling XMTP protocol buffers

[`xmtp_v2`](./xmtp_v2): Version 2 of XMTP which uses a [user key bundle](https://xmtp.org/docs/concepts/key-generation-and-usage) to encrypt and exchange messages.
[`xmtp_v2`](./xmtp_v2): Version 2 of XMTP which uses a [user key bundle](https://xmtp.org/docs/concepts/key-generation-and-usage) to encrypt and exchange messages.
4 changes: 2 additions & 2 deletions bindings_ffi/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ NOTES: To allow the workflow to push to another repo the setup follows [this gui

# Uniffi

We are using Uniffi with the latest procedural macros syntax where possible, which also gives us async support. It is important to learn the syntax: https://github.com/mozilla/uniffi-rs/blob/main/docs/manual/src/proc_macro/index.md.
We are using Uniffi with the latest procedural macros syntax where possible, which also gives us async support. It is important to learn the syntax: <https://github.com/mozilla/uniffi-rs/blob/main/docs/manual/src/proc_macro/index.md>.

For the most part, any mistakes in the Uniffi interface will manifest as a compile error when running `./gen_kotlin.sh`. Some details are described below so that they are easier to understand.

Expand All @@ -89,4 +89,4 @@ Any objects crossing the Uniffi interface boundary must be wrapped in `Arc<>`, s

We use Tokio as our [async runtime](https://rust-lang.github.io/async-book/08_ecosystem/00_chapter.html). Uniffi can use this runtime on async methods and objects using the annotation `#[uniffi::export(async_runtime = ‘tokio’)]`. Uniffi plumbs up an executor (scheduler) in the foreign language to the Tokio runtime in Rust. More details [here](https://github.com/mozilla/uniffi-rs/blob/734050dbf1493ca92963f29bd3df49bb92bf7fb2/uniffi_core/src/ffi/rustfuture.rs#L11-L18). By default, Tokio's [multi-thread scheduler](https://docs.rs/tokio/latest/tokio/runtime/index.html#multi-thread-scheduler) is used on the Rust side. This means that functions may resume execution in a different thread when an `await` is encountered. This in turn means that structs held across an `await` in libxmtp must be `Send` and `Sync`.

Additionally, because the foreign language may be multi-threaded, any objects passed to the foreign language must also be `Send` and `Sync`, and [no references to `&mut self` are permitted](https://mozilla.github.io/uniffi-rs/udl/interfaces.html#concurrent-access). For now, use the mutability pattern described in https://github.com/xmtp/libxmtp/pull/138.
Additionally, because the foreign language may be multi-threaded, any objects passed to the foreign language must also be `Send` and `Sync`, and [no references to `&mut self` are permitted](https://mozilla.github.io/uniffi-rs/udl/interfaces.html#concurrent-access). For now, use the mutability pattern described in <https://github.com/xmtp/libxmtp/pull/138>.
9 changes: 8 additions & 1 deletion bindings_flutter/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,30 @@
## 0.1.0-development.2

- pickup latest validation service updates

## 0.1.0-development.1

- move from v2 to main branch on libxmtp
- mls client creation
- mls group creation/listing (no messaging yet)

## 0.0.1-development.4

- use bundled artifacts in android CMakeLists build

## 0.0.1-development.3

- expose `user_preferences_encrypt()` and `user_preferences_decrypt()`

## 0.0.1-development.2

- introduce setup script for artifacts during install

## 0.0.1-development.1

- include generated code in the published package

## 0.0.1-development

- initial packaging
- expose topic generator for preference storage
- expose topic generator for preference storage
2 changes: 1 addition & 1 deletion bindings_flutter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ A package wrapping pieces of the [libxmtp](https://github.com/xmtp/libxmtp) rust
This is published as [`xmtp_bindings_flutter`](https://pub.dev/packages/xmtp_bindings_flutter)

This low-level library is consumed as a dependency of the [XMTP flutter SDK](https://pub.dev/packages/xmtp).
Most users should use that high-level `xmtp` package instead of depending on this package directly.
Most users should use that high-level `xmtp` package instead of depending on this package directly.
2 changes: 1 addition & 1 deletion xmtp_proto/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# xmtp_proto

This crate generates Rust definitions and methods for protobufs from https://github.com/xmtp/proto.
This crate generates Rust definitions and methods for protobufs from <https://github.com/xmtp/proto>.

Make sure to run `../dev/gen_protos.sh` and commit your changes whenever you need to consume new changes from the proto repo.
2 changes: 1 addition & 1 deletion xmtp_user_preferences/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# XTMP Personal Private Portable Preferences

A library for encrypting messages where the sender and recipient are the same (self-messaging).
A library for encrypting messages where the sender and recipient are the same (self-messaging).

0 comments on commit ebcecc2

Please sign in to comment.