Skip to content

Commit 17b16f1

Browse files
committed
chore: added branch information for all attempts
1 parent cb8375d commit 17b16f1

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

doc/feature_attempts/hurl.md

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,19 @@ I initially started with the approach of writing my own parser using `petitparse
77
Following the maintainer's suggestion, I began developing a wrapper for the Hurl parser using `flutter_rust_bridge`. Since the documentation for the library can be sparse, I’ve documented my steps for clarity:
88

99
1. **Creating the Library:**
10-
10+
1111
- I ran the command:
12-
13-
`flutter_rust_bridge_codegen create hurl --template plugin`
14-
12+
`flutter_rust_bridge_codegen create hurl --template plugin`
1513
- This initialized the project.
14+
1615
2. **Adding the Parse Function:**
17-
16+
1817
- I added the library code and the `parse_hurl` function in `rust/src/api/simple.rs`.
18+
1919
3. **Generating the Flutter Side Code:**
20-
20+
2121
- I ran:
22-
23-
24-
`flutter_rust_bridge_codegen generate`
25-
22+
`flutter_rust_bridge_codegen generate`
2623
- This generated all the necessary code for Flutter and all the targeted platforms.
2724

2825
`flutter_rust_bridge` uses a tool called `cargokit` to manage dependencies, acting as a glue layer between Flutter and Rust. Unfortunately, `cargokit` is still experimental, with little documentation available. The [blog post by Matej Knopp](https://matejknopp.com/post/flutter_plugin_in_rust_with_no_prebuilt_binaries/) provided valuable insights. One crucial takeaway was avoiding the Homebrew installation of Rust and instead using `rustup`. This resolved platform compilation issues for me, though the project is still not compiling entirely.
@@ -31,8 +28,8 @@ Following the maintainer's suggestion, I began developing a wrapper for the Hurl
3128

3229
I postponed multi-platform compilation issues to focus on writing the wrapper code. By reviewing the `hurl.dev` documentation and examples, I identified the required structure:
3330

34-
- `HurlFile` → List of `Entries`
35-
- `Entries``Request` and `Response`
31+
- `HurlFile` → List of `Entries`
32+
- `Entries``Request` and `Response`
3633

3734
Based on this, I created models in Dart using the `freezed` package. The goal was to convert the JSON output from the Hurl parser into Dart data models. I am confident this part turned out well.
3835

@@ -63,3 +60,8 @@ At this point, I’ve committed all my code to the repository in a fork. Here ar
6360
3. **Revisit My Custom Parser**: Complete the parser I started building with `petitparser`.
6461

6562
If anyone knows a solution to these challenges or has suggestions, I’d appreciate the help!
63+
64+
Current Branches in my fork:
65+
66+
- [Hurl Parser with flutter_rust_bridge](https://github.com/WrathOP/apidash/tree/hurl-parser-rust)
67+
- [Hurl Parser with petiteparser](https://github.com/WrathOP/apidash/tree/hurl-parser-added)

0 commit comments

Comments
 (0)