Skip to content
pubscout

rhttp

0.18.0, released 6 months ago by tienisto.com

Make HTTP requests using Rust and reqwest via FFI for Flutter apps

$ flutter pub add rhttp
Source repository

What it does

Allows Flutter apps to make HTTP requests using a Rust backend through FFI. It provides support for HTTP/1, HTTP/2, HTTP/3, TLS 1.2/1.3, connection pooling, interceptors, and compatibility with standard dart:io, http, and dio APIs.

AI-written summary of version 0.18.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need high-performance HTTP/2 or HTTP/3 support across Android, iOS, Windows, macOS, and Linux
  • You want a unified API for HTTP requests that also supports Windows and Linux
  • You need advanced networking features like certificate pinning, custom DNS resolution, and connection pooling

Skip it when

  • You are building for the web platform, which is currently not supported
  • You want to avoid the build complexity and size overhead of adding a Rust toolchain and FFI bindings to your Flutter project

Strengths

  • Supports HTTP/2 and HTTP/3 with reliable performance powered by Rust's reqwest crate
  • Cross-platform support including desktop operating systems like Windows and Linux
  • Compatible with existing http and dio client patterns

Weaknesses

  • Requires Rust toolchain installed and increases APK/app size
  • Web platform is not supported

Setup

Kind
Plugin (native code)
Effort
High
Code generation
Yes (build_runner)
Direct dependencies
5

Requires installing Rust via rustup (1.80.0 or later), Android NDK / Command-line tools, and calling Rhttp.init() during app start.

import 'package:rhttp/rhttp.dart';

void main() async {
  await Rhttp.init();
  HttpTextResponse response = await Rhttp.get('https://example.com');
  String body = response.body;
}

Alternatives

Packages that do the same job and could replace rhttp.

  • dio

    You prefer a feature-rich, pure Dart HTTP client with interceptors, global configuration, and FormData support.

Works with

Packages commonly used together with rhttp: ones it builds on, ones built on it, and its own family.