Skip to content

Commit

Permalink
remove cbindgen
Browse files Browse the repository at this point in the history
  • Loading branch information
sagudev committed May 2, 2022
1 parent 6bf5888 commit e7939b5
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 22 deletions.
11 changes: 2 additions & 9 deletions .github/ISSUE_TEMPLATE/bug_report.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ body:
attributes:
value: |
# Please fill in the blanks below
many bugs can be solved easily and quickly with the information (especially logs).
- type: textarea
Expand All @@ -32,7 +32,7 @@ body:
attributes:
value: |
# The following fields are *optional*
but may be useful for debugging
- type: textarea
Expand Down Expand Up @@ -93,13 +93,6 @@ body:
placeholder: ex. 12
validations:
required: false
- type: input
id: env-cbindgen
attributes:
label: Version of `cbindgen`
placeholder: ex. 0.20
validations:
required: false
- type: input
id: env-ffigen
attributes:
Expand Down
5 changes: 3 additions & 2 deletions book/src/integrate/deps.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ Next, we need to install a few build-time and runtime dependencies.
These depdencies are required only in build-time:

- [`flutter_rust_bridge_codegen`](https://lib.rs/crates/flutter_rust_bridge_codegen), the core codegen for Rust-Dart glue code
- [`cbindgen`](https://lib.rs/crates/cbindgen), to generate C headers from Rust FFI code
- [`ffigen`](https://pub.dev/packages/ffigen), to generate Dart code from C headers
- [`cargo-xcode`](https://lib.rs/crates/cargo-xcode), to generate Xcode projects for iOS and MacOS
- A working installation of LLVM, see [Installing LLVM](https://pub.dev/packages/ffigen#installing-llvm)

An easy way to install most of these dependencies is to run:

```bash
cargo install flutter_rust_bridge_codegen cbindgen
cargo install flutter_rust_bridge_codegen
dart pub global activate ffigen
# if building for iOS or MacOS
cargo install cargo-xcode
Expand All @@ -25,6 +25,7 @@ cargo install cargo-xcode
On the Dart side, `flutter_rust_bridge` is the required runtime component of
`flutter_rust_bridge_codegen`. If you plan to use enum structs in Rust, the
following dependencies are also needed:

- `build_runner` (dev)
- `freezed` (dev)
- `freezed_annotation`
Expand Down
8 changes: 4 additions & 4 deletions book/src/setup_codegen.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
- [`flutter_rust_bridge_codegen`](https://lib.rs/crates/flutter_rust_bridge_codegen), the core codegen for Rust-Dart glue code
- [`cbindgen`](https://lib.rs/crates/cbindgen), to generate C headers from Rust FFI code
- [`ffigen`](https://pub.dev/packages/ffigen), to generate Dart code from C headers
- [`just`](https://github.com/casey/just), a modern command runner alternative to Make
- A working installation of LLVM, see [Installing LLVM](https://pub.dev/packages/ffigen#installing-llvm)

An easy way to install the first four dependencies is to run these commands:
An easy way to install the first three dependencies is to run these commands:

```shell
cargo install flutter_rust_bridge_codegen cbindgen just
cargo install flutter_rust_bridge_codegen just
dart pub global activate ffigen
```
```
8 changes: 4 additions & 4 deletions book/src/template/generate_install.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
First, you will need the following programs, preferably visible from your path:

- [`flutter_rust_bridge_codegen`](https://lib.rs/crates/flutter_rust_bridge_codegen), the core codegen for Rust-Dart glue code
- [`cbindgen`](https://lib.rs/crates/cbindgen), to generate C headers from Rust FFI code
- [`ffigen`](https://pub.dev/packages/ffigen), to generate Dart code from C headers
- [`just`](https://github.com/casey/just), a modern command runner alternative to Make
- A working installation of LLVM, see [Installing LLVM](https://pub.dev/packages/ffigen#installing-llvm)

An easy way to install the first four dependencies is to run these commands:
An easy way to install the first three dependencies is to run these commands:

```shell
cargo install flutter_rust_bridge_codegen cbindgen just
cargo install flutter_rust_bridge_codegen just
dart pub global activate ffigen
```

Alternatively, each of these dependencies may provide prebuilt binaries. Check with
your package manager and review them individually.
your package manager and review them individually.
4 changes: 1 addition & 3 deletions book/src/tutorial_with_flutter.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,8 @@ git clone https://github.com/fzyzcjy/flutter_rust_bridge && cd flutter_rust_brid

This step is optional, since I have generated the source code already (in quickstart). Even if you do it, you should not see anything changed.

Firstly, you may need to install dependencies of this library:
Firstly, you may need to install dependencie of this library:

* Install `cbindgen`: `cargo install cbindgen` <sub>(may [need latest version](https://github.com/fzyzcjy/flutter_rust_bridge/issues/53#issuecomment-939588321), thanks @gmorenz)</sub>
* Install `ffigen`: `dart pub global activate ffigen`, and [install LLVM](https://pub.dev/packages/ffigen#installing-llvm) which is required by `ffigen`.
* Install the codegen program: `cargo install flutter_rust_bridge_codegen`.

Expand Down Expand Up @@ -68,4 +67,3 @@ Same as Windows. If you install Flutter through `snap`, please be wary of [#53](
### MacOS app

Same as Windows. (P.S. Under the hood, `cargo-xcode` is used to automate the process)

0 comments on commit e7939b5

Please sign in to comment.