Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use derive macros to define signals between Dart and Rust #527

Draft
wants to merge 217 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
217 commits
Select commit Hold shift + click to select a range
001a4c6
Add an experimental crate
temeddix Feb 25, 2025
b2edf4f
Merge branch 'main' into derive-signals
temeddix Feb 28, 2025
1173bae
Merge branch 'main' into derive-signals
temeddix Feb 28, 2025
188ef4e
Write a minimal parsing code
temeddix Feb 28, 2025
253a590
Simplify test parsing code
temeddix Feb 28, 2025
cd553b3
Add a comment
temeddix Mar 1, 2025
133dc9f
Print fields
temeddix Mar 1, 2025
e29f037
Search inside modules
temeddix Mar 1, 2025
540c63e
Organize testing code
temeddix Mar 1, 2025
119239b
Collect `serde-reflection` compatible `Registry`
temeddix Mar 1, 2025
01560a2
Collect type formats properly
temeddix Mar 1, 2025
431c26c
Improve type collection
temeddix Mar 1, 2025
0c035f7
Collect more types
temeddix Mar 1, 2025
8f18077
Use `serde_generate` to generate Dart code
temeddix Mar 1, 2025
761ee91
Make `rinf` command generate unusable Dart code
temeddix Mar 1, 2025
eeabbac
Make the generator produce better code
temeddix Mar 2, 2025
c55de7e
Extract type infos with `syn`
temeddix Mar 2, 2025
afaa275
Handle `Tuple` and `TupleArray`
temeddix Mar 2, 2025
eb32fb8
Split long comments
temeddix Mar 2, 2025
6553fbb
Remove unneeded test code
temeddix Mar 2, 2025
91d5204
Remove an unused function
temeddix Mar 2, 2025
f1db958
Remove external todo comments
temeddix Mar 2, 2025
e0feb20
Add a todo comment
temeddix Mar 2, 2025
af86484
Organize Python scripts
temeddix Mar 2, 2025
4f8d2cf
Check Python script in CI
temeddix Mar 2, 2025
f1ad9ac
Break Python script
temeddix Mar 2, 2025
caca272
Fix Pyright warning
temeddix Mar 2, 2025
ad59b04
Fix Ruff warning
temeddix Mar 2, 2025
38d4ba7
Remove a todo comment
temeddix Mar 2, 2025
8a8f307
Merge pull request #525 from cunarist/check-python-code-ci
temeddix Mar 2, 2025
19b7d86
Organize directory code in automation script
temeddix Mar 2, 2025
cf7b4b8
Cache dependencies in CI
temeddix Mar 2, 2025
13c5844
Format `example/pubspec.yaml`
temeddix Mar 2, 2025
e8e0788
Format `example/pubspec.yaml`
temeddix Mar 2, 2025
1359dfe
Make Rinf command work in CI
temeddix Mar 2, 2025
010511e
Fix wrong SDK expression
temeddix Mar 2, 2025
5822d5b
Fix paths in Python script
temeddix Mar 2, 2025
5361f6f
Use consistent cache naming
temeddix Mar 2, 2025
fd4cd47
Revert "Use consistent cache naming"
temeddix Mar 2, 2025
bc67327
Use consistent cache naming
temeddix Mar 2, 2025
e6e2ed4
Organize cache names and add `restore-keys`
temeddix Mar 2, 2025
7622cc3
Fallback to same runner when restoring CI caches
temeddix Mar 2, 2025
a612ec7
Update names of CI
temeddix Mar 2, 2025
7e401e6
Unify cache step
temeddix Mar 2, 2025
617f698
Update wrong paths
temeddix Mar 2, 2025
d980e3f
Organize workspace `Cargo.toml`
temeddix Mar 2, 2025
9a71185
Merge pull request #526 from cunarist/cache-actions
temeddix Mar 2, 2025
91a65e7
Implement `rinf gen`, `rinf server`, and `rinf config` in Rust
temeddix Mar 2, 2025
a998df1
Generate signal class in Dart from attributes
temeddix Mar 2, 2025
71323e8
Remove debugging prints
temeddix Mar 2, 2025
67443c5
Merge branch 'cache-actions' into derive-signals
temeddix Mar 2, 2025
5764e66
Remove Protobuf files from template
temeddix Mar 2, 2025
6b2b425
Implement `rinf template` in Rust
temeddix Mar 2, 2025
7599078
Implement `build_webassembly` in Rust
temeddix Mar 2, 2025
ab07e26
Fix an error
temeddix Mar 2, 2025
8bb5c98
Organize code
temeddix Mar 2, 2025
4993814
Restore some comments
temeddix Mar 2, 2025
e46bed1
Watch Rust code to regenerate Dart files
temeddix Mar 2, 2025
07154ec
Remove unneeded function
temeddix Mar 2, 2025
ad1387c
Add a todo comment
temeddix Mar 2, 2025
cd68e59
Remove Dart binary code
temeddix Mar 2, 2025
06f9249
Restore todo comments
temeddix Mar 2, 2025
2567fb5
Organize various things
temeddix Mar 2, 2025
99b9e1a
Add clippy lint rules in proc crate too
temeddix Mar 2, 2025
e3d2c53
Add a todo comment
temeddix Mar 2, 2025
d51bd04
Add a comment
temeddix Mar 2, 2025
2f2d19a
Update docs and comments
temeddix Mar 2, 2025
385fb8c
Remove outdated doc sections
temeddix Mar 2, 2025
1160548
Add a todo comment
temeddix Mar 2, 2025
2bb17b3
Remove unused Dart dependencies
temeddix Mar 2, 2025
b85b618
Update a comment
temeddix Mar 2, 2025
82874a8
Add dummy methods to attributes
temeddix Mar 2, 2025
2a9245b
Improve doc comments
temeddix Mar 2, 2025
a920db0
Rename a module
temeddix Mar 2, 2025
2ad0407
Add a todo comment
temeddix Mar 2, 2025
ef3f0cb
Only ignore markdown files in CI
temeddix Mar 2, 2025
5629d3b
Add a todo comment
temeddix Mar 3, 2025
076c6f6
Add a todo comment
temeddix Mar 3, 2025
68c6c85
Comment out some Clippy rules temporarily
temeddix Mar 3, 2025
045ab8c
Write Rust-side message interface
temeddix Mar 3, 2025
82a6019
Fix an error inside example crate code
temeddix Mar 3, 2025
8e4f43d
Organize proc macro code
temeddix Mar 3, 2025
4d570c5
Add a todo comment
temeddix Mar 3, 2025
d4613ca
Remove old interface code
temeddix Mar 3, 2025
a4b55f0
Rename `Signal` to `SignalPiece`
temeddix Mar 3, 2025
6bfefac
Update a comment
temeddix Mar 3, 2025
f4adb39
Update a generator code
temeddix Mar 3, 2025
494f6ff
Add `rinf` prefix to symbols
temeddix Mar 3, 2025
c42b3cf
Add a todo comment
temeddix Mar 3, 2025
5c737c8
Generate extension methods in Dart
temeddix Mar 3, 2025
a48229c
Add proc macros for binary signals
temeddix Mar 3, 2025
2ed6bfe
Cache dynamic library functions
temeddix Mar 3, 2025
c05ac4d
Update a comment
temeddix Mar 3, 2025
8a42790
Remove an unused file
temeddix Mar 3, 2025
84a93a1
Add a todo comment
temeddix Mar 3, 2025
ef83d16
Write interface code in each class file
temeddix Mar 3, 2025
33cad42
Update signal variants
temeddix Mar 3, 2025
0ab3d13
Write shared code in `rinf_interface.dart`
temeddix Mar 3, 2025
fe1bfbb
Write `rustSignalHandlers`
temeddix Mar 3, 2025
5d0d9fa
Properly assign Rust signals
temeddix Mar 3, 2025
2888bcc
Use `BTree` structures for order consistency
temeddix Mar 3, 2025
220978a
Modify class file in its function
temeddix Mar 3, 2025
597d9c5
Remove an unused import
temeddix Mar 3, 2025
ba86b7e
Make `rustSignalStream` recognizable
temeddix Mar 3, 2025
36a8618
Add a todo comment
temeddix Mar 3, 2025
0849715
Organize dependencies
temeddix Mar 3, 2025
0675ad3
Remove an unneeded declaration
temeddix Mar 3, 2025
b6dbcb6
Upgrade `serde-generate`
temeddix Mar 3, 2025
116081f
Reduce indentations
temeddix Mar 3, 2025
8f4b63f
Update template code
temeddix Mar 3, 2025
80d921d
Update Dart imports
temeddix Mar 3, 2025
65e57a6
Format a proc macro code
temeddix Mar 3, 2025
3ecc571
Fix string manipulation in proc macro
temeddix Mar 3, 2025
25ee4ab
Generate code
temeddix Mar 3, 2025
61d94a9
Fix compile error on the web
temeddix Mar 3, 2025
55d995a
Apply latest Flutter template to the example app
temeddix Mar 3, 2025
f418101
Merge branch 'main' into derive-signals
temeddix Mar 3, 2025
01274f1
Organize code
temeddix Mar 3, 2025
e9ae14d
Improve Python script
temeddix Mar 3, 2025
52791eb
Organize docs
temeddix Mar 8, 2025
60f4675
Add a todo comment
temeddix Mar 8, 2025
c586bb5
Replace a deprecated Dart statement
temeddix Mar 8, 2025
fbb760f
Make generated code work on all platforms
temeddix Mar 8, 2025
bc595a3
Remove Flutter build folder from CI caching
temeddix Mar 8, 2025
c736ad3
Fix Flutter package conflicts
temeddix Mar 8, 2025
e454fb8
Apply macOS builds
temeddix Mar 8, 2025
f76e525
Apply iOS builds
temeddix Mar 8, 2025
03b6eaf
Format a markdown file
temeddix Mar 8, 2025
dd9716b
Update a comment
temeddix Mar 8, 2025
5f4cde2
Remove external todo comments again
temeddix Mar 9, 2025
44a6dbf
Update example app description
temeddix Mar 9, 2025
5770f03
Organize GitHub CI
temeddix Mar 9, 2025
c24a04a
Update a dependency of example app
temeddix Mar 9, 2025
4eae533
Fix CI
temeddix Mar 9, 2025
dfcd78d
Revert "Fix CI"
temeddix Mar 9, 2025
79a5952
Add todo comments
temeddix Mar 9, 2025
01a2649
Make a generated Dart method private
temeddix Mar 9, 2025
847e8ef
Simplify generated code
temeddix Mar 9, 2025
de6571b
Use `distributed_slice` to call extern Rust function
temeddix Mar 9, 2025
112a485
Re-export `bincode` items
temeddix Mar 9, 2025
3b12e47
Clarify NDK version in example app
temeddix Mar 9, 2025
3074337
Organize OS interface code in Dart
temeddix Mar 9, 2025
feae5a7
Remove warnings
temeddix Mar 9, 2025
aa507bc
Dynamically lookup for Dart signal sending symbols
temeddix Mar 9, 2025
7f42cf2
Organize Git ignore files
temeddix Mar 9, 2025
03e1759
Format template `.gitignore` file
temeddix Mar 9, 2025
ae83b0b
Use `bincode` 2.0
temeddix Mar 9, 2025
4d6b8e9
Remove unnecessary files after generation
temeddix Mar 9, 2025
0b9a70d
Update imports
temeddix Mar 9, 2025
bbdb2db
Revert "Use `bincode` 2.0"
temeddix Mar 9, 2025
537ea13
Format a proc macro
temeddix Mar 9, 2025
be4e6bf
Use Rust 2024 edition
temeddix Mar 9, 2025
beca5b0
Remove a todo comment
temeddix Mar 9, 2025
7e29c4c
Remove an unneeded `unsafe` keyword
temeddix Mar 9, 2025
5dceba3
Use the name `AppError` and `SetupError` for errors
temeddix Mar 10, 2025
814f899
Remove `thiserror`
temeddix Mar 10, 2025
e3639c4
Organize code
temeddix Mar 10, 2025
a44cc6e
Update publishing CI
temeddix Mar 10, 2025
e17729b
Make crates publishable
temeddix Mar 10, 2025
c08352d
Organize Python automation script
temeddix Mar 10, 2025
a3db198
Organize Python code
temeddix Mar 10, 2025
dbd0c20
Fix `run_subprocess` Python function
temeddix Mar 10, 2025
00ab4e9
Organize Python workspace
temeddix Mar 10, 2025
07f1b23
Copy server command to clipboard
temeddix Mar 10, 2025
1d3e295
Remove a comment
temeddix Mar 10, 2025
5d36c8d
Separate the CLI crate
temeddix Mar 10, 2025
00cee84
Add a doc guide
temeddix Mar 10, 2025
4d7b5ea
Update CI
temeddix Mar 10, 2025
188a75d
Upgrade resolver in template workspace
temeddix Mar 10, 2025
9b82766
Avoid a warning
temeddix Mar 10, 2025
75c60a8
Update CLI help sentences
temeddix Mar 10, 2025
2924894
Fix a typo
temeddix Mar 10, 2025
20df202
Remove debugging code
temeddix Mar 10, 2025
10a4de9
Activate `derive` feature of `serde`
temeddix Mar 10, 2025
509b43a
Fix linting errors on `wasm32-unknown-unknown`
temeddix Mar 10, 2025
abeab00
Remove a todo comment
temeddix Mar 10, 2025
a6e3032
Organize `Mutex`-related code
temeddix Mar 10, 2025
6866b2c
Directly import things from crate root
temeddix Mar 10, 2025
3ce19f0
Organize the sample crate
temeddix Mar 10, 2025
d42a2b0
Organize traits
temeddix Mar 10, 2025
a502a52
Fix errors on the web
temeddix Mar 10, 2025
6a04cee
Rename an internal trait `GuardRecovery`
temeddix Mar 10, 2025
b5a627d
Organize imports
temeddix Mar 10, 2025
bcb5d48
Add a todo item
temeddix Mar 10, 2025
beab548
Update a comment
temeddix Mar 10, 2025
657b7e9
Organize results and imports in CLI crate
temeddix Mar 10, 2025
0f4a305
Remove warnings
temeddix Mar 10, 2025
5c9e207
Ban all `unwrap` or `expect`s
temeddix Mar 10, 2025
ce14a15
Organize `ReflectionModule` variant
temeddix Mar 10, 2025
3f47040
Organize `PubConfig` error variant
temeddix Mar 10, 2025
140928e
Remove some finished todo comments
temeddix Mar 10, 2025
36d6936
Organize imports
temeddix Mar 10, 2025
c1d230b
Organize imports in proc macros
temeddix Mar 10, 2025
60510a9
Remove a todo comment
temeddix Mar 10, 2025
c929e76
Organize code
temeddix Mar 11, 2025
26478a3
Organize error messages
temeddix Mar 11, 2025
cf3842e
Organize error variants
temeddix Mar 11, 2025
4aa98de
Organize `SetupError` messages and conversions
temeddix Mar 11, 2025
ea2d4e2
Remove an unused `AppError` variant
temeddix Mar 11, 2025
2d397af
Organize error codes
temeddix Mar 11, 2025
fa80e9c
Add a comment
temeddix Mar 11, 2025
4b6e7c1
Use `derive` feature of `clap` for type safety
temeddix Mar 11, 2025
e63ec27
Organize CLI code
temeddix Mar 11, 2025
1bd4a96
Remove unneeded code
temeddix Mar 11, 2025
6247bb4
Remove unneeded blank lines
temeddix Mar 11, 2025
98d598d
Organize imports
temeddix Mar 11, 2025
e986323
Remove unnecessary borrowing
temeddix Mar 11, 2025
cd7a634
Remove a todo comment
temeddix Mar 11, 2025
b0046b2
Improve a CLI message
temeddix Mar 11, 2025
2fbd1d5
Update a todo comment
temeddix Mar 11, 2025
059bb56
Add a comment
temeddix Mar 11, 2025
868168a
Add a todo comment
temeddix Mar 11, 2025
5735c14
Try specifying Rust targets in CI
temeddix Mar 11, 2025
7c55580
Revert "Try specifying Rust targets in CI"
temeddix Mar 11, 2025
99a0898
Update the automation script help output
temeddix Mar 15, 2025
20091b5
Use `uv` in CI
temeddix Mar 15, 2025
d25a571
Add a todo comment
temeddix Mar 17, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 25 additions & 16 deletions .github/workflows/example_app.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
# Verify that the example app works properly.
name: example-app
name: Example App

