Skip to content

Commit

Permalink
organize readme
Browse files Browse the repository at this point in the history
  • Loading branch information
temeddix committed Sep 10, 2024
1 parent 72a52a9 commit e081476
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 27 deletions.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,15 @@ All platforms available with Flutter are [tested](https://github.com/cunarist/ri

## 📞 Communication

Below is Dart code with widgets, and following that is Rust code with business logic.
Below is Rust code with business logic, and following that is Dart code with widgets.

```rust
MyMessage {
current_number: 7,
other_bool: true,
}
.send_signal_to_dart();
```

```dart
StreamBuilder(
Expand All @@ -45,14 +53,6 @@ StreamBuilder(
),
```

```rust
MyMessage {
current_number: 7,
other_bool: true,
}
.send_signal_to_dart();
```

Of course, the opposite way from Dart to Rust is also possible in a similar manner.

All message classes and structs are generated by Rinf. You can define the message schema simply with Protobuf, making message passing between Dart and Rust very convenient.
Expand Down
18 changes: 9 additions & 9 deletions flutter_ffi_plugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,15 @@ All platforms available with Flutter are [tested](https://github.com/cunarist/ri

## 📞 Communication

Below is Dart code with widgets, and following that is Rust code with business logic.
Below is Rust code with business logic, and following that is Dart code with widgets.

```rust
MyMessage {
current_number: 7,
other_bool: true,
}
.send_signal_to_dart();
```

```dart
StreamBuilder(
Expand All @@ -45,14 +53,6 @@ StreamBuilder(
),
```

```rust
MyMessage {
current_number: 7,
other_bool: true,
}
.send_signal_to_dart();
```

Of course, the opposite way from Dart to Rust is also possible in a similar manner.

All message classes and structs are generated by Rinf. You can define the message schema simply with Protobuf, making message passing between Dart and Rust very convenient.
Expand Down
18 changes: 9 additions & 9 deletions rust_crate/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,15 @@ All platforms available with Flutter are [tested](https://github.com/cunarist/ri

## 📞 Communication

Below is Dart code with widgets, and following that is Rust code with business logic.
Below is Rust code with business logic, and following that is Dart code with widgets.

```rust
MyMessage {
current_number: 7,
other_bool: true,
}
.send_signal_to_dart();
```

```dart
StreamBuilder(
Expand All @@ -45,14 +53,6 @@ StreamBuilder(
),
```

```rust
MyMessage {
current_number: 7,
other_bool: true,
}
.send_signal_to_dart();
```

Of course, the opposite way from Dart to Rust is also possible in a similar manner.

All message classes and structs are generated by Rinf. You can define the message schema simply with Protobuf, making message passing between Dart and Rust very convenient.
Expand Down

0 comments on commit e081476

Please sign in to comment.