dds
5.4.0, released 4 months ago by tools.dart.dev
Library to spawn and communicate with the Dart Developer Service (DDS) via HTTP, WebSocket, or SSE.
What it does
dds lets you start a DDS instance and send VM Service RPCs through it. It forwards VM Service calls and handles DDS‑specific RPCs, enabling debugging and tooling integration.
AI-written summary of version 5.4.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to programmatically start a DDS instance for debugging or tooling.
- You want to send VM Service requests over HTTP, WebSocket, or SSE in a Dart app.
- You need a lightweight, pure Dart client for the DDS protocol without external dependencies.
- You are building a custom IDE or debugging tool that interacts with the Dart VM.
Skip it when
- You only need to consume a running DDS instance; the package is mainly for spawning DDS.
- You prefer a higher‑level debugging framework that already includes DDS support.
- You are targeting environments where WebSocket or SSE are not available and you cannot use the HTTP API.
Strengths
- Pure Dart implementation, no native dependencies.
- Supports multiple transport layers (HTTP, WebSocket, SSE).
- Keeps up‑to‑date with DDS protocol changes.
- No code generation required.
Weaknesses
- Only useful for debugging; not a general networking library.
- Requires a running DDS instance; not a standalone client.
- Limited to VM Service protocol; not a full HTTP client.
- No built‑in retry or error handling beyond basic forwarding.
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 22
Add dds to pubspec and import; no special permissions needed.
import 'package:dds/dds.dart';
void main() async {
final dds = DartDevelopmentService();
await dds.start();
final vmService = dds.vmService;
print(await vmService.getVersion());
}
Works with
Packages commonly used together with dds: ones it builds on, ones built on it, and its own family.
- vm_servicedds depends on itA library to communicate with a service implementing the Dart VM service protocol.
- mimedds depends on itUtilities to resolve MIME types from file names, magic bytes, and to parse multipart streams.
- asyncdds depends on itUtility classes and helpers that extend Dart's async library.
- shelfdds depends on itComposable web server middleware for Dart
- http_multi_serverdds depends on itA dart:io HttpServer wrapper that handles requests from multiple servers.
- shelf_staticdds depends on itServe static files over HTTP with the shelf package
- argsdds depends on itLibrary for parsing raw command-line arguments into options and values using GNU and POSIX styles.
- shelf_web_socketdds depends on itShelf handler that upgrades HTTP to WebSocket and provides a WebSocketChannel per connection.