on:
push:
branches:
- main
paths-ignore:
- "**.md"
- "**.html"
pull_request:
paths-ignore:
- "**.md"
- "**.html"
workflow_dispatch:

concurrency:
Expand All @@ -27,21 +25,21 @@ concurrency:
jobs:
build:
name: ${{ matrix.runner }} / ${{ matrix.target }}
runs-on: ${{ matrix.runner }}
runs-on: ${{ matrix.runner }}-latest
strategy:
fail-fast: false # Important
matrix:
runner: [ubuntu-latest, windows-latest, macos-latest]
runner: [ubuntu, windows, macos]
target: [android, web] # On all platforms
include:
# Specify targets for each platform
- runner: ubuntu-latest
- runner: ubuntu
target: linux
- runner: windows-latest
- runner: windows
target: windows
- runner: macos-latest
- runner: macos
target: macos
- runner: macos-latest
- runner: macos
target: ios

steps:
Expand All @@ -50,6 +48,20 @@ jobs:
with:
submodules: true

- name: Cache dependencies
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
target
~/.pub-cache
key: >
${{ matrix.runner }}-${{ matrix.target }}
${{ hashFiles('**/Cargo.toml', '**/pubspec.yaml') }}
restore-keys: |
${{ matrix.runner }}-${{ matrix.target }}
${{ matrix.runner }}

