cunarist/rinf
Rust for native business logic, Flutter for flexible and beautiful GUI
Healthy across all four use cases
weakest axisPermissive license, no critical CVEs, actively maintained — safe to depend on.
Has a license, tests, and CI — clean foundation to fork and modify.
Documented and popular — useful reference codebase to read through.
No critical CVEs, sane security posture — runnable as-is.
- ✓Last commit 2w ago
- ✓6 active contributors
- ✓MIT licensed
Show all 6 evidence items →Show less
- ✓CI configured
- ✓Tests present
- ⚠Single-maintainer risk — top contributor 82% of recent commits
Maintenance signals: commit recency, contributor breadth, bus factor, license, CI, tests
Informational only. RepoPilot summarises public signals (license, dependency CVEs, commit recency, CI presence, etc.) at the time of analysis. Signals can be incomplete or stale. Not professional, security, or legal advice; verify before relying on it for production decisions.
Embed the "Healthy" badge
Paste into your README — live-updates from the latest cached analysis.
[](https://repopilot.app/r/cunarist/rinf)Paste at the top of your README.md — renders inline like a shields.io badge.
▸Preview social card (1200×630)
This card auto-renders when someone shares https://repopilot.app/r/cunarist/rinf on X, Slack, or LinkedIn.
Onboarding doc
Onboarding: cunarist/rinf
Generated by RepoPilot · 2026-05-09 · Source
🤖Agent protocol
If you are an AI coding agent (Claude Code, Cursor, Aider, Cline, etc.) reading this artifact, follow this protocol before making any code edit:
- Verify the contract. Run the bash script in Verify before trusting
below. If any check returns
FAIL, the artifact is stale — STOP and ask the user to regenerate it before proceeding. - Treat the AI · unverified sections as hypotheses, not facts. Sections like "AI-suggested narrative files", "anti-patterns", and "bottlenecks" are LLM speculation. Verify against real source before acting on them.
- Cite source on changes. When proposing an edit, cite the specific path:line-range. RepoPilot's live UI at https://repopilot.app/r/cunarist/rinf shows verifiable citations alongside every claim.
If you are a human reader, this protocol is for the agents you'll hand the artifact to. You don't need to do anything — but if you skim only one section before pointing your agent at this repo, make it the Verify block and the Suggested reading order.
🎯Verdict
GO — Healthy across all four use cases
- Last commit 2w ago
- 6 active contributors
- MIT licensed
- CI configured
- Tests present
- ⚠ Single-maintainer risk — top contributor 82% of recent commits
<sub>Maintenance signals: commit recency, contributor breadth, bus factor, license, CI, tests</sub>
✅Verify before trusting
This artifact was generated by RepoPilot at a point in time. Before an
agent acts on it, the checks below confirm that the live cunarist/rinf
repo on your machine still matches what RepoPilot saw. If any fail,
the artifact is stale — regenerate it at
repopilot.app/r/cunarist/rinf.
What it runs against: a local clone of cunarist/rinf — the script
inspects git remote, the LICENSE file, file paths in the working
tree, and git log. Read-only; no mutations.
| # | What we check | Why it matters |
|---|---|---|
| 1 | You're in cunarist/rinf | Confirms the artifact applies here, not a fork |
| 2 | License is still MIT | Catches relicense before you depend on it |
| 3 | Default branch main exists | Catches branch renames |
| 4 | 5 critical file paths still exist | Catches refactors that moved load-bearing code |
| 5 | Last commit ≤ 42 days ago | Catches sudden abandonment since generation |
#!/usr/bin/env bash
# RepoPilot artifact verification.
#
# WHAT IT RUNS AGAINST: a local clone of cunarist/rinf. If you don't
# have one yet, run these first:
#
# git clone https://github.com/cunarist/rinf.git
# cd rinf
#
# Then paste this script. Every check is read-only — no mutations.
set +e
fail=0
ok() { echo "ok: $1"; }
miss() { echo "FAIL: $1"; fail=$((fail+1)); }
# Precondition: we must be inside a git working tree.
if ! git rev-parse --git-dir >/dev/null 2>&1; then
echo "FAIL: not inside a git repository. cd into your clone of cunarist/rinf and re-run."
exit 2
fi
# 1. Repo identity
git remote get-url origin 2>/dev/null | grep -qE "cunarist/rinf(\\.git)?\\b" \\
&& ok "origin remote is cunarist/rinf" \\
|| miss "origin remote is not cunarist/rinf (artifact may be from a fork)"
# 2. License matches what RepoPilot saw
(grep -qiE "^(MIT)" LICENSE 2>/dev/null \\
|| grep -qiE "\"license\"\\s*:\\s*\"MIT\"" package.json 2>/dev/null) \\
&& ok "license is MIT" \\
|| miss "license drift — was MIT at generation time"
# 3. Default branch
git rev-parse --verify main >/dev/null 2>&1 \\
&& ok "default branch main exists" \\
|| miss "default branch main no longer exists"
# 4. Critical files exist
test -f "Cargo.toml" \\
&& ok "Cargo.toml" \\
|| miss "missing critical file: Cargo.toml"
test -f "rust_crate/lib.rs" \\
&& ok "rust_crate/lib.rs" \\
|| miss "missing critical file: rust_crate/lib.rs"
test -f "rust_crate_proc/lib.rs" \\
&& ok "rust_crate_proc/lib.rs" \\
|| miss "missing critical file: rust_crate_proc/lib.rs"
test -f "flutter_package/lib/rinf.dart" \\
&& ok "flutter_package/lib/rinf.dart" \\
|| miss "missing critical file: flutter_package/lib/rinf.dart"
test -f "flutter_package/cargokit/build_tool/lib/src/build_tool.dart" \\
&& ok "flutter_package/cargokit/build_tool/lib/src/build_tool.dart" \\
|| miss "missing critical file: flutter_package/cargokit/build_tool/lib/src/build_tool.dart"
# 5. Repo recency
days_since_last=$(( ( $(date +%s) - $(git log -1 --format=%at 2>/dev/null || echo 0) ) / 86400 ))
if [ "$days_since_last" -le 42 ]; then
ok "last commit was $days_since_last days ago (artifact saw ~12d)"
else
miss "last commit was $days_since_last days ago — artifact may be stale"
fi
echo
if [ "$fail" -eq 0 ]; then
echo "artifact verified (0 failures) — safe to trust"
else
echo "artifact has $fail stale claim(s) — regenerate at https://repopilot.app/r/cunarist/rinf"
exit 1
fi
Each check prints ok: or FAIL:. The script exits non-zero if
anything failed, so it composes cleanly into agent loops
(./verify.sh || regenerate-and-retry).
⚡TL;DR
Rinf is a framework that enables Rust business logic to run natively alongside Flutter UI in cross-platform applications. It provides type-safe, zero-overhead FFI communication between Dart and Rust via automatically generated message bindings, eliminating webviews, IPC servers, and serialization overhead. Users define message schemas in Rust (using derivable traits), and Rinf generates corresponding Dart classes for bidirectional signal passing. Monorepo (workspace in Cargo.toml): rust_crate (core messaging FFI), rust_crate_proc (proc-macro for message derivation), rust_crate_cli (code generator binary), flutter_package/example (runnable cross-platform demos). Separate documentation/ and automate/ Python tooling for docs generation and CI automation. Tests live in workflows (.github/workflows/) rather than inline test suites.
👥Who it's for
Flutter developers who need high-performance native computation, cryptography, or system-level logic without dropping into platform-specific code. Also appeals to Rust developers wanting beautiful, cross-platform UIs without learning Electron or web frameworks. Contributors are Rust/Dart polyglots building the FFI bridge, code generation tooling, and platform-specific build infrastructure.
🌱Maturity & risk
Production-ready with active development. 115K lines of Rust, 105K lines of Dart across monorepo, published on crates.io and pub.dev (both have version badges). Multi-platform CI/CD covers Linux, Android, Windows, macOS, iOS, Web via GitHub Actions (test_app.yaml, quality_control.yaml). Community stars and regular releases indicate sustained adoption, though eLinux support is marked experimental.
Single-maintainer GitHub organization (cunarist) raises bus-factor risk; no visible secondary maintainers. Workspace structure couples examples to main packages via [patch.crates-io], creating upgrade friction. Build complexity spans Rust, CMake, Swift, Kotlin, C++ (24K+ lines)—version skew across toolchains (Flutter, Rust MSRV, NDK/Xcode versions) can break CI. No visible deprecation policy for breaking Dart/Rust API changes.
Active areas of work
Active maintenance on quality_control.yaml and example_app.yaml workflows. Publication pipeline to crates.io and pub.dev via publication.yaml. Registry push for Docker images in demo/. Documentation living in documentation/source/ markdown files. Dependabot configuration (.github/dependabot.yaml) indicates active dependency management.
🚀Get running
Clone and prepare Rust + Flutter toolchains: git clone https://github.com/cunarist/rinf.git && cd rinf. Install Rust (rustup) and Flutter SDK. Run example: cd flutter_package/example && flutter pub get && flutter run. See documentation/source/installing-toolchains.md for detailed platform-specific setup (iOS requires Xcode, Android requires NDK, etc).
Daily commands:
After installing Rust and Flutter: cd flutter_package/example && flutter run (auto-compiles Rust via build.rs). Adjust platform flag: flutter run -d linux / -d chrome / -d ios. Use cargo build --manifest-path=flutter_package/example/native/Cargo.toml to rebuild Rust in isolation.
🗺️Map of the codebase
Cargo.toml— Workspace root configuration defining all Rust crate members (rinf, rinf_proc, example natives) and patch dependencies—essential for understanding the project structure.rust_crate/lib.rs— Core Rinf library entry point exposing the public API for Rust-Flutter messaging and state management.rust_crate_proc/lib.rs— Procedural macros for message definition and code generation—critical for the framework's developer experience.flutter_package/lib/rinf.dart— Flutter-side API for communicating with Rust backend; all GUI code uses this to interact with native logic.flutter_package/cargokit/build_tool/lib/src/build_tool.dart— Build orchestration system that compiles Rust code for multiple platforms (Android, iOS, Web, Desktop)—required reading for understanding cross-platform builds.documentation/source/messaging.md— Defines the messaging protocol and patterns between Rust and Flutter layers—foundational for any feature work.flutter_package/example/native/src/lib.rs— Example demonstrating the canonical Rust business logic structure with message handlers and state management.
🛠️How to make changes
Add a new Rust → Flutter message type
- Define the message struct in your native Rust crate with #[message] macro and serializable fields (
flutter_package/example/native/src/lib.rs) - Implement a message handler using #[async_handler] that processes the message and returns a response (
flutter_package/example/native/src/lib.rs) - On Flutter side, import the generated Dart bindings and call Isolate.sendMessage<YourMessageType>() to invoke the handler (
flutter_package/lib/rinf.dart) - Rebuild with 'flutter pub get' and 'flutter run' to regenerate Dart FFI bindings from Rust (
.github/workflows/test_app.yaml)
Add a new platform target (e.g., Windows, macOS)
- Create new builder module in cargokit/build_tool matching the pattern of build_gradle.dart or build_pod.dart (
flutter_package/cargokit/build_tool/lib/src) - Integrate the builder into build_tool.dart's main orchestration logic, invoking cargo for the target triple (
flutter_package/cargokit/build_tool/lib/src/build_tool.dart) - Add the target environment class in environment.dart, inheriting from base builder interface (
flutter_package/cargokit/build_tool/lib/src/environment.dart) - Update .cargo/config.toml in your native crate to specify linker and compiler flags for the new target (
flutter_package/example/native/.cargo/config.toml)
Add a new documentation page
- Create a new Markdown file in documentation/source/ following the naming convention (e.g., my-feature.md) (
documentation/source/introduction.md) - Add the file to the Sphinx toctree in index.md to include it in the navigation (
documentation/source/index.md) - Use code examples from flutter_package/example to illustrate concepts, embedded as code blocks (
documentation/source/tutorial.md) - Build locally with 'cd documentation && python -m server.py' and verify the page renders correctly (
documentation/server.py)
Add a new unit test for Rust logic
- Add a #[cfg(test)] mod in your native Rust crate with #[tokio::test] functions (
flutter_package/example/native/src/lib.rs) - Use rinf::test_utils or mock the message handlers directly without Flutter (
rust_crate/lib.rs) - Run tests locally with 'cargo test' in the native crate directory (
Cargo.toml) - CI will automatically run all #[tokio::test] tests when you push; see .github/workflows/quality_control.yaml (
.github/workflows/quality_control.yaml)
🔧Why these technologies
- Rust + Tokio — Type-safe, performant native business logic with async/await support; zero runtime overhead vs. GC languages
- Flutter + Dart — Hot reload, expressive Material/Cupertino UI, single codebase for iOS/Android/Web/Desktop GUIs
- FFI (Foreign Function Interface) — No JNI/platform channels overhead; direct memory-safe Rust↔Dart calls; enables zero-copy message passing
- Procedural Macros (rinf_proc) — Automates Dart code generation from Rust message definitions, eliminating manual serialization boilerplate
- Cargokit + platform builders — Abstracts away per-platform (Android Gradle, iOS CocoaPods, CMake, Hvigor) Rust compilation complexity
⚖️Trade-offs already made
-
Separate Rust (business logic) from Dart (UI) layers
- Why: Allows teams to work independently; Rust code can be tested without Flutter; clearer separation of concerns
- Consequence: Requires explicit message definitions and FFI serialization; more boilerplate than monolithic approach
-
Use async message handlers with Tokio runtime
- Why: Enables non-blocking Rust code; supports long-running operations (network, file I/O) without freezing UI
- Consequence: Developers must understand async/await; potential for race conditions if state access is not synchronized
-
Code-gen Dart bindings from Rust #[message] attributes
- Why: Reduces manual Dart-Rust contract definition; keeps schemas in one place; faster iteration
- Consequence: Developers must re-run code generation after schema changes; adds build step complexity
-
Single workspace with platform-specific build orchestration
- Why: One source of truth for message definitions and Rust code; simplifies version management
- Consequence: Cargokit build complexity; slower incremental builds on some platforms; harder to debug platform-specific issues
🚫Non-goals (don't propose these)
- Real-time multiplayer synchronization (no conflict resolution or CRDT built-in)
- Native GUI toolkit abstraction (only Flutter UI; no Swing/WinForms/GTK bindings)
- Mobile-specific features like push notifications or OS-level permissions (delegates to platform plugins)
- Backend server framework (Rinf is a client-native framework, not a web framework)
🪤Traps & gotchas
Isolate pairing: Rust isolate must be initialized before sending signals; forgetting await on Dart side blocks message delivery. MSRV: Rust minimum supported version not explicitly documented; check Cargo.toml for rust-version. CMake complexity: Platform-specific flags (iOS requires bitcode/signing, Android requires NDK path)—env vars like FLUTTER_ROOT and ANDROID_NDK_HOME must be set; ignored paths in .dockerignore but not documented in README. Proc-macro hygiene: Custom derive on non-struct types (enums without repr) may generate invalid Dart. Breaking FFI: Changing message field types or reordering without migration causes silent memory corruption on hot-reload.
🏗️Architecture
💡Concepts to learn
- Native Foreign Function Interface (FFI) — Rinf's zero-overhead communication model relies on Dart's native FFI to call Rust cdylib functions directly—understanding calling conventions, memory safety across language boundaries, and ABI compatibility is essential for debugging signal marshalling failures.
- Procedural Macros (Rust) — The #[derive(...)] attributes in rinf_proc generate boilerplate signal traits and serialization code at compile-time; misunderstanding macro expansion leads to cryptic compiler errors and incorrect Dart code generation.
- Isolates (Dart) — Rinf spawns Dart isolates to receive Rust signals without blocking the UI thread; isolate lifespan management and message-passing semantics are critical for preventing deadlocks and memory leaks in long-running apps.
- CMake Cross-Compilation — The build system uses CMake to target multiple platforms (iOS, Android, Windows, Linux, macOS) with platform-specific flags and toolchains; breaking CMake rules causes silent build failures or runtime crashes on unsupported architectures.
- Serde Serialization (Rust) — Message schemas derive Serialize/Deserialize via Serde; understanding Serde's field attributes (#[serde(rename)], #[serde(skip)]) is necessary for correctly mapping Rust struct fields to Dart generated classes.
- Symbol Visibility & Cdylib — Rust code compiled as a cdylib (dynamic library) must explicitly export symbols for FFI; missing #[no_mangle] or pub extern declarations causes undefined symbol errors on platform linkers.
- Memory-Mapped I/O & Zero-Copy — Rinf's efficiency comes from avoiding serialization overhead; understanding how Dart FFI memory pointers map to Rust slice lifetimes prevents use-after-free and double-free bugs in signal handlers.
🔗Related repos
fzyzcjy/flutter_rust_bridge— Direct competitor: generates Dart FFI bindings from Rust code, but more focused on struct/function mapping than signal streams; heavier boilerplate for message passing.samui/flutter_ffi— Earlier exploration of Flutter+Rust FFI; inspired parts of Rinf's design, less mature and community-maintained.tauri-apps/tauri— Similar Rust+UI architecture (Tauri uses web; Rinf uses Flutter), shared IPC/FFI patterns but targets desktop while Rinf targets mobile-first.flutter/flutter— Upstream dependency and primary user-facing framework; understanding Flutter platform channels and build.gradle/pubspec.yaml is required for Rinf extensibility.rust-lang/rust— Upstream Rust toolchain; MSRV compatibility and proc-macro stability directly impact Rinf's code generation correctness.
🪄PR ideas
To work on one of these in Claude Code or Cursor, paste:
Implement the "<title>" PR idea from CLAUDE.md, working through the checklist as the task list.
Add integration tests for protobuf message serialization/deserialization across platforms
The repo uses protobuf for Rust-Flutter messaging (referenced in documentation/source/messaging.md and documentation/source/field-types.md) but there are no visible integration tests validating that messages serialize correctly on Rust side and deserialize on Flutter side. This is critical for a framework centered on cross-platform communication. Tests should cover edge cases like nested messages, enum variants, and field attributes documented in documentation/source/field-attributes.md.
- [ ] Create tests/protobuf_integration_test.rs in rust_crate to test message encoding/decoding
- [ ] Add Flutter integration tests in flutter_package/test/messaging_test.dart covering deserialization
- [ ] Add CI step to .github/workflows/quality_control.yaml to run both test suites
- [ ] Document test patterns in documentation/source/unit-testing.md with protobuf examples
Add pre-built binary caching to GitHub Actions workflows to reduce build times
The repository has multiple CI workflows (.github/workflows/) that build Rust and Flutter for multiple platforms (test_app.yaml, example_app.yaml, user_app.yaml). These builds likely take 10+ minutes each. Caching compiled artifacts or using sccache would significantly improve contributor experience and reduce GitHub Actions usage.
- [ ] Add sccache setup step to .github/workflows/quality_control.yaml and .github/workflows/test_app.yaml
- [ ] Configure Rust cache action for Cargo artifacts in all Rust-building workflows
- [ ] Add Flutter dependency caching in example_app.yaml and test_app.yaml
- [ ] Document cache configuration in documentation/source/contribution.md
Add CLI documentation and examples for rust_crate_cli binary project
The Cargo.toml shows rust_crate_cli is explicitly excluded from the workspace members (handled separately with its own Cargo.lock), but there's no documentation in the documentation/source/ directory explaining how to use it or why it exists separately. This is confusing for contributors trying to understand the project structure.
- [ ] Create documentation/source/cli-tool.md documenting the purpose and usage of rust_crate_cli
- [ ] Add CLI examples showing how to invoke it from the project root
- [ ] Update documentation/source/configuration.md or README.md to reference when CLI tool is used
- [ ] Add a workflow in .github/workflows/ to test CLI binary compilation on each commit
🌿Good first issues
- Add inline Rust documentation examples to rust_crate/src/lib.rs for each public signal method (send_signal_to_dart, register_dart_stream_listener); currently only external docs exist in documentation/source/.
- Create integration test suite in .github/workflows/ that runs flutter test on flutter_package/example/ verifying Rust↔Dart message round-trips for all field-types.md supported types (currently only app-level CI, no unit tests).
- Document required environment variables (ANDROID_NDK_HOME, FLUTTER_ROOT, iOS signing identity) in a new documentation/source/environment-setup.md with platform-specific sections; currently scattered across comments.
⭐Top contributors
Click to expand
Top contributors
- @temeddix — 82 commits
- @dependabot[bot] — 13 commits
- @markuslevonyak — 2 commits
- @gavinliu — 1 commits
- @Kindness — 1 commits
📝Recent commits
Click to expand
Recent commits
f9c390a— Use Ty for Python type checking (#676) (temeddix)36cdb06— Version 8.10.0 (temeddix)c6d0d5b— Support ohos (#665) (gavinliu)374a37e— Bump docker/build-push-action from 6 to 7 (#671) (dependabot[bot])6250a79— Bump docker/setup-buildx-action from 3 to 4 (#670) (dependabot[bot])7d4983c— Version 8.9.1 (temeddix)f44cebe— fix: no debug_print truncation (#667) (markuslevonyak)9dcaae0— Merge pull request #663 from cunarist/cargokit-update (temeddix)0b9bbb4— Update Cargokit (temeddix)7d13527— Version 8.9.0 (temeddix)
🔒Security observations
The Rinf codebase demonstrates a reasonable security posture with workspace configuration, CI/CD pipelines, and dependency management. Primary concerns include patch overrides that could introduce supply chain risks, separate Cargo.lock management for binary exclusions, and missing automated dependency vulnerability scanning. No obvious hardcoded secrets, SQL injection risks, or XSS vectors were detected in the file structure. Recommendations focus on strengthening supply chain security, implementing automated vulnerability scanning, and containerization best practices.
- Medium · Workspace Patch Override Configuration —
Cargo.toml - [patch.crates-io] section. The Cargo.toml uses [patch.crates-io] to override official crate versions with local paths. While this is intentional for development, it creates a risk if the local paths are compromised or if this configuration is accidentally committed with unauthorized patches. This could lead to supply chain attacks where dependencies are silently replaced with malicious code. Fix: Ensure patch overrides are only used in development environments. Consider using separate Cargo.toml configurations for development vs. production. Document the necessity of these patches and implement CI/CD validation to prevent accidental inclusion of unauthorized patches. - Medium · Excluded Binary Crate with Separate Cargo.lock —
Cargo.toml - exclude field. The rust_crate_cli is excluded from the workspace and maintains its own Cargo.lock. This creates potential for version divergence and inconsistent dependency management between the main application and the CLI tool, potentially introducing security vulnerabilities if the CLI uses outdated or vulnerable dependencies. Fix: Justify the need for a separate Cargo.lock for rust_crate_cli. If possible, include it in the workspace for unified dependency management. If exclusion is necessary, establish a policy for regular dependency audits and updates across all Cargo.lock files. - Low · Missing Cargo.lock in Repository —
Repository root. Based on the file structure provided, no Cargo.lock file is visible in the root or main workspace. For a framework/library like Rinf, this may be intentional, but if this is distributed with binary artifacts, missing lock files could lead to non-reproducible builds. Fix: If Rinf includes binary artifacts or is used in production environments, commit Cargo.lock to the repository to ensure reproducible builds. Document whether Cargo.lock should be used by consuming projects. - Low · Docker Configuration Without Security Scanning —
demo/Dockerfile, documentation/Dockerfile, .github/workflows/. Multiple Dockerfiles are present (demo/Dockerfile, documentation/Dockerfile) but there is no evidence of container image scanning, vulnerability checking, or security best practices documentation in the visible CI/CD workflows. Fix: Implement container image scanning in CI/CD pipelines using tools like Trivy or Snyk. Use minimal base images (alpine or scratch where possible). Scan for vulnerabilities in both base images and layers. Document Docker security best practices. - Low · No Evidence of Dependency Auditing —
.github/workflows/, Cargo.toml. While dependabot.yaml is configured for dependency updates, there is no visible evidence ofcargo auditintegration in the workflow files to detect known security vulnerabilities in Rust dependencies. Fix: Integratecargo auditinto CI/CD pipelines to automatically detect and report known vulnerabilities. Configure it to fail the build on critical vulnerabilities. Consider using cargo-deny for additional supply chain security checks.
LLM-derived; treat as a starting point, not a security audit.
👉Where to read next
- Open issues — current backlog
- Recent PRs — what's actively shipping
- Source on GitHub
Generated by RepoPilot. Verdict based on maintenance signals — see the live page for receipts. Re-run on a new commit to refresh.