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

Create rust-interop.md #6237

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
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
21 changes: 21 additions & 0 deletions src/content/interop/rust-interop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
title: "Using Rust with Dart: Interop Guide"
description: "Learn how to integrate Rust code into your Dart or Flutter project with flutter_rust_bridge."
---

# Using Rust Code in Dart Programs

Integrating Rust with Dart enables high-performance native functionality in your Flutter applications. This guide introduces a popular package for Rust-Dart interoperability: [`flutter_rust_bridge`](https://pub.dev/packages/flutter_rust_bridge).

## What is `flutter_rust_bridge`?

`flutter_rust_bridge` is a powerful package that simplifies communication between Dart and Rust. It allows you to use Rust's high-performance code seamlessly within your Dart or Flutter applications, without needing complex bindings or low-level FFI code.

## Why Use Rust with Dart?

- **Performance**: Rust is known for its speed and memory safety.
- **Concurrency**: Rust's built-in async features make it ideal for handling concurrent tasks.
- **Portability**: Rust compiles to various platforms, including those supported by Flutter.
- **Safety**: Rust's ownership system ensures memory-safe and bug-free programs.

Combining Rust's capabilities with Flutter's UI framework results in fast, reliable, and beautiful cross-platform apps.