- name: Setup Flutter SDK
uses: subosito/flutter-action@v2
with:
Expand All @@ -71,17 +83,14 @@ jobs:
distribution: "zulu"
java-version: "17"

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install the Python environment manager
uses: astral-sh/setup-uv@v5

- name: Install the CLI tool
working-directory: rust_crate/
run: cargo install --path ./
run: cargo install --path rust_crate_cli

- name: Prepare a Flutter app for testing
run: python automate prepare-example-app
run: uv run automate prepare-example-app

- name: Build the example app
if: matrix.target == 'linux'
Expand Down
17 changes: 10 additions & 7 deletions .github/workflows/publication.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Publish packages online.
# This is performed only when a new Git tag
# with version information is added.
name: publication
name: Publication

# With default Git settings, Unix-like systems use LF (`\n`) for new lines,
# while Windows uses CRLF (`\r\n`) in local repositories.
Expand Down Expand Up @@ -54,12 +54,15 @@ jobs:
# Save the `crates.io` API token at
# `GitHub repo - Settings - Security - Secrets and variables - Actions`.

- name: Check the Rust crate
working-directory: rust_crate/
run: cargo publish --dry-run
- name: Check Rust crates
run: |
cargo publish --dry-run --manifest-path rust_crate_proc/Cargo.toml
cargo publish --dry-run --manifest-path rust_crate_command/Cargo.toml
cargo publish --dry-run --manifest-path rust_crate/Cargo.toml

- name: Publish the Rust crate
working-directory: rust_crate/
- name: Publish Rust crates
run: |
cargo login ${{ secrets.CRATES_IO_API_TOKEN }}
cargo publish
cargo publish --manifest-path rust_crate_proc/Cargo.toml
cargo publish --manifest-path rust_crate_command/Cargo.toml
cargo publish --manifest-path rust_crate/Cargo.toml
26 changes: 21 additions & 5 deletions .github/workflows/quality_control.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Confirm that the code and configuration files
# are correctly formatted and analyzed.
name: quality-control
name: Quality Control

on:
push:
Expand Down Expand Up @@ -42,17 +42,16 @@ jobs:
run: rustup component add clippy

- name: Install the CLI tool
working-directory: rust_crate/
run: cargo install --path ./
run: cargo install --path rust_crate_cli

- name: Fetch Flutter dependencies
run: |
flutter pub get --directory flutter_package/
flutter pub get --directory flutter_package/cargokit/build_tool

- name: Generate message files
- name: Generate signal files
working-directory: flutter_package/example/
run: rinf message
run: rinf gen

# Targets are basically combinations of
# web/native and debug/release.
Expand Down Expand Up @@ -85,6 +84,23 @@ jobs:
- name: Check if the code has changed
run: git diff --exit-code

script:
name: python-script
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install the Python environment manager
uses: astral-sh/setup-uv@v5

- name: Run Pyright
run: uv run pyright

- name: Run Ruff
run: uv run ruff check .

config:
name: configuration-files
runs-on: ubuntu-latest
Expand Down
41 changes: 25 additions & 16 deletions .github/workflows/test_app.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
# Verify that the app build works as intended
# when utilizing the code inside the repository.
name: test-app
name: Test App

on:
push:
branches:
- main
paths-ignore:
- "**.md"
- "**.html"
pull_request:
paths-ignore:
- "**.md"
- "**.html"
workflow_dispatch:

concurrency:
Expand All @@ -28,21 +26,21 @@ concurrency:
jobs:
build:
name: ${{ matrix.runner }} / ${{ matrix.target }}
runs-on: ${{ matrix.runner }}
runs-on: ${{ matrix.runner }}-latest
strategy:
fail-fast: false # Important
matrix:
runner: [ubuntu-latest, windows-latest, macos-latest]
runner: [ubuntu, windows, macos]
target: [android, web] # On all platforms
include:
# Specify targets for each platform
- runner: ubuntu-latest
- runner: ubuntu
target: linux
- runner: windows-latest
- runner: windows
target: windows
- runner: macos-latest
- runner: macos
target: macos
- runner: macos-latest
- runner: macos
target: ios

steps:
Expand All @@ -51,6 +49,20 @@ jobs:
with:
submodules: true

- name: Cache dependencies
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
target
~/.pub-cache
key: >
${{ matrix.runner }}-${{ matrix.target }}
${{ hashFiles('**/Cargo.toml', '**/pubspec.yaml') }}
restore-keys: |
${{ matrix.runner }}-${{ matrix.target }}
${{ matrix.runner }}

- name: Setup Flutter SDK
uses: subosito/flutter-action@v2
with:
Expand All @@ -72,17 +84,14 @@ jobs:
distribution: "zulu"
java-version: "17"

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install the Python environment manager
uses: astral-sh/setup-uv@v5

- name: Install the CLI tool
working-directory: rust_crate/
run: cargo install --path ./
run: cargo install --path rust_crate_cli

- name: Prepare a Flutter app for testing
run: python automate prepare-test-app
run: uv run automate prepare-test-app

- name: Build the example app
if: matrix.target == 'linux'
Expand Down
39 changes: 25 additions & 14 deletions .github/workflows/user_app.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Verify that the documentation steps function as intended
# when users utilize released versions
# instead of the code from the repository.
name: user-app
name: User App

on:
workflow_dispatch:
Expand All @@ -11,21 +11,21 @@ on:
jobs:
build:
name: ${{ matrix.runner }} / ${{ matrix.target }}
runs-on: ${{ matrix.runner }}
runs-on: ${{ matrix.runner }}-latest
strategy:
fail-fast: false # Important
matrix:
runner: [ubuntu-latest, windows-latest, macos-latest]
runner: [ubuntu, windows, macos]
target: [android, web] # On all platforms
include:
# Specify targets for each platform
- runner: ubuntu-latest
- runner: ubuntu
target: linux
- runner: windows-latest
- runner: windows
target: windows
- runner: macos-latest
- runner: macos
target: macos
- runner: macos-latest
- runner: macos
target: ios

steps:
Expand All @@ -34,6 +34,20 @@ jobs:
with:
submodules: true

- name: Cache dependencies
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
target
~/.pub-cache
key: >
${{ matrix.runner }}-${{ matrix.target }}
${{ hashFiles('**/Cargo.toml', '**/pubspec.yaml') }}
restore-keys: |
${{ matrix.runner }}-${{ matrix.target }}
${{ matrix.runner }}

- name: Setup Flutter SDK
uses: subosito/flutter-action@v2
with:
Expand All @@ -55,17 +69,14 @@ jobs:
distribution: "zulu"
java-version: "17"

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install the Python environment manager
uses: astral-sh/setup-uv@v5

- name: Install the CLI tool
working-directory: rust_crate/
run: cargo install rinf
run: cargo install rinf_cli

- name: Prepare a Flutter app for testing
run: python automate prepare-user-app
run: uv run automate prepare-user-app

- name: Build the example app
if: matrix.target == 'linux'
Expand Down
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ migrate_working_dir/
build/

# Rust related
.cargo/
target/
/.cargo/
/target/

# Others
*.lock
Expand Down
3 changes: 2 additions & 1 deletion .rustfmt.toml
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
max_width = 80 # This matches the maximum line length used in Dart
style_edition = "2024"
max_width = 80 # This matches the maximum line length used in Dart
13 changes: 10 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
[workspace]
members = ["./flutter_package/example/native/*", "./rust_crate"]
resolver = "2"
resolver = "3"
members = [
"flutter_package/example/native/*",
"rust_crate",
"rust_crate_cli",
"rust_crate_proc",
]

[patch.crates-io]
rinf = { path = "./rust_crate" }
rinf = { path = "rust_crate" }
rinf_cli = { path = "rust_crate_cli" }
rinf_proc = { path = "rust_crate_proc" }
Loading
Loading